@inseefr/lunatic 2.4.6-overflow → 2.4.7-beta
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.
|
@@ -8,17 +8,3 @@
|
|
|
8
8
|
height: 1.875rem;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
.HELP p,
|
|
13
|
-
.INSTRUCTION p,
|
|
14
|
-
.COMMENT p,
|
|
15
|
-
.STATEMENT p {
|
|
16
|
-
margin: 10px;
|
|
17
|
-
font-size: 12px;
|
|
18
|
-
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.HELP p,
|
|
22
|
-
.INSTRUCTION p {
|
|
23
|
-
color: #0f417a;
|
|
24
|
-
}
|
|
@@ -29,9 +29,10 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
29
29
|
label: 'Test Sequence Label',
|
|
30
30
|
style: {
|
|
31
31
|
backgroundColor: 'red'
|
|
32
|
-
}
|
|
33
|
-
questionInformation: 'question-information'
|
|
32
|
+
}
|
|
33
|
+
// questionInformation: 'question-information',
|
|
34
34
|
};
|
|
35
|
+
|
|
35
36
|
(0, _vitest.it)('renders the label and declarations in the correct order', function () {
|
|
36
37
|
var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticSequence["default"], _objectSpread({}, mockProps))),
|
|
37
38
|
getByText = _render.getByText,
|
|
@@ -39,9 +40,10 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
39
40
|
var sequenceLabel = getByText('Test Sequence Label');
|
|
40
41
|
var declaration1 = getByText('Declaration 1');
|
|
41
42
|
var declaration3 = getByText('Declaration 3');
|
|
42
|
-
|
|
43
|
+
// const questionInformation = getByText('question-information');
|
|
44
|
+
|
|
43
45
|
(0, _vitest.expect)(sequenceLabel).toBeInTheDocument();
|
|
44
|
-
|
|
46
|
+
// expect(questionInformation).toBeInTheDocument();
|
|
45
47
|
// Declarations before text should appear before the label
|
|
46
48
|
(0, _vitest.expect)(declaration1).toBeInTheDocument();
|
|
47
49
|
// expect(sequenceLabel?.previousSibling?.childNodes[0]).toBe(declaration1);
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.
|
|
6
|
+
exports["default"] = exports.WithDeclarations = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
|
|
9
9
|
var _sourceDeclarations = _interopRequireDefault(require("./source-declarations.json"));
|
|
10
|
-
var _afterInSeq = _interopRequireDefault(require("./afterInSeq.json"));
|
|
11
10
|
var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -16,7 +15,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
16
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
16
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
17
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
18
|
+
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
19
|
var stories = {
|
|
21
20
|
title: 'Components/Sequence',
|
|
22
21
|
component: _orchestrator["default"],
|
|
@@ -32,14 +31,4 @@ exports.WithDeclarations = WithDeclarations;
|
|
|
32
31
|
WithDeclarations.args = {
|
|
33
32
|
id: 'sequence-declarations',
|
|
34
33
|
source: _sourceDeclarations["default"]
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// export const WithQuestions = Template.bind({});
|
|
38
|
-
// WithQuestions.args = { id: 'sequence-questions', source: sourceQuestions };
|
|
39
|
-
|
|
40
|
-
var afterSeq = Template.bind({});
|
|
41
|
-
exports.afterSeq = afterSeq;
|
|
42
|
-
afterSeq.args = {
|
|
43
|
-
id: 'sequence-after',
|
|
44
|
-
source: _afterInSeq["default"]
|
|
45
34
|
};
|
package/package.json
CHANGED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cleaning": {},
|
|
3
|
-
"variables": [
|
|
4
|
-
{
|
|
5
|
-
"variableType": "COLLECTED",
|
|
6
|
-
"values": {
|
|
7
|
-
"COLLECTED": null,
|
|
8
|
-
"EDITED": null,
|
|
9
|
-
"INPUTED": null,
|
|
10
|
-
"FORCED": null,
|
|
11
|
-
"PREVIOUS": null
|
|
12
|
-
},
|
|
13
|
-
"name": "COMMENT_QE"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"variableType": "COLLECTED",
|
|
17
|
-
"values": {
|
|
18
|
-
"COLLECTED": null,
|
|
19
|
-
"EDITED": null,
|
|
20
|
-
"INPUTED": null,
|
|
21
|
-
"FORCED": null,
|
|
22
|
-
"PREVIOUS": null
|
|
23
|
-
},
|
|
24
|
-
"name": "Q1"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"variableType": "COLLECTED",
|
|
28
|
-
"values": {
|
|
29
|
-
"COLLECTED": null,
|
|
30
|
-
"EDITED": null,
|
|
31
|
-
"INPUTED": null,
|
|
32
|
-
"FORCED": null,
|
|
33
|
-
"PREVIOUS": null
|
|
34
|
-
},
|
|
35
|
-
"name": "Q2"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"variableType": "COLLECTED",
|
|
39
|
-
"values": {
|
|
40
|
-
"COLLECTED": null,
|
|
41
|
-
"EDITED": null,
|
|
42
|
-
"INPUTED": null,
|
|
43
|
-
"FORCED": null,
|
|
44
|
-
"PREVIOUS": null
|
|
45
|
-
},
|
|
46
|
-
"name": "Q3"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"variableType": "COLLECTED",
|
|
50
|
-
"values": {
|
|
51
|
-
"COLLECTED": null,
|
|
52
|
-
"EDITED": null,
|
|
53
|
-
"INPUTED": null,
|
|
54
|
-
"FORCED": null,
|
|
55
|
-
"PREVIOUS": null
|
|
56
|
-
},
|
|
57
|
-
"name": "Q4"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"variableType": "COLLECTED",
|
|
61
|
-
"values": {
|
|
62
|
-
"COLLECTED": null,
|
|
63
|
-
"EDITED": null,
|
|
64
|
-
"INPUTED": null,
|
|
65
|
-
"FORCED": null,
|
|
66
|
-
"PREVIOUS": null
|
|
67
|
-
},
|
|
68
|
-
"name": "Q5"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"variableType": "COLLECTED",
|
|
72
|
-
"values": {
|
|
73
|
-
"COLLECTED": null,
|
|
74
|
-
"EDITED": null,
|
|
75
|
-
"INPUTED": null,
|
|
76
|
-
"FORCED": null,
|
|
77
|
-
"PREVIOUS": null
|
|
78
|
-
},
|
|
79
|
-
"name": "Q6"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"variableType": "COLLECTED",
|
|
83
|
-
"values": {
|
|
84
|
-
"COLLECTED": null,
|
|
85
|
-
"EDITED": null,
|
|
86
|
-
"INPUTED": null,
|
|
87
|
-
"FORCED": null,
|
|
88
|
-
"PREVIOUS": null
|
|
89
|
-
},
|
|
90
|
-
"name": "Q7"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"variableType": "COLLECTED",
|
|
94
|
-
"values": {
|
|
95
|
-
"COLLECTED": null,
|
|
96
|
-
"EDITED": null,
|
|
97
|
-
"INPUTED": null,
|
|
98
|
-
"FORCED": null,
|
|
99
|
-
"PREVIOUS": null
|
|
100
|
-
},
|
|
101
|
-
"name": "Q8"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"variableType": "COLLECTED",
|
|
105
|
-
"values": {
|
|
106
|
-
"COLLECTED": null,
|
|
107
|
-
"EDITED": null,
|
|
108
|
-
"INPUTED": null,
|
|
109
|
-
"FORCED": null,
|
|
110
|
-
"PREVIOUS": null
|
|
111
|
-
},
|
|
112
|
-
"name": "Q9"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"variableType": "COLLECTED",
|
|
116
|
-
"values": {
|
|
117
|
-
"COLLECTED": null,
|
|
118
|
-
"EDITED": null,
|
|
119
|
-
"INPUTED": null,
|
|
120
|
-
"FORCED": null,
|
|
121
|
-
"PREVIOUS": null
|
|
122
|
-
},
|
|
123
|
-
"name": "Q10"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"variableType": "COLLECTED",
|
|
127
|
-
"values": {
|
|
128
|
-
"COLLECTED": null,
|
|
129
|
-
"EDITED": null,
|
|
130
|
-
"INPUTED": null,
|
|
131
|
-
"FORCED": null,
|
|
132
|
-
"PREVIOUS": null
|
|
133
|
-
},
|
|
134
|
-
"name": "MIX1"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"variableType": "COLLECTED",
|
|
138
|
-
"values": {
|
|
139
|
-
"COLLECTED": null,
|
|
140
|
-
"EDITED": null,
|
|
141
|
-
"INPUTED": null,
|
|
142
|
-
"FORCED": null,
|
|
143
|
-
"PREVIOUS": null
|
|
144
|
-
},
|
|
145
|
-
"name": "MIX2"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"variableType": "COLLECTED",
|
|
149
|
-
"values": {
|
|
150
|
-
"COLLECTED": null,
|
|
151
|
-
"EDITED": null,
|
|
152
|
-
"INPUTED": null,
|
|
153
|
-
"FORCED": null,
|
|
154
|
-
"PREVIOUS": null
|
|
155
|
-
},
|
|
156
|
-
"name": "MIX3"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"variableType": "COLLECTED",
|
|
160
|
-
"values": {
|
|
161
|
-
"COLLECTED": null,
|
|
162
|
-
"EDITED": null,
|
|
163
|
-
"INPUTED": null,
|
|
164
|
-
"FORCED": null,
|
|
165
|
-
"PREVIOUS": null
|
|
166
|
-
},
|
|
167
|
-
"name": "MIX4"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"variableType": "CALCULATED",
|
|
171
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
172
|
-
"name": "FILTER_RESULT_Q1",
|
|
173
|
-
"inFilter": "false"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"variableType": "CALCULATED",
|
|
177
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
178
|
-
"name": "FILTER_RESULT_Q2",
|
|
179
|
-
"inFilter": "false"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"variableType": "CALCULATED",
|
|
183
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
184
|
-
"name": "FILTER_RESULT_Q3",
|
|
185
|
-
"inFilter": "false"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"variableType": "CALCULATED",
|
|
189
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
190
|
-
"name": "FILTER_RESULT_Q4",
|
|
191
|
-
"inFilter": "false"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"variableType": "CALCULATED",
|
|
195
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
196
|
-
"name": "FILTER_RESULT_Q5",
|
|
197
|
-
"inFilter": "false"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"variableType": "CALCULATED",
|
|
201
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
202
|
-
"name": "FILTER_RESULT_Q6",
|
|
203
|
-
"inFilter": "false"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"variableType": "CALCULATED",
|
|
207
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
208
|
-
"name": "FILTER_RESULT_Q7",
|
|
209
|
-
"inFilter": "false"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"variableType": "CALCULATED",
|
|
213
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
214
|
-
"name": "FILTER_RESULT_Q8",
|
|
215
|
-
"inFilter": "false"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"variableType": "CALCULATED",
|
|
219
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
220
|
-
"name": "FILTER_RESULT_Q9",
|
|
221
|
-
"inFilter": "false"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"variableType": "CALCULATED",
|
|
225
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
226
|
-
"name": "FILTER_RESULT_Q10",
|
|
227
|
-
"inFilter": "false"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"variableType": "CALCULATED",
|
|
231
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
232
|
-
"name": "FILTER_RESULT_MIX1",
|
|
233
|
-
"inFilter": "false"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"variableType": "CALCULATED",
|
|
237
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
238
|
-
"name": "FILTER_RESULT_MIX2",
|
|
239
|
-
"inFilter": "false"
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"variableType": "CALCULATED",
|
|
243
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
244
|
-
"name": "FILTER_RESULT_MIX3",
|
|
245
|
-
"inFilter": "false"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"variableType": "CALCULATED",
|
|
249
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
250
|
-
"name": "FILTER_RESULT_MIX4",
|
|
251
|
-
"inFilter": "false"
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
"components": [
|
|
255
|
-
{
|
|
256
|
-
"componentType": "Sequence",
|
|
257
|
-
"hierarchy": {
|
|
258
|
-
"sequence": {
|
|
259
|
-
"id": "kanya0cm",
|
|
260
|
-
"page": "1",
|
|
261
|
-
"label": {
|
|
262
|
-
"type": "VTL|MD",
|
|
263
|
-
"value": "\"I - \" || \"Séquence - questions comportant des déclarations de différents types\""
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
"conditionFilter": { "type": "VTL", "value": "true" },
|
|
268
|
-
"id": "kanya0cm",
|
|
269
|
-
"page": "1",
|
|
270
|
-
"label": {
|
|
271
|
-
"type": "VTL|MD",
|
|
272
|
-
"value": "\"I - \" || \"Séquence - questions comportant des déclarations de différents types\""
|
|
273
|
-
},
|
|
274
|
-
"declarations": [
|
|
275
|
-
{
|
|
276
|
-
"declarationType": "INSTRUCTION",
|
|
277
|
-
"id": "kanya0cm-kanzilet",
|
|
278
|
-
"label": {
|
|
279
|
-
"type": "VTL|MD",
|
|
280
|
-
"value": "\"consigne de séquence cawi\""
|
|
281
|
-
},
|
|
282
|
-
"position": "AFTER_QUESTION_TEXT"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"declarationType": "HELP",
|
|
286
|
-
"id": "kanya0cm-kzfdtx2b",
|
|
287
|
-
"label": { "type": "VTL|MD", "value": "\"aide de séquence cawi\"" },
|
|
288
|
-
"position": "AFTER_QUESTION_TEXT"
|
|
289
|
-
}
|
|
290
|
-
]
|
|
291
|
-
}
|
|
292
|
-
]
|
|
293
|
-
}
|