1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from "react";
6 import { memoize } from "lodash/fp";
7 import { FormDialog } from 'components/form-dialog/form-dialog';
8 import { CollectionProjectPickerField } from 'views-components/form-fields/collection-form-fields';
9 import { WithDialogProps } from 'store/dialog/with-dialog';
10 import { InjectedFormProps } from 'redux-form';
11 import { CollectionPartialCopyToSeparateCollectionsFormData } from 'store/collections/collection-partial-copy-actions';
12 import { PickerIdProp } from "store/tree-picker/picker-id";
14 type DialogCollectionPartialCopyProps = WithDialogProps<string> & InjectedFormProps<CollectionPartialCopyToSeparateCollectionsFormData>;
16 export const DialogCollectionPartialCopyToSeparateCollection = (props: DialogCollectionPartialCopyProps & PickerIdProp) =>
18 dialogTitle='Copy to separate collections'
19 formFields={CollectionPartialCopyFields(props.pickerId)}
20 submitLabel='Create collections'
24 const CollectionPartialCopyFields = memoize(
28 <CollectionProjectPickerField {...{ pickerId }} />