@inseefr/lunatic 2.7.5 → 2.7.6
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/README.fr.md +1 -1
- package/README.md +6 -1
- package/lib/components/loop/block-for-loop.js +2 -0
- package/lib/components/loop/constant.js +10 -0
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +42 -20
- package/lib/components/lunatic-components.js +45 -7
- package/lib/components/table/lunatic-table.js +5 -1
- package/lib/src/components/datepicker/lunatic-datepicker.d.ts +1 -1
- package/lib/src/components/loop/constant.d.ts +4 -0
- package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +1 -0
- package/lib/src/components/lunatic-components.d.ts +12 -5
- package/lib/src/components/type.d.ts +4 -1
- package/lib/src/use-lunatic/commons/compile-controls.d.ts +4 -3
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +75 -70
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +55 -50
- package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +31 -26
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +680 -73
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -2
- package/lib/src/use-lunatic/reducer/controls/check-base-control.d.ts +2 -0
- package/lib/src/use-lunatic/reducer/{resolve-component-controls/resolve-roundabout-control.d.ts → controls/check-roundabout-control.d.ts} +2 -2
- package/lib/src/use-lunatic/type-source.d.ts +16 -10
- package/lib/src/use-lunatic/use-lunatic.d.ts +11 -5
- package/lib/stories/behaviour/controls/controls.stories.js +14 -7
- package/lib/stories/behaviour/controls/loop.json +130 -0
- package/lib/stories/behaviour/controls/{V2_ControlesNonNum_horsBoucle_PasPageFin.json → simple.json} +2 -2
- package/lib/stories/date-picker/source.json +22 -67
- package/lib/stories/declaration/source.json +14 -28
- package/lib/stories/dropdown/source.json +11 -28
- package/lib/stories/filter-description/source.json +3 -2
- package/lib/stories/input/input.stories.js +1 -8
- package/lib/stories/input/source.json +1 -63
- package/lib/stories/input-number/input-number.stories.js +2 -22
- package/lib/stories/input-number/source.json +4 -6
- package/lib/stories/loop/{block-for-loop.stories.js → loop.stories.js} +10 -8
- package/lib/stories/loop/roster-for-loop.stories.js +8 -2
- package/lib/stories/loop/source-bloc.json +10 -39
- package/lib/stories/loop/source-paginated.json +65 -78
- package/lib/stories/overview/overview.stories.js +1 -1
- package/lib/stories/pairwise/pairwise-links.stories.js +4 -4
- package/lib/stories/pairwise/{links.json → source.json} +2 -6
- package/lib/stories/{loop/not-paginated-loop.stories.js → question-context/question-context.stories.js} +5 -9
- package/lib/stories/question-context/source.json +13 -0
- package/lib/stories/question-explication/source.json +1 -1
- package/lib/stories/{loop/paginated-loop.stories.js → question-information/question-information.stories.js} +4 -4
- package/lib/stories/question-information/source.json +14 -0
- package/lib/stories/roundabout/source.json +21 -31
- package/lib/stories/sequence/sequence.stories.js +7 -1
- package/lib/stories/sequence/source.json +17 -0
- package/lib/stories/suggester/simple.json +1 -1
- package/lib/stories/table/source-colspan.json +314 -0
- package/lib/stories/table/table.stories.js +7 -1
- package/lib/stories/textarea/source.json +6 -22
- package/lib/use-lunatic/commons/compile-controls.js +135 -34
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +10 -0
- package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +4 -1
- package/lib/use-lunatic/hooks/use-page-has-response.js +17 -0
- package/lib/use-lunatic/reducer/{resolve-component-controls/resolve-simple-control.js → controls/check-base-control.js} +5 -7
- package/lib/use-lunatic/reducer/{resolve-component-controls/resolve-roundabout-control.js → controls/check-roundabout-control.js} +2 -3
- package/lib/use-lunatic/reducer/overview/overview-on-init.js +6 -4
- package/lib/use-lunatic/type-source.js +1 -0
- package/package.json +1 -1
- package/lib/src/use-lunatic/commons/get-errors-without-empty-value.d.ts +0 -6
- package/lib/src/use-lunatic/reducer/resolve-component-controls/index.d.ts +0 -1
- package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-component-control.d.ts +0 -6
- package/lib/src/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.d.ts +0 -3
- package/lib/stories/Introduction.stories.mdx +0 -112
- package/lib/stories/behaviour/controls/V2_Controles_BouclesLiees_PasPageFin.json +0 -533
- package/lib/stories/input/source-with-question.json +0 -80
- package/lib/stories/input-number/source-euros.json +0 -37
- package/lib/stories/input-number/source-thansand.json +0 -34
- package/lib/stories/loop/source-not-paginated.json +0 -138
- package/lib/use-lunatic/commons/get-errors-without-empty-value.js +0 -24
- package/lib/use-lunatic/reducer/resolve-component-controls/index.js +0 -12
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-component-control.js +0 -38
- /package/lib/stories/behaviour/controls/{V2_ControlesNum_horsBoucle_PasPageFin.json → simple-numeric.json} +0 -0
- /package/lib/stories/pairwise/{links-componentset.json → source-componentset.json} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LunaticState } from '../type';
|
|
2
|
-
declare function useComponentsFromState(state: LunaticState): import("./fill-components/fill-components").FilledLunaticComponentProps<"
|
|
2
|
+
declare function useComponentsFromState(state: LunaticState): import("./fill-components/fill-components").FilledLunaticComponentProps<"CheckboxOne" | "ConfirmationModal" | "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "FilterDescription" | "Dropdown" | "PairwiseLinks" | "Roundabout" | "Suggester" | "Input" | "Textarea" | "ComponentSet" | "QuestionExplication">[];
|
|
3
3
|
export default useComponentsFromState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { LunaticComponentDefinition } from '../../type';
|
|
2
2
|
export declare const isLoopComponent: (component: LunaticComponentDefinition) => component is (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentRosterForLoopType & {
|
|
3
|
-
componentType: "
|
|
3
|
+
componentType: "CheckboxOne" | "ConfirmationModal" | "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "FilterDescription" | "Dropdown" | "PairwiseLinks" | "Roundabout" | "Suggester" | "Input" | "Textarea" | "ComponentSet" | "QuestionExplication";
|
|
4
4
|
} & {
|
|
5
5
|
componentType: 'Loop' | 'RosterForLoop';
|
|
6
6
|
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentLoopType & {
|
|
7
|
-
componentType: "
|
|
7
|
+
componentType: "CheckboxOne" | "ConfirmationModal" | "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "FilterDescription" | "Dropdown" | "PairwiseLinks" | "Roundabout" | "Suggester" | "Input" | "Textarea" | "ComponentSet" | "QuestionExplication";
|
|
8
8
|
} & {
|
|
9
9
|
componentType: 'Loop' | 'RosterForLoop';
|
|
10
10
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type StateForControls } from '../../commons/compile-controls';
|
|
2
1
|
import type { LunaticControl, LunaticError } from '../../type';
|
|
2
|
+
import type { LunaticState } from '../../type';
|
|
3
3
|
/**
|
|
4
4
|
* Pour le Roundabout, le controle doit être validé pour chaque itération
|
|
5
5
|
* composants l'unité enquêtée.
|
|
@@ -7,4 +7,4 @@ import type { LunaticControl, LunaticError } from '../../type';
|
|
|
7
7
|
* Le rondpoint ne peut pas être placé dans une boucle car l'itération est effacée.
|
|
8
8
|
* TODO intégrer cela dans le cadre de boucle de bloucle.
|
|
9
9
|
*/
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function checkRoundaboutControl(control: LunaticControl, executeExpression: LunaticState['executeExpression']): LunaticError | undefined;
|
|
@@ -5,7 +5,6 @@ export type LabelType = {
|
|
|
5
5
|
value: string;
|
|
6
6
|
type: 'VTL' | 'VTL|MD';
|
|
7
7
|
};
|
|
8
|
-
export type ComponentTypeEnum = 'Sequence' | 'Subsequence' | 'RosterForLoop' | 'Loop' | 'Table' | 'Input' | 'InputNumber' | 'Datepicker' | 'CheckboxGroup' | 'CheckboxOne' | 'CheckboxBoolean' | 'Radio' | 'Dropdown' | 'Textarea' | 'FilterDescription' | 'PairwiseLinks' | 'Suggester' | 'ConfirmationModal' | 'ComponentSet';
|
|
9
8
|
export type ValuesType<T = unknown> = {
|
|
10
9
|
PREVIOUS: T | null;
|
|
11
10
|
COLLECTED: T | null;
|
|
@@ -40,6 +39,7 @@ export declare enum TypeOfControl {
|
|
|
40
39
|
}
|
|
41
40
|
export declare enum ControlTypeEnum {
|
|
42
41
|
roundabout = "roundabout",
|
|
42
|
+
row = "ROW",
|
|
43
43
|
simple = "simple"
|
|
44
44
|
}
|
|
45
45
|
export type ControlType = {
|
|
@@ -67,11 +67,11 @@ export type Hierarchy = {
|
|
|
67
67
|
export type ComponentTypeBase = {
|
|
68
68
|
label: LabelType;
|
|
69
69
|
declarations?: DeclarationType[];
|
|
70
|
-
conditionFilter
|
|
70
|
+
conditionFilter?: ConditionFilterType;
|
|
71
71
|
controls?: ControlType[];
|
|
72
72
|
id: string;
|
|
73
73
|
bindingDependencies?: string[];
|
|
74
|
-
hierarchy
|
|
74
|
+
hierarchy?: Hierarchy;
|
|
75
75
|
mandatory?: boolean;
|
|
76
76
|
page: string;
|
|
77
77
|
};
|
|
@@ -80,6 +80,7 @@ export type ComponentType = (ComponentTypeBase & ComponentSequenceType) | (Compo
|
|
|
80
80
|
}) | (ComponentTypeBase & {
|
|
81
81
|
componentType: 'ConfirmationModal';
|
|
82
82
|
}) | (ComponentTypeBase & ComponentComponentSetType) | (ComponentTypeBase & ComponentQuestionExplicationType);
|
|
83
|
+
export type ComponentTypeEnum = ComponentType['componentType'];
|
|
83
84
|
export type ComponentInputOrTextareaType = {
|
|
84
85
|
componentType: 'Input' | 'Textarea';
|
|
85
86
|
maxLength: number;
|
|
@@ -119,7 +120,12 @@ export type ComponentRosterForLoopType = {
|
|
|
119
120
|
}[];
|
|
120
121
|
body: ({
|
|
121
122
|
label: LabelType;
|
|
122
|
-
|
|
123
|
+
colspan?: number;
|
|
124
|
+
rowspan?: number;
|
|
125
|
+
} | (ComponentType & {
|
|
126
|
+
colspan?: number;
|
|
127
|
+
rowspan?: number;
|
|
128
|
+
}))[][];
|
|
123
129
|
positioning: 'HORIZONTAL';
|
|
124
130
|
};
|
|
125
131
|
export type ComponentLoopType = {
|
|
@@ -137,10 +143,8 @@ export type ComponentLoopType = {
|
|
|
137
143
|
};
|
|
138
144
|
export type ComponentTableType = {
|
|
139
145
|
componentType: 'Table';
|
|
140
|
-
lines: ComponentRosterForLoopType['lines'];
|
|
141
146
|
header: ComponentRosterForLoopType['header'];
|
|
142
147
|
body: ComponentRosterForLoopType['body'];
|
|
143
|
-
positioning: ComponentRosterForLoopType['positioning'];
|
|
144
148
|
};
|
|
145
149
|
export type ComponentNumberType = {
|
|
146
150
|
componentType: 'InputNumber';
|
|
@@ -152,7 +156,7 @@ export type ComponentNumberType = {
|
|
|
152
156
|
};
|
|
153
157
|
export type ComponentDatePickerType = {
|
|
154
158
|
componentType: 'Datepicker';
|
|
155
|
-
dateFormat:
|
|
159
|
+
dateFormat: 'YYYY-MM-DD' | 'YYYY' | 'YYYY-MM';
|
|
156
160
|
response: ResponseType;
|
|
157
161
|
min?: string;
|
|
158
162
|
max?: string;
|
|
@@ -215,7 +219,7 @@ export type SuggesterType = {
|
|
|
215
219
|
name: string;
|
|
216
220
|
min?: number;
|
|
217
221
|
rules?: string[];
|
|
218
|
-
language?:
|
|
222
|
+
language?: 'French' | 'English';
|
|
219
223
|
stemmer?: boolean;
|
|
220
224
|
synonyms: {
|
|
221
225
|
source: string;
|
|
@@ -229,12 +233,14 @@ export type SuggesterType = {
|
|
|
229
233
|
type: string;
|
|
230
234
|
};
|
|
231
235
|
queryParser: {
|
|
232
|
-
type:
|
|
236
|
+
type: 'tokenized';
|
|
233
237
|
params: {
|
|
234
|
-
language:
|
|
238
|
+
language: 'French' | 'English';
|
|
235
239
|
pattern: string;
|
|
236
240
|
min?: number;
|
|
237
241
|
};
|
|
242
|
+
} | {
|
|
243
|
+
type: 'soft';
|
|
238
244
|
};
|
|
239
245
|
url?: string;
|
|
240
246
|
version: number;
|
|
@@ -102,7 +102,10 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
102
102
|
rowspan?: number | undefined;
|
|
103
103
|
colspan?: number | undefined;
|
|
104
104
|
}[];
|
|
105
|
-
body: import("./commons/fill-components/fill-components").FilledLunaticComponentProps
|
|
105
|
+
body: (import("./commons/fill-components/fill-components").FilledLunaticComponentProps & {
|
|
106
|
+
colspan?: number | undefined;
|
|
107
|
+
rowspan?: number | undefined;
|
|
108
|
+
})[][];
|
|
106
109
|
executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
|
|
107
110
|
iteration?: number | number[] | undefined;
|
|
108
111
|
bindingDependencies?: string[] | undefined;
|
|
@@ -111,7 +114,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
111
114
|
iteration: number | undefined;
|
|
112
115
|
};
|
|
113
116
|
Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
|
|
114
|
-
dateFormat: "YYYY-MM-DD" | "YYYY
|
|
117
|
+
dateFormat: "YYYY-MM-DD" | "YYYY" | "YYYY-MM";
|
|
115
118
|
min?: string | undefined;
|
|
116
119
|
max?: string | undefined;
|
|
117
120
|
response: {
|
|
@@ -347,7 +350,10 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
347
350
|
rowspan?: number | undefined;
|
|
348
351
|
colspan?: number | undefined;
|
|
349
352
|
}[];
|
|
350
|
-
body: import("./commons/fill-components/fill-components").FilledLunaticComponentProps
|
|
353
|
+
body: (import("./commons/fill-components/fill-components").FilledLunaticComponentProps & {
|
|
354
|
+
colspan?: number | undefined;
|
|
355
|
+
rowspan?: number | undefined;
|
|
356
|
+
})[][];
|
|
351
357
|
executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
|
|
352
358
|
iteration?: number | number[] | undefined;
|
|
353
359
|
bindingDependencies?: string[] | undefined;
|
|
@@ -356,7 +362,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
356
362
|
iteration: number | undefined;
|
|
357
363
|
};
|
|
358
364
|
Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
|
|
359
|
-
dateFormat: "YYYY-MM-DD" | "YYYY
|
|
365
|
+
dateFormat: "YYYY-MM-DD" | "YYYY" | "YYYY-MM";
|
|
360
366
|
min?: string | undefined;
|
|
361
367
|
max?: string | undefined;
|
|
362
368
|
response: {
|
|
@@ -518,7 +524,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
518
524
|
goPreviousPage: () => void;
|
|
519
525
|
};
|
|
520
526
|
})[] | undefined;
|
|
521
|
-
}) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps<"
|
|
527
|
+
}) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps<"CheckboxOne" | "ConfirmationModal" | "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "FilterDescription" | "Dropdown" | "PairwiseLinks" | "Roundabout" | "Suggester" | "Input" | "Textarea" | "ComponentSet" | "QuestionExplication">[];
|
|
522
528
|
goPreviousPage: () => void;
|
|
523
529
|
goNextPage: (payload?: {}) => void;
|
|
524
530
|
goToPage: (page: {
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.SimpleNum = exports.Simple = exports.LinkedLoop2 = exports.LinkedLoop = exports.BoucleN = void 0;
|
|
6
|
+
exports["default"] = exports.SimpleNum = exports.Simple = exports.Loop = exports.LinkedLoop2 = exports.LinkedLoop = exports.BoucleN = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
9
|
+
var _simple = _interopRequireDefault(require("./simple.json"));
|
|
10
|
+
var _simpleNumeric = _interopRequireDefault(require("./simple-numeric.json"));
|
|
11
|
+
var _loop = _interopRequireDefault(require("./loop.json"));
|
|
12
12
|
var _V2_Controles_BouclesLiees2_PasPageFin = _interopRequireDefault(require("./V2_Controles_BouclesLiees2_PasPageFin.json"));
|
|
13
13
|
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
14
14
|
var _bouclesN = _interopRequireDefault(require("./boucles-n.json"));
|
|
@@ -65,20 +65,20 @@ BoucleN.args = {
|
|
|
65
65
|
var Simple = exports.Simple = Template.bind({});
|
|
66
66
|
Simple.args = {
|
|
67
67
|
id: 'controls-simple',
|
|
68
|
-
source:
|
|
68
|
+
source: _simple["default"],
|
|
69
69
|
pagination: true
|
|
70
70
|
};
|
|
71
71
|
var SimpleNum = exports.SimpleNum = Template.bind({});
|
|
72
72
|
SimpleNum.args = {
|
|
73
73
|
id: 'controls-simple-num',
|
|
74
|
-
source:
|
|
74
|
+
source: _simpleNumeric["default"],
|
|
75
75
|
pagination: true,
|
|
76
76
|
activeControls: true
|
|
77
77
|
};
|
|
78
78
|
var LinkedLoop = exports.LinkedLoop = Template.bind({});
|
|
79
79
|
LinkedLoop.args = {
|
|
80
80
|
id: 'controls-linked-loop',
|
|
81
|
-
source:
|
|
81
|
+
source: _loop["default"],
|
|
82
82
|
pagination: true,
|
|
83
83
|
activeControls: true
|
|
84
84
|
};
|
|
@@ -88,4 +88,11 @@ LinkedLoop2.args = {
|
|
|
88
88
|
source: _V2_Controles_BouclesLiees2_PasPageFin["default"],
|
|
89
89
|
pagination: true,
|
|
90
90
|
activeControls: true
|
|
91
|
+
};
|
|
92
|
+
var Loop = exports.Loop = Template.bind({});
|
|
93
|
+
Loop.args = {
|
|
94
|
+
id: 'controls-loop',
|
|
95
|
+
source: _loop["default"],
|
|
96
|
+
pagination: true,
|
|
97
|
+
activeControls: true
|
|
91
98
|
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxPage": "4",
|
|
3
|
+
"components": [
|
|
4
|
+
{
|
|
5
|
+
"componentType": "RosterForLoop",
|
|
6
|
+
"id": "nb",
|
|
7
|
+
"page": "1",
|
|
8
|
+
"label": {
|
|
9
|
+
"type": "VTL",
|
|
10
|
+
"value": "\"Ajouter un habitant\""
|
|
11
|
+
},
|
|
12
|
+
"headers": [
|
|
13
|
+
{
|
|
14
|
+
"headerCell": true,
|
|
15
|
+
"label": "\"Prénom\""
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"headerCell": true,
|
|
19
|
+
"label": "\"Age\""
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"controls": [
|
|
23
|
+
{
|
|
24
|
+
"type": "ROW",
|
|
25
|
+
"criticality": "ERROR",
|
|
26
|
+
"errorMessage": {
|
|
27
|
+
"type": "VTL|MD",
|
|
28
|
+
"value": "\"Row level : Age doit être > 18 \""
|
|
29
|
+
},
|
|
30
|
+
"typeOfControl": "FORMAT",
|
|
31
|
+
"control": {
|
|
32
|
+
"type": "VTL",
|
|
33
|
+
"value": "AGES > 18"
|
|
34
|
+
},
|
|
35
|
+
"id": "kfxmjupm-CI-0"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"criticality": "ERROR",
|
|
39
|
+
"errorMessage": {
|
|
40
|
+
"type": "VTL|MD",
|
|
41
|
+
"value": "\"Global level : Vous devez entrer 3 personnes min \""
|
|
42
|
+
},
|
|
43
|
+
"typeOfControl": "FORMAT",
|
|
44
|
+
"control": {
|
|
45
|
+
"type": "VTL",
|
|
46
|
+
"value": "NB >= 3"
|
|
47
|
+
},
|
|
48
|
+
"id": "kfxmjupm-CI-1"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"components": [
|
|
52
|
+
{
|
|
53
|
+
"componentType": "Input",
|
|
54
|
+
"maxLength": 30,
|
|
55
|
+
"id": "prenoms",
|
|
56
|
+
"response": {
|
|
57
|
+
"name": "PRENOMS"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"componentType": "InputNumber",
|
|
62
|
+
"maxLength": 30,
|
|
63
|
+
"id": "ages",
|
|
64
|
+
"controls": [
|
|
65
|
+
{
|
|
66
|
+
"criticality": "ERROR",
|
|
67
|
+
"errorMessage": {
|
|
68
|
+
"type": "VTL|MD",
|
|
69
|
+
"value": "\"Age doit être > 18 \""
|
|
70
|
+
},
|
|
71
|
+
"typeOfControl": "FORMAT",
|
|
72
|
+
"control": {
|
|
73
|
+
"type": "VTL",
|
|
74
|
+
"value": "AGES > 18"
|
|
75
|
+
},
|
|
76
|
+
"id": "kfxmjupm-CI-0"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"response": {
|
|
80
|
+
"name": "AGES"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"componentType": "Sequence",
|
|
87
|
+
"response": {
|
|
88
|
+
"name": "NB"
|
|
89
|
+
},
|
|
90
|
+
"id": "nb",
|
|
91
|
+
"page": "2",
|
|
92
|
+
"label": {
|
|
93
|
+
"type": "VTL",
|
|
94
|
+
"value": "\"Fin\""
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"variables": [
|
|
99
|
+
{
|
|
100
|
+
"variableType": "CALCULATED",
|
|
101
|
+
"expression": {
|
|
102
|
+
"type": "VTL",
|
|
103
|
+
"value": "count(PRENOMS)"
|
|
104
|
+
},
|
|
105
|
+
"name": "NB"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"variableType": "COLLECTED",
|
|
109
|
+
"values": {
|
|
110
|
+
"COLLECTED": ["John", "Jane"],
|
|
111
|
+
"EDITED": null,
|
|
112
|
+
"INPUTED": null,
|
|
113
|
+
"FORCED": null,
|
|
114
|
+
"PREVIOUS": null
|
|
115
|
+
},
|
|
116
|
+
"name": "PRENOMS"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"variableType": "COLLECTED",
|
|
120
|
+
"values": {
|
|
121
|
+
"COLLECTED": [10, 12],
|
|
122
|
+
"EDITED": null,
|
|
123
|
+
"INPUTED": null,
|
|
124
|
+
"FORCED": null,
|
|
125
|
+
"PREVIOUS": null
|
|
126
|
+
},
|
|
127
|
+
"name": "AGES"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
package/lib/stories/behaviour/controls/{V2_ControlesNonNum_horsBoucle_PasPageFin.json → simple.json}
RENAMED
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"id": "kfxn6f16-kfxn36ru",
|
|
275
275
|
"label": {
|
|
276
276
|
"type": "VTL|MD",
|
|
277
|
-
"value": "Tester la saisie de BLABLA"
|
|
277
|
+
"value": "\"Tester la saisie de BLABLA\""
|
|
278
278
|
},
|
|
279
279
|
"position": "AFTER_QUESTION_TEXT"
|
|
280
280
|
}
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
"id": "kfxn91jl-kfxn7ugm",
|
|
379
379
|
"label": {
|
|
380
380
|
"type": "VTL|MD",
|
|
381
|
-
"value": "Tester cocher 1, ne rien cocher, cocher 2"
|
|
381
|
+
"value": "\"Tester cocher 1, ne rien cocher, cocher 2\""
|
|
382
382
|
},
|
|
383
383
|
"position": "AFTER_QUESTION_TEXT"
|
|
384
384
|
}
|
|
@@ -1,38 +1,16 @@
|
|
|
1
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": "1974-03-15",
|
|
19
|
-
"EDITED": null,
|
|
20
|
-
"INPUTED": null,
|
|
21
|
-
"FORCED": null,
|
|
22
|
-
"PREVIOUS": null
|
|
23
|
-
},
|
|
24
|
-
"name": "Q1"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"variableType": "CALCULATED",
|
|
28
|
-
"expression": { "type": "VTL", "value": "true" },
|
|
29
|
-
"name": "FILTER_RESULT_Q1",
|
|
30
|
-
"inFilter": "false"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
2
|
"components": [
|
|
34
3
|
{
|
|
35
4
|
"componentType": "Datepicker",
|
|
5
|
+
"max": "2100-01-01",
|
|
6
|
+
"dateFormat": "YYYY-MM-DD",
|
|
7
|
+
"conditionFilter": { "type": "VTL", "value": "true" },
|
|
8
|
+
"label": { "type": "VTL|MD", "value": "\"➡ 1. \" || \"Birth day\"" },
|
|
9
|
+
"mandatory": false,
|
|
10
|
+
"min": "1900-01-01",
|
|
11
|
+
"response": { "name": "Q1" },
|
|
12
|
+
"id": "l7ovm2rv",
|
|
13
|
+
"page": "1",
|
|
36
14
|
"controls": [
|
|
37
15
|
{
|
|
38
16
|
"criticality": "ERROR",
|
|
@@ -58,43 +36,20 @@
|
|
|
58
36
|
},
|
|
59
37
|
"id": "l7ovm2rv-formatborne"
|
|
60
38
|
}
|
|
61
|
-
]
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"variables": [
|
|
43
|
+
{
|
|
44
|
+
"variableType": "COLLECTED",
|
|
45
|
+
"values": {
|
|
46
|
+
"COLLECTED": "1974-03-15",
|
|
47
|
+
"EDITED": null,
|
|
48
|
+
"INPUTED": null,
|
|
49
|
+
"FORCED": null,
|
|
50
|
+
"PREVIOUS": null
|
|
70
51
|
},
|
|
71
|
-
"
|
|
72
|
-
{
|
|
73
|
-
"id": "kb9hi4j0-krnoclfe",
|
|
74
|
-
"declarationType": "INSTRUCTION",
|
|
75
|
-
"position": "BEFORE_QUESTION_TEXT",
|
|
76
|
-
"label": {
|
|
77
|
-
"value": "\"Test declaration before \" || Q1",
|
|
78
|
-
"type": "VTL|MD"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"id": "kb9hi4j0-krnoclfe",
|
|
83
|
-
"declarationType": "HELP",
|
|
84
|
-
"position": "AFTER_QUESTION_TEXT",
|
|
85
|
-
"label": {
|
|
86
|
-
"value": "\"For example, 2001-01-01.\"",
|
|
87
|
-
"type": "VTL|MD"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"conditionFilter": { "type": "VTL", "value": "true" },
|
|
92
|
-
"label": { "type": "VTL|MD", "value": "\"➡ 1. \" || \"Birth day\"" },
|
|
93
|
-
"mandatory": false,
|
|
94
|
-
"min": "1900-01-01",
|
|
95
|
-
"response": { "name": "Q1" },
|
|
96
|
-
"id": "l7ovm2rv",
|
|
97
|
-
"page": "1"
|
|
52
|
+
"name": "Q1"
|
|
98
53
|
}
|
|
99
54
|
],
|
|
100
55
|
"pagination": "question",
|
|
@@ -18,53 +18,39 @@
|
|
|
18
18
|
"declarationType": "INSTRUCTION",
|
|
19
19
|
"position": "BEFORE_QUESTION_TEXT",
|
|
20
20
|
"label": {
|
|
21
|
-
"value": "\"
|
|
21
|
+
"value": "\"BEFORE_QUESTION_TEXT\"",
|
|
22
22
|
"type": "VTL|MD"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
{
|
|
27
27
|
"id": "jruq5os5-kqhuxnyt",
|
|
28
|
-
"declarationType": "
|
|
28
|
+
"declarationType": "COMMENT",
|
|
29
29
|
"position": "AFTER_QUESTION_TEXT",
|
|
30
30
|
"label": {
|
|
31
|
-
"value": "\"
|
|
31
|
+
"value": "\"AFTER_QUESTION_TEXT\"",
|
|
32
32
|
"type": "VTL|MD"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
{
|
|
37
|
-
"id": "jruq5os5-
|
|
38
|
-
"declarationType": "
|
|
39
|
-
"position": "
|
|
37
|
+
"id": "jruq5os5-kqhuxnyt",
|
|
38
|
+
"declarationType": "HELP",
|
|
39
|
+
"position": "AFTER_RESPONSE",
|
|
40
40
|
"label": {
|
|
41
|
-
"value": "\"
|
|
41
|
+
"value": "\"AFTER_RESPONSE\"",
|
|
42
42
|
"type": "VTL|MD"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
+
|
|
45
46
|
{
|
|
46
|
-
"
|
|
47
|
-
"id": "jjy2j3hv-kocpsr93",
|
|
48
|
-
"label": "Je suis une consigne CATI donc en bleu",
|
|
49
|
-
"position": "AFTER_QUESTION_TEXT"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"declarationType": "HELP",
|
|
53
|
-
"id": "jjy2j3hv-krlygnqz",
|
|
54
|
-
"label": "Je suis une aide / help CATI CAPI donc en noir",
|
|
55
|
-
"position": "AFTER_QUESTION_TEXT"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"declarationType": "INSTRUCTION",
|
|
59
|
-
"id": "jjy2j3hv-krlyj1im",
|
|
60
|
-
"label": "Je suis une consigne CATI CAPI",
|
|
61
|
-
"position": "AFTER_QUESTION_TEXT"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
47
|
+
"id": "jruq5os5-kqhuxnyt",
|
|
64
48
|
"declarationType": "CODECARD",
|
|
65
|
-
"
|
|
66
|
-
"label":
|
|
67
|
-
|
|
49
|
+
"position": "DETACHABLE",
|
|
50
|
+
"label": {
|
|
51
|
+
"value": "\"DETACHABLE\"",
|
|
52
|
+
"type": "VTL|MD"
|
|
53
|
+
}
|
|
68
54
|
}
|
|
69
55
|
]
|
|
70
56
|
}
|
|
@@ -1,39 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
+
"maxPage": "1",
|
|
2
3
|
"components": [
|
|
3
4
|
{
|
|
4
5
|
"id": "j4nw5cqz",
|
|
5
6
|
"componentType": "Dropdown",
|
|
6
7
|
"mandatory": false,
|
|
7
|
-
"
|
|
8
|
+
"page": "1",
|
|
9
|
+
"label": {
|
|
10
|
+
"value": "\"In which state do The Simpsons reside?\"",
|
|
11
|
+
"type": "VTL|MD"
|
|
12
|
+
},
|
|
8
13
|
"response": {
|
|
9
14
|
"name": "STATE"
|
|
10
15
|
},
|
|
11
|
-
"declarations": [
|
|
12
|
-
{
|
|
13
|
-
"id": "d1",
|
|
14
|
-
"declarationType": "COMMENT",
|
|
15
|
-
"position": "BEFORE_QUESTION_TEXT",
|
|
16
|
-
"label": {
|
|
17
|
-
"value": "\"## Test declaration before \n ### other title\n lkfsdjkfdsjklhldkfsghldf\"",
|
|
18
|
-
"type": "VTL|MD"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"id": "d2",
|
|
23
|
-
"declarationType": "COMMENT",
|
|
24
|
-
"position": "AFTER_QUESTION_TEXT",
|
|
25
|
-
"label": { "value": "\"Test declaration after\"", "type": "VTL|MD" }
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"id": "d3",
|
|
29
|
-
"declarationType": "COMMENT",
|
|
30
|
-
"position": "DETACHABLE",
|
|
31
|
-
"label": {
|
|
32
|
-
"value": "\"Test detachable declaration\"",
|
|
33
|
-
"type": "VTL|MD"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
16
|
"options": [
|
|
38
17
|
{
|
|
39
18
|
"value": "1",
|
|
@@ -81,7 +60,11 @@
|
|
|
81
60
|
"id": "j4nw5cqz-bis",
|
|
82
61
|
"componentType": "Dropdown",
|
|
83
62
|
"mandatory": false,
|
|
84
|
-
"
|
|
63
|
+
"page": "1",
|
|
64
|
+
"label": {
|
|
65
|
+
"value": "\"In which state do The Simpsons reside?\"",
|
|
66
|
+
"type": "VTL|MD"
|
|
67
|
+
},
|
|
85
68
|
"response": {
|
|
86
69
|
"name": "STATE2"
|
|
87
70
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
"maxPage": "1",
|
|
2
3
|
"components": [
|
|
3
4
|
{
|
|
4
5
|
"componentType": "FilterDescription",
|
|
5
6
|
"label": { "value": "I'm a filter description", "type": "VTL|MD" },
|
|
6
|
-
"
|
|
7
|
-
"
|
|
7
|
+
"id": "desc",
|
|
8
|
+
"page": "1"
|
|
8
9
|
}
|
|
9
10
|
],
|
|
10
11
|
"variables": []
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
|
|
9
9
|
var _source = _interopRequireDefault(require("./source"));
|
|
10
|
-
var _sourceWithQuestion = _interopRequireDefault(require("./source-with-question"));
|
|
11
10
|
var _data = _interopRequireDefault(require("./data"));
|
|
12
11
|
var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -32,10 +31,4 @@ Default.args = {
|
|
|
32
31
|
id: 'input',
|
|
33
32
|
source: _source["default"],
|
|
34
33
|
data: _data["default"]
|
|
35
|
-
};
|
|
36
|
-
var WithQuestion = exports.WithQuestion = Template.bind({});
|
|
37
|
-
WithQuestion.args = {
|
|
38
|
-
id: 'input',
|
|
39
|
-
source: _sourceWithQuestion["default"],
|
|
40
|
-
data: _data["default"]
|
|
41
34
|
};
|