@inseefr/lunatic 2.4.3-beta → 2.4.4-FeatAltDeclarations

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 (127) hide show
  1. package/lib/components/component-set/html/component-set-components.js +4 -2
  2. package/lib/components/index.js +14 -0
  3. package/lib/components/questions/index.js +20 -0
  4. package/lib/components/questions/question-context.js +35 -0
  5. package/lib/components/questions/question-context.scss +10 -0
  6. package/lib/components/questions/question-information.js +35 -0
  7. package/lib/components/questions/question-information.scss +19 -0
  8. package/lib/components/sequence/html/sequence.js +22 -0
  9. package/lib/components/sequence/index.js +2 -2
  10. package/lib/components/sequence/lunatic-sequence.js +31 -0
  11. package/lib/components/sequence/sequence.spec.js +18 -23
  12. package/lib/components/suggester/idb-suggester/check-store.js +5 -3
  13. package/lib/components/table/lunatic-table.js +1 -2
  14. package/lib/components/table/table-orchestrator.js +2 -4
  15. package/lib/src/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.d.ts +1 -2
  16. package/lib/src/components/checkbox/checkbox-group/checkbox-group-content.d.ts +1 -2
  17. package/lib/src/components/checkbox/checkbox-group/html/checkbox-group-content.d.ts +1 -2
  18. package/lib/src/components/checkbox/checkbox-group/lunatic-checkbox-group.d.ts +1 -1
  19. package/lib/src/components/checkbox/checkbox-one/lunatic-checkbox-one.d.ts +1 -2
  20. package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +1 -1
  21. package/lib/src/components/commons/components/combo-box/combo-box-content.d.ts +1 -1
  22. package/lib/src/components/commons/components/combo-box/panel/option-container.d.ts +1 -1
  23. package/lib/src/components/commons/components/combo-box/panel/panel-container.d.ts +1 -1
  24. package/lib/src/components/commons/components/combo-box/panel/panel.d.ts +1 -1
  25. package/lib/src/components/commons/components/combo-box/selection/delete.d.ts +1 -2
  26. package/lib/src/components/commons/components/combo-box/selection/displayLabelOrInput.d.ts +1 -1
  27. package/lib/src/components/commons/components/combo-box/selection/input.d.ts +1 -2
  28. package/lib/src/components/commons/components/combo-box/selection/label-selection.d.ts +2 -2
  29. package/lib/src/components/commons/components/combo-box/selection/selection-container.d.ts +1 -1
  30. package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +1 -2
  31. package/lib/src/components/commons/components/default-label-renderer.d.ts +1 -2
  32. package/lib/src/components/commons/components/default-option-renderer.d.ts +1 -2
  33. package/lib/src/components/commons/components/description.d.ts +1 -1
  34. package/lib/src/components/commons/components/dragger/dragger.d.ts +1 -1
  35. package/lib/src/components/commons/components/errors/errors.d.ts +1 -2
  36. package/lib/src/components/commons/components/fab/fab.d.ts +1 -1
  37. package/lib/src/components/commons/components/field-container/field-container.d.ts +1 -1
  38. package/lib/src/components/commons/components/is-network/is-network.d.ts +1 -2
  39. package/lib/src/components/commons/components/lunatic-component-with-label.d.ts +1 -1
  40. package/lib/src/components/commons/components/lunatic-component-without-label.d.ts +1 -1
  41. package/lib/src/components/commons/components/md-label/link.d.ts +1 -1
  42. package/lib/src/components/commons/components/md-label/md-label.d.ts +1 -2
  43. package/lib/src/components/commons/components/missing/missing.d.ts +2 -3
  44. package/lib/src/components/commons/components/nothing-to-display.d.ts +1 -2
  45. package/lib/src/components/commons/components/orchestrated-component.d.ts +2 -3
  46. package/lib/src/components/commons/components/variable-status/variable-status.d.ts +1 -1
  47. package/lib/src/components/commons/create-row-orchestrator.d.ts +1 -1
  48. package/lib/src/components/commons/icons/checkbox-checked-icon.d.ts +1 -2
  49. package/lib/src/components/commons/icons/checkbox-unchecked-icon.d.ts +1 -2
  50. package/lib/src/components/commons/icons/closed-icon.d.ts +1 -2
  51. package/lib/src/components/commons/icons/cross-icon.d.ts +1 -2
  52. package/lib/src/components/commons/icons/load-icon.d.ts +1 -2
  53. package/lib/src/components/commons/icons/lunatic-icon.d.ts +1 -1
  54. package/lib/src/components/commons/icons/network-icon.d.ts +1 -2
  55. package/lib/src/components/commons/icons/on-drag-icon.d.ts +1 -2
  56. package/lib/src/components/commons/icons/opened-icon.d.ts +1 -2
  57. package/lib/src/components/commons/icons/radio-checked-icon.d.ts +1 -2
  58. package/lib/src/components/commons/icons/radio-unchecked-icon.d.ts +1 -2
  59. package/lib/src/components/component-set/html/component-set-components.d.ts +2 -2
  60. package/lib/src/components/component-set/html/legend/legend.d.ts +1 -1
  61. package/lib/src/components/component-set/lunatic-component-set.d.ts +1 -2
  62. package/lib/src/components/datepicker/html/datepicker-container.d.ts +1 -1
  63. package/lib/src/components/datepicker/html/datepicker-input.d.ts +1 -1
  64. package/lib/src/components/declarations/declarations-after-text.d.ts +1 -2
  65. package/lib/src/components/declarations/declarations-before-text.d.ts +1 -2
  66. package/lib/src/components/declarations/declarations-detachable.d.ts +1 -2
  67. package/lib/src/components/dropdown/html/dropdown-simple/dropdown-simple.d.ts +1 -2
  68. package/lib/src/components/dropdown/html/dropdown-simple/simple-label-renderer.d.ts +1 -2
  69. package/lib/src/components/dropdown/html/dropdown-simple/simple-option-renderer.d.ts +1 -2
  70. package/lib/src/components/dropdown/html/dropdown-writable/dropdown-writable.d.ts +1 -1
  71. package/lib/src/components/dropdown/html/dropdown-writable/writable-label-renderer.d.ts +1 -2
  72. package/lib/src/components/dropdown/html/dropdown-writable/writable-option-renderer.d.ts +1 -2
  73. package/lib/src/components/dropdown/lunatic-dropdown.d.ts +1 -2
  74. package/lib/src/components/index.d.ts +2 -0
  75. package/lib/src/components/input/lunatic-input.d.ts +1 -2
  76. package/lib/src/components/input-number/html/input-number-default.d.ts +1 -2
  77. package/lib/src/components/input-number/html/input-number-thousand.d.ts +1 -2
  78. package/lib/src/components/input-number/lunatic-input-number.d.ts +1 -2
  79. package/lib/src/components/loop/block-for-loop/block-for-loop-ochestrator.d.ts +1 -1
  80. package/lib/src/components/loop/block-for-loop/row.d.ts +1 -2
  81. package/lib/src/components/loop/commons/handle-row-button.d.ts +1 -1
  82. package/lib/src/components/loop/commons/row-component.d.ts +1 -2
  83. package/lib/src/components/loop/loop.d.ts +1 -2
  84. package/lib/src/components/loop/roster-for-loop/body.d.ts +1 -2
  85. package/lib/src/components/loop/roster-for-loop/header.d.ts +1 -1
  86. package/lib/src/components/loop/roster-for-loop/roster-for-loop-orchestrator.d.ts +1 -1
  87. package/lib/src/components/loop/roster-for-loop/roster-table.d.ts +1 -2
  88. package/lib/src/components/loop/roster-for-loop/row.d.ts +1 -2
  89. package/lib/src/components/modal-controls/close-or-skip.d.ts +1 -1
  90. package/lib/src/components/modal-controls/modal-controls.d.ts +1 -1
  91. package/lib/src/components/pairwise-links/orchestrator.d.ts +1 -2
  92. package/lib/src/components/pairwise-links/pairwise-links.d.ts +1 -2
  93. package/lib/src/components/pairwise-links/row.d.ts +1 -2
  94. package/lib/src/components/questions/index.d.ts +2 -0
  95. package/lib/src/components/{sequence/sequence.d.ts → questions/question-context.d.ts} +2 -2
  96. package/lib/src/components/questions/question-information.d.ts +4 -0
  97. package/lib/src/components/radio/html/radio-group-content.d.ts +1 -1
  98. package/lib/src/components/roundabout/lunatic-roundabout.d.ts +1 -2
  99. package/lib/src/components/roundabout/redirect.d.ts +1 -2
  100. package/lib/src/components/sequence/html/sequence.d.ts +5 -0
  101. package/lib/src/components/sequence/index.d.ts +1 -1
  102. package/lib/src/components/sequence/lunatic-sequence.d.ts +3 -0
  103. package/lib/src/components/suggester/idb-suggester/check-store.d.ts +1 -1
  104. package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +1 -2
  105. package/lib/src/components/suggester/idb-suggester/suggester-status.d.ts +1 -1
  106. package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -2
  107. package/lib/src/components/suggester-loader-widget/loader-row.d.ts +1 -2
  108. package/lib/src/components/suggester-loader-widget/loader.d.ts +1 -2
  109. package/lib/src/components/suggester-loader-widget/progress.d.ts +1 -2
  110. package/lib/src/components/suggester-loader-widget/tools/action-tool.d.ts +1 -1
  111. package/lib/src/components/suggester-loader-widget/tools/tools.d.ts +1 -1
  112. package/lib/src/components/suggester-loader-widget/widget.d.ts +1 -2
  113. package/lib/src/components/switch/lunatic-switch.d.ts +1 -2
  114. package/lib/src/components/table/cell.d.ts +2 -3
  115. package/lib/src/components/table/header.d.ts +1 -1
  116. package/lib/src/components/table/lunatic-table.d.ts +1 -2
  117. package/lib/src/components/table/row.d.ts +2 -3
  118. package/lib/src/components/table/table-orchestrator.d.ts +2 -3
  119. package/lib/src/components/textarea/lunatic-textarea.d.ts +1 -2
  120. package/lib/src/components/type.d.ts +1 -0
  121. package/lib/stories/input/input.stories.js +9 -1
  122. package/lib/stories/input/source-with-question.json +74 -0
  123. package/lib/stories/sequence/sequence.stories.js +34 -0
  124. package/lib/stories/sequence/source-declarations.json +31 -0
  125. package/package.json +1 -1
  126. package/lib/components/sequence/sequence.js +0 -35
  127. /package/lib/components/sequence/{sequence.scss → html/sequence.scss} +0 -0
@@ -37,7 +37,8 @@ function ComponentSetComponents(_ref) {
37
37
  executeExpression = _ref.executeExpression,
38
38
  errors = _ref.errors,
39
39
  className = _ref.className,
40
- handleChange = _ref.handleChange;
40
+ handleChange = _ref.handleChange,
41
+ componentClassName = _ref.componentClassName;
41
42
  if (!Array.isArray(components)) {
42
43
  return null;
43
44
  }
@@ -58,7 +59,8 @@ function ComponentSetComponents(_ref) {
58
59
  preferences: preferences,
59
60
  executeExpression: executeExpression,
60
61
  errors: errors,
61
- handleChange: handleChange
62
+ handleChange: handleChange,
63
+ className: componentClassName
62
64
  })
63
65
  }, id);
64
66
  })
@@ -87,6 +87,18 @@ Object.defineProperty(exports, "PairwiseLinks", {
87
87
  return _pairwiseLinks["default"];
88
88
  }
89
89
  });
90
+ Object.defineProperty(exports, "QuestionContext", {
91
+ enumerable: true,
92
+ get: function get() {
93
+ return _questionContext["default"];
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "QuestionInformation", {
97
+ enumerable: true,
98
+ get: function get() {
99
+ return _questionInformation["default"];
100
+ }
101
+ });
90
102
  Object.defineProperty(exports, "Radio", {
91
103
  enumerable: true,
92
104
  get: function get() {
@@ -170,4 +182,6 @@ var _suggesterLoaderWidget = _interopRequireDefault(require("./suggester-loader-
170
182
  var _roundabout = _interopRequireDefault(require("./roundabout"));
171
183
  var _table = _interopRequireDefault(require("./table"));
172
184
  var _componentSet = _interopRequireDefault(require("./component-set"));
185
+ var _questionInformation = _interopRequireDefault(require("./questions/question-information"));
186
+ var _questionContext = _interopRequireDefault(require("./questions/question-context"));
173
187
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "QuestionContext", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _questionContext["default"];
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "QuestionInformation", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _questionInformation["default"];
16
+ }
17
+ });
18
+ var _questionContext = _interopRequireDefault(require("./question-context"));
19
+ var _questionInformation = _interopRequireDefault(require("./question-information"));
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _commons = require("../commons");
8
+ require("./question-context.scss");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function Description(_ref) {
11
+ var description = _ref.description;
12
+ if (!description) {
13
+ return null;
14
+ }
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
16
+ children: description
17
+ });
18
+ }
19
+ function QuestionContext(props) {
20
+ var label = props.label,
21
+ description = props.description;
22
+ if (label) {
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
25
+ className: "lunatic-call-out",
26
+ children: [label, /*#__PURE__*/(0, _jsxRuntime.jsx)(Description, {
27
+ description: description
28
+ })]
29
+ })
30
+ });
31
+ }
32
+ return null;
33
+ }
34
+ var _default = (0, _commons.createCustomizableLunaticField)(QuestionContext, 'QuestionContext');
35
+ exports["default"] = _default;
@@ -0,0 +1,10 @@
1
+ .lunatic-call-out {
2
+ background-color: whitesmoke;
3
+ box-shadow: inset 0.25rem 0 0 0 dodgerblue;
4
+ font-family: 'Marianne', arial, sans-serif;
5
+ text-rendering: optimizeLegibility;
6
+ font-size: 1rem;
7
+ line-height: 1.5rem;
8
+ padding: 2rem 3rem;
9
+ margin-bottom: 0.6em;
10
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _commons = require("../commons");
8
+ require("./question-information.scss");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function Description(_ref) {
11
+ var description = _ref.description;
12
+ if (!description) {
13
+ return null;
14
+ }
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
16
+ children: description
17
+ });
18
+ }
19
+ function QuestionInformation(props) {
20
+ var label = props.label,
21
+ description = props.description;
22
+ if (label) {
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
25
+ className: "lunatic-alert-information",
26
+ children: [label, /*#__PURE__*/(0, _jsxRuntime.jsx)(Description, {
27
+ description: description
28
+ })]
29
+ })
30
+ });
31
+ }
32
+ return null;
33
+ }
34
+ var _default = (0, _commons.createCustomizableLunaticField)(QuestionInformation, 'QuestionInformation');
35
+ exports["default"] = _default;
@@ -0,0 +1,19 @@
1
+ .lunatic-alert-information {
2
+ text-rendering: optimizeLegibility;
3
+ box-shadow: inset 0 0 0 1px dodgerblue, inset 2.5rem 0 0 0 dodgerblue;
4
+ padding: 1rem 2.25rem 0.75rem 3.5rem;
5
+ margin: 1em 0;
6
+ &::before {
7
+ content: '!';
8
+ float: left;
9
+ color: dodgerblue;
10
+ font-weight: bold;
11
+ margin-left: -2.7em;
12
+ line-height: 1em;
13
+ background-color: white;
14
+ width: 0.7em;
15
+ height: 1em;
16
+ padding-left: 0.3em;
17
+ border-radius: 2px 2px;
18
+ }
19
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _commons = require("../../commons");
8
+ require("./sequence.scss");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function Sequence(_ref) {
11
+ var label = _ref.label,
12
+ id = _ref.id,
13
+ style = _ref.style;
14
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
15
+ className: "sequence-lunatic",
16
+ id: "sequence-".concat(id),
17
+ style: style,
18
+ children: label
19
+ });
20
+ }
21
+ var _default = (0, _commons.createCustomizableLunaticField)(Sequence, 'Sequence');
22
+ exports["default"] = _default;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _sequence["default"];
9
+ return _lunaticSequence["default"];
10
10
  }
11
11
  });
12
- var _sequence = _interopRequireDefault(require("./sequence"));
12
+ var _lunaticSequence = _interopRequireDefault(require("./lunatic-sequence"));
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _sequence = _interopRequireDefault(require("./html/sequence"));
8
+ var _lunaticComponentWithoutLabel = _interopRequireDefault(require("../commons/components/lunatic-component-without-label"));
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function empty() {}
12
+ function LunaticSequence(_ref) {
13
+ var declarations = _ref.declarations,
14
+ label = _ref.label,
15
+ id = _ref.id,
16
+ style = _ref.style;
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
18
+ id: id,
19
+ label: label,
20
+ declarations: declarations,
21
+ handleChange: empty,
22
+ value: undefined,
23
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sequence["default"], {
24
+ label: label,
25
+ id: id,
26
+ style: style
27
+ })
28
+ });
29
+ }
30
+ var _default = LunaticSequence;
31
+ exports["default"] = _default;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var _react = require("@testing-library/react");
4
- var _sequence = _interopRequireDefault(require("./sequence"));
4
+ var _lunaticSequence = _interopRequireDefault(require("./lunatic-sequence"));
5
5
  var _vitest = require("vitest");
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -16,20 +16,12 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
16
16
  id: '1',
17
17
  label: 'Declaration 1',
18
18
  declarationType: 'TYPE_1',
19
- position: 'BEFORE_QUESTION_TEXT',
20
- declarations: []
21
- }, {
22
- id: '2',
23
- label: 'Declaration 2',
24
- declarationType: 'TYPE_2',
25
- position: 'AFTER_QUESTION_TEXT',
26
- declarations: []
19
+ position: 'BEFORE_QUESTION_TEXT'
27
20
  }, {
28
21
  id: '3',
29
22
  label: 'Declaration 3',
30
23
  declarationType: 'TYPE_3',
31
- position: 'DETACHABLE',
32
- declarations: []
24
+ position: 'DETACHABLE'
33
25
  }];
34
26
  var mockProps = {
35
27
  declarations: mockDeclarations,
@@ -37,40 +29,43 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
37
29
  label: 'Test Sequence Label',
38
30
  style: {
39
31
  backgroundColor: 'red'
40
- }
32
+ },
33
+ questionContext: 'question-context',
34
+ questionInformation: 'question-information'
41
35
  };
42
36
  (0, _vitest.it)('renders the label and declarations in the correct order', function () {
43
- var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_sequence["default"], _objectSpread({}, mockProps))),
37
+ var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticSequence["default"], _objectSpread({}, mockProps))),
44
38
  getByText = _render.getByText,
45
39
  queryByText = _render.queryByText;
46
40
  var sequenceLabel = getByText('Test Sequence Label');
47
41
  var declaration1 = getByText('Declaration 1');
48
- var declaration2 = getByText('Declaration 2');
49
42
  var declaration3 = getByText('Declaration 3');
50
-
43
+ var questionContext = getByText('question-context');
44
+ var questionInformation = getByText('question-information');
45
+ (0, _vitest.expect)(sequenceLabel).toBeInTheDocument();
46
+ (0, _vitest.expect)(questionContext).toBeInTheDocument();
47
+ (0, _vitest.expect)(questionInformation).toBeInTheDocument();
51
48
  // Declarations before text should appear before the label
52
49
  (0, _vitest.expect)(declaration1).toBeInTheDocument();
53
- (0, _vitest.expect)(sequenceLabel.previousSibling.childNodes[0]).toBe(declaration1);
54
-
55
- // Declarations after text should appear after the label
56
- (0, _vitest.expect)(declaration2).toBeInTheDocument();
57
- (0, _vitest.expect)(sequenceLabel.nextSibling.childNodes[0]).toBe(declaration2);
50
+ // expect(sequenceLabel?.previousSibling?.childNodes[0]).toBe(declaration1);
58
51
 
59
52
  // Detachable declarations should appear after the label and after declarations after text
60
53
  (0, _vitest.expect)(declaration3).toBeInTheDocument();
61
- (0, _vitest.expect)(sequenceLabel.nextSibling.nextSibling.childNodes[0]).toBe(declaration3);
54
+ // expect(sequenceLabel?.nextSibling?.nextSibling?.childNodes[0]).toBe(
55
+ // declaration3
56
+ // );
62
57
 
63
58
  // Ensure no other declarations are rendered
64
59
  (0, _vitest.expect)(queryByText('Declaration 4')).toBeNull();
65
60
  });
66
61
  (0, _vitest.it)('applies the correct styles', function () {
67
- var _render2 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_sequence["default"], _objectSpread({}, mockProps))),
62
+ var _render2 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticSequence["default"], _objectSpread({}, mockProps))),
68
63
  container = _render2.container;
69
64
  var sequenceDiv = container.querySelector('#sequence-test-sequence');
70
65
  (0, _vitest.expect)(sequenceDiv).toHaveStyle('background-color: red');
71
66
  });
72
67
  (0, _vitest.it)('does not render declarations if none are provided', function () {
73
- var _render3 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_sequence["default"], {
68
+ var _render3 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticSequence["default"], {
74
69
  id: "empty-sequence",
75
70
  label: "Empty Sequence"
76
71
  })),
@@ -100,9 +100,11 @@ function CheckStore(_ref) {
100
100
  children: children
101
101
  });
102
102
  }
103
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
104
- className: "lunatic-suggester-unvailable",
105
- children: "La suggestion sur liste n'est pas possible sur votre navigateur, vous pouvez passer la question en appuyant sur Enregistrer et Continuer"
103
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
104
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
105
+ className: "lunatic-suggester-unvailable",
106
+ children: "La suggestion sur liste n'est pas possible sur votre navigateur, vous pouvez passer la question en appuyant sur Enregistrer et Continuer"
107
+ }), children]
106
108
  });
107
109
  }
108
110
  var _default = CheckStore;
@@ -47,8 +47,7 @@ function LunaticTable(props) {
47
47
  executeExpression: executeExpression,
48
48
  handleChange: handleChange,
49
49
  iteration: iteration,
50
- value: value,
51
- errors: errors
50
+ value: value
52
51
  })
53
52
  })]
54
53
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_commons.Errors, {
@@ -14,8 +14,7 @@ function TableOrchestrator(_ref) {
14
14
  executeExpression = _ref.executeExpression,
15
15
  valueMap = _ref.value,
16
16
  handleChange = _ref.handleChange,
17
- iteration = _ref.iteration,
18
- errors = _ref.errors;
17
+ iteration = _ref.iteration;
19
18
  if (!Array.isArray(body)) {
20
19
  return null;
21
20
  }
@@ -28,8 +27,7 @@ function TableOrchestrator(_ref) {
28
27
  valueMap: valueMap,
29
28
  handleChange: handleChange,
30
29
  iteration: iteration,
31
- executeExpression: executeExpression,
32
- errors: errors
30
+ executeExpression: executeExpression
33
31
  }, index);
34
32
  })
35
33
  });
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { LunaticComponentProps } from '../../type';
3
- declare function LunaticCheckboxBoolean({ value, id, options, disabled, handleChange, response, errors, label, preferences, declarations, missing, missingResponse, management, description, }: LunaticComponentProps<'CheckboxBoolean'>): JSX.Element;
2
+ declare function LunaticCheckboxBoolean({ value, id, options, disabled, handleChange, response, errors, label, preferences, declarations, missing, missingResponse, management, description, }: LunaticComponentProps<'CheckboxBoolean'>): import("react/jsx-runtime").JSX.Element;
4
3
  declare namespace LunaticCheckboxBoolean {
5
4
  var defaultProps: {
6
5
  value: boolean;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import './checkbox.scss';
3
2
  import { CheckboxGroupOption } from './lunatic-checkbox-group';
4
3
  type Props = {
5
4
  id: string;
6
5
  options: CheckboxGroupOption[];
7
6
  };
8
- declare function CheckboxGroupContent({ options, id }: Props): JSX.Element;
7
+ declare function CheckboxGroupContent({ options, id }: Props): import("react/jsx-runtime").JSX.Element;
9
8
  export default CheckboxGroupContent;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxGroupOption } from '../lunatic-checkbox-group';
3
2
  type Props = {
4
3
  options: CheckboxGroupOption[];
5
4
  id: string;
6
5
  shortcut?: boolean;
7
6
  };
8
- declare function CheckboxGroupContent({ options, id, shortcut }: Props): JSX.Element;
7
+ declare function CheckboxGroupContent({ options, id, shortcut }: Props): import("react/jsx-runtime").JSX.Element;
9
8
  export default CheckboxGroupContent;
@@ -7,5 +7,5 @@ export type CheckboxGroupOption = {
7
7
  description?: ReactNode;
8
8
  onClick: (b: boolean) => void;
9
9
  };
10
- declare function LunaticCheckboxGroup({ id, value, responses, shortcut, handleChange, errors, label, description, preferences, declarations, missingResponse, missing, management, }: LunaticComponentProps<'CheckboxGroup'>): JSX.Element;
10
+ declare function LunaticCheckboxGroup({ id, value, responses, shortcut, handleChange, errors, label, description, preferences, declarations, missingResponse, missing, management, }: LunaticComponentProps<'CheckboxGroup'>): import("react/jsx-runtime").JSX.Element;
11
11
  export default LunaticCheckboxGroup;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LunaticComponentProps } from '../../type';
3
- declare function LunaticCheckboxOne({ id, options, value, errors, handleChange, response, label, description, preferences, declarations, missingResponse, missing, management, shortcut, }: LunaticComponentProps<'CheckboxOne'>): JSX.Element;
2
+ declare function LunaticCheckboxOne({ id, options, value, errors, handleChange, response, label, description, preferences, declarations, missingResponse, missing, management, shortcut, }: LunaticComponentProps<'CheckboxOne'>): import("react/jsx-runtime").JSX.Element;
4
3
  export default LunaticCheckboxOne;
@@ -4,5 +4,5 @@ type Props = PropsWithChildren<{
4
4
  id?: string;
5
5
  classStyle?: string;
6
6
  }>;
7
- export declare function ComboBoxContainer({ children, className, id, classStyle, }: Props): JSX.Element;
7
+ export declare function ComboBoxContainer({ children, className, id, classStyle, }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -5,5 +5,5 @@ type Props = PropsWithChildren<{
5
5
  onFocus: () => void;
6
6
  onKeyDown: (key: string) => void;
7
7
  }>;
8
- export declare function ComboBoxContent({ children, focused, onFocus, onBlur, onKeyDown, }: Props): JSX.Element;
8
+ export declare function ComboBoxContent({ children, focused, onFocus, onBlur, onKeyDown, }: Props): import("react/jsx-runtime").JSX.Element;
9
9
  export default ComboBoxContent;
@@ -4,5 +4,5 @@ type Props = PropsWithChildren<{
4
4
  selected?: boolean;
5
5
  onSelect: (index: string) => void;
6
6
  }>;
7
- export declare function OptionContainer({ children, index, selected, onSelect, }: Props): JSX.Element;
7
+ export declare function OptionContainer({ children, index, selected, onSelect, }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -4,5 +4,5 @@ type Props = PropsWithChildren<{
4
4
  expanded?: boolean;
5
5
  id?: string;
6
6
  }>;
7
- export declare function PanelContainer({ children, focused, expanded, id }: Props): JSX.Element;
7
+ export declare function PanelContainer({ children, focused, expanded, id }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -14,4 +14,4 @@ export type PanelProps = {
14
14
  search?: string;
15
15
  onSelect: (value: string) => void;
16
16
  };
17
- export declare function Panel({ optionRenderer: OptionRender, options, focused, selectedIndex, expanded, id, search, onSelect, }: PanelProps): JSX.Element;
17
+ export declare function Panel({ optionRenderer: OptionRender, options, focused, selectedIndex, expanded, id, search, onSelect, }: PanelProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  type Props = {
3
2
  className?: string;
4
3
  search?: string;
5
4
  onClick?: () => void;
6
5
  editable?: boolean;
7
6
  };
8
- export declare function Delete({ className, search, onClick, editable }: Props): JSX.Element | null;
7
+ export declare function Delete({ className, search, onClick, editable }: Props): import("react/jsx-runtime").JSX.Element | null;
9
8
  export {};
@@ -2,4 +2,4 @@ import { FunctionComponent } from 'react';
2
2
  export declare function displayLabelOrInput<T extends Record<string, unknown>>(Field: FunctionComponent<T>, name: string): (props: T & {
3
3
  editable?: boolean;
4
4
  expanded?: boolean;
5
- }) => JSX.Element | null;
5
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  declare const _default: (props: Record<string, unknown> & {
3
2
  editable?: boolean | undefined;
4
3
  expanded?: boolean | undefined;
5
- }) => JSX.Element | null;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
6
5
  export default _default;
@@ -12,9 +12,9 @@ export type LabelSelectionProps = {
12
12
  search?: string;
13
13
  disabled?: boolean;
14
14
  };
15
- export declare function LabelSelection({ labelRenderer: Renderer, placeholder, selectedIndex, options, search, disabled, }: LabelSelectionProps): JSX.Element;
15
+ export declare function LabelSelection({ labelRenderer: Renderer, placeholder, selectedIndex, options, search, disabled, }: LabelSelectionProps): import("react/jsx-runtime").JSX.Element;
16
16
  declare const _default: (props: LabelSelectionProps & {
17
17
  editable?: boolean | undefined;
18
18
  expanded?: boolean | undefined;
19
- }) => JSX.Element | null;
19
+ }) => import("react/jsx-runtime").JSX.Element | null;
20
20
  export default _default;
@@ -6,5 +6,5 @@ type Props = PropsWithChildren<{
6
6
  labelId?: string;
7
7
  id?: string;
8
8
  }>;
9
- declare function SelectionContainer({ children, id, expanded, focused, disabled, labelId, }: Props): JSX.Element;
9
+ declare function SelectionContainer({ children, id, expanded, focused, disabled, labelId, }: Props): import("react/jsx-runtime").JSX.Element;
10
10
  export default SelectionContainer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LabelSelectionProps } from './label-selection';
3
2
  export type SelectionProps = {
4
3
  expanded?: boolean;
@@ -8,4 +7,4 @@ export type SelectionProps = {
8
7
  labelId?: string;
9
8
  id?: string;
10
9
  } & LabelSelectionProps;
11
- export declare function Selection({ labelRenderer, placeholder, search, expanded, disabled, focused, onChange, selectedIndex, options, editable, labelId, id, }: SelectionProps): JSX.Element;
10
+ export declare function Selection({ labelRenderer, placeholder, search, expanded, disabled, focused, onChange, selectedIndex, options, editable, labelId, id, }: SelectionProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { SuggesterOption } from '../../type';
3
2
  type Props = {
4
3
  option?: SuggesterOption | null;
5
4
  placeholder?: string;
6
5
  search?: string;
7
6
  };
8
- declare function DefaultLabelRenderer({ option, placeholder, search }: Props): JSX.Element;
7
+ declare function DefaultLabelRenderer({ option, placeholder, search }: Props): import("react/jsx-runtime").JSX.Element;
9
8
  export default DefaultLabelRenderer;
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { SuggesterOption } from '../../type';
3
2
  type Props = {
4
3
  option: SuggesterOption;
5
4
  selected?: boolean;
6
5
  };
7
- declare function DefaultOptionRenderer({ option, selected }: Props): JSX.Element;
6
+ declare function DefaultOptionRenderer({ option, selected }: Props): import("react/jsx-runtime").JSX.Element;
8
7
  export default DefaultOptionRenderer;
@@ -7,7 +7,7 @@ type Props = {
7
7
  }>;
8
8
  className?: string;
9
9
  };
10
- declare function Description({ value, className }: Props): JSX.Element;
10
+ declare function Description({ value, className }: Props): import("react/jsx-runtime").JSX.Element;
11
11
  declare namespace Description {
12
12
  var propTypes: {
13
13
  classeName: PropTypes.Requireable<string>;
@@ -13,5 +13,5 @@ type Props = PropsWithChildren<{
13
13
  };
14
14
  onDrag?: (drag: boolean, position?: [x: number, y: number]) => void;
15
15
  }>;
16
- declare function Dragger({ el, children, onDrag }: Props): JSX.Element;
16
+ declare function Dragger({ el, children, onDrag }: Props): import("react/jsx-runtime").JSX.Element;
17
17
  export default Dragger;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import './errors.scss';
3
2
  import { LunaticError } from '../../../../use-lunatic/type';
4
3
  type Props = {
5
4
  errors?: Record<string, LunaticError[]>;
6
5
  activeId?: string;
7
6
  };
8
- declare function Errors({ errors, activeId }: Props): JSX.Element | null;
7
+ declare function Errors({ errors, activeId }: Props): import("react/jsx-runtime").JSX.Element | null;
9
8
  export default Errors;
@@ -3,5 +3,5 @@ import './fab.scss';
3
3
  type Props = PropsWithChildren<{
4
4
  disabled?: boolean;
5
5
  }> & HTMLAttributes<HTMLButtonElement>;
6
- declare function Fab({ className, children, tabIndex, title, onClick, onKeyDown, disabled, }: Props): JSX.Element;
6
+ declare function Fab({ className, children, tabIndex, title, onClick, onKeyDown, disabled, }: Props): import("react/jsx-runtime").JSX.Element;
7
7
  export default Fab;
@@ -2,5 +2,5 @@ import { PropsWithChildren } from 'react';
2
2
  type Props = PropsWithChildren<{
3
3
  management?: boolean;
4
4
  }>;
5
- declare function FieldContainer({ children, management }: Props): JSX.Element;
5
+ declare function FieldContainer({ children, management }: Props): import("react/jsx-runtime").JSX.Element;
6
6
  export default FieldContainer;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  type Props = {
3
2
  notify?: (v: boolean) => void;
4
3
  className?: string;
5
4
  };
6
- declare function IsNetwork({ notify, className }: Props): JSX.Element;
5
+ declare function IsNetwork({ notify, className }: Props): import("react/jsx-runtime").JSX.Element;
7
6
  export default IsNetwork;
@@ -8,5 +8,5 @@ type Props = {
8
8
  name: string;
9
9
  }, value: any, args?: Record<string, unknown>) => void;
10
10
  } & Pick<LunaticBaseProps, 'description' | 'declarations' | 'management' | 'id' | 'label' | 'missingResponse' | 'missing'>;
11
- declare function LunaticComponentWithLabel(props: Props): JSX.Element;
11
+ declare function LunaticComponentWithLabel(props: Props): import("react/jsx-runtime").JSX.Element;
12
12
  export default LunaticComponentWithLabel;
@@ -8,5 +8,5 @@ type Props = {
8
8
  name: string;
9
9
  }, value: any, args?: Record<string, unknown>) => void;
10
10
  } & Pick<LunaticBaseProps, 'description' | 'declarations' | 'management' | 'id' | 'label' | 'missingResponse' | 'preferences' | 'value' | 'missing'>;
11
- declare function LunaticComponent(props: Props): JSX.Element;
11
+ declare function LunaticComponent(props: Props): import("react/jsx-runtime").JSX.Element;
12
12
  export default LunaticComponent;
@@ -3,5 +3,5 @@ type Props = PropsWithChildren<{
3
3
  href: string;
4
4
  title: string;
5
5
  }>;
6
- declare const Link: (props: Props) => JSX.Element;
6
+ declare const Link: (props: Props) => import("react/jsx-runtime").JSX.Element;
7
7
  export default Link;