@inseefr/lunatic 3.8.0-rc.ucq-options-variable.0 → 3.8.1-rc.0

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 (65) hide show
  1. package/components/Suggester/Suggester.js +19 -7
  2. package/components/Suggester/Suggester.js.map +1 -1
  3. package/components/Suggester/Suggester.spec.js +8 -1
  4. package/components/Suggester/Suggester.spec.js.map +1 -1
  5. package/components/Suggester/useSuggestions.d.ts +21 -2
  6. package/components/Suggester/useSuggestions.js +26 -12
  7. package/components/Suggester/useSuggestions.js.map +1 -1
  8. package/esm/components/Suggester/Suggester.js +21 -8
  9. package/esm/components/Suggester/Suggester.js.map +1 -1
  10. package/esm/components/Suggester/Suggester.spec.js +8 -1
  11. package/esm/components/Suggester/Suggester.spec.js.map +1 -1
  12. package/esm/components/Suggester/useSuggestions.d.ts +21 -2
  13. package/esm/components/Suggester/useSuggestions.js +24 -10
  14. package/esm/components/Suggester/useSuggestions.js.map +1 -1
  15. package/esm/type.source.d.ts +3 -9
  16. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +1 -1
  17. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
  18. package/esm/use-lunatic/commons/fill-components/fill-components.js +2 -10
  19. package/esm/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
  20. package/esm/use-lunatic/props/propOptions.d.ts +1 -9
  21. package/esm/use-lunatic/props/propOptions.js +1 -56
  22. package/esm/use-lunatic/props/propOptions.js.map +1 -1
  23. package/esm/use-lunatic/props/propOptions.spec.js +56 -220
  24. package/esm/use-lunatic/props/propOptions.spec.js.map +1 -1
  25. package/esm/utils/search/SearchInterface.d.ts +1 -0
  26. package/esm/utils/search/SearchMinisearch.d.ts +1 -0
  27. package/esm/utils/search/SearchMinisearch.js +6 -0
  28. package/esm/utils/search/SearchMinisearch.js.map +1 -1
  29. package/esm/utils/search/SuggestersDatabase.d.ts +7 -0
  30. package/esm/utils/search/SuggestersDatabase.js.map +1 -1
  31. package/package.json +1 -4
  32. package/src/components/Suggester/Suggester.spec.tsx +9 -1
  33. package/src/components/Suggester/Suggester.tsx +21 -8
  34. package/src/components/Suggester/useSuggestions.ts +39 -18
  35. package/src/stories/checkbox/checkbox.stories.tsx +0 -13
  36. package/src/stories/dropdown/dropdown.stories.tsx +0 -12
  37. package/src/stories/radio/radio.stories.tsx +0 -13
  38. package/src/type.source.ts +3 -9
  39. package/src/use-lunatic/commons/fill-components/fill-component-expressions.ts +1 -2
  40. package/src/use-lunatic/commons/fill-components/fill-components.ts +10 -9
  41. package/src/use-lunatic/props/propOptions.spec.ts +147 -217
  42. package/src/use-lunatic/props/propOptions.ts +8 -97
  43. package/src/utils/search/SearchInterface.ts +2 -0
  44. package/src/utils/search/SearchMinisearch.ts +7 -0
  45. package/src/utils/search/SuggestersDatabase.ts +10 -0
  46. package/tsconfig.build.tsbuildinfo +1 -1
  47. package/type.source.d.ts +3 -9
  48. package/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +1 -1
  49. package/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
  50. package/use-lunatic/commons/fill-components/fill-components.js +1 -9
  51. package/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
  52. package/use-lunatic/props/propOptions.d.ts +1 -9
  53. package/use-lunatic/props/propOptions.js +2 -57
  54. package/use-lunatic/props/propOptions.js.map +1 -1
  55. package/use-lunatic/props/propOptions.spec.js +55 -217
  56. package/use-lunatic/props/propOptions.spec.js.map +1 -1
  57. package/utils/search/SearchInterface.d.ts +1 -0
  58. package/utils/search/SearchMinisearch.d.ts +1 -0
  59. package/utils/search/SearchMinisearch.js +6 -0
  60. package/utils/search/SearchMinisearch.js.map +1 -1
  61. package/utils/search/SuggestersDatabase.d.ts +7 -0
  62. package/utils/search/SuggestersDatabase.js.map +1 -1
  63. package/src/stories/checkbox/sourceOneDynamicOptions.json +0 -496
  64. package/src/stories/dropdown/sourceDynamicOptions.json +0 -496
  65. package/src/stories/radio/sourceDynamicOptions.json +0 -496
@@ -1,496 +0,0 @@
1
- {
2
- "id": "mkb7cgp3",
3
- "label": {
4
- "type": "VTL|MD",
5
- "value": "feat: QCU basé sur une variable - QR"
6
- },
7
- "modele": "FEATQCUBAS",
8
- "maxPage": "7",
9
- "cleaning": {},
10
- "resizing": {
11
- "NBHAB": {
12
- "size": "NBHAB",
13
- "variables": ["PRENOM", "AGE"]
14
- },
15
- "PRENOM": {
16
- "size": "count(PRENOM)",
17
- "variables": ["QCUDANSBOU"]
18
- }
19
- },
20
- "variables": [
21
- {
22
- "name": "NBHAB",
23
- "values": {
24
- "COLLECTED": null
25
- },
26
- "dimension": 0,
27
- "variableType": "COLLECTED"
28
- },
29
- {
30
- "name": "PRENOM",
31
- "values": {
32
- "COLLECTED": []
33
- },
34
- "dimension": 1,
35
- "variableType": "COLLECTED",
36
- "iterationReference": "mkb798x7"
37
- },
38
- {
39
- "name": "AGE",
40
- "values": {
41
- "COLLECTED": []
42
- },
43
- "dimension": 1,
44
- "variableType": "COLLECTED",
45
- "iterationReference": "mkb798x7"
46
- },
47
- {
48
- "name": "QCUHORSBOU",
49
- "values": {
50
- "COLLECTED": null
51
- },
52
- "dimension": 0,
53
- "variableType": "COLLECTED"
54
- },
55
- {
56
- "name": "QCUDANSBOU",
57
- "values": {
58
- "COLLECTED": []
59
- },
60
- "dimension": 1,
61
- "variableType": "COLLECTED",
62
- "iterationReference": "mkb798x7"
63
- },
64
- {
65
- "name": "FILTER_RESULT_NBHAB",
66
- "dimension": 0,
67
- "expression": {
68
- "type": "VTL",
69
- "value": "true"
70
- },
71
- "variableType": "CALCULATED",
72
- "isIgnoredByLunatic": true
73
- },
74
- {
75
- "name": "FILTER_RESULT_PRENOM",
76
- "dimension": 1,
77
- "shapeFrom": ["PRENOM", "AGE"],
78
- "expression": {
79
- "type": "VTL",
80
- "value": "true"
81
- },
82
- "variableType": "CALCULATED",
83
- "isIgnoredByLunatic": true,
84
- "iterationReference": "mkb798x7"
85
- },
86
- {
87
- "name": "FILTER_RESULT_AGE",
88
- "dimension": 1,
89
- "shapeFrom": ["PRENOM", "AGE"],
90
- "expression": {
91
- "type": "VTL",
92
- "value": "true"
93
- },
94
- "variableType": "CALCULATED",
95
- "isIgnoredByLunatic": true,
96
- "iterationReference": "mkb798x7"
97
- },
98
- {
99
- "name": "FILTER_RESULT_QCUHORSBOU",
100
- "dimension": 0,
101
- "expression": {
102
- "type": "VTL",
103
- "value": "true"
104
- },
105
- "variableType": "CALCULATED",
106
- "isIgnoredByLunatic": true
107
- },
108
- {
109
- "name": "FILTER_RESULT_QCUDANSBOU",
110
- "dimension": 1,
111
- "shapeFrom": ["PRENOM", "AGE"],
112
- "expression": {
113
- "type": "VTL",
114
- "value": "true"
115
- },
116
- "variableType": "CALCULATED",
117
- "isIgnoredByLunatic": true,
118
- "iterationReference": "mkb798x7"
119
- }
120
- ],
121
- "components": [
122
- {
123
- "id": "mkb6zd6d",
124
- "page": "1",
125
- "label": {
126
- "type": "VTL",
127
- "value": "\"I - \" || \"S1\""
128
- },
129
- "componentType": "Sequence",
130
- "conditionFilter": {
131
- "type": "VTL",
132
- "value": "true"
133
- }
134
- },
135
- {
136
- "id": "question-mkb7hxy8",
137
- "page": "2",
138
- "label": {
139
- "type": "VTL|MD",
140
- "value": "\"Nombre d'habitants\""
141
- },
142
- "components": [
143
- {
144
- "id": "mkb7hxy8",
145
- "max": 10.0,
146
- "min": 0.0,
147
- "page": "2",
148
- "controls": [
149
- {
150
- "id": "mkb7hxy8-format-borne-inf-sup",
151
- "type": "SIMPLE",
152
- "control": {
153
- "type": "VTL",
154
- "value": "not(not(isnull(NBHAB)) and (0>NBHAB or 10<NBHAB))"
155
- },
156
- "criticality": "ERROR",
157
- "errorMessage": {
158
- "type": "VTL|MD",
159
- "value": "\" La valeur doit être comprise entre 0 et 10\""
160
- },
161
- "typeOfControl": "FORMAT"
162
- },
163
- {
164
- "id": "mkb7hxy8-format-decimal",
165
- "type": "SIMPLE",
166
- "control": {
167
- "type": "VTL",
168
- "value": "not(not(isnull(NBHAB)) and round(NBHAB,0)<>NBHAB)"
169
- },
170
- "criticality": "ERROR",
171
- "errorMessage": {
172
- "type": "VTL|MD",
173
- "value": "\"Le nombre doit comporter au maximum 0 chiffre(s) après la virgule\""
174
- },
175
- "typeOfControl": "FORMAT"
176
- }
177
- ],
178
- "decimals": 0,
179
- "response": {
180
- "name": "NBHAB"
181
- },
182
- "description": {
183
- "type": "TXT",
184
- "value": "Format attendu : un nombre entre 0 et 10"
185
- },
186
- "isMandatory": false,
187
- "componentType": "InputNumber"
188
- }
189
- ],
190
- "componentType": "Question",
191
- "conditionFilter": {
192
- "type": "VTL",
193
- "value": "true"
194
- }
195
- },
196
- {
197
- "id": "mkb798x7",
198
- "page": "3",
199
- "depth": 1,
200
- "lines": {
201
- "max": {
202
- "type": "VTL",
203
- "value": "NBHAB"
204
- },
205
- "min": {
206
- "type": "VTL",
207
- "value": "NBHAB"
208
- }
209
- },
210
- "components": [
211
- {
212
- "id": "mkb6z1pv",
213
- "page": "3",
214
- "label": {
215
- "type": "VTL",
216
- "value": "\"II - \" || \"THL\"",
217
- "shapeFrom": "PRENOM"
218
- },
219
- "componentType": "Sequence",
220
- "conditionFilter": {
221
- "type": "VTL",
222
- "value": "true",
223
- "shapeFrom": "PRENOM"
224
- }
225
- },
226
- {
227
- "id": "question-mkb7180z",
228
- "page": "3",
229
- "label": {
230
- "type": "VTL|MD",
231
- "value": "\"Prénom\""
232
- },
233
- "components": [
234
- {
235
- "id": "mkb7180z",
236
- "page": "3",
237
- "response": {
238
- "name": "PRENOM"
239
- },
240
- "maxLength": 249,
241
- "isMandatory": false,
242
- "componentType": "Input"
243
- }
244
- ],
245
- "componentType": "Question",
246
- "conditionFilter": {
247
- "type": "VTL",
248
- "value": "true"
249
- }
250
- },
251
- {
252
- "id": "question-mkb7gox2",
253
- "page": "3",
254
- "label": {
255
- "type": "VTL|MD",
256
- "value": "\"Âge\""
257
- },
258
- "components": [
259
- {
260
- "id": "mkb7gox2",
261
- "max": 100.0,
262
- "min": 0.0,
263
- "page": "3",
264
- "controls": [
265
- {
266
- "id": "mkb7gox2-format-borne-inf-sup",
267
- "type": "SIMPLE",
268
- "control": {
269
- "type": "VTL",
270
- "value": "not(not(isnull(AGE)) and (0>AGE or 100<AGE))"
271
- },
272
- "criticality": "ERROR",
273
- "errorMessage": {
274
- "type": "VTL|MD",
275
- "value": "\" La valeur doit être comprise entre 0 et 100\""
276
- },
277
- "typeOfControl": "FORMAT"
278
- },
279
- {
280
- "id": "mkb7gox2-format-decimal",
281
- "type": "SIMPLE",
282
- "control": {
283
- "type": "VTL",
284
- "value": "not(not(isnull(AGE)) and round(AGE,0)<>AGE)"
285
- },
286
- "criticality": "ERROR",
287
- "errorMessage": {
288
- "type": "VTL|MD",
289
- "value": "\"Le nombre doit comporter au maximum 0 chiffre(s) après la virgule\""
290
- },
291
- "typeOfControl": "FORMAT"
292
- }
293
- ],
294
- "decimals": 0,
295
- "response": {
296
- "name": "AGE"
297
- },
298
- "description": {
299
- "type": "TXT",
300
- "value": "Format attendu : un nombre entre 0 et 100"
301
- },
302
- "isMandatory": false,
303
- "componentType": "InputNumber"
304
- }
305
- ],
306
- "componentType": "Question",
307
- "conditionFilter": {
308
- "type": "VTL",
309
- "value": "true"
310
- }
311
- }
312
- ],
313
- "componentType": "Loop",
314
- "paginatedLoop": false,
315
- "conditionFilter": {
316
- "type": "VTL",
317
- "value": "(true)"
318
- },
319
- "loopDependencies": ["NBHAB"],
320
- "isPaginatedByIterations": false
321
- },
322
- {
323
- "id": "mkb7ed5t",
324
- "page": "4",
325
- "label": {
326
- "type": "VTL",
327
- "value": "\"III - \" || \"S2\""
328
- },
329
- "componentType": "Sequence",
330
- "conditionFilter": {
331
- "type": "VTL",
332
- "value": "true"
333
- }
334
- },
335
- {
336
- "id": "question-mkb7ktxx",
337
- "page": "5",
338
- "label": {
339
- "type": "VTL|MD",
340
- "value": "\"QCU hors boucle\""
341
- },
342
- "components": [
343
- {
344
- "id": "mkb7ktxx",
345
- "page": "5",
346
- "optionSource": "PRENOM",
347
- "optionFilter": {
348
- "type": "VTL",
349
- "value": "AGE >= 18",
350
- "shapeFrom": "PRENOM"
351
- },
352
- "response": {
353
- "name": "QCUHORSBOU"
354
- },
355
- "isMandatory": false,
356
- "orientation": "vertical",
357
- "componentType": "Radio"
358
- }
359
- ],
360
- "declarations": [
361
- {
362
- "id": "mke55sef",
363
- "label": {
364
- "type": "VTL|MD",
365
- "value": "\"Les modalités de réponse sont les prénoms des individus ayant 18 ans ou plus\""
366
- },
367
- "position": "AFTER_QUESTION_TEXT",
368
- "declarationType": "HELP"
369
- }
370
- ],
371
- "componentType": "Question",
372
- "conditionFilter": {
373
- "type": "VTL",
374
- "value": "true"
375
- }
376
- },
377
- {
378
- "id": "mkb71vg8",
379
- "page": "6",
380
- "depth": 1,
381
- "maxPage": "2",
382
- "components": [
383
- {
384
- "id": "mkb76y5x",
385
- "page": "6.1",
386
- "label": {
387
- "type": "VTL",
388
- "value": "\"IV - \" || \"S3\"",
389
- "shapeFrom": "PRENOM"
390
- },
391
- "componentType": "Sequence",
392
- "conditionFilter": {
393
- "type": "VTL",
394
- "value": "true",
395
- "shapeFrom": "PRENOM"
396
- }
397
- },
398
- {
399
- "id": "question-mkb73lyz",
400
- "page": "6.2",
401
- "label": {
402
- "type": "VTL|MD",
403
- "value": "\"QCU dans boucle\""
404
- },
405
- "components": [
406
- {
407
- "id": "mkb73lyz",
408
- "page": "6.2",
409
- "optionSource": "PRENOM",
410
- "optionFilter": {
411
- "type": "VTL",
412
- "value": "AGE >= 18",
413
- "shapeFrom": "PRENOM"
414
- },
415
- "response": {
416
- "name": "QCUDANSBOU"
417
- },
418
- "isMandatory": false,
419
- "orientation": "vertical",
420
- "componentType": "Radio"
421
- }
422
- ],
423
- "declarations": [
424
- {
425
- "id": "mke5bdkv",
426
- "label": {
427
- "type": "VTL|MD",
428
- "value": "\"Les modalités de réponse sont les prénoms des individus ayant 18 ans ou plus\""
429
- },
430
- "position": "AFTER_QUESTION_TEXT",
431
- "declarationType": "HELP"
432
- }
433
- ],
434
- "componentType": "Question",
435
- "conditionFilter": {
436
- "type": "VTL",
437
- "value": "true"
438
- }
439
- }
440
- ],
441
- "iterations": {
442
- "type": "VTL",
443
- "value": "count(PRENOM)"
444
- },
445
- "componentType": "Loop",
446
- "paginatedLoop": true,
447
- "conditionFilter": {
448
- "type": "VTL",
449
- "value": "(true)"
450
- },
451
- "loopDependencies": ["PRENOM"]
452
- },
453
- {
454
- "id": "mkb7iuwp",
455
- "page": "7",
456
- "label": {
457
- "type": "VTL",
458
- "value": "\"V - \" || \"S4 - Fin\""
459
- },
460
- "componentType": "Sequence",
461
- "conditionFilter": {
462
- "type": "VTL",
463
- "value": "true"
464
- }
465
- }
466
- ],
467
- "pagination": "question",
468
- "suggesters": [
469
- {
470
- "name": "L_DIPLOMES-2-1-0",
471
- "fields": [
472
- {
473
- "min": 3,
474
- "name": "label",
475
- "rules": ["[\\w-]+"],
476
- "stemmer": false,
477
- "language": "French"
478
- }
479
- ],
480
- "version": 1,
481
- "queryParser": {
482
- "type": "tokenized",
483
- "params": {
484
- "min": 3,
485
- "pattern": "[\\w.-]+",
486
- "stemmer": false,
487
- "language": "French"
488
- }
489
- }
490
- }
491
- ],
492
- "componentType": "Questionnaire",
493
- "enoCoreVersion": "3.59.0",
494
- "generatingDate": "14-01-2026 14:51:23",
495
- "lunaticModelVersion": "5.11.0"
496
- }