@inseefr/lunatic 2.7.10 → 2.7.12

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 (26) hide show
  1. package/lib/components/loop/constant.js +1 -1
  2. package/lib/components/radio/html/radio-option.js +5 -3
  3. package/lib/components/suggester/html/suggester.js +12 -7
  4. package/lib/components/summary/html/summary-responses.js +3 -5
  5. package/lib/src/components/suggester/html/suggester.d.ts +1 -0
  6. package/lib/src/components/suggester/searching/create-searching.d.ts +1 -0
  7. package/lib/stories/behaviour/cleaning/{test.stories.js → cleaning.stories.js} +10 -3
  8. package/lib/stories/behaviour/cleaning/source-loop.json +130 -0
  9. package/lib/stories/behaviour/resizing/{test.stories.js → resizing.stories.js} +8 -1
  10. package/lib/stories/behaviour/resizing/source-resizing-cleaning.json +171 -0
  11. package/lib/stories/component-set/data-loop.json +1 -1
  12. package/lib/stories/roundabout/source.json +25 -18
  13. package/lib/stories/suggester/simple.json +5 -2
  14. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +2 -3
  15. package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +1 -1
  16. package/lib/use-lunatic/hooks/use-page-has-response.js +16 -0
  17. package/lib/use-lunatic/use-lunatic.test.js +59 -7
  18. package/lib/use-lunatic/use-suggesters.js +10 -6
  19. package/lib/utils/store-tools/initStore.js +4 -3
  20. package/lib/utils/store-tools/open-or-create-store.js +3 -3
  21. package/lib/utils/suggester-workers/searching/searching.js +20 -10
  22. package/lib/utils/suggester-workers/searching/searching.worker.js +5 -1
  23. package/lib/utils/vtl.js +4 -4
  24. package/package.json +3 -3
  25. package/workers-release/lunatic-append-worker-0.3.0.js +1 -1
  26. package/workers-release/lunatic-search-worker-0.3.0.js +1 -1
@@ -7,4 +7,4 @@ exports.blockedInLoopComponents = void 0;
7
7
  /**
8
8
  * List of components blocked in non-paginated loop
9
9
  */
10
- var blockedInLoopComponents = exports.blockedInLoopComponents = ['RosterForLoop', 'Loop', 'PairwiseLinks', 'Roundabout', 'CheckboxGroup'];
10
+ var blockedInLoopComponents = exports.blockedInLoopComponents = ['RosterForLoop', 'Loop', 'PairwiseLinks', 'Roundabout'];
@@ -4,14 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _react = require("react");
8
7
  var _classnames = _interopRequireDefault(require("classnames"));
9
- var _commons = require("../../commons");
10
- var _icons = require("../../commons/icons");
8
+ var _react = require("react");
11
9
  var _reactKeyboardEventHandler = _interopRequireDefault(require("react-keyboard-event-handler"));
12
10
  var _function = require("../../../utils/function");
11
+ var _commons = require("../../commons");
12
+ var _icons = require("../../commons/icons");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+ /* eslint-disable jsx-a11y/role-supports-aria-props */
16
+
15
17
  function RadioOption(_ref) {
16
18
  var checked = _ref.checked,
17
19
  _ref$onClick = _ref.onClick,
@@ -47,28 +47,33 @@ function Suggester(_ref) {
47
47
  _useState4 = _slicedToArray(_useState3, 2),
48
48
  options = _useState4[0],
49
49
  setOptions = _useState4[1];
50
+ var lastSearch = (0, _react.useRef)('');
50
51
  var handleSelect = (0, _react.useCallback)(function (id) {
51
52
  onSelect(id ? id : null);
52
53
  }, [onSelect]);
53
54
  var handleChange = (0, _react.useCallback)( /*#__PURE__*/function () {
54
55
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(search) {
55
- var _yield$searching, results;
56
+ var _yield$searching, results, previous;
56
57
  return _regeneratorRuntime().wrap(function _callee$(_context) {
57
58
  while (1) switch (_context.prev = _context.next) {
58
59
  case 0:
60
+ lastSearch.current = search !== null && search !== void 0 ? search : '';
59
61
  if (!(search && typeof searching === 'function')) {
60
62
  _context.next = 10;
61
63
  break;
62
64
  }
63
- _context.next = 3;
65
+ _context.next = 4;
64
66
  return searching(search);
65
- case 3:
67
+ case 4:
66
68
  _yield$searching = _context.sent;
67
69
  results = _yield$searching.results;
68
- setOptions(results);
69
- setSearch(search);
70
- // if a user does not select an option in the list, their search term is saved
71
- onSelect(search);
70
+ previous = _yield$searching.search;
71
+ if (previous === lastSearch.current) {
72
+ setOptions(results);
73
+ setSearch(search);
74
+ // if a user does not select an option in the list, their search term is saved
75
+ onSelect(search);
76
+ }
72
77
  _context.next = 13;
73
78
  break;
74
79
  case 10:
@@ -19,8 +19,7 @@ function ListResponses(_ref) {
19
19
  });
20
20
  }
21
21
  function Responses(_ref2) {
22
- var values = _ref2.values,
23
- sectionIndex = _ref2.sectionIndex;
22
+ var values = _ref2.values;
24
23
  if (!values) {
25
24
  return null;
26
25
  }
@@ -31,7 +30,7 @@ function Responses(_ref2) {
31
30
  id = _ref3.id;
32
31
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
33
32
  children: [label, " : ", value]
34
- }, "".concat(id, "-").concat(sectionIndex));
33
+ }, "response-".concat(index));
35
34
  })
36
35
  });
37
36
  }
@@ -48,8 +47,7 @@ function SummaryResponses(_ref4) {
48
47
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ListResponses, {
49
48
  title: title,
50
49
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Responses, {
51
- values: values,
52
- sectionIndex: index
50
+ values: values
53
51
  })
54
52
  }, "".concat(id, "-").concat(index));
55
53
  })
@@ -16,6 +16,7 @@ type Props = {
16
16
  id?: string;
17
17
  searching?: (s: string | null) => Promise<{
18
18
  results: ComboBoxOptionType[];
19
+ search: string;
19
20
  }>;
20
21
  label?: ReactNode;
21
22
  description?: ReactNode;
@@ -2,5 +2,6 @@ import type { ComboBoxOptionType } from '../../commons/components/combo-box/comb
2
2
  export declare function isWorkerCompatible(): boolean;
3
3
  declare function createSearching(name: string, version: string, workersBasePath?: string): (search: string | null) => Promise<{
4
4
  results: ComboBoxOptionType[];
5
+ search: string;
5
6
  }>;
6
7
  export default createSearching;
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.Default = void 0;
6
+ exports["default"] = exports.Loop = 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
9
  var _source = _interopRequireDefault(require("./source.json"));
10
+ var _sourceLoop = _interopRequireDefault(require("./source-loop.json"));
11
+ var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
14
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -77,7 +78,13 @@ var Template = function Template(args) {
77
78
  };
78
79
  var Default = exports.Default = Template.bind({});
79
80
  Default.args = {
80
- id: 'resizing-default',
81
+ id: 'cleaning-default',
81
82
  pagination: true,
82
83
  source: _source["default"]
84
+ };
85
+ var Loop = exports.Loop = Template.bind({});
86
+ Loop.args = {
87
+ id: 'cleaning-loop',
88
+ pagination: true,
89
+ source: _sourceLoop["default"]
83
90
  };
@@ -0,0 +1,130 @@
1
+ {
2
+ "resizing": {
3
+ "PRENOM": {
4
+ "variables": ["AGE", "HIDE_AGE"],
5
+ "size": "count(PRENOM)"
6
+ }
7
+ },
8
+ "cleaning": {
9
+ "HIDE_AGE": {
10
+ "AGE": "false"
11
+ }
12
+ },
13
+ "variables": [
14
+ {
15
+ "variableType": "COLLECTED",
16
+ "values": {
17
+ "COLLECTED": ["John", "Jane"],
18
+ "EDITED": null,
19
+ "INPUTED": null,
20
+ "FORCED": null,
21
+ "PREVIOUS": null
22
+ },
23
+ "name": "PRENOM"
24
+ },
25
+ {
26
+ "variableType": "COLLECTED",
27
+ "values": {
28
+ "COLLECTED": [null],
29
+ "EDITED": null,
30
+ "INPUTED": null,
31
+ "FORCED": null,
32
+ "PREVIOUS": null
33
+ },
34
+ "name": "AGE"
35
+ },
36
+ {
37
+ "variableType": "COLLECTED",
38
+ "values": {
39
+ "COLLECTED": [null],
40
+ "EDITED": null,
41
+ "INPUTED": null,
42
+ "FORCED": null,
43
+ "PREVIOUS": null
44
+ },
45
+ "name": "HIDE_AGE"
46
+ }
47
+ ],
48
+ "components": [
49
+ {
50
+ "componentType": "Loop",
51
+ "id": "loop",
52
+ "label": "Ajouter",
53
+ "bindingDependencies": ["PRENOM"],
54
+ "lines": {
55
+ "min": { "value": 1, "type": "VTL" },
56
+ "max": { "value": 10, "type": "VTL" }
57
+ },
58
+ "page": "1",
59
+ "components": [
60
+ {
61
+ "componentType": "Input",
62
+ "label": "Prénom",
63
+ "bindingDependencies": ["PRENOM"],
64
+ "id": "prenom",
65
+ "response": {
66
+ "name": "PRENOM"
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "componentType": "Loop",
73
+ "id": "loop2",
74
+ "paginatedLoop": true,
75
+ "bindingDependencies": ["PRENOM"],
76
+ "iterations": { "value": "count(PRENOM)", "type": "VTL" },
77
+ "page": "2",
78
+ "maxPage": "2",
79
+ "components": [
80
+ {
81
+ "componentType": "Input",
82
+ "label": {
83
+ "value": "\"Age de \" || PRENOM",
84
+ "type": "VTL"
85
+ },
86
+ "bindingDependencies": ["AGE"],
87
+ "id": "age",
88
+ "page": "2.1",
89
+ "response": {
90
+ "name": "AGE"
91
+ }
92
+ },
93
+ {
94
+ "componentType": "CheckboxBoolean",
95
+ "label": {
96
+ "value": "\"Masquer l'age de \" || PRENOM || \" ?\"",
97
+ "type": "VTL"
98
+ },
99
+ "bindingDependencies": ["HIDE_AGE"],
100
+ "id": "hideage",
101
+ "page": "2.2",
102
+ "response": {
103
+ "name": "HIDE_AGE"
104
+ }
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "componentType": "Sequence",
110
+ "conditionFilter": {
111
+ "type": "VTL",
112
+ "value": "true"
113
+ },
114
+ "id": "ksyjs7vy",
115
+ "page": "3",
116
+ "label": {
117
+ "type": "VTL|MD",
118
+ "value": "\"END\""
119
+ }
120
+ }
121
+ ],
122
+ "pagination": "question",
123
+ "lunaticModelVersion": "2.3.2-rc4",
124
+ "modele": "TESTSURSUM",
125
+ "enoCoreVersion": "2.4.1-pairwise",
126
+ "generatingDate": "14-04-2023 09:00:09",
127
+ "missing": false,
128
+ "id": "lb3ei722",
129
+ "maxPage": "3"
130
+ }
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.Default = void 0;
6
+ exports["default"] = exports.ResizingWithCleaning = exports.Default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
9
9
  var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
10
10
  var _source = _interopRequireDefault(require("./source.json"));
11
+ var _sourceResizingCleaning = _interopRequireDefault(require("./source-resizing-cleaning.json"));
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
14
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -80,4 +81,10 @@ Default.args = {
80
81
  id: 'resizing-default',
81
82
  pagination: true,
82
83
  source: _source["default"]
84
+ };
85
+ var ResizingWithCleaning = exports.ResizingWithCleaning = Template.bind({});
86
+ ResizingWithCleaning.args = {
87
+ id: 'resizing-with-cleaning',
88
+ source: _sourceResizingCleaning["default"],
89
+ pagination: true
83
90
  };
@@ -0,0 +1,171 @@
1
+ {
2
+ "id": "lfrzny8b",
3
+ "modele": "RP",
4
+ "enoCoreVersion": "2.4.1",
5
+ "lunaticModelVersion": "2.3.1",
6
+ "generatingDate": "28-03-2023 12:57:35",
7
+ "missing": false,
8
+ "pagination": "question",
9
+ "maxPage": "2",
10
+ "label": {
11
+ "value": "\"Resizing with cleaning\"",
12
+ "type": "VTL|MD"
13
+ },
14
+ "components": [
15
+ {
16
+ "page": "1",
17
+ "id": "lfwih8tj-habitants",
18
+ "componentType": "InputNumber",
19
+ "mandatory": false,
20
+ "min": 0,
21
+ "max": 25,
22
+ "label": {
23
+ "value": "\"Nombre d'habitant(s) \"",
24
+ "type": "VTL"
25
+ },
26
+ "declarations": [
27
+ {
28
+ "id": "kb9hi4j0-krnoclfe",
29
+ "declarationType": "HELP",
30
+ "position": "DETACHABLE",
31
+ "label": {
32
+ "value": "\"Changing this value should both clean and resize 'PRENOMS'\"",
33
+ "type": "VTL|MD"
34
+ }
35
+ }
36
+ ],
37
+ "controls": [
38
+ {
39
+ "id": "lfwih8tj-habitants-CI-0",
40
+ "typeOfControl": "CONSISTENCY",
41
+ "criticality": "ERROR",
42
+ "control": {
43
+ "value": "not(isnull(NB))",
44
+ "type": "VTL"
45
+ },
46
+ "errorMessage": {
47
+ "value": "\"Veuillez entrer un nombre d'habitant(s)\"",
48
+ "type": "VTL"
49
+ }
50
+ },
51
+ {
52
+ "id": "lfwih8tj-habitants-CI-1",
53
+ "typeOfControl": "CONSISTENCY",
54
+ "criticality": "ERROR",
55
+ "control": {
56
+ "value": "isnull(NB) or NB >= 0",
57
+ "type": "VTL"
58
+ },
59
+ "errorMessage": {
60
+ "value": "\"Veuillez entrer un nombre d'habitant(s) valide\"",
61
+ "type": "VTL"
62
+ }
63
+ }
64
+ ],
65
+ "conditionFilter": {
66
+ "value": "true",
67
+ "type": "VTL"
68
+ },
69
+ "response": {
70
+ "name": "NB"
71
+ }
72
+ },
73
+ {
74
+ "id": "lfwg2ny2-list-habitants",
75
+ "componentType": "Loop",
76
+ "loopDependencies": ["NB"],
77
+ "iterations": {
78
+ "value": "NB",
79
+ "type": "VTL"
80
+ },
81
+ "page": "2",
82
+ "maxPage": "4",
83
+ "depth": 1,
84
+ "paginatedLoop": true,
85
+ "conditionFilter": {
86
+ "value": "NB >= 1",
87
+ "type": "VTL"
88
+ },
89
+ "components": [
90
+ {
91
+ "id": "lfwg2ny2-prenoms",
92
+ "label": {
93
+ "value": "\"Prénom \"",
94
+ "type": "VTL"
95
+ },
96
+ "conditionFilter": {
97
+ "value": "true",
98
+ "type": "VTL"
99
+ },
100
+ "controls": [
101
+ {
102
+ "id": "lfwg2ny2-prenoms-CI-0",
103
+ "typeOfControl": "CONSISTENCY",
104
+ "criticality": "ERROR",
105
+ "control": {
106
+ "value": "not(nvl(PRENOMS, \"\") = \"\")",
107
+ "type": "VTL"
108
+ },
109
+ "errorMessage": {
110
+ "value": "\"Veuillez entrer un prénom\"",
111
+ "type": "VTL"
112
+ }
113
+ },
114
+ {
115
+ "id": "lfwg2ny2-prenoms-CI-1",
116
+ "typeOfControl": "CONSISTENCY",
117
+ "criticality": "ERROR",
118
+ "control": {
119
+ "value": "not(match_characters(PRENOMS, \"^[-'a-zA-ZÀ-ÿœ$*\\s]+$\") = false)",
120
+ "type": "VTL"
121
+ },
122
+ "errorMessage": {
123
+ "value": "\"Votre prénom ne peut pas comporter de chiffres ou caractères spéciaux.\"",
124
+ "type": "VTL"
125
+ }
126
+ }
127
+ ],
128
+ "componentType": "Input",
129
+ "response": {
130
+ "name": "PRENOMS"
131
+ }
132
+ }
133
+ ]
134
+ }
135
+ ],
136
+ "variables": [
137
+ {
138
+ "variableType": "COLLECTED",
139
+ "name": "PRENOMS",
140
+ "values": {
141
+ "PREVIOUS": [null],
142
+ "COLLECTED": [null],
143
+ "FORCED": [null],
144
+ "EDITED": [null],
145
+ "INPUTED": [null]
146
+ }
147
+ },
148
+ {
149
+ "variableType": "COLLECTED",
150
+ "name": "NB",
151
+ "values": {
152
+ "PREVIOUS": null,
153
+ "COLLECTED": null,
154
+ "FORCED": null,
155
+ "EDITED": null,
156
+ "INPUTED": null
157
+ }
158
+ }
159
+ ],
160
+ "cleaning": {
161
+ "NB": {
162
+ "PRENOMS": "false"
163
+ }
164
+ },
165
+ "resizing": {
166
+ "NB": {
167
+ "size": "cast(NB, integer)",
168
+ "variables": ["PRENOMS"]
169
+ }
170
+ }
171
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "COLLECTED": {
3
- "PRENOMS": {
3
+ "PRENOM": {
4
4
  "EDITED": [null],
5
5
  "FORCED": [null],
6
6
  "INPUTED": [null],
@@ -74,11 +74,11 @@
74
74
  "type": "VTL"
75
75
  },
76
76
  "complete": {
77
- "value": "not(isnull(KNOWREC)) and not(isnull(SEXE)) and not(isnull(SOMETHING))",
77
+ "value": "COMPLETE",
78
78
  "type": "VTL"
79
79
  },
80
80
  "partial": {
81
- "value": "not(isnull(KNOWREC)) or not(isnull(SEXE)) or not(isnull(SOMETHING))",
81
+ "value": "PARTIAL",
82
82
  "type": "VTL"
83
83
  },
84
84
  "label": {
@@ -86,22 +86,7 @@
86
86
  "type": "VTL"
87
87
  }
88
88
  },
89
- "controls": [
90
- {
91
- "id": "roundabout-Carefull",
92
- "criticality": "WARN",
93
- "control": {
94
- "value": "not(isnull(KNOWREC)) and not(isnull(SEXE)) and not(isnull(SOMETHING))",
95
- "type": "VTL"
96
- },
97
- "type": "roundabout",
98
- "iterations": { "value": "NB_HAB", "type": "VTL" },
99
- "errorMessage": {
100
- "value": "\"Le formulaire n'est pas complet pour \" || PRENOMS",
101
- "type": "VTL|MD"
102
- }
103
- }
104
- ],
89
+ "controls": [],
105
90
  "components": [
106
91
  {
107
92
  "id": "radio",
@@ -268,6 +253,28 @@
268
253
  "expression": { "value": "first_value(PRENOMS over())", "type": "VTL" },
269
254
  "bindingDependencies": ["PRENOMS"],
270
255
  "inFilter": "true"
256
+ },
257
+ {
258
+ "variableType": "CALCULATED",
259
+ "name": "COMPLETE",
260
+ "expression": {
261
+ "value": "not(isnull(KNOWREC)) and not(isnull(SEXE)) and not(isnull(SOMETHING))",
262
+ "type": "VTL"
263
+ },
264
+ "bindingDependencies": ["KNOWREC", "SEXE", "SOMETHING"],
265
+ "shapeFrom": "PRENOMS",
266
+ "inFilter": "true"
267
+ },
268
+ {
269
+ "variableType": "CALCULATED",
270
+ "name": "PARTIAL",
271
+ "expression": {
272
+ "value": "not(isnull(KNOWREC)) or not(isnull(SEXE)) or not(isnull(SOMETHING))",
273
+ "type": "VTL"
274
+ },
275
+ "bindingDependencies": ["KNOWREC", "SEXE", "SOMETHING"],
276
+ "shapeFrom": "PRENOMS",
277
+ "inFilter": "true"
271
278
  }
272
279
  ],
273
280
  "resizing": {
@@ -20,7 +20,10 @@
20
20
  },
21
21
  {
22
22
  "name": "cog-communes",
23
- "fields": [{ "name": "id", "rules": "soft" }],
23
+ "fields": [
24
+ { "name": "id", "rules": "soft" },
25
+ { "name": "label", "rules": "soft" }
26
+ ],
24
27
  "queryParser": { "type": "soft" },
25
28
  "version": "1"
26
29
  },
@@ -85,7 +88,7 @@
85
88
  "name": "HELLO"
86
89
  },
87
90
  "missingResponse": { "name": "HELLO_MISSING" },
88
- "page": "2"
91
+ "page": "1"
89
92
  },
90
93
  {
91
94
  "id": "suggestions-inconnu",
@@ -26,9 +26,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
26
  * - expressions, VTL that states the level of completion for each iteration
27
27
  */
28
28
  function fillRoundaboutProps(component, state) {
29
- var iterations = component.iterations,
30
- expressions = component.expressions;
31
- var compiled = Object.entries(expressions).reduce(function (result, _ref) {
29
+ var iterations = component.iterations; // iterations is the result of an expression but we know it's a number
30
+ var compiled = Object.entries(component.expressions).reduce(function (result, _ref) {
32
31
  var _ref2 = _slicedToArray(_ref, 2),
33
32
  name = _ref2[0],
34
33
  expression = _ref2[1];
@@ -177,8 +177,8 @@ var LunaticVariablesStore = exports.LunaticVariablesStore = /*#__PURE__*/functio
177
177
  } finally {
178
178
  _iterator.f();
179
179
  }
180
- (0, _resizingBehaviour.resizingBehaviour)(store, source.resizing);
181
180
  (0, _cleaningBehaviour.cleaningBehaviour)(store, source.cleaning, initialValues);
181
+ (0, _resizingBehaviour.resizingBehaviour)(store, source.resizing);
182
182
  (0, _missingBehaviour.missingBehaviour)(store, source.missingBlock);
183
183
  return store;
184
184
  }
@@ -91,6 +91,22 @@ function isSubComponentsEmpty(components, executeExpression) {
91
91
  try {
92
92
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
93
93
  var component = _step2.value;
94
+ if ('responses' in component) {
95
+ var _iterator3 = _createForOfIteratorHelper(component.responses),
96
+ _step3;
97
+ try {
98
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
99
+ var response = _step3.value;
100
+ if (!isEmpty(executeExpression(response.response.name))) {
101
+ return false;
102
+ }
103
+ }
104
+ } catch (err) {
105
+ _iterator3.e(err);
106
+ } finally {
107
+ _iterator3.f();
108
+ }
109
+ }
94
110
  if ('response' in component && !isEmpty(executeExpression(component.response.name))) {
95
111
  return false;
96
112
  }