@planning-inspectorate/dynamic-forms 3.10.8 → 3.10.10
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/move-types.js +6 -8
- package/package.json +1 -1
- package/src/components/boolean/question.js +1 -1
- package/src/components/manage-list/utils.js +4 -4
- package/src/components/radio/question.js +1 -1
- package/src/components/unit-option-entry/question.js +2 -2
- package/src/components/utils/question-has-answer.js +1 -1
- package/src/index.js +1 -0
- package/src/journey/journey-response.js +2 -2
- package/src/journey/journey-types.js +1 -0
- package/src/journey/journey.js +17 -23
- package/src/questions/create-questions.js +1 -1
- package/src/questions/options-question.js +7 -3
- package/src/questions/question-types.d.ts +6 -0
- package/src/questions/question.js +18 -21
- package/src/validator/valid-option-validator.js +1 -5
- package/tsconfig.json +1 -1
- package/types/commitlint.config.d.ts +0 -7
- package/types/commitlint.config.d.ts.map +0 -1
- package/types/eslint.config.d.ts +0 -95
- package/types/eslint.config.d.ts.map +0 -1
- package/types/move-types.d.ts +0 -2
- package/types/move-types.d.ts.map +0 -1
- package/types/src/components/address/question.d.ts +0 -36
- package/types/src/components/address/question.d.ts.map +0 -1
- package/types/src/components/address/question.test.d.ts +0 -2
- package/types/src/components/address/question.test.d.ts.map +0 -1
- package/types/src/components/boolean/question.d.ts +0 -50
- package/types/src/components/boolean/question.d.ts.map +0 -1
- package/types/src/components/boolean/question.test.d.ts +0 -2
- package/types/src/components/boolean/question.test.d.ts.map +0 -1
- package/types/src/components/checkbox/question.d.ts +0 -52
- package/types/src/components/checkbox/question.d.ts.map +0 -1
- package/types/src/components/checkbox/question.test.d.ts +0 -2
- package/types/src/components/checkbox/question.test.d.ts.map +0 -1
- package/types/src/components/date/question.d.ts +0 -23
- package/types/src/components/date/question.d.ts.map +0 -1
- package/types/src/components/date/question.test.d.ts +0 -2
- package/types/src/components/date/question.test.d.ts.map +0 -1
- package/types/src/components/date-period/question.d.ts +0 -35
- package/types/src/components/date-period/question.d.ts.map +0 -1
- package/types/src/components/date-period/question.test.d.ts +0 -2
- package/types/src/components/date-period/question.test.d.ts.map +0 -1
- package/types/src/components/date-time/question.d.ts +0 -25
- package/types/src/components/date-time/question.d.ts.map +0 -1
- package/types/src/components/date-time/question.test.d.ts +0 -2
- package/types/src/components/date-time/question.test.d.ts.map +0 -1
- package/types/src/components/email/question.d.ts +0 -31
- package/types/src/components/email/question.d.ts.map +0 -1
- package/types/src/components/email/question.test.d.ts +0 -2
- package/types/src/components/email/question.test.d.ts.map +0 -1
- package/types/src/components/identifier/question.d.ts +0 -16
- package/types/src/components/identifier/question.d.ts.map +0 -1
- package/types/src/components/identifier/question.test.d.ts +0 -2
- package/types/src/components/identifier/question.test.d.ts.map +0 -1
- package/types/src/components/manage-list/manage-list-actions.d.ts +0 -10
- package/types/src/components/manage-list/manage-list-actions.d.ts.map +0 -1
- package/types/src/components/manage-list/manage-list-section.d.ts +0 -16
- package/types/src/components/manage-list/manage-list-section.d.ts.map +0 -1
- package/types/src/components/manage-list/manage-list-section.test.d.ts +0 -2
- package/types/src/components/manage-list/manage-list-section.test.d.ts.map +0 -1
- package/types/src/components/manage-list/question.d.ts +0 -49
- package/types/src/components/manage-list/question.d.ts.map +0 -1
- package/types/src/components/manage-list/question.test.d.ts +0 -2
- package/types/src/components/manage-list/question.test.d.ts.map +0 -1
- package/types/src/components/manage-list/utils.d.ts +0 -18
- package/types/src/components/manage-list/utils.d.ts.map +0 -1
- package/types/src/components/manage-list/utils.test.d.ts +0 -2
- package/types/src/components/manage-list/utils.test.d.ts.map +0 -1
- package/types/src/components/multi-field-input/question.d.ts +0 -61
- package/types/src/components/multi-field-input/question.d.ts.map +0 -1
- package/types/src/components/multi-field-input/question.test.d.ts +0 -2
- package/types/src/components/multi-field-input/question.test.d.ts.map +0 -1
- package/types/src/components/number-entry/question.d.ts +0 -38
- package/types/src/components/number-entry/question.d.ts.map +0 -1
- package/types/src/components/radio/question.d.ts +0 -54
- package/types/src/components/radio/question.d.ts.map +0 -1
- package/types/src/components/radio/question.test.d.ts +0 -2
- package/types/src/components/radio/question.test.d.ts.map +0 -1
- package/types/src/components/select/question.d.ts +0 -55
- package/types/src/components/select/question.d.ts.map +0 -1
- package/types/src/components/select/question.test.d.ts +0 -2
- package/types/src/components/select/question.test.d.ts.map +0 -1
- package/types/src/components/single-line-input/question.d.ts +0 -19
- package/types/src/components/single-line-input/question.d.ts.map +0 -1
- package/types/src/components/single-line-input/question.test.d.ts +0 -2
- package/types/src/components/single-line-input/question.test.d.ts.map +0 -1
- package/types/src/components/text-entry/question.d.ts +0 -35
- package/types/src/components/text-entry/question.d.ts.map +0 -1
- package/types/src/components/text-entry/question.test.d.ts +0 -2
- package/types/src/components/text-entry/question.test.d.ts.map +0 -1
- package/types/src/components/text-entry-redact/question.d.ts +0 -35
- package/types/src/components/text-entry-redact/question.d.ts.map +0 -1
- package/types/src/components/text-entry-redact/question.test.d.ts +0 -2
- package/types/src/components/text-entry-redact/question.test.d.ts.map +0 -1
- package/types/src/components/unit-option-entry/question.d.ts +0 -84
- package/types/src/components/unit-option-entry/question.d.ts.map +0 -1
- package/types/src/components/unit-option-entry/question.test.d.ts +0 -2
- package/types/src/components/unit-option-entry/question.test.d.ts.map +0 -1
- package/types/src/components/utils/component-types.d.ts +0 -19
- package/types/src/components/utils/component-types.d.ts.map +0 -1
- package/types/src/components/utils/persisted-number-answer.d.ts +0 -2
- package/types/src/components/utils/persisted-number-answer.d.ts.map +0 -1
- package/types/src/components/utils/question-has-answer.d.ts +0 -17
- package/types/src/components/utils/question-has-answer.d.ts.map +0 -1
- package/types/src/components/utils/question-has-answer.test.d.ts +0 -2
- package/types/src/components/utils/question-has-answer.test.d.ts.map +0 -1
- package/types/src/components/utils/question-utils.d.ts +0 -15
- package/types/src/components/utils/question-utils.d.ts.map +0 -1
- package/types/src/components/utils/question-utils.test.d.ts +0 -2
- package/types/src/components/utils/question-utils.test.d.ts.map +0 -1
- package/types/src/controller.d.ts +0 -75
- package/types/src/controller.d.ts.map +0 -1
- package/types/src/controller.test.d.ts +0 -2
- package/types/src/controller.test.d.ts.map +0 -1
- package/types/src/index.d.ts +0 -58
- package/types/src/index.d.ts.map +0 -1
- package/types/src/index.test.d.ts +0 -2
- package/types/src/index.test.d.ts.map +0 -1
- package/types/src/journey/journey-response.d.ts +0 -32
- package/types/src/journey/journey-response.d.ts.map +0 -1
- package/types/src/journey/journey-response.test.d.ts +0 -2
- package/types/src/journey/journey-response.test.d.ts.map +0 -1
- package/types/src/journey/journey.d.ts +0 -144
- package/types/src/journey/journey.d.ts.map +0 -1
- package/types/src/journey/journey.test.d.ts +0 -2
- package/types/src/journey/journey.test.d.ts.map +0 -1
- package/types/src/lib/address-utils.d.ts +0 -6
- package/types/src/lib/address-utils.d.ts.map +0 -1
- package/types/src/lib/address-utils.test.d.ts +0 -2
- package/types/src/lib/address-utils.test.d.ts.map +0 -1
- package/types/src/lib/address.d.ts +0 -43
- package/types/src/lib/address.d.ts.map +0 -1
- package/types/src/lib/address.test.d.ts +0 -2
- package/types/src/lib/address.test.d.ts.map +0 -1
- package/types/src/lib/date-utils.d.ts +0 -60
- package/types/src/lib/date-utils.d.ts.map +0 -1
- package/types/src/lib/date-utils.test.d.ts +0 -2
- package/types/src/lib/date-utils.test.d.ts.map +0 -1
- package/types/src/lib/session-answer-store.d.ts +0 -88
- package/types/src/lib/session-answer-store.d.ts.map +0 -1
- package/types/src/lib/session-answer-store.test.d.ts +0 -2
- package/types/src/lib/session-answer-store.test.d.ts.map +0 -1
- package/types/src/lib/utils.d.ts +0 -26
- package/types/src/lib/utils.d.ts.map +0 -1
- package/types/src/lib/utils.test.d.ts +0 -2
- package/types/src/lib/utils.test.d.ts.map +0 -1
- package/types/src/lib/uuid.d.ts +0 -7
- package/types/src/lib/uuid.d.ts.map +0 -1
- package/types/src/lib/uuid.test.d.ts +0 -2
- package/types/src/lib/uuid.test.d.ts.map +0 -1
- package/types/src/middleware/build-get-journey.d.ts +0 -6
- package/types/src/middleware/build-get-journey.d.ts.map +0 -1
- package/types/src/middleware/redirect-to-unanswered-question.d.ts +0 -12
- package/types/src/middleware/redirect-to-unanswered-question.d.ts.map +0 -1
- package/types/src/middleware/redirect-to-unanswered-question.test.d.ts +0 -2
- package/types/src/middleware/redirect-to-unanswered-question.test.d.ts.map +0 -1
- package/types/src/questions/create-questions.d.ts +0 -21
- package/types/src/questions/create-questions.d.ts.map +0 -1
- package/types/src/questions/options-question.d.ts +0 -74
- package/types/src/questions/options-question.d.ts.map +0 -1
- package/types/src/questions/options-question.test.d.ts +0 -2
- package/types/src/questions/options-question.test.d.ts.map +0 -1
- package/types/src/questions/question-props.d.ts +0 -182
- package/types/src/questions/question-props.d.ts.map +0 -1
- package/types/src/questions/question-types.d.ts +0 -80
- package/types/src/questions/question-types.d.ts.map +0 -1
- package/types/src/questions/question.d.ts +0 -278
- package/types/src/questions/question.d.ts.map +0 -1
- package/types/src/questions/question.test.d.ts +0 -2
- package/types/src/questions/question.test.d.ts.map +0 -1
- package/types/src/questions/questions.d.ts +0 -3
- package/types/src/questions/questions.d.ts.map +0 -1
- package/types/src/section.d.ts +0 -107
- package/types/src/section.d.ts.map +0 -1
- package/types/src/section.test.d.ts +0 -2
- package/types/src/section.test.d.ts.map +0 -1
- package/types/src/validator/address-validator.d.ts +0 -48
- package/types/src/validator/address-validator.d.ts.map +0 -1
- package/types/src/validator/address-validator.test.d.ts +0 -2
- package/types/src/validator/address-validator.test.d.ts.map +0 -1
- package/types/src/validator/base-validator.d.ts +0 -12
- package/types/src/validator/base-validator.d.ts.map +0 -1
- package/types/src/validator/base-validator.test.d.ts +0 -2
- package/types/src/validator/base-validator.test.d.ts.map +0 -1
- package/types/src/validator/conditional-required-validator.d.ts +0 -25
- package/types/src/validator/conditional-required-validator.d.ts.map +0 -1
- package/types/src/validator/conditional-required-validator.test.d.ts +0 -2
- package/types/src/validator/conditional-required-validator.test.d.ts.map +0 -1
- package/types/src/validator/confirmation-checkbox-validator.d.ts +0 -28
- package/types/src/validator/confirmation-checkbox-validator.d.ts.map +0 -1
- package/types/src/validator/confirmation-checkbox-validator.test.d.ts +0 -2
- package/types/src/validator/confirmation-checkbox-validator.test.d.ts.map +0 -1
- package/types/src/validator/coordinates-validator.d.ts +0 -23
- package/types/src/validator/coordinates-validator.d.ts.map +0 -1
- package/types/src/validator/coordinates-validator.test.d.ts +0 -2
- package/types/src/validator/coordinates-validator.test.d.ts.map +0 -1
- package/types/src/validator/date-period-validator.d.ts +0 -64
- package/types/src/validator/date-period-validator.d.ts.map +0 -1
- package/types/src/validator/date-period-validator.test.d.ts +0 -2
- package/types/src/validator/date-period-validator.test.d.ts.map +0 -1
- package/types/src/validator/date-time-validator.d.ts +0 -27
- package/types/src/validator/date-time-validator.d.ts.map +0 -1
- package/types/src/validator/date-time-validator.test.d.ts +0 -2
- package/types/src/validator/date-time-validator.test.d.ts.map +0 -1
- package/types/src/validator/date-validator.d.ts +0 -49
- package/types/src/validator/date-validator.d.ts.map +0 -1
- package/types/src/validator/date-validator.test.d.ts +0 -2
- package/types/src/validator/date-validator.test.d.ts.map +0 -1
- package/types/src/validator/document-upload-validator.d.ts +0 -12
- package/types/src/validator/document-upload-validator.d.ts.map +0 -1
- package/types/src/validator/document-upload-validator.test.d.ts +0 -2
- package/types/src/validator/document-upload-validator.test.d.ts.map +0 -1
- package/types/src/validator/email-validator.d.ts +0 -74
- package/types/src/validator/email-validator.d.ts.map +0 -1
- package/types/src/validator/email-validator.test.d.ts +0 -2
- package/types/src/validator/email-validator.test.d.ts.map +0 -1
- package/types/src/validator/multi-field-input-validator.d.ts +0 -91
- package/types/src/validator/multi-field-input-validator.d.ts.map +0 -1
- package/types/src/validator/multi-field-input-validator.test.d.ts +0 -2
- package/types/src/validator/multi-field-input-validator.test.d.ts.map +0 -1
- package/types/src/validator/numeric-validator.d.ts +0 -50
- package/types/src/validator/numeric-validator.d.ts.map +0 -1
- package/types/src/validator/numeric-validator.test.d.ts +0 -2
- package/types/src/validator/numeric-validator.test.d.ts.map +0 -1
- package/types/src/validator/required-validator.d.ts +0 -23
- package/types/src/validator/required-validator.d.ts.map +0 -1
- package/types/src/validator/required-validator.test.d.ts +0 -2
- package/types/src/validator/required-validator.test.d.ts.map +0 -1
- package/types/src/validator/same-answer-validator.d.ts +0 -19
- package/types/src/validator/same-answer-validator.d.ts.map +0 -1
- package/types/src/validator/same-answer-validator.test.d.ts +0 -2
- package/types/src/validator/same-answer-validator.test.d.ts.map +0 -1
- package/types/src/validator/string-validator.d.ts +0 -59
- package/types/src/validator/string-validator.d.ts.map +0 -1
- package/types/src/validator/string-validator.test.d.ts +0 -2
- package/types/src/validator/string-validator.test.d.ts.map +0 -1
- package/types/src/validator/unit-option-entry-validator.d.ts +0 -41
- package/types/src/validator/unit-option-entry-validator.d.ts.map +0 -1
- package/types/src/validator/unit-option-entry-validator.test.d.ts +0 -2
- package/types/src/validator/unit-option-entry-validator.test.d.ts.map +0 -1
- package/types/src/validator/valid-option-validator.d.ts +0 -23
- package/types/src/validator/valid-option-validator.d.ts.map +0 -1
- package/types/src/validator/valid-option-validator.test.d.ts +0 -2
- package/types/src/validator/valid-option-validator.test.d.ts.map +0 -1
- package/types/src/validator/validation-error-handler.d.ts +0 -20
- package/types/src/validator/validation-error-handler.d.ts.map +0 -1
- package/types/src/validator/validation-error-handler.test.d.ts +0 -2
- package/types/src/validator/validation-error-handler.test.d.ts.map +0 -1
- package/types/src/validator/validator.d.ts +0 -5
- package/types/src/validator/validator.d.ts.map +0 -1
- package/types/src/validator/validator.test.d.ts +0 -2
- package/types/src/validator/validator.test.d.ts.map +0 -1
- package/types/test/mock/journey.d.ts +0 -3
- package/types/test/mock/journey.d.ts.map +0 -1
- package/types/test/mock/uuid.d.ts +0 -7
- package/types/test/mock/uuid.d.ts.map +0 -1
- package/types/test/utils/nunjucks.d.ts +0 -2
- package/types/test/utils/nunjucks.d.ts.map +0 -1
- package/types/test/utils/utils.d.ts +0 -32
- package/types/test/utils/utils.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/question.js"],"names":[],"mappings":"AAEA;IACC;;;;;;;;;;;;;;;;;;OAkBG;IACH,qKAjBG;QAAuB,KAAK,EAApB,MAAM;QACS,QAAQ,EAAvB,MAAM;QACS,SAAS,EAAxB,MAAM;QACU,UAAU;QACV,GAAG;QACH,IAAI;QACJ,SAAS;QACT,WAAW;QACX,KAAK;QACL,IAAI;QACJ,MAAM;QAC+C,OAAO,EAA5E,KAAK,CAAE,OAAO,qCAAqC,EAAE,MAAM,CAAC;QACH,UAAU;QAClD,QAAQ;QACI,QAAQ;;;QACS,UAAU;KAAC,EAuCnE;IAFA,0BAAkB;IAClB,2BAAoB;IAWrB;;;;;;OAMG;IACH,wDAJW,OAAO,UADP,MAAM,GAGJ,KAAK,CAAE,MAAM,CAAC,CAgB1B;CACD;;4BA3F2B,qCAAqC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/question.test.js"],"names":[],"mappings":""}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export class SelectQuestion extends OptionsQuestion {
|
|
2
|
-
/**
|
|
3
|
-
* @param {Object} params
|
|
4
|
-
* @param {string} params.title
|
|
5
|
-
* @param {string} params.question
|
|
6
|
-
* @param {string} params.fieldName
|
|
7
|
-
* @param {string} [params.viewFolder]
|
|
8
|
-
* @param {string} [params.url]
|
|
9
|
-
* @param {string} [params.hint]
|
|
10
|
-
* @param {string} [params.pageTitle]
|
|
11
|
-
* @param {string} [params.description]
|
|
12
|
-
* @param {string} [params.label]
|
|
13
|
-
* @param {string} [params.html]
|
|
14
|
-
* @param {string} [params.legend] - optional legend, used instead of h1
|
|
15
|
-
* @param {string} [params.disableAccessibleAutocomplete]
|
|
16
|
-
* @param {Array.<import('../../questions/options-question.js').Option>} params.options
|
|
17
|
-
* @param {Object<string, any>} [params.viewData]
|
|
18
|
-
* @param {Array.<import('#base-validator').BaseValidator>} [params.validators]
|
|
19
|
-
*/
|
|
20
|
-
constructor({ title, question, fieldName, viewFolder, url, hint, pageTitle, description, label, html, legend, disableAccessibleAutocomplete, options, validators, viewData }: {
|
|
21
|
-
title: string;
|
|
22
|
-
question: string;
|
|
23
|
-
fieldName: string;
|
|
24
|
-
viewFolder?: string | undefined;
|
|
25
|
-
url?: string | undefined;
|
|
26
|
-
hint?: string | undefined;
|
|
27
|
-
pageTitle?: string | undefined;
|
|
28
|
-
description?: string | undefined;
|
|
29
|
-
label?: string | undefined;
|
|
30
|
-
html?: string | undefined;
|
|
31
|
-
legend?: string | undefined;
|
|
32
|
-
disableAccessibleAutocomplete?: string | undefined;
|
|
33
|
-
options: Array<import("../../questions/options-question.js").Option>;
|
|
34
|
-
viewData?: {
|
|
35
|
-
[x: string]: any;
|
|
36
|
-
} | undefined;
|
|
37
|
-
validators?: import("#base-validator").BaseValidator[] | undefined;
|
|
38
|
-
});
|
|
39
|
-
label: string | undefined;
|
|
40
|
-
legend: string | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* returns the formatted answers values to be used to build task list elements
|
|
43
|
-
* note: only supports a single answer
|
|
44
|
-
*
|
|
45
|
-
* @param {Object} answer
|
|
46
|
-
* @param {Journey} journey
|
|
47
|
-
* @param {String} sectionSegment
|
|
48
|
-
* @returns {Array.<Object>}
|
|
49
|
-
*/
|
|
50
|
-
formatAnswerForSummary(sectionSegment: string, journey: Journey, answer: Object): Array<Object>;
|
|
51
|
-
#private;
|
|
52
|
-
}
|
|
53
|
-
export default SelectQuestion;
|
|
54
|
-
import OptionsQuestion from '../../questions/options-question.js';
|
|
55
|
-
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/components/select/question.js"],"names":[],"mappings":"AAEA;IAEC;;;;;;;;;;;;;;;;;OAiBG;IACH,8KAhBG;QAAuB,KAAK,EAApB,MAAM;QACS,QAAQ,EAAvB,MAAM;QACS,SAAS,EAAxB,MAAM;QACU,UAAU;QACV,GAAG;QACH,IAAI;QACJ,SAAS;QACT,WAAW;QACX,KAAK;QACL,IAAI;QACJ,MAAM;QACN,6BAA6B;QACwB,OAAO,EAA5E,KAAK,CAAE,OAAO,qCAAqC,EAAE,MAAM,CAAC;QAC/B,QAAQ;;;QACoB,UAAU;KAAC,EAqC9E;IAHA,0BAAkB;IAClB,2BAAoB;IAarB;;;;;;;;OAQG;IACH,wDAJW,OAAO,UADP,MAAM,GAGJ,KAAK,CAAE,MAAM,CAAC,CAS1B;;CACD;;4BArF2B,qCAAqC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../../src/components/select/question.test.js"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @class
|
|
3
|
-
*/
|
|
4
|
-
export class SingleLineInputQuestion extends Question {
|
|
5
|
-
/**
|
|
6
|
-
* @param {import('#question-types').QuestionParameters} params
|
|
7
|
-
* @param {string|undefined} [params.label] if defined this show as a label for the input and the question will just be a standard h1
|
|
8
|
-
* @param {Record<string, string>} [params.inputAttributes] html attributes to add to the input
|
|
9
|
-
* @param {string} [params.classes] html classes to add to the input
|
|
10
|
-
*/
|
|
11
|
-
constructor(params: import("#question-types").QuestionParameters);
|
|
12
|
-
/** @type {Record<string, string>} */
|
|
13
|
-
inputAttributes: Record<string, string>;
|
|
14
|
-
label: any;
|
|
15
|
-
classes: any;
|
|
16
|
-
}
|
|
17
|
-
export default SingleLineInputQuestion;
|
|
18
|
-
import { Question } from '#question';
|
|
19
|
-
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/components/single-line-input/question.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IAIC;;;;;OAKG;IACH,oBALW,OAAO,iBAAiB,EAAE,kBAAkB,EActD;IAlBD,qCAAqC;IACrC,iBADW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACjB;IAcf,WAAyB;IAEzB,aAAmC;CAepC;;yBAtCwB,WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../../src/components/single-line-input/question.test.js"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @import {QuestionViewModel} from '#question'
|
|
3
|
-
* @import {Journey} from '#journey'
|
|
4
|
-
* @import {JourneyResponse} from '#journey-response'
|
|
5
|
-
* @import {Section} from '#section'
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @typedef {Object} TextEntryCheckbox
|
|
9
|
-
* @property {string} header
|
|
10
|
-
* @property {string} text
|
|
11
|
-
* @property {string} name
|
|
12
|
-
* @property {string} [errorMessage]
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* @class
|
|
16
|
-
*/
|
|
17
|
-
export class TextEntryQuestion extends Question {
|
|
18
|
-
/**
|
|
19
|
-
* @param {import('#question-types').QuestionParameters} params
|
|
20
|
-
* @param {TextEntryCheckbox} [params.textEntryCheckbox]
|
|
21
|
-
* @param {string|undefined} [params.label] if defined this show as a label for the input and the question will just be a standard h1
|
|
22
|
-
*/
|
|
23
|
-
constructor({ textEntryCheckbox, label, ...params }: import("#question-types").QuestionParameters);
|
|
24
|
-
textEntryCheckbox: any;
|
|
25
|
-
label: any;
|
|
26
|
-
}
|
|
27
|
-
export default TextEntryQuestion;
|
|
28
|
-
export type TextEntryCheckbox = {
|
|
29
|
-
header: string;
|
|
30
|
-
text: string;
|
|
31
|
-
name: string;
|
|
32
|
-
errorMessage?: string | undefined;
|
|
33
|
-
};
|
|
34
|
-
import { Question } from '#question';
|
|
35
|
-
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/components/text-entry/question.js"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;GAEG;AACH;IACC;;;;OAIG;IACH,qDAJW,OAAO,iBAAiB,EAAE,kBAAkB,EAYtD;IAFA,uBAA0C;IAC1C,WAAkB;CAUnB;;;YAhCa,MAAM;UACN,MAAM;UACN,MAAM;;;yBAZK,WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../../src/components/text-entry/question.test.js"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export const REDACT_CHARACTER: "\u2588";
|
|
2
|
-
export const TRUNCATED_MAX_LENGTH: 500;
|
|
3
|
-
/**
|
|
4
|
-
* @class
|
|
5
|
-
*/
|
|
6
|
-
export class TextEntryRedactQuestion extends Question {
|
|
7
|
-
/**
|
|
8
|
-
* @param {import('#question-types').QuestionParameters} params
|
|
9
|
-
* @param {import('../text-entry/question.js').TextEntryCheckbox} [params.textEntryCheckbox]
|
|
10
|
-
* @param {string|undefined} [params.label] if defined this show as a label for the input and the question will just be a standard h1
|
|
11
|
-
* @param {boolean} [params.onlyShowRedactedValueForSummary] whether to only show redacted value for summary
|
|
12
|
-
* @param {boolean} [params.useRedactedFieldNameForSave] whether to use the redacted field name when saving answers
|
|
13
|
-
* @param {boolean} [params.showSuggestionsUi] use the suggestions UI for this question
|
|
14
|
-
* @param {string} [params.summaryText] summaryText to use with the details component
|
|
15
|
-
* @param {boolean} [params.shouldTruncateSummary] determines whether redacted comment is truncated in summary view
|
|
16
|
-
*/
|
|
17
|
-
constructor({ textEntryCheckbox, label, onlyShowRedactedValueForSummary, useRedactedFieldNameForSave, showSuggestionsUi, summaryText, shouldTruncateSummary, ...params }: import("#question-types").QuestionParameters);
|
|
18
|
-
textEntryCheckbox: any;
|
|
19
|
-
label: any;
|
|
20
|
-
onlyShowRedactedValueForSummary: any;
|
|
21
|
-
useRedactedFieldNameForSave: any;
|
|
22
|
-
showSuggestionsUi: any;
|
|
23
|
-
summaryText: any;
|
|
24
|
-
shouldTruncateSummary: any;
|
|
25
|
-
prepQuestionForRendering(section: any, journey: any, customViewData: any, payload: any, options: any): import("#question").QuestionViewModel;
|
|
26
|
-
answerForViewModel(answers: any): string;
|
|
27
|
-
formatAnswerForSummary(sectionSegment: any, journey: any, answer: any, capitals?: boolean): {
|
|
28
|
-
key: string;
|
|
29
|
-
value: string | Object;
|
|
30
|
-
action?: import("../../controller.js").ActionView | import("../../controller.js").ActionView[];
|
|
31
|
-
}[];
|
|
32
|
-
}
|
|
33
|
-
export default TextEntryRedactQuestion;
|
|
34
|
-
import { Question } from '#question';
|
|
35
|
-
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/components/text-entry-redact/question.js"],"names":[],"mappings":"AAGA,+BAAgC,QAAG,CAAC;AACpC,mCAAoC,GAAG,CAAC;AAExC;;GAEG;AACH;IACC;;;;;;;;;OASG;IACH,0KATW,OAAO,iBAAiB,EAAE,kBAAkB,EA+BtD;IAPA,uBAA0C;IAC1C,WAAkB;IAClB,qCAAsE;IACtE,iCAA8D;IAC9D,uBAA0C;IAC1C,iBAA8B;IAC9B,2BAAkD;IAkBnD,6IAOC;IAED,yCAEC;IAYD;;;;QAuBC;CACD;;yBA1GwB,WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../../src/components/text-entry-redact/question.test.js"],"names":[],"mappings":""}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UnitOptions are the options displayed in the radio format - in this case the value
|
|
3
|
-
* represents the unit.
|
|
4
|
-
* Conditionals must be used to capture the relevant quantity.
|
|
5
|
-
* Each conditional must have a fieldName which uses the conditionalFieldName from the
|
|
6
|
-
* UnitOptionEntryQuestion object as a base, followed by an underscore and unit reference
|
|
7
|
-
* eg 'siteAreaSquareMetres_hectares' - this is required for validation and saving to the DB
|
|
8
|
-
* @typedef {{
|
|
9
|
-
* text: string;
|
|
10
|
-
* value: string;
|
|
11
|
-
* hint?: object;
|
|
12
|
-
* checked?: boolean | undefined;
|
|
13
|
-
* attributes?: Record<string, string>;
|
|
14
|
-
* behaviour?: 'exclusive';
|
|
15
|
-
* conditional: {
|
|
16
|
-
* fieldName: string;
|
|
17
|
-
* suffix: string;
|
|
18
|
-
* value?: unknown;
|
|
19
|
-
* label?: string;
|
|
20
|
-
* hint?: string;
|
|
21
|
-
* conversionFactor?: number;
|
|
22
|
-
* }
|
|
23
|
-
*}} UnitOption
|
|
24
|
-
*/
|
|
25
|
-
export class UnitOptionEntryQuestion extends Question {
|
|
26
|
-
/** @type {Array<UnitOption>} */
|
|
27
|
-
options: Array<UnitOption>;
|
|
28
|
-
conditionalFieldName: any;
|
|
29
|
-
label: any;
|
|
30
|
-
optionJoinString: string;
|
|
31
|
-
/**
|
|
32
|
-
* gets the view model for this question
|
|
33
|
-
* @param {import('../../section').Section} section - the current section
|
|
34
|
-
* @param {import('#journey').Journey} journey - the journey we are in
|
|
35
|
-
* @param {Record<string, unknown>} [customViewData] additional data to send to view
|
|
36
|
-
* @param {Record<string, unknown>} [payload]
|
|
37
|
-
* @param {import('#question-types').PrepQuestionForRenderingOptions} options
|
|
38
|
-
* @returns {import('#question').QuestionViewModel & {
|
|
39
|
-
* question: import('#question').QuestionViewModel['question'] & {
|
|
40
|
-
* options:UnitOption[]
|
|
41
|
-
* }
|
|
42
|
-
* }}
|
|
43
|
-
*/
|
|
44
|
-
prepQuestionForRendering(section: any, journey: import("#journey").Journey, customViewData?: Record<string, unknown>, payload?: Record<string, unknown>, options: import("#question-types").PrepQuestionForRenderingOptions): import("#question").QuestionViewModel & {
|
|
45
|
-
question: import("#question").QuestionViewModel["question"] & {
|
|
46
|
-
options: UnitOption[];
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Get the data to save from the request, returns an object of answers
|
|
51
|
-
* @param {import('express').Request} req
|
|
52
|
-
* @param {JourneyResponse} journeyResponse - current journey response, modified with the new answers
|
|
53
|
-
* @returns {Promise<{ answers: Record<string, unknown> }>}
|
|
54
|
-
*/ getDataToSave(req: import("express").Request, journeyResponse: JourneyResponse): Promise<{
|
|
55
|
-
answers: Record<string, unknown>;
|
|
56
|
-
}>;
|
|
57
|
-
}
|
|
58
|
-
export default UnitOptionEntryQuestion;
|
|
59
|
-
/**
|
|
60
|
-
* UnitOptions are the options displayed in the radio format - in this case the value
|
|
61
|
-
* represents the unit.
|
|
62
|
-
* Conditionals must be used to capture the relevant quantity.
|
|
63
|
-
* Each conditional must have a fieldName which uses the conditionalFieldName from the
|
|
64
|
-
* UnitOptionEntryQuestion object as a base, followed by an underscore and unit reference
|
|
65
|
-
* eg 'siteAreaSquareMetres_hectares' - this is required for validation and saving to the DB
|
|
66
|
-
*/
|
|
67
|
-
export type UnitOption = {
|
|
68
|
-
text: string;
|
|
69
|
-
value: string;
|
|
70
|
-
hint?: object;
|
|
71
|
-
checked?: boolean | undefined;
|
|
72
|
-
attributes?: Record<string, string>;
|
|
73
|
-
behaviour?: "exclusive";
|
|
74
|
-
conditional: {
|
|
75
|
-
fieldName: string;
|
|
76
|
-
suffix: string;
|
|
77
|
-
value?: unknown;
|
|
78
|
-
label?: string;
|
|
79
|
-
hint?: string;
|
|
80
|
-
conversionFactor?: number;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
import { Question } from '../../questions/question.js';
|
|
84
|
-
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/components/unit-option-entry/question.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;IACC,gCAAgC;IAChC,SADW,KAAK,CAAC,UAAU,CAAC,CACpB;IAqBP,0BAAgD;IAEhD,WAAkB;IAClB,yBAA+C;IAGhD;;;;;;;;;;;;OAYG;IACH,gDAVW,OAAO,UAAU,EAAE,OAAO,mBAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WACvB,OAAO,iBAAiB,EAAE,+BAA+B,GACvD,OAAO,WAAW,EAAE,iBAAiB,GAAG;QAChD,QAAQ,EAAE,OAAO,WAAW,EAAE,iBAAiB,CAAC,UAAU,CAAC,GAAG;YAC5D,OAAO,EAAC,UAAU,EAAE,CAAA;SACrB,CAAA;KACF,CAmDH;IAED;;;;;OAKG,CACH,mBAJW,OAAO,SAAS,EAAE,OAAO,mBACzB,eAAe,GACb,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAgCzD;CAoBD;;;;;;;;;;yBAvKY;IACR,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAA;CACH;yBA5BsB,6BAA6B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../../src/components/unit-option-entry/question.test.js"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const COMPONENT_TYPES: Readonly<{
|
|
2
|
-
ADDRESS: "site-address";
|
|
3
|
-
BOOLEAN: "boolean";
|
|
4
|
-
CHECKBOX: "checkbox";
|
|
5
|
-
DATE: "date";
|
|
6
|
-
DATE_PERIOD: "date-period";
|
|
7
|
-
DATE_TIME: "date-time";
|
|
8
|
-
EMAIL: "email";
|
|
9
|
-
MANAGE_LIST: "manage-list";
|
|
10
|
-
MULTI_FIELD_INPUT: "multi-field-input";
|
|
11
|
-
NUMBER: "number";
|
|
12
|
-
RADIO: "radio";
|
|
13
|
-
SELECT: "select";
|
|
14
|
-
SINGLE_LINE_INPUT: "single-line-input";
|
|
15
|
-
TEXT_ENTRY: "text-entry";
|
|
16
|
-
TEXT_ENTRY_REDACT: "text-entry-redact";
|
|
17
|
-
UNIT_OPTION: "unit-option";
|
|
18
|
-
}>;
|
|
19
|
-
//# sourceMappingURL=component-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/component-types.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persisted-number-answer.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/persisted-number-answer.js"],"names":[],"mappings":"AAGO,iDAFI,MAAM,mBAYhB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export function logicalCombinations(response: import("#src/journey/journey-response.js").JourneyResponse): {
|
|
2
|
-
and: CombinationFunc;
|
|
3
|
-
or: CombinationFunc;
|
|
4
|
-
};
|
|
5
|
-
export function whenQuestionHasAnswer(question: import("#question").Question, expectedValue: unknown): import("#src/section.js").QuestionCondition;
|
|
6
|
-
export function questionHasAnswer(response: import("#src/journey/journey-response.js").JourneyResponse, question: import("#question").Question | {
|
|
7
|
-
optionJoinString: string;
|
|
8
|
-
}, expectedValue: unknown): boolean;
|
|
9
|
-
export function questionArrayMeetsCondition(response: JourneyResponse, question: any, conditionFn?: (item: any) => boolean): boolean;
|
|
10
|
-
export function questionsHaveAnswers(response: import("#src/journey/journey-response.js").JourneyResponse, questionKeyTuples: QuestionKeyTuples, { logicalCombinator }?: {
|
|
11
|
-
logicalCombinator: "and" | "or";
|
|
12
|
-
}): boolean;
|
|
13
|
-
export function questionHasNonEmptyStringAnswer(response: import("#src/journey/journey-response.js").JourneyResponse, question: import("#question").Question): boolean;
|
|
14
|
-
export function questionHasNonEmptyNumberAnswer(response: import("#src/journey/journey-response.js").JourneyResponse, question: import("#question").Question): boolean;
|
|
15
|
-
export type QuestionKeyTuples = [any, unknown][];
|
|
16
|
-
export type CombinationFunc = (questionKeyTuples: QuestionKeyTuples) => boolean;
|
|
17
|
-
//# sourceMappingURL=question-has-answer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-has-answer.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/question-has-answer.js"],"names":[],"mappings":"AAOO,8CAHI,OAAO,kCAAkC,EAAE,eAAe,GACxD;IAAC,GAAG,EAAE,eAAe,CAAC;IAAC,EAAE,EAAE,eAAe,CAAA;CAAC,CAOtD;AAYK,gDAJI,OAAO,WAAW,EAAE,QAAQ,iBAC5B,OAAO,GACL,OAAO,iBAAiB,EAAE,iBAAiB,CAIvD;AAUM,4CALI,OAAO,kCAAkC,EAAE,eAAe,YAC1D,OAAO,WAAW,EAAE,QAAQ,GAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAC,iBACvD,OAAO,GACL,OAAO,CAgBnB;AAUM,sDALI,eAAe,YACf,GAAG,gBACH,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,GACpB,OAAO,CAWnB;AASM,+CANI,OAAO,kCAAkC,EAAE,eAAe,qBAC1D,iBAAiB,0BAEzB;IAA8B,iBAAiB,EAAvC,KAAK,GAAG,IAAI;CACpB,GAAU,OAAO,CAUnB;AAOM,0DAJI,OAAO,kCAAkC,EAAE,eAAe,YAC1D,OAAO,WAAW,EAAE,QAAQ,GAC1B,OAAO,CAMnB;AAOM,0DAJI,OAAO,kCAAkC,EAAE,eAAe,YAC1D,OAAO,WAAW,EAAE,QAAQ,GAC1B,OAAO,CAMnB;gCA5Ga,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE;8BAChB,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-has-answer.test.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/question-has-answer.test.js"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export function getConditionalFieldName(parentField: any, conditionalField: any): string;
|
|
2
|
-
export function getConditionalAnswer(answers: any, question: any, answer: any): any;
|
|
3
|
-
/**
|
|
4
|
-
* @param {unknown} conditional
|
|
5
|
-
* @returns {conditional is {html: string}}
|
|
6
|
-
*/
|
|
7
|
-
export function conditionalIsJustHTML(conditional: unknown): conditional is {
|
|
8
|
-
html: string;
|
|
9
|
-
};
|
|
10
|
-
declare namespace _default {
|
|
11
|
-
export { getConditionalAnswer };
|
|
12
|
-
export { getConditionalFieldName };
|
|
13
|
-
}
|
|
14
|
-
export default _default;
|
|
15
|
-
//# sourceMappingURL=question-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/question-utils.js"],"names":[],"mappings":"AAAA,yFAEC;AAED,oFAGC;AAED;;;GAGG;AACH,mDAHW,OAAO,GACL,WAAW,IAAI;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAIzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-utils.test.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/question-utils.test.js"],"names":[],"mappings":""}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {object} [viewData]
|
|
3
|
-
* @returns {import('express').Handler}
|
|
4
|
-
*/
|
|
5
|
-
export function buildList(viewData?: object): import("express").Handler;
|
|
6
|
-
/**
|
|
7
|
-
* @param {import('express').Request} req
|
|
8
|
-
* @param {import('express').Response} res
|
|
9
|
-
* @param {string} pageCaption
|
|
10
|
-
* @param {object} viewData
|
|
11
|
-
*/
|
|
12
|
-
export function list(req: import("express").Request, res: import("express").Response, pageCaption: string, viewData: object): Promise<void>;
|
|
13
|
-
export function question(req: import("express-serve-static-core").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: import("express-serve-static-core").Response<any, Record<string, any>, number>, next: import("express-serve-static-core").NextFunction): unknown;
|
|
14
|
-
/**
|
|
15
|
-
* @typedef {Object} SaveParams
|
|
16
|
-
* @property {import('express').Request} req
|
|
17
|
-
* @property {import('express').Response} res
|
|
18
|
-
* @property {string} journeyId
|
|
19
|
-
* @property {string} referenceId
|
|
20
|
-
* @property {boolean} isManageListItem
|
|
21
|
-
* @property {string} [manageListQuestionFieldName]
|
|
22
|
-
* @property {boolean} [manageListItemRemove]
|
|
23
|
-
* @property {Object<string, any>} data
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* @typedef {(params: SaveParams) => Promise<void>} SaveDataFn
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* @param {SaveDataFn} saveData
|
|
30
|
-
* @param {boolean} [redirectToTaskListOnSuccess] - optionally redirect to the task list after save instead of next question
|
|
31
|
-
* @returns {import('express').Handler}
|
|
32
|
-
*/
|
|
33
|
-
export function buildSave(saveData: SaveDataFn, redirectToTaskListOnSuccess?: boolean): import("express").Handler;
|
|
34
|
-
export type Journey = import("./journey/journey.js").Journey;
|
|
35
|
-
export type Question = import("./questions/question.js").Question;
|
|
36
|
-
export type Section = any;
|
|
37
|
-
export type SectionView = {
|
|
38
|
-
heading: string;
|
|
39
|
-
status: string;
|
|
40
|
-
list: {
|
|
41
|
-
rows: Array<RowView>;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export type RowView = {
|
|
45
|
-
key: {
|
|
46
|
-
text: string;
|
|
47
|
-
};
|
|
48
|
-
value: {
|
|
49
|
-
text: string;
|
|
50
|
-
} | {
|
|
51
|
-
html: string;
|
|
52
|
-
};
|
|
53
|
-
actions?: {
|
|
54
|
-
items: ActionView[];
|
|
55
|
-
} | undefined;
|
|
56
|
-
};
|
|
57
|
-
export type ActionView = {
|
|
58
|
-
href: string;
|
|
59
|
-
text: string;
|
|
60
|
-
visuallyHiddenText?: string | undefined;
|
|
61
|
-
};
|
|
62
|
-
export type SaveParams = {
|
|
63
|
-
req: import("express").Request;
|
|
64
|
-
res: import("express").Response;
|
|
65
|
-
journeyId: string;
|
|
66
|
-
referenceId: string;
|
|
67
|
-
isManageListItem: boolean;
|
|
68
|
-
manageListQuestionFieldName?: string | undefined;
|
|
69
|
-
manageListItemRemove?: boolean | undefined;
|
|
70
|
-
data: {
|
|
71
|
-
[x: string]: any;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export type SaveDataFn = (params: SaveParams) => Promise<void>;
|
|
75
|
-
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/controller.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,qCAHW,MAAM,GACJ,OAAO,SAAS,EAAE,OAAO,CAIrC;AAED;;;;;GAKG;AACH,0BALW,OAAO,SAAS,EAAE,OAAO,OACzB,OAAO,SAAS,EAAE,QAAQ,eAC1B,MAAM,YACN,MAAM,iBA8DhB;;AAmDD;;;;;;;;;;GAUG;AAEH;;GAEG;AAEH;;;;GAIG;AACH,oCAJW,UAAU,gCACV,OAAO,GACL,OAAO,SAAS,EAAE,OAAO,CAsFrC;sBApSY,OAAO,sBAAsB,EAAE,OAAO;uBACtC,OAAO,yBAAyB,EAAE,QAAQ;;;aAMzC,MAAM;YACN,MAAM;UAEjB;QAAiC,IAAI,EAA1B,KAAK,CAAE,OAAO,CAAC;KAC5B;;;SAIa;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;WAChB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;eAC1B,UAAU,EAAE;;;;UAKrB,MAAM;UACN,MAAM;;;;SAsKN,OAAO,SAAS,EAAE,OAAO;SACzB,OAAO,SAAS,EAAE,QAAQ;eAC1B,MAAM;iBACN,MAAM;sBACN,OAAO;;;;;;;yBAOR,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.test.d.ts","sourceRoot":"","sources":["../../src/controller.test.js"],"names":[],"mappings":""}
|
package/types/src/index.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export * from "./components/address/question.js";
|
|
2
|
-
export * from "./components/boolean/question.js";
|
|
3
|
-
export * from "./components/checkbox/question.js";
|
|
4
|
-
export * from "./components/date/question.js";
|
|
5
|
-
export * from "./components/date-period/question.js";
|
|
6
|
-
export * from "./components/date-time/question.js";
|
|
7
|
-
export * from "./components/email/question.js";
|
|
8
|
-
export * from "./components/manage-list/question.js";
|
|
9
|
-
export * from "./components/multi-field-input/question.js";
|
|
10
|
-
export * from "./components/number-entry/question.js";
|
|
11
|
-
export * from "./components/radio/question.js";
|
|
12
|
-
export * from "./components/select/question.js";
|
|
13
|
-
export * from "./components/single-line-input/question.js";
|
|
14
|
-
export * from "./components/text-entry/question.js";
|
|
15
|
-
export * from "./components/text-entry-redact/question.js";
|
|
16
|
-
export * from "./components/unit-option-entry/question.js";
|
|
17
|
-
export * from "./components/utils/persisted-number-answer.js";
|
|
18
|
-
export * from "./components/utils/question-has-answer.js";
|
|
19
|
-
export * from "./components/utils/question-utils.js";
|
|
20
|
-
export * from "./components/utils/component-types.js";
|
|
21
|
-
export * from "./controller.js";
|
|
22
|
-
export * from "./lib/address.js";
|
|
23
|
-
export * from "./lib/address-utils.js";
|
|
24
|
-
export * from "./lib/date-utils.js";
|
|
25
|
-
export * from "./lib/session-answer-store.js";
|
|
26
|
-
export * from "./lib/utils.js";
|
|
27
|
-
export * from "./middleware/build-get-journey.js";
|
|
28
|
-
export * from "./middleware/redirect-to-unanswered-question.js";
|
|
29
|
-
export * from "./questions/options-question.js";
|
|
30
|
-
export * from "./questions/question-props.js";
|
|
31
|
-
export * from "./questions/question-types.js";
|
|
32
|
-
export * from "./validator/address-validator.js";
|
|
33
|
-
export * from "./validator/base-validator.js";
|
|
34
|
-
export * from "./validator/conditional-required-validator.js";
|
|
35
|
-
export * from "./validator/confirmation-checkbox-validator.js";
|
|
36
|
-
export * from "./validator/coordinates-validator.js";
|
|
37
|
-
export * from "./validator/date-period-validator.js";
|
|
38
|
-
export * from "./validator/date-time-validator.js";
|
|
39
|
-
export * from "./validator/date-validator.js";
|
|
40
|
-
export * from "./validator/document-upload-validator.js";
|
|
41
|
-
export * from "./validator/email-validator.js";
|
|
42
|
-
export * from "./validator/multi-field-input-validator.js";
|
|
43
|
-
export * from "./validator/numeric-validator.js";
|
|
44
|
-
export * from "./validator/required-validator.js";
|
|
45
|
-
export * from "./validator/same-answer-validator.js";
|
|
46
|
-
export * from "./validator/string-validator.js";
|
|
47
|
-
export * from "./validator/unit-option-entry-validator.js";
|
|
48
|
-
export * from "./validator/valid-option-validator.js";
|
|
49
|
-
export * from "./validator/validation-error-handler.js";
|
|
50
|
-
export * from "./validator/validator.js";
|
|
51
|
-
export { Journey } from "./journey/journey.js";
|
|
52
|
-
export { JourneyResponse } from "./journey/journey-response.js";
|
|
53
|
-
export { Question } from "./questions/question.js";
|
|
54
|
-
export { createQuestions } from "./questions/create-questions.js";
|
|
55
|
-
export { questionClasses } from "./questions/questions.js";
|
|
56
|
-
export { Section } from "./section.js";
|
|
57
|
-
export { default as validate } from "./validator/validator.js";
|
|
58
|
-
//# sourceMappingURL=index.d.ts.map
|
package/types/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/index.test.js"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import('./journey-factory').JourneyType} JourneyType
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Defines a response to a journey, a set of Answers to the questions
|
|
6
|
-
* @class
|
|
7
|
-
*/
|
|
8
|
-
export class JourneyResponse {
|
|
9
|
-
/**
|
|
10
|
-
* creates an instance of a JourneyResponse
|
|
11
|
-
* @param {JourneyType} journeyId
|
|
12
|
-
* @param {string} referenceId
|
|
13
|
-
* @param {import('./journey-types.d.ts').JourneyAnswers | null} answers
|
|
14
|
-
* @param {string} [lpaCode]
|
|
15
|
-
*/
|
|
16
|
-
constructor(journeyId: JourneyType, referenceId: string, answers: import("./journey-types.d.ts").JourneyAnswers | null, lpaCode?: string);
|
|
17
|
-
/**
|
|
18
|
-
* @type {string} - reference id used in the url for the journey e.g. appeal id - provides a unique lookup for responses in combination with formId
|
|
19
|
-
*/
|
|
20
|
-
referenceId: string;
|
|
21
|
-
/**
|
|
22
|
-
* @type {JourneyType} - a reference to the journey type e.g. has-questionnaire - provides a unique lookup for responses in combination with referenceId
|
|
23
|
-
*/
|
|
24
|
-
journeyId: JourneyType;
|
|
25
|
-
/**
|
|
26
|
-
* @type {import('./journey-types.d.ts').JourneyAnswers} - answers to the journey
|
|
27
|
-
*/
|
|
28
|
-
answers: import("./journey-types.d.ts").JourneyAnswers;
|
|
29
|
-
LPACode: string | undefined;
|
|
30
|
-
}
|
|
31
|
-
export type JourneyType = any;
|
|
32
|
-
//# sourceMappingURL=journey-response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journey-response.d.ts","sourceRoot":"","sources":["../../../src/journey/journey-response.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH;IAgBC;;;;;;OAMG;IACH,uBALW,WAAW,eACX,MAAM,WACN,OAAO,sBAAsB,EAAE,cAAc,GAAG,IAAI,YACpD,MAAM,EAWhB;IA/BD;;OAEG;IACH,aAFU,MAAM,CAEJ;IAEZ;;OAEG;IACH,WAFU,WAAW,CAEX;IAEV;;OAEG;IACH,SAFU,OAAO,sBAAsB,EAAE,cAAc,CAE/C;IAiBP,4BAAsB;CAEvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journey-response.test.d.ts","sourceRoot":"","sources":["../../../src/journey/journey-response.test.js"],"names":[],"mappings":""}
|