// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from "react"; import { Field, Validator } from "redux-form"; import { TextField } from "components/text-field/text-field"; import { COLLECTION_NAME_VALIDATION, COLLECTION_NAME_VALIDATION_ALLOW_SLASH, COLLECTION_DESCRIPTION_VALIDATION, COLLECTION_PROJECT_VALIDATION } from "validators/validators"; import { ProjectTreePickerField, CollectionTreePickerField } from "views-components/projects-tree-picker/tree-picker-field"; import { PickerIdProp } from 'store/tree-picker/picker-id'; import { connect } from "react-redux"; import { RootState } from "store/store"; interface CollectionNameFieldProps { validate: Validator[]; } // See implementation note on declaration of ProjectNameField export const CollectionNameField = connect( (state: RootState) => { return { validate: (state.auth.config.clusterConfig.Collections.ForwardSlashNameSubstitution === "" ? COLLECTION_NAME_VALIDATION : COLLECTION_NAME_VALIDATION_ALLOW_SLASH) }; })((props: CollectionNameFieldProps) => ); export const CollectionDescriptionField = () => ; export const CollectionProjectPickerField = (props: PickerIdProp) => ; export const CollectionPickerField = (props: PickerIdProp) => ;