// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from 'react'; import { reduxForm, Field, InjectedFormProps } from 'redux-form'; import { Grid, Typography } from '@mui/material'; import withStyles from '@mui/styles/withStyles'; import { WithStyles } from '@mui/styles'; import { TextField } from 'components/text-field/text-field'; import { ProjectInput, ProjectCommandInputParameter } from 'views/run-process-panel/inputs/project-input'; import { PROCESS_NAME_VALIDATION } from 'validators/validators'; import { ProjectResource } from 'models/project'; import { UserResource } from 'models/user'; import { WorkflowResource } from 'models/workflow'; import { ArvadosTheme, CustomStyleRulesCallback } from 'common/custom-theme'; export const RUN_PROCESS_BASIC_FORM = 'runProcessBasicForm'; export interface RunProcessBasicFormData { name: string; owner?: ProjectResource | UserResource; } interface RunProcessBasicFormProps { workflow?: WorkflowResource; } type CssRules = 'root' | 'name' | 'description'; const styles: CustomStyleRulesCallback = (theme: ArvadosTheme) => ({ root: { fontSize: '1.125rem', }, name: { overflow: 'hidden', color: theme.customs.colors.greyD, fontSize: '1.875rem', }, description: {}, }); export const RunProcessBasicForm = reduxForm({ form: RUN_PROCESS_BASIC_FORM, })( withStyles(styles)((props: InjectedFormProps & RunProcessBasicFormProps & WithStyles) => (
{props.workflow && ( {props.workflow.name} )} {props.workflow && ( )}
)) );