diff --git a/.storybook/decorators.tsx b/.storybook/decorators.tsx index 482fb45e..d3430b11 100644 --- a/.storybook/decorators.tsx +++ b/.storybook/decorators.tsx @@ -141,7 +141,7 @@ export const DEFAULT_FILE_TYPES = [ }, ]; -const DEFAULT_DOCUMENT_TYPES: DocumentTypeOption[] = [ +export const DEFAULT_DOCUMENT_TYPES: DocumentTypeOption[] = [ { backendLabel: '', catalogus: { @@ -184,7 +184,7 @@ const DEFAULT_DOCUMENT_TYPES: DocumentTypeOption[] = [ }, ]; -const CONFIDENTIALITY_LEVELS = [ +export const CONFIDENTIALITY_LEVELS = [ {label: 'Openbaar', value: 'openbaar'}, {label: 'Beperkt openbaar', value: 'beperkt_openbaar'}, {label: 'Intern', value: 'intern'}, diff --git a/src/components/ComponentConfiguration.stories.tsx b/src/components/ComponentConfiguration.stories.tsx index 695c4d1c..4decd986 100644 --- a/src/components/ComponentConfiguration.stories.tsx +++ b/src/components/ComponentConfiguration.stories.tsx @@ -4,7 +4,11 @@ import {Meta, StoryFn, StoryObj} from '@storybook/react'; import {fireEvent, userEvent, waitFor, within} from '@storybook/testing-library'; import React from 'react'; -import {DEFAULT_FILE_TYPES} from '@/../.storybook/decorators'; +import { + CONFIDENTIALITY_LEVELS, + DEFAULT_DOCUMENT_TYPES, + DEFAULT_FILE_TYPES, +} from '@/../.storybook/decorators'; import {AnyComponentSchema} from '@/types'; import ComponentConfiguration from './ComponentConfiguration'; @@ -116,6 +120,8 @@ const Template: StoryFn = ({ getPrefillAttributes={async (plugin: string) => prefillAttributes[plugin]} getFileTypes={async () => fileTypes} serverUploadLimit="50MB" + getDocumentTypes={async () => DEFAULT_DOCUMENT_TYPES} + getConfidentialityLevels={async () => CONFIDENTIALITY_LEVELS} component={component} isNew={isNew} builderInfo={builderInfo} diff --git a/src/registry/file/edit.tsx b/src/registry/file/edit.tsx index 5ccb7325..dfd4f4fb 100644 --- a/src/registry/file/edit.tsx +++ b/src/registry/file/edit.tsx @@ -24,6 +24,7 @@ import {getErrorNames} from '@/utils/errors'; import {EditFormDefinition} from '../types'; import FileTabFields from './file-tab'; +import RegistrationTabFields from './registration-tab'; /** * Form to configure a Formio 'file' type component. @@ -114,7 +115,9 @@ const EditForm: EditFormDefinition = () => { {/* Registration tab */} - TODO + + + {/* Translations */} diff --git a/src/registry/file/registration-tab.tsx b/src/registry/file/registration-tab.tsx index c3b44106..933fa97e 100644 --- a/src/registry/file/registration-tab.tsx +++ b/src/registry/file/registration-tab.tsx @@ -92,6 +92,7 @@ const SourceOrganisation = () => { /> } tooltip={tooltip} + inputMode="numeric" /> ); };