@camunda/ccma-saas-frontend 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +3 -0
- package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.js +154 -0
- package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +2 -0
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +14 -3
- package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +18 -0
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +58 -1
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +40 -6
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +6 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +5 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.js +83 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +6 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +79 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +65 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +60 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.js +143 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +6 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.js +51 -0
- 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 +63 -2
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +4 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.js +132 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +17 -3
- package/lib/esm/components/c4-cluster-overview/applications.spec.js +27 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +203 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +59 -9
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +38 -3
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +16 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +104 -0
- package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +5 -1
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +10 -3
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +20 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +85 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +93 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +20 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +15 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +50 -0
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +10 -4
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +116 -24
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +120 -0
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +19 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +2 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +186 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +132 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +20 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +22 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.js +6 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +32 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +71 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +1 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +83 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +31 -58
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +64 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +298 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +48 -30
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.js +23 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +2 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.js +15 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +5 -5
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.js +13 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +1 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +77 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.js +11 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.d.ts +14 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.js +6 -0
- package/lib/esm/components/c4-data-table/c4-data-table.js +117 -34
- package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +1 -0
- package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +151 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +2 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +231 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +56 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +36 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +2 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +102 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +16 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +103 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +4 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.js +63 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +11 -0
- package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +43 -0
- package/lib/esm/components/c4-management-api/c4-management-api.mocks.js +118 -0
- package/lib/esm/components/c4-management-overview/c4-management-overview.js +6 -4
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +1 -1
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +1 -0
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +4 -1
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +58 -36
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +6 -0
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +3 -1
- package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +1 -0
- package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +47 -0
- package/lib/esm/components/shared-charts/ds-line-chart.d.ts +33 -0
- package/lib/esm/components/shared-charts/ds-line-chart.js +55 -0
- package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +22 -0
- package/lib/esm/components/shared-charts/ds-meter-chart.js +48 -0
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -0
- package/lib/esm/components/shared-charts/recharts-tokens.js +51 -0
- package/lib/esm/externalUrls.const.d.ts +2 -0
- package/lib/esm/externalUrls.const.js +7 -0
- package/lib/esm/externalUrls.const.spec.js +2 -0
- package/lib/esm/i18n/en/entities/orgroles.json +0 -16
- package/lib/esm/i18n/en/pages/clusterdetails.json +9 -1
- package/lib/esm/i18n/en/pages/orgmanagement.json +9 -2
- package/lib/esm/index.d.ts +16 -1
- package/lib/esm/index.js +10 -1
- package/lib/esm/runtime/c4-console-authz.d.ts +26 -0
- package/lib/esm/runtime/c4-console-authz.js +58 -28
- package/lib/esm/runtime/c4-console-authz.spec.js +84 -17
- package/lib/esm/runtime/c4-console-data-context.js +40 -0
- package/lib/esm/runtime/c4-console-data-context.types.d.ts +19 -1
- package/lib/esm/runtime/c4-console-data-store.d.ts +25 -1
- package/lib/esm/runtime/c4-console-data-store.js +145 -31
- package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +1 -0
- package/lib/esm/runtime/c4-console-data-store.nav.spec.js +121 -0
- package/lib/esm/runtime/c4-console-data-store.spec.js +35 -6
- package/lib/esm/runtime/c4-console-events-context.d.ts +18 -0
- package/lib/esm/runtime/c4-console-events-context.js +62 -0
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +12 -0
- package/lib/esm/runtime/c4-user-notifications-context.d.ts +19 -0
- package/lib/esm/runtime/c4-user-notifications-context.js +201 -0
- package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +1 -0
- package/lib/esm/runtime/c4-user-notifications-context.spec.js +80 -0
- package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +31 -0
- package/lib/esm/runtime/c4-user-notifications-context.types.js +6 -0
- package/lib/esm/runtime/c4-user-theme.d.ts +27 -0
- package/lib/esm/runtime/c4-user-theme.js +106 -0
- package/lib/esm/runtime/decode-access-token.d.ts +12 -0
- package/lib/esm/runtime/decode-access-token.js +39 -0
- package/lib/esm/runtime/nav/camunda-apps.d.ts +45 -0
- package/lib/esm/runtime/nav/camunda-apps.js +100 -0
- package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +1 -0
- package/lib/esm/runtime/nav/camunda-apps.spec.js +90 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +75 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.js +211 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +1 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +91 -0
- package/lib/esm/runtime/to-api-config.js +4 -0
- package/lib/esm/ui/index.d.ts +1 -0
- package/lib/esm/ui/index.js +3 -2
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +32 -13
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +49 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +8 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +23 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.js +83 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +33 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +17 -84
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +19 -35
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +38 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +38 -14
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +2 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +190 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +60 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +80 -44
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +48 -48
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +2 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +32 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +4 -3
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +21 -2
- package/lib/esm/widgets/group-details/c4-group-details-page.js +3 -2
- package/lib/esm/widgets/management/c4-management-app.js +80 -24
- package/lib/esm/widgets/management/c4-management-app.spec.js +32 -10
- package/lib/esm/widgets/management/management-tabs.d.ts +22 -0
- package/lib/esm/widgets/management/management-tabs.js +76 -0
- package/lib/esm/widgets/management/management-tabs.spec.d.ts +1 -0
- package/lib/esm/widgets/management/management-tabs.spec.js +28 -0
- 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 +11 -2
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +0 -10
- package/lib/esm/widgets/user-details/c4-user-details-page.js +0 -10
- package/package.json +9 -7
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, expect, it } from 'vitest';
|
|
7
|
+
import { buildModelerOrgUrl, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, resolveAdminAppName, } from './camunda-apps.js';
|
|
8
|
+
const cluster = (overrides) => ({
|
|
9
|
+
uuid: 'c1',
|
|
10
|
+
name: 'Cluster 1',
|
|
11
|
+
...overrides,
|
|
12
|
+
});
|
|
13
|
+
describe('isAdminApp', () => {
|
|
14
|
+
it('treats admin and identity as the same', () => {
|
|
15
|
+
expect(isAdminApp('admin')).toBe(true);
|
|
16
|
+
expect(isAdminApp('identity')).toBe(true);
|
|
17
|
+
expect(isAdminApp('operate')).toBe(false);
|
|
18
|
+
expect(isAdminApp(undefined)).toBe(false);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe('resolveAdminAppName', () => {
|
|
22
|
+
it('is admin for zeebe >= 8.9.0-alpha5', () => {
|
|
23
|
+
expect(resolveAdminAppName(cluster({ generation: { versions: { zeebe: '8.9.0' } } }))).toBe('admin');
|
|
24
|
+
});
|
|
25
|
+
it('is identity for older zeebe', () => {
|
|
26
|
+
expect(resolveAdminAppName(cluster({ generation: { versions: { zeebe: '8.8.0' } } }))).toBe('identity');
|
|
27
|
+
});
|
|
28
|
+
it('is admin for SNAPSHOT builds', () => {
|
|
29
|
+
expect(resolveAdminAppName(cluster({ generation: { versions: { zeebe: '8.9.0-SNAPSHOT' } } }))).toBe('admin');
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
describe('getEndpointForApp', () => {
|
|
33
|
+
it('resolves admin via the identity fallback', () => {
|
|
34
|
+
expect(getEndpointForApp('admin', { identity: 'https://identity.example' })).toBe('https://identity.example');
|
|
35
|
+
});
|
|
36
|
+
it('prefers admin over identity when both present', () => {
|
|
37
|
+
expect(getEndpointForApp('admin', {
|
|
38
|
+
admin: 'https://admin.example',
|
|
39
|
+
identity: 'https://identity.example',
|
|
40
|
+
})).toBe('https://admin.example');
|
|
41
|
+
});
|
|
42
|
+
it('returns the direct endpoint for non-admin apps', () => {
|
|
43
|
+
expect(getEndpointForApp('operate', { operate: 'https://op.example' })).toBe('https://op.example');
|
|
44
|
+
});
|
|
45
|
+
it('returns undefined when endpoints are missing', () => {
|
|
46
|
+
expect(getEndpointForApp('operate', undefined)).toBeUndefined();
|
|
47
|
+
expect(getEndpointForApp('operate', {})).toBeUndefined();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe('isAppHealthyOnCluster', () => {
|
|
51
|
+
it('uses zeebe as the health proxy for admin/identity', () => {
|
|
52
|
+
expect(isAppHealthyOnCluster(cluster({ status: { zeebe: 'Healthy' } }), 'admin')).toBe(true);
|
|
53
|
+
expect(isAppHealthyOnCluster(cluster({ status: { zeebe: 'Unhealthy' } }), 'identity')).toBe(false);
|
|
54
|
+
});
|
|
55
|
+
it('checks the app status directly for non-admin apps', () => {
|
|
56
|
+
expect(isAppHealthyOnCluster(cluster({ status: { operate: 'Healthy' } }), 'operate')).toBe(true);
|
|
57
|
+
expect(isAppHealthyOnCluster(cluster({}), 'operate')).toBe(false);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
describe('hasReadPermissionForApp', () => {
|
|
61
|
+
it('reads the admin OR identity permission for admin apps', () => {
|
|
62
|
+
expect(hasReadPermissionForApp('admin', {
|
|
63
|
+
cluster: { identity: { read: true } },
|
|
64
|
+
})).toBe(true);
|
|
65
|
+
expect(hasReadPermissionForApp('admin', { cluster: {} })).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
it('reads the app permission for non-admin apps', () => {
|
|
68
|
+
expect(hasReadPermissionForApp('operate', {
|
|
69
|
+
cluster: { operate: { read: true } },
|
|
70
|
+
})).toBe(true);
|
|
71
|
+
expect(hasReadPermissionForApp('operate', undefined)).toBe(false);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
describe('buildModelerOrgUrl', () => {
|
|
75
|
+
it('rewrites the path to /org/:orgId and drops the query', () => {
|
|
76
|
+
expect(buildModelerOrgUrl('https://modeler.camunda.io/foo?x=1', 'org-9')).toBe('https://modeler.camunda.io/org/org-9');
|
|
77
|
+
});
|
|
78
|
+
it('returns undefined for an unparseable URL', () => {
|
|
79
|
+
expect(buildModelerOrgUrl('not a url', 'org-9')).toBeUndefined();
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
describe('getReadableAppName / getClusterStage', () => {
|
|
83
|
+
it('title-cases the app name', () => {
|
|
84
|
+
expect(getReadableAppName('operate')).toBe('Operate');
|
|
85
|
+
});
|
|
86
|
+
it('reads the first camunda label as the stage', () => {
|
|
87
|
+
expect(getClusterStage(cluster({ labels: { camunda: ['stable'] } }))).toBe('stable');
|
|
88
|
+
expect(getClusterStage(cluster({}))).toBeUndefined();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { CamundaWebApp, ExternalClusterDto } from '@camunda/ccma-shared-types';
|
|
2
|
+
export interface C4ClusterNavAppEntry {
|
|
3
|
+
/** Resolved display alias (`admin`/`identity`) for the app. */
|
|
4
|
+
app: CamundaWebApp;
|
|
5
|
+
label: string;
|
|
6
|
+
/** Destination for the app link. Present when healthy or a teaser is set. */
|
|
7
|
+
href?: string;
|
|
8
|
+
healthy: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface C4ClusterNavEntry {
|
|
11
|
+
cluster: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
name: string;
|
|
14
|
+
/** Stage tag from `labels.camunda[0]`, if any. */
|
|
15
|
+
stage?: string;
|
|
16
|
+
};
|
|
17
|
+
apps: C4ClusterNavAppEntry[];
|
|
18
|
+
}
|
|
19
|
+
export interface UseC4ClusterNavEntriesOptions {
|
|
20
|
+
/** Override the app list. Default: operate, tasklist, optimize, admin. */
|
|
21
|
+
apps?: CamundaWebApp[];
|
|
22
|
+
/** Hide apps the user can't see. Receives the canonical app key. */
|
|
23
|
+
isAppVisible?: (app: CamundaWebApp, cluster: ExternalClusterDto) => boolean;
|
|
24
|
+
/** Fallback hrefs for unhealthy apps, keyed by canonical or resolved alias. */
|
|
25
|
+
appTeaserHrefs?: Partial<Record<CamundaWebApp, string>>;
|
|
26
|
+
/** Consumer label overrides, keyed by resolved alias. */
|
|
27
|
+
appLabels?: Partial<Record<CamundaWebApp, string>>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Headless equivalent of c3's `useClusterSidebarEntries`. Reads the org's
|
|
31
|
+
* clusters from `useC4ConsoleData` (auto-fetching them on first use) and
|
|
32
|
+
* returns per-cluster, per-app navigation data — no icons, no JSX. The
|
|
33
|
+
* presentational navigation library maps `app` to its own icon and renders the
|
|
34
|
+
* rows. Returns `[]` while data is loading or nothing is renderable.
|
|
35
|
+
*
|
|
36
|
+
* Requires `C4ConsoleRuntimeProvider` + `C4ConsoleDataProvider`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useC4ClusterNavEntries(orgId: string, options?: UseC4ClusterNavEntriesOptions): C4ClusterNavEntry[];
|
|
39
|
+
export interface C4BreadcrumbDropdownItem {
|
|
40
|
+
key: string;
|
|
41
|
+
label: string;
|
|
42
|
+
href?: string;
|
|
43
|
+
selected: boolean;
|
|
44
|
+
/** Stage tag, for cluster switcher rows. */
|
|
45
|
+
stage?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface C4BreadcrumbCrumb {
|
|
48
|
+
key: 'org' | 'cluster' | 'app';
|
|
49
|
+
label: string;
|
|
50
|
+
href?: string;
|
|
51
|
+
dropdownItems?: C4BreadcrumbDropdownItem[];
|
|
52
|
+
}
|
|
53
|
+
export interface UseC4WebappBreadcrumbDataOptions {
|
|
54
|
+
orgId: string;
|
|
55
|
+
/** The app currently being viewed. */
|
|
56
|
+
currentApp: CamundaWebApp;
|
|
57
|
+
/** UUID of the cluster currently being viewed, if any. */
|
|
58
|
+
currentClusterUuid?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Per-app URL map (same shape as a cluster's `endpoints`). Source for the
|
|
61
|
+
* app-switcher when there is no SaaS cluster, and for the modeler back-link
|
|
62
|
+
* (`webappLinks.modeler`). Falls back to `runtime.publicUrls.modelerBaseUrl`.
|
|
63
|
+
*/
|
|
64
|
+
webappLinks?: Partial<Record<CamundaWebApp, string>>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Headless equivalent of c3's `useClusterWebappBreadcrumbs`. Builds the
|
|
68
|
+
* `[Org] > [Cluster] > [App]` chain as plain data (labels, hrefs, dropdown
|
|
69
|
+
* items with selection), reading orgs/clusters from `useC4ConsoleData`. Crumbs
|
|
70
|
+
* and dropdowns are omitted when the underlying data is unavailable, so the
|
|
71
|
+
* same hook serves SaaS (full chain) and Self-Managed (partial) without a flag.
|
|
72
|
+
*
|
|
73
|
+
* Requires `C4ConsoleRuntimeProvider` + `C4ConsoleDataProvider`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function useC4WebappBreadcrumbData(options: UseC4WebappBreadcrumbDataOptions): C4BreadcrumbCrumb[];
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
import { useEffect, useMemo } from 'react';
|
|
7
|
+
import { useC4ConsoleData } from '../c4-console-data-context.js';
|
|
8
|
+
import { useC4ConsoleRuntime } from '../c4-console-runtime-context.js';
|
|
9
|
+
import { buildModelerOrgUrl, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, isAdminApp, isAppHealthyOnCluster, resolveAdminAppName, } from './camunda-apps.js';
|
|
10
|
+
// Apps offered in the breadcrumb app-switcher, in display order.
|
|
11
|
+
const SWITCHABLE_APPS = [
|
|
12
|
+
'operate',
|
|
13
|
+
'tasklist',
|
|
14
|
+
'optimize',
|
|
15
|
+
'admin',
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Headless equivalent of c3's `useClusterSidebarEntries`. Reads the org's
|
|
19
|
+
* clusters from `useC4ConsoleData` (auto-fetching them on first use) and
|
|
20
|
+
* returns per-cluster, per-app navigation data — no icons, no JSX. The
|
|
21
|
+
* presentational navigation library maps `app` to its own icon and renders the
|
|
22
|
+
* rows. Returns `[]` while data is loading or nothing is renderable.
|
|
23
|
+
*
|
|
24
|
+
* Requires `C4ConsoleRuntimeProvider` + `C4ConsoleDataProvider`.
|
|
25
|
+
*/
|
|
26
|
+
export function useC4ClusterNavEntries(orgId, options = {}) {
|
|
27
|
+
const data = useC4ConsoleData();
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (orgId) {
|
|
30
|
+
void data.fetchWebappClusters(orgId);
|
|
31
|
+
}
|
|
32
|
+
}, [data, orgId]);
|
|
33
|
+
const clusters = data.getWebappClusters(orgId);
|
|
34
|
+
const { apps = DEFAULT_NAV_APPS, isAppVisible, appTeaserHrefs, appLabels, } = options;
|
|
35
|
+
return useMemo(() => {
|
|
36
|
+
if (!clusters) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
return clusters.flatMap((cluster) => {
|
|
40
|
+
const appEntries = apps.flatMap((app) => {
|
|
41
|
+
if (isAppVisible && !isAppVisible(app, cluster)) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
const resolvedApp = isAdminApp(app) ? resolveAdminAppName(cluster) : app;
|
|
45
|
+
const endpoint = getEndpointForApp(app, cluster.endpoints);
|
|
46
|
+
if (!endpoint) {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
const healthy = isAppHealthyOnCluster(cluster, app);
|
|
50
|
+
const teaser = appTeaserHrefs?.[resolvedApp] ?? appTeaserHrefs?.[app];
|
|
51
|
+
const href = healthy ? endpoint : teaser;
|
|
52
|
+
// Match c3: no destination (unhealthy + no teaser) → omit the entry.
|
|
53
|
+
if (!href) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
return [
|
|
57
|
+
{
|
|
58
|
+
app: resolvedApp,
|
|
59
|
+
label: appLabels?.[resolvedApp] ?? getReadableAppName(resolvedApp),
|
|
60
|
+
href,
|
|
61
|
+
healthy,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
});
|
|
65
|
+
if (appEntries.length === 0) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
cluster: {
|
|
71
|
+
uuid: cluster.uuid,
|
|
72
|
+
name: cluster.name,
|
|
73
|
+
stage: getClusterStage(cluster),
|
|
74
|
+
},
|
|
75
|
+
apps: appEntries,
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
});
|
|
79
|
+
}, [clusters, apps, isAppVisible, appTeaserHrefs, appLabels]);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Headless equivalent of c3's `useClusterWebappBreadcrumbs`. Builds the
|
|
83
|
+
* `[Org] > [Cluster] > [App]` chain as plain data (labels, hrefs, dropdown
|
|
84
|
+
* items with selection), reading orgs/clusters from `useC4ConsoleData`. Crumbs
|
|
85
|
+
* and dropdowns are omitted when the underlying data is unavailable, so the
|
|
86
|
+
* same hook serves SaaS (full chain) and Self-Managed (partial) without a flag.
|
|
87
|
+
*
|
|
88
|
+
* Requires `C4ConsoleRuntimeProvider` + `C4ConsoleDataProvider`.
|
|
89
|
+
*/
|
|
90
|
+
export function useC4WebappBreadcrumbData(options) {
|
|
91
|
+
const { orgId, currentApp, currentClusterUuid, webappLinks } = options;
|
|
92
|
+
const runtime = useC4ConsoleRuntime();
|
|
93
|
+
const data = useC4ConsoleData();
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
void data.fetchMyOrgs();
|
|
96
|
+
}, [data]);
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (orgId) {
|
|
99
|
+
void data.fetchWebappClusters(orgId);
|
|
100
|
+
}
|
|
101
|
+
}, [data, orgId]);
|
|
102
|
+
const orgs = data.getMyOrgs();
|
|
103
|
+
const clusters = data.getWebappClusters(orgId);
|
|
104
|
+
return useMemo(() => {
|
|
105
|
+
const crumbs = [];
|
|
106
|
+
const modelerUrl = webappLinks?.modeler ?? runtime.publicUrls?.modelerBaseUrl;
|
|
107
|
+
const allOrgs = orgs ?? [];
|
|
108
|
+
const activeOrg = allOrgs.find((o) => o.uuid === orgId);
|
|
109
|
+
const allClusters = clusters ?? [];
|
|
110
|
+
const currentCluster = allClusters.find((c) => c.uuid === currentClusterUuid) ?? undefined;
|
|
111
|
+
// ── Org crumb ────────────────────────────────────────────────────────────
|
|
112
|
+
if (activeOrg) {
|
|
113
|
+
const hasSiblings = allOrgs.filter((o) => o.uuid !== activeOrg.uuid).length > 0;
|
|
114
|
+
const dropdownItems = hasSiblings && modelerUrl
|
|
115
|
+
? allOrgs.flatMap((o) => {
|
|
116
|
+
if (o.uuid === activeOrg.uuid) {
|
|
117
|
+
return [{ key: o.uuid, label: o.name, selected: true }];
|
|
118
|
+
}
|
|
119
|
+
const href = buildModelerOrgUrl(modelerUrl, o.uuid);
|
|
120
|
+
if (!href) {
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
return [{ key: o.uuid, label: o.name, href, selected: false }];
|
|
124
|
+
})
|
|
125
|
+
: undefined;
|
|
126
|
+
crumbs.push({
|
|
127
|
+
key: 'org',
|
|
128
|
+
label: activeOrg.name,
|
|
129
|
+
href: modelerUrl,
|
|
130
|
+
dropdownItems,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
// ── Cluster crumb ─────────────────────────────────────────────────────────
|
|
134
|
+
if (currentCluster) {
|
|
135
|
+
const clusterUrl = modelerUrl
|
|
136
|
+
? `${modelerUrl}?fromCluster=${currentCluster.uuid}`
|
|
137
|
+
: undefined;
|
|
138
|
+
const reachableClusters = allClusters.filter((c) => c.uuid === currentCluster.uuid ||
|
|
139
|
+
(getEndpointForApp(currentApp, c.endpoints) &&
|
|
140
|
+
isAppHealthyOnCluster(c, currentApp)));
|
|
141
|
+
const hasSiblings = reachableClusters.filter((c) => c.uuid !== currentCluster.uuid).length >
|
|
142
|
+
0;
|
|
143
|
+
const dropdownItems = hasSiblings
|
|
144
|
+
? reachableClusters.map((c) => {
|
|
145
|
+
const selected = c.uuid === currentCluster.uuid;
|
|
146
|
+
return {
|
|
147
|
+
key: c.uuid,
|
|
148
|
+
label: c.name,
|
|
149
|
+
selected,
|
|
150
|
+
stage: getClusterStage(c),
|
|
151
|
+
...(selected
|
|
152
|
+
? {}
|
|
153
|
+
: { href: getEndpointForApp(currentApp, c.endpoints) ?? '' }),
|
|
154
|
+
};
|
|
155
|
+
})
|
|
156
|
+
: undefined;
|
|
157
|
+
crumbs.push({
|
|
158
|
+
key: 'cluster',
|
|
159
|
+
label: currentCluster.name,
|
|
160
|
+
href: clusterUrl,
|
|
161
|
+
dropdownItems,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// ── App crumb ──────────────────────────────────────────────────────────────
|
|
165
|
+
const switcherKey = isAdminApp(currentApp)
|
|
166
|
+
? 'admin'
|
|
167
|
+
: currentApp;
|
|
168
|
+
const resolvedCurrentApp = isAdminApp(currentApp) && currentCluster
|
|
169
|
+
? resolveAdminAppName(currentCluster)
|
|
170
|
+
: currentApp;
|
|
171
|
+
const appLabel = getReadableAppName(resolvedCurrentApp);
|
|
172
|
+
const sourceEndpoints = currentCluster?.endpoints ?? webappLinks;
|
|
173
|
+
const reachableApps = sourceEndpoints
|
|
174
|
+
? SWITCHABLE_APPS.filter((app) => app === switcherKey ||
|
|
175
|
+
(getEndpointForApp(app, sourceEndpoints) &&
|
|
176
|
+
(!currentCluster || isAppHealthyOnCluster(currentCluster, app))))
|
|
177
|
+
: [switcherKey];
|
|
178
|
+
const hasSiblingApps = reachableApps.filter((app) => app !== switcherKey).length > 0;
|
|
179
|
+
const dropdownItems = hasSiblingApps && sourceEndpoints
|
|
180
|
+
? reachableApps.map((app) => {
|
|
181
|
+
const selected = app === switcherKey;
|
|
182
|
+
const resolvedApp = isAdminApp(app) && currentCluster
|
|
183
|
+
? resolveAdminAppName(currentCluster)
|
|
184
|
+
: app;
|
|
185
|
+
return {
|
|
186
|
+
key: app,
|
|
187
|
+
label: getReadableAppName(resolvedApp),
|
|
188
|
+
selected,
|
|
189
|
+
...(selected
|
|
190
|
+
? {}
|
|
191
|
+
: { href: getEndpointForApp(app, sourceEndpoints) ?? '' }),
|
|
192
|
+
};
|
|
193
|
+
})
|
|
194
|
+
: undefined;
|
|
195
|
+
crumbs.push({
|
|
196
|
+
key: 'app',
|
|
197
|
+
label: appLabel,
|
|
198
|
+
href: '/',
|
|
199
|
+
dropdownItems,
|
|
200
|
+
});
|
|
201
|
+
return crumbs;
|
|
202
|
+
}, [
|
|
203
|
+
orgs,
|
|
204
|
+
clusters,
|
|
205
|
+
orgId,
|
|
206
|
+
currentApp,
|
|
207
|
+
currentClusterUuid,
|
|
208
|
+
webappLinks,
|
|
209
|
+
runtime.publicUrls?.modelerBaseUrl,
|
|
210
|
+
]);
|
|
211
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { renderHook } from '@testing-library/react';
|
|
3
|
+
import { describe, expect, it } from 'vitest';
|
|
4
|
+
import { C4ConsoleDataProvider } from '../c4-console-data-context.js';
|
|
5
|
+
import { C4ConsoleRuntimeProvider } from '../c4-console-runtime-context.js';
|
|
6
|
+
import { useC4ClusterNavEntries, useC4WebappBreadcrumbData, } from './use-webapp-nav-data.js';
|
|
7
|
+
const runtime = {
|
|
8
|
+
stage: 'dev',
|
|
9
|
+
auth: { getAccessToken: async () => 'token' },
|
|
10
|
+
backendUrls: {},
|
|
11
|
+
publicUrls: { modelerBaseUrl: 'https://modeler.example.com' },
|
|
12
|
+
};
|
|
13
|
+
const healthyCluster = {
|
|
14
|
+
uuid: 'c1',
|
|
15
|
+
name: 'Prod',
|
|
16
|
+
status: { operate: 'Healthy', zeebe: 'Healthy' },
|
|
17
|
+
endpoints: {
|
|
18
|
+
operate: 'https://c1.operate',
|
|
19
|
+
admin: 'https://c1.admin',
|
|
20
|
+
},
|
|
21
|
+
labels: { camunda: ['stable'] },
|
|
22
|
+
generation: { versions: { zeebe: '8.9.0' } },
|
|
23
|
+
};
|
|
24
|
+
// Seed the shared cache so the hooks' auto-fetch is a no-op (cache hit) and no
|
|
25
|
+
// network is touched.
|
|
26
|
+
const wrapper = (initialState) => ({ children }) => (_jsx(C4ConsoleRuntimeProvider, { config: runtime, children: _jsx(C4ConsoleDataProvider, { initialState: initialState, children: children }) }));
|
|
27
|
+
const cacheEntry = (data) => ({
|
|
28
|
+
data,
|
|
29
|
+
isLoading: false,
|
|
30
|
+
error: null,
|
|
31
|
+
lastFetched: null,
|
|
32
|
+
});
|
|
33
|
+
describe('useC4ClusterNavEntries', () => {
|
|
34
|
+
it('builds per-cluster app entries with resolved alias, health and stage', () => {
|
|
35
|
+
const { result } = renderHook(() => useC4ClusterNavEntries('org-1'), {
|
|
36
|
+
wrapper: wrapper({
|
|
37
|
+
webappClusters: { 'org-1': cacheEntry([healthyCluster]) },
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
expect(result.current).toHaveLength(1);
|
|
41
|
+
const entry = result.current[0];
|
|
42
|
+
expect(entry.cluster).toMatchObject({
|
|
43
|
+
uuid: 'c1',
|
|
44
|
+
name: 'Prod',
|
|
45
|
+
stage: 'stable',
|
|
46
|
+
});
|
|
47
|
+
// admin resolves to 'admin' (zeebe 8.9.0); operate stays operate.
|
|
48
|
+
const apps = entry.apps.map((a) => a.app);
|
|
49
|
+
expect(apps).toContain('operate');
|
|
50
|
+
expect(apps).toContain('admin');
|
|
51
|
+
const operate = entry.apps.find((a) => a.app === 'operate');
|
|
52
|
+
expect(operate).toMatchObject({ href: 'https://c1.operate', healthy: true });
|
|
53
|
+
});
|
|
54
|
+
it('omits apps with no endpoint', () => {
|
|
55
|
+
const { result } = renderHook(() => useC4ClusterNavEntries('org-1'), {
|
|
56
|
+
wrapper: wrapper({
|
|
57
|
+
webappClusters: {
|
|
58
|
+
'org-1': cacheEntry([
|
|
59
|
+
{ uuid: 'c1', name: 'Prod', endpoints: {}, status: {} },
|
|
60
|
+
]),
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
});
|
|
64
|
+
expect(result.current).toHaveLength(0);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
describe('useC4WebappBreadcrumbData', () => {
|
|
68
|
+
it('builds org > cluster > app crumbs with a selected app', () => {
|
|
69
|
+
const { result } = renderHook(() => useC4WebappBreadcrumbData({
|
|
70
|
+
orgId: 'org-1',
|
|
71
|
+
currentApp: 'operate',
|
|
72
|
+
currentClusterUuid: 'c1',
|
|
73
|
+
}), {
|
|
74
|
+
wrapper: wrapper({
|
|
75
|
+
myOrgs: cacheEntry([
|
|
76
|
+
{ uuid: 'org-1', name: 'My Org' },
|
|
77
|
+
{ uuid: 'org-2', name: 'Other Org' },
|
|
78
|
+
]),
|
|
79
|
+
webappClusters: { 'org-1': cacheEntry([healthyCluster]) },
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
const keys = result.current.map((c) => c.key);
|
|
83
|
+
expect(keys).toEqual(['org', 'cluster', 'app']);
|
|
84
|
+
const org = result.current[0];
|
|
85
|
+
expect(org.label).toBe('My Org');
|
|
86
|
+
// A sibling org + modeler URL yields a switch dropdown.
|
|
87
|
+
expect(org.dropdownItems?.some((d) => d.key === 'org-2')).toBe(true);
|
|
88
|
+
const app = result.current[2];
|
|
89
|
+
expect(app.label).toBe('Operate');
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -21,6 +21,10 @@ export function toApiConfig(runtime) {
|
|
|
21
21
|
// Used by some API services / audiences.
|
|
22
22
|
envOverride.login = normalizeBaseUrl(identityApiBaseUrl);
|
|
23
23
|
}
|
|
24
|
+
const notificationsApiBaseUrl = runtime.backendUrls.notificationsApiBaseUrl;
|
|
25
|
+
if (notificationsApiBaseUrl && notificationsApiBaseUrl.length > 0) {
|
|
26
|
+
envOverride.notifications = normalizeBaseUrl(notificationsApiBaseUrl);
|
|
27
|
+
}
|
|
24
28
|
return {
|
|
25
29
|
stage: runtime.stage,
|
|
26
30
|
auth: {
|
package/lib/esm/ui/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const ModalFooter: ComponentType<import("@carbon/react").ModalFoo
|
|
|
16
16
|
export declare const MultiSelect: typeof CarbonMultiSelect;
|
|
17
17
|
export declare const FilterableMultiSelect: typeof CarbonFilterableMultiSelect;
|
|
18
18
|
export declare const ProgressBar: ComponentType<import("@carbon/react").ProgressBarProps>;
|
|
19
|
+
export declare const Search: ComponentType<import("@carbon/react").SearchProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
20
|
export declare const SkeletonText: ComponentType<import("@carbon/react").SkeletonTextProps>;
|
|
20
21
|
export declare const SkeletonPlaceholder: ComponentType<import("@carbon/react").SkeletonPlaceholderProps>;
|
|
21
22
|
export declare const BreadcrumbSkeleton: ComponentType<import("@carbon/react").BreadcrumbSkeletonProps>;
|
package/lib/esm/ui/index.js
CHANGED
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
* To add a leaf: import the Carbon + carbon-compat versions and wrap with
|
|
31
31
|
* `switchable(...)`, then point the consuming component's import at this module.
|
|
32
32
|
*/
|
|
33
|
-
import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Link as DsLink, Loading as DsLoading, ModalBody as DsModalBody, ModalFooter as DsModalFooter, ModalHeader as DsModalHeader, MultiSelect as DsMultiSelect, OverflowMenu as DsOverflowMenu, OverflowMenuItem as DsOverflowMenuItem, ProgressBar as DsProgressBar, SkeletonPlaceholder as DsSkeletonPlaceholder, SkeletonText as DsSkeletonText, Stack as DsStack, TabsSkeleton as DsTabsSkeleton, Tag as DsTag, TextArea as DsTextArea, TextInput as DsTextInput, Tile as DsTile, Toggle as DsToggle, Tooltip as DsTooltip, } from '@camunda/design-system/carbon-compat';
|
|
34
|
-
import { BreadcrumbSkeleton as CarbonBreadcrumbSkeleton, Button as CarbonButton, Checkbox as CarbonCheckbox, CodeSnippet as CarbonCodeSnippet, ComposedModal as CarbonComposedModal, Dropdown as CarbonDropdown, FilterableMultiSelect as CarbonFilterableMultiSelect, Link as CarbonLink, Loading as CarbonLoading, Modal as CarbonModal, ModalBody as CarbonModalBody, ModalFooter as CarbonModalFooter, ModalHeader as CarbonModalHeader, MultiSelect as CarbonMultiSelect, OverflowMenu as CarbonOverflowMenu, OverflowMenuItem as CarbonOverflowMenuItem, ProgressBar as CarbonProgressBar, SkeletonPlaceholder as CarbonSkeletonPlaceholder, SkeletonText as CarbonSkeletonText, Stack as CarbonStack, TabsSkeleton as CarbonTabsSkeleton, Tag as CarbonTag, TextArea as CarbonTextArea, TextInput as CarbonTextInput, Tile as CarbonTile, Toggle as CarbonToggle, Tooltip as CarbonTooltip, } from '@carbon/react';
|
|
33
|
+
import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Link as DsLink, Loading as DsLoading, ModalBody as DsModalBody, ModalFooter as DsModalFooter, ModalHeader as DsModalHeader, MultiSelect as DsMultiSelect, OverflowMenu as DsOverflowMenu, OverflowMenuItem as DsOverflowMenuItem, ProgressBar as DsProgressBar, Search as DsSearch, SkeletonPlaceholder as DsSkeletonPlaceholder, SkeletonText as DsSkeletonText, Stack as DsStack, TabsSkeleton as DsTabsSkeleton, Tag as DsTag, TextArea as DsTextArea, TextInput as DsTextInput, Tile as DsTile, Toggle as DsToggle, Tooltip as DsTooltip, } from '@camunda/design-system/carbon-compat';
|
|
34
|
+
import { BreadcrumbSkeleton as CarbonBreadcrumbSkeleton, Button as CarbonButton, Checkbox as CarbonCheckbox, CodeSnippet as CarbonCodeSnippet, ComposedModal as CarbonComposedModal, Dropdown as CarbonDropdown, FilterableMultiSelect as CarbonFilterableMultiSelect, Link as CarbonLink, Loading as CarbonLoading, Modal as CarbonModal, ModalBody as CarbonModalBody, ModalFooter as CarbonModalFooter, ModalHeader as CarbonModalHeader, MultiSelect as CarbonMultiSelect, OverflowMenu as CarbonOverflowMenu, OverflowMenuItem as CarbonOverflowMenuItem, ProgressBar as CarbonProgressBar, Search as CarbonSearch, SkeletonPlaceholder as CarbonSkeletonPlaceholder, SkeletonText as CarbonSkeletonText, Stack as CarbonStack, TabsSkeleton as CarbonTabsSkeleton, Tag as CarbonTag, TextArea as CarbonTextArea, TextInput as CarbonTextInput, Tile as CarbonTile, Toggle as CarbonToggle, Tooltip as CarbonTooltip, } from '@carbon/react';
|
|
35
35
|
import { createElement } from 'react';
|
|
36
36
|
import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
|
|
37
37
|
import { C4ModalDialog } from './c4-modal-dialog.js';
|
|
@@ -54,6 +54,7 @@ export const ModalFooter = switchable(CarbonModalFooter, DsModalFooter);
|
|
|
54
54
|
export const MultiSelect = switchable(CarbonMultiSelect, DsMultiSelect);
|
|
55
55
|
export const FilterableMultiSelect = switchable(CarbonFilterableMultiSelect, DsFilterableMultiSelect);
|
|
56
56
|
export const ProgressBar = switchable(CarbonProgressBar, DsProgressBar);
|
|
57
|
+
export const Search = switchable(CarbonSearch, DsSearch);
|
|
57
58
|
export const SkeletonText = switchable(CarbonSkeletonText, DsSkeletonText);
|
|
58
59
|
export const SkeletonPlaceholder = switchable(CarbonSkeletonPlaceholder, DsSkeletonPlaceholder);
|
|
59
60
|
export const BreadcrumbSkeleton = switchable(CarbonBreadcrumbSkeleton, DsBreadcrumbSkeleton);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4ClusterDetailsAppProps } from './c4-cluster-details-app.types';
|
|
3
|
+
export declare function mergeNestedSnapshot<T>(previous: T | undefined, next: T): T;
|
|
3
4
|
export declare const C4ClusterDetailsApp: ((props: C4ClusterDetailsAppProps) => JSX.Element) & {
|
|
4
5
|
displayName: string;
|
|
5
6
|
};
|