@planning-inspectorate/dynamic-forms 3.10.11 → 3.10.12
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/package.json
CHANGED
|
@@ -99,7 +99,7 @@ export class Question {
|
|
|
99
99
|
_isInManageListSection = false;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* @param {import('
|
|
102
|
+
* @param {import('./question-types.js').QuestionParameters} params
|
|
103
103
|
* @param {Record<string, Function>} [methodOverrides]
|
|
104
104
|
*/
|
|
105
105
|
constructor(
|
|
@@ -214,7 +214,7 @@ export class Question {
|
|
|
214
214
|
* @param {import('../journey/journey.js').Journey} journey - the journey we are in
|
|
215
215
|
* @param {Record<string, unknown>} [customViewData] additional data to send to view
|
|
216
216
|
* @param {unknown} [payload]
|
|
217
|
-
* @param {import('
|
|
217
|
+
* @param {import('./question-types.js').PrepQuestionForRenderingOptions} [options] - required to support manage list question
|
|
218
218
|
* @returns {QuestionViewModel}
|
|
219
219
|
*/
|
|
220
220
|
prepQuestionForRendering(section, journey, customViewData, payload, options) {
|
|
@@ -282,7 +282,7 @@ export class Question {
|
|
|
282
282
|
* Get the answers object from the journey response, which may be nested in an array for manage list questions
|
|
283
283
|
*
|
|
284
284
|
* @param {import('../journey/journey-response.js').JourneyResponse} response
|
|
285
|
-
* @param {import('
|
|
285
|
+
* @param {import('./question-types.js').PrepQuestionForRenderingOptions} [options]
|
|
286
286
|
* @returns {Record<string, any>}
|
|
287
287
|
*/
|
|
288
288
|
answerObjectFromJourneyResponse(response, { params, manageListQuestion } = {}) {
|
package/src/section.js
CHANGED
|
@@ -83,8 +83,8 @@ export class Section {
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Fluent API method for adding questions
|
|
86
|
-
* @param {import('
|
|
87
|
-
* @param {import('
|
|
86
|
+
* @param {import('./questions/question.js').Question} question
|
|
87
|
+
* @param {import('./components/manage-list/manage-list-section.js').ManageListSection} [manageListSection]
|
|
88
88
|
* @returns {Section}
|
|
89
89
|
*/
|
|
90
90
|
addQuestion(question, manageListSection) {
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
*/
|
|
31
31
|
export class Question {
|
|
32
32
|
/**
|
|
33
|
-
* @param {import('
|
|
33
|
+
* @param {import('./question-types.js').QuestionParameters} params
|
|
34
34
|
* @param {Record<string, Function>} [methodOverrides]
|
|
35
35
|
*/
|
|
36
|
-
constructor({ title, question, viewFolder, fieldName, url, pageTitle, description, validators, html, hint, interfaceType, shouldDisplay, autocomplete, editable, actionLink, viewData }: import("
|
|
36
|
+
constructor({ title, question, viewFolder, fieldName, url, pageTitle, description, validators, html, hint, interfaceType, shouldDisplay, autocomplete, editable, actionLink, viewData }: import("./question-types.js").QuestionParameters, methodOverrides?: Record<string, Function>);
|
|
37
37
|
/** @type {string} - html page title, defaults to question if not provided */
|
|
38
38
|
pageTitle: string;
|
|
39
39
|
/** @type {string} - title used in the summary list */
|
|
@@ -141,10 +141,10 @@ export class Question {
|
|
|
141
141
|
* @param {import('../journey/journey.js').Journey} journey - the journey we are in
|
|
142
142
|
* @param {Record<string, unknown>} [customViewData] additional data to send to view
|
|
143
143
|
* @param {unknown} [payload]
|
|
144
|
-
* @param {import('
|
|
144
|
+
* @param {import('./question-types.js').PrepQuestionForRenderingOptions} [options] - required to support manage list question
|
|
145
145
|
* @returns {QuestionViewModel}
|
|
146
146
|
*/
|
|
147
|
-
prepQuestionForRendering(section: import("../section.js").Section, journey: import("../journey/journey.js").Journey, customViewData?: Record<string, unknown>, payload?: unknown, options?: import("
|
|
147
|
+
prepQuestionForRendering(section: import("../section.js").Section, journey: import("../journey/journey.js").Journey, customViewData?: Record<string, unknown>, payload?: unknown, options?: import("./question-types.js").PrepQuestionForRenderingOptions): QuestionViewModel;
|
|
148
148
|
/**
|
|
149
149
|
* The answer to this question for use in the viewModel
|
|
150
150
|
*
|
|
@@ -165,10 +165,10 @@ export class Question {
|
|
|
165
165
|
* Get the answers object from the journey response, which may be nested in an array for manage list questions
|
|
166
166
|
*
|
|
167
167
|
* @param {import('../journey/journey-response.js').JourneyResponse} response
|
|
168
|
-
* @param {import('
|
|
168
|
+
* @param {import('./question-types.js').PrepQuestionForRenderingOptions} [options]
|
|
169
169
|
* @returns {Record<string, any>}
|
|
170
170
|
*/
|
|
171
|
-
answerObjectFromJourneyResponse(response: import("../journey/journey-response.js").JourneyResponse, { params, manageListQuestion }?: import("
|
|
171
|
+
answerObjectFromJourneyResponse(response: import("../journey/journey-response.js").JourneyResponse, { params, manageListQuestion }?: import("./question-types.js").PrepQuestionForRenderingOptions): Record<string, any>;
|
|
172
172
|
/**
|
|
173
173
|
* renders the question
|
|
174
174
|
* @param {import('express').Response} res - the express response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/questions/question.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH;IA4DC;;;OAGG;IACH,yLAHW,OAAO,
|
|
1
|
+
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/questions/question.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH;IA4DC;;;OAGG;IACH,yLAHW,OAAO,qBAAqB,EAAE,kBAAkB,oBAChD,MAAM,CAAC,MAAM,WAAW,EAsDlC;IAnHD,6EAA6E;IAC7E,WADW,MAAM,CACP;IACV,sDAAsD;IACtD,OADW,MAAM,CACX;IACN,+DAA+D;IAC/D,UADW,MAAM,CACR;IACT,mFAAmF;IACnF,aADW,MAAM,GAAC,SAAS,CACf;IACZ,iDAAiD;IACjD,YADW,MAAM,CACN;IACX,qHAAqH;IACrH,WADW,MAAM,CACP;IACV,6FAA6F;IAC7F,UADW,OAAO,CACF;IAChB,iGAAiG;IACjG,YADW,KAAK,CAAE,aAAa,CAAC,CA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OAAO,UADvC,MAAM,GAGJ,UAAU,GAAC,UAAU,EAAE,GAAC,SAAS,CAqB7C;IAED;;;OAGG;IACH,eAHW,OAAO,GACL,OAAO,CAInB;IAED;;OAEG;IACH,cAFa,OAAO,CASnB;IACD;;;OAGG;IACH,4BAHW,MAAM,GACJ,OAAO,CAMnB;IAED;;;;OAIG;IACH,4BAJW,OAAO,gCAAgC,EAAE,eAAe,cACxD,MAAM,GACJ,OAAO,CAInB;CACD;;WAlda,MAAM;cACN,MAAM;eACN,MAAM;eACN,MAAM;;;;gCAMP,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;mCAhBA,iBAAiB;gCAEpB,qBAAqB;gCADrB,kBAAkB"}
|
package/types/src/section.d.ts
CHANGED
|
@@ -43,11 +43,11 @@ export class Section {
|
|
|
43
43
|
withSectionCondition(shouldIncludeSection: QuestionCondition): Section;
|
|
44
44
|
/**
|
|
45
45
|
* Fluent API method for adding questions
|
|
46
|
-
* @param {import('
|
|
47
|
-
* @param {import('
|
|
46
|
+
* @param {import('./questions/question.js').Question} question
|
|
47
|
+
* @param {import('./components/manage-list/manage-list-section.js').ManageListSection} [manageListSection]
|
|
48
48
|
* @returns {Section}
|
|
49
49
|
*/
|
|
50
|
-
addQuestion(question: import("
|
|
50
|
+
addQuestion(question: import("./questions/question.js").Question, manageListSection?: import("./components/manage-list/manage-list-section.js").ManageListSection): Section;
|
|
51
51
|
/**
|
|
52
52
|
* Fluent API method for attaching conditions to the previously added question
|
|
53
53
|
* @param {QuestionCondition} shouldIncludeQuestion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/section.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH,6BAFU,MAAM,CAEuC;AAEvD;;;GAGG;AACH;IAgNC;;;;;OAKG;IACH,8FAHW,OAAO,sBAAsB,EAAE,2BAA2B,GACxD,QAAQ,GAAC,MAAM,GAAC,IAAI,CAoBhC;IAvMD;;;;OAIG;I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