@inseefr/lunatic 2.4.1 → 2.4.2
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/lib/components/commons/components/lunatic-component-with-label.js +5 -6
- package/lib/components/component-set/html/component-set-component-container.js +20 -0
- package/lib/components/component-set/html/component-set-components.js +59 -0
- package/lib/components/component-set/html/component-set.js +32 -0
- package/lib/components/component-set/html/legend/index.js +13 -0
- package/lib/components/component-set/html/legend/legend.js +31 -0
- package/lib/components/component-set/index.js +20 -0
- package/lib/components/component-set/lunatic-component-set.js +69 -0
- package/lib/components/components.js +9 -1
- package/lib/components/declarations/declarations.scss +8 -2
- package/lib/components/input/html/input.scss +1 -1
- package/lib/components/radio/html/radio-group-content.js +4 -2
- package/lib/components/radio/html/radio-group-content.spec.js +14 -0
- package/lib/components/radio/html/radio-group.js +8 -4
- package/lib/components/radio/html/radio-option.js +14 -10
- package/lib/components/radio/lunatic-radio-group.js +6 -3
- package/lib/components/radio/radio-group.js +5 -2
- package/lib/components/suggester/html/suggester.js +2 -1
- package/lib/i18n/dictionary.js +4 -0
- package/lib/src/i18n/dictionary.d.ts +4 -0
- package/lib/src/i18n/index.d.ts +1 -1
- package/lib/src/use-lunatic/commons/execute-expression/create-refresh-calculated.d.ts +2 -2
- package/lib/src/use-lunatic/commons/execute-expression/create-refresh-calculated.spec.d.ts +1 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +1 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +39 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +30 -0
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -2
- package/lib/src/use-lunatic/reducer/resolve-component-controls/index.d.ts +1 -0
- package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-roundabout-control.d.ts +10 -0
- package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.d.ts +3 -0
- package/lib/src/use-lunatic/replace-component-sequence.d.ts +9 -0
- package/lib/src/use-lunatic/type-source.d.ts +14 -3
- package/lib/src/use-lunatic/use-lunatic.d.ts +1 -1
- package/lib/src/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.d.ts +2 -0
- package/lib/src/utils/suggester-workers/searching/compute-score.d.ts +3 -0
- package/lib/src/utils/suggester-workers/searching/meloto-order.d.ts +24 -0
- package/lib/stories/Introduction.stories.mdx +4 -4
- package/lib/stories/checkboxGroup/source.json +4 -5
- package/lib/stories/component-set/component-set.stories.js +56 -0
- package/lib/stories/component-set/data.json +18 -0
- package/lib/stories/component-set/data1.json +18 -0
- package/lib/stories/component-set/data2.json +18 -0
- package/lib/stories/component-set/source.json +99 -0
- package/lib/stories/component-set/source1.json +287 -0
- package/lib/stories/component-set/source2.json +413 -0
- package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +1 -2
- package/lib/stories/declaration/source.json +24 -0
- package/lib/stories/loop/paginated-loop.stories.js +34 -0
- package/lib/stories/loop/source-paginated.json +126 -0
- package/lib/stories/paste-questionnaire/test.stories.js +1 -1
- package/lib/stories/questionnaires-test/controls/controls-externes.json +75 -0
- package/lib/stories/questionnaires-test/controls/controls-externes.stories.js +62 -0
- package/lib/stories/questionnaires-test/controls/controls.stories.js +1 -1
- package/lib/stories/questionnaires-test/test.stories.js +1 -1
- package/lib/stories/questionnaires2023/bySequence/source.json +5054 -0
- package/lib/stories/questionnaires2023/bySequence/ticWeb.stories.js +64 -0
- package/lib/stories/questionnaires2023/famille/famille.stories.js +64 -0
- package/lib/stories/questionnaires2023/famille/source.json +50344 -0
- package/lib/stories/questionnaires2023/simpsons/simpsons.stories.js +64 -0
- package/lib/stories/questionnaires2023/simpsons/source.json +5176 -0
- package/lib/stories/questionnaires2023/ticTel/source.json +12888 -0
- package/lib/stories/questionnaires2023/ticTel/ticWeb.stories.js +64 -0
- package/lib/stories/questionnaires2023/ticWeb/source.json +11331 -0
- package/lib/stories/questionnaires2023/ticWeb/ticWeb.stories.js +64 -0
- package/lib/stories/resizing-questionnaire/source.json +789 -0
- package/lib/stories/resizing-questionnaire/test.stories.js +84 -0
- package/lib/stories/roundabout/source.json +16 -0
- package/lib/stories/suggester/SuggesterNotification.js +26 -0
- package/lib/stories/suggester/suggester-workers.stories.js +8 -5
- package/lib/stories/suggester/suggester.stories.js +1 -0
- package/lib/use-lunatic/actions.js +4 -4
- package/lib/use-lunatic/commons/calculated-variables.js +1 -1
- package/lib/use-lunatic/commons/compile-controls.js +4 -3
- package/lib/use-lunatic/commons/execute-expression/create-execute-expression.spec.js +155 -0
- package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +3 -2
- package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.spec.js +128 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +4 -1
- package/lib/use-lunatic/reducer/reduce-on-init.js +1 -2
- package/lib/use-lunatic/reducer/resolve-component-controls/index.js +12 -0
- package/lib/use-lunatic/reducer/{validate-controls/validation-utils.js → resolve-component-controls/resolve-component-control.js} +10 -34
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-roundabout-control.js +54 -0
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.js +44 -0
- package/lib/use-lunatic/replace-component-sequence.js +28 -0
- package/lib/use-lunatic/type-source.js +15 -9
- package/lib/use-lunatic/use-lunatic.js +1 -1
- package/lib/use-lunatic/use-suggesters.js +5 -5
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +4 -2
- package/lib/utils/suggester-workers/append-to-index/dist/create-append-task.js +4 -2
- package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.spec.js +11 -0
- package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.spec.js +10 -0
- package/lib/utils/suggester-workers/searching/compute-score.js +7 -12
- package/lib/utils/suggester-workers/searching/meloto-order.js +53 -0
- package/lib/utils/suggester-workers/searching/meloto-order.spec.js +67 -0
- package/lib/utils/suggester-workers/searching/searching.js +3 -3
- package/lib/utils/suggester-workers/searching/searching.worker.js +4 -2
- package/package.json +1 -1
- /package/lib/src/use-lunatic/reducer/{validate-controls/validation-utils.d.ts → resolve-component-controls/resolve-component-control.d.ts} +0 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxPage": "3",
|
|
3
|
+
"components": [
|
|
4
|
+
{
|
|
5
|
+
"id": "seq",
|
|
6
|
+
"componentType": "Sequence",
|
|
7
|
+
"label": {
|
|
8
|
+
"value": "\"Description des individus de votre logement\"",
|
|
9
|
+
"type": "VTL|MD"
|
|
10
|
+
},
|
|
11
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
12
|
+
"page": "1"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "loop-prenom",
|
|
16
|
+
"componentType": "Loop",
|
|
17
|
+
"label": { "value": "\"Ajouter un individu\"", "type": "VTL|MD" },
|
|
18
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
19
|
+
"bindingDependencies": ["PRENOM"],
|
|
20
|
+
"lines": {
|
|
21
|
+
"min": { "value": 1, "type": "VTL" },
|
|
22
|
+
"max": { "value": 10, "type": "VTL" }
|
|
23
|
+
},
|
|
24
|
+
"page": "1",
|
|
25
|
+
"components": [
|
|
26
|
+
{
|
|
27
|
+
"componentType": "Input",
|
|
28
|
+
"label": { "value": "\"Prénom\"", "type": "VTL|MD" },
|
|
29
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
30
|
+
"maxLength": 30,
|
|
31
|
+
"bindingDependencies": ["PRENOM"],
|
|
32
|
+
"id": "prenom",
|
|
33
|
+
"response": {
|
|
34
|
+
"name": "PRENOM"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "loop",
|
|
41
|
+
"componentType": "Loop",
|
|
42
|
+
|
|
43
|
+
"loopDependencies": ["PRENOM"],
|
|
44
|
+
"iterations": { "value": "count(PRENOM)", "type": "VTL" },
|
|
45
|
+
"page": "2",
|
|
46
|
+
"maxPage": "1",
|
|
47
|
+
"depth": 1,
|
|
48
|
+
"paginatedLoop": true,
|
|
49
|
+
"conditionFilter": {
|
|
50
|
+
"value": "true",
|
|
51
|
+
"type": "VTL"
|
|
52
|
+
},
|
|
53
|
+
"components": [
|
|
54
|
+
{
|
|
55
|
+
"id": "age1",
|
|
56
|
+
"label": {
|
|
57
|
+
"value": "PRENOM || \", quel est vôtre âge ?\"",
|
|
58
|
+
"type": "VTL"
|
|
59
|
+
},
|
|
60
|
+
"conditionFilter": {
|
|
61
|
+
"value": "true",
|
|
62
|
+
"type": "VTL"
|
|
63
|
+
},
|
|
64
|
+
"page": "2.1",
|
|
65
|
+
"componentType": "InputNumber",
|
|
66
|
+
"min": 0,
|
|
67
|
+
"max": 120,
|
|
68
|
+
"decimals": 0,
|
|
69
|
+
"response": { "name": "AGE1" }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "component-set",
|
|
73
|
+
"componentType": "ComponentSet",
|
|
74
|
+
"page": "2.1",
|
|
75
|
+
"depth": 1,
|
|
76
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
77
|
+
"label": {
|
|
78
|
+
"value": "\"## Who are you?\"",
|
|
79
|
+
"type":"VTL|MD"
|
|
80
|
+
},
|
|
81
|
+
"description": { "value": "\"This is your opportunity to tell me about yourself!\"", "type": "VTL|MD" },
|
|
82
|
+
"components": [
|
|
83
|
+
{
|
|
84
|
+
"id": "prenom",
|
|
85
|
+
"componentType": "Input",
|
|
86
|
+
"mandatory": false,
|
|
87
|
+
"maxLength": 20,
|
|
88
|
+
"label": {
|
|
89
|
+
"value": "\"Prénom\"))",
|
|
90
|
+
"type": "VTL|MD"
|
|
91
|
+
},
|
|
92
|
+
"conditionFilter": {
|
|
93
|
+
"value": "true",
|
|
94
|
+
"type": "VTL"
|
|
95
|
+
},
|
|
96
|
+
"response": { "name": "PRENOMS" }
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "age",
|
|
100
|
+
"componentType": "InputNumber",
|
|
101
|
+
"maxLength": 3,
|
|
102
|
+
"label": {
|
|
103
|
+
"value": "\"Age\"))",
|
|
104
|
+
"type": "VTL|MD"
|
|
105
|
+
},
|
|
106
|
+
"conditionFilter": {
|
|
107
|
+
"value": "true",
|
|
108
|
+
"type": "VTL"
|
|
109
|
+
},
|
|
110
|
+
"response": { "name": "AGE" },
|
|
111
|
+
"controls": [
|
|
112
|
+
{
|
|
113
|
+
"criticality": "WARN",
|
|
114
|
+
"errorMessage": {
|
|
115
|
+
"type": "VTL",
|
|
116
|
+
"value": "\"booleen pas coché et on affiche un message un peu long histoire de tester le truc \""
|
|
117
|
+
},
|
|
118
|
+
"typeOfControl": "CONSISTENCY",
|
|
119
|
+
"control": {
|
|
120
|
+
"type": "VTL",
|
|
121
|
+
"value": "false"
|
|
122
|
+
},
|
|
123
|
+
"id": "kfxmjupm-CI-0"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "j4nw5cqz",
|
|
129
|
+
"componentType": "Dropdown",
|
|
130
|
+
"mandatory": false,
|
|
131
|
+
"label": { "value": "\"In which state do The Simpsons reside?\"", "type": "VTL|MD" },
|
|
132
|
+
"description": "\"This is a test description\"",
|
|
133
|
+
"response": {
|
|
134
|
+
"name": "STATE"
|
|
135
|
+
},
|
|
136
|
+
"controls": [
|
|
137
|
+
{
|
|
138
|
+
"id": "j4nw5cqz",
|
|
139
|
+
"typeOfControl": "CONSISTENCY",
|
|
140
|
+
"criticality": "WARN",
|
|
141
|
+
"control": {
|
|
142
|
+
"value": "not(nvl(STATE,\"\") = \"13\")",
|
|
143
|
+
"type": "VTL"
|
|
144
|
+
},
|
|
145
|
+
"errorMessage": {
|
|
146
|
+
"value": "\"Please choose a state!\"",
|
|
147
|
+
"type": "VTL|MD"
|
|
148
|
+
},
|
|
149
|
+
"bindingDependencies": ["STATE"]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "j4nw5cqz",
|
|
153
|
+
"typeOfControl": "CONSISTENCY",
|
|
154
|
+
"criticality": "INFO",
|
|
155
|
+
"control": {
|
|
156
|
+
"value": "not(nvl(STATE,\"\") = \"4\")",
|
|
157
|
+
"type": "VTL"
|
|
158
|
+
},
|
|
159
|
+
"errorMessage": {
|
|
160
|
+
"value": "\"Idk if this is right, I'm just testing error messages!!\"",
|
|
161
|
+
"type": "VTL|MD"
|
|
162
|
+
},
|
|
163
|
+
"bindingDependencies": ["STATE"]
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"options": [
|
|
167
|
+
{
|
|
168
|
+
"value": "1",
|
|
169
|
+
"label": { "value": "\"Washington\"", "type": "VTL" }
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"value": "2",
|
|
173
|
+
"label": { "value": "\"Kentucky\"", "type": "VTL" }
|
|
174
|
+
},
|
|
175
|
+
{ "value": "3", "label": { "value": "\"Ohio\"", "type": "VTL" } },
|
|
176
|
+
{ "value": "4", "label": { "value": "\"Maine\"", "type": "VTL" } },
|
|
177
|
+
{
|
|
178
|
+
"value": "5",
|
|
179
|
+
"label": { "value": "\"North Dakota\"", "type": "VTL" }
|
|
180
|
+
},
|
|
181
|
+
{ "value": "6", "label": { "value": "\"Florida\"", "type": "VTL" } },
|
|
182
|
+
{
|
|
183
|
+
"value": "7",
|
|
184
|
+
"label": { "value": "\"North Takoma\"", "type": "VTL" }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"value": "8",
|
|
188
|
+
"label": { "value": "\"California\"", "type": "VTL" }
|
|
189
|
+
},
|
|
190
|
+
{ "value": "9", "label": { "value": "\"Texas\"", "type": "VTL" } },
|
|
191
|
+
{
|
|
192
|
+
"value": "10",
|
|
193
|
+
"label": { "value": "\"Massachusetts\"", "type": "VTL" }
|
|
194
|
+
},
|
|
195
|
+
{ "value": "11", "label": { "value": "\"Nevada\"", "type": "VTL" } },
|
|
196
|
+
{
|
|
197
|
+
"value": "12",
|
|
198
|
+
"label": { "value": "\"Illinois\"", "type": "VTL" }
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"value": "13",
|
|
202
|
+
"label": {
|
|
203
|
+
"value": "\"Not in any state, you fool!\"",
|
|
204
|
+
"type": "VTL"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"id": "seq-end",
|
|
215
|
+
"componentType": "Sequence",
|
|
216
|
+
"label": {
|
|
217
|
+
"value": "\"End\"",
|
|
218
|
+
"type": "VTL|MD"
|
|
219
|
+
},
|
|
220
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
221
|
+
"page": "3"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"resizing": {
|
|
225
|
+
"PRENOM": {
|
|
226
|
+
"size": "count(PRENOM)",
|
|
227
|
+
"variables": ["AGE"]
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"variables": [
|
|
231
|
+
{
|
|
232
|
+
"variableType": "COLLECTED",
|
|
233
|
+
"name": "PRENOM",
|
|
234
|
+
"values": {
|
|
235
|
+
"PREVIOUS": [null],
|
|
236
|
+
"COLLECTED": [null],
|
|
237
|
+
"FORCED": [null],
|
|
238
|
+
"EDITED": [null],
|
|
239
|
+
"INPUTED": [null]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"variableType": "COLLECTED",
|
|
244
|
+
"name": "AGE1",
|
|
245
|
+
"values": {
|
|
246
|
+
"PREVIOUS": [null],
|
|
247
|
+
"COLLECTED": [null],
|
|
248
|
+
"FORCED": [null],
|
|
249
|
+
"EDITED": [null],
|
|
250
|
+
"INPUTED": [null]
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"variableType": "COLLECTED",
|
|
255
|
+
"name": "PRENOMS",
|
|
256
|
+
"values": {
|
|
257
|
+
"PREVIOUS": [null],
|
|
258
|
+
"COLLECTED": [null],
|
|
259
|
+
"FORCED": [null],
|
|
260
|
+
"EDITED": [null],
|
|
261
|
+
"INPUTED": [null]
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"variableType": "COLLECTED",
|
|
266
|
+
"name": "AGE",
|
|
267
|
+
"values": {
|
|
268
|
+
"PREVIOUS": [null],
|
|
269
|
+
"COLLECTED": [null],
|
|
270
|
+
"FORCED": [null],
|
|
271
|
+
"EDITED": [null],
|
|
272
|
+
"INPUTED": [null]
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"variableType": "COLLECTED",
|
|
277
|
+
"name": "STATE",
|
|
278
|
+
"values": {
|
|
279
|
+
"PREVIOUS": [null],
|
|
280
|
+
"COLLECTED": [null],
|
|
281
|
+
"FORCED": [null],
|
|
282
|
+
"EDITED": [null],
|
|
283
|
+
"INPUTED": [null]
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
}
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxPage": "5",
|
|
3
|
+
"components": [
|
|
4
|
+
{
|
|
5
|
+
"id": "seq",
|
|
6
|
+
"componentType": "Sequence",
|
|
7
|
+
"label": {
|
|
8
|
+
"value": "\"Description des individus de votre logement\"",
|
|
9
|
+
"type": "VTL|MD"
|
|
10
|
+
},
|
|
11
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
12
|
+
"page": "1"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "how",
|
|
16
|
+
"componentType": "InputNumber",
|
|
17
|
+
"mandatory": false,
|
|
18
|
+
"page": "2",
|
|
19
|
+
"min": 1,
|
|
20
|
+
"max": 10,
|
|
21
|
+
"decimals": 0,
|
|
22
|
+
"label": {
|
|
23
|
+
"value": "\"Combien de personnes vivent habituellement à votre adresse ?\"",
|
|
24
|
+
"type": "VTL|MD"
|
|
25
|
+
},
|
|
26
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
27
|
+
"response": { "name": "NB_HAB" }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "loop",
|
|
31
|
+
"componentType": "Loop",
|
|
32
|
+
"page": "3",
|
|
33
|
+
"depth": 1,
|
|
34
|
+
"paginatedLoop": false,
|
|
35
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
36
|
+
"loopDependencies": ["NHAB"],
|
|
37
|
+
"lines": {
|
|
38
|
+
"min": { "value": "NB_HAB", "type": "VTL" },
|
|
39
|
+
"max": { "value": "NB_HAB", "type": "VTL" }
|
|
40
|
+
},
|
|
41
|
+
"components": [
|
|
42
|
+
{
|
|
43
|
+
"componentType": "Input",
|
|
44
|
+
"label": { "value": "\"Prénom\"", "type": "VTL|MD" },
|
|
45
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
46
|
+
"maxLength": 30,
|
|
47
|
+
"bindingDependencies": ["PRENOM"],
|
|
48
|
+
"id": "prenom",
|
|
49
|
+
"response": {
|
|
50
|
+
"name": "PRENOM"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "roundabout",
|
|
57
|
+
"componentType": "Roundabout",
|
|
58
|
+
"page": "4",
|
|
59
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
60
|
+
"iterations": { "value": "NB_HAB", "type": "VTL" },
|
|
61
|
+
"label": { "value": "\"Libellé du rondpoint\"", "type": "VTL" },
|
|
62
|
+
"locked": true,
|
|
63
|
+
"expressions": {
|
|
64
|
+
"unnecessary": {
|
|
65
|
+
"value": "AGELOOP < 13",
|
|
66
|
+
"type": "VTL"
|
|
67
|
+
},
|
|
68
|
+
"complete": {
|
|
69
|
+
"value": "not(isnull(KNOWREC)) and not(isnull(SEXE)) and not(isnull(SOMETHING))",
|
|
70
|
+
"type": "VTL"
|
|
71
|
+
},
|
|
72
|
+
"partial": {
|
|
73
|
+
"value": "not(isnull(KNOWREC)) or not(isnull(SEXE)) or not(isnull(SOMETHING))",
|
|
74
|
+
"type": "VTL"
|
|
75
|
+
},
|
|
76
|
+
"label": {
|
|
77
|
+
"value": "\"Série de question pour \" || PRENOM",
|
|
78
|
+
"type": "VTL"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"components": [
|
|
82
|
+
{
|
|
83
|
+
"id": "radio",
|
|
84
|
+
"componentType": "Radio",
|
|
85
|
+
"mandatory": false,
|
|
86
|
+
"page": "4.1",
|
|
87
|
+
"label": {
|
|
88
|
+
"value": "\"Connaissez-vous le recensement de la population ?\"",
|
|
89
|
+
"type": "VTL|MD"
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
93
|
+
|
|
94
|
+
"options": [
|
|
95
|
+
{ "value": "1", "label": { "value": "\"oui\"", "type": "VTL|MD" } },
|
|
96
|
+
|
|
97
|
+
{ "value": "2", "label": { "value": "\"non\"", "type": "VTL|MD" } }
|
|
98
|
+
],
|
|
99
|
+
"response": { "name": "KNOWREC" }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "jsygk7m7",
|
|
103
|
+
"componentType": "Subsequence",
|
|
104
|
+
"page": "4.2",
|
|
105
|
+
"label": {
|
|
106
|
+
"value": "\"Deuxième page de questions pour \"|| PRENOM",
|
|
107
|
+
"type": "VTL|MD"
|
|
108
|
+
},
|
|
109
|
+
"conditionFilter": { "value": "true", "type": "VTL" }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "component-set",
|
|
113
|
+
"componentType": "ComponentSet",
|
|
114
|
+
"page": "4.2",
|
|
115
|
+
"depth": 1,
|
|
116
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
117
|
+
"label": {
|
|
118
|
+
"value": "\"## Who are you? <- this is inside a roundabout ->\"",
|
|
119
|
+
"type":"VTL|MD"
|
|
120
|
+
},
|
|
121
|
+
"description": { "value": "\"This is your opportunity to tell me about yourself!\"", "type": "VTL|MD" },
|
|
122
|
+
"components": [
|
|
123
|
+
{
|
|
124
|
+
"id": "color",
|
|
125
|
+
"componentType": "Input",
|
|
126
|
+
"mandatory": false,
|
|
127
|
+
"maxLength": 20,
|
|
128
|
+
"label": {
|
|
129
|
+
"value": "\"Favourite Color?\"))",
|
|
130
|
+
"type": "VTL|MD"
|
|
131
|
+
},
|
|
132
|
+
"conditionFilter": {
|
|
133
|
+
"value": "true",
|
|
134
|
+
"type": "VTL"
|
|
135
|
+
},
|
|
136
|
+
"controls": [
|
|
137
|
+
{
|
|
138
|
+
"criticality": "WARN",
|
|
139
|
+
"errorMessage": {
|
|
140
|
+
"type": "VTL",
|
|
141
|
+
"value": "\"booleen pas coché et on affiche un message un peu long histoire de tester le truc \""
|
|
142
|
+
},
|
|
143
|
+
"typeOfControl": "CONSISTENCY",
|
|
144
|
+
"control": {
|
|
145
|
+
"type": "VTL",
|
|
146
|
+
"value": "false"
|
|
147
|
+
},
|
|
148
|
+
"id": "kfxmjupm-CI-0"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"response": { "name": "COLOR" }
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "sexe",
|
|
155
|
+
"componentType": "Radio",
|
|
156
|
+
"label": {
|
|
157
|
+
"value": "\"Sexe\"",
|
|
158
|
+
"type": "VTL"
|
|
159
|
+
},
|
|
160
|
+
"conditionFilter": {
|
|
161
|
+
"value": "true",
|
|
162
|
+
"type": "VTL"
|
|
163
|
+
},
|
|
164
|
+
"options": [
|
|
165
|
+
{
|
|
166
|
+
"value": "1",
|
|
167
|
+
"label": { "value": "\"Homme\"", "type": "VTL|MD" }
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"value": "2",
|
|
171
|
+
"label": { "value": "\"Femme\"", "type": "VTL|MD" }
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"response": { "name": "SEXE" }
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "j4nw5cqz",
|
|
178
|
+
"componentType": "Dropdown",
|
|
179
|
+
"mandatory": false,
|
|
180
|
+
"label": { "value": "\"In which state do The Simpsons reside?\"", "type": "VTL|MD" },
|
|
181
|
+
"description": "\"This is a test description\"",
|
|
182
|
+
"response": {
|
|
183
|
+
"name": "STATE"
|
|
184
|
+
},
|
|
185
|
+
"controls": [
|
|
186
|
+
{
|
|
187
|
+
"id": "j4nw5cqz",
|
|
188
|
+
"typeOfControl": "CONSISTENCY",
|
|
189
|
+
"criticality": "WARN",
|
|
190
|
+
"control": {
|
|
191
|
+
"value": "not(nvl(STATE,\"\") = \"13\")",
|
|
192
|
+
"type": "VTL"
|
|
193
|
+
},
|
|
194
|
+
"errorMessage": {
|
|
195
|
+
"value": "\"Please choose a state!\"",
|
|
196
|
+
"type": "VTL|MD"
|
|
197
|
+
},
|
|
198
|
+
"bindingDependencies": ["STATE"]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "j4nw5cqz",
|
|
202
|
+
"typeOfControl": "CONSISTENCY",
|
|
203
|
+
"criticality": "INFO",
|
|
204
|
+
"control": {
|
|
205
|
+
"value": "not(nvl(STATE,\"\") = \"4\")",
|
|
206
|
+
"type": "VTL"
|
|
207
|
+
},
|
|
208
|
+
"errorMessage": {
|
|
209
|
+
"value": "\"Idk if this is right, I'm just testing error messages!!\"",
|
|
210
|
+
"type": "VTL|MD"
|
|
211
|
+
},
|
|
212
|
+
"bindingDependencies": ["STATE"]
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"options": [
|
|
216
|
+
{
|
|
217
|
+
"value": "1",
|
|
218
|
+
"label": { "value": "\"Washington\"", "type": "VTL" }
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"value": "2",
|
|
222
|
+
"label": { "value": "\"Kentucky\"", "type": "VTL" }
|
|
223
|
+
},
|
|
224
|
+
{ "value": "3", "label": { "value": "\"Ohio\"", "type": "VTL" } },
|
|
225
|
+
{ "value": "4", "label": { "value": "\"Maine\"", "type": "VTL" } },
|
|
226
|
+
{
|
|
227
|
+
"value": "5",
|
|
228
|
+
"label": { "value": "\"North Dakota\"", "type": "VTL" }
|
|
229
|
+
},
|
|
230
|
+
{ "value": "6", "label": { "value": "\"Florida\"", "type": "VTL" } },
|
|
231
|
+
{
|
|
232
|
+
"value": "7",
|
|
233
|
+
"label": { "value": "\"North Takoma\"", "type": "VTL" }
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"value": "8",
|
|
237
|
+
"label": { "value": "\"California\"", "type": "VTL" }
|
|
238
|
+
},
|
|
239
|
+
{ "value": "9", "label": { "value": "\"Texas\"", "type": "VTL" } },
|
|
240
|
+
{
|
|
241
|
+
"value": "10",
|
|
242
|
+
"label": { "value": "\"Massachusetts\"", "type": "VTL" }
|
|
243
|
+
},
|
|
244
|
+
{ "value": "11", "label": { "value": "\"Nevada\"", "type": "VTL" } },
|
|
245
|
+
{
|
|
246
|
+
"value": "12",
|
|
247
|
+
"label": { "value": "\"Illinois\"", "type": "VTL" }
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"value": "13",
|
|
251
|
+
"label": {
|
|
252
|
+
"value": "\"Not in any state, you fool!\"",
|
|
253
|
+
"type": "VTL"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "jsygk7m7",
|
|
262
|
+
"componentType": "Subsequence",
|
|
263
|
+
"page": "4.3",
|
|
264
|
+
"label": {
|
|
265
|
+
"value": "\"Troisième page de questions \" || PRENOM",
|
|
266
|
+
"type": "VTL|MD"
|
|
267
|
+
},
|
|
268
|
+
"conditionFilter": { "value": "true", "type": "VTL" }
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "kmno1n7m",
|
|
272
|
+
"componentType": "Input",
|
|
273
|
+
"maxLength": 30,
|
|
274
|
+
"page": "4.3",
|
|
275
|
+
"label": {
|
|
276
|
+
"value": "\"Dites quelque chose.\"))",
|
|
277
|
+
"type": "VTL|MD"
|
|
278
|
+
},
|
|
279
|
+
"conditionFilter": {
|
|
280
|
+
"value": "true",
|
|
281
|
+
"type": "VTL"
|
|
282
|
+
},
|
|
283
|
+
"response": { "name": "SOMETHING" }
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
|
|
288
|
+
{
|
|
289
|
+
"id": "seq",
|
|
290
|
+
"componentType": "Sequence",
|
|
291
|
+
"label": {
|
|
292
|
+
"value": "\"Merci !\"",
|
|
293
|
+
"type": "VTL|MD"
|
|
294
|
+
},
|
|
295
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
296
|
+
"page": "5"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"variables": [
|
|
300
|
+
{
|
|
301
|
+
"variableType": "COLLECTED",
|
|
302
|
+
"name": "NB_HAB",
|
|
303
|
+
"values": {
|
|
304
|
+
"PREVIOUS": null,
|
|
305
|
+
"COLLECTED": null,
|
|
306
|
+
"FORCED": null,
|
|
307
|
+
"EDITED": null,
|
|
308
|
+
"INPUTED": null
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"variableType": "COLLECTED",
|
|
313
|
+
"name": "PRENOM",
|
|
314
|
+
"values": {
|
|
315
|
+
"PREVIOUS": [null],
|
|
316
|
+
"COLLECTED": [null],
|
|
317
|
+
"FORCED": [null],
|
|
318
|
+
"EDITED": [null],
|
|
319
|
+
"INPUTED": [null]
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"variableType": "COLLECTED",
|
|
324
|
+
"name": "AGELOOP",
|
|
325
|
+
"values": {
|
|
326
|
+
"PREVIOUS": [null],
|
|
327
|
+
"COLLECTED": [null],
|
|
328
|
+
"FORCED": [null],
|
|
329
|
+
"EDITED": [null],
|
|
330
|
+
"INPUTED": [null]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"variableType": "COLLECTED",
|
|
335
|
+
"name": "KNOWREC",
|
|
336
|
+
"values": {
|
|
337
|
+
"PREVIOUS": [null],
|
|
338
|
+
"COLLECTED": [null],
|
|
339
|
+
"FORCED": [null],
|
|
340
|
+
"EDITED": [null],
|
|
341
|
+
"INPUTED": [null]
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"variableType": "COLLECTED",
|
|
346
|
+
"name": "COLOR",
|
|
347
|
+
"values": {
|
|
348
|
+
"PREVIOUS": [null],
|
|
349
|
+
"COLLECTED": [null],
|
|
350
|
+
"FORCED": [null],
|
|
351
|
+
"EDITED": [null],
|
|
352
|
+
"INPUTED": [null]
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"variableType": "COLLECTED",
|
|
357
|
+
"name": "SEXE",
|
|
358
|
+
"values": {
|
|
359
|
+
"PREVIOUS": [null],
|
|
360
|
+
"COLLECTED": [null],
|
|
361
|
+
"FORCED": [null],
|
|
362
|
+
"EDITED": [null],
|
|
363
|
+
"INPUTED": [null]
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"variableType": "COLLECTED",
|
|
368
|
+
"name": "STATE",
|
|
369
|
+
"values": {
|
|
370
|
+
"PREVIOUS": [null],
|
|
371
|
+
"COLLECTED": [null],
|
|
372
|
+
"FORCED": [null],
|
|
373
|
+
"EDITED": [null],
|
|
374
|
+
"INPUTED": [null]
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"variableType": "COLLECTED",
|
|
379
|
+
"name": "SOMETHING",
|
|
380
|
+
"values": {
|
|
381
|
+
"PREVIOUS": [null],
|
|
382
|
+
"COLLECTED": [null],
|
|
383
|
+
"FORCED": [null],
|
|
384
|
+
"EDITED": [null],
|
|
385
|
+
"INPUTED": [null]
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"variableType": "COLLECTED",
|
|
390
|
+
"name": "PRENOM",
|
|
391
|
+
"values": {
|
|
392
|
+
"PREVIOUS": [null],
|
|
393
|
+
"COLLECTED": [null],
|
|
394
|
+
"FORCED": [null],
|
|
395
|
+
"EDITED": [null],
|
|
396
|
+
"INPUTED": [null]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"variableType": "CALCULATED",
|
|
401
|
+
"name": "PRENOMREF",
|
|
402
|
+
"expression": { "value": "first_value(PRENOM over())", "type": "VTL" },
|
|
403
|
+
"bindingDependencies": ["PRENOM"],
|
|
404
|
+
"inFilter": "true"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"resizing": {
|
|
408
|
+
"NB_HAB": {
|
|
409
|
+
"size": "NB_HAB",
|
|
410
|
+
"variables": ["PRENOM", "AGELOOP", "SEXE", "SOMETHING", "DATNAIS"]
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|