isPrimitiveOfType,
StringArrayCommandInputParameter,
StringCommandInputParameter,
+ getEnumType
} from "models/workflow";
import { CommandOutputParameter } from 'cwlts/mappings/v1.0/CommandOutputParameter';
import { File } from 'models/workflow';
<CircularProgress />
</Grid>}
{/* Once loaded, either raw or params may still be empty
- * Raw when all params are empty
- * Params when raw is provided by containerRequest properties but workflow mount is absent for preview
- */}
+ * Raw when all params are empty
+ * Params when raw is provided by containerRequest properties but workflow mount is absent for preview
+ */}
{(!loading && (hasRaw || hasParams)) &&
<>
<Tabs value={mainProcTabState} onChange={handleMainProcTabChange} variant="fullWidth" className={classes.symmetricTabs}>
[directoryToProcessIOValue(directory, auth, pdh)] :
[{ display: <EmptyValue /> }];
- case typeof input.type === 'object' &&
- !(input.type instanceof Array) &&
- input.type.type === 'enum':
+ case getEnumType(input) !== null:
const enumValue = (input as EnumCommandInputParameter).value;
return enumValue !== undefined && enumValue ?
[{ display: <pre>{enumValue}</pre> }] :
// Convert each main and secondaryFiles into array of ProcessIOValue preserving ordering
let fileArrayValues: ProcessIOValue[] = [];
- for(let i = 0; i < fileArrayMainFiles.length; i++) {
+ for (let i = 0; i < fileArrayMainFiles.length; i++) {
const secondaryFiles = ((fileArrayMainFiles[i] as unknown) as FileWithSecondaryFiles)?.secondaryFiles || [];
fileArrayValues.push(
// Pass firstMainFilePdh to secondary files and every main file besides the first to hide pdh if equal