@inseefr/lunatic 2.4.10 → 2.5.0-fast-forward
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/commons/components/orchestrated-component.js +10 -30
- package/lib/components/commons/create-row-orchestrator.js +7 -2
- package/lib/components/component-set/html/component-set-components.js +16 -25
- package/lib/components/component-set/lunatic-component-set.js +23 -37
- package/lib/components/index.js +14 -0
- package/lib/components/loop/block-for-loop/block-for-loop.js +4 -2
- package/lib/components/loop/block-for-loop/row.js +4 -2
- package/lib/components/loop/loop.js +6 -3
- package/lib/components/loop/roster-for-loop/body.js +4 -2
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +2 -0
- package/lib/components/loop/roster-for-loop/roster-table.js +4 -2
- package/lib/components/loop/roster-for-loop/row.js +3 -1
- package/lib/components/question-explication/html/question-explication.js +53 -0
- package/lib/components/question-explication/html/question-explication.scss +35 -0
- package/lib/components/question-explication/index.js +13 -0
- package/lib/components/question-explication/lunatic-question-explication.js +32 -0
- package/lib/components/question-explication/question-explication.spec.js +49 -0
- package/lib/components/roundabout/lunatic-roundabout.js +2 -4
- package/lib/components/subsequence/subsequence.js +0 -2
- package/lib/components/subsequence/subsequence.spec.js +2 -2
- package/lib/components/summary/html/summary-container.js +14 -0
- package/lib/components/summary/html/summary-responses.js +53 -0
- package/lib/components/summary/html/summary-title.js +20 -0
- package/lib/components/summary/index.js +12 -0
- package/lib/components/summary/lunatic-summary.js +99 -0
- package/lib/src/components/commons/components/orchestrated-component.d.ts +4 -5
- package/lib/src/components/commons/create-row-orchestrator.d.ts +3 -2
- package/lib/src/components/component-set/html/component-set-components.d.ts +2 -2
- package/lib/src/components/component-set/lunatic-component-set.d.ts +2 -1
- package/lib/src/components/index.d.ts +2 -0
- package/lib/src/components/loop/block-for-loop/block-for-loop-ochestrator.d.ts +3 -2
- package/lib/src/components/loop/block-for-loop/row.d.ts +2 -1
- package/lib/src/components/loop/roster-for-loop/body.d.ts +2 -2
- package/lib/src/components/loop/roster-for-loop/roster-for-loop-orchestrator.d.ts +3 -2
- package/lib/src/components/loop/roster-for-loop/roster-table.d.ts +2 -2
- package/lib/src/components/loop/roster-for-loop/row.d.ts +2 -1
- package/lib/src/components/question-explication/html/question-explication.d.ts +7 -0
- package/lib/src/components/question-explication/index.d.ts +1 -0
- package/lib/src/components/question-explication/lunatic-question-explication.d.ts +3 -0
- package/lib/src/components/question-explication/question-explication.spec.d.ts +1 -0
- package/lib/src/components/subsequence/subsequence.d.ts +2 -2
- package/lib/src/components/summary/html/summary-container.d.ts +2 -0
- package/lib/src/components/summary/html/summary-responses.d.ts +12 -0
- package/lib/src/components/summary/html/summary-title.d.ts +5 -0
- package/lib/src/components/summary/index.d.ts +1 -0
- package/lib/src/components/summary/lunatic-summary.d.ts +7 -0
- package/lib/src/components/type.d.ts +18 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/use-lunatic/actions.d.ts +8 -169
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +137 -112
- package/lib/src/use-lunatic/commons/fill-components/fill-missing-response.d.ts +2 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +115 -94
- package/lib/src/use-lunatic/commons/page-navigation.d.ts +7 -0
- package/lib/src/use-lunatic/commons/page-navigation.spec.d.ts +1 -0
- package/lib/src/use-lunatic/commons/page.d.ts +11 -0
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/reducer/commons/auto-explore-loop.d.ts +5 -0
- package/lib/src/use-lunatic/reducer/commons/index.d.ts +0 -1
- package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -2
- package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +1 -7
- package/lib/src/use-lunatic/reducer/reduce-on-init.d.ts +1 -1
- package/lib/src/use-lunatic/replace-component-sequence.d.ts +3 -3
- package/lib/src/use-lunatic/type-source.d.ts +27 -13
- package/lib/src/use-lunatic/type.d.ts +4 -12
- package/lib/src/use-lunatic/use-lunatic.d.ts +475 -10
- package/lib/src/utils/store-tools/worker-path.d.ts +1 -0
- package/lib/stories/component-set/component-set.stories.js +2 -1
- package/lib/stories/loop/block-for-loop.stories.js +8 -1
- package/lib/stories/loop/roster-for-loop.stories.js +92 -2
- package/lib/{use-lunatic/reducer/reduce-roundabout.js → stories/question-explication/question-explication.stories.js} +21 -17
- package/lib/stories/question-explication/source.json +17 -0
- package/lib/stories/roundabout/roundabout.stories.js +2 -1
- package/lib/stories/suggester/source-component-set.json +67 -0
- package/lib/stories/suggester/suggester.stories.js +9 -1
- package/lib/stories/summary/data.json +32 -0
- package/lib/stories/summary/source.json +353 -0
- package/lib/stories/summary/summary.stories.js +37 -0
- package/lib/stories/utils/orchestrator.js +21 -6
- package/lib/use-lunatic/commons/check-pager.js +1 -2
- package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +14 -12
- package/lib/use-lunatic/commons/page-navigation.js +109 -0
- package/lib/use-lunatic/commons/page-navigation.spec.js +129 -0
- package/lib/use-lunatic/commons/page.js +44 -0
- package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +37 -0
- package/lib/use-lunatic/reducer/commons/index.js +0 -8
- package/lib/use-lunatic/reducer/reduce-go-next-page.js +25 -159
- package/lib/use-lunatic/reducer/reduce-go-previous-page.js +21 -127
- package/lib/use-lunatic/reducer/reduce-go-to-page.js +51 -55
- package/lib/use-lunatic/reducer/reduce-on-init.js +8 -10
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-roundabout-control.js +1 -1
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.js +1 -1
- package/lib/use-lunatic/type-source.js +0 -2
- package/lib/use-lunatic/use-lunatic.js +22 -4
- package/lib/use-lunatic/use-lunatic.test.js +9 -7
- package/lib/utils/store-tools/auto-load.js +2 -2
- package/lib/utils/store-tools/worker-path.js +13 -0
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +2 -2
- package/package.json +3 -4
- package/lib/components/button/__snapshots__/lunatic-button.spec.jsx.snap +0 -80
- package/lib/components/commons/components/combo-box/selection/__snapshots__/selection.spec.jsx.snap +0 -81
- package/lib/src/use-lunatic/reducer/commons/is-empty-on-empty-page.d.ts +0 -3
- package/lib/src/use-lunatic/reducer/reduce-roundabout.d.ts +0 -2
- package/lib/use-lunatic/reducer/commons/is-empty-on-empty-page.js +0 -32
|
@@ -3,12 +3,11 @@ import { LunaticComponentDefinition, LunaticState } from '../../type';
|
|
|
3
3
|
import { DeepTranslateExpression } from './fill-component-expressions';
|
|
4
4
|
declare function fillSpecificExpressions(component: DeepTranslateExpression<LunaticComponentDefinition>, state: LunaticState): {
|
|
5
5
|
label: import("react").ReactNode;
|
|
6
|
-
declarations
|
|
6
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
7
7
|
conditionFilter: import("react").ReactNode;
|
|
8
8
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
9
9
|
id: string;
|
|
10
|
-
|
|
11
|
-
bindingDependencies: string[];
|
|
10
|
+
bindingDependencies?: string[] | undefined;
|
|
12
11
|
hierarchy: {
|
|
13
12
|
sequence: {
|
|
14
13
|
label: import("react").ReactNode;
|
|
@@ -21,20 +20,16 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
21
20
|
page: string;
|
|
22
21
|
} | undefined;
|
|
23
22
|
};
|
|
24
|
-
missingResponse: {
|
|
25
|
-
name: string;
|
|
26
|
-
};
|
|
27
23
|
mandatory?: boolean | undefined;
|
|
28
24
|
page: string;
|
|
29
25
|
componentType: "Sequence";
|
|
30
26
|
} | {
|
|
31
27
|
label: import("react").ReactNode;
|
|
32
|
-
declarations
|
|
28
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
33
29
|
conditionFilter: import("react").ReactNode;
|
|
34
30
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
35
31
|
id: string;
|
|
36
|
-
|
|
37
|
-
bindingDependencies: string[];
|
|
32
|
+
bindingDependencies?: string[] | undefined;
|
|
38
33
|
hierarchy: {
|
|
39
34
|
sequence: {
|
|
40
35
|
label: import("react").ReactNode;
|
|
@@ -47,21 +42,17 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
47
42
|
page: string;
|
|
48
43
|
} | undefined;
|
|
49
44
|
};
|
|
50
|
-
missingResponse: {
|
|
51
|
-
name: string;
|
|
52
|
-
};
|
|
53
45
|
mandatory?: boolean | undefined;
|
|
54
46
|
page: string;
|
|
55
47
|
componentType: "Subsequence";
|
|
56
48
|
gotoPage: string;
|
|
57
49
|
} | {
|
|
58
50
|
label: import("react").ReactNode;
|
|
59
|
-
declarations
|
|
51
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
60
52
|
conditionFilter: import("react").ReactNode;
|
|
61
53
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
62
54
|
id: string;
|
|
63
|
-
|
|
64
|
-
bindingDependencies: string[];
|
|
55
|
+
bindingDependencies?: string[] | undefined;
|
|
65
56
|
hierarchy: {
|
|
66
57
|
sequence: {
|
|
67
58
|
label: import("react").ReactNode;
|
|
@@ -74,9 +65,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
74
65
|
page: string;
|
|
75
66
|
} | undefined;
|
|
76
67
|
};
|
|
77
|
-
missingResponse: {
|
|
78
|
-
name: string;
|
|
79
|
-
};
|
|
80
68
|
mandatory?: boolean | undefined;
|
|
81
69
|
page: string;
|
|
82
70
|
componentType: "RosterForLoop";
|
|
@@ -119,12 +107,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
119
107
|
positioning: "HORIZONTAL";
|
|
120
108
|
} | {
|
|
121
109
|
label: import("react").ReactNode;
|
|
122
|
-
declarations
|
|
110
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
123
111
|
conditionFilter: import("react").ReactNode;
|
|
124
112
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
125
113
|
id: string;
|
|
126
|
-
|
|
127
|
-
bindingDependencies: string[];
|
|
114
|
+
bindingDependencies?: string[] | undefined;
|
|
128
115
|
hierarchy: {
|
|
129
116
|
sequence: {
|
|
130
117
|
label: import("react").ReactNode;
|
|
@@ -137,9 +124,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
137
124
|
page: string;
|
|
138
125
|
} | undefined;
|
|
139
126
|
};
|
|
140
|
-
missingResponse: {
|
|
141
|
-
name: string;
|
|
142
|
-
};
|
|
143
127
|
mandatory?: boolean | undefined;
|
|
144
128
|
page: string;
|
|
145
129
|
componentType: "Loop";
|
|
@@ -155,12 +139,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
155
139
|
paginatedLoop: boolean;
|
|
156
140
|
} | {
|
|
157
141
|
label: import("react").ReactNode;
|
|
158
|
-
declarations
|
|
142
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
159
143
|
conditionFilter: import("react").ReactNode;
|
|
160
144
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
161
145
|
id: string;
|
|
162
|
-
|
|
163
|
-
bindingDependencies: string[];
|
|
146
|
+
bindingDependencies?: string[] | undefined;
|
|
164
147
|
hierarchy: {
|
|
165
148
|
sequence: {
|
|
166
149
|
label: import("react").ReactNode;
|
|
@@ -173,9 +156,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
173
156
|
page: string;
|
|
174
157
|
} | undefined;
|
|
175
158
|
};
|
|
176
|
-
missingResponse: {
|
|
177
|
-
name: string;
|
|
178
|
-
};
|
|
179
159
|
mandatory?: boolean | undefined;
|
|
180
160
|
page: string;
|
|
181
161
|
componentType: "Table";
|
|
@@ -217,12 +197,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
217
197
|
positioning: "HORIZONTAL";
|
|
218
198
|
} | {
|
|
219
199
|
label: import("react").ReactNode;
|
|
220
|
-
declarations
|
|
200
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
221
201
|
conditionFilter: import("react").ReactNode;
|
|
222
202
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
223
203
|
id: string;
|
|
224
|
-
|
|
225
|
-
bindingDependencies: string[];
|
|
204
|
+
bindingDependencies?: string[] | undefined;
|
|
226
205
|
hierarchy: {
|
|
227
206
|
sequence: {
|
|
228
207
|
label: import("react").ReactNode;
|
|
@@ -235,9 +214,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
235
214
|
page: string;
|
|
236
215
|
} | undefined;
|
|
237
216
|
};
|
|
238
|
-
missingResponse: {
|
|
239
|
-
name: string;
|
|
240
|
-
};
|
|
241
217
|
mandatory?: boolean | undefined;
|
|
242
218
|
page: string;
|
|
243
219
|
componentType: "InputNumber";
|
|
@@ -250,12 +226,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
250
226
|
decimals?: number | undefined;
|
|
251
227
|
} | {
|
|
252
228
|
label: import("react").ReactNode;
|
|
253
|
-
declarations
|
|
229
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
254
230
|
conditionFilter: import("react").ReactNode;
|
|
255
231
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
256
232
|
id: string;
|
|
257
|
-
|
|
258
|
-
bindingDependencies: string[];
|
|
233
|
+
bindingDependencies?: string[] | undefined;
|
|
259
234
|
hierarchy: {
|
|
260
235
|
sequence: {
|
|
261
236
|
label: import("react").ReactNode;
|
|
@@ -268,9 +243,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
268
243
|
page: string;
|
|
269
244
|
} | undefined;
|
|
270
245
|
};
|
|
271
|
-
missingResponse: {
|
|
272
|
-
name: string;
|
|
273
|
-
};
|
|
274
246
|
mandatory?: boolean | undefined;
|
|
275
247
|
page: string;
|
|
276
248
|
componentType: "Datepicker";
|
|
@@ -282,12 +254,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
282
254
|
max?: string | undefined;
|
|
283
255
|
} | {
|
|
284
256
|
label: import("react").ReactNode;
|
|
285
|
-
declarations
|
|
257
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
286
258
|
conditionFilter: import("react").ReactNode;
|
|
287
259
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
288
260
|
id: string;
|
|
289
|
-
|
|
290
|
-
bindingDependencies: string[];
|
|
261
|
+
bindingDependencies?: string[] | undefined;
|
|
291
262
|
hierarchy: {
|
|
292
263
|
sequence: {
|
|
293
264
|
label: import("react").ReactNode;
|
|
@@ -300,9 +271,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
300
271
|
page: string;
|
|
301
272
|
} | undefined;
|
|
302
273
|
};
|
|
303
|
-
missingResponse: {
|
|
304
|
-
name: string;
|
|
305
|
-
};
|
|
306
274
|
mandatory?: boolean | undefined;
|
|
307
275
|
page: string;
|
|
308
276
|
componentType: "CheckboxGroup";
|
|
@@ -313,12 +281,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
313
281
|
}[];
|
|
314
282
|
} | {
|
|
315
283
|
label: import("react").ReactNode;
|
|
316
|
-
declarations
|
|
284
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
317
285
|
conditionFilter: import("react").ReactNode;
|
|
318
286
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
319
287
|
id: string;
|
|
320
|
-
|
|
321
|
-
bindingDependencies: string[];
|
|
288
|
+
bindingDependencies?: string[] | undefined;
|
|
322
289
|
hierarchy: {
|
|
323
290
|
sequence: {
|
|
324
291
|
label: import("react").ReactNode;
|
|
@@ -331,23 +298,22 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
331
298
|
page: string;
|
|
332
299
|
} | undefined;
|
|
333
300
|
};
|
|
334
|
-
missingResponse: {
|
|
335
|
-
name: string;
|
|
336
|
-
};
|
|
337
301
|
mandatory?: boolean | undefined;
|
|
338
302
|
page: string;
|
|
339
303
|
componentType: "CheckboxBoolean";
|
|
340
304
|
response: {
|
|
341
305
|
name: string;
|
|
342
306
|
};
|
|
307
|
+
missingResponse?: {
|
|
308
|
+
name: string;
|
|
309
|
+
} | undefined;
|
|
343
310
|
} | {
|
|
344
311
|
label: import("react").ReactNode;
|
|
345
|
-
declarations
|
|
312
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
346
313
|
conditionFilter: import("react").ReactNode;
|
|
347
314
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
348
315
|
id: string;
|
|
349
|
-
|
|
350
|
-
bindingDependencies: string[];
|
|
316
|
+
bindingDependencies?: string[] | undefined;
|
|
351
317
|
hierarchy: {
|
|
352
318
|
sequence: {
|
|
353
319
|
label: import("react").ReactNode;
|
|
@@ -360,9 +326,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
360
326
|
page: string;
|
|
361
327
|
} | undefined;
|
|
362
328
|
};
|
|
363
|
-
missingResponse: {
|
|
364
|
-
name: string;
|
|
365
|
-
};
|
|
366
329
|
mandatory?: boolean | undefined;
|
|
367
330
|
page: string;
|
|
368
331
|
componentType: "Radio";
|
|
@@ -373,14 +336,16 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
373
336
|
response: {
|
|
374
337
|
name: string;
|
|
375
338
|
};
|
|
339
|
+
missingResponse?: {
|
|
340
|
+
name: string;
|
|
341
|
+
} | undefined;
|
|
376
342
|
} | {
|
|
377
343
|
label: import("react").ReactNode;
|
|
378
|
-
declarations
|
|
344
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
379
345
|
conditionFilter: import("react").ReactNode;
|
|
380
346
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
381
347
|
id: string;
|
|
382
|
-
|
|
383
|
-
bindingDependencies: string[];
|
|
348
|
+
bindingDependencies?: string[] | undefined;
|
|
384
349
|
hierarchy: {
|
|
385
350
|
sequence: {
|
|
386
351
|
label: import("react").ReactNode;
|
|
@@ -393,21 +358,17 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
393
358
|
page: string;
|
|
394
359
|
} | undefined;
|
|
395
360
|
};
|
|
396
|
-
missingResponse: {
|
|
397
|
-
name: string;
|
|
398
|
-
};
|
|
399
361
|
mandatory?: boolean | undefined;
|
|
400
362
|
page: string;
|
|
401
363
|
componentType: "FilterDescription";
|
|
402
364
|
filterDescription: boolean;
|
|
403
365
|
} | {
|
|
404
366
|
label: import("react").ReactNode;
|
|
405
|
-
declarations
|
|
367
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
406
368
|
conditionFilter: import("react").ReactNode;
|
|
407
369
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
408
370
|
id: string;
|
|
409
|
-
|
|
410
|
-
bindingDependencies: string[];
|
|
371
|
+
bindingDependencies?: string[] | undefined;
|
|
411
372
|
hierarchy: {
|
|
412
373
|
sequence: {
|
|
413
374
|
label: import("react").ReactNode;
|
|
@@ -420,9 +381,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
420
381
|
page: string;
|
|
421
382
|
} | undefined;
|
|
422
383
|
};
|
|
423
|
-
missingResponse: {
|
|
424
|
-
name: string;
|
|
425
|
-
};
|
|
426
384
|
mandatory?: boolean | undefined;
|
|
427
385
|
page: string;
|
|
428
386
|
componentType: "Dropdown";
|
|
@@ -433,14 +391,16 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
433
391
|
response: {
|
|
434
392
|
name: string;
|
|
435
393
|
};
|
|
394
|
+
missingResponse?: {
|
|
395
|
+
name: string;
|
|
396
|
+
} | undefined;
|
|
436
397
|
} | {
|
|
437
398
|
label: import("react").ReactNode;
|
|
438
|
-
declarations
|
|
399
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
439
400
|
conditionFilter: import("react").ReactNode;
|
|
440
401
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
441
402
|
id: string;
|
|
442
|
-
|
|
443
|
-
bindingDependencies: string[];
|
|
403
|
+
bindingDependencies?: string[] | undefined;
|
|
444
404
|
hierarchy: {
|
|
445
405
|
sequence: {
|
|
446
406
|
label: import("react").ReactNode;
|
|
@@ -453,9 +413,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
453
413
|
page: string;
|
|
454
414
|
} | undefined;
|
|
455
415
|
};
|
|
456
|
-
missingResponse: {
|
|
457
|
-
name: string;
|
|
458
|
-
};
|
|
459
416
|
mandatory?: boolean | undefined;
|
|
460
417
|
page: string;
|
|
461
418
|
componentType: "PairwiseLinks";
|
|
@@ -468,12 +425,34 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
468
425
|
};
|
|
469
426
|
} | {
|
|
470
427
|
label: import("react").ReactNode;
|
|
471
|
-
declarations
|
|
428
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
472
429
|
conditionFilter: import("react").ReactNode;
|
|
473
430
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
474
431
|
id: string;
|
|
432
|
+
bindingDependencies?: string[] | undefined;
|
|
433
|
+
hierarchy: {
|
|
434
|
+
sequence: {
|
|
435
|
+
label: import("react").ReactNode;
|
|
436
|
+
id: string;
|
|
437
|
+
page: string;
|
|
438
|
+
};
|
|
439
|
+
subSequence?: {
|
|
440
|
+
label: import("react").ReactNode;
|
|
441
|
+
id: string;
|
|
442
|
+
page: string;
|
|
443
|
+
} | undefined;
|
|
444
|
+
};
|
|
445
|
+
mandatory?: boolean | undefined;
|
|
446
|
+
page: string;
|
|
447
|
+
componentType: "Suggester";
|
|
475
448
|
storeName: string;
|
|
476
|
-
|
|
449
|
+
} | {
|
|
450
|
+
label: import("react").ReactNode;
|
|
451
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
452
|
+
conditionFilter: import("react").ReactNode;
|
|
453
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
454
|
+
id: string;
|
|
455
|
+
bindingDependencies?: string[] | undefined;
|
|
477
456
|
hierarchy: {
|
|
478
457
|
sequence: {
|
|
479
458
|
label: import("react").ReactNode;
|
|
@@ -486,20 +465,45 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
486
465
|
page: string;
|
|
487
466
|
} | undefined;
|
|
488
467
|
};
|
|
489
|
-
|
|
468
|
+
mandatory?: boolean | undefined;
|
|
469
|
+
page: string;
|
|
470
|
+
componentType: "Input" | "Textarea";
|
|
471
|
+
maxLength: number;
|
|
472
|
+
missingResponse?: {
|
|
473
|
+
name: string;
|
|
474
|
+
} | undefined;
|
|
475
|
+
response: {
|
|
490
476
|
name: string;
|
|
491
477
|
};
|
|
478
|
+
} | {
|
|
479
|
+
label: import("react").ReactNode;
|
|
480
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
481
|
+
conditionFilter: import("react").ReactNode;
|
|
482
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
483
|
+
id: string;
|
|
484
|
+
bindingDependencies?: string[] | undefined;
|
|
485
|
+
hierarchy: {
|
|
486
|
+
sequence: {
|
|
487
|
+
label: import("react").ReactNode;
|
|
488
|
+
id: string;
|
|
489
|
+
page: string;
|
|
490
|
+
};
|
|
491
|
+
subSequence?: {
|
|
492
|
+
label: import("react").ReactNode;
|
|
493
|
+
id: string;
|
|
494
|
+
page: string;
|
|
495
|
+
} | undefined;
|
|
496
|
+
};
|
|
492
497
|
mandatory?: boolean | undefined;
|
|
493
498
|
page: string;
|
|
494
|
-
componentType: "
|
|
499
|
+
componentType: "CheckboxOne";
|
|
495
500
|
} | {
|
|
496
501
|
label: import("react").ReactNode;
|
|
497
|
-
declarations
|
|
502
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
498
503
|
conditionFilter: import("react").ReactNode;
|
|
499
504
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
500
505
|
id: string;
|
|
501
|
-
|
|
502
|
-
bindingDependencies: string[];
|
|
506
|
+
bindingDependencies?: string[] | undefined;
|
|
503
507
|
hierarchy: {
|
|
504
508
|
sequence: {
|
|
505
509
|
label: import("react").ReactNode;
|
|
@@ -512,22 +516,17 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
512
516
|
page: string;
|
|
513
517
|
} | undefined;
|
|
514
518
|
};
|
|
515
|
-
missingResponse: {
|
|
516
|
-
name: string;
|
|
517
|
-
};
|
|
518
519
|
mandatory?: boolean | undefined;
|
|
519
520
|
page: string;
|
|
520
521
|
componentType: "ComponentSet";
|
|
521
522
|
components: import("../../type-source").ComponentType[];
|
|
522
523
|
} | {
|
|
523
|
-
expressions: {};
|
|
524
524
|
label: import("react").ReactNode;
|
|
525
|
-
declarations
|
|
525
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
526
526
|
conditionFilter: import("react").ReactNode;
|
|
527
527
|
controls?: import("../../type-source").ControlType[] | undefined;
|
|
528
528
|
id: string;
|
|
529
|
-
|
|
530
|
-
bindingDependencies: string[];
|
|
529
|
+
bindingDependencies?: string[] | undefined;
|
|
531
530
|
hierarchy: {
|
|
532
531
|
sequence: {
|
|
533
532
|
label: import("react").ReactNode;
|
|
@@ -540,8 +539,30 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
540
539
|
page: string;
|
|
541
540
|
} | undefined;
|
|
542
541
|
};
|
|
543
|
-
|
|
544
|
-
|
|
542
|
+
mandatory?: boolean | undefined;
|
|
543
|
+
page: string;
|
|
544
|
+
componentType: "QuestionExplication";
|
|
545
|
+
description: string;
|
|
546
|
+
bgColor?: string | undefined;
|
|
547
|
+
} | {
|
|
548
|
+
expressions: {};
|
|
549
|
+
label: import("react").ReactNode;
|
|
550
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
551
|
+
conditionFilter: import("react").ReactNode;
|
|
552
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
553
|
+
id: string;
|
|
554
|
+
bindingDependencies?: string[] | undefined;
|
|
555
|
+
hierarchy: {
|
|
556
|
+
sequence: {
|
|
557
|
+
label: import("react").ReactNode;
|
|
558
|
+
id: string;
|
|
559
|
+
page: string;
|
|
560
|
+
};
|
|
561
|
+
subSequence?: {
|
|
562
|
+
label: import("react").ReactNode;
|
|
563
|
+
id: string;
|
|
564
|
+
page: string;
|
|
565
|
+
} | undefined;
|
|
545
566
|
};
|
|
546
567
|
mandatory?: boolean | undefined;
|
|
547
568
|
page: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LunaticState } from '../type';
|
|
2
|
+
import { LunaticComponentType } from '../../components/type';
|
|
3
|
+
/**
|
|
4
|
+
* Increment the pager to reach the next page or iteration
|
|
5
|
+
*/
|
|
6
|
+
export declare function getNextPager(pager: LunaticState['pager'], parent?: LunaticComponentType): LunaticState['pager'];
|
|
7
|
+
export declare function getPrevPager(pager: LunaticState['pager'], parent?: LunaticComponentType): LunaticState['pager'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LunaticState } from '../type';
|
|
2
|
+
export declare function getPageId({ subPage, page, }: Pick<LunaticState['pager'], 'page' | 'subPage'>): string;
|
|
3
|
+
/**
|
|
4
|
+
* Converts a page number (3.1.2) to an array of numbers [3, 1, 2]
|
|
5
|
+
*/
|
|
6
|
+
export declare function pageStringToNumbers(page: string): number[];
|
|
7
|
+
/**
|
|
8
|
+
* Check if we are on an empty page
|
|
9
|
+
* if no components can be displayed on this page (using filter)
|
|
10
|
+
*/
|
|
11
|
+
export declare function isPageEmpty(state: LunaticState): boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LunaticState } from '../type';
|
|
2
|
-
declare function useComponentsFromState(state: LunaticState): import("./fill-components/fill-components").LunaticComponentProps<"Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "ComponentSet" | "Roundabout">[];
|
|
2
|
+
declare function useComponentsFromState(state: LunaticState): import("./fill-components/fill-components").LunaticComponentProps<"Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ComponentSet" | "Roundabout" | "QuestionExplication">[];
|
|
3
3
|
export default useComponentsFromState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LunaticComponentDefinition } from '../../type';
|
|
2
2
|
export declare const isLoopComponent: (component: LunaticComponentDefinition) => component is (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentRosterForLoopType & {
|
|
3
|
-
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "ComponentSet" | "Roundabout";
|
|
3
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
4
4
|
} & {
|
|
5
5
|
componentType: 'Loop' | 'RosterForLoop';
|
|
6
6
|
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentLoopType & {
|
|
7
|
-
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "ComponentSet" | "Roundabout";
|
|
7
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
8
8
|
} & {
|
|
9
9
|
componentType: 'Loop' | 'RosterForLoop';
|
|
10
10
|
});
|
|
@@ -36,7 +36,7 @@ export declare function reduceOverviewOnInit(state: LunaticState, action: Action
|
|
|
36
36
|
isInLoop: boolean;
|
|
37
37
|
isFirstPage: boolean;
|
|
38
38
|
isLastPage: boolean;
|
|
39
|
-
features: "VTL"[];
|
|
39
|
+
features: ["VTL"] | ["VTL", "MD"];
|
|
40
40
|
preferences: ["COLLECTED"];
|
|
41
41
|
savingType: "COLLECTED";
|
|
42
42
|
cleaning: {
|
|
@@ -65,9 +65,6 @@ export declare function reduceOverviewOnInit(state: LunaticState, action: Action
|
|
|
65
65
|
nbIterations?: number | undefined;
|
|
66
66
|
shallowIteration?: number | undefined;
|
|
67
67
|
linksIterations?: number[] | undefined;
|
|
68
|
-
roundabout?: {
|
|
69
|
-
page: string;
|
|
70
|
-
} | undefined;
|
|
71
68
|
};
|
|
72
69
|
waiting: boolean;
|
|
73
70
|
errors?: {
|
|
@@ -97,9 +94,6 @@ export declare function reduceOverviewOnInit(state: LunaticState, action: Action
|
|
|
97
94
|
iteration?: number | undefined;
|
|
98
95
|
nbIterations?: number | undefined;
|
|
99
96
|
subPage?: number | undefined;
|
|
100
|
-
roundabout?: {
|
|
101
|
-
page: string;
|
|
102
|
-
} | undefined;
|
|
103
97
|
}) => void;
|
|
104
98
|
getSuggesterStatus: (name: string) => {
|
|
105
99
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
@@ -6,6 +6,6 @@ import { LunaticComponentDefinition } from './type';
|
|
|
6
6
|
* des composant à part entière.
|
|
7
7
|
* D'autres composant pourraient un jour figurer ici.
|
|
8
8
|
*/
|
|
9
|
-
export declare function replaceComponentSequence(components: Array<LunaticComponentDefinition>): ((import("./type-source").ComponentTypeBase & import("./type-source").ComponentSequenceType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentSubSequenceType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRosterForLoopType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentLoopType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentTableType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentNumberType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDatePickerType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxGroupType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxBooleanType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRadioType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentFilterDescriptionType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDropdownType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentPairWiseLinksType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRoundaboutType) | (import("./type-source").ComponentTypeBase & {
|
|
10
|
-
componentType: "
|
|
11
|
-
}) | (import("./type-source").ComponentTypeBase & import("./type-source").
|
|
9
|
+
export declare function replaceComponentSequence(components: Array<LunaticComponentDefinition>): ((import("./type-source").ComponentTypeBase & import("./type-source").ComponentSequenceType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentSubSequenceType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRosterForLoopType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentLoopType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentTableType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentNumberType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDatePickerType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxGroupType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxBooleanType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRadioType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentFilterDescriptionType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDropdownType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentPairWiseLinksType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRoundaboutType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentSuggesterType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentInputOrTextareaType) | (import("./type-source").ComponentTypeBase & {
|
|
10
|
+
componentType: "CheckboxOne";
|
|
11
|
+
}) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentComponentSetType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentQuestionExplicationType))[];
|