UNPKG

@baseplate-dev/plugin-storage

Version:

Contains the storage plugin for Baseplate

16 lines 871 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useProjectDefinition } from '@baseplate-dev/project-builder-lib/web'; import { SelectFieldController } from '@baseplate-dev/ui-components'; export function AdminCrudFileInputForm({ formProps, name, model, }) { const { definitionContainer } = useProjectDefinition(); const fileTransformerOptions = model.service.transformers .filter((t) => t.type === 'file') .map((transformer) => ({ label: definitionContainer.nameFromId(transformer.fileRelationRef), value: transformer.id, })); const prefix = name; const controlTyped = formProps.control; return (_jsx(SelectFieldController, { label: "File Transformer Name", control: controlTyped, name: `${prefix}.modelRelationRef`, options: fileTransformerOptions })); } //# sourceMappingURL=admin-crud-input-form.js.map