@orchestrator-ui/orchestrator-ui-components 8.4.3 → 8.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "8.4.3",
3
+ "version": "8.4.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -20,6 +20,10 @@ export type WfoStartButtonComboBoxProps = {
20
20
  setSelectedProductStatus?: (status: ProductLifecycleStatus | string) => void;
21
21
  };
22
22
 
23
+ const formatProductStatusLabel = (productStatus: string) => {
24
+ return capitalize(productStatus.replace(/_/g, ' '));
25
+ };
26
+
23
27
  export const WfoStartButtonComboBox = ({
24
28
  buttonText,
25
29
  options,
@@ -63,7 +67,7 @@ export const WfoStartButtonComboBox = ({
63
67
  iconType={() => <WfoChevronDown height={18} width={18} color="currentColor" />}
64
68
  onClick={() => setFilterPopoverOpen((v) => !v)}
65
69
  >
66
- <b>{capitalize(selectedProductStatus)}</b>
70
+ <b>{formatProductStatusLabel(selectedProductStatus ?? ProductLifecycleStatus.ACTIVE)}</b>
67
71
  </EuiButtonEmpty>
68
72
  }
69
73
  isOpen={isFilterPopoverOpen}
@@ -76,11 +80,11 @@ export const WfoStartButtonComboBox = ({
76
80
  key={productStatus}
77
81
  size="xs"
78
82
  onClick={() => {
79
- setSelectedProductStatus(productStatus);
83
+ setSelectedProductStatus(productStatus.toUpperCase());
80
84
  setFilterPopoverOpen(false);
81
85
  }}
82
86
  >
83
- {capitalize(productStatus)}
87
+ {formatProductStatusLabel(productStatus ?? ProductLifecycleStatus.ACTIVE)}
84
88
  </EuiButtonEmpty>
85
89
  </div>
86
90
  ))}
@@ -1 +1 @@
1
- export const ORCHESTRATOR_UI_LIBRARY_VERSION = '8.4.3';
1
+ export const ORCHESTRATOR_UI_LIBRARY_VERSION = '8.4.4';
@@ -83,9 +83,9 @@ export interface ProductBlockDefinition {
83
83
 
84
84
  export enum ProductLifecycleStatus {
85
85
  ACTIVE = 'active',
86
- PRE_PRODUCTION = 'pre production',
87
- PHASE_OUT = 'phase out',
88
- END_OF_LIFE = 'end of life',
86
+ PRE_PRODUCTION = 'pre_production',
87
+ PHASE_OUT = 'phase_out',
88
+ END_OF_LIFE = 'end_of_life',
89
89
  }
90
90
 
91
91
  export enum BadgeType {