@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.
- package/README.fr.md +1 -1
- package/README.md +6 -1
- package/lib/components/loop/block-for-loop.js +2 -0
- package/lib/components/loop/constant.js +10 -0
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +42 -20
- package/lib/components/lunatic-components.js +45 -7
- package/lib/components/table/lunatic-table.js +5 -1
- package/lib/src/components/datepicker/lunatic-datepicker.d.ts +1 -1
- package/lib/src/components/loop/constant.d.ts +4 -0
- package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +1 -0
- package/lib/src/components/lunatic-components.d.ts +12 -5
- package/lib/src/components/type.d.ts +4 -1
- package/lib/src/use-lunatic/commons/compile-controls.d.ts +4 -3
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +75 -70
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +55 -50
- package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +31 -26
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +680 -73
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +4 -1
- package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -2
- package/lib/src/use-lunatic/reducer/controls/check-base-control.d.ts +2 -0
- package/lib/src/use-lunatic/reducer/{resolve-component-controls/resolve-roundabout-control.d.ts → controls/check-roundabout-control.d.ts} +2 -2
- package/lib/src/use-lunatic/type-source.d.ts +16 -10
- package/lib/src/use-lunatic/use-lunatic.d.ts +11 -5
- package/lib/stories/behaviour/controls/controls.stories.js +14 -7
- package/lib/stories/behaviour/controls/loop.json +130 -0
- package/lib/stories/behaviour/controls/{V2_ControlesNonNum_horsBoucle_PasPageFin.json → simple.json} +2 -2
- package/lib/stories/date-picker/source.json +22 -67
- package/lib/stories/declaration/source.json +14 -28
- package/lib/stories/dropdown/source.json +11 -28
- package/lib/stories/filter-description/source.json +3 -2
- package/lib/stories/input/input.stories.js +1 -8
- package/lib/stories/input/source.json +1 -63
- package/lib/stories/input-number/input-number.stories.js +2 -22
- package/lib/stories/input-number/source.json +4 -6
- package/lib/stories/loop/{block-for-loop.stories.js → loop.stories.js} +10 -8
- package/lib/stories/loop/roster-for-loop.stories.js +8 -2
- package/lib/stories/loop/source-bloc.json +10 -39
- package/lib/stories/loop/source-paginated.json +65 -78
- package/lib/stories/overview/overview.stories.js +1 -1
- package/lib/stories/pairwise/pairwise-links.stories.js +4 -4
- package/lib/stories/pairwise/{links.json → source.json} +2 -6
- package/lib/stories/{loop/not-paginated-loop.stories.js → question-context/question-context.stories.js} +5 -9
- package/lib/stories/question-context/source.json +13 -0
- package/lib/stories/question-explication/source.json +1 -1
- package/lib/stories/{loop/paginated-loop.stories.js → question-information/question-information.stories.js} +4 -4
- package/lib/stories/question-information/source.json +14 -0
- package/lib/stories/roundabout/source.json +21 -31
- package/lib/stories/sequence/sequence.stories.js +7 -1
- package/lib/stories/sequence/source.json +17 -0
- package/lib/stories/suggester/simple.json +1 -1
- package/lib/stories/table/source-colspan.json +314 -0
- package/lib/stories/table/table.stories.js +7 -1
- package/lib/stories/textarea/source.json +6 -22
- package/lib/use-lunatic/commons/compile-controls.js +135 -34
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +10 -0
- package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +4 -1
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +39 -15
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +16 -6
- package/lib/use-lunatic/hooks/use-page-has-response.js +17 -0
- package/lib/use-lunatic/reducer/{resolve-component-controls/resolve-simple-control.js → controls/check-base-control.js} +5 -7
- package/lib/use-lunatic/reducer/{resolve-component-controls/resolve-roundabout-control.js → controls/check-roundabout-control.js} +2 -3
- package/lib/use-lunatic/reducer/overview/overview-on-init.js +6 -4
- package/lib/use-lunatic/type-source.js +1 -0
- package/package.json +1 -1
- package/lib/src/use-lunatic/commons/get-errors-without-empty-value.d.ts +0 -6
- package/lib/src/use-lunatic/reducer/resolve-component-controls/index.d.ts +0 -1
- package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-component-control.d.ts +0 -6
- package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.d.ts +0 -3
- package/lib/stories/Introduction.stories.mdx +0 -112
- package/lib/stories/behaviour/controls/V2_Controles_BouclesLiees_PasPageFin.json +0 -533
- package/lib/stories/input/source-with-question.json +0 -80
- package/lib/stories/input-number/source-euros.json +0 -37
- package/lib/stories/input-number/source-thansand.json +0 -34
- package/lib/stories/loop/source-not-paginated.json +0 -138
- package/lib/use-lunatic/commons/get-errors-without-empty-value.js +0 -24
- package/lib/use-lunatic/reducer/resolve-component-controls/index.js +0 -12
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-component-control.js +0 -38
- /package/lib/stories/behaviour/controls/{V2_ControlesNum_horsBoucle_PasPageFin.json → simple-numeric.json} +0 -0
- /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.
|
|
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
|
-
"
|
|
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.
|
|
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
|
-
"
|
|
7
|
-
"page": "2",
|
|
6
|
+
"page": "1",
|
|
8
7
|
"min": 0,
|
|
9
|
-
"max":
|
|
10
|
-
"decimals":
|
|
8
|
+
"max": 100000,
|
|
9
|
+
"decimals": 2,
|
|
11
10
|
"label": {
|
|
12
|
-
"value": "\"➡ 1. \" || \"
|
|
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.
|
|
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
|
|
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/
|
|
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: '
|
|
31
|
+
id: 'loop',
|
|
32
32
|
source: _sourceBloc["default"]
|
|
33
33
|
};
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
id: '
|
|
37
|
-
source:
|
|
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
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
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": "
|
|
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": "
|
|
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
|
-
"
|
|
9
|
-
"declarations": [
|
|
25
|
+
"components": [
|
|
10
26
|
{
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
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": "
|
|
40
|
+
"id": "loop",
|
|
24
41
|
"componentType": "Loop",
|
|
42
|
+
"loopDependencies": ["PRENOM"],
|
|
43
|
+
"iterations": { "value": "count(PRENOM)", "type": "VTL" },
|
|
25
44
|
"page": "2",
|
|
26
|
-
"maxPage": "
|
|
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": "
|
|
38
|
-
"componentType": "Input",
|
|
39
|
-
"mandatory": false,
|
|
40
|
-
"page": "2.1",
|
|
41
|
-
"maxLength": 20,
|
|
54
|
+
"id": "age",
|
|
42
55
|
"label": {
|
|
43
|
-
"value": "\"
|
|
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
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
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": "
|
|
73
|
+
"id": "seq-end",
|
|
72
74
|
"componentType": "Sequence",
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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": "
|
|
92
|
+
"name": "PRENOM",
|
|
95
93
|
"values": {
|
|
96
|
-
"PREVIOUS":
|
|
97
|
-
"COLLECTED": [
|
|
98
|
-
"FORCED":
|
|
99
|
-
"EDITED":
|
|
100
|
-
"INPUTED":
|
|
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": "
|
|
103
|
+
"name": "AGE",
|
|
106
104
|
"values": {
|
|
107
|
-
"PREVIOUS":
|
|
108
|
-
"COLLECTED":
|
|
109
|
-
"FORCED":
|
|
110
|
-
"EDITED":
|
|
111
|
-
"INPUTED":
|
|
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: '
|
|
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
|
|
9
|
+
var _source = _interopRequireDefault(require("./source.json"));
|
|
10
10
|
var _data = _interopRequireDefault(require("./data"));
|
|
11
|
-
var
|
|
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:
|
|
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:
|
|
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
|
|
11
|
-
var
|
|
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/
|
|
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: '
|
|
32
|
-
source:
|
|
33
|
-
getReferentiel: _referentiel.getReferentiel,
|
|
34
|
-
autoSuggesterLoading: true
|
|
29
|
+
id: 'questionExplication',
|
|
30
|
+
source: _source["default"]
|
|
35
31
|
};
|