@orchestrator-ui/orchestrator-ui-components 7.7.0 → 7.7.1

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": "7.7.0",
3
+ "version": "7.7.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -100,13 +100,15 @@ export const WfoStep = React.forwardRef(
100
100
  );
101
101
  };
102
102
 
103
- const handle = useCallback(
104
- (newCodeView: string) => {
105
- setCodeView(newCodeView as CodeView);
103
+ const handleCodeViewChange = useCallback(
104
+ (newCodeView: CodeView) => {
105
+ setCodeView(newCodeView);
106
106
  },
107
107
  [setCodeView],
108
108
  );
109
+
109
110
  const shouldExpand: boolean = isExpanded && hasStepContent;
111
+
110
112
  return (
111
113
  <div ref={ref}>
112
114
  <EuiPanel>
@@ -123,9 +125,11 @@ export const WfoStep = React.forwardRef(
123
125
  </EuiFlexItem>
124
126
 
125
127
  <EuiFlexGroup css={stepRowStyle}>
126
- {step.completed && (
128
+ {step.completed && !userInputForm && !hasHtmlMail && (
127
129
  <>
128
- {isExpanded && <WfoCodeViewSelector codeView={codeView} handleCodeViewChange={handle} />}
130
+ {isExpanded && (
131
+ <WfoCodeViewSelector codeView={codeView} handleCodeViewChange={handleCodeViewChange} />
132
+ )}
129
133
  <EuiFlexItem grow={0} css={stepHeaderRightStyle}>
130
134
  <EuiText css={stepDurationStyle}>{t('duration')}</EuiText>
131
135
  <EuiText size="m">{calculateTimeDifference(startedAt, completedAt)}</EuiText>
@@ -144,33 +148,42 @@ export const WfoStep = React.forwardRef(
144
148
  </EuiFlexItem>
145
149
  </EuiFlexGroup>
146
150
  </EuiFlexGroup>
147
- {shouldExpand && (
151
+ {shouldExpand && !hasHtmlMail && (
148
152
  <EuiFlexGroup direction="column" gutterSize="none">
149
- <EuiFlexItem grow={1}>
150
- {overrideStepDetail?.stepBody && <overrideStepDetail.stepBody step={step} />}
151
- </EuiFlexItem>
152
153
  <EuiFlexItem>
153
- {shouldExpand
154
- && !hasHtmlMail
155
- && (codeView === CodeView.TABLE ? <WfoTableCodeBlock stepState={stepContent} />
156
- : codeView === CodeView.RAW ? <WfoJsonCodeBlock data={stepContent} />
157
- : <WfoMonacoCodeBlock data={stepContent} />)}
158
- {isExpanded && hasHtmlMail && (
159
- <div css={stepEmailContainerStyle}>
160
- {displayMailConfirmation(step.stateDelta.confirmation_mail as EmailState)}
161
- </div>
162
- )}
163
- {step.status === StepStatus.SUSPEND && userInputForm && (
164
- <WfoStepForm
165
- userInputForm={userInputForm}
166
- isTask={isTask}
167
- processId={processId ?? ''}
168
- userPermissions={userPermissions}
169
- />
154
+ {codeView === CodeView.TABLE ?
155
+ <WfoTableCodeBlock stepState={stepContent} />
156
+ : codeView === CodeView.RAW ?
157
+ <WfoJsonCodeBlock data={stepContent} />
158
+ : <WfoMonacoCodeBlock data={stepContent} />}
159
+ </EuiFlexItem>
160
+ <EuiFlexItem grow={1}>
161
+ {!(step.status === StepStatus.SUSPEND && userInputForm) && overrideStepDetail?.stepBody && (
162
+ <overrideStepDetail.stepBody step={step} />
170
163
  )}
171
164
  </EuiFlexItem>
172
165
  </EuiFlexGroup>
173
166
  )}
167
+ {step.status === StepStatus.SUSPEND && userInputForm && (
168
+ <EuiFlexGroup direction="column" gutterSize="none">
169
+ <EuiFlexItem grow={1}>
170
+ <WfoStepForm
171
+ userInputForm={userInputForm}
172
+ isTask={isTask}
173
+ processId={processId ?? ''}
174
+ userPermissions={userPermissions}
175
+ />
176
+ </EuiFlexItem>
177
+ <EuiFlexItem grow={1}>
178
+ {overrideStepDetail?.stepBody && <overrideStepDetail.stepBody step={step} />}
179
+ </EuiFlexItem>
180
+ </EuiFlexGroup>
181
+ )}
182
+ {isExpanded && hasHtmlMail && (
183
+ <div css={stepEmailContainerStyle}>
184
+ {displayMailConfirmation(step.stateDelta.confirmation_mail as EmailState)}
185
+ </div>
186
+ )}
174
187
  </EuiPanel>
175
188
  </div>
176
189
  );
@@ -1 +1 @@
1
- export const ORCHESTRATOR_UI_LIBRARY_VERSION = '7.7.0';
1
+ export const ORCHESTRATOR_UI_LIBRARY_VERSION = '7.7.1';