@inseefr/lunatic 0.3.5-experimental → 0.3.8-experimental
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/lib/index.js +6 -6
- package/lib/index.js.map +1 -1
- package/package.json +4 -3
- package/src/components/breadcrumb/component.js +29 -29
- package/src/components/button/component.js +53 -53
- package/src/components/button/index.js +1 -1
- package/src/components/checkbox/index.js +3 -3
- package/src/components/datepicker/index.js +1 -1
- package/src/components/declarations/index.js +1 -1
- package/src/components/declarations/wrappers/list-declarations-wrapper.js +232 -232
- package/src/components/filter-description/component.js +42 -42
- package/src/components/icon/component.js +33 -33
- package/src/components/index.js +5 -3
- package/src/components/input/index.js +2 -2
- package/src/components/loop/index.js +1 -1
- package/src/components/loop-constructor/wrapper/body-component.js +13 -1
- package/src/components/radio/index.js +1 -1
- package/src/components/sequence/index.js +1 -1
- package/src/components/subsequence/index.js +1 -1
- package/src/components/suggester/check-store.js +70 -70
- package/src/components/suggester/components/create-on-keydown-callback.js +28 -28
- package/src/components/tooltip/response.js +52 -52
- package/src/stories/checkbox-boolean/data-forced.json +48 -48
- package/src/stories/checkbox-group/data-vtl.json +102 -102
- package/src/stories/icons/icons.stories.js +16 -16
- package/src/stories/questionnaire/kish.json +275 -0
- package/src/stories/questionnaire/loop-and-controls.json +481 -0
- package/src/stories/questionnaire/questionnaire.stories.js +31 -0
- package/src/stories/suggester/bailleurs-sociaux-2021/fetch-bailleurs.js +12 -0
- package/src/stories/suggester/bailleurs-sociaux-2021/index.js +1 -0
- package/src/stories/suggester/data.json +31 -1
- package/src/stories/suggester/suggester-workers.stories.js +44 -0
- package/src/stories/suggester/suggester.stories.js +5 -0
- package/src/stories/utils/custom-lunatic.scss +23 -23
- package/src/tests/components/breadcrumb.spec.js +13 -13
- package/src/tests/components/button.spec.js +11 -11
- package/src/tests/components/checkbox-boolean.spec.js +45 -45
- package/src/tests/components/checkbox-group.spec.js +53 -53
- package/src/tests/components/checkbox-one.spec.js +32 -32
- package/src/tests/components/datepicker.spec.js +22 -22
- package/src/tests/components/declarations-wrappers/input-declarations-wrapper.spec.js +67 -67
- package/src/tests/components/declarations-wrappers/list-declarations-wrapper.spec.js +52 -52
- package/src/tests/components/declarations-wrappers/simple-declarations-wrapper.spec.js +21 -21
- package/src/tests/components/declarations.spec.js +46 -46
- package/src/tests/components/input.spec.js +18 -18
- package/src/tests/components/loops/loop-static.json +66 -66
- package/src/tests/components/loops/loop.json +258 -258
- package/src/tests/components/loops/loop.spec.js +30 -30
- package/src/tests/components/loops/roster-for-loop.spec.js +18 -18
- package/src/tests/components/progress-bar.spec.js +15 -15
- package/src/tests/components/radio.spec.js +27 -27
- package/src/tests/components/sequence.spec.js +9 -9
- package/src/tests/components/subsequence.spec.js +9 -9
- package/src/tests/components/table.spec.js +11 -11
- package/src/tests/components/textarea.spec.js +18 -18
- package/src/tests/components/tooltip.spec.js +25 -25
- package/src/tests/setup/setupTests.js +4 -4
- package/src/tests/utils/lib/alphabet.spec.js +36 -36
- package/src/tests/utils/lib/array.spec.js +22 -22
- package/src/tests/utils/lib/checkbox/group.spec.js +72 -72
- package/src/tests/utils/lib/decorator/title-decorator.spec.js +12 -12
- package/src/tests/utils/lib/input-number.spec.js +18 -18
- package/src/tests/utils/lib/items-positioning.spec.js +17 -17
- package/src/tests/utils/lib/label-position.spec.js +22 -22
- package/src/tests/utils/lib/loops/bindings.spec.js +75 -75
- package/src/tests/utils/lib/loops/shared.spec.js +82 -82
- package/src/tests/utils/lib/missing/missing.spec.js +74 -74
- package/src/tests/utils/lib/missing/mock.js +137 -137
- package/src/tests/utils/lib/pagination/shared.spec.js +42 -42
- package/src/tests/utils/lib/responses.spec.js +64 -64
- package/src/tests/utils/lib/style.spec.js +26 -26
- package/src/tests/utils/lib/tooltip/build-response.spec.js +95 -95
- package/src/tests/utils/lib/tooltip/content.spec.js +109 -109
- package/src/tests/utils/to-expose/handler/handler.spec.js +94 -94
- package/src/tests/utils/to-expose/handler/questionnaire.json +158 -158
- package/src/tests/utils/to-expose/handler/results/index.js +6 -6
- package/src/tests/utils/to-expose/handler/results/res-double.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-input-collected.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-loop.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-matrix.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-responses.json +158 -158
- package/src/tests/utils/to-expose/hooks/use-lunatic.spec.js +46 -46
- package/src/tests/utils/to-expose/init-questionnaire/data.json +12 -12
- package/src/tests/utils/to-expose/init-questionnaire/init-questionnaire.spec.js +19 -19
- package/src/tests/utils/to-expose/interpret/interpret.spec.js +48 -48
- package/src/tests/utils/to-expose/state/questionnaire.json +61 -61
- package/src/tests/utils/to-expose/state/results.js +78 -78
- package/src/utils/lib/controls/utils.js +8 -2
- package/src/utils/lib/tooltip/build-response.js +41 -41
- package/src/utils/store-tools/create/index.js +1 -1
- package/src/utils/store-tools/create/update-store-info.js +26 -26
- package/src/utils/store-tools/index.js +5 -5
- package/src/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +5 -1
- package/src/utils/suggester-workers/commons-tokenizer/index.js +1 -0
- package/src/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +7 -1
- package/src/utils/to-expose/handler.js +12 -14
- package/src/utils/to-expose/hooks/lunatic-split.js +5 -2
- package/src/utils/to-expose/hooks/lunatic.js +5 -2
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
{
|
|
2
|
-
"components": [
|
|
3
|
-
{
|
|
4
|
-
"id": "gg",
|
|
5
|
-
"componentType": "CheckboxGroup",
|
|
6
|
-
"label": "➡ 1. What are the pet names that the Simpsons family had?",
|
|
7
|
-
"missingResponse": { "name": "PET_MISSING" },
|
|
8
|
-
"responses": [
|
|
9
|
-
{
|
|
10
|
-
"id": "j334akov-QOP-jbgd8qmn",
|
|
11
|
-
"label": "Santa's Little Helper",
|
|
12
|
-
"response": {
|
|
13
|
-
"name": "PET1"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": "j334akov-QOP-jbgd60vl",
|
|
18
|
-
"label": "Snowball I",
|
|
19
|
-
"response": {
|
|
20
|
-
"name": "PET2"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "j334akov-QOP-jbgda2jo",
|
|
25
|
-
"label": "Coltrane",
|
|
26
|
-
"response": {
|
|
27
|
-
"name": "PET3"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"id": "j334akov-QOP-jbgdfssy",
|
|
32
|
-
"label": "NAME || \" the Helper Monkey\"",
|
|
33
|
-
"response": {
|
|
34
|
-
"name": "PET4"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"variables": [
|
|
41
|
-
{
|
|
42
|
-
"variableType": "COLLECTED",
|
|
43
|
-
"name": "PET1",
|
|
44
|
-
"componentRef": "gg",
|
|
45
|
-
"values": {
|
|
46
|
-
"PREVIOUS": null,
|
|
47
|
-
"COLLECTED": true,
|
|
48
|
-
"FORCED": false,
|
|
49
|
-
"EDITED": null,
|
|
50
|
-
"INPUTED": null
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"variableType": "COLLECTED",
|
|
55
|
-
"name": "PET2",
|
|
56
|
-
"componentRef": "gg",
|
|
57
|
-
"values": {
|
|
58
|
-
"PREVIOUS": null,
|
|
59
|
-
"COLLECTED": true,
|
|
60
|
-
"FORCED": null,
|
|
61
|
-
"EDITED": null,
|
|
62
|
-
"INPUTED": null
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"variableType": "COLLECTED",
|
|
67
|
-
"name": "PET3",
|
|
68
|
-
"componentRef": "gg",
|
|
69
|
-
"values": {
|
|
70
|
-
"PREVIOUS": null,
|
|
71
|
-
"COLLECTED": null,
|
|
72
|
-
"FORCED": null,
|
|
73
|
-
"EDITED": null,
|
|
74
|
-
"INPUTED": null
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"variableType": "COLLECTED",
|
|
79
|
-
"name": "PET4",
|
|
80
|
-
"componentRef": "gg",
|
|
81
|
-
"values": {
|
|
82
|
-
"PREVIOUS": null,
|
|
83
|
-
"COLLECTED": null,
|
|
84
|
-
"FORCED": null,
|
|
85
|
-
"EDITED": null,
|
|
86
|
-
"INPUTED": null
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"variableType": "COLLECTED",
|
|
91
|
-
"name": "PET_MISSING",
|
|
92
|
-
"componentRef": "gg",
|
|
93
|
-
"values": {
|
|
94
|
-
"PREVIOUS": null,
|
|
95
|
-
"COLLECTED": null,
|
|
96
|
-
"FORCED": null,
|
|
97
|
-
"EDITED": null,
|
|
98
|
-
"INPUTED": null
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
]
|
|
102
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"id": "gg",
|
|
5
|
+
"componentType": "CheckboxGroup",
|
|
6
|
+
"label": "➡ 1. What are the pet names that the Simpsons family had?",
|
|
7
|
+
"missingResponse": { "name": "PET_MISSING" },
|
|
8
|
+
"responses": [
|
|
9
|
+
{
|
|
10
|
+
"id": "j334akov-QOP-jbgd8qmn",
|
|
11
|
+
"label": "Santa's Little Helper",
|
|
12
|
+
"response": {
|
|
13
|
+
"name": "PET1"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "j334akov-QOP-jbgd60vl",
|
|
18
|
+
"label": "Snowball I",
|
|
19
|
+
"response": {
|
|
20
|
+
"name": "PET2"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "j334akov-QOP-jbgda2jo",
|
|
25
|
+
"label": "Coltrane",
|
|
26
|
+
"response": {
|
|
27
|
+
"name": "PET3"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "j334akov-QOP-jbgdfssy",
|
|
32
|
+
"label": "NAME || \" the Helper Monkey\"",
|
|
33
|
+
"response": {
|
|
34
|
+
"name": "PET4"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"variables": [
|
|
41
|
+
{
|
|
42
|
+
"variableType": "COLLECTED",
|
|
43
|
+
"name": "PET1",
|
|
44
|
+
"componentRef": "gg",
|
|
45
|
+
"values": {
|
|
46
|
+
"PREVIOUS": null,
|
|
47
|
+
"COLLECTED": true,
|
|
48
|
+
"FORCED": false,
|
|
49
|
+
"EDITED": null,
|
|
50
|
+
"INPUTED": null
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"variableType": "COLLECTED",
|
|
55
|
+
"name": "PET2",
|
|
56
|
+
"componentRef": "gg",
|
|
57
|
+
"values": {
|
|
58
|
+
"PREVIOUS": null,
|
|
59
|
+
"COLLECTED": true,
|
|
60
|
+
"FORCED": null,
|
|
61
|
+
"EDITED": null,
|
|
62
|
+
"INPUTED": null
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"variableType": "COLLECTED",
|
|
67
|
+
"name": "PET3",
|
|
68
|
+
"componentRef": "gg",
|
|
69
|
+
"values": {
|
|
70
|
+
"PREVIOUS": null,
|
|
71
|
+
"COLLECTED": null,
|
|
72
|
+
"FORCED": null,
|
|
73
|
+
"EDITED": null,
|
|
74
|
+
"INPUTED": null
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"variableType": "COLLECTED",
|
|
79
|
+
"name": "PET4",
|
|
80
|
+
"componentRef": "gg",
|
|
81
|
+
"values": {
|
|
82
|
+
"PREVIOUS": null,
|
|
83
|
+
"COLLECTED": null,
|
|
84
|
+
"FORCED": null,
|
|
85
|
+
"EDITED": null,
|
|
86
|
+
"INPUTED": null
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"variableType": "COLLECTED",
|
|
91
|
+
"name": "PET_MISSING",
|
|
92
|
+
"componentRef": "gg",
|
|
93
|
+
"values": {
|
|
94
|
+
"PREVIOUS": null,
|
|
95
|
+
"COLLECTED": null,
|
|
96
|
+
"FORCED": null,
|
|
97
|
+
"EDITED": null,
|
|
98
|
+
"INPUTED": null
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { storiesOf } from '@storybook/react';
|
|
3
|
-
import CrossIcon from '../../utils/icons/cross.icon';
|
|
4
|
-
import ClosedIcon from '../../utils/icons/closed.icon';
|
|
5
|
-
import OpenedIcon from '../../utils/icons/opened.icon';
|
|
6
|
-
import LoadIcon from '../../utils/icons/load.icon';
|
|
7
|
-
import NetworkIcon from '../../utils/icons/network.icon';
|
|
8
|
-
import OnDragIcon from '../../utils/icons/on-drag.icon';
|
|
9
|
-
|
|
10
|
-
storiesOf('Icons', module)
|
|
11
|
-
.add('cross', () => <CrossIcon />)
|
|
12
|
-
.add('opened', () => <OpenedIcon />)
|
|
13
|
-
.add('closed', () => <ClosedIcon />)
|
|
14
|
-
.add('load', () => <LoadIcon />)
|
|
15
|
-
.add('network', () => <NetworkIcon />)
|
|
16
|
-
.add('on-drag', () => <OnDragIcon />);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { storiesOf } from '@storybook/react';
|
|
3
|
+
import CrossIcon from '../../utils/icons/cross.icon';
|
|
4
|
+
import ClosedIcon from '../../utils/icons/closed.icon';
|
|
5
|
+
import OpenedIcon from '../../utils/icons/opened.icon';
|
|
6
|
+
import LoadIcon from '../../utils/icons/load.icon';
|
|
7
|
+
import NetworkIcon from '../../utils/icons/network.icon';
|
|
8
|
+
import OnDragIcon from '../../utils/icons/on-drag.icon';
|
|
9
|
+
|
|
10
|
+
storiesOf('Icons', module)
|
|
11
|
+
.add('cross', () => <CrossIcon />)
|
|
12
|
+
.add('opened', () => <OpenedIcon />)
|
|
13
|
+
.add('closed', () => <ClosedIcon />)
|
|
14
|
+
.add('load', () => <LoadIcon />)
|
|
15
|
+
.add('network', () => <NetworkIcon />)
|
|
16
|
+
.add('on-drag', () => <OnDragIcon />);
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxPage": "6",
|
|
3
|
+
"components": [
|
|
4
|
+
{
|
|
5
|
+
"id": "nb",
|
|
6
|
+
"componentType": "InputNumber",
|
|
7
|
+
"page": "1",
|
|
8
|
+
"min": 1,
|
|
9
|
+
"max": 15,
|
|
10
|
+
"decimals": 0,
|
|
11
|
+
"label": "In total, counting you, how many people live in this dwelling?",
|
|
12
|
+
"conditionFilter": {
|
|
13
|
+
"value": "true",
|
|
14
|
+
"bindingDependencies": []
|
|
15
|
+
},
|
|
16
|
+
"bindingDependencies": ["NB"],
|
|
17
|
+
"response": { "name": "NB" }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "prenom_loop",
|
|
21
|
+
"componentType": "Loop",
|
|
22
|
+
"page": "2",
|
|
23
|
+
"depth": 1,
|
|
24
|
+
"paginatedLoop": false,
|
|
25
|
+
"conditionFilter": { "value": "true" },
|
|
26
|
+
"bindingDependencies": ["NB", "FIRST_NAME"],
|
|
27
|
+
"loopDependencies": ["NB"],
|
|
28
|
+
"lines": { "min": "cast(NB,integer)", "max": "cast(NB,integer)" },
|
|
29
|
+
"components": [
|
|
30
|
+
{
|
|
31
|
+
"id": "sub_first_name",
|
|
32
|
+
"componentType": "Subsequence",
|
|
33
|
+
"page": "2",
|
|
34
|
+
"label": "First name",
|
|
35
|
+
"conditionFilter": {
|
|
36
|
+
"value": "true"
|
|
37
|
+
},
|
|
38
|
+
"bindingDependencies": ["FIRST_NAME", "NB"]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "prenom_input",
|
|
42
|
+
"componentType": "Input",
|
|
43
|
+
"mandatory": false,
|
|
44
|
+
"page": "10",
|
|
45
|
+
"maxLength": 20,
|
|
46
|
+
"conditionFilter": { "value": "true" },
|
|
47
|
+
"bindingDependencies": ["NB", "FIRST_NAME"],
|
|
48
|
+
"response": { "name": "FIRST_NAME" }
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "date_loop",
|
|
54
|
+
"componentType": "Loop",
|
|
55
|
+
"page": "3",
|
|
56
|
+
"maxPage": "2",
|
|
57
|
+
"iterations": "count(FIRST_NAME)",
|
|
58
|
+
"depth": 1,
|
|
59
|
+
"paginatedLoop": true,
|
|
60
|
+
"conditionFilter": { "value": "true" },
|
|
61
|
+
"bindingDependencies": ["FIRST_NAME", "BIRTH_DATE"],
|
|
62
|
+
"loopDependencies": ["FIRST_NAME"],
|
|
63
|
+
"components": [
|
|
64
|
+
{
|
|
65
|
+
"id": "sub_date",
|
|
66
|
+
"componentType": "Subsequence",
|
|
67
|
+
"page": "3.1",
|
|
68
|
+
"label": "\"Etat civil de \" || FIRST_NAME",
|
|
69
|
+
"conditionFilter": { "value": "true" },
|
|
70
|
+
"bindingDependencies": ["FIRST_NAME"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "date",
|
|
74
|
+
"componentType": "Datepicker",
|
|
75
|
+
"mandatory": false,
|
|
76
|
+
"page": "3.2",
|
|
77
|
+
"min": "1850-01-01",
|
|
78
|
+
"max": "2100-01-01",
|
|
79
|
+
"label": "\"Quelle est la date de naissance de \" || FIRST_NAME ||\" ?\"",
|
|
80
|
+
"conditionFilter": { "value": "true" },
|
|
81
|
+
"bindingDependencies": ["FIRST_NAME", "BIRTH_DATE"],
|
|
82
|
+
"dateFormat": "YYYY-MM-DD",
|
|
83
|
+
"response": { "name": "BIRTH_DATE" }
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "kish_choice",
|
|
89
|
+
"componentType": "Loop",
|
|
90
|
+
"page": "4",
|
|
91
|
+
"depth": 1,
|
|
92
|
+
"paginatedLoop": false,
|
|
93
|
+
"conditionFilter": {
|
|
94
|
+
"value": "true"
|
|
95
|
+
},
|
|
96
|
+
"bindingDependencies": ["NB", "FIRST_NAME", "IS_KISH"],
|
|
97
|
+
"loopDependencies": ["NB"],
|
|
98
|
+
"lines": { "min": "cast(NB,integer)", "max": "cast(NB,integer)" },
|
|
99
|
+
"components": [
|
|
100
|
+
{
|
|
101
|
+
"id": "kish_seq",
|
|
102
|
+
"componentType": "Sequence",
|
|
103
|
+
"page": "4",
|
|
104
|
+
"label": "\"Kish person is: \" || FIRST_NAME",
|
|
105
|
+
"conditionFilter": {
|
|
106
|
+
"value": "NB_POTENTIAL_KISH = 1 and KISH_INDICATOR = 1",
|
|
107
|
+
"bindingDependencies": ["KISH_INDICATOR", "NB_POTENTIAL_KISH"]
|
|
108
|
+
},
|
|
109
|
+
"bindingDependencies": ["FIRST_NAME"]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "sub_is_kish",
|
|
113
|
+
"componentType": "Radio",
|
|
114
|
+
"page": "4",
|
|
115
|
+
"label": "\"Is \" || FIRST_NAME || \" is the individual Kish?\"",
|
|
116
|
+
"conditionFilter": {
|
|
117
|
+
"value": "NB_POTENTIAL_KISH > 1 and KISH_INDICATOR = 1",
|
|
118
|
+
"bindingDependencies": ["KISH_INDICATOR", "NB_POTENTIAL_KISH"]
|
|
119
|
+
},
|
|
120
|
+
"options": [
|
|
121
|
+
{ "value": "1", "label": "Yes" },
|
|
122
|
+
{ "value": "0", "label": "No" }
|
|
123
|
+
],
|
|
124
|
+
"bindingDependencies": ["FIRST_NAME", "KISH_INDICATOR"],
|
|
125
|
+
"dateFormat": "YYYY-MM-DD",
|
|
126
|
+
"response": { "name": "IS_KISH" }
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "kish_loop",
|
|
132
|
+
"componentType": "Loop",
|
|
133
|
+
"page": "5",
|
|
134
|
+
"maxPage": "1",
|
|
135
|
+
"iterations": "count(FIRST_NAME)",
|
|
136
|
+
"depth": 1,
|
|
137
|
+
"paginatedLoop": true,
|
|
138
|
+
"conditionFilter": { "value": "true" },
|
|
139
|
+
"bindingDependencies": ["FIRST_NAME", "AGE_KISH"],
|
|
140
|
+
"loopDependencies": ["FIRST_NAME"],
|
|
141
|
+
"components": [
|
|
142
|
+
{
|
|
143
|
+
"id": "age_kish",
|
|
144
|
+
"componentType": "InputNumber",
|
|
145
|
+
"mandatory": false,
|
|
146
|
+
"page": "5.1",
|
|
147
|
+
"label": "FIRST_NAME || \", quel est votre âge ?\"",
|
|
148
|
+
"conditionFilter": {
|
|
149
|
+
"value": "IS_KISH = \"1\" or (NB_POTENTIAL_KISH = 1 and KISH_INDICATOR = 1)",
|
|
150
|
+
"bindingDependencies": [
|
|
151
|
+
"IS_KISH",
|
|
152
|
+
"NB_POTENTIAL_KISH",
|
|
153
|
+
"KISH_INDICATOR"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"bindingDependencies": ["FIRST_NAME", "AGE_KISH"],
|
|
157
|
+
"response": { "name": "AGE_KISH" }
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "end",
|
|
163
|
+
"componentType": "Sequence",
|
|
164
|
+
"label": "End",
|
|
165
|
+
"page": "6",
|
|
166
|
+
"conditionFilter": { "value": "true" }
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"variables": [
|
|
170
|
+
{
|
|
171
|
+
"variableType": "COLLECTED",
|
|
172
|
+
"name": "NB",
|
|
173
|
+
"componentRef": "nb",
|
|
174
|
+
"values": {
|
|
175
|
+
"PREVIOUS": null,
|
|
176
|
+
"COLLECTED": null,
|
|
177
|
+
"FORCED": null,
|
|
178
|
+
"EDITED": null,
|
|
179
|
+
"INPUTED": null
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"variableType": "COLLECTED",
|
|
184
|
+
"name": "FIRST_NAME",
|
|
185
|
+
"componentRef": "prenom_loop",
|
|
186
|
+
"values": {
|
|
187
|
+
"PREVIOUS": [null],
|
|
188
|
+
"COLLECTED": [null],
|
|
189
|
+
"FORCED": [null],
|
|
190
|
+
"EDITED": [null],
|
|
191
|
+
"INPUTED": [null]
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"variableType": "COLLECTED",
|
|
196
|
+
"name": "BIRTH_DATE",
|
|
197
|
+
"componentRef": "date_loop",
|
|
198
|
+
"values": {
|
|
199
|
+
"PREVIOUS": [null],
|
|
200
|
+
"COLLECTED": [null],
|
|
201
|
+
"FORCED": [null],
|
|
202
|
+
"EDITED": [null],
|
|
203
|
+
"INPUTED": [null]
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"variableType": "COLLECTED",
|
|
208
|
+
"name": "IS_KISH",
|
|
209
|
+
"componentRef": "kish_choice",
|
|
210
|
+
"values": {
|
|
211
|
+
"PREVIOUS": [null],
|
|
212
|
+
"COLLECTED": [null],
|
|
213
|
+
"FORCED": [null],
|
|
214
|
+
"EDITED": [null],
|
|
215
|
+
"INPUTED": [null]
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"variableType": "COLLECTED",
|
|
220
|
+
"name": "AGE_KISH",
|
|
221
|
+
"componentRef": "kish_loop",
|
|
222
|
+
"values": {
|
|
223
|
+
"PREVIOUS": [null],
|
|
224
|
+
"COLLECTED": [null],
|
|
225
|
+
"FORCED": [null],
|
|
226
|
+
"EDITED": [null],
|
|
227
|
+
"INPUTED": [null]
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"variableType": "CALCULATED",
|
|
232
|
+
"name": "BIRTH_MONTH_INT",
|
|
233
|
+
"expression": "cast(cast(cast(BIRTH_DATE, date, \"YYYY-MM-DD\"), string, \"MM\"), integer)",
|
|
234
|
+
"bindingDependencies": ["BIRTH_DATE"],
|
|
235
|
+
"shapeFrom": "FIRST_NAME"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"variableType": "CALCULATED",
|
|
239
|
+
"name": "BIRTH_DAY_STRING",
|
|
240
|
+
"expression": "cast(cast(BIRTH_DATE, date, \"YYYY-MM-DD\"), string, \"DD\")",
|
|
241
|
+
"bindingDependencies": ["BIRTH_DATE"],
|
|
242
|
+
"shapeFrom": "FIRST_NAME"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"variableType": "CALCULATED",
|
|
246
|
+
"name": "KISH_SCORE",
|
|
247
|
+
"expression": "cast(if BIRTH_MONTH_INT < 6 then BIRTH_MONTH_INT + 12 else BIRTH_MONTH_INT, string) || \".\" || BIRTH_DAY_STRING, number)",
|
|
248
|
+
"bindingDependencies": [
|
|
249
|
+
"BIRTH_DATE",
|
|
250
|
+
"BIRTH_MONTH_INT",
|
|
251
|
+
"BIRTH_DAY_STRING"
|
|
252
|
+
],
|
|
253
|
+
"shapeFrom": "FIRST_NAME"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"variableType": "CALCULATED",
|
|
257
|
+
"name": "KISH_MIN",
|
|
258
|
+
"expression": "min(KISH_SCORE)",
|
|
259
|
+
"bindingDependencies": ["BIRTH_DATE", "KISH_SCORE"]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"variableType": "CALCULATED",
|
|
263
|
+
"name": "NB_POTENTIAL_KISH",
|
|
264
|
+
"expression": "sum(KISH_INDICATOR)",
|
|
265
|
+
"bindingDependencies": ["BIRTH_DATE", "KISH_INDICATOR"]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"variableType": "CALCULATED",
|
|
269
|
+
"name": "KISH_INDICATOR",
|
|
270
|
+
"expression": "if KISH_SCORE = KISH_MIN then 1 else 0",
|
|
271
|
+
"bindingDependencies": ["BIRTH_DATE", "KISH_SCORE", "KISH_MIN"],
|
|
272
|
+
"shapeFrom": "FIRST_NAME"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|