@inseefr/lunatic 2.4.5-mvp-eap → 2.4.6-allDecla

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 (132) hide show
  1. package/lib/components/commons/components/combo-box/combo-box-content.js +5 -2
  2. package/lib/components/commons/components/combo-box/combo-box.js +16 -16
  3. package/lib/components/commons/components/combo-box/combo-box.scss +1 -0
  4. package/lib/components/commons/components/combo-box/panel/panel.js +4 -2
  5. package/lib/components/commons/components/combo-box/state-management/reduce-on-init.js +1 -4
  6. package/lib/components/commons/components/dragger/dragger.scss +7 -7
  7. package/lib/components/commons/components/is-network/use-online-status.spec.js +0 -4
  8. package/lib/components/commons/components/lunatic-component-without-label.js +4 -11
  9. package/lib/components/commons/components/md-label/md-label.js +2 -1
  10. package/lib/components/commons/components/orchestrated-component.js +3 -4
  11. package/lib/components/commons/create-row-orchestrator.js +2 -2
  12. package/lib/components/component-set/html/component-set-components.js +6 -2
  13. package/lib/components/component-set/lunatic-component-set.js +3 -1
  14. package/lib/components/declarations/declarations.spec.js +0 -1
  15. package/lib/components/dropdown/html/dropdown-simple/simple-label-renderer.js +1 -1
  16. package/lib/components/dropdown/html/dropdown-simple/simple-option-renderer.js +5 -7
  17. package/lib/components/dropdown/html/dropdown-writable/writable-label-renderer.js +1 -1
  18. package/lib/components/dropdown/html/dropdown-writable/writable-option-renderer.js +1 -1
  19. package/lib/components/dropdown/html/dropdown.scss +0 -3
  20. package/lib/components/dropdown/lunatic-dropdown.js +0 -1
  21. package/lib/components/index.js +14 -0
  22. package/lib/components/input-number/html/input-number.js +1 -2
  23. package/lib/components/input-number/html/input-number.scss +1 -1
  24. package/lib/components/input-number/lunatic-input-number.js +0 -2
  25. package/lib/components/loop/loop.js +4 -6
  26. package/lib/components/loop/roster-for-loop/body.js +52 -0
  27. package/lib/components/loop/roster-for-loop/header.js +34 -0
  28. package/lib/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +0 -1
  29. package/lib/components/loop/roster-for-loop/roster-for-loop.js +33 -45
  30. package/lib/components/loop/roster-for-loop/roster-table.js +17 -22
  31. package/lib/components/loop/roster-for-loop/roster.scss +34 -30
  32. package/lib/components/loop/roster-for-loop/row.js +31 -84
  33. package/lib/components/modal-controls/modal-controls.spec.js +0 -14
  34. package/lib/components/pairwise-links/pairwise-links.js +3 -2
  35. package/lib/components/pairwise-links/row.js +0 -1
  36. package/lib/components/questions/question-context.js +21 -7
  37. package/lib/components/questions/question-context.scss +1 -0
  38. package/lib/components/questions/question-information.js +19 -5
  39. package/lib/components/questions/question-information.scss +1 -0
  40. package/lib/components/roundabout/components/roundabout.scss +0 -3
  41. package/lib/components/sequence/html/sequence.js +13 -6
  42. package/lib/components/sequence/html/sequence.scss +13 -0
  43. package/lib/components/sequence/lunatic-sequence.js +1 -5
  44. package/lib/components/sequence/sequence.spec.js +0 -3
  45. package/lib/components/suggester/html/default-style.scss +1 -6
  46. package/lib/components/suggester/html/suggester.js +12 -31
  47. package/lib/components/suggester/idb-suggester/check-store.js +2 -1
  48. package/lib/components/suggester/idb-suggester/idb-suggester.js +7 -10
  49. package/lib/components/suggester/lunatic-suggester.js +4 -31
  50. package/lib/components/suggester-loader-widget/loader-row.js +2 -1
  51. package/lib/components/switch/html/switch.scss +0 -2
  52. package/lib/components/switch/lunatic-switch.js +1 -1
  53. package/lib/src/components/commons/components/combo-box/combo-box.d.ts +4 -4
  54. package/lib/src/components/commons/components/combo-box/combo-box.stories.d.ts +2 -2
  55. package/lib/src/components/commons/components/combo-box/panel/panel.d.ts +1 -1
  56. package/lib/src/components/commons/components/combo-box/state-management/actions.d.ts +4 -4
  57. package/lib/src/components/commons/components/lunatic-component-without-label.d.ts +1 -1
  58. package/lib/src/components/commons/components/orchestrated-component.d.ts +3 -3
  59. package/lib/src/components/commons/create-row-orchestrator.d.ts +4 -5
  60. package/lib/src/components/component-set/html/component-set-components.d.ts +3 -2
  61. package/lib/src/components/dropdown/html/dropdown-writable/dropdown-writable.d.ts +1 -1
  62. package/lib/src/components/dropdown/html/dropdown.d.ts +1 -2
  63. package/lib/src/components/index.d.ts +2 -0
  64. package/lib/src/components/input-number/html/input-number.d.ts +0 -1
  65. package/lib/src/components/loop/block-for-loop/block-for-loop-ochestrator.d.ts +3 -11
  66. package/lib/src/components/loop/block-for-loop/block-for-loop.d.ts +1 -5
  67. package/lib/src/components/loop/commons/handle-row-button.d.ts +1 -2
  68. package/lib/src/components/loop/roster-for-loop/body.d.ts +12 -0
  69. package/lib/src/components/loop/roster-for-loop/header.d.ts +9 -0
  70. package/lib/src/components/loop/roster-for-loop/roster-for-loop-orchestrator.d.ts +3 -11
  71. package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +4 -8
  72. package/lib/src/components/loop/roster-for-loop/roster-table.d.ts +3 -3
  73. package/lib/src/components/loop/roster-for-loop/row.d.ts +2 -3
  74. package/lib/src/components/questions/question-context.d.ts +1 -2
  75. package/lib/src/components/questions/question-information.d.ts +1 -2
  76. package/lib/src/components/sequence/html/sequence.d.ts +1 -1
  77. package/lib/src/components/sequence/lunatic-sequence.d.ts +1 -1
  78. package/lib/src/components/suggester/html/suggester.d.ts +4 -6
  79. package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +3 -4
  80. package/lib/src/components/suggester/idb-suggester/suggester-notification.d.ts +1 -3
  81. package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -1
  82. package/lib/src/components/type.d.ts +7 -28
  83. package/lib/src/hooks/use-ref-sync.d.ts +1 -1
  84. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +16 -61
  85. package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +0 -36
  86. package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -2
  87. package/lib/src/use-lunatic/reducer/commons/resize-array-variable.d.ts +1 -1
  88. package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +1 -1
  89. package/lib/src/use-lunatic/reducer/reduce-update-state.d.ts +1 -106
  90. package/lib/src/use-lunatic/replace-component-sequence.d.ts +1 -1
  91. package/lib/src/use-lunatic/type-source.d.ts +1 -11
  92. package/lib/src/use-lunatic/type.d.ts +1 -1
  93. package/lib/src/utils/logger.d.ts +6 -0
  94. package/lib/stories/component-set/data2.json +7 -0
  95. package/lib/stories/component-set/source2.json +31 -31
  96. package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +0 -1
  97. package/lib/stories/input/input.stories.js +9 -1
  98. package/lib/stories/input/source-with-question.json +74 -0
  99. package/lib/stories/input-number/input-number.stories.js +1 -8
  100. package/lib/stories/loop/block-for-loop.stories.js +8 -1
  101. package/lib/stories/loop/roster-for-loop.stories.js +1 -8
  102. package/lib/stories/loop/source-with-header.json +3 -15
  103. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +2 -1
  104. package/lib/stories/sequence/afterInSeq.json +293 -0
  105. package/lib/stories/sequence/sequence.stories.js +12 -8
  106. package/lib/stories/sequence/source-declarations.json +9 -0
  107. package/lib/stories/suggester/suggester-workers.stories.js +7 -6
  108. package/lib/stories/suggester/suggester.stories.js +5 -18
  109. package/lib/stories/utils/orchestrator.js +4 -3
  110. package/lib/use-lunatic/commons/calculated-variables.js +1 -1
  111. package/lib/use-lunatic/commons/compile-controls.js +1 -1
  112. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +1 -4
  113. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +1 -1
  114. package/lib/use-lunatic/commons/get-component-value/get-component-value.js +0 -8
  115. package/lib/use-lunatic/commons/load-suggesters.js +46 -46
  116. package/lib/use-lunatic/initial-state.js +0 -1
  117. package/lib/use-lunatic/reducer/reducer.js +0 -1
  118. package/lib/utils/logger.js +44 -0
  119. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +2 -1
  120. package/lib/utils/suggester-workers/create-worker-ts.js +2 -1
  121. package/lib/utils/suggester-workers/create-worker.js +2 -1
  122. package/package.json +1 -1
  123. package/lib/components/questions/type.js +0 -5
  124. package/lib/hooks/use-did-change.js +0 -19
  125. package/lib/src/components/questions/type.d.ts +0 -4
  126. package/lib/src/hooks/use-did-change.d.ts +0 -4
  127. package/lib/stories/input-number/source-dynamic.json +0 -41
  128. package/lib/stories/questionnaires/EAP/data-eap.json +0 -46
  129. package/lib/stories/questionnaires/EAP/eap.stories.js +0 -71
  130. package/lib/stories/questionnaires/EAP/source-eap.json +0 -433
  131. package/lib/stories/sequence/source-questions.json +0 -19
  132. package/lib/stories/suggester/multipleResponses.json +0 -100
@@ -0,0 +1,293 @@
1
+ {
2
+ "cleaning": {},
3
+ "variables": [
4
+ {
5
+ "variableType": "COLLECTED",
6
+ "values": {
7
+ "COLLECTED": null,
8
+ "EDITED": null,
9
+ "INPUTED": null,
10
+ "FORCED": null,
11
+ "PREVIOUS": null
12
+ },
13
+ "name": "COMMENT_QE"
14
+ },
15
+ {
16
+ "variableType": "COLLECTED",
17
+ "values": {
18
+ "COLLECTED": null,
19
+ "EDITED": null,
20
+ "INPUTED": null,
21
+ "FORCED": null,
22
+ "PREVIOUS": null
23
+ },
24
+ "name": "Q1"
25
+ },
26
+ {
27
+ "variableType": "COLLECTED",
28
+ "values": {
29
+ "COLLECTED": null,
30
+ "EDITED": null,
31
+ "INPUTED": null,
32
+ "FORCED": null,
33
+ "PREVIOUS": null
34
+ },
35
+ "name": "Q2"
36
+ },
37
+ {
38
+ "variableType": "COLLECTED",
39
+ "values": {
40
+ "COLLECTED": null,
41
+ "EDITED": null,
42
+ "INPUTED": null,
43
+ "FORCED": null,
44
+ "PREVIOUS": null
45
+ },
46
+ "name": "Q3"
47
+ },
48
+ {
49
+ "variableType": "COLLECTED",
50
+ "values": {
51
+ "COLLECTED": null,
52
+ "EDITED": null,
53
+ "INPUTED": null,
54
+ "FORCED": null,
55
+ "PREVIOUS": null
56
+ },
57
+ "name": "Q4"
58
+ },
59
+ {
60
+ "variableType": "COLLECTED",
61
+ "values": {
62
+ "COLLECTED": null,
63
+ "EDITED": null,
64
+ "INPUTED": null,
65
+ "FORCED": null,
66
+ "PREVIOUS": null
67
+ },
68
+ "name": "Q5"
69
+ },
70
+ {
71
+ "variableType": "COLLECTED",
72
+ "values": {
73
+ "COLLECTED": null,
74
+ "EDITED": null,
75
+ "INPUTED": null,
76
+ "FORCED": null,
77
+ "PREVIOUS": null
78
+ },
79
+ "name": "Q6"
80
+ },
81
+ {
82
+ "variableType": "COLLECTED",
83
+ "values": {
84
+ "COLLECTED": null,
85
+ "EDITED": null,
86
+ "INPUTED": null,
87
+ "FORCED": null,
88
+ "PREVIOUS": null
89
+ },
90
+ "name": "Q7"
91
+ },
92
+ {
93
+ "variableType": "COLLECTED",
94
+ "values": {
95
+ "COLLECTED": null,
96
+ "EDITED": null,
97
+ "INPUTED": null,
98
+ "FORCED": null,
99
+ "PREVIOUS": null
100
+ },
101
+ "name": "Q8"
102
+ },
103
+ {
104
+ "variableType": "COLLECTED",
105
+ "values": {
106
+ "COLLECTED": null,
107
+ "EDITED": null,
108
+ "INPUTED": null,
109
+ "FORCED": null,
110
+ "PREVIOUS": null
111
+ },
112
+ "name": "Q9"
113
+ },
114
+ {
115
+ "variableType": "COLLECTED",
116
+ "values": {
117
+ "COLLECTED": null,
118
+ "EDITED": null,
119
+ "INPUTED": null,
120
+ "FORCED": null,
121
+ "PREVIOUS": null
122
+ },
123
+ "name": "Q10"
124
+ },
125
+ {
126
+ "variableType": "COLLECTED",
127
+ "values": {
128
+ "COLLECTED": null,
129
+ "EDITED": null,
130
+ "INPUTED": null,
131
+ "FORCED": null,
132
+ "PREVIOUS": null
133
+ },
134
+ "name": "MIX1"
135
+ },
136
+ {
137
+ "variableType": "COLLECTED",
138
+ "values": {
139
+ "COLLECTED": null,
140
+ "EDITED": null,
141
+ "INPUTED": null,
142
+ "FORCED": null,
143
+ "PREVIOUS": null
144
+ },
145
+ "name": "MIX2"
146
+ },
147
+ {
148
+ "variableType": "COLLECTED",
149
+ "values": {
150
+ "COLLECTED": null,
151
+ "EDITED": null,
152
+ "INPUTED": null,
153
+ "FORCED": null,
154
+ "PREVIOUS": null
155
+ },
156
+ "name": "MIX3"
157
+ },
158
+ {
159
+ "variableType": "COLLECTED",
160
+ "values": {
161
+ "COLLECTED": null,
162
+ "EDITED": null,
163
+ "INPUTED": null,
164
+ "FORCED": null,
165
+ "PREVIOUS": null
166
+ },
167
+ "name": "MIX4"
168
+ },
169
+ {
170
+ "variableType": "CALCULATED",
171
+ "expression": { "type": "VTL", "value": "true" },
172
+ "name": "FILTER_RESULT_Q1",
173
+ "inFilter": "false"
174
+ },
175
+ {
176
+ "variableType": "CALCULATED",
177
+ "expression": { "type": "VTL", "value": "true" },
178
+ "name": "FILTER_RESULT_Q2",
179
+ "inFilter": "false"
180
+ },
181
+ {
182
+ "variableType": "CALCULATED",
183
+ "expression": { "type": "VTL", "value": "true" },
184
+ "name": "FILTER_RESULT_Q3",
185
+ "inFilter": "false"
186
+ },
187
+ {
188
+ "variableType": "CALCULATED",
189
+ "expression": { "type": "VTL", "value": "true" },
190
+ "name": "FILTER_RESULT_Q4",
191
+ "inFilter": "false"
192
+ },
193
+ {
194
+ "variableType": "CALCULATED",
195
+ "expression": { "type": "VTL", "value": "true" },
196
+ "name": "FILTER_RESULT_Q5",
197
+ "inFilter": "false"
198
+ },
199
+ {
200
+ "variableType": "CALCULATED",
201
+ "expression": { "type": "VTL", "value": "true" },
202
+ "name": "FILTER_RESULT_Q6",
203
+ "inFilter": "false"
204
+ },
205
+ {
206
+ "variableType": "CALCULATED",
207
+ "expression": { "type": "VTL", "value": "true" },
208
+ "name": "FILTER_RESULT_Q7",
209
+ "inFilter": "false"
210
+ },
211
+ {
212
+ "variableType": "CALCULATED",
213
+ "expression": { "type": "VTL", "value": "true" },
214
+ "name": "FILTER_RESULT_Q8",
215
+ "inFilter": "false"
216
+ },
217
+ {
218
+ "variableType": "CALCULATED",
219
+ "expression": { "type": "VTL", "value": "true" },
220
+ "name": "FILTER_RESULT_Q9",
221
+ "inFilter": "false"
222
+ },
223
+ {
224
+ "variableType": "CALCULATED",
225
+ "expression": { "type": "VTL", "value": "true" },
226
+ "name": "FILTER_RESULT_Q10",
227
+ "inFilter": "false"
228
+ },
229
+ {
230
+ "variableType": "CALCULATED",
231
+ "expression": { "type": "VTL", "value": "true" },
232
+ "name": "FILTER_RESULT_MIX1",
233
+ "inFilter": "false"
234
+ },
235
+ {
236
+ "variableType": "CALCULATED",
237
+ "expression": { "type": "VTL", "value": "true" },
238
+ "name": "FILTER_RESULT_MIX2",
239
+ "inFilter": "false"
240
+ },
241
+ {
242
+ "variableType": "CALCULATED",
243
+ "expression": { "type": "VTL", "value": "true" },
244
+ "name": "FILTER_RESULT_MIX3",
245
+ "inFilter": "false"
246
+ },
247
+ {
248
+ "variableType": "CALCULATED",
249
+ "expression": { "type": "VTL", "value": "true" },
250
+ "name": "FILTER_RESULT_MIX4",
251
+ "inFilter": "false"
252
+ }
253
+ ],
254
+ "components": [
255
+ {
256
+ "componentType": "Sequence",
257
+ "hierarchy": {
258
+ "sequence": {
259
+ "id": "kanya0cm",
260
+ "page": "1",
261
+ "label": {
262
+ "type": "VTL|MD",
263
+ "value": "\"I - \" || \"Séquence - questions comportant des déclarations de différents types\""
264
+ }
265
+ }
266
+ },
267
+ "conditionFilter": { "type": "VTL", "value": "true" },
268
+ "id": "kanya0cm",
269
+ "page": "1",
270
+ "label": {
271
+ "type": "VTL|MD",
272
+ "value": "\"I - \" || \"Séquence - questions comportant des déclarations de différents types\""
273
+ },
274
+ "declarations": [
275
+ {
276
+ "declarationType": "INSTRUCTION",
277
+ "id": "kanya0cm-kanzilet",
278
+ "label": {
279
+ "type": "VTL|MD",
280
+ "value": "\"consigne de séquence cawi\""
281
+ },
282
+ "position": "AFTER_QUESTION_TEXT"
283
+ },
284
+ {
285
+ "declarationType": "HELP",
286
+ "id": "kanya0cm-kzfdtx2b",
287
+ "label": { "type": "VTL|MD", "value": "\"aide de séquence cawi\"" },
288
+ "position": "AFTER_QUESTION_TEXT"
289
+ }
290
+ ]
291
+ }
292
+ ]
293
+ }
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.WithQuestions = exports.WithDeclarations = void 0;
6
+ exports["default"] = exports.afterSeq = exports.WithDeclarations = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
9
9
  var _sourceDeclarations = _interopRequireDefault(require("./source-declarations.json"));
10
- var _sourceQuestions = _interopRequireDefault(require("./source-questions.json"));
10
+ var _afterInSeq = _interopRequireDefault(require("./afterInSeq.json"));
11
11
  var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -16,7 +16,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
16
16
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
17
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } // import sourceQuestions from './source-questions.json';
20
20
  var stories = {
21
21
  title: 'Components/Sequence',
22
22
  component: _orchestrator["default"],
@@ -33,9 +33,13 @@ WithDeclarations.args = {
33
33
  id: 'sequence-declarations',
34
34
  source: _sourceDeclarations["default"]
35
35
  };
36
- var WithQuestions = Template.bind({});
37
- exports.WithQuestions = WithQuestions;
38
- WithQuestions.args = {
39
- id: 'sequence-questions',
40
- source: _sourceQuestions["default"]
36
+
37
+ // export const WithQuestions = Template.bind({});
38
+ // WithQuestions.args = { id: 'sequence-questions', source: sourceQuestions };
39
+
40
+ var afterSeq = Template.bind({});
41
+ exports.afterSeq = afterSeq;
42
+ afterSeq.args = {
43
+ id: 'sequence-after',
44
+ source: _afterInSeq["default"]
41
45
  };
@@ -16,6 +16,15 @@
16
16
  "type": "VTL|MD"
17
17
  }
18
18
  },
19
+ {
20
+ "id": "kb9hi4j0-krnoclfe",
21
+ "declarationType": "INSTRUCTION",
22
+ "position": "AFTER_QUESTION_TEXT",
23
+ "label": {
24
+ "value": "\"Déclaration AFTER\"",
25
+ "type": "VTL|MD"
26
+ }
27
+ },
19
28
  {
20
29
  "id": "kb9hi4j0-krnoclfe",
21
30
  "declarationType": "HELP",
@@ -7,11 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports["default"] = exports.Default = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
10
+ var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
10
11
  var _idbTools = require("../../utils/idb-tools");
11
12
  var _storeTools = require("../../utils/store-tools");
12
13
  var _appendToIndex = _interopRequireDefault(require("../../utils/suggester-workers/append-to-index"));
13
14
  var _searching = _interopRequireDefault(require("../../utils/suggester-workers/searching"));
14
- var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
15
+ var _logger = require("../../utils/logger");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
16
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -24,7 +25,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
24
25
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
25
26
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
27
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
27
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // import source from './source';
28
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
28
29
  var stories = {
29
30
  title: 'Components/Suggester-workers',
30
31
  component: _orchestrator["default"],
@@ -103,12 +104,12 @@ function _loadOne() {
103
104
  _context2.next = 11;
104
105
  return (0, _idbTools.clearDb)(db, _storeTools.CONSTANTES.STORE_INFO_NAME);
105
106
  case 11:
106
- console.log({
107
+ _logger.Logger.log({
107
108
  info: info,
108
109
  rubriques: rubriques
109
110
  });
110
111
  _context2.next = 14;
111
- return (0, _appendToIndex["default"])(info, '1', rubriques, console.log);
112
+ return (0, _appendToIndex["default"])(info, '1', rubriques, _logger.Logger.log);
112
113
  case 14:
113
114
  _context2.next = 16;
114
115
  return (0, _idbTools.insertEntity)(db, _storeTools.CONSTANTES.STORE_INFO_NAME, info);
@@ -155,7 +156,7 @@ function Search(_ref) {
155
156
  });
156
157
  case 2:
157
158
  results = _context.sent;
158
- console.log(results);
159
+ _logger.Logger.log(results);
159
160
  case 4:
160
161
  case "end":
161
162
  return _context.stop();
@@ -165,7 +166,7 @@ function Search(_ref) {
165
166
  return _doIt.apply(this, arguments);
166
167
  }
167
168
  if (value.length) {
168
- doIt();
169
+ doIt()["catch"](_logger.Logger.error);
169
170
  }
170
171
  }, [value, name, version, max, order, meloto]);
171
172
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -3,13 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.Simple = exports.MultipleResponses = exports.Default = void 0;
6
+ exports["default"] = exports.Simple = exports.Default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
9
8
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
10
- var _multipleResponses = _interopRequireDefault(require("./multipleResponses"));
11
- var _simple = _interopRequireDefault(require("./simple"));
12
9
  var _source = _interopRequireDefault(require("./source"));
10
+ var _simple = _interopRequireDefault(require("./simple"));
11
+ var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
14
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
@@ -42,7 +41,7 @@ function _getReferentiel() {
42
41
  while (1) switch (_context.prev = _context.next) {
43
42
  case 0:
44
43
  _context.t0 = name;
45
- _context.next = _context.t0 === 'naf-rev2-stop' ? 3 : _context.t0 === 'naf-rev2' ? 3 : _context.t0 === 'cog-communes' ? 4 : _context.t0 === 'nomenclature-multiple' ? 5 : 6;
44
+ _context.next = _context.t0 === 'naf-rev2-stop' ? 3 : _context.t0 === 'naf-rev2' ? 3 : _context.t0 === 'cog-communes' ? 4 : 5;
46
45
  break;
47
46
  case 3:
48
47
  return _context.abrupt("return", fetch('https://inseefr.github.io/Lunatic/storybook/naf-rev2.json').then(function (r) {
@@ -53,12 +52,8 @@ function _getReferentiel() {
53
52
  return r.json();
54
53
  }));
55
54
  case 5:
56
- return _context.abrupt("return", fetch('/nomenclature-multiple.json').then(function (r) {
57
- return r.json();
58
- }));
59
- case 6:
60
55
  throw new Error("Unkonw r\xE9f\xE9rentiel ".concat(name));
61
- case 7:
56
+ case 6:
62
57
  case "end":
63
58
  return _context.stop();
64
59
  }
@@ -86,12 +81,4 @@ Simple.args = {
86
81
  control: 'boolean',
87
82
  defaultValue: true
88
83
  }
89
- };
90
- var MultipleResponses = Template.bind({});
91
- exports.MultipleResponses = MultipleResponses;
92
- MultipleResponses.args = {
93
- id: 'suggester-multiple',
94
- source: _multipleResponses["default"],
95
- getReferentiel: getReferentiel,
96
- autoSuggesterLoading: true
97
84
  };
@@ -11,6 +11,7 @@ var lunatic = _interopRequireWildcard(require("../.."));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _overview = require("./overview");
13
13
  var _waiting = _interopRequireDefault(require("./waiting"));
14
+ var _logger = require("../../utils/logger");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  var _excluded = ["source", "data", "management", "shortcut", "activeControls", "features", "initialPage", "getStoreInfo", "missing", "missingStrategy", "missingShortcut", "autoSuggesterLoading", "addExternal", "preferences", "custom", "showOverview", "filterDescription", "getReferentiel", "dontKnowButton", "refusedButton"],
16
17
  _excluded2 = ["id", "componentType", "response", "storeName", "conditionFilter"];
@@ -52,7 +53,7 @@ function DevOptions(_ref) {
52
53
  className: "contenur",
53
54
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(lunatic.Button, {
54
55
  onClick: function onClick() {
55
- return console.log(getData(true));
56
+ return _logger.Logger.log(getData(true));
56
57
  },
57
58
  children: "Get State"
58
59
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(lunatic.Button, {
@@ -107,14 +108,14 @@ function Pager(_ref2) {
107
108
  return null;
108
109
  }
109
110
  function onLogChange(response, value, args) {
110
- console.log('onChange', {
111
+ _logger.Logger.log('onChange', {
111
112
  response: response,
112
113
  value: value,
113
114
  args: args
114
115
  });
115
116
  }
116
117
  function logMissingStrategy() {
117
- console.log('no missing strategy');
118
+ _logger.Logger.log('no missing strategy');
118
119
  }
119
120
  function OrchestratorForStories(_ref3) {
120
121
  var source = _ref3.source,
@@ -24,7 +24,7 @@ var interpretAllCalculatedVariables = function interpretAllCalculatedVariables(_
24
24
  var variables = _ref.variables,
25
25
  partialVariables = _ref.partialVariables,
26
26
  builtVariables = _ref.builtVariables;
27
- return Object.entries(partialVariables || variables).reduce(function (acc, _ref2) {
27
+ return Object.entries(partialVariables !== null && partialVariables !== void 0 ? partialVariables : variables).reduce(function (acc, _ref2) {
28
28
  var _ref3 = _slicedToArray(_ref2, 2),
29
29
  k = _ref3[0],
30
30
  v = _ref3[1];
@@ -59,7 +59,7 @@ function computeErrors(state) {
59
59
  return (0, _fillComponentExpressions["default"])(component, state);
60
60
  }).filter(function (_ref2) {
61
61
  var conditionFilter = _ref2.conditionFilter;
62
- return conditionFilter !== undefined ? conditionFilter : true;
62
+ return conditionFilter !== null && conditionFilter !== void 0 ? conditionFilter : true;
63
63
  });
64
64
  var errors = validateComponents(state, componentFiltered);
65
65
  var currentErrors = Object.keys(errors).length > 0 ? errors : undefined;
@@ -62,7 +62,6 @@ function createExecuteExpression(variables, features) {
62
62
  // on aimerait map d'expression, avec les bindings
63
63
  var bindings = createBindings(variables);
64
64
  var tokensMap = new Map();
65
- var collectedUpdated = new Map();
66
65
  var _createMemoizer = (0, _createMemoizer3["default"])(),
67
66
  _createMemoizer2 = _slicedToArray(_createMemoizer, 2),
68
67
  memoize = _createMemoizer2[0],
@@ -98,7 +97,6 @@ function createExecuteExpression(variables, features) {
98
97
  function updateBindings(name, value) {
99
98
  if (name in bindings) {
100
99
  bindings[name] = value;
101
- collectedUpdated.set(name, []);
102
100
  }
103
101
  pushToLazy(name);
104
102
  }
@@ -162,8 +160,7 @@ function createExecuteExpression(variables, features) {
162
160
  return dependencies.reduce(function (map, name) {
163
161
  if (name in variables) {
164
162
  var data = variables[name];
165
- var variable = data.variable,
166
- type = data.type;
163
+ var variable = data.variable;
167
164
  if (!(name in map)) {
168
165
  if (variable.variableType === 'CALCULATED') {
169
166
  var _expression = variable.expression;
@@ -24,7 +24,7 @@ var VTL_ATTRIBUTES = ['label', 'options.label', 'responses.label', 'hierarchy.la
24
24
  // Disable controls compilation
25
25
  // 'controls.control',
26
26
  // 'controls.errorMessage',
27
- 'controls.iterations', 'lines.min', 'lines.max', 'iterations', 'xAxisIterations', 'yAxisIterations', 'conditionFilter', 'header.label', 'questionContext', 'questionInformation', 'dynamicUnit'];
27
+ 'controls.iterations', 'lines.min', 'lines.max', 'iterations', 'xAxisIterations', 'yAxisIterations', 'conditionFilter', 'headers.label', 'header.label'];
28
28
 
29
29
  // Utility type to replace all expression from an object into a translated version
30
30
 
@@ -106,7 +106,6 @@ function collecteComponentResponse(_ref5) {
106
106
  });
107
107
  }
108
108
  if ('response' in component) {
109
- // @ts-ignore
110
109
  return mergeResponse({
111
110
  map: map,
112
111
  response: component.response,
@@ -120,13 +119,6 @@ function collecteComponentResponse(_ref5) {
120
119
  map: map
121
120
  });
122
121
  }
123
- if ('responses' in component && component.componentType === 'Suggester') {
124
- return collecteArrayResponses({
125
- components: component.responses,
126
- variables: variables,
127
- map: map
128
- });
129
- }
130
122
  if ('responses' in component) {
131
123
  // TODO : Understand this cause types doesn't match
132
124
  return collecteArrayResponses({