@orchestrator-ui/orchestrator-ui-components 8.4.2 → 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.2",
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": {
@@ -49,7 +49,7 @@
49
49
  "next-query-params": "^5.0.0",
50
50
  "object-hash": "^3.0.0",
51
51
  "prism-themes": "^1.9.0",
52
- "pydantic-forms": "^2.0.0",
52
+ "pydantic-forms": "^3.0.0",
53
53
  "react-diff-view": "^3.2.0",
54
54
  "react-draggable": "^4.4.6",
55
55
  "react-redux": "^9.3.0",
@@ -80,9 +80,9 @@
80
80
  "peerDependencies": {
81
81
  "@elastic/eui": "^113.0.0",
82
82
  "next": "^15.5.18",
83
- "next-intl": "^4.9.1",
84
83
  "react": "^18.3.1",
85
- "react-dom": "^18.3.1"
84
+ "react-dom": "^18.3.1",
85
+ "next-intl": "^3.26.5"
86
86
  },
87
87
  "type": "module",
88
88
  "main": "./dist/index.js",
@@ -1,4 +1,4 @@
1
- import React, { useEffect } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
 
3
3
  import _ from 'lodash';
4
4
  import type { PydanticFormControlledElement } from 'pydantic-forms';
@@ -31,7 +31,7 @@ export const WfoInteger: PydanticFormControlledElement = ({ pydanticFormField, o
31
31
  // this is imposed by react-hook-form. We try to detect this and extract the actual value
32
32
  const fieldName = getFormFieldIdWithPath(pydanticFormField.id);
33
33
  const fieldValue = _.isObject(value) && _.has(value, fieldName) ? _.get(value, fieldName) : value;
34
- const [userInput, setUserInput] = React.useState<string>('');
34
+ const [userInput, setUserInput] = useState<string>('');
35
35
 
36
36
  useEffect(() => {
37
37
  if (fieldValue !== undefined && fieldValue !== null) {
@@ -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.2';
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 {