diff --git a/collections/forms/types/RadioFieldFF/RadioFieldFF.d.ts b/collections/forms/types/RadioFieldFF/RadioFieldFF.d.ts index 9a0423b81a..6699ff8197 100644 --- a/collections/forms/types/RadioFieldFF/RadioFieldFF.d.ts +++ b/collections/forms/types/RadioFieldFF/RadioFieldFF.d.ts @@ -4,7 +4,7 @@ import type { RadioProps } from '@dhis2-ui/radio' type InputValue = RadioProps['value'] -type RadioOverriddenProps = Omit +type RadioOverriddenProps = Omit export type RadioFieldFFProps = FieldRenderProps & RadioOverriddenProps & { diff --git a/collections/forms/types/index.d.ts b/collections/forms/types/index.d.ts index 118a3bae2a..490492c96b 100644 --- a/collections/forms/types/index.d.ts +++ b/collections/forms/types/index.d.ts @@ -1,3 +1,6 @@ +import * as FinalForm from 'final-form' +import * as ReactFinalForm from 'react-final-form' + export { CheckboxFieldFF } from './CheckboxFieldFF/CheckboxFieldFF' export { FileInputFieldFF } from './FileInputFieldFF/FileInputFieldFF' @@ -12,3 +15,16 @@ export { FieldGroupFF } from './FieldGroupFF/FieldGroupFF' export * from './transformers' export * from './validators' + +/** + * Allows direct access to the FinalForm library. Please note that this is considered advanced + * usage and that you need to stay up to date with breaking changes in the FinalForm library. + */ +export { FinalForm } + +/** + * Allows direct access to the ReactFinalForm library. Please note that this is considered + * advanced usage and that you need to stay up to date with breaking changes in the FinalForm + * library. + */ +export { ReactFinalForm } diff --git a/collections/forms/types/transformers/index.d.ts b/collections/forms/types/transformers/index.d.ts index 158b0c73b2..a48956b79f 100644 --- a/collections/forms/types/transformers/index.d.ts +++ b/collections/forms/types/transformers/index.d.ts @@ -1,5 +1,5 @@ -import type { ValuesWithId } from "../validators" +export type ValuesWithId = Array<{ id: string }> | undefined export const arrayWithIdObjects: { format: (value: ValuesWithId) => string, diff --git a/collections/forms/types/validators/index.d.ts b/collections/forms/types/validators/index.d.ts index b5b199ed4e..0ead88dae6 100644 --- a/collections/forms/types/validators/index.d.ts +++ b/collections/forms/types/validators/index.d.ts @@ -1,5 +1,3 @@ -export type ValuesWithId = Array<{ id: string }> | undefined - export type Validator = (value: unknown) => string | undefined export const alphaNumeric: Validator