@inseefr/lunatic 3.11.2 → 3.12.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 (287) hide show
  1. package/components/Accordion/Accordion.d.ts +1 -1
  2. package/components/Datepicker/DatepickerFields.js +4 -2
  3. package/components/Datepicker/DatepickerFields.js.map +1 -1
  4. package/components/Duration/getDurationFromValue.js +3 -3
  5. package/components/Duration/getDurationFromValue.js.map +1 -1
  6. package/components/FilterDescription/FilterDescription.d.ts +1 -1
  7. package/components/LunaticComponents.d.ts +1 -1
  8. package/components/LunaticComponents.js +9 -7
  9. package/components/LunaticComponents.js.map +1 -1
  10. package/components/PairwiseLinks/PairwiseLinks.d.ts +1 -1
  11. package/components/PairwiseLinks/PairwiseLinks.js +15 -30
  12. package/components/PairwiseLinks/PairwiseLinks.js.map +1 -1
  13. package/components/PairwiseLinks/PairwiseMirror.d.ts +2 -0
  14. package/components/PairwiseLinks/PairwiseMirror.js +14 -0
  15. package/components/PairwiseLinks/PairwiseMirror.js.map +1 -0
  16. package/components/PairwiseLinks/combinations.d.ts +18 -0
  17. package/components/PairwiseLinks/combinations.js +29 -0
  18. package/components/PairwiseLinks/combinations.js.map +1 -0
  19. package/components/Radio/Radio.d.ts +1 -1
  20. package/components/Sequence/Sequence.d.ts +1 -1
  21. package/components/Subsequence/Subsequence.d.ts +1 -1
  22. package/components/Switch/Switch.d.ts +1 -1
  23. package/components/library.d.ts +6 -6
  24. package/components/type.d.ts +25 -28
  25. package/esm/components/Accordion/Accordion.d.ts +1 -1
  26. package/esm/components/Datepicker/DatepickerFields.js +4 -2
  27. package/esm/components/Datepicker/DatepickerFields.js.map +1 -1
  28. package/esm/components/Duration/getDurationFromValue.js +3 -3
  29. package/esm/components/Duration/getDurationFromValue.js.map +1 -1
  30. package/esm/components/FilterDescription/FilterDescription.d.ts +1 -1
  31. package/esm/components/LunaticComponents.d.ts +1 -1
  32. package/esm/components/LunaticComponents.js +9 -7
  33. package/esm/components/LunaticComponents.js.map +1 -1
  34. package/esm/components/PairwiseLinks/PairwiseLinks.d.ts +1 -1
  35. package/esm/components/PairwiseLinks/PairwiseLinks.js +16 -31
  36. package/esm/components/PairwiseLinks/PairwiseLinks.js.map +1 -1
  37. package/esm/components/PairwiseLinks/PairwiseMirror.d.ts +2 -0
  38. package/esm/components/PairwiseLinks/PairwiseMirror.js +10 -0
  39. package/esm/components/PairwiseLinks/PairwiseMirror.js.map +1 -0
  40. package/esm/components/PairwiseLinks/combinations.d.ts +18 -0
  41. package/esm/components/PairwiseLinks/combinations.js +24 -0
  42. package/esm/components/PairwiseLinks/combinations.js.map +1 -0
  43. package/esm/components/Radio/Radio.d.ts +1 -1
  44. package/esm/components/Sequence/Sequence.d.ts +1 -1
  45. package/esm/components/Subsequence/Subsequence.d.ts +1 -1
  46. package/esm/components/Switch/Switch.d.ts +1 -1
  47. package/esm/components/library.d.ts +6 -6
  48. package/esm/components/type.d.ts +25 -28
  49. package/esm/index.d.ts +1 -1
  50. package/esm/index.js.map +1 -1
  51. package/esm/type.source.d.ts +43 -13
  52. package/esm/type.source.js +0 -1
  53. package/esm/type.source.js.map +1 -1
  54. package/esm/use-lunatic/commons/compile-controls.js +1 -1
  55. package/esm/use-lunatic/commons/compile-controls.js.map +1 -1
  56. package/esm/use-lunatic/commons/component.d.ts +3 -2
  57. package/esm/use-lunatic/commons/component.js +5 -0
  58. package/esm/use-lunatic/commons/component.js.map +1 -1
  59. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +1 -1
  60. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js +1 -42
  61. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
  62. package/esm/use-lunatic/commons/fill-components/fill-components.js +10 -2
  63. package/esm/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
  64. package/esm/use-lunatic/commons/index.d.ts +4 -4
  65. package/esm/use-lunatic/commons/index.js +4 -4
  66. package/esm/use-lunatic/commons/index.js.map +1 -1
  67. package/esm/use-lunatic/commons/{check-loops.d.ts → pagination/check-loops.d.ts} +7 -7
  68. package/esm/use-lunatic/commons/{check-loops.js → pagination/check-loops.js} +3 -5
  69. package/esm/use-lunatic/commons/pagination/check-loops.js.map +1 -0
  70. package/{use-lunatic/commons → esm/use-lunatic/commons/pagination}/check-pager.d.ts +1 -1
  71. package/esm/use-lunatic/commons/pagination/check-pager.js.map +1 -0
  72. package/{use-lunatic/commons → esm/use-lunatic/commons/pagination}/create-map-pages.d.ts +1 -1
  73. package/esm/use-lunatic/commons/pagination/create-map-pages.js.map +1 -0
  74. package/esm/use-lunatic/commons/{is-First-last-page.d.ts → pagination/is-First-last-page.d.ts} +1 -1
  75. package/esm/use-lunatic/commons/pagination/is-First-last-page.js.map +1 -0
  76. package/{use-lunatic/commons → esm/use-lunatic/commons/pagination}/is-paginated-loop.d.ts +1 -1
  77. package/esm/use-lunatic/commons/pagination/is-paginated-loop.js.map +1 -0
  78. package/esm/use-lunatic/commons/{is-roundabout.d.ts → pagination/is-roundabout.d.ts} +1 -1
  79. package/esm/use-lunatic/commons/pagination/is-roundabout.js.map +1 -0
  80. package/esm/use-lunatic/commons/{page-navigation.d.ts → pagination/page-navigation.d.ts} +2 -2
  81. package/esm/use-lunatic/commons/{page-navigation.js → pagination/page-navigation.js} +6 -6
  82. package/esm/use-lunatic/commons/pagination/page-navigation.js.map +1 -0
  83. package/esm/use-lunatic/commons/pagination/page-navigation.spec.js.map +1 -0
  84. package/esm/use-lunatic/commons/{page-tag.d.ts → pagination/page-tag.d.ts} +8 -1
  85. package/esm/use-lunatic/commons/{page-tag.js → pagination/page-tag.js} +17 -6
  86. package/esm/use-lunatic/commons/pagination/page-tag.js.map +1 -0
  87. package/esm/use-lunatic/commons/{page-tag.spec.js → pagination/page-tag.spec.js} +9 -1
  88. package/esm/use-lunatic/commons/pagination/page-tag.spec.js.map +1 -0
  89. package/{use-lunatic/commons → esm/use-lunatic/commons/pagination}/page.d.ts +1 -1
  90. package/esm/use-lunatic/commons/{page.js → pagination/page.js} +2 -2
  91. package/esm/use-lunatic/commons/pagination/page.js.map +1 -0
  92. package/esm/use-lunatic/hooks/use-page-has-response.js +37 -21
  93. package/esm/use-lunatic/hooks/use-page-has-response.js.map +1 -1
  94. package/esm/use-lunatic/hooks/useOverview.js +2 -2
  95. package/esm/use-lunatic/hooks/useOverview.js.map +1 -1
  96. package/esm/use-lunatic/props/getComponentTypeProps.d.ts +28 -26
  97. package/esm/use-lunatic/props/getComponentTypeProps.js +3 -1
  98. package/esm/use-lunatic/props/getComponentTypeProps.js.map +1 -1
  99. package/esm/use-lunatic/props/propOptions.d.ts +9 -1
  100. package/esm/use-lunatic/props/propOptions.js +56 -1
  101. package/esm/use-lunatic/props/propOptions.js.map +1 -1
  102. package/esm/use-lunatic/props/propOptions.spec.js +220 -56
  103. package/esm/use-lunatic/props/propOptions.spec.js.map +1 -1
  104. package/esm/use-lunatic/reducer/commons/auto-explore-loop.js +3 -2
  105. package/esm/use-lunatic/reducer/commons/auto-explore-loop.js.map +1 -1
  106. package/esm/use-lunatic/reducer/overview/overviewOnInit.d.ts +1 -2
  107. package/esm/use-lunatic/reducer/overview/overviewOnInit.js +1 -1
  108. package/esm/use-lunatic/reducer/overview/overviewOnInit.js.map +1 -1
  109. package/esm/use-lunatic/reducer/reduce-go-next-page.js +4 -3
  110. package/esm/use-lunatic/reducer/reduce-go-next-page.js.map +1 -1
  111. package/esm/use-lunatic/reducer/reduce-go-previous-page.js +2 -2
  112. package/esm/use-lunatic/reducer/reduce-go-previous-page.js.map +1 -1
  113. package/esm/use-lunatic/reducer/reduce-go-to-page.js +2 -2
  114. package/esm/use-lunatic/reducer/reduce-go-to-page.js.map +1 -1
  115. package/esm/use-lunatic/reducer/reducerInitializer.js +2 -2
  116. package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -1
  117. package/esm/use-lunatic/type.d.ts +1 -1
  118. package/esm/utils/cast.js +5 -2
  119. package/esm/utils/cast.js.map +1 -1
  120. package/esm/utils/getArticulationState.js +2 -1
  121. package/esm/utils/getArticulationState.js.map +1 -1
  122. package/esm/utils/number.js +4 -4
  123. package/esm/utils/number.js.map +1 -1
  124. package/index.d.ts +1 -1
  125. package/index.js.map +1 -1
  126. package/package.json +98 -79
  127. package/src/components/Datepicker/DatepickerFields.tsx +4 -2
  128. package/src/components/Duration/getDurationFromValue.ts +3 -3
  129. package/src/components/LunaticComponents.tsx +32 -25
  130. package/src/components/PairwiseLinks/PairwiseLinks.tsx +18 -57
  131. package/src/components/PairwiseLinks/PairwiseMirror.tsx +19 -0
  132. package/src/components/PairwiseLinks/combinations.test.ts +103 -0
  133. package/src/components/PairwiseLinks/combinations.ts +34 -0
  134. package/src/components/type.ts +204 -231
  135. package/src/index.ts +1 -4
  136. package/src/stories/checkbox/checkbox.stories.tsx +13 -0
  137. package/src/stories/checkbox/sourceOneDynamicOptions.json +496 -0
  138. package/src/stories/dropdown/dropdown.stories.tsx +12 -0
  139. package/src/stories/dropdown/sourceDynamicOptions.json +496 -0
  140. package/src/stories/pairwise/pairwise.stories.tsx +17 -1
  141. package/src/stories/pairwise/sourcePairwiseLoop.json +356 -0
  142. package/src/stories/radio/radio.stories.tsx +13 -0
  143. package/src/stories/radio/sourceDynamicOptions.json +496 -0
  144. package/src/type.source.ts +45 -14
  145. package/src/use-lunatic/commons/compile-controls.ts +1 -1
  146. package/src/use-lunatic/commons/component.ts +7 -2
  147. package/src/use-lunatic/commons/fill-components/fill-component-expressions.ts +3 -46
  148. package/src/use-lunatic/commons/fill-components/fill-components.ts +9 -10
  149. package/src/use-lunatic/commons/index.ts +8 -4
  150. package/src/use-lunatic/commons/{check-loops.ts → pagination/check-loops.ts} +4 -10
  151. package/src/use-lunatic/commons/{check-pager.ts → pagination/check-pager.ts} +1 -1
  152. package/src/use-lunatic/commons/{create-map-pages.ts → pagination/create-map-pages.ts} +2 -2
  153. package/src/use-lunatic/commons/{is-First-last-page.ts → pagination/is-First-last-page.ts} +1 -1
  154. package/src/use-lunatic/commons/{is-paginated-loop.ts → pagination/is-paginated-loop.ts} +1 -1
  155. package/src/use-lunatic/commons/{is-roundabout.ts → pagination/is-roundabout.ts} +1 -1
  156. package/src/use-lunatic/commons/{page-navigation.spec.ts → pagination/page-navigation.spec.ts} +1 -1
  157. package/src/use-lunatic/commons/{page-navigation.ts → pagination/page-navigation.ts} +8 -8
  158. package/src/use-lunatic/commons/{page-tag.spec.ts → pagination/page-tag.spec.ts} +15 -2
  159. package/src/use-lunatic/commons/{page-tag.ts → pagination/page-tag.ts} +18 -7
  160. package/src/use-lunatic/commons/{page.ts → pagination/page.ts} +6 -3
  161. package/src/use-lunatic/hooks/use-page-has-response.ts +59 -28
  162. package/src/use-lunatic/hooks/useOverview.ts +6 -3
  163. package/src/use-lunatic/props/getComponentTypeProps.ts +2 -1
  164. package/src/use-lunatic/props/propOptions.spec.ts +217 -147
  165. package/src/use-lunatic/props/propOptions.ts +99 -10
  166. package/src/use-lunatic/reducer/commons/auto-explore-loop.ts +3 -2
  167. package/src/use-lunatic/reducer/overview/overviewOnInit.ts +2 -2
  168. package/src/use-lunatic/reducer/reduce-go-next-page.ts +4 -3
  169. package/src/use-lunatic/reducer/reduce-go-previous-page.ts +2 -2
  170. package/src/use-lunatic/reducer/reduce-go-to-page.ts +2 -2
  171. package/src/use-lunatic/reducer/reducerInitializer.tsx +2 -2
  172. package/src/use-lunatic/type.ts +1 -1
  173. package/src/utils/cast.ts +5 -2
  174. package/src/utils/getArticulationState.ts +2 -1
  175. package/src/utils/number.ts +4 -4
  176. package/tsconfig.build.tsbuildinfo +1 -1
  177. package/type.source.d.ts +43 -13
  178. package/type.source.js +0 -1
  179. package/type.source.js.map +1 -1
  180. package/use-lunatic/commons/compile-controls.js +1 -1
  181. package/use-lunatic/commons/compile-controls.js.map +1 -1
  182. package/use-lunatic/commons/component.d.ts +3 -2
  183. package/use-lunatic/commons/component.js +5 -0
  184. package/use-lunatic/commons/component.js.map +1 -1
  185. package/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +1 -1
  186. package/use-lunatic/commons/fill-components/fill-component-expressions.js +12 -53
  187. package/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
  188. package/use-lunatic/commons/fill-components/fill-components.js +9 -1
  189. package/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
  190. package/use-lunatic/commons/index.d.ts +4 -4
  191. package/use-lunatic/commons/index.js +4 -4
  192. package/use-lunatic/commons/index.js.map +1 -1
  193. package/use-lunatic/commons/{check-loops.d.ts → pagination/check-loops.d.ts} +7 -7
  194. package/use-lunatic/commons/{check-loops.js → pagination/check-loops.js} +3 -5
  195. package/use-lunatic/commons/pagination/check-loops.js.map +1 -0
  196. package/{esm/use-lunatic/commons → use-lunatic/commons/pagination}/check-pager.d.ts +1 -1
  197. package/use-lunatic/commons/pagination/check-pager.js.map +1 -0
  198. package/{esm/use-lunatic/commons → use-lunatic/commons/pagination}/create-map-pages.d.ts +1 -1
  199. package/use-lunatic/commons/pagination/create-map-pages.js.map +1 -0
  200. package/use-lunatic/commons/{is-First-last-page.d.ts → pagination/is-First-last-page.d.ts} +1 -1
  201. package/use-lunatic/commons/pagination/is-First-last-page.js.map +1 -0
  202. package/{esm/use-lunatic/commons → use-lunatic/commons/pagination}/is-paginated-loop.d.ts +1 -1
  203. package/use-lunatic/commons/pagination/is-paginated-loop.js.map +1 -0
  204. package/use-lunatic/commons/{is-roundabout.d.ts → pagination/is-roundabout.d.ts} +1 -1
  205. package/use-lunatic/commons/pagination/is-roundabout.js.map +1 -0
  206. package/use-lunatic/commons/{page-navigation.d.ts → pagination/page-navigation.d.ts} +2 -2
  207. package/use-lunatic/commons/{page-navigation.js → pagination/page-navigation.js} +6 -6
  208. package/use-lunatic/commons/pagination/page-navigation.js.map +1 -0
  209. package/use-lunatic/commons/pagination/page-navigation.spec.js.map +1 -0
  210. package/use-lunatic/commons/{page-tag.d.ts → pagination/page-tag.d.ts} +8 -1
  211. package/use-lunatic/commons/{page-tag.js → pagination/page-tag.js} +18 -6
  212. package/use-lunatic/commons/pagination/page-tag.js.map +1 -0
  213. package/use-lunatic/commons/{page-tag.spec.js → pagination/page-tag.spec.js} +8 -0
  214. package/use-lunatic/commons/pagination/page-tag.spec.js.map +1 -0
  215. package/{esm/use-lunatic/commons → use-lunatic/commons/pagination}/page.d.ts +1 -1
  216. package/use-lunatic/commons/{page.js → pagination/page.js} +2 -2
  217. package/use-lunatic/commons/pagination/page.js.map +1 -0
  218. package/use-lunatic/hooks/use-page-has-response.js +36 -21
  219. package/use-lunatic/hooks/use-page-has-response.js.map +1 -1
  220. package/use-lunatic/hooks/useOverview.js +2 -2
  221. package/use-lunatic/hooks/useOverview.js.map +1 -1
  222. package/use-lunatic/props/getComponentTypeProps.d.ts +28 -26
  223. package/use-lunatic/props/getComponentTypeProps.js +2 -1
  224. package/use-lunatic/props/getComponentTypeProps.js.map +1 -1
  225. package/use-lunatic/props/propOptions.d.ts +9 -1
  226. package/use-lunatic/props/propOptions.js +57 -2
  227. package/use-lunatic/props/propOptions.js.map +1 -1
  228. package/use-lunatic/props/propOptions.spec.js +217 -55
  229. package/use-lunatic/props/propOptions.spec.js.map +1 -1
  230. package/use-lunatic/reducer/commons/auto-explore-loop.js +6 -2
  231. package/use-lunatic/reducer/commons/auto-explore-loop.js.map +1 -1
  232. package/use-lunatic/reducer/overview/overviewOnInit.d.ts +1 -2
  233. package/use-lunatic/reducer/overview/overviewOnInit.js +1 -1
  234. package/use-lunatic/reducer/overview/overviewOnInit.js.map +1 -1
  235. package/use-lunatic/reducer/reduce-go-next-page.js +4 -3
  236. package/use-lunatic/reducer/reduce-go-next-page.js.map +1 -1
  237. package/use-lunatic/reducer/reduce-go-previous-page.js +2 -2
  238. package/use-lunatic/reducer/reduce-go-previous-page.js.map +1 -1
  239. package/use-lunatic/reducer/reduce-go-to-page.js +2 -2
  240. package/use-lunatic/reducer/reduce-go-to-page.js.map +1 -1
  241. package/use-lunatic/reducer/reducerInitializer.js +2 -2
  242. package/use-lunatic/reducer/reducerInitializer.js.map +1 -1
  243. package/use-lunatic/type.d.ts +1 -1
  244. package/utils/cast.js +5 -2
  245. package/utils/cast.js.map +1 -1
  246. package/utils/getArticulationState.js +2 -1
  247. package/utils/getArticulationState.js.map +1 -1
  248. package/utils/number.js +4 -4
  249. package/utils/number.js.map +1 -1
  250. package/esm/use-lunatic/commons/check-loops.js.map +0 -1
  251. package/esm/use-lunatic/commons/check-pager.js.map +0 -1
  252. package/esm/use-lunatic/commons/create-map-pages.js.map +0 -1
  253. package/esm/use-lunatic/commons/is-First-last-page.js.map +0 -1
  254. package/esm/use-lunatic/commons/is-paginated-loop.js.map +0 -1
  255. package/esm/use-lunatic/commons/is-roundabout.js.map +0 -1
  256. package/esm/use-lunatic/commons/page-navigation.js.map +0 -1
  257. package/esm/use-lunatic/commons/page-navigation.spec.js.map +0 -1
  258. package/esm/use-lunatic/commons/page-tag.js.map +0 -1
  259. package/esm/use-lunatic/commons/page-tag.spec.js.map +0 -1
  260. package/esm/use-lunatic/commons/page.js.map +0 -1
  261. package/use-lunatic/commons/check-loops.js.map +0 -1
  262. package/use-lunatic/commons/check-pager.js.map +0 -1
  263. package/use-lunatic/commons/create-map-pages.js.map +0 -1
  264. package/use-lunatic/commons/is-First-last-page.js.map +0 -1
  265. package/use-lunatic/commons/is-paginated-loop.js.map +0 -1
  266. package/use-lunatic/commons/is-roundabout.js.map +0 -1
  267. package/use-lunatic/commons/page-navigation.js.map +0 -1
  268. package/use-lunatic/commons/page-navigation.spec.js.map +0 -1
  269. package/use-lunatic/commons/page-tag.js.map +0 -1
  270. package/use-lunatic/commons/page-tag.spec.js.map +0 -1
  271. package/use-lunatic/commons/page.js.map +0 -1
  272. /package/esm/use-lunatic/commons/{check-pager.js → pagination/check-pager.js} +0 -0
  273. /package/esm/use-lunatic/commons/{create-map-pages.js → pagination/create-map-pages.js} +0 -0
  274. /package/esm/use-lunatic/commons/{is-First-last-page.js → pagination/is-First-last-page.js} +0 -0
  275. /package/esm/use-lunatic/commons/{is-paginated-loop.js → pagination/is-paginated-loop.js} +0 -0
  276. /package/esm/use-lunatic/commons/{is-roundabout.js → pagination/is-roundabout.js} +0 -0
  277. /package/esm/use-lunatic/commons/{page-navigation.spec.d.ts → pagination/page-navigation.spec.d.ts} +0 -0
  278. /package/esm/use-lunatic/commons/{page-navigation.spec.js → pagination/page-navigation.spec.js} +0 -0
  279. /package/esm/use-lunatic/commons/{page-tag.spec.d.ts → pagination/page-tag.spec.d.ts} +0 -0
  280. /package/use-lunatic/commons/{check-pager.js → pagination/check-pager.js} +0 -0
  281. /package/use-lunatic/commons/{create-map-pages.js → pagination/create-map-pages.js} +0 -0
  282. /package/use-lunatic/commons/{is-First-last-page.js → pagination/is-First-last-page.js} +0 -0
  283. /package/use-lunatic/commons/{is-paginated-loop.js → pagination/is-paginated-loop.js} +0 -0
  284. /package/use-lunatic/commons/{is-roundabout.js → pagination/is-roundabout.js} +0 -0
  285. /package/use-lunatic/commons/{page-navigation.spec.d.ts → pagination/page-navigation.spec.d.ts} +0 -0
  286. /package/use-lunatic/commons/{page-navigation.spec.js → pagination/page-navigation.spec.js} +0 -0
  287. /package/use-lunatic/commons/{page-tag.spec.d.ts → pagination/page-tag.spec.d.ts} +0 -0
@@ -0,0 +1,496 @@
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
+ }
@@ -1,4 +1,3 @@
1
- /* eslint-disable */
2
1
  /**
3
2
  * This file was automatically generated by json-schema-to-typescript.
4
3
  * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
@@ -159,8 +158,8 @@ export type ComponentCheckboxBooleanDefinition =
159
158
  export type ComponentRadioDefinition = ComponentDefinitionBaseWithResponse & {
160
159
  componentType: 'Radio';
161
160
  orientation?: 'horizontal' | 'vertical';
162
- options: OptionsWithDetail;
163
- };
161
+ } & ComponentRadioDefinition1;
162
+ export type ComponentRadioDefinition1 = StaticOptions | OptionsFromVariable;
164
163
  export type OptionsWithDetail = {
165
164
  value: string | boolean;
166
165
  label: VTLExpression;
@@ -176,8 +175,8 @@ export type OptionsWithDetail = {
176
175
  export type ComponentDropdownDefinition =
177
176
  ComponentDefinitionBaseWithResponse & {
178
177
  componentType: 'Dropdown';
179
- options: Options;
180
- };
178
+ } & ComponentDropdownDefinition1;
179
+ export type ComponentDropdownDefinition1 = StaticOptions | OptionsFromVariable;
181
180
  export type ComponentQuestionDefinition = ComponentDefinitionBase & {
182
181
  componentType: 'Question';
183
182
  components: ComponentDefinition[];
@@ -185,8 +184,10 @@ export type ComponentQuestionDefinition = ComponentDefinitionBase & {
185
184
  export type ComponentCheckboxOneDefinition =
186
185
  ComponentDefinitionBaseWithResponse & {
187
186
  componentType: 'CheckboxOne';
188
- options: OptionsWithDetail;
189
- };
187
+ } & ComponentCheckboxOneDefinition1;
188
+ export type ComponentCheckboxOneDefinition1 =
189
+ | StaticOptions
190
+ | OptionsFromVariable;
190
191
  export type ComponentSuggesterDefinition =
191
192
  ComponentDefinitionBaseWithResponse & {
192
193
  componentType: 'Suggester';
@@ -216,19 +217,20 @@ export type ComponentSuggesterDefinition =
216
217
  };
217
218
  export type ComponentPairWiseLinksDefinition = ComponentDefinitionBase & {
218
219
  componentType: 'PairwiseLinks';
219
- xAxisIterations: VTLScalarExpression;
220
- yAxisIterations: VTLScalarExpression;
220
+ xAxisIterations?: VTLScalarExpression;
221
+ yAxisIterations?: VTLScalarExpression;
221
222
  symLinks: {
222
223
  [k: string]: {
223
224
  [k: string]: string | null;
224
225
  };
225
226
  };
226
227
  sourceVariables?: {
227
- /** Name of the variable containing the name of the respondent */
228
+ /**
229
+ * Name of the variable containing the name of the respondent
230
+ */
228
231
  name?: string;
229
232
  /**
230
- * Name of the variable containing the gender of the respondent
231
- * (value of variable -> 1:male, 2: female)
233
+ * Name of the variable containing the sex/gender of the respondent (value of variable -> 1: man, 2: woman)
232
234
  */
233
235
  gender?: string;
234
236
  };
@@ -362,13 +364,13 @@ export type LunaticSource = {
362
364
  multimode?: {
363
365
  questionnaire: {
364
366
  rules: {
365
- [k: string]: VTLExpression;
367
+ [k: string]: VTLExpression1;
366
368
  };
367
369
  };
368
370
  leaf: {
369
371
  source: string;
370
372
  rules: {
371
- [k: string]: VTLExpression;
373
+ [k: string]: VTLExpression2;
372
374
  };
373
375
  };
374
376
  };
@@ -436,6 +438,13 @@ export type ControlDefinition = {
436
438
  export type ResponseDefinition = {
437
439
  name: string;
438
440
  };
441
+ export type StaticOptions = {
442
+ options: OptionsWithDetail;
443
+ };
444
+ export type OptionsFromVariable = {
445
+ optionSource: string;
446
+ optionFilter?: VTLExpression;
447
+ };
439
448
  export type ComponentText = {
440
449
  componentType: 'Text';
441
450
  label: VTLExpression;
@@ -512,3 +521,25 @@ export type SuggesterDefinition = {
512
521
  */
513
522
  stopWords?: string[];
514
523
  };
524
+ export type VTLExpression1 = {
525
+ /**
526
+ * Valid VTL Expression
527
+ */
528
+ value: string;
529
+ /**
530
+ * Variables used in the expression
531
+ */
532
+ bindingDependencies?: string[];
533
+ type: 'VTL' | 'VTL|MD' | 'TXT';
534
+ };
535
+ export type VTLExpression2 = {
536
+ /**
537
+ * Valid VTL Expression
538
+ */
539
+ value: string;
540
+ /**
541
+ * Variables used in the expression
542
+ */
543
+ bindingDependencies?: string[];
544
+ type: 'VTL' | 'VTL|MD' | 'TXT';
545
+ };
@@ -187,7 +187,7 @@ function checkComponentInLoop(
187
187
  }
188
188
 
189
189
  // For Roundabout, we don't check controls for iterations that are disabled
190
- if (component.componentType === 'Roundabout' && component.item.disabled) {
190
+ if (isRoundaboutComponent(component) && component.item.disabled) {
191
191
  const isIterationDisabled = state.executeExpression(
192
192
  { value: component.item.disabled?.value, type: 'VTL' },
193
193
  iterationPager
@@ -4,6 +4,7 @@ Various utils function about what a component is or is not.
4
4
  import type { ReactNode } from 'react';
5
5
  import type { LunaticComponentDefinition } from '../type';
6
6
  import { type DeepTranslateExpression } from './fill-components/fill-component-expressions';
7
+ import { ComponentPairWiseLinksDefinition } from '../../type.source';
7
8
 
8
9
  export type ComponentDefinition = LunaticComponentDefinition;
9
10
  export type InterpretedComponent =
@@ -102,7 +103,7 @@ export function isQuestionComponent(
102
103
  /** Whether the component is a PairwiseLinks. */
103
104
  export function isPairwiseLinksComponent(
104
105
  component: ComponentDefinition | InterpretedComponent
105
- ): component is InterpretedPairwiseLinksComponent {
106
+ ): component is ComponentPairWiseLinksDefinition {
106
107
  return component.componentType === 'PairwiseLinks';
107
108
  }
108
109
 
@@ -113,13 +114,17 @@ export function isPairwiseLinksComponent(
113
114
  */
114
115
  export function getPairwiseComponent(
115
116
  components: ComponentDefinition[]
116
- ): InterpretedPairwiseLinksComponent | undefined {
117
+ ): ComponentPairWiseLinksDefinition | undefined {
117
118
  for (const component of components) {
118
119
  if (isPairwiseLinksComponent(component)) return component;
119
120
  if (isQuestionComponent(component)) {
120
121
  const childComponent = getPairwiseComponent(component.components);
121
122
  if (childComponent) return childComponent;
122
123
  }
124
+ if (isLoopComponent(component)) {
125
+ const foundComponent = getPairwiseComponent(component.components);
126
+ if (foundComponent !== undefined) return foundComponent;
127
+ }
123
128
  }
124
129
 
125
130
  return undefined;