From 624b893b26dd48b748aa442eccc87f880156f8fd Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Fri, 8 Nov 2024 12:33:38 +0100 Subject: [PATCH 1/2] :sparkles: [open-formulieren/open-forms#4813] Added prefill to number configuration --- src/components/ComponentConfiguration.stories.tsx | 5 +++++ src/registry/number/edit.tsx | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/components/ComponentConfiguration.stories.tsx b/src/components/ComponentConfiguration.stories.tsx index 7f3184e0..8f4b43d2 100644 --- a/src/components/ComponentConfiguration.stories.tsx +++ b/src/components/ComponentConfiguration.stories.tsx @@ -434,6 +434,11 @@ export const NumberField: Story = { max: '', }, }, + prefill: { + attribute: '', + identifierRole: 'main', + plugin: '', + }, registration: { attribute: '', }, diff --git a/src/registry/number/edit.tsx b/src/registry/number/edit.tsx index e2ad9f0b..dfcdaaa6 100644 --- a/src/registry/number/edit.tsx +++ b/src/registry/number/edit.tsx @@ -9,6 +9,7 @@ import { IsSensitiveData, Key, Label, + Prefill, PresentationConfig, Registration, SimpleConditional, @@ -58,6 +59,7 @@ const EditForm: EditFormDefinition = () => { + @@ -96,6 +98,11 @@ const EditForm: EditFormDefinition = () => { + {/* Prefill tab */} + + + + {/* Translations */} @@ -148,6 +155,11 @@ EditForm.defaultValues = { registration: { attribute: '', }, + prefill: { + plugin: '', + attribute: '', + identifierRole: 'main', + }, }; const DefaultValue: React.FC = () => { From 511f547fa48668791c670f5717b6a94591c90f81 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Mon, 11 Nov 2024 12:09:39 +0100 Subject: [PATCH 2/2] :arrow_up: [open-formulieren/open-forms#4813] Use types 0.33.0 --- package-lock.json | 17 +++++++++-------- package.json | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ef7665d..6234776a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "@formatjs/cli": "^6.1.1", "@formatjs/ts-transformer": "^3.12.0", "@fortawesome/fontawesome-free": "^6.4.0", - "@open-formulieren/types": "^0.32.0", + "@open-formulieren/types": "^0.33.0", "@storybook/addon-actions": "^8.3.5", "@storybook/addon-essentials": "^8.3.5", "@storybook/addon-interactions": "^8.3.5", @@ -5087,10 +5087,11 @@ } }, "node_modules/@open-formulieren/types": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.32.0.tgz", - "integrity": "sha512-Zio0HV99RqfYjVVx7TTdV+SxShwmc7j57cHXCZGGgpY6VicpOwISD6Wg93SEbYuQoFuRUAtjKE1JZ91dR+5TLg==", - "dev": true + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.33.0.tgz", + "integrity": "sha512-ALPg3wMviAxmfdXBBfaSkecZH92yfbH+EXUiyByiDo8WtJHGbniiXSV6YHMWvrXFWuKxCTx22St0wl/if0Ojjw==", + "dev": true, + "license": "EUPL-1.2" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -24606,9 +24607,9 @@ } }, "@open-formulieren/types": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.32.0.tgz", - "integrity": "sha512-Zio0HV99RqfYjVVx7TTdV+SxShwmc7j57cHXCZGGgpY6VicpOwISD6Wg93SEbYuQoFuRUAtjKE1JZ91dR+5TLg==", + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.33.0.tgz", + "integrity": "sha512-ALPg3wMviAxmfdXBBfaSkecZH92yfbH+EXUiyByiDo8WtJHGbniiXSV6YHMWvrXFWuKxCTx22St0wl/if0Ojjw==", "dev": true }, "@pkgjs/parseargs": { diff --git a/package.json b/package.json index 044afc39..38cb9efa 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@formatjs/cli": "^6.1.1", "@formatjs/ts-transformer": "^3.12.0", "@fortawesome/fontawesome-free": "^6.4.0", - "@open-formulieren/types": "^0.32.0", + "@open-formulieren/types": "^0.33.0", "@storybook/addon-actions": "^8.3.5", "@storybook/addon-essentials": "^8.3.5", "@storybook/addon-interactions": "^8.3.5",