@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,182 +0,0 @@
1
- import type { QuestionParameters } from '#src/questions/question-types.d.ts';
2
-
3
- type QuestionTypes =
4
- | 'boolean'
5
- | 'checkbox'
6
- | 'date'
7
- | 'date-period'
8
- | 'date-time'
9
- | 'email'
10
- | 'manage-list'
11
- | 'multi-field-input'
12
- | 'number'
13
- | 'radio'
14
- | 'select'
15
- | 'single-line-input'
16
- | 'site-address'
17
- | 'text-entry'
18
- | 'text-entry-redact'
19
- | 'unit-option';
20
-
21
- type CommonQuestionProps = Omit<QuestionParameters, 'viewFolder'> & {
22
- type: QuestionTypes;
23
- };
24
-
25
- type Option =
26
- | {
27
- text: string;
28
- value: string;
29
- hint?: object;
30
- checked?: boolean | undefined;
31
- attributes?: Record<string, string>;
32
- behaviour?: 'exclusive';
33
- conditional?: {
34
- question: string;
35
- type: string;
36
- fieldName: string;
37
- inputClasses?: string;
38
- html?: string;
39
- value?: unknown;
40
- label?: string;
41
- hint?: string;
42
- };
43
- conditionalText?: {
44
- html: string;
45
- };
46
- }
47
- | { divider?: string };
48
-
49
- type Affix = {
50
- text: string;
51
- classes?: string;
52
- };
53
-
54
- interface InputField {
55
- fieldName: string;
56
- label: string;
57
- formatJoinString?: string; // used by formatAnswerForSummary (e.g. task list display), effective default to line break
58
- formatPrefix?: string; // used by formatAnswerForSummary (e.g. task list display), to prefix answer
59
- formatTextFunction?: (text: string) => string; // used to format the answer for display and value in question
60
- attributes?: Record<string, string>; // used to add HTML attributes to the field
61
- suffix?: Affix; // used to add a suffix to the field
62
- prefix?: Affix; // used to add a prefix to the field
63
- hint?: string;
64
- }
65
-
66
- /*
67
- * UnitOptions are the options displayed in the radio format - in this case the value
68
- * represents the unit.
69
- * Conditionals must be used to capture the relevant quantity.
70
- * Each conditional must have a fieldName which uses the conditionalFieldName from the
71
- * UnitOptionEntryQuestion object as a base, followed by an underscore and unit reference
72
- * eg 'siteAreaSquareMetres_hectares' - this is required for validation and saving to the DB
73
- */
74
- interface UnitOption {
75
- text: string;
76
- value: string;
77
- hint?: object;
78
- checked?: boolean | undefined;
79
- attributes?: Record<string, string>;
80
- behaviour?: 'exclusive';
81
- conditional: {
82
- fieldName: string;
83
- suffix: string;
84
- value?: unknown;
85
- label?: string;
86
- hint?: string;
87
- conversionFactor?: number;
88
- };
89
- }
90
-
91
- type BooleanQuestionProps = CommonQuestionProps & {
92
- type: 'boolean';
93
- options?: Option[];
94
- interfaceType?: 'checkbox' | 'radio';
95
- };
96
-
97
- type CheckboxQuestionProps = CommonQuestionProps & {
98
- type: 'checkbox';
99
- options: Option[];
100
- };
101
-
102
- type DateQuestionProps = CommonQuestionProps & {
103
- type: 'date';
104
- };
105
-
106
- type DatePeriodQuestionProps = CommonQuestionProps & {
107
- type: 'date-period';
108
- };
109
-
110
- type DateTimeQuestionProps = CommonQuestionProps & {
111
- type: 'date-time';
112
- };
113
-
114
- type ManageListQuestionProps = CommonQuestionProps & {
115
- type: 'manage-list';
116
- };
117
-
118
- type EmailQuestionProps = CommonQuestionProps & {
119
- type: 'email';
120
- };
121
-
122
- export type MultiFieldInputQuestionProps = CommonQuestionProps & {
123
- type: 'multi-field-input';
124
- inputFields: InputField[];
125
- };
126
-
127
- type NumberEntryQuestionProps = CommonQuestionProps & {
128
- type: 'number';
129
- suffix?: string;
130
- };
131
-
132
- type RadioQuestionProps = CommonQuestionProps & {
133
- type: 'radio';
134
- options: Option[];
135
- };
136
-
137
- type SelectQuestionProps = CommonQuestionProps & {
138
- type: 'select';
139
- options: Option[];
140
- disableAccessibleAutocomplete?: boolean;
141
- };
142
-
143
- type SingleLineInputQuestionProps = CommonQuestionProps & {
144
- type: 'single-line-input';
145
- inputAttributes?: Record<string, string>;
146
- };
147
-
148
- type SiteAddressQuestionProps = CommonQuestionProps & {
149
- type: 'site-address';
150
- };
151
-
152
- type TextEntryQuestionProps = CommonQuestionProps & {
153
- type: 'text-entry';
154
- };
155
-
156
- type TextEntryRedactQuestionProps = CommonQuestionProps & {
157
- type: 'text-entry-redact';
158
- };
159
-
160
- type UnitOptionEntryQuestionProps = CommonQuestionProps & {
161
- type: 'unit-option';
162
- conditionalFieldName: string;
163
- options: UnitOption[];
164
- };
165
-
166
- export type QuestionProps =
167
- | BooleanQuestionProps
168
- | CheckboxQuestionProps
169
- | DateQuestionProps
170
- | DatePeriodQuestionProps
171
- | DateTimeQuestionProps
172
- | ManageListQuestionProps
173
- | EmailQuestionProps
174
- | MultiFieldInputQuestionProps
175
- | NumberEntryQuestionProps
176
- | RadioQuestionProps
177
- | SelectQuestionProps
178
- | SingleLineInputQuestionProps
179
- | SiteAddressQuestionProps
180
- | TextEntryQuestionProps
181
- | TextEntryRedactQuestionProps
182
- | UnitOptionEntryQuestionProps;
@@ -1 +0,0 @@
1
- {"version":3,"file":"question-props.d.ts","sourceRoot":"","sources":["../../../src/questions/question-props.js"],"names":[],"mappings":""}
@@ -1,80 +0,0 @@
1
- import type { RouteParams } from '#src/journey/journey-types.d.ts';
2
- import type ManageListQuestion from '#src/components/manage-list/question.js';
3
- import type BaseValidator from '../validator/base-validator.js';
4
- import type { JourneyResponse } from '../journey/journey-response.js';
5
-
6
- export interface QuestionParameters {
7
- title: string;
8
- question: string;
9
- viewFolder: string;
10
- fieldName: string;
11
- url?: string;
12
- pageTitle?: string;
13
- description?: string;
14
- validators?: BaseValidator[];
15
- html?: string;
16
- hint?: string;
17
- interfaceType?: string;
18
- shouldDisplay?: (response: JourneyResponse) => boolean;
19
- autocomplete?: string;
20
- // is this question editable? defaults to true
21
- editable?: boolean;
22
- // override the action link for this question
23
- actionLink?: ActionLink;
24
- // static view data for this question
25
- viewData?: {
26
- /**
27
- * @deprecated replaced by secondaryActions
28
- */
29
- extraActionButtons?: SecondaryAction[];
30
- /**
31
- * Secondary action buttons
32
- */
33
- secondaryActions?: SecondaryAction[];
34
- [key: string]: any;
35
- };
36
- }
37
-
38
- export interface ActionLink {
39
- text: string;
40
- href: string;
41
- }
42
-
43
- export type SecondaryAction = SecondaryActionButton | SecondaryActionLink;
44
-
45
- export interface SecondaryActionButton {
46
- text: string;
47
- type?: string;
48
- formaction?: string;
49
- classes?: string;
50
- }
51
-
52
- export interface SecondaryActionLink {
53
- text: string;
54
- href: string;
55
- classes?: string;
56
- }
57
-
58
- export interface QuestionViewModel {
59
- question: {
60
- value: string | number | Record<string, any>;
61
- question: string;
62
- fieldName: string;
63
- pageTitle: string;
64
- description?: string;
65
- html?: string;
66
- };
67
- layoutTemplate: string;
68
- pageCaption: string;
69
- continueButtonText: string;
70
- backLink: string;
71
- showBackToListLink: string;
72
- listLink: string;
73
- journeyTitle: string;
74
- [k: string]: any;
75
- }
76
-
77
- export interface PrepQuestionForRenderingOptions {
78
- params: RouteParams;
79
- manageListQuestion?: ManageListQuestion;
80
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"question-types.d.ts","sourceRoot":"","sources":["../../../src/questions/question-types.js"],"names":[],"mappings":""}
@@ -1,278 +0,0 @@
1
- /**
2
- * @import {BaseValidator} from "#base-validator"
3
- * @import {Journey} from "#journey"
4
- * @import {JourneyResponse} from "#journey-response"
5
- * @import {Section} from "#section"
6
- * @import {ActionView} from "../controller.js"
7
- * @import {ActionLink} from "./question-types.js"
8
- */
9
- /**
10
- * @typedef {Object} PreppedQuestion
11
- * @property {Object} value
12
- * @property {string} question
13
- * @property {string} fieldName
14
- * @property {string} pageTitle
15
- * @property {string} [description]
16
- * @property {string} [html]
17
- */
18
- /**
19
- * @typedef {Record<string, any>} QuestionViewModel
20
- * @property {PreppedQuestion} question
21
- * @property {string} layoutTemplate
22
- * @property {string} pageCaption
23
- * @property {string} [continueButtonText]
24
- * @property {string} backLink
25
- * @property {boolean} showBackToListLink
26
- * @property {string} listLink
27
- * @property {Object} util
28
- * @property {function(string): string} util.trimTrailingSlash
29
- */
30
- /**
31
- * A specific question within a journey which is made up of one (usually) or many (sometimes) components and their required content.
32
- * @class
33
- */
34
- export class Question {
35
- /**
36
- * @param {import('#question-types').QuestionParameters} params
37
- * @param {Record<string, Function>} [methodOverrides]
38
- */
39
- constructor({ title, question, viewFolder, fieldName, url, pageTitle, description, validators, html, hint, interfaceType, shouldDisplay, autocomplete, editable, actionLink, viewData }: import("#question-types").QuestionParameters, methodOverrides?: Record<string, Function>);
40
- /** @type {string} - html page title, defaults to question if not provided */
41
- pageTitle: string;
42
- /** @type {string} - title used in the summary list */
43
- title: string;
44
- /** @type {string} - question shown to user on question page */
45
- question: string;
46
- /** @type {string|undefined} - additional information to user about the question */
47
- description: string | undefined;
48
- /** @type {string} the folder name of the view */
49
- viewFolder: string;
50
- /** @type {string} the unique name of the input on the page, also used as a url segment (should this be separated) */
51
- fieldName: string;
52
- /** @type {boolean} if the question should appear in the journey overview task list or not */
53
- taskList: boolean;
54
- /** @type {Array.<BaseValidator>} array of validators that a question uses to validate answers */
55
- validators: Array<BaseValidator>;
56
- /** @type {string|undefined} hint text displayed to user */
57
- hint: string | undefined;
58
- /** @type {boolean} show return to listing page link after question */
59
- showBackToListLink: boolean;
60
- /** @type {string|undefined} alternative url slug */
61
- url: string | undefined;
62
- /** @type {string|undefined} optional html content */
63
- html: string | undefined;
64
- /** @type {string|undefined} optional question type */
65
- interfaceType: string | undefined;
66
- /** @type {ActionLink|undefined} override action link */
67
- actionLink: ActionLink | undefined;
68
- /** @type {string} 'not started' text to display (if a question has no answer) */
69
- notStartedText: string;
70
- /** @type {string} button text to display */
71
- continueButtonText: string;
72
- /** @type {string} text to display for 'change' link */
73
- changeActionText: string;
74
- /** @type {string} text to display for 'answer' link */
75
- answerActionText: string;
76
- /** @type {string} text to display for 'add' link */
77
- addActionText: string;
78
- /**
79
- * @param {JourneyResponse} [response]
80
- * @returns {boolean}
81
- */
82
- shouldDisplay: () => boolean;
83
- details: {
84
- title: string;
85
- text: string;
86
- };
87
- /**
88
- * Private, but not marked as such because it breaks types, either using #variable:
89
- * - Property '#isInManageListSection' is missing in type
90
- * or with the @ private tag
91
- * - Types have separate declarations of a private property '_isInManageListSection'.
92
- * @type {boolean}
93
- */
94
- _isInManageListSection: boolean;
95
- autocomplete: string | undefined;
96
- editable: boolean;
97
- viewData: {
98
- [key: string]: any;
99
- extraActionButtons?: import("./question-types.js").SecondaryAction[];
100
- secondaryActions?: import("./question-types.js").SecondaryAction[];
101
- };
102
- /**
103
- * Is this question a manage list question?
104
- * Implemented as a getter so manage list question implementations can override it,
105
- * but it cannot be changed at runtime.
106
- *
107
- * @returns {boolean}
108
- */
109
- get isManageListQuestion(): boolean;
110
- set isInManageListSection(value: boolean);
111
- /**
112
- * Is this question added to a ManageListSection?
113
- *
114
- * @returns {boolean}
115
- */
116
- get isInManageListSection(): boolean;
117
- /**
118
- * gets the view model for this question
119
- *
120
- * Wraps prepQuestionForRendering to add the back link - which requires more parameters
121
- * that prepQuestionForRendering doesn't need
122
- *
123
- * @param {Object} options
124
- * @param {import('#src/journey/journey-types.d.ts').RouteParams} options.params
125
- * @param {import('#src/components/manage-list/question.js')} [options.manageListQuestion]
126
- * @param {Section} options.section - the current section
127
- * @param {Journey} options.journey - the journey we are in
128
- * @param {Record<string, unknown>} [options.customViewData] additional data to send to view
129
- * @param {unknown} [options.payload]
130
- * @returns {QuestionViewModel}
131
- */
132
- toViewModel({ params, manageListQuestion, section, journey, customViewData, payload }: {
133
- params: import("#src/journey/journey-types.d.ts").RouteParams;
134
- manageListQuestion?: typeof import("#src/components/manage-list/question.js") | undefined;
135
- section: Section;
136
- journey: Journey;
137
- customViewData?: Record<string, unknown> | undefined;
138
- payload?: unknown;
139
- }): QuestionViewModel;
140
- /**
141
- * gets the base view model for this question
142
- *
143
- * @param {Section} section - the current section
144
- * @param {Journey} journey - the journey we are in
145
- * @param {Record<string, unknown>} [customViewData] additional data to send to view
146
- * @param {unknown} [payload]
147
- * @param {import('#question-types').PrepQuestionForRenderingOptions} [options] - required to support manage list question
148
- * @returns {QuestionViewModel}
149
- */
150
- prepQuestionForRendering(section: Section, journey: Journey, customViewData?: Record<string, unknown>, payload?: unknown, options?: import("#question-types").PrepQuestionForRenderingOptions): QuestionViewModel;
151
- /**
152
- * The answer to this question for use in the viewModel
153
- *
154
- * Question implementations can override this for more complex answer types
155
- *
156
- * @param {Record<string, any>} answers - collection of answers to pull the answer from, may be from the response or the request/payload
157
- * @param {Boolean} isPayload - whether the answers object is from the request/payload
158
- * @returns {*|string}
159
- */ answerForViewModel(answers: Record<string, any>, isPayload: boolean): any | string;
160
- /**
161
- * Question implementations can override this to add configuration or other values to the view model
162
- *
163
- * If possible override this method instead of prepQuestionForRendering for simple changes to the view model
164
- *
165
- * @param {QuestionViewModel} viewModel
166
- */ addCustomDataToViewModel(viewModel: QuestionViewModel): void;
167
- /**
168
- * Get the answers object from the journey response, which may be nested in an array for manage list questions
169
- *
170
- * @param {JourneyResponse} response
171
- * @param {import('#question-types').PrepQuestionForRenderingOptions} [options]
172
- * @returns {Record<string, any>}
173
- */
174
- answerObjectFromJourneyResponse(response: JourneyResponse, { params, manageListQuestion }?: import("#question-types").PrepQuestionForRenderingOptions): Record<string, any>;
175
- /**
176
- * renders the question
177
- * @param {import('express').Response} res - the express response
178
- * @param {QuestionViewModel} viewModel additional data to send to view
179
- * @returns {void}
180
- */
181
- renderAction(res: import("express").Response, viewModel: QuestionViewModel): void;
182
- /**
183
- * check for validation errors
184
- * @param {import('express').Request} req
185
- * @param {Journey} journey
186
- * @param {Section} section
187
- * @param {import('#src/components/manage-list/question.js')} [manageListQuestion]
188
- * @returns {QuestionViewModel|undefined} returns the view model for displaying the error or undefined if there are no errors
189
- */
190
- checkForValidationErrors(req: import("express").Request, section: Section, journey: Journey, manageListQuestion?: typeof import("#src/components/manage-list/question.js")): QuestionViewModel | undefined;
191
- /**
192
- * Get the data to save from the request, returns an object of answers
193
- *
194
- * @param {import('express').Request} req
195
- * @param {JourneyResponse} journeyResponse - current journey response
196
- * @returns {Promise<{ answers: Record<string, unknown> }>}
197
- */ getDataToSave(req: import("express").Request, journeyResponse: JourneyResponse): Promise<{
198
- answers: Record<string, unknown>;
199
- }>;
200
- /**
201
- * check for errors after saving, by default this does nothing
202
- * @param {import('express').Request} req
203
- * @param {Journey} journey
204
- * @param {Section} sectionObj
205
- * @returns {QuestionViewModel | undefined} returns the view model for displaying the error or undefined if there are no errors
206
- */ checkForSavingErrors(req: import("express").Request, sectionObj: Section, journey: Journey): QuestionViewModel | undefined;
207
- /**
208
- * Handles redirect after saving. Kept around for backwards compatibility.
209
- *
210
- * @param {import('express').Response} res
211
- * @param {Journey} journey
212
- * @param {string} sectionSegment
213
- * @param {string} questionSegment
214
- * @returns {void}
215
- * @deprecated - use `journey.redirectToNextQuestion`
216
- */
217
- handleNextQuestion(res: import("express").Response, journey: Journey, sectionSegment: string, questionSegment: string): void;
218
- /**
219
- * returns the formatted answers values to be used to build task list elements
220
- * @param {String} sectionSegment
221
- * @param {Journey} journey
222
- * @param {Object} answer
223
- * @returns {Array<{
224
- * key: string;
225
- * value: string | Object;
226
- * action?: ActionView | ActionView[];
227
- * }>}
228
- */
229
- formatAnswerForSummary(sectionSegment: string, journey: Journey, answer: Object, capitals?: boolean): Array<{
230
- key: string;
231
- value: string | Object;
232
- action?: ActionView | ActionView[];
233
- }>;
234
- /**
235
- * Returns the action link for the question
236
- * @param {Object} answer
237
- * @param {Journey} journey
238
- * @param {String} sectionSegment
239
- * @returns {ActionView|ActionView[]|undefined}
240
- */
241
- getAction(sectionSegment: string, journey: Journey, answer: Object): ActionView | ActionView[] | undefined;
242
- /**
243
- * @param {unknown} answer
244
- * @returns {unknown}
245
- */
246
- format(answer: unknown): unknown;
247
- /**
248
- * @returns {boolean}
249
- */
250
- isRequired(): boolean;
251
- /**
252
- * @param {string} inputField
253
- * @returns {boolean}
254
- */
255
- fieldIsRequired(inputField: string): boolean;
256
- /**
257
- * @param {JourneyResponse} journeyResponse
258
- * @param {string} [fieldName] optional fieldname for multi field input questions
259
- * @returns {boolean}
260
- */
261
- isAnswered(journeyResponse: JourneyResponse, fieldName?: string): boolean;
262
- }
263
- export type PreppedQuestion = {
264
- value: Object;
265
- question: string;
266
- fieldName: string;
267
- pageTitle: string;
268
- description?: string | undefined;
269
- html?: string | undefined;
270
- };
271
- export type QuestionViewModel = Record<string, any>;
272
- import type { BaseValidator } from "#base-validator";
273
- import type { ActionLink } from "./question-types.js";
274
- import type { Section } from "#section";
275
- import type { Journey } from "#journey";
276
- import type { JourneyResponse } from "#journey-response";
277
- import type { ActionView } from "../controller.js";
278
- //# sourceMappingURL=question.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/questions/question.js"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=question.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"question.test.d.ts","sourceRoot":"","sources":["../../../src/questions/question.test.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- /** @type {Record<string, import('./question').Question>} */
2
- export const questionClasses: Record<string, any>;
3
- //# sourceMappingURL=questions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../../src/questions/questions.js"],"names":[],"mappings":"AAsBA,4DAA4D;AAC5D,8BADW,MAAM,CAAC,MAAM,EAAE,GAA6B,CAAC,CAkBrD"}
@@ -1,107 +0,0 @@
1
- /**
2
- * A value indicating the final question of a section has been reached
3
- *
4
- * @type {Symbol}
5
- */
6
- export const END_OF_SECTION: Symbol;
7
- /**
8
- * Defines a section for a questionnaire, a set of Questions
9
- * @class
10
- */
11
- export class Section {
12
- /**
13
- * Implementation of getNextQuestion given a list of questions
14
- *
15
- * @param {import('./section-types.d.ts').StaticGetNextQuestionParams} params
16
- * @returns {Question|Symbol|null}
17
- */
18
- static getNextQuestion({ questions, questionFieldName, response, takeNextQuestion, reverse }: import("./section-types.d.ts").StaticGetNextQuestionParams): Question | Symbol | null;
19
- /**
20
- * creates an instance of a section
21
- * @param {string} name
22
- * @param {string} segment
23
- */
24
- constructor(name: string, segment: string);
25
- /**
26
- * @type {string} - the display name of the section shown to user
27
- */
28
- name: string;
29
- /**
30
- * @type {string} - the unique url segment for the section
31
- */
32
- segment: string;
33
- /**
34
- * @type {Array<Question>} - questions within the section
35
- */
36
- questions: Array<Question>;
37
- /**
38
- * Add a condition to all questions in this section
39
- *
40
- * @param {QuestionCondition} shouldIncludeSection
41
- * @returns {Section}
42
- */
43
- withSectionCondition(shouldIncludeSection: QuestionCondition): Section;
44
- /**
45
- * Fluent API method for adding questions
46
- * @param {import('#src/questions/question.js').Question} question
47
- * @param {import('#src/components/manage-list/manage-list-section.js').ManageListSection} [manageListSection]
48
- * @returns {Section}
49
- */
50
- addQuestion(question: import("#src/questions/question.js").Question, manageListSection?: import("#src/components/manage-list/manage-list-section.js").ManageListSection): Section;
51
- /**
52
- * Fluent API method for attaching conditions to the previously added question
53
- * @param {QuestionCondition} shouldIncludeQuestion
54
- * @returns {Section}
55
- */
56
- withCondition(shouldIncludeQuestion: QuestionCondition): Section;
57
- withRequiredCondition(isQuestionMandatory: any, requiredFieldErrorMsg: any): this;
58
- /**
59
- * Fluent API method for starting a multi question condition
60
- * @param {string} conditionName
61
- * @param {QuestionCondition} shouldIncludeQuestion
62
- * @returns {Section}
63
- */
64
- startMultiQuestionCondition(conditionName: string, shouldIncludeQuestion: QuestionCondition): Section;
65
- /**
66
- * Fluent API method for ending a multi question condition
67
- * @param {string} conditionName
68
- * @returns {Section}
69
- */
70
- endMultiQuestionCondition(conditionName: string): Section;
71
- /**
72
- * Get the next question in this section given a questionParam (question fieldName)
73
- * @param {import('./section-types.d.ts').GetNextQuestionParams} params
74
- * @returns {Question|Symbol|null}
75
- */
76
- getNextQuestion(params: import("./section-types.d.ts").GetNextQuestionParams): Question | Symbol | null;
77
- /**
78
- * checks answers on response to ensure that a answer is provided for each required question in the section
79
- * @param {JourneyResponse} journeyResponse
80
- * @returns {SectionStatus}
81
- */
82
- getStatus(journeyResponse: JourneyResponse): SectionStatus;
83
- /**
84
- * checks answers on response and return true if the status of the section is complete
85
- * @param {JourneyResponse} journeyResponse
86
- * @returns {boolean}
87
- */
88
- isComplete(journeyResponse: JourneyResponse): boolean;
89
- #private;
90
- }
91
- export type SECTION_STATUS = SectionStatus;
92
- /**
93
- * @typedef {string} SectionStatus
94
- */
95
- /**
96
- * @enum {SectionStatus}
97
- */
98
- export const SECTION_STATUS: Readonly<{
99
- NOT_STARTED: "Not started";
100
- IN_PROGRESS: "In progress";
101
- COMPLETE: "Completed";
102
- }>;
103
- export type Question = any;
104
- export type JourneyResponse = any;
105
- export type QuestionCondition = ((response: JourneyResponse) => boolean);
106
- export type SectionStatus = string;
107
- //# sourceMappingURL=section.d.ts.map
@@ -1 +0,0 @@
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;IACH,kBAHW,MAAM,WACN,MAAM,EAKhB;IAxCD;;OAEG;IACH,MAFU,MAAM,CAEX;IAEL;;OAEG;IACH,SAFU,MAAM,CAER;IAER;;OAEG;IACH,WAFU,KAAK,CAAC,QAAQ,CAAC,CAEV;IA6Bf;;;;;OAKG;IACH,2CAHW,iBAAiB,GACf,OAAO,CAcnB;IAED;;;;;OAKG;IACH,sBAJW,OAAO,4BAA4B,EAAE,QAAQ,sBAC7C,OAAO,oDAAoD,EAAE,iBAAiB,GAC5E,OAAO,CAgBnB;IA8BD;;;;OAIG;IACH,qCAHW,iBAAiB,GACf,OAAO,CAanB;IAED,kFAoBC;IAED;;;;;OAKG;IACH,2CAJW,MAAM,yBACN,iBAAiB,GACf,OAAO,CAQnB;IAED;;;;OAIG;IACH,yCAHW,MAAM,GACJ,OAAO,CAQnB;IAED;;;;OAIG;IACH,wBAHW,OAAO,sBAAsB,EAAE,qBAAqB,GAClD,QAAQ,GAAC,MAAM,GAAC,IAAI,CAuBhC;IA4BD;;;;OAIG;IACH,2BAHW,eAAe,GACb,aAAa,CAoDzB;IAED;;;;OAIG;IACH,4BAHW,eAAe,GACb,OAAO,CAInB;;CAKD;6BAOS,aAAa;AALvB;;GAEG;AAEH;;GAEG;AACH;;;;GAIG;;;gCA7UU,CAAC,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAC;4BAmUxC,MAAM"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=section.test.d.ts.map