@planning-inspectorate/dynamic-forms 3.10.9 → 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.
Files changed (259) hide show
  1. package/move-types.js +6 -8
  2. package/package.json +1 -1
  3. package/src/components/boolean/question.js +1 -1
  4. package/src/components/manage-list/utils.js +4 -4
  5. package/src/components/radio/question.js +1 -1
  6. package/src/index.js +1 -0
  7. package/src/journey/journey-response.js +2 -2
  8. package/src/journey/journey-types.js +1 -0
  9. package/src/journey/journey.js +17 -23
  10. package/src/questions/create-questions.js +1 -1
  11. package/src/questions/options-question.js +7 -3
  12. package/src/questions/question-types.d.ts +6 -0
  13. package/src/questions/question.js +18 -21
  14. package/src/validator/valid-option-validator.js +1 -5
  15. package/tsconfig.json +1 -1
  16. package/types/commitlint.config.d.ts +0 -7
  17. package/types/commitlint.config.d.ts.map +0 -1
  18. package/types/eslint.config.d.ts +0 -95
  19. package/types/eslint.config.d.ts.map +0 -1
  20. package/types/move-types.d.ts +0 -2
  21. package/types/move-types.d.ts.map +0 -1
  22. package/types/src/components/address/question.d.ts +0 -36
  23. package/types/src/components/address/question.d.ts.map +0 -1
  24. package/types/src/components/address/question.test.d.ts +0 -2
  25. package/types/src/components/address/question.test.d.ts.map +0 -1
  26. package/types/src/components/boolean/question.d.ts +0 -50
  27. package/types/src/components/boolean/question.d.ts.map +0 -1
  28. package/types/src/components/boolean/question.test.d.ts +0 -2
  29. package/types/src/components/boolean/question.test.d.ts.map +0 -1
  30. package/types/src/components/checkbox/question.d.ts +0 -52
  31. package/types/src/components/checkbox/question.d.ts.map +0 -1
  32. package/types/src/components/checkbox/question.test.d.ts +0 -2
  33. package/types/src/components/checkbox/question.test.d.ts.map +0 -1
  34. package/types/src/components/date/question.d.ts +0 -23
  35. package/types/src/components/date/question.d.ts.map +0 -1
  36. package/types/src/components/date/question.test.d.ts +0 -2
  37. package/types/src/components/date/question.test.d.ts.map +0 -1
  38. package/types/src/components/date-period/question.d.ts +0 -35
  39. package/types/src/components/date-period/question.d.ts.map +0 -1
  40. package/types/src/components/date-period/question.test.d.ts +0 -2
  41. package/types/src/components/date-period/question.test.d.ts.map +0 -1
  42. package/types/src/components/date-time/question.d.ts +0 -25
  43. package/types/src/components/date-time/question.d.ts.map +0 -1
  44. package/types/src/components/date-time/question.test.d.ts +0 -2
  45. package/types/src/components/date-time/question.test.d.ts.map +0 -1
  46. package/types/src/components/email/question.d.ts +0 -31
  47. package/types/src/components/email/question.d.ts.map +0 -1
  48. package/types/src/components/email/question.test.d.ts +0 -2
  49. package/types/src/components/email/question.test.d.ts.map +0 -1
  50. package/types/src/components/identifier/question.d.ts +0 -16
  51. package/types/src/components/identifier/question.d.ts.map +0 -1
  52. package/types/src/components/identifier/question.test.d.ts +0 -2
  53. package/types/src/components/identifier/question.test.d.ts.map +0 -1
  54. package/types/src/components/manage-list/manage-list-actions.d.ts +0 -10
  55. package/types/src/components/manage-list/manage-list-actions.d.ts.map +0 -1
  56. package/types/src/components/manage-list/manage-list-section.d.ts +0 -16
  57. package/types/src/components/manage-list/manage-list-section.d.ts.map +0 -1
  58. package/types/src/components/manage-list/manage-list-section.test.d.ts +0 -2
  59. package/types/src/components/manage-list/manage-list-section.test.d.ts.map +0 -1
  60. package/types/src/components/manage-list/question.d.ts +0 -49
  61. package/types/src/components/manage-list/question.d.ts.map +0 -1
  62. package/types/src/components/manage-list/question.test.d.ts +0 -2
  63. package/types/src/components/manage-list/question.test.d.ts.map +0 -1
  64. package/types/src/components/manage-list/utils.d.ts +0 -18
  65. package/types/src/components/manage-list/utils.d.ts.map +0 -1
  66. package/types/src/components/manage-list/utils.test.d.ts +0 -2
  67. package/types/src/components/manage-list/utils.test.d.ts.map +0 -1
  68. package/types/src/components/multi-field-input/question.d.ts +0 -61
  69. package/types/src/components/multi-field-input/question.d.ts.map +0 -1
  70. package/types/src/components/multi-field-input/question.test.d.ts +0 -2
  71. package/types/src/components/multi-field-input/question.test.d.ts.map +0 -1
  72. package/types/src/components/number-entry/question.d.ts +0 -38
  73. package/types/src/components/number-entry/question.d.ts.map +0 -1
  74. package/types/src/components/radio/question.d.ts +0 -54
  75. package/types/src/components/radio/question.d.ts.map +0 -1
  76. package/types/src/components/radio/question.test.d.ts +0 -2
  77. package/types/src/components/radio/question.test.d.ts.map +0 -1
  78. package/types/src/components/select/question.d.ts +0 -55
  79. package/types/src/components/select/question.d.ts.map +0 -1
  80. package/types/src/components/select/question.test.d.ts +0 -2
  81. package/types/src/components/select/question.test.d.ts.map +0 -1
  82. package/types/src/components/single-line-input/question.d.ts +0 -19
  83. package/types/src/components/single-line-input/question.d.ts.map +0 -1
  84. package/types/src/components/single-line-input/question.test.d.ts +0 -2
  85. package/types/src/components/single-line-input/question.test.d.ts.map +0 -1
  86. package/types/src/components/text-entry/question.d.ts +0 -35
  87. package/types/src/components/text-entry/question.d.ts.map +0 -1
  88. package/types/src/components/text-entry/question.test.d.ts +0 -2
  89. package/types/src/components/text-entry/question.test.d.ts.map +0 -1
  90. package/types/src/components/text-entry-redact/question.d.ts +0 -35
  91. package/types/src/components/text-entry-redact/question.d.ts.map +0 -1
  92. package/types/src/components/text-entry-redact/question.test.d.ts +0 -2
  93. package/types/src/components/text-entry-redact/question.test.d.ts.map +0 -1
  94. package/types/src/components/unit-option-entry/question.d.ts +0 -84
  95. package/types/src/components/unit-option-entry/question.d.ts.map +0 -1
  96. package/types/src/components/unit-option-entry/question.test.d.ts +0 -2
  97. package/types/src/components/unit-option-entry/question.test.d.ts.map +0 -1
  98. package/types/src/components/utils/component-types.d.ts +0 -19
  99. package/types/src/components/utils/component-types.d.ts.map +0 -1
  100. package/types/src/components/utils/persisted-number-answer.d.ts +0 -2
  101. package/types/src/components/utils/persisted-number-answer.d.ts.map +0 -1
  102. package/types/src/components/utils/question-has-answer.d.ts +0 -17
  103. package/types/src/components/utils/question-has-answer.d.ts.map +0 -1
  104. package/types/src/components/utils/question-has-answer.test.d.ts +0 -2
  105. package/types/src/components/utils/question-has-answer.test.d.ts.map +0 -1
  106. package/types/src/components/utils/question-utils.d.ts +0 -15
  107. package/types/src/components/utils/question-utils.d.ts.map +0 -1
  108. package/types/src/components/utils/question-utils.test.d.ts +0 -2
  109. package/types/src/components/utils/question-utils.test.d.ts.map +0 -1
  110. package/types/src/controller.d.ts +0 -75
  111. package/types/src/controller.d.ts.map +0 -1
  112. package/types/src/controller.test.d.ts +0 -2
  113. package/types/src/controller.test.d.ts.map +0 -1
  114. package/types/src/index.d.ts +0 -58
  115. package/types/src/index.d.ts.map +0 -1
  116. package/types/src/index.test.d.ts +0 -2
  117. package/types/src/index.test.d.ts.map +0 -1
  118. package/types/src/journey/journey-response.d.ts +0 -32
  119. package/types/src/journey/journey-response.d.ts.map +0 -1
  120. package/types/src/journey/journey-response.test.d.ts +0 -2
  121. package/types/src/journey/journey-response.test.d.ts.map +0 -1
  122. package/types/src/journey/journey.d.ts +0 -144
  123. package/types/src/journey/journey.d.ts.map +0 -1
  124. package/types/src/journey/journey.test.d.ts +0 -2
  125. package/types/src/journey/journey.test.d.ts.map +0 -1
  126. package/types/src/lib/address-utils.d.ts +0 -6
  127. package/types/src/lib/address-utils.d.ts.map +0 -1
  128. package/types/src/lib/address-utils.test.d.ts +0 -2
  129. package/types/src/lib/address-utils.test.d.ts.map +0 -1
  130. package/types/src/lib/address.d.ts +0 -43
  131. package/types/src/lib/address.d.ts.map +0 -1
  132. package/types/src/lib/address.test.d.ts +0 -2
  133. package/types/src/lib/address.test.d.ts.map +0 -1
  134. package/types/src/lib/date-utils.d.ts +0 -60
  135. package/types/src/lib/date-utils.d.ts.map +0 -1
  136. package/types/src/lib/date-utils.test.d.ts +0 -2
  137. package/types/src/lib/date-utils.test.d.ts.map +0 -1
  138. package/types/src/lib/session-answer-store.d.ts +0 -88
  139. package/types/src/lib/session-answer-store.d.ts.map +0 -1
  140. package/types/src/lib/session-answer-store.test.d.ts +0 -2
  141. package/types/src/lib/session-answer-store.test.d.ts.map +0 -1
  142. package/types/src/lib/utils.d.ts +0 -26
  143. package/types/src/lib/utils.d.ts.map +0 -1
  144. package/types/src/lib/utils.test.d.ts +0 -2
  145. package/types/src/lib/utils.test.d.ts.map +0 -1
  146. package/types/src/lib/uuid.d.ts +0 -7
  147. package/types/src/lib/uuid.d.ts.map +0 -1
  148. package/types/src/lib/uuid.test.d.ts +0 -2
  149. package/types/src/lib/uuid.test.d.ts.map +0 -1
  150. package/types/src/middleware/build-get-journey.d.ts +0 -6
  151. package/types/src/middleware/build-get-journey.d.ts.map +0 -1
  152. package/types/src/middleware/redirect-to-unanswered-question.d.ts +0 -12
  153. package/types/src/middleware/redirect-to-unanswered-question.d.ts.map +0 -1
  154. package/types/src/middleware/redirect-to-unanswered-question.test.d.ts +0 -2
  155. package/types/src/middleware/redirect-to-unanswered-question.test.d.ts.map +0 -1
  156. package/types/src/questions/create-questions.d.ts +0 -21
  157. package/types/src/questions/create-questions.d.ts.map +0 -1
  158. package/types/src/questions/options-question.d.ts +0 -74
  159. package/types/src/questions/options-question.d.ts.map +0 -1
  160. package/types/src/questions/options-question.test.d.ts +0 -2
  161. package/types/src/questions/options-question.test.d.ts.map +0 -1
  162. package/types/src/questions/question-props.d.ts +0 -182
  163. package/types/src/questions/question-props.d.ts.map +0 -1
  164. package/types/src/questions/question-types.d.ts +0 -80
  165. package/types/src/questions/question-types.d.ts.map +0 -1
  166. package/types/src/questions/question.d.ts +0 -278
  167. package/types/src/questions/question.d.ts.map +0 -1
  168. package/types/src/questions/question.test.d.ts +0 -2
  169. package/types/src/questions/question.test.d.ts.map +0 -1
  170. package/types/src/questions/questions.d.ts +0 -3
  171. package/types/src/questions/questions.d.ts.map +0 -1
  172. package/types/src/section.d.ts +0 -107
  173. package/types/src/section.d.ts.map +0 -1
  174. package/types/src/section.test.d.ts +0 -2
  175. package/types/src/section.test.d.ts.map +0 -1
  176. package/types/src/validator/address-validator.d.ts +0 -48
  177. package/types/src/validator/address-validator.d.ts.map +0 -1
  178. package/types/src/validator/address-validator.test.d.ts +0 -2
  179. package/types/src/validator/address-validator.test.d.ts.map +0 -1
  180. package/types/src/validator/base-validator.d.ts +0 -12
  181. package/types/src/validator/base-validator.d.ts.map +0 -1
  182. package/types/src/validator/base-validator.test.d.ts +0 -2
  183. package/types/src/validator/base-validator.test.d.ts.map +0 -1
  184. package/types/src/validator/conditional-required-validator.d.ts +0 -25
  185. package/types/src/validator/conditional-required-validator.d.ts.map +0 -1
  186. package/types/src/validator/conditional-required-validator.test.d.ts +0 -2
  187. package/types/src/validator/conditional-required-validator.test.d.ts.map +0 -1
  188. package/types/src/validator/confirmation-checkbox-validator.d.ts +0 -28
  189. package/types/src/validator/confirmation-checkbox-validator.d.ts.map +0 -1
  190. package/types/src/validator/confirmation-checkbox-validator.test.d.ts +0 -2
  191. package/types/src/validator/confirmation-checkbox-validator.test.d.ts.map +0 -1
  192. package/types/src/validator/coordinates-validator.d.ts +0 -23
  193. package/types/src/validator/coordinates-validator.d.ts.map +0 -1
  194. package/types/src/validator/coordinates-validator.test.d.ts +0 -2
  195. package/types/src/validator/coordinates-validator.test.d.ts.map +0 -1
  196. package/types/src/validator/date-period-validator.d.ts +0 -64
  197. package/types/src/validator/date-period-validator.d.ts.map +0 -1
  198. package/types/src/validator/date-period-validator.test.d.ts +0 -2
  199. package/types/src/validator/date-period-validator.test.d.ts.map +0 -1
  200. package/types/src/validator/date-time-validator.d.ts +0 -27
  201. package/types/src/validator/date-time-validator.d.ts.map +0 -1
  202. package/types/src/validator/date-time-validator.test.d.ts +0 -2
  203. package/types/src/validator/date-time-validator.test.d.ts.map +0 -1
  204. package/types/src/validator/date-validator.d.ts +0 -49
  205. package/types/src/validator/date-validator.d.ts.map +0 -1
  206. package/types/src/validator/date-validator.test.d.ts +0 -2
  207. package/types/src/validator/date-validator.test.d.ts.map +0 -1
  208. package/types/src/validator/document-upload-validator.d.ts +0 -12
  209. package/types/src/validator/document-upload-validator.d.ts.map +0 -1
  210. package/types/src/validator/document-upload-validator.test.d.ts +0 -2
  211. package/types/src/validator/document-upload-validator.test.d.ts.map +0 -1
  212. package/types/src/validator/email-validator.d.ts +0 -74
  213. package/types/src/validator/email-validator.d.ts.map +0 -1
  214. package/types/src/validator/email-validator.test.d.ts +0 -2
  215. package/types/src/validator/email-validator.test.d.ts.map +0 -1
  216. package/types/src/validator/multi-field-input-validator.d.ts +0 -91
  217. package/types/src/validator/multi-field-input-validator.d.ts.map +0 -1
  218. package/types/src/validator/multi-field-input-validator.test.d.ts +0 -2
  219. package/types/src/validator/multi-field-input-validator.test.d.ts.map +0 -1
  220. package/types/src/validator/numeric-validator.d.ts +0 -50
  221. package/types/src/validator/numeric-validator.d.ts.map +0 -1
  222. package/types/src/validator/numeric-validator.test.d.ts +0 -2
  223. package/types/src/validator/numeric-validator.test.d.ts.map +0 -1
  224. package/types/src/validator/required-validator.d.ts +0 -23
  225. package/types/src/validator/required-validator.d.ts.map +0 -1
  226. package/types/src/validator/required-validator.test.d.ts +0 -2
  227. package/types/src/validator/required-validator.test.d.ts.map +0 -1
  228. package/types/src/validator/same-answer-validator.d.ts +0 -19
  229. package/types/src/validator/same-answer-validator.d.ts.map +0 -1
  230. package/types/src/validator/same-answer-validator.test.d.ts +0 -2
  231. package/types/src/validator/same-answer-validator.test.d.ts.map +0 -1
  232. package/types/src/validator/string-validator.d.ts +0 -59
  233. package/types/src/validator/string-validator.d.ts.map +0 -1
  234. package/types/src/validator/string-validator.test.d.ts +0 -2
  235. package/types/src/validator/string-validator.test.d.ts.map +0 -1
  236. package/types/src/validator/unit-option-entry-validator.d.ts +0 -41
  237. package/types/src/validator/unit-option-entry-validator.d.ts.map +0 -1
  238. package/types/src/validator/unit-option-entry-validator.test.d.ts +0 -2
  239. package/types/src/validator/unit-option-entry-validator.test.d.ts.map +0 -1
  240. package/types/src/validator/valid-option-validator.d.ts +0 -23
  241. package/types/src/validator/valid-option-validator.d.ts.map +0 -1
  242. package/types/src/validator/valid-option-validator.test.d.ts +0 -2
  243. package/types/src/validator/valid-option-validator.test.d.ts.map +0 -1
  244. package/types/src/validator/validation-error-handler.d.ts +0 -20
  245. package/types/src/validator/validation-error-handler.d.ts.map +0 -1
  246. package/types/src/validator/validation-error-handler.test.d.ts +0 -2
  247. package/types/src/validator/validation-error-handler.test.d.ts.map +0 -1
  248. package/types/src/validator/validator.d.ts +0 -5
  249. package/types/src/validator/validator.d.ts.map +0 -1
  250. package/types/src/validator/validator.test.d.ts +0 -2
  251. package/types/src/validator/validator.test.d.ts.map +0 -1
  252. package/types/test/mock/journey.d.ts +0 -3
  253. package/types/test/mock/journey.d.ts.map +0 -1
  254. package/types/test/mock/uuid.d.ts +0 -7
  255. package/types/test/mock/uuid.d.ts.map +0 -1
  256. package/types/test/utils/nunjucks.d.ts +0 -2
  257. package/types/test/utils/nunjucks.d.ts.map +0 -1
  258. package/types/test/utils/utils.d.ts +0 -32
  259. package/types/test/utils/utils.d.ts.map +0 -1
@@ -1,144 +0,0 @@
1
- /**
2
- * @typedef {import('./journey-response').JourneyResponse} JourneyResponse
3
- * @typedef {import('../section').Section} Section
4
- * @typedef {import('../questions/question').Question} Question
5
- */
6
- /**
7
- * A journey (An entire set of questions required for a completion of a submission)
8
- * @class
9
- */
10
- export class Journey {
11
- /**
12
- * creates an instance of a journey
13
- * @param {object} options
14
- * @param {string} options.journeyId - a unique, human-readable id for this journey
15
- * @param {(response: JourneyResponse) => string} options.makeBaseUrl - base url of journey
16
- * @param {string} [options.taskListUrl] - task list url - added to base url, can be left undefined
17
- * @param {JourneyResponse} options.response - user's response
18
- * @param {string} options.journeyTemplate - template used for all views
19
- * @param {string} options.taskListTemplate - path to njk view for listing page
20
- * @param {string} [options.informationPageViewPath] - path to njk view for pdf summary page
21
- * @param {string} options.journeyTitle - part of the title in the njk view
22
- * @param {boolean} [options.returnToListing] - defines how the next/previous question handles end of sections
23
- * @param {Section[]} options.sections
24
- * @param {string} [options.initialBackLink] - back link when on the first question
25
- */
26
- constructor({ journeyId, makeBaseUrl, taskListUrl, response, journeyTemplate, taskListTemplate, informationPageViewPath, journeyTitle, returnToListing, sections, initialBackLink }: {
27
- journeyId: string;
28
- makeBaseUrl: (response: JourneyResponse) => string;
29
- taskListUrl?: string | undefined;
30
- response: JourneyResponse;
31
- journeyTemplate: string;
32
- taskListTemplate: string;
33
- informationPageViewPath?: string | undefined;
34
- journeyTitle: string;
35
- returnToListing?: boolean | undefined;
36
- sections: Section[];
37
- initialBackLink?: string | undefined;
38
- });
39
- /** @type {string} journeyId - a unique, human-readable id for this journey */
40
- journeyId: string;
41
- /** @type {Array.<Section>} sections - sections within the journey */
42
- sections: Array<Section>;
43
- /** @type {JourneyResponse} response - the user's response to the journey so far */
44
- response: JourneyResponse;
45
- /** @type {string} baseUrl - base url of the journey, gets prepended to question urls */
46
- baseUrl: string;
47
- /** @type {(journeyResponse: JourneyResponse) => string} baseUrl - base url of the journey, gets prepended to question urls */
48
- makeBaseUrl: (journeyResponse: JourneyResponse) => string;
49
- /** @type {string} taskListUrl - url that renders the task list */
50
- taskListUrl: string;
51
- /** @type {string} journeyTemplate - nunjucks template file used for */
52
- journeyTemplate: string;
53
- /** @type {string} taskListTemplate - nunjucks template file used for listing page */
54
- taskListTemplate: string;
55
- /** @type {string} informationPageViewPath - nunjucks template file used for pdf summary information page */
56
- informationPageViewPath: string;
57
- /** @type {boolean} defines how the next/previous question handles end of sections */
58
- returnToListing: boolean;
59
- /**@type {string} used as part of the overall page title */
60
- journeyTitle: string;
61
- initialBackLink: string | null;
62
- /**
63
- * Gets section based on segment
64
- * @param {string} sectionSegment
65
- * @returns {Section | undefined}
66
- */
67
- getSection(sectionSegment: string): Section | undefined;
68
- /**
69
- * gets a question from the object's sections based on a section + question names
70
- * @param {import('./journey-types.d.ts').RouteParams} params
71
- * @returns {Question | undefined} question found by lookup
72
- */
73
- getQuestionByParams(params: import("./journey-types.d.ts").RouteParams): Question | undefined;
74
- /**
75
- * Get the back link for the journey - e.g. the previous question
76
- *
77
- * @param {Object} options
78
- * @param {import('./journey-types.d.ts').RouteParams} options.params
79
- * @param {import('#src/components/manage-list/question.js')} [options.manageListQuestion]
80
- * @returns {string|null} url for the next question, or null if unmatched
81
- */
82
- getBackLink({ params, manageListQuestion }: {
83
- params: import("./journey-types.d.ts").RouteParams;
84
- manageListQuestion?: typeof import("#src/components/manage-list/question.js") | undefined;
85
- }): string | null;
86
- /**
87
- * Handles redirect to the next question in the journey
88
- * Used after question post/saving
89
- *
90
- * @param {import('express').Response} res
91
- * @param {import('./journey-types.d.ts').RouteParams} params
92
- * @param {import('#src/components/manage-list/question.js')} [manageListQuestion]
93
- * @returns {void}
94
- */
95
- redirectToNextQuestion(res: import("express").Response, params: import("./journey-types.d.ts").RouteParams, manageListQuestion?: typeof import("#src/components/manage-list/question.js")): void;
96
- /**
97
- * Get url for the next question in the journey
98
- *
99
- * @param {import('./journey-types.d.ts').RouteParams} params
100
- * @param {Object} options
101
- * @param {boolean} [options.reverse] - if passed in this will get the previous question
102
- * @param {import('#src/components/manage-list/question.js')} [options.manageListQuestion]
103
- * @returns {string|null} url for the next question, or null if unmatched
104
- */
105
- getNextQuestionUrl(params: import("./journey-types.d.ts").RouteParams, { reverse, manageListQuestion }?: {
106
- reverse?: boolean | undefined;
107
- manageListQuestion?: typeof import("#src/components/manage-list/question.js") | undefined;
108
- }): string | null;
109
- /**
110
- * Gets the url for the current question
111
- * @param {string} sectionSegment - section segment name
112
- * @param {string} questionSegment - question segment name
113
- * @returns {string} url for the current question
114
- */
115
- getCurrentQuestionUrl: (sectionSegment: string, questionSegment: string) => string;
116
- /**
117
- * Gets the url for the current question
118
- * @param {string} questionSegment - question segment name
119
- * @returns {string} url for the current question
120
- */
121
- getCurrentQuestionUrlWithoutSection: (questionSegment: string) => string;
122
- /**
123
- * Gets the url for the current question
124
- * @param {string} sectionSegment - section segment name
125
- * @param {string} questionSegment - question segment name
126
- * @param {string} addition - question segment name
127
- * @returns {string} url for the current question
128
- */
129
- addToCurrentQuestionUrl: (sectionSegment: string, questionSegment: string, addition: string) => string;
130
- /**
131
- * Gets the overall completeness status of a journey based on the response associated with it and the complete state of each section.
132
- * @returns {boolean} Boolean indicating if a journey response is complete
133
- */
134
- isComplete(): boolean;
135
- /**
136
- * @param {JourneyResponse} journeyResponse
137
- */
138
- setResponse(journeyResponse: JourneyResponse): void;
139
- #private;
140
- }
141
- export type JourneyResponse = any;
142
- export type Section = any;
143
- export type Question = any;
144
- //# sourceMappingURL=journey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../../src/journey/journey.js"],"names":[],"mappings":"AAQA;;;;GAIG;AAEH;;;GAGG;AACH;IAwBC;;;;;;;;;;;;;;OAcG;IACH,qLAZG;QAAwB,SAAS,EAAzB,MAAM;QACyC,WAAW,EAA1D,CAAC,QAAQ,EAAE,eAAe,KAAK,MAAM;QACpB,WAAW;QACH,QAAQ,EAAjC,eAAe;QACC,eAAe,EAA/B,MAAM;QACU,gBAAgB,EAAhC,MAAM;QACW,uBAAuB;QACxB,YAAY,EAA5B,MAAM;QACY,eAAe;QACd,QAAQ,EAA3B,OAAO,EAAE;QACQ,eAAe;KAC1C,EAoDA;IAzFD,8EAA8E;IAC9E,WADW,MAAM,CACP;IACV,qEAAqE;IACrE,UADW,KAAK,CAAE,OAAO,CAAC,CACZ;IACd,mFAAmF;IACnF,UADW,eAAe,CACjB;IACT,wFAAwF;IACxF,SADW,MAAM,CACJ;IACb,8HAA8H;IAC9H,aADW,CAAC,eAAe,EAAE,eAAe,KAAK,MAAM,CAChC;IACvB,kEAAkE;IAClE,aADW,MAAM,CACA;IACjB,uEAAuE;IACvE,iBADW,MAAM,CACI;IACrB,qFAAqF;IACrF,kBADW,MAAM,CACK;IACtB,4GAA4G;IAC5G,yBADW,MAAM,CACY;IAC7B,qFAAqF;IACrF,iBADW,OAAO,CACM;IACxB,2DAA2D;IAC3D,cADU,MAAM,CACH;IAmEZ,+BAA8C;IA2C/C;;;;OAIG;IACH,2BAHW,MAAM,GACJ,OAAO,GAAG,SAAS,CAM/B;IA8BD;;;;OAIG;IACH,4BAHW,OAAO,sBAAsB,EAAE,WAAW,GACxC,QAAQ,GAAG,SAAS,CAiBhC;IAED;;;;;;;OAOG;IACH,4CAJG;QAA4D,MAAM,EAA1D,OAAO,sBAAsB,EAAE,WAAW;QACkB,kBAAkB;KACtF,GAAU,MAAM,GAAC,IAAI,CAWvB;IAED;;;;;;;;OAQG;IACH,4BALW,OAAO,SAAS,EAAE,QAAQ,UAC1B,OAAO,sBAAsB,EAAE,WAAW,kFAExC,IAAI,CAKhB;IAED;;;;;;;;OAQG;IACH,2BANW,OAAO,sBAAsB,EAAE,WAAW,oCAElD;QAA0B,OAAO;QACmC,kBAAkB;KACtF,GAAU,MAAM,GAAC,IAAI,CAyEvB;IAED;;;;;OAKG;IACH,wBAAyB,gBAJd,MAI4B,EAAE,iBAH9B,MAG6C,KAF3C,MAAM,CAqBjB;IAEF;;;;OAIG;IACH,sCAAuC,iBAH5B,MAG2C,KAFzC,MAAM,CAIjB;IAEF;;;;;;OAMG;IACH,0BAA2B,gBALhB,MAK8B,EAAE,iBAJhC,MAI+C,EAAE,UAHjD,MAGyD,KAFvD,MAAM,CAuBjB;IAEF;;;OAGG;IACH,cAFa,OAAO,CAInB;IAED;;OAEG;IACH,6BAFW,eAAe,QAKzB;;CACD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=journey.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"journey.test.d.ts","sourceRoot":"","sources":["../../../src/journey/journey.test.js"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- /**
2
- * @param {import('@prisma/client').Prisma.AddressGetPayload<{}>} address
3
- * @returns {string}
4
- */
5
- export function addressToViewModel(address: any): string;
6
- //# sourceMappingURL=address-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/address-utils.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,kDAFa,MAAM,CAKlB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=address-utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address-utils.test.d.ts","sourceRoot":"","sources":["../../../src/lib/address-utils.test.js"],"names":[],"mappings":""}
@@ -1,43 +0,0 @@
1
- /**
2
- * Defines the shape of an address object
3
- * @class
4
- */
5
- export class Address {
6
- /**
7
- * creates an instance of an address
8
- * @param {Object} params
9
- * @param {string} params.addressLine1
10
- * @param {string} params.addressLine2
11
- * @param {string} params.townCity
12
- * @param {string} params.county
13
- * @param {string} params.postcode
14
- */
15
- constructor({ addressLine1, addressLine2, townCity, county, postcode }: {
16
- addressLine1: string;
17
- addressLine2: string;
18
- townCity: string;
19
- county: string;
20
- postcode: string;
21
- });
22
- /**
23
- * @type {string} - the first line of the address
24
- */
25
- addressLine1: string;
26
- /**
27
- * @type {string} - the second line of the address
28
- */
29
- addressLine2: string;
30
- /**
31
- * @type {string} - the name of the town, city or other settlement
32
- */
33
- townCity: string;
34
- /**
35
- * @type {string} - the name of the town, city or other settlement
36
- */
37
- county: string;
38
- /**
39
- * @type {string} - the postcode
40
- */
41
- postcode: string;
42
- }
43
- //# sourceMappingURL=address.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src/lib/address.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH;IA0BC;;;;;;;;OAQG;IACH,wEANG;QAAuB,YAAY,EAA3B,MAAM;QACS,YAAY,EAA3B,MAAM;QACS,QAAQ,EAAvB,MAAM;QACS,MAAM,EAArB,MAAM;QACS,QAAQ,EAAvB,MAAM;KAChB,EAOA;IAxCD;;OAEG;IACH,cAFU,MAAM,CAEH;IAEb;;OAEG;IACH,cAFU,MAAM,CAEH;IAEb;;OAEG;IACH,UAFU,MAAM,CAEP;IAET;;OAEG;IACH,QAFU,MAAM,CAET;IAEP;;OAEG;IACH,UAFU,MAAM,CAEP;CAkBT"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=address.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address.test.d.ts","sourceRoot":"","sources":["../../../src/lib/address.test.js"],"names":[],"mappings":""}
@@ -1,60 +0,0 @@
1
- /**
2
- * Display the date in Europe/London
3
- * @param {Date|string} [date]
4
- * @param {Object} [options]
5
- * @param {string} [options.format] date formatting string
6
- * @returns {string} formatted date string or empty string if invalid value passed in
7
- */
8
- export function formatDateForDisplay(date?: Date | string, { format }?: {
9
- format?: string | undefined;
10
- }): string;
11
- /**
12
- * @typedef {Object} DateTimeParams
13
- * @property {number} year
14
- * @property {number} month
15
- * @property {number} day
16
- * @property {number} [hour]
17
- * @property {number} [minute]
18
- * @property {number} [second]
19
- * @property {boolean} [convertToUTC]
20
- */
21
- /**
22
- * Parse the date and time parameters provided by a user
23
- * @param {DateTimeParams} params
24
- * @returns {Date}
25
- */
26
- export function parseDateInput({ year, month, day, hour, minute, second }: DateTimeParams): Date;
27
- /**
28
- * Start of the day in UK time zone
29
- */
30
- export function startOfDay(): Date;
31
- /**
32
- * End of the day in UK time zone
33
- */
34
- export function endOfDay(): Date;
35
- /**
36
- * Check if today is within the date range inclusive (start <= now <= end)
37
- * @param {Date} startDate
38
- * @param {Date} endDate
39
- * @returns {boolean}
40
- */
41
- export function nowIsWithinRange(startDate: Date, endDate: Date): boolean;
42
- /**
43
- * Check if today is on or after the start date
44
- * @param {Date} startDate
45
- * @returns {boolean}
46
- */
47
- export function isNowAfterStartDate(startDate: Date): boolean;
48
- export function dateIsAfterToday(date: Date): boolean;
49
- export function dateIsBeforeToday(date: Date): boolean;
50
- export function dateIsToday(date: Date): boolean;
51
- export type DateTimeParams = {
52
- year: number;
53
- month: number;
54
- day: number;
55
- hour?: number | undefined;
56
- minute?: number | undefined;
57
- second?: number | undefined;
58
- convertToUTC?: boolean | undefined;
59
- };
60
- //# sourceMappingURL=date-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/date-utils.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,4CALW,IAAI,GAAC,MAAM,eAEnB;IAAyB,MAAM;CAC/B,GAAU,MAAM,CAMlB;AAED;;;;;;;;;GASG;AAEH;;;;GAIG;AACH,2EAHW,cAAc,GACZ,IAAI,CAMhB;AAED;;GAEG;AACH,mCAWC;AAED;;GAEG;AACH,iCAWC;AAqCD;;;;;GAKG;AACH,4CAJW,IAAI,WACJ,IAAI,GACF,OAAO,CASnB;AAED;;;;GAIG;AACH,+CAHW,IAAI,GACF,OAAO,CASnB;AA/CM,uCAHI,IAAI,GACF,OAAO,CAInB;AAMM,wCAHI,IAAI,GACF,OAAO,CAInB;AAMM,kCAHI,IAAI,GACF,OAAO,CAInB;;UArFa,MAAM;WACN,MAAM;SACN,MAAM"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=date-utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-utils.test.d.ts","sourceRoot":"","sources":["../../../src/lib/date-utils.test.js"],"names":[],"mappings":""}
@@ -1,88 +0,0 @@
1
- /**
2
- * A `SaveDataFn` implementation that saves answers to the session.
3
- * Answers are saved into a forms object, keyed by the journeyId, and optionally by a request parameter
4
- * @example
5
- * req: {
6
- * session: {
7
- * forms: {
8
- * 'journey-id-1': {
9
- * questionOne: 'my answer'
10
- * // ...
11
- * }
12
- * }
13
- * }
14
- * }
15
- *
16
- * or when keyed by a req parameter:
17
- * @example
18
- * req: {
19
- * session: {
20
- * forms: {
21
- * 'some-req-param': {
22
- * 'journey-id-1': {
23
- * questionOne: 'my answer'
24
- * // ...
25
- * }
26
- * }
27
- * }
28
- * }
29
- * }
30
- *
31
- * Delete behavior for manage-list items:
32
- * - When `manageListItemRemove === true`, and both `manageListQuestionFieldName` and `req.params.manageListItemId`
33
- * are present, the item with a matching `id` is removed from the array stored at `answers[manageListQuestionFieldName]`.
34
- * - If the list does not exist or is not an array, no action is taken.
35
- *
36
- * @param {Object} opts
37
- * @param {string} [opts.reqParam]
38
- * - optional request parameter to use as a key
39
- * @returns {import('../controller.js').SaveDataFn}
40
- */
41
- export function buildSaveDataToSession({ reqParam }?: {
42
- reqParam?: string | undefined;
43
- }): import("../controller.js").SaveDataFn;
44
- /**
45
- * A function to clear journey answers from the session
46
- *
47
- * @example
48
- * req: {
49
- * session: {
50
- * forms: {
51
- * 'journey-id-1': {
52
- * questionOne: 'my answer'
53
- * // ...
54
- * }
55
- * }
56
- * }
57
- * }
58
- *
59
- * @param {Object} params
60
- * @param {import('express').Request} params.req
61
- * @param {string} params.journeyId
62
- * @param {Object<string, any>} [params.replaceWith] - optional data to replace the form answers with
63
- * @param {string} [params.reqParam] - optional request parameter used as a key
64
- * @returns {void}
65
- */
66
- export function clearDataFromSession({ req, journeyId, replaceWith, reqParam }: {
67
- req: import("express").Request;
68
- journeyId: string;
69
- replaceWith?: {
70
- [x: string]: any;
71
- } | undefined;
72
- reqParam?: string | undefined;
73
- }): void;
74
- /**
75
- * Fetch session answers from the session
76
- *
77
- * @param {string} journeyId
78
- * @param {string} [reqParam] - optional request parameter used as a key
79
- * @returns {import('express').Handler}
80
- */
81
- export function buildGetJourneyResponseFromSession(journeyId: string, reqParam?: string): import("express").Handler;
82
- /**
83
- * Default save-to-session function with no request parameter
84
- *
85
- * @type {import('../controller.js').SaveDataFn}
86
- */
87
- export const saveDataToSession: import("../controller.js").SaveDataFn;
88
- //# sourceMappingURL=session-answer-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-answer-store.d.ts","sourceRoot":"","sources":["../../../src/lib/session-answer-store.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,sDAJG;IAAsB,QAAQ;CAE9B,GAAU,OAAO,kBAAkB,EAAE,UAAU,CA8CjD;AASD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,gFANG;IAA0C,GAAG,EAArC,OAAO,SAAS,EAAE,OAAO;IACV,SAAS,EAAxB,MAAM;IACuB,WAAW;;;IACxB,QAAQ;CAChC,GAAU,IAAI,CAkBhB;AAED;;;;;;GAMG;AACH,8DAJW,MAAM,aACN,MAAM,GACJ,OAAO,SAAS,EAAE,OAAO,CA2BrC;AA/ED;;;;GAIG;AACH,gCAFU,OAAO,kBAAkB,EAAE,UAAU,CAEW"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=session-answer-store.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-answer-store.test.d.ts","sourceRoot":"","sources":["../../../src/lib/session-answer-store.test.js"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- /**
2
- * replaces new line chars with a <br>
3
- * @param {string} [value]
4
- * @returns {string}
5
- */
6
- export function nl2br(value?: string): string;
7
- /**
8
- * @param {string|any} str
9
- * @returns {string}
10
- */
11
- export function capitalize(str: string | any): string;
12
- /**
13
- * Trim a trailing slash if present
14
- *
15
- * @param {string} [str]
16
- * @returns {string}
17
- */
18
- export function trimTrailingSlash(str?: string): string;
19
- /**
20
- * Convert a value to an array, unless it is already
21
- *
22
- * @param {T|T[]} value
23
- * @template T
24
- */
25
- export function toArray<T>(value: T | T[]): T[];
26
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,8BAHW,MAAM,GACJ,MAAM,CAMlB;AAED;;;GAGG;AACH,gCAHW,MAAM,GAAC,GAAG,GACR,MAAM,CAKlB;AAED;;;;;GAKG;AACH,wCAHW,MAAM,GACJ,MAAM,CAKlB;AAED;;;;;GAKG;AACH,wBAFa,CAAC,SADH,CAAC,GAAC,CAAC,EAAE,OAKf"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.test.js"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- /**
2
- * Wrapper class so it can be overridden by test mocks
3
- */
4
- export class Uuid {
5
- static randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
6
- }
7
- //# sourceMappingURL=uuid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../src/lib/uuid.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACC,yEAEC;CACD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=uuid.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid.test.d.ts","sourceRoot":"","sources":["../../../src/lib/uuid.test.js"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- /**
2
- * @param {(req: import('express').Request, journeyResponse: import('../journey/journey-response.js').JourneyResponse) => import('../journey/journey.js').Journey} createJourney
3
- * @returns {import('express').Handler}
4
- */
5
- export function buildGetJourney(createJourney: (req: import("express").Request, journeyResponse: import("../journey/journey-response.js").JourneyResponse) => import("../journey/journey.js").Journey): import("express").Handler;
6
- //# sourceMappingURL=build-get-journey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-get-journey.d.ts","sourceRoot":"","sources":["../../../src/middleware/build-get-journey.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,+CAHW,CAAC,GAAG,EAAE,OAAO,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,gCAAgC,EAAE,eAAe,KAAK,OAAO,uBAAuB,EAAE,OAAO,GACpJ,OAAO,SAAS,EAAE,OAAO,CAgBrC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * @typedef {function(import('../section').Question, import('../journey/journey-response').JourneyResponse): boolean} ShouldDisplayCondition
3
- */
4
- /**
5
- * Redirects to the first unanswered question in a journey, or to the task list if complete
6
- *
7
- * @param {ShouldDisplayCondition[]} [conditions]
8
- * @returns {import('express').Handler}
9
- */
10
- export function redirectToUnansweredQuestion(conditions?: ShouldDisplayCondition[]): import("express").Handler;
11
- export type ShouldDisplayCondition = (arg0: any, arg1: any) => boolean;
12
- //# sourceMappingURL=redirect-to-unanswered-question.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirect-to-unanswered-question.d.ts","sourceRoot":"","sources":["../../../src/middleware/redirect-to-unanswered-question.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,0DAHW,sBAAsB,EAAE,GACtB,OAAO,SAAS,EAAE,OAAO,CA8BrC;qCArCY,CAAS,IAA6B,EAA7B,GAA6B,EAAE,IAAqD,EAArD,GAAqD,KAAG,OAAO"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=redirect-to-unanswered-question.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirect-to-unanswered-question.test.d.ts","sourceRoot":"","sources":["../../../src/middleware/redirect-to-unanswered-question.test.js"],"names":[],"mappings":""}
@@ -1,21 +0,0 @@
1
- /** @typedef {import('./question-props').QuestionProps} QuestionProps */
2
- /**
3
- * @param {{[questionName: string]: QuestionProps}} questionPropsRecord
4
- * @param {Record<string, typeof import('./question').Question>} questionClasses
5
- * @param {{[questionType: string]: Record<string, Function>}} questionMethodOverrides
6
- * @param {{notStartedText?: string, continueButtonText?: string, changeActionText?: string, answerActionText?: string}} [textOverrides] - customise question text
7
- */
8
- export function createQuestions(questionPropsRecord: {
9
- [questionName: string]: QuestionProps;
10
- }, questionClasses: Record<string, typeof import("./question").Question>, questionMethodOverrides: {
11
- [questionType: string]: Record<string, Function>;
12
- }, textOverrides?: {
13
- notStartedText?: string;
14
- continueButtonText?: string;
15
- changeActionText?: string;
16
- answerActionText?: string;
17
- }): {
18
- [k: string]: any;
19
- };
20
- export type QuestionProps = any;
21
- //# sourceMappingURL=create-questions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-questions.d.ts","sourceRoot":"","sources":["../../../src/questions/create-questions.js"],"names":[],"mappings":"AAAA,wEAAwE;AAExE;;;;;GAKG;AACH,qDALW;IAAC,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAAA;CAAC,mBACvC,MAAM,CAAC,MAAM,EAAE,cAAc,YAAY,EAAE,QAAQ,CAAC,2BACpD;IAAC,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,WAAW,CAAA;CAAC,kBAClD;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAC;;EAwBtH"}
@@ -1,74 +0,0 @@
1
- /**
2
- * @typedef {{
3
- * text: string;
4
- * value: string;
5
- * hint?: object;
6
- * checked?: boolean | undefined;
7
- * attributes?: Record<string, string>;
8
- * behaviour?: 'exclusive';
9
- * conditional?: {
10
- * question: string;
11
- * type: string;
12
- * fieldName: string;
13
- * inputClasses?: string;
14
- * html?: string;
15
- * value?: unknown;
16
- * label?: string;
17
- * hint?: string
18
- * };
19
- * conditionalText?: {
20
- * html: string;
21
- * }
22
- *}} Option
23
- */
24
- /**
25
- * @typedef {import('./question').QuestionViewModel & { question: { options: Option[] } }} OptionsViewModel
26
- */
27
- export default class OptionsQuestion extends Question {
28
- /**
29
- * @param {import('#question-types').QuestionParameters} params
30
- * @param {Array<Option>} params.options
31
- */
32
- constructor(params: import("#question-types").QuestionParameters);
33
- /** @type {Array<Option>} */
34
- options: Array<Option>;
35
- optionJoinString: string;
36
- /**
37
- * gets the view model for this question
38
- * @param {import('#section').Section} section - the current section
39
- * @param {import('#journey').Journey} journey - the journey we are in
40
- * @param {Record<string, unknown>} [customViewData] additional data to send to view
41
- * @param {Record<string, unknown>} [payload]
42
- * @param {import('#question-types').PrepQuestionForRenderingOptions} options
43
- * @returns {import('./question').QuestionViewModel} QuestionViewModel
44
- */
45
- prepQuestionForRendering(section: import("#section").Section, journey: import("#journey").Journey, customViewData?: Record<string, unknown>, payload?: Record<string, unknown>, options: import("#question-types").PrepQuestionForRenderingOptions): any;
46
- }
47
- export type Option = {
48
- text: string;
49
- value: string;
50
- hint?: object;
51
- checked?: boolean | undefined;
52
- attributes?: Record<string, string>;
53
- behaviour?: "exclusive";
54
- conditional?: {
55
- question: string;
56
- type: string;
57
- fieldName: string;
58
- inputClasses?: string;
59
- html?: string;
60
- value?: unknown;
61
- label?: string;
62
- hint?: string;
63
- };
64
- conditionalText?: {
65
- html: string;
66
- };
67
- };
68
- export type OptionsViewModel = any & {
69
- question: {
70
- options: Option[];
71
- };
72
- };
73
- import { Question } from './question.js';
74
- //# sourceMappingURL=options-question.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options-question.d.ts","sourceRoot":"","sources":["../../../src/questions/options-question.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;GAEG;AAEH;IAIC;;;OAGG;IACH,oBAHW,OAAO,iBAAiB,EAAE,kBAAkB,EAgBtD;IApBD,4BAA4B;IAC5B,SADW,KAAK,CAAC,MAAM,CAAC,CAChB;IAkBP,yBAA+C;IAGhD;;;;;;;;OAQG;IACH,kCAPW,OAAO,UAAU,EAAE,OAAO,WAC1B,OAAO,UAAU,EAAE,OAAO,mBAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WACvB,OAAO,iBAAiB,EAAE,+BAA+B,OAmDnE;CAmCD;qBA9IY;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,CAAC,EAAE;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,OAAO,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;KAClB,CAAC;IACA,eAAe,CAAC,EAAE;QAChB,IAAI,EAAE,MAAM,CAAC;KAChB,CAAA;CACH;+BAIU,GAAsC,GAAG;IAAE,QAAQ,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE;yBAhChE,eAAe"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=options-question.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options-question.test.d.ts","sourceRoot":"","sources":["../../../src/questions/options-question.test.js"],"names":[],"mappings":""}