@camunda/ccma-saas-frontend 0.35.16 → 0.36.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-clusters-empty-state/c4-clusters-empty-state.d.ts +4 -4
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +12 -23
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +4 -1
- package/lib/esm/i18n/en/pages/clusters.json +2 -3
- package/lib/esm/ui/index.d.ts +1 -1
- package/lib/esm/ui/index.js +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +4 -8
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4ClustersEmptyStateProps } from './c4-clusters-empty-state.types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Every variant keeps the centered default of
|
|
5
|
-
* `align`. A host page puts this empty state in a wide content pane of its
|
|
6
|
-
* thus a left-aligned block looks unfinished beside the centered empty
|
|
7
|
-
* of the other pages (#10119). Design owns this decision: do not add
|
|
4
|
+
* Every variant keeps the centered default of the DS empty state, and passes
|
|
5
|
+
* no `align`. A host page puts this empty state in a wide content pane of its
|
|
6
|
+
* own, thus a left-aligned block looks unfinished beside the centered empty
|
|
7
|
+
* states of the other pages (#10119). Design owns this decision: do not add
|
|
8
8
|
* `align='start'` again without design.
|
|
9
9
|
*/
|
|
10
10
|
export declare const C4ClustersEmptyState: (props: C4ClustersEmptyStateProps) => JSX.Element;
|
|
@@ -1,35 +1,24 @@
|
|
|
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 { Boxes } from 'lucide-react';
|
|
2
8
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
9
|
+
import { DsButton, DsEmptyState } from '../../ui/index.js';
|
|
3
10
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
4
11
|
/**
|
|
5
|
-
* Every variant keeps the centered default of
|
|
6
|
-
* `align`. A host page puts this empty state in a wide content pane of its
|
|
7
|
-
* thus a left-aligned block looks unfinished beside the centered empty
|
|
8
|
-
* of the other pages (#10119). Design owns this decision: do not add
|
|
12
|
+
* Every variant keeps the centered default of the DS empty state, and passes
|
|
13
|
+
* no `align`. A host page puts this empty state in a wide content pane of its
|
|
14
|
+
* own, thus a left-aligned block looks unfinished beside the centered empty
|
|
15
|
+
* states of the other pages (#10119). Design owns this decision: do not add
|
|
9
16
|
* `align='start'` again without design.
|
|
10
17
|
*/
|
|
11
18
|
export const C4ClustersEmptyState = (props) => {
|
|
12
19
|
const { variant, texts, onCreateCluster, createClusterButtonDisabled, docsHref, onDocsClick, onUpgrade, onExtendTrial, } = props;
|
|
13
20
|
if (variant === 'noClusters') {
|
|
14
|
-
|
|
15
|
-
? {
|
|
16
|
-
onClick: onCreateCluster,
|
|
17
|
-
disabled: createClusterButtonDisabled ?? false,
|
|
18
|
-
label: texts.noClusters.createButtonLabel,
|
|
19
|
-
id: 'createClusterCTA',
|
|
20
|
-
}
|
|
21
|
-
: undefined;
|
|
22
|
-
const link = docsHref
|
|
23
|
-
? {
|
|
24
|
-
href: docsHref,
|
|
25
|
-
label: texts.noClusters.docsLinkLabel,
|
|
26
|
-
onClick: onDocsClick,
|
|
27
|
-
}
|
|
28
|
-
: undefined;
|
|
29
|
-
return (_jsx(C4EmptyState, { icon: {
|
|
30
|
-
path: C4_ASSET_URLS.clusterIcon,
|
|
31
|
-
altText: 'clusterIcon',
|
|
32
|
-
}, heading: texts.noClusters.heading, description: texts.noClusters.description, button: button, link: link }));
|
|
21
|
+
return (_jsx(DsEmptyState, { icon: _jsx(Boxes, { "aria-hidden": 'true' }), heading: texts.noClusters.heading, action: onCreateCluster ? (_jsx(DsButton, { id: 'createClusterCTA', onClick: onCreateCluster, disabled: createClusterButtonDisabled ?? false, children: texts.noClusters.createButtonLabel })) : undefined, secondaryAction: docsHref ? (_jsx(DsButton, { variant: 'link', asChild: true, children: _jsx("a", { href: docsHref, onClick: onDocsClick, children: texts.noClusters.docsLinkLabel }) })) : undefined }));
|
|
33
22
|
}
|
|
34
23
|
if (variant === 'trialExpiredAdmin') {
|
|
35
24
|
const upgradeButton = {
|
|
@@ -3,7 +3,10 @@ export type C4ClustersEmptyStateVariant = 'noClusters' | 'trialExpiredAdmin' | '
|
|
|
3
3
|
export interface C4ClustersEmptyStateTexts {
|
|
4
4
|
noClusters: {
|
|
5
5
|
heading: string;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Not shown. The heading alone tells the user what to do.
|
|
8
|
+
*/
|
|
9
|
+
description?: string | ReactElement;
|
|
7
10
|
createButtonLabel: string;
|
|
8
11
|
docsLinkLabel: string;
|
|
9
12
|
};
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"clusterCapMessage": "We are overwhelmed by the success of Camunda. For this reason, we are currently unable to provision any additional clusters. You can try later, but we will reach out to you as soon as we have free capacity again.",
|
|
16
16
|
"noClustersMessage": {
|
|
17
|
-
"title": "
|
|
18
|
-
"
|
|
19
|
-
"docText": "View The Getting Started Guide"
|
|
17
|
+
"title": "Set up a cluster to get a deployment environment",
|
|
18
|
+
"docText": "View the guide"
|
|
20
19
|
},
|
|
21
20
|
"trialExpired": {
|
|
22
21
|
"title": "Upgrade to use Clusters, Clusters are not available with your current plan.",
|
package/lib/esm/ui/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare const ClusterTag: typeof C4ClusterTag;
|
|
|
8
8
|
export declare const Modal: typeof C4ModalDialog;
|
|
9
9
|
export declare const PasswordInput: typeof C4PasswordInput;
|
|
10
10
|
export declare const TextArea: typeof C4TextArea;
|
|
11
|
-
export { Badge as DsBadge, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
11
|
+
export { Badge as DsBadge, Button as DsButton, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, EmptyState as DsEmptyState, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
12
12
|
export { DsCompactCodeBlock } from './ds-compact-code-block.js';
|
package/lib/esm/ui/index.js
CHANGED
|
@@ -31,5 +31,5 @@ export const TextArea = C4TextArea;
|
|
|
31
31
|
// DS leaves with no Carbon-API adapter, for components that map a stable c4
|
|
32
32
|
// interface onto the DS. Import them from here, not from the DS package, so
|
|
33
33
|
// feature code keeps one import point for UI.
|
|
34
|
-
export { Badge as DsBadge, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
34
|
+
export { Badge as DsBadge, Button as DsButton, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, EmptyState as DsEmptyState, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
35
35
|
export { DsCompactCodeBlock } from './ds-compact-code-block.js';
|
|
@@ -711,10 +711,9 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
|
|
|
711
711
|
? () => setIsExtendModalOpen(true)
|
|
712
712
|
: undefined, texts: {
|
|
713
713
|
noClusters: {
|
|
714
|
-
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', '
|
|
715
|
-
description: translateCopy('c4console:clusters.emptyState.noClusters.description', 'Create a cluster to get started.'),
|
|
714
|
+
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', 'Set up a cluster to get a deployment environment'),
|
|
716
715
|
createButtonLabel: resolvedTranslations.createButton,
|
|
717
|
-
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View
|
|
716
|
+
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View the guide'),
|
|
718
717
|
},
|
|
719
718
|
trialExpired: {
|
|
720
719
|
heading: translateCopy('c4console:clusters.list.trialExpired.title', 'Your trial has expired'),
|
|
@@ -729,16 +728,13 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
|
|
|
729
728
|
return undefined;
|
|
730
729
|
}
|
|
731
730
|
const createButtonLabel = translateCopy('c4console:clusters.emptyState.noClusters.createButtonLabel', 'Create new cluster');
|
|
732
|
-
const descriptionPrefix = translateCopy('c4console:clusters.emptyState.noClusters.descriptionPrefix', 'Click ');
|
|
733
|
-
const descriptionSuffix = translateCopy('c4console:clusters.emptyState.noClusters.descriptionSuffix', ' to have a place to execute your processes');
|
|
734
731
|
return (_jsx(C4ClustersEmptyState, { variant: 'noClusters', docsHref: resolvedGettingStartedHref, onCreateCluster: derivedPermissions.canCreateCluster
|
|
735
732
|
? () => handleNavigate(urls.createCluster)
|
|
736
733
|
: undefined, createClusterButtonDisabled: derivedPermissions.createClusterButtonDisabled, texts: {
|
|
737
734
|
noClusters: {
|
|
738
|
-
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', '
|
|
739
|
-
description: (_jsxs("span", { children: [descriptionPrefix, _jsx("strong", { children: createButtonLabel }), descriptionSuffix] })),
|
|
735
|
+
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', 'Set up a cluster to get a deployment environment'),
|
|
740
736
|
createButtonLabel,
|
|
741
|
-
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View
|
|
737
|
+
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View the guide'),
|
|
742
738
|
},
|
|
743
739
|
trialExpired: {
|
|
744
740
|
heading: translateCopy('c4console:clusters.list.trialExpired.title', 'Your trial has expired'),
|