@planning-inspectorate/dynamic-forms 3.17.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -246
- package/docs/Email Validation.md +86 -0
- package/docs/Getting Started.md +299 -0
- package/package.json +1 -1
- package/src/components/checkbox/question.d.ts.map +1 -1
- package/src/components/checkbox/question.js +3 -2
- package/src/components/checkbox/question.test.js +8 -0
- package/src/components/email/question.d.ts +0 -9
- package/src/components/email/question.d.ts.map +1 -1
- package/src/components/email/question.js +2 -13
- package/src/components/email/question.test.js +19 -0
- package/src/components/multi-field-input/question.d.ts +4 -19
- package/src/components/multi-field-input/question.d.ts.map +1 -1
- package/src/components/multi-field-input/question.js +89 -23
- package/src/components/multi-field-input/question.test.js +441 -3
- package/src/components/number-entry/question.d.ts.map +1 -1
- package/src/components/number-entry/question.js +3 -2
- package/src/components/number-entry/question.test.js +17 -0
- package/src/components/unit-option-entry/question.d.ts.map +1 -1
- package/src/components/unit-option-entry/question.js +3 -1
- package/src/components/unit-option-entry/question.test.js +15 -0
- package/src/questions/question.d.ts +2 -2
- package/src/questions/question.js +2 -2
- package/test/snapshots/check-your-answers-with-answers.html +1 -1
- package/test/utils/question-test-utils.js +2 -1
- package/typedefs/question-props.d.ts +33 -0
- package/typedefs/question-types.d.ts +0 -23
|
@@ -3,29 +3,6 @@ import type ManageListQuestion from '#src/components/manage-list/question.js';
|
|
|
3
3
|
import type BaseValidator from '#src/validator/base-validator.js';
|
|
4
4
|
import type { JourneyResponse } from '#src/journey/journey-response.js';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Context passed to the custom summary formatter
|
|
8
|
-
*/
|
|
9
|
-
export interface SummaryFormatterContext<TAnswer = unknown> {
|
|
10
|
-
/** The raw answer value */
|
|
11
|
-
answer: TAnswer;
|
|
12
|
-
/** The default display value */
|
|
13
|
-
formattedAnswer: string;
|
|
14
|
-
/** The question instance */
|
|
15
|
-
question: import('./question.js').Question;
|
|
16
|
-
/** The journey instance */
|
|
17
|
-
journey: import('../journey/journey.js').Journey;
|
|
18
|
-
/** The section segment */
|
|
19
|
-
sectionSegment: string;
|
|
20
|
-
/** The selected option objects (for options-based questions) */
|
|
21
|
-
selectedOptions?: import('./options-question.js').Option[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Custom function to format the summary display value
|
|
26
|
-
*/
|
|
27
|
-
export type SummaryValueFormatter<TAnswer = unknown> = (context: SummaryFormatterContext<TAnswer>) => string;
|
|
28
|
-
|
|
29
6
|
export interface QuestionParameters {
|
|
30
7
|
title: string;
|
|
31
8
|
question: string;
|