export const createAnchorAt = (position: {x: number, y: number}) => {
const el = document.createElement('div');
- const clientRect = {
+ const clientRect: DOMRect = {
+ x: position.x,
+ y: position.y,
+ toJSON: () => '',
left: position.x,
right: position.x,
top: position.y,
PropTypes
} from '@material-ui/core';
import RichTextEditor from 'react-rte';
-import Margin from 'PropTypes';
type CssRules = 'textField' | 'rte';
type TextFieldProps = WrappedFieldProps & WithStyles<CssRules>;
export const TextField = withStyles(styles)((props: TextFieldProps & {
- label?: string, autoFocus?: boolean, required?: boolean, select?: boolean, disabled?: boolean, children: React.ReactNode, margin?: Margin, placeholder?: string,
+ label?: string, autoFocus?: boolean, required?: boolean, select?: boolean, disabled?: boolean, children: React.ReactNode, margin?: PropTypes.Margin, placeholder?: string,
helperText?: string, type?: string,
}) =>
<MaterialTextField
const ExampleEditFields = () => <span>
<Field
name='pressedCount'
- component={TextField}
+ component={TextField as any}
type="number"
/>
</span>;
return mapTreeValues((v: CollectionPanelDirectory | CollectionPanelFile) => {
if (v.type === CollectionFileType.DIRECTORY) {
- return ({
+ return ({
...v,
collapsed: searchValue.length === 0,
});
},
SELECT_ALL_COLLECTION_FILES: () =>
- mapTreeValues(v => ({ ...v, selected: true }))({ ...state }),
+ mapTreeValues((v: any) => ({ ...v, selected: true }))({ ...state }),
UNSELECT_ALL_COLLECTION_FILES: () =>
- mapTreeValues(v => ({ ...v, selected: false }))({ ...state }),
+ mapTreeValues((v: any) => ({ ...v, selected: false }))({ ...state }),
default: () => state
}) as CollectionPanelFilesState;
if (node && node.value.type === CollectionFileType.DIRECTORY) {
return getNodeDescendantsIds(id)(tree)
.reduce((newTree, id) =>
- setNodeValueWith(v => ({ ...v, selected: node.value.selected }))(id)(newTree), tree);
+ setNodeValueWith((v: any) => ({ ...v, selected: node.value.selected }))(id)(newTree), tree);
}
return tree;
};
const selected = parentNode.children
.map(id => getNode(id)(tree))
.every(node => node !== undefined && node.value.selected);
- return setNodeValueWith(v => ({ ...v, selected }))(parentNode.id)(tree);
+ return setNodeValueWith((v: any) => ({ ...v, selected }))(parentNode.id)(tree);
}
return setNode(node)(tree);
}
<span>
<Field
name='name'
- component={TextField}
+ component={TextField as any}
validate={COPY_NAME_VALIDATION}
label="Enter a new name for the copy" />
<Field
const UsersField = () =>
<FieldArray
name={ADD_GROUP_MEMBERS_USERS_FIELD_NAME}
- component={UsersSelect}
+ component={UsersSelect as any}
validate={UsersFieldValidation} />;
const UsersFieldValidation = [minLength(1, () => 'Select at least one user')];
const GroupNameField = () =>
<Field
name={CREATE_GROUP_NAME_FIELD_NAME}
- component={TextField}
+ component={TextField as any}
validate={GROUP_NAME_VALIDATION}
label="Name"
autoFocus={true} />;
const UsersField = () =>
<FieldArray
name={CREATE_GROUP_USERS_FIELD_NAME}
- component={UsersSelect} />;
+ component={UsersSelect as any} />;
const UsersSelect = ({ fields }: WrappedFieldArrayProps<Participant>) =>
<ParticipantSelect
<span>
<Field
name='email'
- component={TextField}
+ component={TextField as any}
disabled
label={data.user.email} /></span>;
<InputLabel>Virtual Machine</InputLabel>
<Field
name='virtualMachine'
- component={NativeSelectField}
+ component={NativeSelectField as any}
validate={CHOOSE_VM_VALIDATION}
items={getVirtualMachinesList(data.items)} />
</div>;
const UserGroupsVirtualMachineField = () =>
<Field
name='groups'
- component={TextField}
+ component={TextField as any}
validate={USER_LENGTH_VALIDATION}
label="Groups for virtual machine (comma separated list)" />;
})((props: CollectionNameFieldProps) =>
<span data-cy='name-field'><Field
name='name'
- component={TextField}
+ component={TextField as any}
validate={props.validate}
label="Collection Name"
autoFocus={true} /></span>
export const CollectionDescriptionField = () =>
<Field
name='description'
- component={TextField}
+ component={TextField as any}
validate={COLLECTION_DESCRIPTION_VALIDATION}
label="Description - optional" />;
export const ProcessNameField = () =>
<Field
name='name'
- component={TextField}
+ component={TextField as any}
validate={PROCESS_NAME_VALIDATION}
label="Process Name" />;
export const ProcessDescriptionField = () =>
<Field
name='description'
- component={TextField}
+ component={TextField as any}
validate={PROCESS_DESCRIPTION_VALIDATION}
label="Process Description" />;
})((props: ProjectNameFieldProps) =>
<span data-cy='name-field'><Field
name='name'
- component={TextField}
+ component={TextField as any}
validate={props.validate}
label={props.label || "Project Name"}
autoFocus={true} /></span>
export const ProjectDescriptionField = () =>
<Field
name='description'
- component={RichEditorTextField}
+ component={RichEditorTextField as any}
label="Description - optional" />;
<Grid item xs={7} style={{ bottom: '24px', position: 'relative' }}>
<Field
name='name'
- component={TextField}
+ component={TextField as any}
validate={REPOSITORY_NAME_VALIDATION}
label="Name"
autoFocus={true} />
return value;
}
}
- component={TextField} /></span>
+ component={TextField as any} /></span>
);
export const SearchBarTypeField = () =>
<Field
name='type'
- component={NativeSelectField}
+ component={NativeSelectField as any}
items={[
{ key: '', value: 'Any' },
{ key: ResourceKind.COLLECTION, value: 'Collection' },
})))
}))((props: SearchBarClusterFieldProps) => <Field
name='cluster'
- component={NativeSelectField}
+ component={NativeSelectField as any}
items={props.clusters}/>
);
export const SearchBarDateFromField = () =>
<Field
name='dateFrom'
- component={DateTextField} />;
+ component={DateTextField as any} />;
export const SearchBarDateToField = () =>
<Field
name='dateTo'
- component={DateTextField} />;
+ component={DateTextField as any} />;
export const SearchBarPropertiesField = () =>
<FieldArray
name="properties"
- component={SearchBarAdvancedPropertiesView} />;
+ component={SearchBarAdvancedPropertiesView as any} />;
export const SearchBarKeyField = () =>
<PropertyKeyField skipValidation={true} />;
export const SearchBarQuerySearchField = () =>
<Field
name='queryName'
- component={TextField}
+ component={TextField as any}
label="Query name" />;
export const SshKeyPublicField = () =>
<Field
name='publicKey'
- component={TextField}
+ component={TextField as any}
validate={SSH_KEY_PUBLIC_VALIDATION}
autoFocus={true}
label="Public Key" />;
export const SshKeyNameField = () =>
<Field
name='name'
- component={TextField}
+ component={TextField as any}
validate={SSH_KEY_NAME_VALIDATION}
label="Name" />;
export const UserEmailField = () =>
<Field
name='email'
- component={TextField}
+ component={TextField as any}
validate={USER_EMAIL_VALIDATION}
autoFocus={true}
label="Email" />;
<InputLabel>Virtual Machine</InputLabel>
<Field
name='virtualMachine'
- component={NativeSelectField}
+ component={NativeSelectField as any}
validate={USER_LENGTH_VALIDATION}
items={getVirtualMachinesList(data.items)} />
</div>;
export const UserGroupsVirtualMachineField = () =>
<Field
name='groups'
- component={TextField}
+ component={TextField as any}
validate={USER_LENGTH_VALIDATION}
label="Groups for virtual machine (comma separated list)" />;
// SPDX-License-Identifier: AGPL-3.0
import React from 'react';
-import { compose } from 'redux';
+import { compose, Dispatch } from 'redux';
import { reduxForm, InjectedFormProps, Field } from 'redux-form';
import { withDialog, WithDialogProps } from 'store/dialog/with-dialog';
import { FormDialog } from 'components/form-dialog/form-dialog';
reduxForm({
form: RENAME_FILE_DIALOG,
touchOnChange: true,
- onSubmit: (data: { path: string }, dispatch) => {
+ onSubmit: (data: { path: string }, dispatch: Dispatch) => {
dispatch<any>(renameFile(data.path));
}
})
</DialogContentText>
<Field
name='path'
- component={TextField}
+ component={TextField as any}
autoFocus={true}
validate={RENAME_FILE_VALIDATION}
/>
const InvitedPeopleField = () =>
<FieldArray
name='invitedPeople'
- component={InvitedPeopleFieldComponent} />;
+ component={InvitedPeopleFieldComponent as any} />;
const InvitedPeopleFieldComponent = ({ fields }: WrappedFieldArrayProps<Participant>) =>
export default () =>
- <FieldArray name='permissions' component={SharingManagementFieldArray} />;
+ <FieldArray name='permissions' component={SharingManagementFieldArray as any} />;
const SharingManagementFieldArray = ({ fields }: WrappedFieldArrayProps<{ email: string }>) =>
<div>
</Grid>
<Grid item xs={4} container wrap='nowrap'>
<Field
- name={`${field}.permissions`}
+ name={`${field}.permissions` as string}
component={PermissionSelectComponent}
format={formatPermissionLevel}
parse={parsePermissionLevel} />
<Field
label="First name"
name="firstName"
- component={TextField}
+ component={TextField as any}
disabled
/>
</Grid>
<Field
label="Last name"
name="lastName"
- component={TextField}
+ component={TextField as any}
disabled
/>
</Grid>
<Field
label="E-mail"
name="email"
- component={TextField}
+ component={TextField as any}
disabled
/>
</Grid>
<Field
label="Username"
name="username"
- component={TextField}
+ component={TextField as any}
disabled
/>
</Grid>
<Field
label="Organization"
name="prefs.profile.organization"
- component={TextField}
+ component={TextField as any}
validate={MY_ACCOUNT_VALIDATION}
required
/>
<Field
label="E-mail at Organization"
name="prefs.profile.organization_email"
- component={TextField}
+ component={TextField as any}
validate={MY_ACCOUNT_VALIDATION}
required
/>
<Field
id="prefs.profile.role"
name="prefs.profile.role"
- component={NativeSelectField}
+ component={NativeSelectField as any}
items={RoleTypes}
/>
</Grid>
<Field
label="Website"
name="prefs.profile.website_url"
- component={TextField}
+ component={TextField as any}
/>
</Grid>
<Grid container direction="row" justify="flex-end" >
const mapDispatchToProps = null;
-export const NotFoundPanel = connect<NotFoundPanelRootDataProps, null, NotFoundPanelOwnProps>(mapStateToProps, mapDispatchToProps)
- (NotFoundPanelRoot);
+export const NotFoundPanel = connect(mapStateToProps, mapDispatchToProps)
+ (NotFoundPanelRoot) as any;
<Field
name={input.id}
commandInput={input}
- component={DirectoryArrayInputComponent}
+ component={DirectoryArrayInputComponent as any}
parse={parseDirectories}
format={formatDirectories}
validate={validationSelector(input)} />;
refreshDirectories = () => {
clearTimeout(this.directoryRefreshTimeout);
- this.directoryRefreshTimeout = setTimeout(this.setSelectedFiles);
+ this.directoryRefreshTimeout = window.setTimeout(this.setSelectedFiles);
}
setSelectedFiles = () => {
<Field
name={input.id}
commandInput={input}
- component={DirectoryInputComponent}
+ component={DirectoryInputComponent as any}
format={format}
parse={parse}
{...{
<Field
name={input.id}
commandInput={input}
- component={FileArrayInputComponent}
+ component={FileArrayInputComponent as any}
parse={parseFiles}
format={formatFiles}
validate={validationSelector(input)} />;
refreshFiles = () => {
clearTimeout(this.fileRefreshTimeout);
- this.fileRefreshTimeout = setTimeout(this.setSelectedFiles);
+ this.fileRefreshTimeout = window.setTimeout(this.setSelectedFiles);
}
setSelectedFiles = () => {
<Field
name={input.id}
commandInput={input}
- component={FileInputComponent}
+ component={FileInputComponent as any}
format={format}
parse={parse}
{...{
<Grid item xs={12} md={6}>
<Field
name={OUTPUT_FIELD}
- component={TextField}
+ component={TextField as any}
label="Output name" />
</Grid>
<Grid item xs={12} md={6}>
<Field
name={RUNTIME_FIELD}
- component={TextField}
+ component={TextField as any}
helperText="Maximum running time (in seconds) that this container will be allowed to run before being cancelled."
label="Runtime limit"
parse={IntInput.parse}
<Grid item xs={12} md={6}>
<Field
name={RAM_FIELD}
- component={TextField}
+ component={TextField as any}
label="RAM"
helperText="Number of ram bytes to be used to run this process."
parse={IntInput.parse}
<Grid item xs={12} md={6}>
<Field
name={VCPUS_FIELD}
- component={TextField}
+ component={TextField as any}
label="VCPUs"
helperText="Number of cores to be used to run this process."
parse={IntInput.parse}
<Grid item xs={12} md={6}>
<Field
name={KEEP_CACHE_RAM_FIELD}
- component={TextField}
+ component={TextField as any}
label="Keep cache RAM"
helperText="Number of keep cache bytes to be used to run this process."
parse={IntInput.parse}
<Grid item xs={12} md={6}>
<Field
name={RUNNER_IMAGE_FIELD}
- component={TextField}
+ component={TextField as any}
label='Runner'
required
helperText='The container image with arvados-cwl-runner that will execute this workflow.' />
<Grid item xs={12} md={6}>
<Field
name='name'
- component={TextField}
+ component={TextField as any}
label="Enter a new name for run process"
required
validate={PROCESS_NAME_VALIDATION} />
<Grid item xs={12} md={6}>
<Field
name='description'
- component={TextField}
+ component={TextField as any}
label="Enter a description for run process" />
</Grid>
</Grid>
<Field
name='remoteHost'
validate={SITE_MANAGER_REMOTE_HOST_VALIDATION}
- component={TextField}
+ component={TextField as any}
placeholder="zzzz.arvadosapi.com"
margin="normal"
label="New cluster"
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
- "noImplicitAny": true,
+ "noImplicitAny": false,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
- "strict": true,
+ "strict": false,
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,