@inseefr/lunatic 3.5.7 → 3.5.8

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 (235) hide show
  1. package/components/shared/Combobox/Combobox.stories.d.ts +3 -2
  2. package/components/shared/Combobox/Combobox.stories.js +26 -21
  3. package/components/shared/Combobox/Combobox.stories.js.map +1 -1
  4. package/esm/components/shared/Combobox/Combobox.stories.d.ts +3 -2
  5. package/esm/components/shared/Combobox/Combobox.stories.js +28 -24
  6. package/esm/components/shared/Combobox/Combobox.stories.js.map +1 -1
  7. package/esm/hooks/useLocalStorage.d.ts +1 -0
  8. package/esm/hooks/useLocalStorage.js +31 -0
  9. package/esm/hooks/useLocalStorage.js.map +1 -0
  10. package/esm/type.source.d.ts +6 -0
  11. package/esm/use-lunatic/commons/compile-controls.js +22 -14
  12. package/esm/use-lunatic/commons/compile-controls.js.map +1 -1
  13. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js +4 -1
  14. package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
  15. package/esm/use-lunatic/hooks/use-page-has-response.js +1 -1
  16. package/esm/use-lunatic/hooks/use-page-has-response.js.map +1 -1
  17. package/esm/use-lunatic/hooks/useOverview.spec.js +2 -2
  18. package/esm/use-lunatic/hooks/useOverview.spec.js.map +1 -1
  19. package/esm/utils/number.d.ts +4 -0
  20. package/esm/utils/number.js +12 -0
  21. package/esm/utils/number.js.map +1 -1
  22. package/esm/utils/object.d.ts +10 -0
  23. package/esm/utils/object.js +26 -0
  24. package/esm/utils/object.js.map +1 -1
  25. package/hooks/useLocalStorage.d.ts +1 -0
  26. package/hooks/useLocalStorage.js +34 -0
  27. package/hooks/useLocalStorage.js.map +1 -0
  28. package/package.json +76 -137
  29. package/src/components/shared/Combobox/Combobox.stories.tsx +48 -49
  30. package/src/hooks/useLocalStorage.ts +37 -0
  31. package/src/json.d.ts +16 -0
  32. package/src/stories/accordion/accordion.stories.tsx +21 -0
  33. package/src/stories/behaviour/cleaning/cleaning.stories.tsx +40 -0
  34. package/src/stories/behaviour/controls/controls.stories.tsx +51 -0
  35. package/src/stories/behaviour/disabled/disabled.stories.tsx +29 -0
  36. package/src/stories/behaviour/filter/filter.stories.tsx +34 -0
  37. package/src/stories/behaviour/missing/missing.stories.tsx +31 -0
  38. package/src/stories/behaviour/overview/overview.stories.tsx +61 -0
  39. package/src/stories/{overview/sourceWithHierarchy.json → behaviour/overview/source.json} +1 -1
  40. package/src/stories/{overview → behaviour/overview}/sourceLoop.json +1 -1
  41. package/src/stories/behaviour/performance/performance.stories.tsx +29 -0
  42. package/src/stories/behaviour/resizing/resizing.stories.tsx +34 -0
  43. package/src/stories/behaviour/slots.stories.tsx +34 -0
  44. package/src/stories/checkbox/checkbox.stories.tsx +75 -0
  45. package/src/stories/{checkbox-group/sourceLoop.json → checkbox/sourceGroupLoop.json} +1 -1
  46. package/src/stories/datepicker/datepicker.stories.tsx +21 -0
  47. package/src/stories/declaration/declaration.stories.tsx +27 -0
  48. package/src/stories/dropdown/dropdown.stories.tsx +27 -0
  49. package/src/stories/duration/duration.stories.tsx +27 -0
  50. package/src/stories/filter-description/filter-description.stories.tsx +28 -0
  51. package/src/stories/input/input.stories.tsx +21 -0
  52. package/src/stories/input-number/input-number.stories.tsx +35 -0
  53. package/src/stories/loop/loop.stories.tsx +35 -0
  54. package/src/stories/loop/roster-for-loop.stories.tsx +59 -0
  55. package/src/stories/pairwise/pairwise.stories.tsx +30 -0
  56. package/src/stories/paste.stories.tsx +85 -0
  57. package/src/stories/question/question.stories.tsx +21 -0
  58. package/src/stories/questionnaires/logement/logement.stories.tsx +26 -0
  59. package/src/stories/questionnaires/recensement/recensement.stories.tsx +28 -0
  60. package/src/stories/questionnaires/rp/rp.stories.tsx +21 -0
  61. package/src/stories/questionnaires/simpsons/simpsons.stories.tsx +31 -0
  62. package/src/stories/radio/radio.stories.tsx +53 -0
  63. package/src/stories/roundabout/roundabout.stories.tsx +37 -0
  64. package/src/stories/roundabout/source.json +1 -0
  65. package/src/stories/sequence/sequence.stories.tsx +28 -0
  66. package/src/stories/suggester/source-option-responses.json +1 -1
  67. package/src/stories/suggester/suggester.stories.tsx +68 -0
  68. package/src/stories/summary/source.json +22 -1
  69. package/src/stories/summary/summary.stories.tsx +31 -0
  70. package/src/stories/table/table.stories.tsx +35 -0
  71. package/src/stories/text/text.stories.tsx +38 -0
  72. package/src/stories/textarea/textarea.stories.tsx +21 -0
  73. package/src/stories/utils/Orchestrator.tsx +310 -0
  74. package/src/stories/utils/OrchestratorData.tsx +176 -0
  75. package/src/stories/utils/OrchestratorOverview.tsx +70 -0
  76. package/src/stories/utils/OrchestratorSidebar.tsx +119 -0
  77. package/src/stories/utils/SchemaValidator.tsx +29 -0
  78. package/src/stories/utils/referentiel.ts +9 -0
  79. package/src/type.source.ts +6 -0
  80. package/src/use-lunatic/commons/compile-controls.ts +36 -18
  81. package/src/use-lunatic/commons/fill-components/fill-component-expressions.ts +4 -1
  82. package/src/use-lunatic/hooks/use-page-has-response.ts +1 -1
  83. package/src/use-lunatic/hooks/useOverview.spec.ts +3 -2
  84. package/src/use-lunatic/use-lunatic.test.ts +53 -40
  85. package/src/utils/number.ts +13 -0
  86. package/src/utils/object.ts +40 -0
  87. package/tsconfig.build.tsbuildinfo +1 -1
  88. package/type.source.d.ts +6 -0
  89. package/use-lunatic/commons/compile-controls.js +21 -13
  90. package/use-lunatic/commons/compile-controls.js.map +1 -1
  91. package/use-lunatic/commons/fill-components/fill-component-expressions.js +5 -2
  92. package/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
  93. package/use-lunatic/hooks/use-page-has-response.js +2 -2
  94. package/use-lunatic/hooks/use-page-has-response.js.map +1 -1
  95. package/use-lunatic/hooks/useOverview.spec.js +8 -8
  96. package/use-lunatic/hooks/useOverview.spec.js.map +1 -1
  97. package/utils/number.d.ts +4 -0
  98. package/utils/number.js +13 -0
  99. package/utils/number.js.map +1 -1
  100. package/utils/object.d.ts +10 -0
  101. package/utils/object.js +30 -0
  102. package/utils/object.js.map +1 -1
  103. package/esm/stories/overview/sourceWithHierarchy.json +0 -5151
  104. package/esm/tests/utils/lunatic.d.ts +0 -15
  105. package/esm/tests/utils/lunatic.js +0 -27
  106. package/esm/tests/utils/lunatic.js.map +0 -1
  107. package/esm/use-lunatic/replace-component-sequence.d.ts +0 -36
  108. package/esm/use-lunatic/replace-component-sequence.js +0 -19
  109. package/esm/use-lunatic/replace-component-sequence.js.map +0 -1
  110. package/esm/use-lunatic/test.utils.d.ts +0 -2
  111. package/esm/use-lunatic/test.utils.js +0 -13
  112. package/esm/use-lunatic/test.utils.js.map +0 -1
  113. package/esm/utils/is-object.d.ts +0 -4
  114. package/esm/utils/is-object.js +0 -7
  115. package/esm/utils/is-object.js.map +0 -1
  116. package/esm/utils/to-number.d.ts +0 -4
  117. package/esm/utils/to-number.js +0 -13
  118. package/esm/utils/to-number.js.map +0 -1
  119. package/src/stories/accordion/accordion.stories.jsx +0 -17
  120. package/src/stories/behaviour/cleaning/cleaning.stories.jsx +0 -69
  121. package/src/stories/behaviour/controls/controls.stories.jsx +0 -81
  122. package/src/stories/behaviour/filter/dataLoop.json +0 -14
  123. package/src/stories/behaviour/filter/filter.stories.jsx +0 -36
  124. package/src/stories/behaviour/missing/missing.stories.jsx +0 -69
  125. package/src/stories/behaviour/others/V2_DeclarationsSimples.json +0 -908
  126. package/src/stories/behaviour/others/V2_MinMaxSum_Boucles.json +0 -489
  127. package/src/stories/behaviour/others/V2_QuestSimple_Boucles.json +0 -3919
  128. package/src/stories/behaviour/others/V2_TCMRallyeGames.json +0 -2760
  129. package/src/stories/behaviour/others/test-dylan.json +0 -538
  130. package/src/stories/behaviour/others/test.stories.jsx +0 -78
  131. package/src/stories/behaviour/paste/source.json +0 -32
  132. package/src/stories/behaviour/paste/test.stories.jsx +0 -62
  133. package/src/stories/behaviour/performance/performance.stories.jsx +0 -26
  134. package/src/stories/behaviour/resizing/resizing.stories.jsx +0 -60
  135. package/src/stories/behaviour/slots.stories.jsx +0 -32
  136. package/src/stories/checkbox-boolean/checkboxBoolean.stories.jsx +0 -17
  137. package/src/stories/checkbox-group/checkbox-group.stories.jsx +0 -77
  138. package/src/stories/checkbox-one/checkboxOne.stories.jsx +0 -53
  139. package/src/stories/date-picker/data.json +0 -3
  140. package/src/stories/date-picker/datepicker.stories.jsx +0 -26
  141. package/src/stories/declaration/data.json +0 -1
  142. package/src/stories/declaration/input.stories.jsx +0 -18
  143. package/src/stories/disabled/data.json +0 -16
  144. package/src/stories/disabled/disabled.stories.jsx +0 -18
  145. package/src/stories/dropdown/data.json +0 -8
  146. package/src/stories/dropdown/dropdown.stories.jsx +0 -25
  147. package/src/stories/duration/duration.stories.jsx +0 -25
  148. package/src/stories/filter-description/filter-description.stories.jsx +0 -37
  149. package/src/stories/input/data.json +0 -1
  150. package/src/stories/input/input.stories.jsx +0 -18
  151. package/src/stories/input-number/input-number.stories.jsx +0 -23
  152. package/src/stories/loop/loop.stories.jsx +0 -29
  153. package/src/stories/loop/roster-for-loop.stories.jsx +0 -46
  154. package/src/stories/markdown/markdown.stories.jsx +0 -20
  155. package/src/stories/overview/data.json +0 -1
  156. package/src/stories/overview/dataLoop.json +0 -93
  157. package/src/stories/overview/overview.stories.jsx +0 -44
  158. package/src/stories/overview/source.json +0 -25
  159. package/src/stories/pairwise/data.json +0 -12
  160. package/src/stories/pairwise/pairwise-links.stories.jsx +0 -48
  161. package/src/stories/question/question.stories.jsx +0 -16
  162. package/src/stories/questionnaires/logement/logement.stories.jsx +0 -59
  163. package/src/stories/questionnaires/recensement/data.json +0 -12
  164. package/src/stories/questionnaires/recensement/recensement.stories.jsx +0 -35
  165. package/src/stories/questionnaires/rp/data.json +0 -5
  166. package/src/stories/questionnaires/rp/rp.stories.jsx +0 -23
  167. package/src/stories/questionnaires/simpsons/simpsons.stories.jsx +0 -246
  168. package/src/stories/radio/radio.stories.jsx +0 -78
  169. package/src/stories/roundabout/data1.json +0 -13
  170. package/src/stories/roundabout/data2.json +0 -16
  171. package/src/stories/roundabout/roundabout.stories.jsx +0 -32
  172. package/src/stories/sequence/sequence.stories.jsx +0 -29
  173. package/src/stories/suggester/suggester.stories.jsx +0 -71
  174. package/src/stories/summary/data.json +0 -16
  175. package/src/stories/summary/summary.stories.jsx +0 -23
  176. package/src/stories/switch/README.md +0 -29
  177. package/src/stories/switch/data-forced.json +0 -40
  178. package/src/stories/switch/source.json +0 -64
  179. package/src/stories/switch/switch.stories.jsx +0 -17
  180. package/src/stories/table/data.json +0 -1
  181. package/src/stories/table/table.stories.jsx +0 -30
  182. package/src/stories/text/data-roster.json +0 -5
  183. package/src/stories/text/text.stories.jsx +0 -20
  184. package/src/stories/textarea/data.json +0 -1
  185. package/src/stories/textarea/textarea.stories.jsx +0 -18
  186. package/src/stories/utils/SchemaValidator.jsx +0 -40
  187. package/src/stories/utils/default-arg-types.js +0 -39
  188. package/src/stories/utils/default-args.js +0 -3
  189. package/src/stories/utils/options.js +0 -19
  190. package/src/stories/utils/orchestrator.jsx +0 -267
  191. package/src/stories/utils/orchestrator.scss +0 -66
  192. package/src/stories/utils/overview.jsx +0 -39
  193. package/src/stories/utils/overview.scss +0 -37
  194. package/src/stories/utils/referentiel.js +0 -7
  195. package/src/tests/utils/e2e.js +0 -91
  196. package/src/tests/utils/lunatic.ts +0 -33
  197. package/src/use-lunatic/replace-component-sequence.ts +0 -25
  198. package/src/use-lunatic/test.utils.ts +0 -17
  199. package/src/utils/is-object.ts +0 -6
  200. package/src/utils/to-number.ts +0 -12
  201. package/stories/overview/sourceWithHierarchy.json +0 -5151
  202. package/tests/utils/lunatic.d.ts +0 -15
  203. package/tests/utils/lunatic.js +0 -31
  204. package/tests/utils/lunatic.js.map +0 -1
  205. package/use-lunatic/replace-component-sequence.d.ts +0 -36
  206. package/use-lunatic/replace-component-sequence.js +0 -22
  207. package/use-lunatic/replace-component-sequence.js.map +0 -1
  208. package/use-lunatic/test.utils.d.ts +0 -2
  209. package/use-lunatic/test.utils.js +0 -17
  210. package/use-lunatic/test.utils.js.map +0 -1
  211. package/utils/is-object.d.ts +0 -4
  212. package/utils/is-object.js +0 -10
  213. package/utils/is-object.js.map +0 -1
  214. package/utils/to-number.d.ts +0 -4
  215. package/utils/to-number.js +0 -16
  216. package/utils/to-number.js.map +0 -1
  217. /package/src/stories/behaviour/cleaning/{loop.json → source-loop-scopes.json} +0 -0
  218. /package/src/stories/behaviour/controls/{boucles-n.json → source-boucles-n.json} +0 -0
  219. /package/src/stories/behaviour/controls/{loop.json → source-loop.json} +0 -0
  220. /package/src/stories/behaviour/controls/{roundabout.json → source-roundabout.json} +0 -0
  221. /package/src/stories/behaviour/controls/{simple-numeric.json → source-simple-numeric.json} +0 -0
  222. /package/src/stories/behaviour/controls/{simple.json → source-simple.json} +0 -0
  223. /package/src/stories/{disabled → behaviour/disabled}/source.json +0 -0
  224. /package/src/stories/{checkbox-boolean → checkbox}/source.json +0 -0
  225. /package/src/stories/{checkbox-group/source.json → checkbox/sourceGroup.json} +0 -0
  226. /package/src/stories/{checkbox-group/sourceCondition.json → checkbox/sourceGroupCondition.json} +0 -0
  227. /package/src/stories/{checkbox-group/sourceDetail.json → checkbox/sourceGroupDetail.json} +0 -0
  228. /package/src/stories/{checkbox-one/source.json → checkbox/sourceOne.json} +0 -0
  229. /package/src/stories/{checkbox-one/sourceDetail.json → checkbox/sourceOneDetail.json} +0 -0
  230. /package/src/stories/{date-picker → datepicker}/source.json +0 -0
  231. /package/src/stories/{markdown/source.json → declaration/sourceMarkdown.json} +0 -0
  232. /package/src/stories/duration/{mois.json → sourceMonths.json} +0 -0
  233. /package/src/stories/duration/{time.json → sourceTime.json} +0 -0
  234. /package/src/stories/filter-description/{source-options.json → sourceOptions.json} +0 -0
  235. /package/src/stories/table/{table-dynamique.json → source-dynamic.json} +0 -0
@@ -1,538 +0,0 @@
1
- {
2
- "cleaning": {},
3
- "variables": [
4
- {
5
- "variableType": "COLLECTED",
6
- "values": {
7
- "COLLECTED": null
8
- },
9
- "name": "COMMENT_QE"
10
- },
11
- {
12
- "variableType": "COLLECTED",
13
- "values": {
14
- "COLLECTED": null
15
- },
16
- "name": "NB"
17
- },
18
- {
19
- "variableType": "COLLECTED",
20
- "values": {
21
- "COLLECTED": [null]
22
- },
23
- "name": "PRENOM"
24
- },
25
- {
26
- "variableType": "COLLECTED",
27
- "values": {
28
- "COLLECTED": [null]
29
- },
30
- "name": "AGE"
31
- },
32
- {
33
- "variableType": "COLLECTED",
34
- "values": {
35
- "COLLECTED": null
36
- },
37
- "name": "DIVERS"
38
- },
39
- {
40
- "variableType": "CALCULATED",
41
- "expression": { "type": "VTL", "value": "true" },
42
- "name": "FILTER_RESULT_NB",
43
- "inFilter": "false"
44
- },
45
- {
46
- "variableType": "CALCULATED",
47
- "expression": { "type": "VTL", "value": "true" },
48
- "name": "FILTER_RESULT_PRENOM",
49
- "inFilter": "false",
50
- "shapeFrom": "PRENOM"
51
- },
52
- {
53
- "variableType": "CALCULATED",
54
- "bindingDependencies": ["AGE"],
55
- "expression": { "type": "VTL", "value": "if AGE > 17 then 1 else 0" },
56
- "name": "IND_MAJEUR",
57
- "inFilter": "false",
58
- "shapeFrom": "PRENOM"
59
- },
60
- {
61
- "variableType": "CALCULATED",
62
- "expression": { "type": "VTL", "value": "true" },
63
- "name": "FILTER_RESULT_AGE",
64
- "inFilter": "false",
65
- "shapeFrom": "AGE"
66
- },
67
- {
68
- "variableType": "CALCULATED",
69
- "expression": { "type": "VTL", "value": "true" },
70
- "name": "FILTER_RESULT_DIVERS",
71
- "inFilter": "false"
72
- },
73
- {
74
- "variableType": "CALCULATED",
75
- "bindingDependencies": ["IND_MAJEUR", "AGE"],
76
- "expression": { "type": "VTL", "value": "sum(IND_MAJEUR)" },
77
- "name": "SUM_MAJEUR",
78
- "inFilter": "false"
79
- },
80
- {
81
- "variableType": "CALCULATED",
82
- "bindingDependencies": ["AGE"],
83
- "expression": { "type": "VTL", "value": "min(AGE)" },
84
- "name": "MIN_AGE",
85
- "inFilter": "false"
86
- },
87
- {
88
- "variableType": "CALCULATED",
89
- "bindingDependencies": ["AGE"],
90
- "expression": { "type": "VTL", "value": "sum(AGE)" },
91
- "name": "SUM_AGE",
92
- "inFilter": "false"
93
- },
94
- {
95
- "variableType": "CALCULATED",
96
- "bindingDependencies": ["AGE"],
97
- "expression": { "type": "VTL", "value": "cast(AGE,number)" },
98
- "name": "AGE_NUM",
99
- "inFilter": "false",
100
- "shapeFrom": "PRENOM"
101
- }
102
- ],
103
- "components": [
104
- {
105
- "componentType": "Sequence",
106
- "hierarchy": {
107
- "sequence": {
108
- "id": "ksyjs7vy",
109
- "page": "1",
110
- "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" }
111
- }
112
- },
113
- "conditionFilter": { "type": "VTL", "value": "true" },
114
- "id": "ksyjs7vy",
115
- "page": "1",
116
- "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" }
117
- },
118
- {
119
- "componentType": "InputNumber",
120
- "controls": [
121
- {
122
- "criticality": "ERROR",
123
- "errorMessage": {
124
- "type": "VTL|MD",
125
- "value": "\" La valeur doit être comprise entre 0 et 10.\""
126
- },
127
- "typeOfControl": "FORMAT",
128
- "control": {
129
- "type": "VTL",
130
- "value": "not(not(isnull(NB)) and (0>NB or 10<NB)))"
131
- },
132
- "id": "kze792d8-formatBorneInfSup"
133
- },
134
- {
135
- "criticality": "ERROR",
136
- "errorMessage": {
137
- "type": "VTL|MD",
138
- "value": "\"Le nombre doit comporter au maximum 0 chiffre(s) après la virgule.\""
139
- },
140
- "typeOfControl": "FORMAT",
141
- "control": {
142
- "type": "VTL",
143
- "value": "not(not(isnull(NB)) and trunc(NB,0)<>NB)"
144
- },
145
- "id": "kze792d8-formatDec"
146
- }
147
- ],
148
- "max": 10,
149
- "hierarchy": {
150
- "sequence": {
151
- "id": "ksyjs7vy",
152
- "page": "1",
153
- "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" }
154
- }
155
- },
156
- "conditionFilter": { "type": "VTL", "value": "true" },
157
- "label": { "type": "VTL|MD", "value": "\"➡ 1. \" || \"NB\"" },
158
- "isMandatory": false,
159
- "bindingDependencies": ["NB"],
160
- "min": 0,
161
- "response": { "name": "NB" },
162
- "decimals": 0,
163
- "id": "kze792d8",
164
- "page": "2"
165
- },
166
- {
167
- "paginatedLoop": false,
168
- "componentType": "Loop",
169
- "loopDependencies": ["NB"],
170
- "components": [
171
- {
172
- "componentType": "Subsequence",
173
- "bindingDependencies": ["NB"],
174
- "goToPage": "3",
175
- "hierarchy": {
176
- "sequence": {
177
- "id": "ksyjs7vy",
178
- "page": "1",
179
- "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" }
180
- },
181
- "subSequence": {
182
- "id": "ksynhpl3",
183
- "page": "3",
184
- "label": { "type": "VTL|MD", "value": "\"Habitants\"" }
185
- }
186
- },
187
- "conditionFilter": { "type": "VTL", "value": "true" },
188
- "id": "ksynhpl3",
189
- "page": "3",
190
- "label": { "type": "VTL|MD", "value": "\"Habitants\"" }
191
- },
192
- {
193
- "componentType": "Input",
194
- "bindingDependencies": ["PRENOM", "NB"],
195
- "controls": [
196
- {
197
- "bindingDependencies": ["PRENOM"],
198
- "criticality": "WARN",
199
- "errorMessage": {
200
- "type": "VTL|MD",
201
- "value": "\"Prenom est vide ?\""
202
- },
203
- "typeOfControl": "CONSISTENCY",
204
- "control": { "type": "VTL", "value": "not(isnull(PRENOM))" },
205
- "id": "ksyjvi40-CI-0"
206
- },
207
- {
208
- "bindingDependencies": ["PRENOM"],
209
- "criticality": "WARN",
210
- "errorMessage": {
211
- "type": "VTL|MD",
212
- "value": "\"Prénom vaut A\""
213
- },
214
- "typeOfControl": "CONSISTENCY",
215
- "control": { "type": "VTL", "value": "not(PRENOM = \"A\")" },
216
- "id": "ksyjvi40-CI-1"
217
- }
218
- ],
219
- "response": { "name": "PRENOM" },
220
- "hierarchy": {
221
- "sequence": {
222
- "id": "ksyjs7vy",
223
- "page": "1",
224
- "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" }
225
- },
226
- "subSequence": {
227
- "id": "ksynhpl3",
228
- "page": "3",
229
- "label": { "type": "VTL|MD", "value": "\"Habitants\"" }
230
- }
231
- },
232
- "conditionFilter": { "type": "VTL", "value": "true" },
233
- "id": "ksyjvi40",
234
- "page": "3",
235
- "label": { "type": "VTL|MD", "value": "\"➡ 2. \" || \"prénom\"" },
236
- "isMandatory": false,
237
- "maxLength": 249,
238
- "declarations": [
239
- {
240
- "declarationType": "HELP",
241
- "id": "ksyjvi40-l7uj49ok",
242
- "label": {
243
- "type": "VTL|MD",
244
- "value": "\"Tester Prénom vide et Prénom = A\""
245
- },
246
- "position": "AFTER_QUESTION_TEXT"
247
- }
248
- ]
249
- }
250
- ],
251
- "bindingDependencies": ["NB", "PRENOM"],
252
- "depth": 1,
253
- "hierarchy": {
254
- "sequence": {
255
- "id": "ksyjs7vy",
256
- "page": "1",
257
- "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" }
258
- }
259
- },
260
- "conditionFilter": { "type": "VTL", "value": "true" },
261
- "id": "ksykfdm9",
262
- "page": "3",
263
- "lines": {
264
- "min": { "type": "VTL", "value": "NB" },
265
- "max": { "type": "VTL", "value": "NB" }
266
- }
267
- },
268
- {
269
- "componentType": "Sequence",
270
- "hierarchy": {
271
- "sequence": {
272
- "id": "ksyniqzx",
273
- "page": "4",
274
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
275
- }
276
- },
277
- "conditionFilter": { "type": "VTL", "value": "true" },
278
- "id": "ksyniqzx",
279
- "page": "4",
280
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
281
- },
282
- {
283
- "paginatedLoop": true,
284
- "componentType": "Loop",
285
- "loopDependencies": ["PRENOM"],
286
- "components": [
287
- {
288
- "componentType": "Subsequence",
289
- "bindingDependencies": ["PRENOM"],
290
- "goToPage": "5.1",
291
- "hierarchy": {
292
- "sequence": {
293
- "id": "ksyniqzx",
294
- "page": "4",
295
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
296
- },
297
- "subSequence": {
298
- "id": "ksyjxw3a",
299
- "page": "5.1",
300
- "label": { "type": "VTL|MD", "value": "\"Les ages\"" }
301
- }
302
- },
303
- "conditionFilter": { "type": "VTL", "value": "true" },
304
- "id": "ksyjxw3a",
305
- "label": { "type": "VTL|MD", "value": "\"Les ages\"" }
306
- },
307
- {
308
- "componentType": "InputNumber",
309
- "controls": [
310
- {
311
- "criticality": "ERROR",
312
- "errorMessage": {
313
- "type": "VTL|MD",
314
- "value": "\" La valeur doit être comprise entre 0 et 100.\""
315
- },
316
- "typeOfControl": "FORMAT",
317
- "control": {
318
- "type": "VTL",
319
- "value": "not(not(isnull(AGE)) and (0>AGE or 100<AGE)))"
320
- },
321
- "id": "ksyke448-formatBorneInfSup"
322
- },
323
- {
324
- "criticality": "ERROR",
325
- "errorMessage": {
326
- "type": "VTL|MD",
327
- "value": "\"Le nombre doit comporter au maximum 0 chiffre(s) après la virgule.\""
328
- },
329
- "typeOfControl": "FORMAT",
330
- "control": {
331
- "type": "VTL",
332
- "value": "not(not(isnull(AGE)) and trunc(AGE,0)<>AGE)"
333
- },
334
- "id": "ksyke448-formatDec"
335
- },
336
- {
337
- "bindingDependencies": ["AGE"],
338
- "criticality": "WARN",
339
- "errorMessage": { "type": "VTL|MD", "value": "\"Age est vide\"" },
340
- "typeOfControl": "CONSISTENCY",
341
- "control": { "type": "VTL", "value": "not(isnull(AGE))" },
342
- "id": "ksyke448-CI-0"
343
- }
344
- ],
345
- "max": 100,
346
- "hierarchy": {
347
- "sequence": {
348
- "id": "ksyniqzx",
349
- "page": "4",
350
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
351
- },
352
- "subSequence": {
353
- "id": "ksyjxw3a",
354
- "page": "5.1",
355
- "label": { "type": "VTL|MD", "value": "\"Les ages\"" }
356
- }
357
- },
358
- "conditionFilter": { "type": "VTL", "value": "true" },
359
- "label": {
360
- "type": "VTL|MD",
361
- "value": "\"➡ 3. \" || \"Age de l’individu : \" || PRENOM"
362
- },
363
- "isMandatory": false,
364
- "declarations": [
365
- {
366
- "declarationType": "HELP",
367
- "id": "ksyke448-ktwsl4qu",
368
- "label": {
369
- "type": "VTL|MD",
370
- "value": "\"AGE vaut : \" || cast(AGE,string)"
371
- },
372
- "position": "AFTER_QUESTION_TEXT"
373
- },
374
- {
375
- "declarationType": "HELP",
376
- "id": "ksyke448-l7g2enbf",
377
- "label": {
378
- "type": "VTL|MD",
379
- "value": "\"IND_MAJEUR :\" || cast(IND_MAJEUR,string)"
380
- },
381
- "position": "AFTER_QUESTION_TEXT"
382
- },
383
- {
384
- "declarationType": "HELP",
385
- "id": "ksyke448-l7uk2nvc",
386
- "label": {
387
- "type": "VTL|MD",
388
- "value": "\"AGE NUM :\" || cast(AGE_NUM,string)"
389
- },
390
- "position": "AFTER_QUESTION_TEXT"
391
- }
392
- ],
393
- "bindingDependencies": ["AGE", "IND_MAJEUR", "AGE_NUM", "PRENOM"],
394
- "min": 0,
395
- "response": { "name": "AGE" },
396
- "decimals": 0,
397
- "id": "ksyke448",
398
- "page": "5.1"
399
- }
400
- ],
401
- "bindingDependencies": ["AGE", "IND_MAJEUR", "AGE_NUM", "PRENOM"],
402
- "depth": 1,
403
- "hierarchy": {
404
- "sequence": {
405
- "id": "ksyniqzx",
406
- "page": "4",
407
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
408
- }
409
- },
410
- "conditionFilter": { "type": "VTL", "value": "true" },
411
- "id": "ksynkaoo",
412
- "page": "5",
413
- "maxPage": "1",
414
- "iterations": { "type": "VTL", "value": "count(PRENOM)" }
415
- },
416
- {
417
- "componentType": "Subsequence",
418
- "bindingDependencies": ["SUM_AGE", "MIN_AGE", "SUM_MAJEUR"],
419
- "goToPage": "6",
420
- "hierarchy": {
421
- "sequence": {
422
- "id": "ksyniqzx",
423
- "page": "4",
424
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
425
- },
426
- "subSequence": {
427
- "id": "ku2pnlmr",
428
- "page": "6",
429
- "label": { "type": "VTL|MD", "value": "\"Affichage de qq var\"" }
430
- }
431
- },
432
- "conditionFilter": { "type": "VTL", "value": "true" },
433
- "id": "ku2pnlmr",
434
- "page": "6",
435
- "label": { "type": "VTL|MD", "value": "\"Affichage de qq var\"" },
436
- "declarations": [
437
- {
438
- "declarationType": "HELP",
439
- "id": "ku2pnlmr-kze7f245",
440
- "label": {
441
- "type": "VTL|MD",
442
- "value": "\"Affichage de la somme des ages : \" || cast(SUM_AGE,string)"
443
- },
444
- "position": "AFTER_QUESTION_TEXT"
445
- },
446
- {
447
- "declarationType": "HELP",
448
- "id": "ku2pnlmr-kzsevgcm",
449
- "label": {
450
- "type": "VTL|MD",
451
- "value": "\"Affichage du min des ages : \" || cast(MIN_AGE,string)"
452
- },
453
- "position": "AFTER_QUESTION_TEXT"
454
- },
455
- {
456
- "declarationType": "HELP",
457
- "id": "ku2pnlmr-l7t4dzz2",
458
- "label": {
459
- "type": "VTL|MD",
460
- "value": "\"Affichage du nb de majeurs : \" || cast(SUM_MAJEUR,string)"
461
- },
462
- "position": "AFTER_QUESTION_TEXT"
463
- }
464
- ]
465
- },
466
- {
467
- "componentType": "Input",
468
- "bindingDependencies": ["DIVERS"],
469
- "response": { "name": "DIVERS" },
470
- "hierarchy": {
471
- "sequence": {
472
- "id": "ksyniqzx",
473
- "page": "4",
474
- "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" }
475
- },
476
- "subSequence": {
477
- "id": "ku2pnlmr",
478
- "page": "6",
479
- "label": { "type": "VTL|MD", "value": "\"Affichage de qq var\"" }
480
- }
481
- },
482
- "conditionFilter": { "type": "VTL", "value": "true" },
483
- "id": "ku2pxugf",
484
- "page": "7",
485
- "label": { "type": "VTL|MD", "value": "\"➡ 4. \" || \"divers\"" },
486
- "isMandatory": false,
487
- "maxLength": 249
488
- },
489
- {
490
- "componentType": "Sequence",
491
- "hierarchy": {
492
- "sequence": {
493
- "id": "COMMENT-SEQ",
494
- "page": "8",
495
- "label": { "type": "VTL|MD", "value": "\"Commentaire\"" }
496
- }
497
- },
498
- "conditionFilter": { "type": "VTL", "value": "true" },
499
- "id": "COMMENT-SEQ",
500
- "page": "8",
501
- "label": { "type": "VTL|MD", "value": "\"Commentaire\"" }
502
- },
503
- {
504
- "componentType": "Textarea",
505
- "bindingDependencies": ["COMMENT_QE"],
506
- "response": { "name": "COMMENT_QE" },
507
- "hierarchy": {
508
- "sequence": {
509
- "id": "COMMENT-SEQ",
510
- "page": "8",
511
- "label": { "type": "VTL|MD", "value": "\"Commentaire\"" }
512
- }
513
- },
514
- "conditionFilter": { "type": "VTL", "value": "true" },
515
- "id": "COMMENT-QUESTION",
516
- "page": "9",
517
- "label": {
518
- "type": "VTL|MD",
519
- "value": "\"Avez-vous des remarques concernant l'enquête ou des commentaires ?\""
520
- },
521
- "isMandatory": false,
522
- "maxLength": 2000
523
- }
524
- ],
525
- "pagination": "question",
526
- "resizing": { "NB": { "variables": ["PRENOM", "AGE"], "size": "NB" } },
527
- "label": {
528
- "type": "VTL|MD",
529
- "value": "BUG sur sum, min dans une boucle et sur controle prénom"
530
- },
531
- "lunaticModelVersion": "2.2.14-rc",
532
- "modele": "TESTSURSUM",
533
- "enoCoreVersion": "2.3.10-controls-type",
534
- "generatingDate": "09-09-2022 14:06:53",
535
- "missing": false,
536
- "id": "l7t51pzu",
537
- "maxPage": "9"
538
- }
@@ -1,78 +0,0 @@
1
- import React from 'react';
2
- import Orchestrator from '../../utils/orchestrator';
3
- import testDylan from './test-dylan.json';
4
- import minMaxLoops from './V2_MinMaxSum_Boucles.json';
5
- import simpleLoops from './V2_QuestSimple_Boucles.json';
6
- import rallyGames from './V2_TCMRallyeGames.json';
7
- import declarationsSimples from './V2_DeclarationsSimples.json';
8
- import defaultArgTypes from '../../utils/default-arg-types';
9
-
10
- const stories = {
11
- title: 'Behaviour/Others',
12
- component: Orchestrator,
13
- argTypes: {
14
- ...defaultArgTypes,
15
- missing: {
16
- table: { disable: false },
17
- control: 'boolean',
18
- defaultValue: true,
19
- },
20
- activeGoNextForMissing: {
21
- table: { disable: false },
22
- control: 'boolean',
23
- defaultValue: true,
24
- },
25
- management: {
26
- table: { disable: false },
27
- control: 'boolean',
28
- defaultValue: false,
29
- },
30
- activeControls: {
31
- control: 'boolean',
32
- defaultValue: true,
33
- },
34
- },
35
- };
36
-
37
- export default stories;
38
-
39
- const Template = (args) => <Orchestrator {...args} />;
40
- export const TestDylan = Template.bind({});
41
-
42
- TestDylan.args = {
43
- id: 'test-dylan',
44
- pagination: true,
45
- source: testDylan,
46
- };
47
-
48
- export const DeclarationsSimples = Template.bind({});
49
-
50
- DeclarationsSimples.args = {
51
- id: 'Declarations-simples',
52
- pagination: true,
53
- source: declarationsSimples,
54
- };
55
-
56
- export const MinMaxLoops = Template.bind({});
57
-
58
- MinMaxLoops.args = {
59
- id: 'min-max-loops',
60
- pagination: true,
61
- source: minMaxLoops,
62
- };
63
-
64
- export const SimpleLoops = Template.bind({});
65
-
66
- SimpleLoops.args = {
67
- id: 'simple-loops',
68
- pagination: true,
69
- source: simpleLoops,
70
- };
71
-
72
- export const RallyeGames = Template.bind({});
73
-
74
- RallyeGames.args = {
75
- id: 'rally-games',
76
- pagination: true,
77
- source: rallyGames,
78
- };
@@ -1,32 +0,0 @@
1
- {
2
- "$schema": "../../../../lunatic-schema.json",
3
- "components": [
4
- {
5
- "componentType": "Input",
6
- "label": {
7
- "value": "\"Nom de l'occupant principal.\"",
8
- "type": "VTL|MD"
9
- },
10
- "maxLength": 30,
11
- "id": "surname",
12
- "description": {
13
- "value": "\"For example, Bob.\"",
14
- "type": "VTL|MD"
15
- },
16
- "response": {
17
- "name": "NOM"
18
- },
19
- "page": "1"
20
- }
21
- ],
22
- "variables": [
23
- {
24
- "variableType": "COLLECTED",
25
- "name": "NOM",
26
- "componentRef": "name",
27
- "values": {
28
- "COLLECTED": null
29
- }
30
- }
31
- ]
32
- }