@orchestrator-ui/orchestrator-ui-components 6.7.8 → 7.0.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.
Files changed (97) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/.turbo/turbo-test.log +10 -11
  4. package/CHANGELOG.md +16 -0
  5. package/dist/index.d.ts +180 -4325
  6. package/dist/index.js +1774 -5741
  7. package/dist/index.js.map +1 -1
  8. package/package.json +4 -8
  9. package/src/components/WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx +9 -1
  10. package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +9 -2
  11. package/src/components/WfoPydanticForm/RenderFormErrors.tsx +2 -1
  12. package/src/components/WfoPydanticForm/Row.tsx +3 -1
  13. package/src/components/WfoPydanticForm/fields/WfoSummary.tsx +3 -5
  14. package/src/components/WfoPydanticForm/fields/styles.ts +72 -0
  15. package/src/components/WfoStartButton/WfoStartButtonComboBox.tsx +73 -3
  16. package/src/components/WfoStartButton/WfoStartWorkflowComboBox.tsx +15 -3
  17. package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +10 -27
  18. package/src/components/WfoWorkflowSteps/WfoStep/WfoStepForm.tsx +1 -1
  19. package/src/components/index.ts +0 -1
  20. package/src/configuration/version.ts +1 -1
  21. package/src/contexts/OrchestratorConfigContext.tsx +0 -1
  22. package/src/pages/processes/WfoStartProcessPage.tsx +5 -107
  23. package/src/rtk/endpoints/index.ts +0 -2
  24. package/src/rtk/endpoints/startOptions.ts +23 -10
  25. package/src/types/index.ts +0 -1
  26. package/src/types/types.ts +0 -1
  27. package/src/components/WfoForms/AutoFieldLoader.tsx +0 -118
  28. package/src/components/WfoForms/AutoFields.tsx +0 -49
  29. package/src/components/WfoForms/CreateForm.tsx +0 -75
  30. package/src/components/WfoForms/UserInputForm.tsx +0 -697
  31. package/src/components/WfoForms/UserInputFormStyling.ts +0 -80
  32. package/src/components/WfoForms/UserInputFormWizard.tsx +0 -127
  33. package/src/components/WfoForms/formFields/AcceptField.tsx +0 -243
  34. package/src/components/WfoForms/formFields/AcceptFieldStyling.ts +0 -35
  35. package/src/components/WfoForms/formFields/BoolField.tsx +0 -77
  36. package/src/components/WfoForms/formFields/BoolFieldStyling.ts +0 -64
  37. package/src/components/WfoForms/formFields/ConnectedSelectField.tsx +0 -19
  38. package/src/components/WfoForms/formFields/CustomerField.tsx +0 -77
  39. package/src/components/WfoForms/formFields/DateField.tsx +0 -72
  40. package/src/components/WfoForms/formFields/DividerField.tsx +0 -29
  41. package/src/components/WfoForms/formFields/ErrorField.tsx +0 -40
  42. package/src/components/WfoForms/formFields/ErrorsField.tsx +0 -34
  43. package/src/components/WfoForms/formFields/LabelField.tsx +0 -43
  44. package/src/components/WfoForms/formFields/ListAddField.tsx +0 -95
  45. package/src/components/WfoForms/formFields/ListDelField.tsx +0 -95
  46. package/src/components/WfoForms/formFields/ListField.tsx +0 -117
  47. package/src/components/WfoForms/formFields/ListItemField.tsx +0 -40
  48. package/src/components/WfoForms/formFields/ListSelectField.tsx +0 -95
  49. package/src/components/WfoForms/formFields/LocationCodeField.tsx +0 -60
  50. package/src/components/WfoForms/formFields/LongTextField.tsx +0 -68
  51. package/src/components/WfoForms/formFields/NestField.tsx +0 -107
  52. package/src/components/WfoForms/formFields/NumField.tsx +0 -85
  53. package/src/components/WfoForms/formFields/OptGroupField.tsx +0 -74
  54. package/src/components/WfoForms/formFields/RadioField.tsx +0 -87
  55. package/src/components/WfoForms/formFields/SelectField/SelectField.tsx +0 -177
  56. package/src/components/WfoForms/formFields/SelectField/index.ts +0 -1
  57. package/src/components/WfoForms/formFields/SelectField/styles.ts +0 -52
  58. package/src/components/WfoForms/formFields/SubmitField.tsx +0 -50
  59. package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +0 -74
  60. package/src/components/WfoForms/formFields/SummaryField.tsx +0 -104
  61. package/src/components/WfoForms/formFields/SummaryFieldStyling.ts +0 -44
  62. package/src/components/WfoForms/formFields/TextField.tsx +0 -81
  63. package/src/components/WfoForms/formFields/commonStyles.ts +0 -32
  64. package/src/components/WfoForms/formFields/deprecated/ContactPersonAutocomplete.tsx +0 -99
  65. package/src/components/WfoForms/formFields/deprecated/ContactPersonAutocompleteStyles.ts +0 -41
  66. package/src/components/WfoForms/formFields/deprecated/ContactPersonNameField.tsx +0 -263
  67. package/src/components/WfoForms/formFields/deprecated/FileUploadField.tsx +0 -151
  68. package/src/components/WfoForms/formFields/deprecated/ImsNodeIdField.tsx +0 -109
  69. package/src/components/WfoForms/formFields/deprecated/ImsPortIdField.tsx +0 -233
  70. package/src/components/WfoForms/formFields/deprecated/ImsPortIdFieldStyling.ts +0 -17
  71. package/src/components/WfoForms/formFields/deprecated/IpNetworkField.tsx +0 -105
  72. package/src/components/WfoForms/formFields/deprecated/IpPrefixTableField.tsx +0 -390
  73. package/src/components/WfoForms/formFields/deprecated/IpPrefixTableFieldStyling.ts +0 -117
  74. package/src/components/WfoForms/formFields/deprecated/SplitPrefix.tsx +0 -138
  75. package/src/components/WfoForms/formFields/deprecated/SplitPrefixStyling.ts +0 -11
  76. package/src/components/WfoForms/formFields/deprecated/SubscriptionField.tsx +0 -263
  77. package/src/components/WfoForms/formFields/deprecated/SubscriptionFieldStyling.ts +0 -33
  78. package/src/components/WfoForms/formFields/deprecated/TimestampField.tsx +0 -110
  79. package/src/components/WfoForms/formFields/deprecated/VlanField.tsx +0 -300
  80. package/src/components/WfoForms/formFields/deprecated/index.ts +0 -15
  81. package/src/components/WfoForms/formFields/deprecated/types.ts +0 -74
  82. package/src/components/WfoForms/formFields/deprecated/utils.ts +0 -1
  83. package/src/components/WfoForms/formFields/index.ts +0 -30
  84. package/src/components/WfoForms/formFields/listFieldStyling.ts +0 -86
  85. package/src/components/WfoForms/formFields/types.ts +0 -41
  86. package/src/components/WfoForms/formFields/utils.spec.ts +0 -296
  87. package/src/components/WfoForms/formFields/utils.ts +0 -69
  88. package/src/components/WfoForms/index.ts +0 -5
  89. package/src/components/WfoWorkflowSteps/WfoStep/WfoStepFormOld.tsx +0 -67
  90. package/src/hooks/deprecated/useGetSurfSubcriptionDropdownOptions.ts +0 -37
  91. package/src/hooks/deprecated/useIsTaggedPort.ts +0 -25
  92. package/src/rtk/endpoints/deprecated/index.ts +0 -1
  93. package/src/rtk/endpoints/deprecated/surfSubscriptionDropdownOptions.ts +0 -53
  94. package/src/rtk/endpoints/formFields.ts +0 -131
  95. package/src/rtk/endpoints/ipam.ts +0 -54
  96. package/src/types/deprecated/SurfSubscriptionDropdownOptionsFilterParams.ts +0 -10
  97. package/src/types/deprecated/index.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "6.7.8",
3
+ "version": "7.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -54,16 +54,13 @@
54
54
  "next-query-params": "^5.0.0",
55
55
  "object-hash": "^3.0.0",
56
56
  "prism-themes": "^1.9.0",
57
- "pydantic-forms": "^0.10.2",
57
+ "pydantic-forms": "^1.0.0",
58
58
  "react-diff-view": "^3.2.0",
59
59
  "react-draggable": "^4.4.6",
60
60
  "react-redux": "^9.1.2",
61
61
  "react-select": "^5.8.0",
62
62
  "scroll-into-view": "^1.16.2",
63
63
  "unidiff": "^1.0.4",
64
- "uniforms": "^3.8.1",
65
- "uniforms-bridge-json-schema": "^3.8.1",
66
- "uniforms-unstyled": "^3.8.1",
67
64
  "use-query-params": "2.2.1"
68
65
  },
69
66
  "devDependencies": {
@@ -82,11 +79,10 @@
82
79
  "jest-environment-jsdom": "^30.2.0",
83
80
  "jest-watch-typeahead": "^3.0.1",
84
81
  "tsup": "^8.5.0",
85
- "typescript": "^5.5.2",
86
- "uniforms-bridge-simple-schema-2": "^3.8.1"
82
+ "typescript": "^5.5.2"
87
83
  },
88
84
  "peerDependencies": {
89
- "next": "^15.5.7",
85
+ "next": "^15.5.9",
90
86
  "react": "^18.3.1",
91
87
  "react-dom": "^18.3.1"
92
88
  },
@@ -5,6 +5,7 @@ import { EuiPageTemplate, EuiSideNavItemType } from '@elastic/eui';
5
5
 
6
6
  import { WfoBreadcrumbs, WfoPageHeader, WfoSidebar } from '@/components';
7
7
  import { useWithOrchestratorTheme } from '@/hooks';
8
+ import { ProductLifecycleStatus } from '@/types';
8
9
 
9
10
  import { ContentContextProvider } from './ContentContext';
10
11
  import { getPageTemplateStyles } from './styles';
@@ -14,6 +15,7 @@ export interface WfoPageTemplateProps {
14
15
  overrideMenuItems?: (
15
16
  defaultMenuItems: EuiSideNavItemType<object>[],
16
17
  ) => EuiSideNavItemType<object>[];
18
+ overrideStartWorkflowFilters?: (ProductLifecycleStatus | string)[];
17
19
  onThemeSwitch: (theme: EuiThemeColorMode) => void;
18
20
  children: ReactNode;
19
21
  }
@@ -22,6 +24,7 @@ export const WfoPageTemplate: FC<WfoPageTemplateProps> = ({
22
24
  children,
23
25
  getAppLogo,
24
26
  overrideMenuItems,
27
+ overrideStartWorkflowFilters,
25
28
  onThemeSwitch,
26
29
  }) => {
27
30
  const { getSidebarStyle, NAVIGATION_HEIGHT } = useWithOrchestratorTheme(
@@ -50,7 +53,12 @@ export const WfoPageTemplate: FC<WfoPageTemplateProps> = ({
50
53
  <EuiPageTemplate.Sidebar
51
54
  css={getSidebarStyle(NAVIGATION_HEIGHT)}
52
55
  >
53
- <WfoSidebar overrideMenuItems={overrideMenuItems} />
56
+ <WfoSidebar
57
+ overrideMenuItems={overrideMenuItems}
58
+ overrideStartWorkflowFilters={
59
+ overrideStartWorkflowFilters
60
+ }
61
+ />
54
62
  </EuiPageTemplate.Sidebar>
55
63
  )}
56
64
 
@@ -17,6 +17,7 @@ import { getMenuStyles } from '@/components/WfoPageTemplate/WfoSidebar/styles';
17
17
  import { WfoStartWorkflowButtonComboBox } from '@/components/WfoStartButton/WfoStartWorkflowComboBox';
18
18
  import { PolicyResource } from '@/configuration/policy-resources';
19
19
  import { usePolicy, useWithOrchestratorTheme } from '@/hooks';
20
+ import { ProductLifecycleStatus } from '@/types';
20
21
 
21
22
  import {
22
23
  PATH_METADATA,
@@ -51,9 +52,13 @@ export type WfoSidebarProps = {
51
52
  overrideMenuItems?: (
52
53
  defaultMenuItems: EuiSideNavItemType<object>[],
53
54
  ) => EuiSideNavItemType<object>[];
55
+ overrideStartWorkflowFilters?: (ProductLifecycleStatus | string)[];
54
56
  };
55
57
 
56
- export const WfoSidebar: FC<WfoSidebarProps> = ({ overrideMenuItems }) => {
58
+ export const WfoSidebar: FC<WfoSidebarProps> = ({
59
+ overrideMenuItems,
60
+ overrideStartWorkflowFilters,
61
+ }) => {
57
62
  const { menuStyle } = useWithOrchestratorTheme(getMenuStyles);
58
63
 
59
64
  const t = useTranslations('main');
@@ -243,7 +248,9 @@ export const WfoSidebar: FC<WfoSidebarProps> = ({ overrideMenuItems }) => {
243
248
  <WfoIsAllowedToRender
244
249
  resource={PolicyResource.SUBSCRIPTION_CREATE}
245
250
  >
246
- <WfoStartWorkflowButtonComboBox />
251
+ <WfoStartWorkflowButtonComboBox
252
+ startWorkflowFilters={overrideStartWorkflowFilters}
253
+ />
247
254
  </WfoIsAllowedToRender>
248
255
  <EuiSpacer size="xl" />
249
256
  <WfoCopyright />
@@ -8,9 +8,10 @@ import React from 'react';
8
8
  import { useTranslations } from 'next-intl';
9
9
  import { useGetValidationErrors } from 'pydantic-forms';
10
10
 
11
- import { getCommonFormFieldStyles } from '@/components';
12
11
  import { useWithOrchestratorTheme } from '@/hooks';
13
12
 
13
+ import { getCommonFormFieldStyles } from './fields/styles';
14
+
14
15
  export const RenderFormErrors = () => {
15
16
  const { errorStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
16
17
 
@@ -4,9 +4,11 @@ import type { RowRenderComponent } from 'pydantic-forms';
4
4
 
5
5
  import { EuiFormRow, EuiText } from '@elastic/eui';
6
6
 
7
- import { getCommonFormFieldStyles, getDataTestId } from '@/components';
7
+ import { getDataTestId } from '@/components';
8
8
  import { useWithOrchestratorTheme } from '@/hooks';
9
9
 
10
+ import { getCommonFormFieldStyles } from './fields/styles';
11
+
10
12
  export const Row: RowRenderComponent = ({
11
13
  title,
12
14
  description,
@@ -5,14 +5,12 @@ import type { PydanticFormElement } from 'pydantic-forms';
5
5
 
6
6
  import { EuiFlexItem, EuiFormRow, EuiText } from '@elastic/eui';
7
7
 
8
- import {
9
- getCommonFormFieldStyles,
10
- getNestedSummaryLabel,
11
- summaryFieldStyles,
12
- } from '@/components';
13
8
  import { useWithOrchestratorTheme } from '@/hooks';
14
9
  import { snakeToHuman } from '@/utils';
15
10
 
11
+ import { getCommonFormFieldStyles, summaryFieldStyles } from './styles';
12
+ import { getNestedSummaryLabel } from './wfoPydanticFormUtils';
13
+
16
14
  export const WfoSummary: PydanticFormElement = ({ pydanticFormField }) => {
17
15
  const { summaryFieldStyle } = useWithOrchestratorTheme(summaryFieldStyles);
18
16
  const { formRowStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
@@ -1,5 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
+ import type { WfoTheme } from '@/hooks';
4
+
3
5
  export const getWfoObjectFieldStyles = () => {
4
6
  const wfoObjectFieldStyles = css({
5
7
  width: '100%',
@@ -11,3 +13,73 @@ export const getWfoObjectFieldStyles = () => {
11
13
  wfoObjectFieldStyles,
12
14
  };
13
15
  };
16
+
17
+ export const getCommonFormFieldStyles = ({ theme }: WfoTheme) => {
18
+ const formRowStyle = css({
19
+ marginBottom: theme.base * 2,
20
+
21
+ '.euiText': {
22
+ color: theme.colors.text,
23
+ },
24
+ '.euiFormLabel': {
25
+ color: theme.colors.text,
26
+ cursor: 'text',
27
+ '&.euiFormLabel-isFocused': {
28
+ color: theme.colors.primaryText,
29
+ },
30
+ },
31
+ '.euiFormRow__labelWrapper': {
32
+ display: 'flex',
33
+ flexDirection: 'column',
34
+ },
35
+ });
36
+
37
+ const errorStyle = css({
38
+ color: theme.colors.dangerText,
39
+ });
40
+ return {
41
+ errorStyle,
42
+ formRowStyle,
43
+ };
44
+ };
45
+
46
+ export const summaryFieldStyles = ({ theme }: WfoTheme) => {
47
+ const summaryFieldStyle = css({
48
+ 'div.emailMessage': {
49
+ td: {
50
+ color: theme.colors.textParagraph,
51
+ },
52
+ p: {
53
+ color: theme.colors.textParagraph,
54
+ },
55
+ html: {
56
+ marginLeft: '-10px',
57
+ },
58
+ },
59
+ 'section.table-summary': {
60
+ marginTop: '20px',
61
+ width: '100%',
62
+ td: {
63
+ padding: '10px',
64
+ verticalAlign: 'top',
65
+ },
66
+ 'td:not(:first-child):not(:last-child)': {
67
+ borderRight: `1px solid ${theme.colors.borderBasePlain}`,
68
+ },
69
+ '.label': {
70
+ fontWeight: 'bold',
71
+ color: theme.colors.backgroundBaseSubdued,
72
+ backgroundColor: theme.colors.primary,
73
+ borderRight: `2px solid ${theme.colors.borderBasePlain}`,
74
+ borderBottom: `1px solid ${theme.colors.borderBasePlain}`,
75
+ },
76
+ '.value': {
77
+ backgroundColor: theme.colors.backgroundBasePrimary,
78
+ borderBottom: `1px solid ${theme.colors.borderBasePlain}`,
79
+ },
80
+ },
81
+ });
82
+ return {
83
+ summaryFieldStyle: summaryFieldStyle,
84
+ };
85
+ };
@@ -1,10 +1,19 @@
1
1
  import React, { useState } from 'react';
2
2
 
3
- import { EuiButton, EuiPopover, EuiSelectable, EuiSpacer } from '@elastic/eui';
3
+ import { capitalize } from 'lodash';
4
+
5
+ import {
6
+ EuiButton,
7
+ EuiButtonEmpty,
8
+ EuiFlexGroup,
9
+ EuiPopover,
10
+ EuiSelectable,
11
+ EuiSpacer,
12
+ } from '@elastic/eui';
4
13
 
5
14
  import { useOrchestratorTheme, useWithOrchestratorTheme } from '@/hooks';
6
- import { WfoPlusCircleFill } from '@/icons';
7
- import { StartComboBoxOption } from '@/types';
15
+ import { WfoChevronDown, WfoPlusCircleFill } from '@/icons';
16
+ import { ProductLifecycleStatus, StartComboBoxOption } from '@/types';
8
17
 
9
18
  import { getStyles } from './styles';
10
19
 
@@ -14,6 +23,11 @@ export type WfoStartButtonComboBoxProps = {
14
23
  onOptionChange: (selectedOption: StartComboBoxOption) => void;
15
24
  isProcess: boolean;
16
25
  className?: string;
26
+ selectedProductStatus?: ProductLifecycleStatus | string;
27
+ setSelectedProductStatus?: (
28
+ status: ProductLifecycleStatus | string,
29
+ ) => void;
30
+ startWorkflowFilters?: (ProductLifecycleStatus | string)[];
17
31
  };
18
32
 
19
33
  export const WfoStartButtonComboBox = ({
@@ -22,6 +36,9 @@ export const WfoStartButtonComboBox = ({
22
36
  onOptionChange,
23
37
  isProcess,
24
38
  className,
39
+ selectedProductStatus,
40
+ setSelectedProductStatus,
41
+ startWorkflowFilters,
25
42
  }: WfoStartButtonComboBoxProps) => {
26
43
  const [isPopoverOpen, setPopoverOpen] = useState(false);
27
44
  const { theme, isDarkThemeActive } = useOrchestratorTheme();
@@ -42,6 +59,58 @@ export const WfoStartButtonComboBox = ({
42
59
  </EuiButton>
43
60
  );
44
61
 
62
+ const [isFilterPopoverOpen, setFilterPopoverOpen] = React.useState(false);
63
+
64
+ const ProductStatePicker = () => {
65
+ return setSelectedProductStatus ? (
66
+ <EuiFlexGroup justifyContent="flexEnd" gutterSize="none">
67
+ <EuiPopover
68
+ button={
69
+ <EuiButtonEmpty
70
+ css={{
71
+ '.euiButtonEmpty__content': {
72
+ gap: theme.size.xxs,
73
+ },
74
+ }}
75
+ size="xs"
76
+ iconSide="right"
77
+ iconType={() => (
78
+ <WfoChevronDown
79
+ height={18}
80
+ width={18}
81
+ color="currentColor"
82
+ />
83
+ )}
84
+ onClick={() => setFilterPopoverOpen((v) => !v)}
85
+ >
86
+ <b>{capitalize(selectedProductStatus)}</b>
87
+ </EuiButtonEmpty>
88
+ }
89
+ isOpen={isFilterPopoverOpen}
90
+ closePopover={() => setFilterPopoverOpen(false)}
91
+ anchorPosition="downRight"
92
+ >
93
+ {startWorkflowFilters?.map((productStatus) => (
94
+ <div key={productStatus}>
95
+ <EuiButtonEmpty
96
+ key={productStatus}
97
+ size="xs"
98
+ onClick={() => {
99
+ setSelectedProductStatus(productStatus);
100
+ setFilterPopoverOpen(false);
101
+ }}
102
+ >
103
+ {capitalize(productStatus)}
104
+ </EuiButtonEmpty>
105
+ </div>
106
+ ))}
107
+ </EuiPopover>
108
+ </EuiFlexGroup>
109
+ ) : (
110
+ <></>
111
+ );
112
+ };
113
+
45
114
  return (
46
115
  <EuiPopover
47
116
  initialFocus={`.euiSelectable .euiFieldSearch`}
@@ -49,6 +118,7 @@ export const WfoStartButtonComboBox = ({
49
118
  isOpen={isPopoverOpen}
50
119
  closePopover={() => setPopoverOpen(false)}
51
120
  >
121
+ {startWorkflowFilters && <ProductStatePicker />}
52
122
  <EuiSelectable<StartComboBoxOption>
53
123
  className={className}
54
124
  css={selectableStyle}
@@ -5,17 +5,26 @@ import { useRouter } from 'next/router';
5
5
 
6
6
  import { useCheckEngineStatus } from '@/hooks';
7
7
  import { useGetWorkflowOptionsQuery } from '@/rtk';
8
- import { StartComboBoxOption } from '@/types';
8
+ import { ProductLifecycleStatus, StartComboBoxOption } from '@/types';
9
9
 
10
10
  import { PATH_START_NEW_WORKFLOW } from '../WfoPageTemplate';
11
11
  import { WfoStartButtonComboBox } from './WfoStartButtonComboBox';
12
12
 
13
- export const WfoStartWorkflowButtonComboBox = () => {
13
+ interface WfoStartWorkflowButtonComboBoxProps {
14
+ startWorkflowFilters?: (ProductLifecycleStatus | string)[];
15
+ }
16
+
17
+ export const WfoStartWorkflowButtonComboBox = ({
18
+ startWorkflowFilters,
19
+ }: WfoStartWorkflowButtonComboBoxProps) => {
14
20
  const router = useRouter();
15
21
  const t = useTranslations('common');
16
22
  const { isEngineRunningNow } = useCheckEngineStatus();
23
+ const [selectedProductStatus, setSelectedProductStatus] = React.useState<
24
+ ProductLifecycleStatus | string
25
+ >(ProductLifecycleStatus.ACTIVE);
17
26
 
18
- const { data } = useGetWorkflowOptionsQuery();
27
+ const { data } = useGetWorkflowOptionsQuery(selectedProductStatus);
19
28
  const workflowOptions = data?.startOptions || [];
20
29
 
21
30
  const comboBoxOptions: StartComboBoxOption[] = [...workflowOptions]
@@ -48,6 +57,9 @@ export const WfoStartWorkflowButtonComboBox = () => {
48
57
  onOptionChange={handleOptionChange}
49
58
  isProcess
50
59
  css={{ width: '300px' }}
60
+ selectedProductStatus={selectedProductStatus}
61
+ setSelectedProductStatus={setSelectedProductStatus}
62
+ startWorkflowFilters={startWorkflowFilters}
51
63
  />
52
64
  );
53
65
  };
@@ -9,16 +9,10 @@ import {
9
9
  WfoMonacoCodeBlock,
10
10
  WfoTableCodeBlock,
11
11
  } from '@/components';
12
- import { WfoStepFormOld } from '@/components/WfoWorkflowSteps/WfoStep/WfoStepFormOld';
13
- import {
14
- useGetOrchestratorConfig,
15
- useOrchestratorTheme,
16
- useWithOrchestratorTheme,
17
- } from '@/hooks';
12
+ import { useOrchestratorTheme, useWithOrchestratorTheme } from '@/hooks';
18
13
  import { WfoChevronDown, WfoChevronUp } from '@/icons';
19
- import type { EmailState } from '@/types';
14
+ import type { EmailState, FormUserPermissions } from '@/types';
20
15
  import { StepStatus } from '@/types';
21
- import { FormUserPermissions } from '@/types/forms';
22
16
  import { calculateTimeDifference, formatDate } from '@/utils';
23
17
 
24
18
  import { WfoStepStatusIcon } from '../WfoStepStatusIcon';
@@ -55,8 +49,6 @@ export const WfoStep = React.forwardRef(
55
49
  }: WfoStepProps,
56
50
  ref: LegacyRef<HTMLDivElement>,
57
51
  ) => {
58
- const config = useGetOrchestratorConfig();
59
- const usePydanticForms: boolean = config.activatePydanticForms ?? false;
60
52
  const { isExpanded, step, userInputForm } = stepListItem;
61
53
  const [codeView, setCodeView] = useState<CodeView>(CodeView.JSON);
62
54
 
@@ -213,23 +205,14 @@ export const WfoStep = React.forwardRef(
213
205
  )}
214
206
  </div>
215
207
  )}
216
- {step.status === StepStatus.SUSPEND &&
217
- userInputForm &&
218
- (usePydanticForms ? (
219
- <WfoStepForm
220
- userInputForm={userInputForm}
221
- isTask={isTask}
222
- processId={processId ?? ''}
223
- userPermissions={userPermissions}
224
- />
225
- ) : (
226
- <WfoStepFormOld
227
- userInputForm={userInputForm}
228
- isTask={isTask}
229
- processId={processId}
230
- userPermissions={userPermissions}
231
- />
232
- ))}
208
+ {step.status === StepStatus.SUSPEND && userInputForm && (
209
+ <WfoStepForm
210
+ userInputForm={userInputForm}
211
+ isTask={isTask}
212
+ processId={processId ?? ''}
213
+ userPermissions={userPermissions}
214
+ />
215
+ )}
233
216
  </EuiPanel>
234
217
  </div>
235
218
  );
@@ -9,7 +9,7 @@ import { StepFormFooter } from '@/components/WfoWorkflowSteps/WfoStep/WfoStepFor
9
9
  import { useOrchestratorTheme } from '@/hooks';
10
10
  import { HttpStatus } from '@/rtk';
11
11
  import { useResumeProcessMutation } from '@/rtk/endpoints/forms';
12
- import { FormUserPermissions, InputForm } from '@/types/forms';
12
+ import { FormUserPermissions, InputForm } from '@/types';
13
13
 
14
14
  interface WfoStepFormProps {
15
15
  userInputForm: InputForm;
@@ -14,7 +14,6 @@ export * from './WfoTable';
14
14
  export * from './WfoTimeline';
15
15
  export * from './WfoLoading';
16
16
  export * from './WfoToastsList';
17
- export * from './WfoForms';
18
17
  export * from './WfoDateTime';
19
18
  export * from './WfoAuth';
20
19
  export * from './WfoDropdownButton';
@@ -1 +1 @@
1
- export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.7.8';
1
+ export const ORCHESTRATOR_UI_LIBRARY_VERSION = '7.0.0';
@@ -18,7 +18,6 @@ export const emptyOrchestratorConfig: OrchestratorConfig = {
18
18
  supportMenuItemUrl: '',
19
19
  enableAoStackStatus: false,
20
20
  aoStackStatusUrl: '',
21
- activatePydanticForms: false,
22
21
  };
23
22
 
24
23
  export const OrchestratorConfigContext = createContext<OrchestratorConfig>(
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
1
+ import React, { useMemo, useState } from 'react';
2
2
 
3
3
  import { JSONSchema6 } from 'json-schema';
4
4
  import { useTranslations } from 'next-intl';
@@ -12,28 +12,17 @@ import {
12
12
  EuiText,
13
13
  } from '@elastic/eui';
14
14
 
15
- import { PATH_TASKS, PATH_WORKFLOWS, WfoError, WfoLoading } from '@/components';
16
- import { UserInputFormWizard } from '@/components/WfoForms/UserInputFormWizard';
15
+ import { WfoError, WfoLoading } from '@/components';
17
16
  import { WfoPydanticForm } from '@/components/WfoPydanticForm';
18
17
  import { WfoStepStatusIcon } from '@/components/WfoWorkflowSteps';
19
18
  import { getWorkflowStepsStyles } from '@/components/WfoWorkflowSteps/styles';
20
19
  import { useOrchestratorTheme, useWithOrchestratorTheme } from '@/hooks';
21
- import { useGetOrchestratorConfig } from '@/hooks';
22
20
  import {
23
- HttpStatus,
24
- handlePromiseErrorWithCallback,
25
21
  useGetDescriptionForWorkflowNameQuery,
26
22
  useGetTimeLineItemsQuery,
27
23
  } from '@/rtk';
28
24
  import { useGetSubscriptionDetailQuery } from '@/rtk';
29
- import { useStartProcessMutation } from '@/rtk/endpoints/forms';
30
- import {
31
- EngineStatus,
32
- ProcessDetail,
33
- ProcessStatus,
34
- StepStatus,
35
- } from '@/types';
36
- import { FormNotCompleteResponse } from '@/types/forms';
25
+ import { ProcessDetail, ProcessStatus, StepStatus } from '@/types';
37
26
 
38
27
  import { WfoProcessDetail } from './WfoProcessDetail';
39
28
 
@@ -89,13 +78,10 @@ export const WfoStartProcessPage = ({
89
78
  processName,
90
79
  isTask = false,
91
80
  }: WfoStartProcessPageProps) => {
92
- const config = useGetOrchestratorConfig();
93
- const usePydanticForms: boolean = config.activatePydanticForms ?? false;
94
81
  const t = useTranslations('processes.steps');
95
82
  const router = useRouter();
96
83
  const [hasError, setHasError] = useState<boolean>(false);
97
84
  const { theme } = useOrchestratorTheme();
98
- const [form, setForm] = useState<UserInputForm>({});
99
85
  const { productId, subscriptionId } = router.query as StartProcessPageQuery;
100
86
 
101
87
  const {
@@ -114,8 +100,6 @@ export const WfoStartProcessPage = ({
114
100
  workflowName: processName,
115
101
  });
116
102
 
117
- const [startProcess] = useStartProcessMutation();
118
-
119
103
  const startProcessPayload = useMemo(
120
104
  () =>
121
105
  getInitialProcessPayload({
@@ -125,8 +109,6 @@ export const WfoStartProcessPage = ({
125
109
  [productId, subscriptionId],
126
110
  );
127
111
 
128
- const { stepUserInput, hasNext } = form;
129
-
130
112
  const { getStepHeaderStyle, stepListContentBoldTextStyle } =
131
113
  useWithOrchestratorTheme(getWorkflowStepsStyles);
132
114
 
@@ -145,76 +127,6 @@ export const WfoStartProcessPage = ({
145
127
  }
146
128
  }
147
129
 
148
- const submit = useCallback(
149
- (processInput: object[]) => {
150
- const startProcessPromise = startProcess({
151
- workflowName: processName,
152
- userInputs: startProcessPayload
153
- ? [startProcessPayload, ...processInput]
154
- : [...processInput],
155
- })
156
- .unwrap()
157
- .then(
158
- (process) => {
159
- if (process.id) {
160
- const basePath = isTask
161
- ? PATH_TASKS
162
- : PATH_WORKFLOWS;
163
- router.replace(`${basePath}/${process.id}`);
164
- }
165
- },
166
- // Reject handler
167
- (e) => {
168
- throw e;
169
- },
170
- )
171
- .catch((error) => {
172
- if (error?.status !== HttpStatus.FormNotComplete) {
173
- if (error?.status === HttpStatus.BadRequest) {
174
- // Rethrow the error so userInputForm can catch it and display validation errors
175
- throw error;
176
- }
177
- console.error(error);
178
- setHasError(true);
179
- } else {
180
- throw error;
181
- }
182
- });
183
-
184
- // Catch a 503: Service unavailable error indicating the engine is down. This rethrows other errors
185
- // if it's not 503 so we can catch the special 510 error in the catchErrorStatus call in the useEffect hook
186
- return handlePromiseErrorWithCallback<EngineStatus>(
187
- startProcessPromise,
188
- HttpStatus.ServiceUnavailable,
189
- (json) => {
190
- // TODO: Use the toastMessage hook to display an engine down error message
191
- console.error('engine down!!!', json);
192
- router.push(PATH_WORKFLOWS);
193
- },
194
- );
195
- },
196
- [startProcess, processName, startProcessPayload, isTask, router],
197
- );
198
-
199
- useEffect(() => {
200
- if (processName && !usePydanticForms) {
201
- const clientResultCallback = (json: FormNotCompleteResponse) => {
202
- setForm({
203
- stepUserInput: json.form,
204
- hasNext: json.meta?.hasNext ?? false,
205
- });
206
- };
207
- handlePromiseErrorWithCallback<FormNotCompleteResponse>(
208
- submit([]),
209
- HttpStatus.FormNotComplete,
210
- clientResultCallback,
211
- );
212
- return () => {
213
- setForm({});
214
- };
215
- }
216
- }, [submit, processName, usePydanticForms]);
217
-
218
130
  const processDetail: Partial<ProcessDetail> = {
219
131
  lastStatus: ProcessStatus.CREATE,
220
132
  lastStep: StepStatus.FORM,
@@ -266,27 +178,13 @@ export const WfoStartProcessPage = ({
266
178
  </EuiFlexItem>
267
179
  </EuiFlexGroup>
268
180
  <EuiHorizontalRule />
269
- {(hasError && <WfoError />) ||
270
- (usePydanticForms && (
181
+ {(hasError && <WfoError />) || (
271
182
  <WfoPydanticForm
272
183
  processName={processName}
273
184
  startProcessPayload={startProcessPayload}
274
185
  isTask={isTask}
275
186
  />
276
- )) ||
277
- (stepUserInput && (
278
- <UserInputFormWizard
279
- stepUserInput={stepUserInput}
280
- stepSubmit={submit}
281
- cancel={() =>
282
- router.push(
283
- isTask ? PATH_TASKS : PATH_WORKFLOWS,
284
- )
285
- }
286
- hasNext={hasNext}
287
- isTask={isTask}
288
- />
289
- )) || <WfoLoading />}
187
+ ) || <WfoLoading />}
290
188
  </EuiPanel>
291
189
  </WfoProcessDetail>
292
190
  );
@@ -17,8 +17,6 @@ export * from './subscriptionInUseByRelationsList';
17
17
  export * from './subscriptionList';
18
18
  export * from './subscriptionListSummary';
19
19
  export * from './forms';
20
- export * from './deprecated';
21
- export * from './formFields';
22
20
  export * from './fileUpload';
23
21
  export * from './search';
24
22
  export * from './availability';