@camunda/ccma-saas-frontend 0.35.13 → 0.35.14

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.
@@ -55,7 +55,11 @@ const SummaryMobileWrapper = styled.div `
55
55
  }
56
56
  `;
57
57
  const MIGRATION_NOTE_ID = 'migration-option-note';
58
- const GRID_STYLE = { paddingInline: '1rem' };
58
+ // The page title and the breadcrumbs sit on the left edge of the page, thus a
59
+ // form block has no inline padding of its own or it comes up offset from them.
60
+ // The constant does nothing now. It stays so that this change does not touch
61
+ // every block of the form that uses it.
62
+ const GRID_STYLE = { paddingInline: 0 };
59
63
  const FieldLabel = (props) => (_jsx("span", { style: {
60
64
  display: 'block',
61
65
  fontSize: '0.75rem',
@@ -244,6 +248,10 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
244
248
  const defaultProvider = initialRegion?.provider ??
245
249
  formElements.region.options.find((option) => option.default === true)
246
250
  ?.provider ??
251
+ // AWS is the preferred provider. An org with no AWS region gets the
252
+ // provider of its first region.
253
+ formElements.region.options.find((option) => option.provider === 'AWS')
254
+ ?.provider ??
247
255
  formElements.region.options[0]?.provider;
248
256
  // The region of a cluster cannot change after the cluster exists, thus the
249
257
  // customer must select it themselves. Do not give this state a value from a
@@ -947,21 +955,21 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
947
955
  // The badge says which regions can have cold recovery. It is no
948
956
  // recommendation: the customer cannot change the region later.
949
957
  getBadge: (option) => formElements.region.dualRegionBackups &&
950
- pairsOf(option, true).length > 0 ? (_jsx(DsBadge, { variant: 'info', children: copy('backup.regionBadge') })) : undefined, getDisabled: () => isSubmitting() || noAvailableSlots, value: region, onChange: updateRegion, ariaLabel: formElements.region.title, columnWidth: '220px', searchPlaceholder: 'Search regions' }, provider) }), _jsx("div", { style: GRID_STYLE, children: _jsx("p", { children: formElements.region.description }) })] }), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) }), _jsxs(Stack, { gap: 2, children: [_jsx("div", { style: GRID_STYLE, children: _jsx(FormElementTitle, { title: formElements.clusterPlanType.title }) }), _jsx("div", { style: { padding: '0 1rem' }, children: _jsx(ChoiceCardGroup, { "aria-label": formElements.clusterPlanType.title, value: currentClusterPlanType, onValueChange: setClusterPlanTypeWithEffects, style: {
951
- gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
952
- gap: '1rem',
953
- }, children: formElements.clusterPlanType.options.map((option) => (_jsx(ChoiceCard, { value: option.uuid, title: option.title, description: option.description, icon: option.type === 'dev' ? Code : Database, disabled: option.disabled || isSubmitting() || noAvailableSlots }, option.uuid))) }) })] }), formElements.clusterPlan &&
954
- formElements.clusterPlan.options.length > 0 && (_jsxs(Stack, { gap: 2, children: [_jsx("div", { style: { marginLeft: '1rem' }, children: _jsx(RadioButtonGroup, { name: 'clusterPlan', legendText: formElements.clusterPlan.title, orientation: 'vertical', valueSelected: clusterPlan ?? PLAN_TYPE_DEFAULT, onChange: (value) => {
955
- setClusterPlan(value === PLAN_TYPE_DEFAULT || value === undefined
956
- ? undefined
957
- : String(value));
958
- }, children: [
959
- {
960
- uuid: PLAN_TYPE_DEFAULT,
961
- title: formElements.clusterPlan.defaultLabel,
962
- },
963
- ...formElements.clusterPlan.options,
964
- ].map((option) => (_jsx(RadioButton, { id: `clusterPlan-${option.uuid}`, labelText: option.title, value: option.uuid }, option.uuid))) }) }), _jsx("p", { style: { marginLeft: '1rem' }, children: formElements.clusterPlan.description })] })), renderSizeSection(), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) }), formElements.region.dualRegionBackups ? (_jsxs(_Fragment, { children: [renderBackupSection(), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) })] })) : (migrationOffered && (_jsxs(_Fragment, { children: [_jsxs(Stack, { gap: 4, children: [_jsx("div", { style: GRID_STYLE, children: _jsx(FormElementTitle, { title: copy('backup.title') }) }), renderMigrationSection()] }), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) })] }))), _jsx("div", { style: GRID_STYLE, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormElementTitle, { title: formElements.generation.title }), _jsx("div", { style: { marginBottom: '0.5rem' }, children: _jsx(C4SegmentedControl, { options: formElements.generation.channels.map((channel) => ({
958
+ pairsOf(option, true).length > 0 ? (_jsx(DsBadge, { variant: 'info', children: copy('backup.regionBadge') })) : undefined, getDisabled: () => isSubmitting() || noAvailableSlots, value: region, onChange: updateRegion, ariaLabel: formElements.region.title, columnWidth: '220px', searchPlaceholder: 'Search regions' }, provider) }), _jsx("div", { style: GRID_STYLE, children: _jsx("p", { children: formElements.region.description }) })] }), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) }), _jsxs(Stack, { gap: 2, children: [_jsx("div", { style: GRID_STYLE, children: _jsx(FormElementTitle, { title: formElements.clusterPlanType.title }) }), _jsx(ChoiceCardGroup, { "aria-label": formElements.clusterPlanType.title, value: currentClusterPlanType, onValueChange: setClusterPlanTypeWithEffects, style: {
959
+ gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
960
+ gap: '1rem',
961
+ }, children: formElements.clusterPlanType.options.map((option) => (_jsx(ChoiceCard, { value: option.uuid, title: option.title, description: option.description, icon: option.type === 'dev' ? Code : Database, disabled: option.disabled || isSubmitting() || noAvailableSlots }, option.uuid))) })] }), formElements.clusterPlan &&
962
+ formElements.clusterPlan.options.length > 0 && (_jsxs(Stack, { gap: 2, children: [_jsx(RadioButtonGroup, { name: 'clusterPlan', legendText: formElements.clusterPlan.title, orientation: 'vertical', valueSelected: clusterPlan ?? PLAN_TYPE_DEFAULT, onChange: (value) => {
963
+ setClusterPlan(value === PLAN_TYPE_DEFAULT || value === undefined
964
+ ? undefined
965
+ : String(value));
966
+ }, children: [
967
+ {
968
+ uuid: PLAN_TYPE_DEFAULT,
969
+ title: formElements.clusterPlan.defaultLabel,
970
+ },
971
+ ...formElements.clusterPlan.options,
972
+ ].map((option) => (_jsx(RadioButton, { id: `clusterPlan-${option.uuid}`, labelText: option.title, value: option.uuid }, option.uuid))) }), _jsx("p", { children: formElements.clusterPlan.description })] })), renderSizeSection(), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) }), formElements.region.dualRegionBackups ? (_jsxs(_Fragment, { children: [renderBackupSection(), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) })] })) : (migrationOffered && (_jsxs(_Fragment, { children: [_jsxs(Stack, { gap: 4, children: [_jsx("div", { style: GRID_STYLE, children: _jsx(FormElementTitle, { title: copy('backup.title') }) }), renderMigrationSection()] }), _jsx("div", { style: GRID_STYLE, children: _jsx(C4Divider, {}) })] }))), _jsx("div", { style: GRID_STYLE, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormElementTitle, { title: formElements.generation.title }), _jsx("div", { style: { marginBottom: '0.5rem' }, children: _jsx(C4SegmentedControl, { options: formElements.generation.channels.map((channel) => ({
965
973
  id: channel.uuid,
966
974
  label: channel.title,
967
975
  disabled: noAvailableSlots || channel.isEmpty,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.35.13",
3
+ "version": "0.35.14",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"