@inseefr/lunatic 2.7.5 → 2.7.7

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 (80) hide show
  1. package/README.fr.md +1 -1
  2. package/README.md +6 -1
  3. package/lib/components/loop/block-for-loop.js +2 -0
  4. package/lib/components/loop/constant.js +10 -0
  5. package/lib/components/loop/roster-for-loop/roster-for-loop.js +42 -20
  6. package/lib/components/lunatic-components.js +45 -7
  7. package/lib/components/table/lunatic-table.js +5 -1
  8. package/lib/src/components/datepicker/lunatic-datepicker.d.ts +1 -1
  9. package/lib/src/components/loop/constant.d.ts +4 -0
  10. package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +1 -0
  11. package/lib/src/components/lunatic-components.d.ts +12 -5
  12. package/lib/src/components/type.d.ts +4 -1
  13. package/lib/src/use-lunatic/commons/compile-controls.d.ts +4 -3
  14. package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +75 -70
  15. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +55 -50
  16. package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +31 -26
  17. package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +680 -73
  18. package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
  19. package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +4 -1
  20. package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -2
  21. package/lib/src/use-lunatic/reducer/controls/check-base-control.d.ts +2 -0
  22. package/lib/src/use-lunatic/reducer/{resolve-component-controls/resolve-roundabout-control.d.ts → controls/check-roundabout-control.d.ts} +2 -2
  23. package/lib/src/use-lunatic/type-source.d.ts +16 -10
  24. package/lib/src/use-lunatic/use-lunatic.d.ts +11 -5
  25. package/lib/stories/behaviour/controls/controls.stories.js +14 -7
  26. package/lib/stories/behaviour/controls/loop.json +130 -0
  27. package/lib/stories/behaviour/controls/{V2_ControlesNonNum_horsBoucle_PasPageFin.json → simple.json} +2 -2
  28. package/lib/stories/date-picker/source.json +22 -67
  29. package/lib/stories/declaration/source.json +14 -28
  30. package/lib/stories/dropdown/source.json +11 -28
  31. package/lib/stories/filter-description/source.json +3 -2
  32. package/lib/stories/input/input.stories.js +1 -8
  33. package/lib/stories/input/source.json +1 -63
  34. package/lib/stories/input-number/input-number.stories.js +2 -22
  35. package/lib/stories/input-number/source.json +4 -6
  36. package/lib/stories/loop/{block-for-loop.stories.js → loop.stories.js} +10 -8
  37. package/lib/stories/loop/roster-for-loop.stories.js +8 -2
  38. package/lib/stories/loop/source-bloc.json +10 -39
  39. package/lib/stories/loop/source-paginated.json +65 -78
  40. package/lib/stories/overview/overview.stories.js +1 -1
  41. package/lib/stories/pairwise/pairwise-links.stories.js +4 -4
  42. package/lib/stories/pairwise/{links.json → source.json} +2 -6
  43. package/lib/stories/{loop/not-paginated-loop.stories.js → question-context/question-context.stories.js} +5 -9
  44. package/lib/stories/question-context/source.json +13 -0
  45. package/lib/stories/question-explication/source.json +1 -1
  46. package/lib/stories/{loop/paginated-loop.stories.js → question-information/question-information.stories.js} +4 -4
  47. package/lib/stories/question-information/source.json +14 -0
  48. package/lib/stories/roundabout/source.json +21 -31
  49. package/lib/stories/sequence/sequence.stories.js +7 -1
  50. package/lib/stories/sequence/source.json +17 -0
  51. package/lib/stories/suggester/simple.json +1 -1
  52. package/lib/stories/table/source-colspan.json +314 -0
  53. package/lib/stories/table/table.stories.js +7 -1
  54. package/lib/stories/textarea/source.json +6 -22
  55. package/lib/use-lunatic/commons/compile-controls.js +135 -34
  56. package/lib/use-lunatic/commons/fill-components/fill-component-value.js +10 -0
  57. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +4 -1
  58. package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +39 -15
  59. package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +16 -6
  60. package/lib/use-lunatic/hooks/use-page-has-response.js +17 -0
  61. package/lib/use-lunatic/reducer/{resolve-component-controls/resolve-simple-control.js → controls/check-base-control.js} +5 -7
  62. package/lib/use-lunatic/reducer/{resolve-component-controls/resolve-roundabout-control.js → controls/check-roundabout-control.js} +2 -3
  63. package/lib/use-lunatic/reducer/overview/overview-on-init.js +6 -4
  64. package/lib/use-lunatic/type-source.js +1 -0
  65. package/package.json +1 -1
  66. package/lib/src/use-lunatic/commons/get-errors-without-empty-value.d.ts +0 -6
  67. package/lib/src/use-lunatic/reducer/resolve-component-controls/index.d.ts +0 -1
  68. package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-component-control.d.ts +0 -6
  69. package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.d.ts +0 -3
  70. package/lib/stories/Introduction.stories.mdx +0 -112
  71. package/lib/stories/behaviour/controls/V2_Controles_BouclesLiees_PasPageFin.json +0 -533
  72. package/lib/stories/input/source-with-question.json +0 -80
  73. package/lib/stories/input-number/source-euros.json +0 -37
  74. package/lib/stories/input-number/source-thansand.json +0 -34
  75. package/lib/stories/loop/source-not-paginated.json +0 -138
  76. package/lib/use-lunatic/commons/get-errors-without-empty-value.js +0 -24
  77. package/lib/use-lunatic/reducer/resolve-component-controls/index.js +0 -12
  78. package/lib/use-lunatic/reducer/resolve-component-controls/resolve-component-control.js +0 -38
  79. /package/lib/stories/behaviour/controls/{V2_ControlesNum_horsBoucle_PasPageFin.json → simple-numeric.json} +0 -0
  80. /package/lib/stories/pairwise/{links-componentset.json → source-componentset.json} +0 -0
@@ -3,11 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.WithQuestion = exports.Default = void 0;
6
+ exports["default"] = exports.Default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
9
9
  var _source = _interopRequireDefault(require("./source"));
10
- var _sourceWithQuestion = _interopRequireDefault(require("./source-with-question"));
11
10
  var _data = _interopRequireDefault(require("./data"));
12
11
  var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
13
12
  var _jsxRuntime = require("react/jsx-runtime");
@@ -32,10 +31,4 @@ Default.args = {
32
31
  id: 'input',
33
32
  source: _source["default"],
34
33
  data: _data["default"]
35
- };
36
- var WithQuestion = exports.WithQuestion = Template.bind({});
37
- WithQuestion.args = {
38
- id: 'input',
39
- source: _sourceWithQuestion["default"],
40
- data: _data["default"]
41
34
  };
@@ -1,46 +1,11 @@
1
1
  {
2
2
  "components": [
3
- {
4
- "componentType": "Input",
5
- "label": {
6
- "value": "\"Prénom de l'occupant principal.\"",
7
- "type": "VTL|MD"
8
- },
9
- "disabled": { "value": "DISABLED", "type": "VTL" },
10
- "conditionFilter": { "value": "true", "type": "VTL" },
11
- "maxLength": 30,
12
- "id": "name",
13
- "response": {
14
- "name": "PRENOM"
15
- },
16
- "declarations": [
17
- {
18
- "id": "kb9hi4j0-krnoclfe",
19
- "declarationType": "INSTRUCTION",
20
- "position": "BEFORE_QUESTION_TEXT",
21
- "label": {
22
- "value": "\"Quel est le prénom de l'occupant principal du logement ?\"",
23
- "type": "VTL|MD"
24
- }
25
- },
26
- {
27
- "id": "kb9hi4j0-krnoclfe",
28
- "declarationType": "HELP",
29
- "position": "AFTER_QUESTION_TEXT",
30
- "label": {
31
- "value": "\"For example, Marley.\"",
32
- "type": "VTL|MD"
33
- }
34
- }
35
- ]
36
- },
37
3
  {
38
4
  "componentType": "Input",
39
5
  "label": {
40
6
  "value": "\"Nom de l'occupant principal.\"",
41
7
  "type": "VTL|MD"
42
8
  },
43
- "conditionFilter": { "value": "true", "type": "VTL" },
44
9
  "maxLength": 30,
45
10
  "id": "surname",
46
11
  "description": {
@@ -50,17 +15,7 @@
50
15
  "response": {
51
16
  "name": "NOM"
52
17
  },
53
- "declarations": [
54
- {
55
- "id": "kb9hi4j0-krnoclfe",
56
- "declarationType": "INSTRUCTION",
57
- "position": "BEFORE_QUESTION_TEXT",
58
- "label": {
59
- "value": "\"Quel est le nom de l'occupant principal ?\"",
60
- "type": "VTL|MD"
61
- }
62
- }
63
- ]
18
+ "page": "1"
64
19
  }
65
20
  ],
66
21
  "variables": [
@@ -75,23 +30,6 @@
75
30
  "EDITED": null,
76
31
  "INPUTED": null
77
32
  }
78
- },
79
- {
80
- "variableType": "COLLECTED",
81
- "name": "PRENOM",
82
- "componentRef": "name",
83
- "values": {
84
- "PREVIOUS": null,
85
- "COLLECTED": null,
86
- "FORCED": null,
87
- "EDITED": null,
88
- "INPUTED": null
89
- }
90
- },
91
- {
92
- "variableType": "CALCULATED",
93
- "name": "DISABLED",
94
- "expression": { "value": "true", "type": "VTL" }
95
33
  }
96
34
  ]
97
35
  }
@@ -3,13 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.UnitEuros = exports.ThousandSeparator = exports.Default = void 0;
6
+ exports["default"] = 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"));
11
- var _sourceEuros = _interopRequireDefault(require("./source-euros"));
12
- var _sourceThansand = _interopRequireDefault(require("./source-thansand"));
13
11
  var _jsxRuntime = require("react/jsx-runtime");
14
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
13
  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); }
@@ -30,23 +28,5 @@ var Template = function Template(args) {
30
28
  var Default = exports.Default = Template.bind({});
31
29
  Default.args = {
32
30
  id: 'input-number',
33
- source: _source["default"],
34
- min: 0,
35
- max: 10,
36
- decimals: 0
37
- };
38
- var UnitEuros = exports.UnitEuros = Template.bind({});
39
- UnitEuros.args = {
40
- id: 'input-number-euro',
41
- source: _sourceEuros["default"],
42
- unit: '€'
43
- };
44
- var ThousandSeparator = exports.ThousandSeparator = Template.bind({});
45
- ThousandSeparator.args = {
46
- id: 'input-number-thousand',
47
- source: _sourceThansand["default"],
48
- min: 10,
49
- max: 1000000,
50
- decimals: 0,
51
- thousandSeparator: true
31
+ source: _source["default"]
52
32
  };
@@ -3,17 +3,15 @@
3
3
  {
4
4
  "id": "kze792d8",
5
5
  "componentType": "InputNumber",
6
- "mandatory": false,
7
- "page": "2",
6
+ "page": "1",
8
7
  "min": 0,
9
- "max": 10,
10
- "decimals": 0,
8
+ "max": 100000,
9
+ "decimals": 2,
11
10
  "label": {
12
- "value": "\"➡ 1. \" || \"In put for Number \"",
11
+ "value": "\"➡ 1. \" || \"Input number (between 0 and 100 000)\"",
13
12
  "type": "VTL|MD"
14
13
  },
15
14
  "description": { "value": "\"Description\"", "type": "VTL|MD" },
16
- "conditionFilter": { "value": "true", "type": "VTL" },
17
15
  "response": { "name": "NB" }
18
16
  }
19
17
  ],
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.WithHeader = exports.ReadOnly = exports.Default = void 0;
6
+ exports["default"] = exports.ReadOnly = exports.Paginated = exports.Default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
9
9
  var _sourceBloc = _interopRequireDefault(require("./source-bloc.json"));
10
- var _sourceWithHeader = _interopRequireDefault(require("./source-with-header.json"));
10
+ var _sourcePaginated = _interopRequireDefault(require("./source-paginated.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 }; }
@@ -18,7 +18,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
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); }
20
20
  var stories = {
21
- title: 'Components/Loop/BlockForLoop',
21
+ title: 'Components/Loop/Loop',
22
22
  component: _orchestrator["default"],
23
23
  argTypes: _defaultArgTypes["default"]
24
24
  };
@@ -28,13 +28,15 @@ var Template = function Template(args) {
28
28
  };
29
29
  var Default = exports.Default = Template.bind({});
30
30
  Default.args = {
31
- id: 'bloc-for-loop',
31
+ id: 'loop',
32
32
  source: _sourceBloc["default"]
33
33
  };
34
- var WithHeader = exports.WithHeader = Template.bind({});
35
- WithHeader.args = {
36
- id: 'bloc-for-loop-headers',
37
- source: _sourceWithHeader["default"]
34
+ var Paginated = exports.Paginated = Template.bind({});
35
+ Paginated.args = {
36
+ id: 'loop-paginated',
37
+ source: _sourcePaginated["default"],
38
+ initialPage: '1',
39
+ data: {}
38
40
  };
39
41
  var ReadOnly = exports.ReadOnly = Template.bind({});
40
42
  ReadOnly.args = {
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.ReadOnly = exports.Filled = exports.Default = void 0;
6
+ exports["default"] = exports.WithHeader = exports.ReadOnly = exports.Filled = exports.Default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
9
9
  var _sourceRoster = _interopRequireDefault(require("./source-roster"));
10
10
  var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
11
11
  var _e2e = require("../../../tests/utils/e2e");
12
12
  var _timer = require("../../../tests/utils/timer");
13
+ var _sourceWithHeader = _interopRequireDefault(require("./source-with-header.json"));
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
16
  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); }
@@ -32,15 +33,20 @@ var Template = function Template(args) {
32
33
  };
33
34
  var Default = exports.Default = Template.bind({});
34
35
  var ReadOnly = exports.ReadOnly = Template.bind({});
36
+ var WithHeader = exports.WithHeader = Template.bind({});
35
37
  Default.args = {
36
38
  id: 'roster-for-loop',
37
39
  source: _sourceRoster["default"]
38
40
  };
39
41
  ReadOnly.args = {
40
- id: 'roster-for-loop',
42
+ id: 'roster-for-loop-readonly',
41
43
  source: _sourceRoster["default"],
42
44
  readOnly: true
43
45
  };
46
+ WithHeader.args = {
47
+ id: 'roster-for-loop-headers',
48
+ source: _sourceWithHeader["default"]
49
+ };
44
50
  var Filled = exports.Filled = Template.bind({});
45
51
  Filled.args = {
46
52
  id: 'roster-for-loop',
@@ -33,40 +33,17 @@
33
33
  "response": {
34
34
  "name": "PRENOM"
35
35
  }
36
- }
37
- ]
38
- },
39
- {
40
- "id": "loop",
41
- "componentType": "Loop",
42
-
43
- "loopDependencies": ["PRENOM"],
44
- "iterations": { "value": "count(PRENOM)", "type": "VTL" },
45
- "page": "2",
46
- "maxPage": "1",
47
- "depth": 1,
48
- "paginatedLoop": true,
49
- "conditionFilter": {
50
- "value": "true",
51
- "type": "VTL"
52
- },
53
- "components": [
36
+ },
54
37
  {
55
- "id": "age",
56
- "label": {
57
- "value": "PRENOM || \", quel est vôtre âge ?\"",
58
- "type": "VTL"
59
- },
60
- "conditionFilter": {
61
- "value": "true",
62
- "type": "VTL"
63
- },
64
- "page": "2.1",
65
38
  "componentType": "InputNumber",
66
- "min": 0,
67
- "max": 120,
68
- "decimals": 0,
69
- "response": { "name": "AGE" }
39
+ "label": { "value": "\"Age\"", "type": "VTL|MD" },
40
+ "conditionFilter": { "value": "true", "type": "VTL" },
41
+ "maxLength": 30,
42
+ "bindingDependencies": ["AGE"],
43
+ "id": "Age",
44
+ "response": {
45
+ "name": "AGE"
46
+ }
70
47
  }
71
48
  ]
72
49
  },
@@ -78,15 +55,9 @@
78
55
  "type": "VTL|MD"
79
56
  },
80
57
  "conditionFilter": { "value": "true", "type": "VTL" },
81
- "page": "3"
58
+ "page": "2"
82
59
  }
83
60
  ],
84
- "resizing": {
85
- "PRENOM": {
86
- "size": "count(PRENOM)",
87
- "variables": ["AGE"]
88
- }
89
- },
90
61
  "variables": [
91
62
  {
92
63
  "variableType": "COLLECTED",
@@ -2,125 +2,112 @@
2
2
  "maxPage": "3",
3
3
  "components": [
4
4
  {
5
- "id": "kb9hi4j0",
5
+ "id": "seq",
6
6
  "componentType": "Sequence",
7
+ "label": {
8
+ "value": "\"Description des individus de votre logement\"",
9
+ "type": "VTL|MD"
10
+ },
11
+ "conditionFilter": { "value": "true", "type": "VTL" },
12
+ "page": "1"
13
+ },
14
+ {
15
+ "id": "loop-prenom",
16
+ "componentType": "Loop",
17
+ "label": { "value": "\"Ajouter un individu\"", "type": "VTL|MD" },
18
+ "conditionFilter": { "value": "true", "type": "VTL" },
19
+ "bindingDependencies": ["PRENOM"],
20
+ "lines": {
21
+ "min": { "value": "1", "type": "VTL" },
22
+ "max": { "value": "10", "type": "VTL" }
23
+ },
7
24
  "page": "1",
8
- "label": { "value": "\"Sequence\"", "type": "VTL|MD" },
9
- "declarations": [
25
+ "components": [
10
26
  {
11
- "id": "kb9hi4j0-krnoclfe",
12
- "declarationType": "HELP",
13
- "position": "AFTER_QUESTION_TEXT",
14
- "label": {
15
- "value": "\"Bonjour!\"",
16
- "type": "VTL"
27
+ "componentType": "Input",
28
+ "label": { "value": "\"Prénom\"", "type": "VTL|MD" },
29
+ "conditionFilter": { "value": "true", "type": "VTL" },
30
+ "maxLength": 30,
31
+ "bindingDependencies": ["PRENOM"],
32
+ "id": "prenom",
33
+ "response": {
34
+ "name": "PRENOM"
17
35
  }
18
36
  }
19
- ],
20
- "conditionFilter": { "value": "true", "type": "VTL" }
37
+ ]
21
38
  },
22
39
  {
23
- "id": "kmw4iq4w",
40
+ "id": "loop",
24
41
  "componentType": "Loop",
42
+ "loopDependencies": ["PRENOM"],
43
+ "iterations": { "value": "count(PRENOM)", "type": "VTL" },
25
44
  "page": "2",
26
- "maxPage": "2",
45
+ "maxPage": "1",
27
46
  "depth": 1,
28
47
  "paginatedLoop": true,
29
48
  "conditionFilter": {
30
49
  "value": "true",
31
50
  "type": "VTL"
32
51
  },
33
- "loopDependencies": ["3"],
34
- "iterations": { "value": "3", "type": "VTL" },
35
52
  "components": [
36
53
  {
37
- "id": "kmno1n7m",
38
- "componentType": "Input",
39
- "mandatory": false,
40
- "page": "2.1",
41
- "maxLength": 20,
54
+ "id": "age",
42
55
  "label": {
43
- "value": "\"Questions 1, Itération : \" || cast(GLOBAL_ITERATION_INDEX, string)",
56
+ "value": "PRENOM || \", quel est vôtre âge ?\"",
44
57
  "type": "VTL"
45
58
  },
46
59
  "conditionFilter": {
47
60
  "value": "true",
48
61
  "type": "VTL"
49
62
  },
50
- "response": { "name": "PAGE1" }
51
- },
52
- {
53
- "id": "kmno1n7m",
54
- "componentType": "Input",
55
- "mandatory": false,
56
- "page": "2.2",
57
- "maxLength": 20,
58
- "label": {
59
- "value": "\"Vous avez mis en question 1, itération \" || cast(GLOBAL_ITERATION_INDEX, string) || \" : \" || LIBELLE",
60
- "type": "VTL"
61
- },
62
- "conditionFilter": {
63
- "value": "true",
64
- "type": "VTL"
65
- },
66
- "response": { "name": "PAGE2" }
63
+ "page": "2.1",
64
+ "componentType": "InputNumber",
65
+ "min": 0,
66
+ "max": 120,
67
+ "decimals": 0,
68
+ "response": { "name": "AGE" }
67
69
  }
68
70
  ]
69
71
  },
70
72
  {
71
- "id": "kb9hi4j0",
73
+ "id": "seq-end",
72
74
  "componentType": "Sequence",
73
- "page": "3",
74
- "label": { "value": "\"Sequence\"", "type": "VTL" },
75
- "declarations": [
76
- {
77
- "id": "kb9hi4j0-krnoclfe",
78
- "declarationType": "HELP",
79
- "position": "AFTER_QUESTION_TEXT",
80
- "label": {
81
- "value": "\"Au revoir!\"",
82
- "type": "VTL"
83
- }
84
- }
85
- ],
86
- "conditionFilter": { "value": "true", "type": "VTL" }
75
+ "label": {
76
+ "value": "\"End\"",
77
+ "type": "VTL|MD"
78
+ },
79
+ "conditionFilter": { "value": "true", "type": "VTL" },
80
+ "page": "3"
87
81
  }
88
82
  ],
89
- "resizing": {},
83
+ "resizing": {
84
+ "PRENOM": {
85
+ "size": "count(PRENOM)",
86
+ "variables": ["AGE"]
87
+ }
88
+ },
90
89
  "variables": [
91
- { "variableType": "EXTERNAL", "name": "NUMBER", "value": "3" },
92
90
  {
93
91
  "variableType": "COLLECTED",
94
- "name": "PAGE1",
92
+ "name": "PRENOM",
95
93
  "values": {
96
- "PREVIOUS": [null],
97
- "COLLECTED": [null],
98
- "FORCED": [null],
99
- "EDITED": [null],
100
- "INPUTED": [null]
94
+ "PREVIOUS": null,
95
+ "COLLECTED": ["John", "Jane"],
96
+ "FORCED": null,
97
+ "EDITED": null,
98
+ "INPUTED": null
101
99
  }
102
100
  },
103
101
  {
104
102
  "variableType": "COLLECTED",
105
- "name": "PAGE2",
103
+ "name": "AGE",
106
104
  "values": {
107
- "PREVIOUS": [null],
108
- "COLLECTED": [null],
109
- "FORCED": [null],
110
- "EDITED": [null],
111
- "INPUTED": [null]
105
+ "PREVIOUS": null,
106
+ "COLLECTED": null,
107
+ "FORCED": null,
108
+ "EDITED": null,
109
+ "INPUTED": null
112
110
  }
113
- },
114
- {
115
- "variableType": "CALCULATED",
116
- "name": "LIBELLE",
117
- "expression": {
118
- "value": "PAGE1",
119
- "type": "VTL"
120
- },
121
- "bindingDependencies": ["PAGE1"],
122
- "inFilter": "false",
123
- "shapeFrom": "PAGE1"
124
111
  }
125
112
  ]
126
113
  }
@@ -18,7 +18,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
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); }
20
20
  var stories = {
21
- title: 'Components/Overview',
21
+ title: 'Behaviour/Overview',
22
22
  component: _orchestrator["default"],
23
23
  argTypes: _defaultArgTypes["default"]
24
24
  };
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = exports.PairwiseInComponentSet = exports.Filled = exports.Default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
9
- var _links = _interopRequireDefault(require("./links"));
9
+ var _source = _interopRequireDefault(require("./source.json"));
10
10
  var _data = _interopRequireDefault(require("./data"));
11
- var _linksComponentset = _interopRequireDefault(require("./links-componentset.json"));
11
+ var _sourceComponentset = _interopRequireDefault(require("./source-componentset.json"));
12
12
  var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
13
13
  var _e2e = require("../../../tests/utils/e2e");
14
14
  var _timer = require("../../../tests/utils/timer");
@@ -35,14 +35,14 @@ var Template = function Template(args) {
35
35
  var Default = exports.Default = Template.bind({});
36
36
  Default.args = {
37
37
  id: 'links',
38
- source: _links["default"],
38
+ source: _source["default"],
39
39
  pagination: true,
40
40
  data: _data["default"]
41
41
  };
42
42
  var PairwiseInComponentSet = exports.PairwiseInComponentSet = Template.bind({});
43
43
  PairwiseInComponentSet.args = {
44
44
  id: 'links-componentset',
45
- source: _linksComponentset["default"],
45
+ source: _sourceComponentset["default"],
46
46
  pagination: true,
47
47
  data: _data["default"]
48
48
  };
@@ -248,17 +248,13 @@
248
248
  "variableType": "CALCULATED",
249
249
  "name": "xAxis",
250
250
  "expression": { "value": "PRENOM", "type": "VTL" },
251
- "bindingDependencies": ["PRENOM"],
252
- "shapeFrom": "PRENOM",
253
- "inFilter": "false"
251
+ "bindingDependencies": ["PRENOM"]
254
252
  },
255
253
  {
256
254
  "variableType": "CALCULATED",
257
255
  "name": "yAxis",
258
256
  "expression": { "value": "PRENOM", "type": "VTL" },
259
- "bindingDependencies": ["PRENOM"],
260
- "shapeFrom": "PRENOM",
261
- "inFilter": "false"
257
+ "bindingDependencies": ["PRENOM"]
262
258
  }
263
259
  ],
264
260
  "resizing": {
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = exports.Default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
9
7
  var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
10
- var _referentiel = require("../utils/referentiel");
11
- var _sourceNotPaginated = _interopRequireDefault(require("./source-not-paginated.json"));
8
+ var _source = _interopRequireDefault(require("./source"));
9
+ var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
12
10
  var _jsxRuntime = require("react/jsx-runtime");
13
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
12
  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); }
@@ -18,7 +16,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
18
16
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
17
  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); }
20
18
  var stories = {
21
- title: 'Components/Loop/NotPaginatedLoop',
19
+ title: 'Components/QuestionContext',
22
20
  component: _orchestrator["default"],
23
21
  argTypes: _defaultArgTypes["default"]
24
22
  };
@@ -28,8 +26,6 @@ var Template = function Template(args) {
28
26
  };
29
27
  var Default = exports.Default = Template.bind({});
30
28
  Default.args = {
31
- id: 'not-paginated-loop',
32
- source: _sourceNotPaginated["default"],
33
- getReferentiel: _referentiel.getReferentiel,
34
- autoSuggesterLoading: true
29
+ id: 'questionExplication',
30
+ source: _source["default"]
35
31
  };
@@ -0,0 +1,13 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "componentType": "QuestionContext",
5
+ "label": { "value": "\"Question Context\"", "type": "VTL|MD" },
6
+ "description": {
7
+ "value": "\"Question Context description\"",
8
+ "type": "VTL|MD"
9
+ },
10
+ "page": "1"
11
+ }
12
+ ]
13
+ }
@@ -11,7 +11,7 @@
11
11
  "value": "\"Accordion content\"",
12
12
  "type": "VTL"
13
13
  },
14
- "bgColor": "red"
14
+ "bgColor": "rgb(246, 248, 250)"
15
15
  }
16
16
  ]
17
17
  }