@inseefr/lunatic 2.6.11 → 2.6.12
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/components/remote-component/remote-component.js +14 -17
- package/lib/src/components/type.d.ts +1 -5
- package/lib/stories/RemoteComponent/data.json +6 -0
- package/lib/stories/RemoteComponent/mock-server.js +24 -21
- package/lib/stories/RemoteComponent/remoteComponent.stories.js +2 -0
- package/lib/stories/RemoteComponent/source.json +101 -42
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +1 -1
- package/package.json +2 -1
|
@@ -21,18 +21,17 @@ var RETRY = 3;
|
|
|
21
21
|
* logique d'appel au service (sans auth)
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
var fetchFromServer = function fetchFromServer(remote
|
|
25
|
-
var retry = arguments.length >
|
|
26
|
-
var latency = arguments.length >
|
|
24
|
+
var fetchFromServer = function fetchFromServer(remote) {
|
|
25
|
+
var retry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : RETRY;
|
|
26
|
+
var latency = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : LATENCY;
|
|
27
27
|
return new Promise(function (resolve) {
|
|
28
28
|
fetch(remote, {
|
|
29
|
-
method: '
|
|
29
|
+
method: 'GET',
|
|
30
30
|
headers: {
|
|
31
31
|
'Content-Type': 'application/json'
|
|
32
|
-
}
|
|
33
|
-
body: JSON.stringify(values)
|
|
32
|
+
}
|
|
34
33
|
}).then(function (response) {
|
|
35
|
-
if (response.
|
|
34
|
+
if (response.status === 200) {
|
|
36
35
|
return response.json();
|
|
37
36
|
} else {
|
|
38
37
|
resolve({
|
|
@@ -44,7 +43,7 @@ var fetchFromServer = function fetchFromServer(remote, values) {
|
|
|
44
43
|
})["catch"](function () {
|
|
45
44
|
if (retry > 0) {
|
|
46
45
|
window.setTimeout(function () {
|
|
47
|
-
resolve(fetchFromServer(remote,
|
|
46
|
+
resolve(fetchFromServer(remote, retry - 1, latency));
|
|
48
47
|
}, latency);
|
|
49
48
|
} else {
|
|
50
49
|
resolve({
|
|
@@ -71,13 +70,15 @@ function RemoteComponent(props) {
|
|
|
71
70
|
_props$retry = props.retry,
|
|
72
71
|
retry = _props$retry === void 0 ? RETRY : _props$retry,
|
|
73
72
|
_props$latency = props.latency,
|
|
74
|
-
latency = _props$latency === void 0 ? LATENCY : _props$latency
|
|
73
|
+
latency = _props$latency === void 0 ? LATENCY : _props$latency,
|
|
74
|
+
_props$pendingMessage = props.pendingMessage,
|
|
75
|
+
pendingMessage = _props$pendingMessage === void 0 ? 'En attente...' : _props$pendingMessage;
|
|
75
76
|
var loading = (0, _react.useRef)(false);
|
|
76
77
|
var fetched = (0, _react.useRef)(false);
|
|
77
78
|
(0, _react.useEffect)(function () {
|
|
78
79
|
if (remote && !loading.current && !fetched.current) {
|
|
79
80
|
loading.current = true;
|
|
80
|
-
fetchFromServer(remote,
|
|
81
|
+
fetchFromServer(remote, retry, latency).then(function (response) {
|
|
81
82
|
fetched.current = true;
|
|
82
83
|
if (response) {
|
|
83
84
|
Object.entries(response).forEach(function (_ref) {
|
|
@@ -91,11 +92,7 @@ function RemoteComponent(props) {
|
|
|
91
92
|
}
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
|
-
}, [remote,
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* // TODO Gérer les component Set
|
|
98
|
-
*/
|
|
95
|
+
}, [remote, handleChange, retry, latency]);
|
|
99
96
|
if (fetched.current) {
|
|
100
97
|
if (components && components.length) {
|
|
101
98
|
return components.map(function (c, i) {
|
|
@@ -112,7 +109,7 @@ function RemoteComponent(props) {
|
|
|
112
109
|
children: "Nothing to display!"
|
|
113
110
|
});
|
|
114
111
|
}
|
|
115
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
116
|
-
children:
|
|
112
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
113
|
+
children: pendingMessage
|
|
117
114
|
});
|
|
118
115
|
}
|
|
@@ -279,11 +279,7 @@ type ComponentPropsByType = {
|
|
|
279
279
|
RemoteComponent: LunaticBaseProps<string | null> & {
|
|
280
280
|
components: LunaticComponentDefinition[];
|
|
281
281
|
remote: string;
|
|
282
|
-
|
|
283
|
-
responses: {
|
|
284
|
-
name: string;
|
|
285
|
-
};
|
|
286
|
-
}>;
|
|
282
|
+
pendingMessage: ReactNode;
|
|
287
283
|
value: Record<string, unknown>;
|
|
288
284
|
latency?: number;
|
|
289
285
|
retry?: number;
|
|
@@ -2,32 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
var express = require('express');
|
|
4
4
|
var cors = require('cors');
|
|
5
|
+
var parser = require('path-match')({
|
|
6
|
+
// path-to-regexp options
|
|
7
|
+
sensitive: false,
|
|
8
|
+
strict: false,
|
|
9
|
+
end: false
|
|
10
|
+
});
|
|
5
11
|
var bodyParser = require('body-parser');
|
|
6
12
|
var app = express();
|
|
7
13
|
var port = 4000;
|
|
14
|
+
var router = express.Router();
|
|
15
|
+
var match = parser('/api/recensement/adresse/departement/:DEP_CODE/commune/:COM_CODE');
|
|
16
|
+
router.use(function timeLog(req, res, next) {
|
|
17
|
+
console.log('Time: ', Date.now());
|
|
18
|
+
next();
|
|
19
|
+
});
|
|
8
20
|
app.use(cors());
|
|
9
21
|
app.use(bodyParser.json());
|
|
10
|
-
app.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
CPOST_LOC: '75012',
|
|
23
|
-
LIBELLE_COMMUNE: 'Paris',
|
|
24
|
-
RESPONSE: true
|
|
25
|
-
});
|
|
26
|
-
} else {
|
|
27
|
-
response.status(201).json({
|
|
28
|
-
RESPONSE: false
|
|
29
|
-
});
|
|
30
|
-
}
|
|
22
|
+
app.use('/', router);
|
|
23
|
+
router.get('/api/recensement/adresse/*', function (request, response) {
|
|
24
|
+
console.log(request.path);
|
|
25
|
+
var params = match(request.path);
|
|
26
|
+
console.log(request.originalUrl, params);
|
|
27
|
+
response.status(200).json({
|
|
28
|
+
"NUMVOI_LOC_SUGG": "14",
|
|
29
|
+
"BISTER_LOC_SUGG": null,
|
|
30
|
+
"TYPEVOI_LOC_SUGG": "rue",
|
|
31
|
+
"NOMVOI_LOC_SUGG": "de Picpus",
|
|
32
|
+
RESPONSE: true
|
|
33
|
+
});
|
|
31
34
|
});
|
|
32
35
|
app.listen(port, function () {
|
|
33
36
|
console.log("Test app listening at http://localhost:".concat(port));
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.Default = void 0;
|
|
7
7
|
var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
|
|
8
8
|
var _source = _interopRequireDefault(require("./source"));
|
|
9
|
+
var _data = _interopRequireDefault(require("./data"));
|
|
9
10
|
var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -36,5 +37,6 @@ var Default = exports.Default = Template.bind({});
|
|
|
36
37
|
Default.args = {
|
|
37
38
|
id: 'radio',
|
|
38
39
|
source: _source["default"],
|
|
40
|
+
data: _data["default"],
|
|
39
41
|
pagination: true
|
|
40
42
|
};
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
126
126
|
"page": "2",
|
|
127
127
|
"label": {
|
|
128
|
-
"value": "if RESPONSE = true then \"## Basé sur les rangs d'adresse que vous avez
|
|
128
|
+
"value": "if (RESPONSE = true and IDENTIFICATION_OK) then \"## Vous résidez dans la commune de \" || LIBELLE_COMMUNE|| \". Basé sur les rangs d'adresse que vous avez saisis, nous avons identifié cette adresse pour votre logement : \" else \" Quelle est l'adresse de votre logement ? \"",
|
|
129
129
|
"type": "VTL|MD"
|
|
130
130
|
},
|
|
131
131
|
"description": {
|
|
@@ -136,32 +136,33 @@
|
|
|
136
136
|
{
|
|
137
137
|
"id": "remote",
|
|
138
138
|
"componentType": "RemoteComponent",
|
|
139
|
-
"mandatory": false,
|
|
140
139
|
"retry": 6,
|
|
141
|
-
"latency":
|
|
142
|
-
"remote":
|
|
140
|
+
"latency": 1000,
|
|
141
|
+
"remote": {
|
|
142
|
+
"value": "\"http://localhost:4000/api/recensement/adresse/departement/\" || DEP_CODE || \"/commune/\" || COM_CODE || \"/zc/\" || ZC || \"/rang-l/\" || LOG_RANG || \"/rang-a/\" || ADR_RANG",
|
|
143
|
+
"type": "VTL"
|
|
144
|
+
},
|
|
143
145
|
"conditionFilter": {
|
|
144
|
-
"value": "
|
|
146
|
+
"value": "not(nvl(ZC, \"\") = \"\") and not(nvl(LOG_RANG, \"\") = \"\") and not(nvl(ADR_RANG, \"\") = \"\")",
|
|
145
147
|
"type": "VTL"
|
|
146
148
|
},
|
|
149
|
+
"pendingMessage": {
|
|
150
|
+
"value": "\"***Pour votre localisation dans la commune de\" || LIBELLE_COMMUNE || \", nous cherchons une adresse éventuelle, à vous suggérer.***\"",
|
|
151
|
+
"type": "VTL|MD"
|
|
152
|
+
},
|
|
147
153
|
"components": [
|
|
148
154
|
{
|
|
149
155
|
"id": "Subsequence",
|
|
150
156
|
"componentType": "Subsequence",
|
|
151
157
|
"label": {
|
|
152
158
|
"type": "VTL|MD",
|
|
153
|
-
"value": "\"## \" || VOI_CONCAT
|
|
159
|
+
"value": "\"## \" || VOI_CONCAT\n\n"
|
|
154
160
|
},
|
|
155
161
|
"conditionFilter": {
|
|
156
162
|
"value": "RESPONSE",
|
|
157
163
|
"type": "VTL"
|
|
158
164
|
}
|
|
159
165
|
}
|
|
160
|
-
],
|
|
161
|
-
"responses": [
|
|
162
|
-
{ "response": { "name": "ZC" } },
|
|
163
|
-
{ "response": { "name": "ADR_RANG" } },
|
|
164
|
-
{ "response": { "name": "LOG_RANG" } }
|
|
165
166
|
]
|
|
166
167
|
},
|
|
167
168
|
{
|
|
@@ -170,10 +171,13 @@
|
|
|
170
171
|
"mandatory": false,
|
|
171
172
|
"page": "2",
|
|
172
173
|
"label": {
|
|
173
|
-
"value": "\"###
|
|
174
|
+
"value": "\"### Cette adresse, pour votre logement, est-elle correcte ?\"",
|
|
174
175
|
"type": "VTL|MD"
|
|
175
176
|
},
|
|
176
|
-
"conditionFilter": {
|
|
177
|
+
"conditionFilter": {
|
|
178
|
+
"value": "RESPONSE = true and IDENTIFICATION_OK = true",
|
|
179
|
+
"type": "VTL"
|
|
180
|
+
},
|
|
177
181
|
"options": [
|
|
178
182
|
{
|
|
179
183
|
"value": "1",
|
|
@@ -192,7 +196,7 @@
|
|
|
192
196
|
"label": { "value": "\"non\"", "type": "VTL|MD" }
|
|
193
197
|
}
|
|
194
198
|
],
|
|
195
|
-
"response": { "name": "
|
|
199
|
+
"response": { "name": "ADR_SUGG_OK" }
|
|
196
200
|
},
|
|
197
201
|
{
|
|
198
202
|
"id": "num-voi-loc",
|
|
@@ -204,7 +208,7 @@
|
|
|
204
208
|
"description": { "value": "\"Exemple : 56\"", "type": "VTL" },
|
|
205
209
|
"maxLength": 80,
|
|
206
210
|
"conditionFilter": {
|
|
207
|
-
"value": "
|
|
211
|
+
"value": "ADR_SUGG_OK = \"2\" or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
208
212
|
"type": "VTL|MD"
|
|
209
213
|
},
|
|
210
214
|
"response": {
|
|
@@ -222,7 +226,7 @@
|
|
|
222
226
|
"maxLength": 80,
|
|
223
227
|
"controls": [],
|
|
224
228
|
"conditionFilter": {
|
|
225
|
-
"value": "
|
|
229
|
+
"value": "ADR_SUGG_OK = \"2\" or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
226
230
|
"type": "VTL"
|
|
227
231
|
},
|
|
228
232
|
"response": {
|
|
@@ -240,7 +244,7 @@
|
|
|
240
244
|
"maxLength": 80,
|
|
241
245
|
"controls": [],
|
|
242
246
|
"conditionFilter": {
|
|
243
|
-
"value": "
|
|
247
|
+
"value": "ADR_SUGG_OK = \"2\" or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
244
248
|
"type": "VTL"
|
|
245
249
|
},
|
|
246
250
|
"response": {
|
|
@@ -261,7 +265,7 @@
|
|
|
261
265
|
"maxLength": 80,
|
|
262
266
|
"controls": [],
|
|
263
267
|
"conditionFilter": {
|
|
264
|
-
"value": "
|
|
268
|
+
"value": "ADR_SUGG_OK = \"2\" or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
265
269
|
"type": "VTL"
|
|
266
270
|
},
|
|
267
271
|
"response": {
|
|
@@ -279,7 +283,7 @@
|
|
|
279
283
|
"maxLength": 80,
|
|
280
284
|
"controls": [],
|
|
281
285
|
"conditionFilter": {
|
|
282
|
-
"value": "
|
|
286
|
+
"value": "ADR_SUGG_OK = \"2\" or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
283
287
|
"type": "VTL"
|
|
284
288
|
},
|
|
285
289
|
"response": {
|
|
@@ -301,7 +305,7 @@
|
|
|
301
305
|
"maxLength": 80,
|
|
302
306
|
"controls": [],
|
|
303
307
|
"conditionFilter": {
|
|
304
|
-
"value": "
|
|
308
|
+
"value": "ADR_SUGG_OK = \"2\" or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
305
309
|
"type": "VTL"
|
|
306
310
|
},
|
|
307
311
|
"response": {
|
|
@@ -312,7 +316,7 @@
|
|
|
312
316
|
"id": "component-set-complements-adresse",
|
|
313
317
|
"componentType": "ComponentSet",
|
|
314
318
|
"conditionFilter": {
|
|
315
|
-
"value": "
|
|
319
|
+
"value": "(ADR_SUGG_OK = \"1\" or ADR_SUGG_OK = \"2\") or RESPONSE = false or IDENTIFICATION_OK = false",
|
|
316
320
|
"type": "VTL"
|
|
317
321
|
},
|
|
318
322
|
"page": "2",
|
|
@@ -375,7 +379,7 @@
|
|
|
375
379
|
"type": "VTL"
|
|
376
380
|
},
|
|
377
381
|
"description": {
|
|
378
|
-
"value": "Exemple : A",
|
|
382
|
+
"value": "\"Exemple : A\"",
|
|
379
383
|
"type": "VTL"
|
|
380
384
|
},
|
|
381
385
|
"maxLength": 80,
|
|
@@ -451,12 +455,23 @@
|
|
|
451
455
|
}
|
|
452
456
|
],
|
|
453
457
|
"variables": [
|
|
458
|
+
{ "variableType": "EXTERNAL", "name": "DEP_CODE", "value": null },
|
|
459
|
+
{ "variableType": "EXTERNAL", "name": "COM_CODE", "value": null },
|
|
460
|
+
{ "variableType": "EXTERNAL", "name": "LIBELLE_COMMUNE", "value": null },
|
|
461
|
+
|
|
462
|
+
{ "variableType": "EXTERNAL", "name": "NUMVOI_LOC_SUGG", "value": null },
|
|
463
|
+
{ "variableType": "EXTERNAL", "name": "BISTER_LOC_SUGG", "value": null },
|
|
464
|
+
{ "variableType": "EXTERNAL", "name": "TYPEVOI_LOC_SUGG", "value": null },
|
|
465
|
+
{ "variableType": "EXTERNAL", "name": "NOMVOI_LOC_SUGG", "value": null },
|
|
466
|
+
|
|
467
|
+
{ "variableType": "EXTERNAL", "name": "RESPONSE", "value": null },
|
|
468
|
+
|
|
454
469
|
{
|
|
455
470
|
"variableType": "COLLECTED",
|
|
456
471
|
"name": "ADR_RANG",
|
|
457
472
|
"values": {
|
|
458
473
|
"PREVIOUS": null,
|
|
459
|
-
"COLLECTED":
|
|
474
|
+
"COLLECTED": "AAA",
|
|
460
475
|
"FORCED": null,
|
|
461
476
|
"EDITED": null,
|
|
462
477
|
"INPUTTED": null
|
|
@@ -467,7 +482,7 @@
|
|
|
467
482
|
"name": "LOG_RANG",
|
|
468
483
|
"values": {
|
|
469
484
|
"PREVIOUS": null,
|
|
470
|
-
"COLLECTED":
|
|
485
|
+
"COLLECTED": "AAA",
|
|
471
486
|
"FORCED": null,
|
|
472
487
|
"EDITED": null,
|
|
473
488
|
"INPUTTED": null
|
|
@@ -478,7 +493,7 @@
|
|
|
478
493
|
"name": "ZC",
|
|
479
494
|
"values": {
|
|
480
495
|
"PREVIOUS": null,
|
|
481
|
-
"COLLECTED":
|
|
496
|
+
"COLLECTED": "AAAA",
|
|
482
497
|
"FORCED": null,
|
|
483
498
|
"EDITED": null,
|
|
484
499
|
"INPUTTED": null
|
|
@@ -495,6 +510,17 @@
|
|
|
495
510
|
"INPUTTED": null
|
|
496
511
|
}
|
|
497
512
|
},
|
|
513
|
+
{
|
|
514
|
+
"variableType": "COLLECTED",
|
|
515
|
+
"name": "NUMVOI_LOC_SUGG",
|
|
516
|
+
"values": {
|
|
517
|
+
"PREVIOUS": null,
|
|
518
|
+
"COLLECTED": null,
|
|
519
|
+
"FORCED": null,
|
|
520
|
+
"EDITED": null,
|
|
521
|
+
"INPUTTED": null
|
|
522
|
+
}
|
|
523
|
+
},
|
|
498
524
|
{
|
|
499
525
|
"variableType": "COLLECTED",
|
|
500
526
|
"name": "BISTER_LOC",
|
|
@@ -506,6 +532,17 @@
|
|
|
506
532
|
"INPUTTED": null
|
|
507
533
|
}
|
|
508
534
|
},
|
|
535
|
+
{
|
|
536
|
+
"variableType": "COLLECTED",
|
|
537
|
+
"name": "BISTER_LOC_SUGG",
|
|
538
|
+
"values": {
|
|
539
|
+
"PREVIOUS": null,
|
|
540
|
+
"COLLECTED": null,
|
|
541
|
+
"FORCED": null,
|
|
542
|
+
"EDITED": null,
|
|
543
|
+
"INPUTTED": null
|
|
544
|
+
}
|
|
545
|
+
},
|
|
509
546
|
{
|
|
510
547
|
"variableType": "COLLECTED",
|
|
511
548
|
"name": "TYPEVOI_LOC",
|
|
@@ -519,7 +556,7 @@
|
|
|
519
556
|
},
|
|
520
557
|
{
|
|
521
558
|
"variableType": "COLLECTED",
|
|
522
|
-
"name": "
|
|
559
|
+
"name": "TYPEVOI_LOC_SUGG",
|
|
523
560
|
"values": {
|
|
524
561
|
"PREVIOUS": null,
|
|
525
562
|
"COLLECTED": null,
|
|
@@ -530,7 +567,7 @@
|
|
|
530
567
|
},
|
|
531
568
|
{
|
|
532
569
|
"variableType": "COLLECTED",
|
|
533
|
-
"name": "
|
|
570
|
+
"name": "NOMVOI_LOC",
|
|
534
571
|
"values": {
|
|
535
572
|
"PREVIOUS": null,
|
|
536
573
|
"COLLECTED": null,
|
|
@@ -541,7 +578,7 @@
|
|
|
541
578
|
},
|
|
542
579
|
{
|
|
543
580
|
"variableType": "COLLECTED",
|
|
544
|
-
"name": "
|
|
581
|
+
"name": "NOMVOI_LOC_SUGG",
|
|
545
582
|
"values": {
|
|
546
583
|
"PREVIOUS": null,
|
|
547
584
|
"COLLECTED": null,
|
|
@@ -564,6 +601,17 @@
|
|
|
564
601
|
{
|
|
565
602
|
"variableType": "COLLECTED",
|
|
566
603
|
"name": "LIBELLE_COMMUNE",
|
|
604
|
+
"values": {
|
|
605
|
+
"PREVIOUS": null,
|
|
606
|
+
"COLLECTED": "Paris(12)",
|
|
607
|
+
"FORCED": null,
|
|
608
|
+
"EDITED": null,
|
|
609
|
+
"INPUTTED": null
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"variableType": "COLLECTED",
|
|
614
|
+
"name": "LIBELLE_COMMUNE_SUGG",
|
|
567
615
|
"values": {
|
|
568
616
|
"PREVIOUS": null,
|
|
569
617
|
"COLLECTED": null,
|
|
@@ -574,7 +622,7 @@
|
|
|
574
622
|
},
|
|
575
623
|
{
|
|
576
624
|
"variableType": "COLLECTED",
|
|
577
|
-
"name": "
|
|
625
|
+
"name": "RES_LOC",
|
|
578
626
|
"values": {
|
|
579
627
|
"PREVIOUS": null,
|
|
580
628
|
"COLLECTED": null,
|
|
@@ -585,7 +633,7 @@
|
|
|
585
633
|
},
|
|
586
634
|
{
|
|
587
635
|
"variableType": "COLLECTED",
|
|
588
|
-
"name": "
|
|
636
|
+
"name": "BAT_LOC",
|
|
589
637
|
"values": {
|
|
590
638
|
"PREVIOUS": null,
|
|
591
639
|
"COLLECTED": null,
|
|
@@ -596,7 +644,7 @@
|
|
|
596
644
|
},
|
|
597
645
|
{
|
|
598
646
|
"variableType": "COLLECTED",
|
|
599
|
-
"name": "
|
|
647
|
+
"name": "ESC_LOC",
|
|
600
648
|
"values": {
|
|
601
649
|
"PREVIOUS": null,
|
|
602
650
|
"COLLECTED": null,
|
|
@@ -607,10 +655,21 @@
|
|
|
607
655
|
},
|
|
608
656
|
{
|
|
609
657
|
"variableType": "COLLECTED",
|
|
610
|
-
"name": "
|
|
658
|
+
"name": "ETAGE_LOC",
|
|
611
659
|
"values": {
|
|
612
660
|
"PREVIOUS": null,
|
|
613
|
-
"COLLECTED":
|
|
661
|
+
"COLLECTED": null,
|
|
662
|
+
"FORCED": null,
|
|
663
|
+
"EDITED": null,
|
|
664
|
+
"INPUTTED": null
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"variableType": "COLLECTED",
|
|
669
|
+
"name": "N_PORTE_LOC",
|
|
670
|
+
"values": {
|
|
671
|
+
"PREVIOUS": null,
|
|
672
|
+
"COLLECTED": null,
|
|
614
673
|
"FORCED": null,
|
|
615
674
|
"EDITED": null,
|
|
616
675
|
"INPUTTED": null
|
|
@@ -618,7 +677,7 @@
|
|
|
618
677
|
},
|
|
619
678
|
{
|
|
620
679
|
"variableType": "COLLECTED",
|
|
621
|
-
"name": "
|
|
680
|
+
"name": "ADR_SUGG_OK",
|
|
622
681
|
"values": {
|
|
623
682
|
"PREVIOUS": null,
|
|
624
683
|
"COLLECTED": null,
|
|
@@ -642,25 +701,25 @@
|
|
|
642
701
|
"variableType": "CALCULATED",
|
|
643
702
|
"name": "VOI_CONCAT",
|
|
644
703
|
"expression": {
|
|
645
|
-
"value": "(if (isnull(
|
|
704
|
+
"value": "(if (isnull(NUMVOI_LOC_SUGG)) then \"\" else (NUMVOI_LOC_SUGG || \" \")) || (if (isnull(BISTER_LOC_SUGG)) then \"\" else (BISTER_LOC_SUGG || \" \")) || (if (isnull(TYPEVOI_LOC_SUGG)) then \"\" else (TYPEVOI_LOC_SUGG || \" \")) || (if (isnull(NOMVOI_LOC_SUGG)) then \"\" else (NOMVOI_LOC_SUGG || \" \"))",
|
|
646
705
|
"type": "VTL"
|
|
647
706
|
},
|
|
648
707
|
"bindingDependencies": [
|
|
649
|
-
"
|
|
650
|
-
"
|
|
651
|
-
"
|
|
652
|
-
"
|
|
708
|
+
"NUMVOI_LOC_SUGG",
|
|
709
|
+
"BISTER_LOC_SUGG",
|
|
710
|
+
"TYPEVOI_LOC_SUGG",
|
|
711
|
+
"NOMVOI_LOC_SUGG"
|
|
653
712
|
],
|
|
654
713
|
"inFilter": "false"
|
|
655
714
|
},
|
|
656
715
|
{
|
|
657
716
|
"variableType": "CALCULATED",
|
|
658
|
-
"name": "
|
|
717
|
+
"name": "IDENTIFICATION_OK",
|
|
659
718
|
"expression": {
|
|
660
|
-
"value": "(
|
|
719
|
+
"value": "not(nvl(ZC, \"\") = \"\") and not(nvl(LOG_RANG, \"\") = \"\") and not(nvl(ADR_RANG, \"\") = \"\")",
|
|
661
720
|
"type": "VTL"
|
|
662
721
|
},
|
|
663
|
-
"bindingDependencies": ["
|
|
722
|
+
"bindingDependencies": ["ZC", "LOG_RANG", "ADR_RANG"],
|
|
664
723
|
"inFilter": "false"
|
|
665
724
|
}
|
|
666
725
|
]
|
|
@@ -24,7 +24,7 @@ var VTL_ATTRIBUTES = ['label', 'options.label', 'responses.label', 'hierarchy.la
|
|
|
24
24
|
// Disable controls compilation
|
|
25
25
|
// 'controls.control',
|
|
26
26
|
// 'controls.errorMessage',
|
|
27
|
-
'controls.iterations', 'lines.min', 'lines.max', 'iterations', 'xAxisIterations', 'yAxisIterations', 'conditionFilter', 'headers.label', 'header.label', 'disabled', 'readOnly'];
|
|
27
|
+
'remote', 'pendingMessage', 'controls.iterations', 'lines.min', 'lines.max', 'iterations', 'xAxisIterations', 'yAxisIterations', 'conditionFilter', 'headers.label', 'header.label', 'disabled', 'readOnly'];
|
|
28
28
|
|
|
29
29
|
// Utility type to replace all expression from an object into a translated version
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inseefr/lunatic",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.12",
|
|
4
4
|
"workersVersion": "0.3.0-experimental",
|
|
5
5
|
"description": "Library of questionnaire components",
|
|
6
6
|
"repository": {
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
"jest": "^29.4.3",
|
|
147
147
|
"jsdom": "^21.1.0",
|
|
148
148
|
"jsdom-global": "^3.0.2",
|
|
149
|
+
"path-match": "^1.2.4",
|
|
149
150
|
"postcss": "^8.2.6",
|
|
150
151
|
"postcss-scss": "^3.0.4",
|
|
151
152
|
"prettier": "^2.0.5",
|