@inseefr/lunatic 3.4.8 → 3.4.10-rc.0
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/components/CheckboxGroup/CheckboxGroup.js +3 -1
- package/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/components/CheckboxGroup/CustomCheckboxGroup.d.ts +1 -1
- package/components/CheckboxGroup/CustomCheckboxGroup.js +2 -5
- package/components/CheckboxGroup/CustomCheckboxGroup.js.map +1 -1
- package/components/CheckboxOne/CheckboxOne.js +3 -1
- package/components/CheckboxOne/CheckboxOne.js.map +1 -1
- package/components/Datepicker/Datepicker.js +7 -1
- package/components/Datepicker/Datepicker.js.map +1 -1
- package/components/Input/Input.js +3 -1
- package/components/Input/Input.js.map +1 -1
- package/components/InputNumber/InputNumber.spec.js +12 -0
- package/components/InputNumber/InputNumber.spec.js.map +1 -1
- package/components/InputNumber/InputNumberThousand.js +3 -1
- package/components/InputNumber/InputNumberThousand.js.map +1 -1
- package/components/Radio/Radio.d.ts +1 -0
- package/components/Radio/Radio.js +3 -1
- package/components/Radio/Radio.js.map +1 -1
- package/components/library.d.ts +1 -0
- package/components/shared/Checkbox/CheckboxOption.d.ts +4 -0
- package/components/shared/Checkbox/CheckboxOption.js +4 -2
- package/components/shared/Checkbox/CheckboxOption.js.map +1 -1
- package/components/shared/Checkbox/CheckboxOption.spec.js +14 -0
- package/components/shared/Checkbox/CheckboxOption.spec.js.map +1 -1
- package/components/shared/Radio/RadioGroup.d.ts +1 -1
- package/components/shared/Radio/RadioGroup.js +2 -2
- package/components/shared/Radio/RadioGroup.js.map +1 -1
- package/components/shared/Radio/RadioOption.d.ts +1 -0
- package/components/shared/Radio/RadioOption.js +2 -2
- package/components/shared/Radio/RadioOption.js.map +1 -1
- package/components/shared/Radio/RadioOption.spec.js +12 -0
- package/components/shared/Radio/RadioOption.spec.js.map +1 -1
- package/components/type.d.ts +3 -0
- package/esm/components/CheckboxGroup/CheckboxGroup.js +3 -1
- package/esm/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.d.ts +1 -1
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.js +2 -6
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.js.map +1 -1
- package/esm/components/CheckboxOne/CheckboxOne.js +3 -1
- package/esm/components/CheckboxOne/CheckboxOne.js.map +1 -1
- package/esm/components/Datepicker/Datepicker.js +7 -1
- package/esm/components/Datepicker/Datepicker.js.map +1 -1
- package/esm/components/Input/Input.js +3 -1
- package/esm/components/Input/Input.js.map +1 -1
- package/esm/components/InputNumber/InputNumber.spec.js +12 -0
- package/esm/components/InputNumber/InputNumber.spec.js.map +1 -1
- package/esm/components/InputNumber/InputNumberThousand.js +3 -1
- package/esm/components/InputNumber/InputNumberThousand.js.map +1 -1
- package/esm/components/Radio/Radio.d.ts +1 -0
- package/esm/components/Radio/Radio.js +3 -1
- package/esm/components/Radio/Radio.js.map +1 -1
- package/esm/components/library.d.ts +1 -0
- package/esm/components/shared/Checkbox/CheckboxOption.d.ts +4 -0
- package/esm/components/shared/Checkbox/CheckboxOption.js +5 -3
- package/esm/components/shared/Checkbox/CheckboxOption.js.map +1 -1
- package/esm/components/shared/Checkbox/CheckboxOption.spec.js +14 -0
- package/esm/components/shared/Checkbox/CheckboxOption.spec.js.map +1 -1
- package/esm/components/shared/Radio/RadioGroup.d.ts +1 -1
- package/esm/components/shared/Radio/RadioGroup.js +2 -2
- package/esm/components/shared/Radio/RadioGroup.js.map +1 -1
- package/esm/components/shared/Radio/RadioOption.d.ts +1 -0
- package/esm/components/shared/Radio/RadioOption.js +2 -2
- package/esm/components/shared/Radio/RadioOption.js.map +1 -1
- package/esm/components/shared/Radio/RadioOption.spec.js +12 -0
- package/esm/components/shared/Radio/RadioOption.spec.js.map +1 -1
- package/esm/components/type.d.ts +3 -0
- package/esm/main.css +5 -2
- package/esm/main.css.map +1 -1
- package/esm/use-lunatic/commons/fill-components/fill-components.d.ts +1 -0
- package/esm/use-lunatic/commons/fill-components/fill-components.js +1 -1
- package/esm/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
- package/esm/use-lunatic/commons/page.js +4 -1
- package/esm/use-lunatic/commons/page.js.map +1 -1
- package/esm/use-lunatic/lunatic-context.d.ts +7 -1
- package/esm/use-lunatic/lunatic-context.js +7 -1
- package/esm/use-lunatic/lunatic-context.js.map +1 -1
- package/esm/use-lunatic/props/getComponentTypeProps.d.ts +3 -0
- package/esm/use-lunatic/props/propOptions.d.ts +1 -1
- package/esm/use-lunatic/props/propOptions.js.map +1 -1
- package/esm/use-lunatic/reducer/reducerInitializer.d.ts +2 -1
- package/esm/use-lunatic/reducer/reducerInitializer.js +3 -1
- package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/esm/use-lunatic/type.d.ts +7 -0
- package/esm/use-lunatic/use-lunatic.js +11 -3
- package/esm/use-lunatic/use-lunatic.js.map +1 -1
- package/main.css +5 -2
- package/main.css.map +1 -1
- package/package.json +6 -1
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +3 -0
- package/src/components/CheckboxGroup/CustomCheckboxGroup.tsx +3 -14
- package/src/components/CheckboxOne/CheckboxOne.tsx +3 -0
- package/src/components/Datepicker/Datepicker.tsx +8 -1
- package/src/components/Input/Input.tsx +4 -0
- package/src/components/Input/__snapshots__/Input.spec.tsx.snap +2 -0
- package/src/components/InputNumber/InputNumber.spec.tsx +20 -0
- package/src/components/InputNumber/InputNumberThousand.tsx +4 -0
- package/src/components/InputNumber/__snapshots__/InputNumber.spec.tsx.snap +2 -0
- package/src/components/Radio/Radio.tsx +3 -0
- package/src/components/RosterForLoop/__snapshots__/RosterForLoop.spec.tsx.snap +2 -0
- package/src/components/shared/Checkbox/CheckboxOption.spec.tsx +21 -0
- package/src/components/shared/Checkbox/CheckboxOption.tsx +54 -33
- package/src/components/shared/Radio/RadioGroup.tsx +3 -0
- package/src/components/shared/Radio/RadioOption.spec.tsx +36 -0
- package/src/components/shared/Radio/RadioOption.tsx +5 -1
- package/src/components/type.ts +3 -0
- package/src/css/components/CheckboxOne.scss +1 -1
- package/src/css/components/CheckboxOption.scss +14 -18
- package/src/css/components/Combobox.scss +3 -2
- package/src/css/components/Datepicker.scss +8 -8
- package/src/css/components/Declarations.scss +1 -1
- package/src/css/components/Dragger.scss +6 -6
- package/src/css/components/Duration.scss +4 -4
- package/src/css/components/IconButton.scss +4 -2
- package/src/css/components/Input.scss +3 -0
- package/src/css/components/Missing.scss +1 -1
- package/src/css/components/Roundabout.scss +3 -3
- package/src/css/components/Suggester.scss +2 -2
- package/src/css/components/Table.scss +9 -7
- package/src/css/main.scss +167 -167
- package/src/stories/behaviour/filter/dataLoop.json +22 -0
- package/src/stories/behaviour/filter/filter.stories.jsx +36 -0
- package/src/stories/behaviour/filter/source.json +238 -0
- package/src/stories/behaviour/filter/sourceLoop.json +372 -0
- package/src/stories/behaviour/missing/missing.stories.jsx +9 -0
- package/src/stories/behaviour/paste/test.stories.jsx +5 -0
- package/src/stories/checkbox-group/checkbox-group.stories.jsx +25 -6
- package/src/stories/checkbox-one/checkboxOne.stories.jsx +24 -2
- package/src/stories/overview/overview.stories.jsx +8 -1
- package/src/stories/radio/radio.stories.jsx +46 -6
- package/src/stories/utils/default-arg-types.js +12 -1
- package/src/stories/utils/default-args.js +3 -0
- package/src/stories/utils/orchestrator.jsx +8 -1
- package/src/stories/utils/orchestrator.scss +9 -7
- package/src/stories/utils/overview.scss +0 -1
- package/src/use-lunatic/commons/fill-components/fill-components.ts +4 -1
- package/src/use-lunatic/commons/page.ts +4 -1
- package/src/use-lunatic/lunatic-context.tsx +9 -0
- package/src/use-lunatic/props/propOptions.ts +2 -1
- package/src/use-lunatic/reducer/reducerInitializer.tsx +4 -0
- package/src/use-lunatic/type.ts +5 -0
- package/src/use-lunatic/use-lunatic.test.ts +68 -1
- package/src/use-lunatic/use-lunatic.ts +10 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/use-lunatic/commons/fill-components/fill-components.d.ts +1 -0
- package/use-lunatic/commons/fill-components/fill-components.js +1 -1
- package/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
- package/use-lunatic/commons/page.js +4 -1
- package/use-lunatic/commons/page.js.map +1 -1
- package/use-lunatic/lunatic-context.d.ts +7 -1
- package/use-lunatic/lunatic-context.js +9 -2
- package/use-lunatic/lunatic-context.js.map +1 -1
- package/use-lunatic/props/getComponentTypeProps.d.ts +3 -0
- package/use-lunatic/props/propOptions.d.ts +1 -1
- package/use-lunatic/props/propOptions.js.map +1 -1
- package/use-lunatic/reducer/reducerInitializer.d.ts +2 -1
- package/use-lunatic/reducer/reducerInitializer.js +3 -1
- package/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/use-lunatic/type.d.ts +7 -0
- package/use-lunatic/use-lunatic.js +11 -3
- package/use-lunatic/use-lunatic.js.map +1 -1
package/src/css/main.scss
CHANGED
|
@@ -1,183 +1,183 @@
|
|
|
1
1
|
* {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
--color-primary-dark: #2a5885;
|
|
4
|
+
--color-primary-light: #5181b8;
|
|
5
|
+
--color-primary-main: #4a73a4;
|
|
6
|
+
--color-primary-contrast-text: #ffffff;
|
|
7
|
+
|
|
8
|
+
--color-secondary-dark: #14202d;
|
|
9
|
+
--color-secondary-light: #f7f8fa;
|
|
10
|
+
--color-secondary-main: #1a293b;
|
|
11
|
+
--color-secondary-contrast-text: #ffffff;
|
|
12
|
+
|
|
13
|
+
--color-very-light: #dbe4ef;
|
|
14
|
+
--color-very-very-light: #e6eaee;
|
|
15
|
+
--color-current-item: #0d823e;
|
|
16
|
+
|
|
17
|
+
--color-error: #f50c0c;
|
|
18
|
+
--color-disabled: rgb(235, 235, 228);
|
|
19
|
+
--color-prefix: cornflowerblue;
|
|
20
|
+
--color-dropdown-active: rgba(0, 0, 0, 0.04);
|
|
21
|
+
--color-dropdown-selected: rgba(0, 0, 0, 0.08);
|
|
22
|
+
|
|
23
|
+
--dropdown-transition-time: 0.5s;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
@mixin vertical-placement($reverse: false) {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: if($reverse, column-reverse, column);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@mixin horizontal-placement($reverse: false) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: if($reverse, row-reverse, row);
|
|
34
|
+
align-items: baseline;
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
:first-child {
|
|
37
|
+
margin-right: 1rem;
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.lunatic-component {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
42
|
+
.mandatory:after {
|
|
43
|
+
content: ' *';
|
|
44
|
+
color: red;
|
|
45
|
+
}
|
|
46
|
+
.horizontal-options {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
margin-right: 2em;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Label & Legend
|
|
52
|
+
label,
|
|
53
|
+
legend,
|
|
54
|
+
.subsequence-lunatic,
|
|
55
|
+
.lunatic-dropdown-label,
|
|
56
|
+
.lunatic-dropdown-label focused {
|
|
57
|
+
color: var(--color-primary-dark);
|
|
58
|
+
background-color: var(--color-primary-contrast-text);
|
|
59
|
+
border: 0;
|
|
60
|
+
padding: 0;
|
|
61
|
+
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
margin-bottom: 0.375rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* refactor proposition */
|
|
67
|
+
|
|
68
|
+
// .lunatic-component {
|
|
69
|
+
// width: fit-content;
|
|
70
|
+
// }
|
|
71
|
+
|
|
72
|
+
.lunatic-component-container {
|
|
73
|
+
display: flex;
|
|
74
|
+
|
|
75
|
+
&.label-left-ex {
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
align-items: baseline;
|
|
78
|
+
.lunatic-label {
|
|
79
|
+
margin-right: 1em;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
&.label-right-ex {
|
|
83
|
+
flex-direction: row-reverse;
|
|
84
|
+
align-items: baseline;
|
|
85
|
+
.lunatic-label {
|
|
86
|
+
margin-left: 1em;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
&.label-top-ex {
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
}
|
|
92
|
+
&.label-bottom-ex {
|
|
93
|
+
flex-direction: column-reverse;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/******/
|
|
98
|
+
|
|
99
|
+
.label-top {
|
|
100
|
+
@include vertical-placement();
|
|
101
|
+
}
|
|
102
|
+
.label-bottom {
|
|
103
|
+
@include vertical-placement(true);
|
|
104
|
+
}
|
|
105
|
+
.label-right {
|
|
106
|
+
justify-content: flex-end;
|
|
107
|
+
@include horizontal-placement(true);
|
|
108
|
+
}
|
|
109
|
+
.label-left {
|
|
110
|
+
@include horizontal-placement();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.field-container {
|
|
114
|
+
display: flex;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.modality-label p {
|
|
118
|
+
display: inline;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.field {
|
|
122
|
+
width: 100%;
|
|
123
|
+
position: relative;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.link-md {
|
|
127
|
+
border-bottom: dashed 0.1em var(--color-primary-dark);
|
|
128
|
+
&:hover {
|
|
129
|
+
cursor: help;
|
|
130
|
+
color: var(--color-primary-contrast-text);
|
|
131
|
+
background-color: var(--color-primary-dark);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.tooltip-content {
|
|
136
|
+
min-width: 15em;
|
|
137
|
+
max-width: 25em;
|
|
138
|
+
background: var(--color-primary-dark);
|
|
139
|
+
color: var(--color-primary-contrast-text);
|
|
140
|
+
padding: 0.5em;
|
|
141
|
+
border-radius: 6px;
|
|
142
|
+
font-size: 1em;
|
|
143
|
+
&.place-bottom {
|
|
144
|
+
&::before {
|
|
145
|
+
border-bottom: 10px solid var(--color-primary-dark);
|
|
146
|
+
}
|
|
147
|
+
&::after {
|
|
148
|
+
content: none;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.lunatic-component + .lunatic-component {
|
|
155
|
-
|
|
155
|
+
margin-top: 1rem;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
@import
|
|
159
|
-
@import
|
|
160
|
-
@import
|
|
161
|
-
@import
|
|
162
|
-
@import
|
|
163
|
-
@import
|
|
164
|
-
@import
|
|
165
|
-
@import
|
|
166
|
-
@import
|
|
167
|
-
@import
|
|
168
|
-
@import
|
|
169
|
-
@import
|
|
170
|
-
@import
|
|
171
|
-
@import
|
|
172
|
-
@import
|
|
173
|
-
@import
|
|
174
|
-
@import
|
|
175
|
-
@import
|
|
176
|
-
@import
|
|
177
|
-
@import
|
|
178
|
-
@import
|
|
179
|
-
@import
|
|
180
|
-
@import
|
|
181
|
-
@import
|
|
182
|
-
@import
|
|
183
|
-
@import
|
|
158
|
+
@import './components/Button.scss';
|
|
159
|
+
@import './components/CheckboxGroup.scss';
|
|
160
|
+
@import './components/CheckboxOne.scss';
|
|
161
|
+
@import './components/CheckboxOption.scss';
|
|
162
|
+
@import './components/Combobox.scss';
|
|
163
|
+
@import './components/ComponentErrors.scss';
|
|
164
|
+
@import './components/Datepicker.scss';
|
|
165
|
+
@import './components/Declarations.scss';
|
|
166
|
+
@import './components/Dropdown.scss';
|
|
167
|
+
@import './components/Duration.scss';
|
|
168
|
+
@import './components/Fieldset.scss';
|
|
169
|
+
@import './components/IconButton.scss';
|
|
170
|
+
@import './components/Input.scss';
|
|
171
|
+
@import './components/InputNumber.scss';
|
|
172
|
+
@import './components/Label.scss';
|
|
173
|
+
@import './components/Missing.scss';
|
|
174
|
+
@import './components/ModalControls.scss';
|
|
175
|
+
@import './components/RosterForLoop.scss';
|
|
176
|
+
@import './components/Roundabout.scss';
|
|
177
|
+
@import './components/Sequence.scss';
|
|
178
|
+
@import './components/Suggester.scss';
|
|
179
|
+
@import './components/Table.scss';
|
|
180
|
+
@import './components/Textarea.scss';
|
|
181
|
+
@import './components/VariableStatus.scss';
|
|
182
|
+
@import './components/Dragger';
|
|
183
|
+
@import './components/SuggesterWidget';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"EXTERNAL": {},
|
|
4
|
+
"CALCULATED": {},
|
|
5
|
+
"COLLECTED": {
|
|
6
|
+
"NBHAB": {
|
|
7
|
+
"PREVIOUS": null,
|
|
8
|
+
"FORCED": null,
|
|
9
|
+
"EDITED": null,
|
|
10
|
+
"INPUTTED": null,
|
|
11
|
+
"COLLECTED": 2
|
|
12
|
+
},
|
|
13
|
+
"NAME": {
|
|
14
|
+
"PREVIOUS": [],
|
|
15
|
+
"FORCED": [],
|
|
16
|
+
"EDITED": [],
|
|
17
|
+
"INPUTTED": [],
|
|
18
|
+
"COLLECTED": ["Jean", "Paul"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import defaultArgTypes from '../../utils/default-arg-types';
|
|
3
|
+
import Orchestrator from '../../utils/orchestrator';
|
|
4
|
+
import source from './source.json';
|
|
5
|
+
import sourceLoop from './sourceLoop.json';
|
|
6
|
+
import dataLoop from './dataLoop.json';
|
|
7
|
+
|
|
8
|
+
const stories = {
|
|
9
|
+
title: 'Behaviour/Filter',
|
|
10
|
+
component: Orchestrator,
|
|
11
|
+
argTypes: {
|
|
12
|
+
...defaultArgTypes,
|
|
13
|
+
disableFilters: {
|
|
14
|
+
table: { disable: false },
|
|
15
|
+
control: 'boolean',
|
|
16
|
+
defaultValue: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default stories;
|
|
22
|
+
|
|
23
|
+
const Template = (args) => <Orchestrator {...args} />;
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
|
|
26
|
+
Default.args = {
|
|
27
|
+
disableFilters: false,
|
|
28
|
+
source,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithLoop = Template.bind({});
|
|
32
|
+
WithLoop.args = {
|
|
33
|
+
disableFilters: false,
|
|
34
|
+
source: sourceLoop,
|
|
35
|
+
data: dataLoop.data,
|
|
36
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../../lunatic-schema.json",
|
|
3
|
+
"id": "m48nyxtp",
|
|
4
|
+
"label": {
|
|
5
|
+
"type": "VTL|MD",
|
|
6
|
+
"value": "Story disable filter"
|
|
7
|
+
},
|
|
8
|
+
"modele": "DISABLEFILTER",
|
|
9
|
+
"maxPage": "4",
|
|
10
|
+
"resizing": {},
|
|
11
|
+
"variables": [
|
|
12
|
+
{
|
|
13
|
+
"name": "NAME",
|
|
14
|
+
"values": {
|
|
15
|
+
"EDITED": null,
|
|
16
|
+
"FORCED": null,
|
|
17
|
+
"INPUTTED": null,
|
|
18
|
+
"PREVIOUS": null,
|
|
19
|
+
"COLLECTED": null
|
|
20
|
+
},
|
|
21
|
+
"dimension": 0,
|
|
22
|
+
"variableType": "COLLECTED"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "AGE",
|
|
26
|
+
"values": {
|
|
27
|
+
"EDITED": null,
|
|
28
|
+
"FORCED": null,
|
|
29
|
+
"INPUTTED": null,
|
|
30
|
+
"PREVIOUS": null,
|
|
31
|
+
"COLLECTED": null
|
|
32
|
+
},
|
|
33
|
+
"dimension": 0,
|
|
34
|
+
"variableType": "COLLECTED"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "APPLE",
|
|
38
|
+
"values": {
|
|
39
|
+
"EDITED": null,
|
|
40
|
+
"FORCED": null,
|
|
41
|
+
"INPUTTED": null,
|
|
42
|
+
"PREVIOUS": null,
|
|
43
|
+
"COLLECTED": null
|
|
44
|
+
},
|
|
45
|
+
"dimension": 0,
|
|
46
|
+
"variableType": "COLLECTED"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "FILTER_RESULT_NAME",
|
|
50
|
+
"dimension": 0,
|
|
51
|
+
"expression": {
|
|
52
|
+
"type": "VTL",
|
|
53
|
+
"value": "true"
|
|
54
|
+
},
|
|
55
|
+
"variableType": "CALCULATED"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "FILTER_RESULT_AGE",
|
|
59
|
+
"dimension": 0,
|
|
60
|
+
"expression": {
|
|
61
|
+
"type": "VTL",
|
|
62
|
+
"value": "(false)"
|
|
63
|
+
},
|
|
64
|
+
"variableType": "CALCULATED"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "FILTER_RESULT_APPLE",
|
|
68
|
+
"dimension": 0,
|
|
69
|
+
"expression": {
|
|
70
|
+
"type": "VTL",
|
|
71
|
+
"value": "true"
|
|
72
|
+
},
|
|
73
|
+
"variableType": "CALCULATED"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"components": [
|
|
77
|
+
{
|
|
78
|
+
"id": "m48o486x",
|
|
79
|
+
"page": "1",
|
|
80
|
+
"label": {
|
|
81
|
+
"type": "VTL",
|
|
82
|
+
"value": "\"I - \" || \"First sequence\""
|
|
83
|
+
},
|
|
84
|
+
"description": {
|
|
85
|
+
"type": "VTL|MD",
|
|
86
|
+
"value": "\"The 2nd question about your age will be automatically filtered\""
|
|
87
|
+
},
|
|
88
|
+
"componentType": "Sequence",
|
|
89
|
+
"conditionFilter": {
|
|
90
|
+
"type": "VTL",
|
|
91
|
+
"value": "true"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "question-m48o3cux",
|
|
96
|
+
"page": "2",
|
|
97
|
+
"label": {
|
|
98
|
+
"type": "VTL|MD",
|
|
99
|
+
"value": "\"1\\. \" || \"What is your name ?\""
|
|
100
|
+
},
|
|
101
|
+
"components": [
|
|
102
|
+
{
|
|
103
|
+
"id": "m48o3cux",
|
|
104
|
+
"page": "2",
|
|
105
|
+
"response": {
|
|
106
|
+
"name": "NAME"
|
|
107
|
+
},
|
|
108
|
+
"mandatory": false,
|
|
109
|
+
"maxLength": 249,
|
|
110
|
+
"componentType": "Input"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"componentType": "Question",
|
|
114
|
+
"conditionFilter": {
|
|
115
|
+
"type": "VTL",
|
|
116
|
+
"value": "true"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "question-m48nnrxf",
|
|
121
|
+
"page": "3",
|
|
122
|
+
"label": {
|
|
123
|
+
"type": "VTL|MD",
|
|
124
|
+
"value": "\"2\\. \" || \"How old are you ?\""
|
|
125
|
+
},
|
|
126
|
+
"components": [
|
|
127
|
+
{
|
|
128
|
+
"id": "m48nnrxf",
|
|
129
|
+
"max": 200,
|
|
130
|
+
"min": 1,
|
|
131
|
+
"page": "3",
|
|
132
|
+
"controls": [
|
|
133
|
+
{
|
|
134
|
+
"id": "m48nnrxf-format-borne-inf-sup",
|
|
135
|
+
"type": "SIMPLE",
|
|
136
|
+
"control": {
|
|
137
|
+
"type": "VTL",
|
|
138
|
+
"value": "not(not(isnull(AGE)) and (1>AGE or 200<AGE))"
|
|
139
|
+
},
|
|
140
|
+
"criticality": "ERROR",
|
|
141
|
+
"errorMessage": {
|
|
142
|
+
"type": "VTL|MD",
|
|
143
|
+
"value": "\" La valeur doit être comprise entre 1 et 200.\""
|
|
144
|
+
},
|
|
145
|
+
"typeOfControl": "FORMAT"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "m48nnrxf-format-decimal",
|
|
149
|
+
"type": "SIMPLE",
|
|
150
|
+
"control": {
|
|
151
|
+
"type": "VTL",
|
|
152
|
+
"value": "not(not(isnull(AGE)) and round(AGE,0)<>AGE)"
|
|
153
|
+
},
|
|
154
|
+
"criticality": "ERROR",
|
|
155
|
+
"errorMessage": {
|
|
156
|
+
"type": "VTL|MD",
|
|
157
|
+
"value": "\"Le nombre doit comporter au maximum 0 chiffre(s) après la virgule.\""
|
|
158
|
+
},
|
|
159
|
+
"typeOfControl": "FORMAT"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"decimals": 0,
|
|
163
|
+
"response": {
|
|
164
|
+
"name": "AGE"
|
|
165
|
+
},
|
|
166
|
+
"mandatory": false,
|
|
167
|
+
"description": {
|
|
168
|
+
"type": "TXT",
|
|
169
|
+
"value": "Format attendu : un nombre entre 1 et 200"
|
|
170
|
+
},
|
|
171
|
+
"componentType": "InputNumber"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"declarations": [
|
|
175
|
+
{
|
|
176
|
+
"id": "m48oduqe",
|
|
177
|
+
"label": {
|
|
178
|
+
"type": "VTL|MD",
|
|
179
|
+
"value": "\"This question is automatically filtered\""
|
|
180
|
+
},
|
|
181
|
+
"position": "AFTER_QUESTION_TEXT",
|
|
182
|
+
"declarationType": "HELP"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"componentType": "Question",
|
|
186
|
+
"conditionFilter": {
|
|
187
|
+
"type": "VTL",
|
|
188
|
+
"value": "(false)"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "question-m48o1qml",
|
|
193
|
+
"page": "4",
|
|
194
|
+
"label": {
|
|
195
|
+
"type": "VTL|MD",
|
|
196
|
+
"value": "\"3\\. \" || \"Do you like apple ?\""
|
|
197
|
+
},
|
|
198
|
+
"components": [
|
|
199
|
+
{
|
|
200
|
+
"id": "m48o1qml",
|
|
201
|
+
"page": "4",
|
|
202
|
+
"options": [
|
|
203
|
+
{
|
|
204
|
+
"label": {
|
|
205
|
+
"type": "VTL|MD",
|
|
206
|
+
"value": "\"yes\""
|
|
207
|
+
},
|
|
208
|
+
"value": "1"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"label": {
|
|
212
|
+
"type": "VTL|MD",
|
|
213
|
+
"value": "\"no\""
|
|
214
|
+
},
|
|
215
|
+
"value": "2"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"response": {
|
|
219
|
+
"name": "APPLE"
|
|
220
|
+
},
|
|
221
|
+
"mandatory": false,
|
|
222
|
+
"orientation": "vertical",
|
|
223
|
+
"componentType": "Radio"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"componentType": "Question",
|
|
227
|
+
"conditionFilter": {
|
|
228
|
+
"type": "VTL",
|
|
229
|
+
"value": "true"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"pagination": "question",
|
|
234
|
+
"componentType": "Questionnaire",
|
|
235
|
+
"enoCoreVersion": "3.29.3-SNAPSHOT",
|
|
236
|
+
"generatingDate": "03-12-2024 16:23:28",
|
|
237
|
+
"lunaticModelVersion": "3.15.1"
|
|
238
|
+
}
|