From 268a40835dfe1be70a64381f63a69be464791564 Mon Sep 17 00:00:00 2001 From: SilviaAmAm Date: Wed, 7 Feb 2024 11:03:54 +0100 Subject: [PATCH 1/2] :sparkles: [open-formulieren/open-forms#3257] Update cosign V2 type --- src/formio/components/cosign.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/formio/components/cosign.ts b/src/formio/components/cosign.ts index f8917de..1a0c721 100644 --- a/src/formio/components/cosign.ts +++ b/src/formio/components/cosign.ts @@ -1,5 +1,4 @@ -import {OFExtensions, StrictComponentSchema} from '..'; -import {EmailInputSchema} from './email'; +import {InputComponentSchema, OFExtensions, StrictComponentSchema} from '..'; type TranslatableKeys = 'label' | 'description'; @@ -43,7 +42,20 @@ export interface CosignV1ComponentSchema extends Omit; /** * The cosign component type, otherwise known as 'Cosign'. @@ -57,9 +69,8 @@ type V2KeysToOmit = 'hideLabel' | 'disabled' | 'placeholder'; * @group Form.io components * @category Concrete types */ -export interface CosignV2ComponentSchema extends Omit { +export interface CosignV2ComponentSchema + extends Omit { type: 'cosign'; - validateOn: 'blur'; - defaultValue?: string; // no multiple support, so must always be a single string - autocomplete?: string; + checkBsn: boolean; } From aaaf618052d3ba11506dfaa098e60e6fb22adc42 Mon Sep 17 00:00:00 2001 From: SilviaAmAm Date: Wed, 7 Feb 2024 11:04:20 +0100 Subject: [PATCH 2/2] :white_check_mark: [open-formulieren/open-forms#3257] Update cosign V2 tests --- test-d/formio/components/cosign-v2.test-d.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test-d/formio/components/cosign-v2.test-d.ts b/test-d/formio/components/cosign-v2.test-d.ts index b6b9427..6f39fbd 100644 --- a/test-d/formio/components/cosign-v2.test-d.ts +++ b/test-d/formio/components/cosign-v2.test-d.ts @@ -6,16 +6,15 @@ import {CosignV2ComponentSchema} from '../../../lib/'; expectAssignable({ id: 'yejak', type: 'cosign', - validateOn: 'blur', key: 'someCoSign', label: 'Some cosign', + checkBsn: true, }); // full, correct schema expectAssignable({ id: 'yejak', type: 'cosign', - validateOn: 'blur', // basic tab in builder form label: 'Some cosign', key: 'someCoSign', @@ -27,8 +26,11 @@ expectAssignable({ hidden: false, clearOnHide: true, isSensitiveData: true, - defaultValue: '', - autocomplete: 'email', + defaultValue: { + bsn: '', + email: '' + }, + checkBsn: false, // advanced tab in builder form conditional: { show: undefined, @@ -84,7 +86,6 @@ expectNotAssignable({ expectNotAssignable({ id: 'yejak', type: 'cosign' as const, - validateOn: 'blur' as const, key: 'someCoSign', label: 'Some cosign', multiple: true as boolean, @@ -92,7 +93,6 @@ expectNotAssignable({ expectNotAssignable({ id: 'yejak', type: 'cosign' as const, - validateOn: 'blur' as const, key: 'someCoSign', label: 'Some cosign', defaultValue: [], @@ -103,7 +103,6 @@ expectNotAssignable({ expectNotAssignable({ id: 'yejak', type: 'cosign' as const, - validateOn: 'blur' as const, key: 'someCoSign', label: 'Some cosign', confirmationRecipient: true,