@inseefr/lunatic 2.4.5 → 2.4.6-allDecla

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.
Files changed (73) hide show
  1. package/lib/components/commons/components/combo-box/combo-box.scss +1 -0
  2. package/lib/components/commons/components/dragger/dragger.scss +7 -7
  3. package/lib/components/commons/components/is-network/use-online-status.spec.js +0 -4
  4. package/lib/components/commons/components/lunatic-component-without-label.js +4 -11
  5. package/lib/components/commons/components/md-label/md-label.js +2 -1
  6. package/lib/components/commons/components/orchestrated-component.js +3 -2
  7. package/lib/components/component-set/html/component-set-components.js +6 -2
  8. package/lib/components/component-set/lunatic-component-set.js +3 -1
  9. package/lib/components/declarations/declarations.spec.js +0 -1
  10. package/lib/components/dropdown/html/dropdown-simple/simple-label-renderer.js +1 -1
  11. package/lib/components/dropdown/html/dropdown-simple/simple-option-renderer.js +5 -7
  12. package/lib/components/dropdown/html/dropdown-writable/writable-label-renderer.js +1 -1
  13. package/lib/components/dropdown/html/dropdown-writable/writable-option-renderer.js +1 -1
  14. package/lib/components/dropdown/html/dropdown.scss +0 -3
  15. package/lib/components/index.js +14 -0
  16. package/lib/components/loop/roster-for-loop/roster-table.js +0 -1
  17. package/lib/components/loop/roster-for-loop/roster.scss +0 -3
  18. package/lib/components/modal-controls/modal-controls.spec.js +0 -14
  19. package/lib/components/pairwise-links/pairwise-links.js +0 -1
  20. package/lib/components/questions/question-context.js +21 -7
  21. package/lib/components/questions/question-context.scss +1 -0
  22. package/lib/components/questions/question-information.js +19 -5
  23. package/lib/components/questions/question-information.scss +1 -0
  24. package/lib/components/roundabout/components/roundabout.scss +0 -3
  25. package/lib/components/sequence/html/sequence.js +13 -6
  26. package/lib/components/sequence/html/sequence.scss +13 -0
  27. package/lib/components/sequence/lunatic-sequence.js +1 -5
  28. package/lib/components/sequence/sequence.spec.js +0 -3
  29. package/lib/components/suggester/html/default-style.scss +1 -6
  30. package/lib/components/suggester/idb-suggester/check-store.js +2 -1
  31. package/lib/components/suggester-loader-widget/loader-row.js +2 -1
  32. package/lib/components/switch/html/switch.scss +0 -2
  33. package/lib/components/switch/lunatic-switch.js +1 -1
  34. package/lib/src/components/commons/components/lunatic-component-without-label.d.ts +1 -1
  35. package/lib/src/components/commons/components/orchestrated-component.d.ts +1 -1
  36. package/lib/src/components/commons/create-row-orchestrator.d.ts +2 -2
  37. package/lib/src/components/component-set/html/component-set-components.d.ts +3 -2
  38. package/lib/src/components/index.d.ts +2 -0
  39. package/lib/src/components/loop/commons/handle-row-button.d.ts +1 -2
  40. package/lib/src/components/questions/question-context.d.ts +1 -2
  41. package/lib/src/components/questions/question-information.d.ts +1 -2
  42. package/lib/src/components/sequence/html/sequence.d.ts +1 -1
  43. package/lib/src/components/sequence/lunatic-sequence.d.ts +1 -1
  44. package/lib/src/components/suggester/idb-suggester/suggester-notification.d.ts +1 -3
  45. package/lib/src/components/type.d.ts +2 -3
  46. package/lib/src/hooks/use-ref-sync.d.ts +1 -1
  47. package/lib/src/use-lunatic/reducer/commons/resize-array-variable.d.ts +1 -1
  48. package/lib/src/utils/logger.d.ts +6 -0
  49. package/lib/stories/component-set/data2.json +7 -0
  50. package/lib/stories/component-set/source2.json +31 -31
  51. package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +0 -1
  52. package/lib/stories/input/input.stories.js +9 -1
  53. package/lib/stories/input/source-with-question.json +74 -0
  54. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +2 -1
  55. package/lib/stories/sequence/afterInSeq.json +293 -0
  56. package/lib/stories/sequence/sequence.stories.js +12 -8
  57. package/lib/stories/sequence/source-declarations.json +9 -0
  58. package/lib/stories/suggester/suggester-workers.stories.js +6 -5
  59. package/lib/stories/suggester/suggester.stories.js +0 -1
  60. package/lib/stories/utils/orchestrator.js +4 -3
  61. package/lib/use-lunatic/commons/calculated-variables.js +1 -1
  62. package/lib/use-lunatic/commons/compile-controls.js +1 -1
  63. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +1 -4
  64. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +1 -1
  65. package/lib/use-lunatic/commons/load-suggesters.js +46 -46
  66. package/lib/utils/logger.js +44 -0
  67. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +2 -1
  68. package/lib/utils/suggester-workers/create-worker-ts.js +2 -1
  69. package/lib/utils/suggester-workers/create-worker.js +2 -1
  70. package/package.json +1 -1
  71. package/lib/components/questions/type.js +0 -5
  72. package/lib/src/components/questions/type.d.ts +0 -4
  73. package/lib/stories/sequence/source-questions.json +0 -19
@@ -1,5 +1,4 @@
1
- import { MouseEventHandler } from 'react';
2
- import { PropsWithChildren } from 'react';
1
+ import { MouseEventHandler, PropsWithChildren } from 'react';
3
2
  type Props = PropsWithChildren<{
4
3
  disabled?: boolean;
5
4
  onClick: MouseEventHandler<HTMLButtonElement | HTMLInputElement>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { MessageType } from './type';
3
2
  import './question-context.scss';
4
- declare const _default: import("react").ComponentType<MessageType>;
3
+ declare const _default: import("react").ComponentType<Pick<import("../type").LunaticBaseProps<unknown>, "label" | "description">>;
5
4
  export default _default;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { MessageType } from './type';
3
2
  import './question-information.scss';
4
- declare const _default: import("react").ComponentType<MessageType>;
3
+ declare const _default: import("react").ComponentType<Pick<import("../type").LunaticBaseProps<unknown>, "label" | "description">>;
5
4
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import './sequence.scss';
3
3
  import { LunaticBaseProps } from '../../type';
4
- declare const _default: import("react").ComponentType<Pick<LunaticBaseProps<string>, "label" | "style" | "id">>;
4
+ declare const _default: import("react").ComponentType<Pick<LunaticBaseProps<string>, "label" | "style" | "id" | "description">>;
5
5
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import { LunaticComponentProps } from '../type';
2
- declare function LunaticSequence({ declarations, label, id, style, questionContext, questionInformation, }: LunaticComponentProps<'Sequence'>): import("react/jsx-runtime").JSX.Element;
2
+ declare function LunaticSequence({ declarations, label, id, style }: LunaticComponentProps<'Sequence'>): import("react/jsx-runtime").JSX.Element;
3
3
  export default LunaticSequence;
@@ -1,7 +1,5 @@
1
- import React from 'react';
2
- import { PropsWithChildren } from 'react';
1
+ import React, { PropsWithChildren, ReactNode } from 'react';
3
2
  import { SuggesterStatus } from '../../../use-lunatic/use-suggesters';
4
- import { ReactNode } from 'react';
5
3
  type Props = PropsWithChildren<{
6
4
  status: SuggesterStatus;
7
5
  storeName: string;
@@ -36,8 +36,6 @@ export type LunaticBaseProps<ValueType = unknown> = {
36
36
  executeExpression: LunaticState['executeExpression'];
37
37
  features?: string[];
38
38
  componentType?: string;
39
- questionContext?: ReactNode;
40
- questionInformation?: ReactNode;
41
39
  };
42
40
  export type SuggesterOption = {
43
41
  children?: string[];
@@ -69,8 +67,9 @@ type ComponentPropsByType = {
69
67
  name: string;
70
68
  };
71
69
  };
72
- Sequence: Pick<LunaticBaseProps<string>, 'id' | 'declarations' | 'label' | 'style' | 'questionContext' | 'questionInformation'>;
70
+ Sequence: Pick<LunaticBaseProps<string>, 'id' | 'declarations' | 'label' | 'style'>;
73
71
  Subsequence: Pick<LunaticBaseProps<string>, 'id' | 'declarations' | 'label'>;
72
+ Question: Pick<LunaticBaseProps<unknown>, 'label' | 'description'>;
74
73
  ComponentSet: LunaticBaseProps<unknown> & {
75
74
  components: LunaticComponentDefinition[];
76
75
  value: Record<string, unknown>;
@@ -2,4 +2,4 @@
2
2
  /**
3
3
  * useRef, but keep the value in sync on every render
4
4
  */
5
- export declare function useRefSync<T extends unknown>(value: T): import("react").MutableRefObject<T>;
5
+ export declare function useRefSync<T>(value: T): import("react").MutableRefObject<T>;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Cast the variable into an array and adjust the length if necessary
3
3
  */
4
- declare function resizeArrayVariable<T extends unknown = unknown>(array: unknown, length: number, defaultValue?: T): T[];
4
+ declare function resizeArrayVariable<T = unknown>(array: unknown, length: number, defaultValue?: T): T[];
5
5
  export default resizeArrayVariable;
@@ -0,0 +1,6 @@
1
+ export declare class Logger {
2
+ static info(...args: unknown[]): void;
3
+ static error(...args: unknown[]): void;
4
+ static log(...args: unknown[]): void;
5
+ static warn(...args: unknown[]): void;
6
+ }
@@ -1,5 +1,12 @@
1
1
  {
2
2
  "COLLECTED": {
3
+ "NB_HAB": {
4
+ "EDITED": null,
5
+ "FORCED": null,
6
+ "INPUTED": null,
7
+ "PREVIOUS": null,
8
+ "COLLECTED": 2
9
+ },
3
10
  "PRENOM": {
4
11
  "EDITED": [null],
5
12
  "FORCED": [null],
@@ -115,41 +115,11 @@
115
115
  "depth": 1,
116
116
  "conditionFilter": { "value": "true", "type": "VTL" },
117
117
  "label": {
118
- "value": "\"## Who are you? <- this is inside a roundabout ->\"",
118
+ "value": "\"## Who are you?\"",
119
119
  "type":"VTL|MD"
120
120
  },
121
121
  "description": { "value": "\"This is your opportunity to tell me about yourself!\"", "type": "VTL|MD" },
122
122
  "components": [
123
- {
124
- "id": "color",
125
- "componentType": "Input",
126
- "mandatory": false,
127
- "maxLength": 20,
128
- "label": {
129
- "value": "\"Favourite Color?\"))",
130
- "type": "VTL|MD"
131
- },
132
- "conditionFilter": {
133
- "value": "true",
134
- "type": "VTL"
135
- },
136
- "controls": [
137
- {
138
- "criticality": "WARN",
139
- "errorMessage": {
140
- "type": "VTL",
141
- "value": "\"booleen pas coché et on affiche un message un peu long histoire de tester le truc \""
142
- },
143
- "typeOfControl": "CONSISTENCY",
144
- "control": {
145
- "type": "VTL",
146
- "value": "false"
147
- },
148
- "id": "kfxmjupm-CI-0"
149
- }
150
- ],
151
- "response": { "name": "COLOR" }
152
- },
153
123
  {
154
124
  "id": "sexe",
155
125
  "componentType": "Radio",
@@ -173,6 +143,36 @@
173
143
  ],
174
144
  "response": { "name": "SEXE" }
175
145
  },
146
+ {
147
+ "id": "color",
148
+ "componentType": "Input",
149
+ "mandatory": false,
150
+ "maxLength": 20,
151
+ "label": {
152
+ "value": "\"Favourite Color?\"))",
153
+ "type": "VTL|MD"
154
+ },
155
+ "conditionFilter": {
156
+ "value": "not(isnull(SEXE))",
157
+ "type": "VTL"
158
+ },
159
+ "controls": [
160
+ {
161
+ "id": "j4nw5cqz",
162
+ "typeOfControl": "CONSISTENCY",
163
+ "criticality": "WARN",
164
+ "control": {
165
+ "value": "COLOR <> \"Green\"",
166
+ "type": "VTL"
167
+ },
168
+ "errorMessage": {
169
+ "value": "\"Green is the worst colour!!!\"",
170
+ "type": "VTL|MD"
171
+ }
172
+ }
173
+ ],
174
+ "response": { "name": "COLOR" }
175
+ },
176
176
  {
177
177
  "id": "j4nw5cqz",
178
178
  "componentType": "Dropdown",
@@ -258,7 +258,6 @@ function SuggesterMui(_ref7) {
258
258
  var onChangeEx = (0, _react.useCallback)(function (e) {
259
259
  onChange(e.target.value);
260
260
  setSearch(e.target.value);
261
- console.log(e.target.value);
262
261
  }, [onChange]);
263
262
  var onDelete = (0, _react.useCallback)(function () {
264
263
  setSearch('');
@@ -3,10 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.Default = void 0;
6
+ exports["default"] = exports.WithQuestion = 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"));
10
11
  var _data = _interopRequireDefault(require("./data"));
11
12
  var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
12
13
  var _jsxRuntime = require("react/jsx-runtime");
@@ -33,4 +34,11 @@ Default.args = {
33
34
  id: 'input',
34
35
  source: _source["default"],
35
36
  data: _data["default"]
37
+ };
38
+ var WithQuestion = Template.bind({});
39
+ exports.WithQuestion = WithQuestion;
40
+ WithQuestion.args = {
41
+ id: 'input',
42
+ source: _sourceWithQuestion["default"],
43
+ data: _data["default"]
36
44
  };
@@ -0,0 +1,74 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "componentType": "QuestionInformation",
5
+ "label": { "value": "\"Question Information\"", "type": "VTL|MD" },
6
+ "description": { "value": "\"Question Information description\"", "type": "VTL|MD" },
7
+ "page": "1"
8
+ },
9
+ {
10
+ "componentType": "Input",
11
+ "label": {
12
+ "value": "\"Prénom de l'occupant principal.\"",
13
+ "type": "VTL|MD"
14
+ },
15
+ "conditionFilter": { "value": "true", "type": "VTL" },
16
+ "maxLength": 30,
17
+ "id": "name",
18
+ "response": {
19
+ "name": "PRENOM"
20
+ },
21
+ "page": "1"
22
+ },
23
+ {
24
+ "componentType": "QuestionContext",
25
+ "label": { "value": "\"Question Context\"", "type": "VTL|MD" },
26
+ "description": { "value": "\"Question Context description\"", "type": "VTL|MD" },
27
+ "page": "1"
28
+ },
29
+ {
30
+ "componentType": "Input",
31
+ "label": {
32
+ "value": "\"Nom de l'occupant principal.\"",
33
+ "type": "VTL|MD"
34
+ },
35
+ "conditionFilter": { "value": "true", "type": "VTL" },
36
+ "maxLength": 30,
37
+ "id": "surname",
38
+ "description": {
39
+ "value": "\"For example, Bob.\"",
40
+ "type": "VTL|MD"
41
+ },
42
+ "response": {
43
+ "name": "NOM"
44
+ },
45
+ "page": "1"
46
+ }
47
+ ],
48
+ "variables": [
49
+ {
50
+ "variableType": "COLLECTED",
51
+ "name": "NOM",
52
+ "componentRef": "name",
53
+ "values": {
54
+ "PREVIOUS": null,
55
+ "COLLECTED": null,
56
+ "FORCED": null,
57
+ "EDITED": null,
58
+ "INPUTED": null
59
+ }
60
+ },
61
+ {
62
+ "variableType": "COLLECTED",
63
+ "name": "PRENOM",
64
+ "componentRef": "name",
65
+ "values": {
66
+ "PREVIOUS": null,
67
+ "COLLECTED": null,
68
+ "FORCED": null,
69
+ "EDITED": null,
70
+ "INPUTED": null
71
+ }
72
+ }
73
+ ]
74
+ }
@@ -10,6 +10,7 @@ var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-t
10
10
  var _e2e = require("../../../../tests/utils/e2e");
11
11
  var _source = _interopRequireDefault(require("./source"));
12
12
  var _timer = require("../../../../tests/utils/timer");
13
+ var _logger = require("../../../utils/logger");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
16
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -535,7 +536,7 @@ With_Missing.args = {
535
536
  pagination: true,
536
537
  missing: true,
537
538
  missingStrategy: function missingStrategy() {
538
- console.log('your strategy has been applied');
539
+ _logger.Logger.info('your strategy has been applied');
539
540
  },
540
541
  dontKnowButton: 'I dunno',
541
542
  refusedButton: 'Oh no!',
@@ -0,0 +1,293 @@
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
+ }
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.WithQuestions = exports.WithDeclarations = void 0;
6
+ exports["default"] = exports.afterSeq = 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 _sourceQuestions = _interopRequireDefault(require("./source-questions.json"));
10
+ var _afterInSeq = _interopRequireDefault(require("./afterInSeq.json"));
11
11
  var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -16,7 +16,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
16
16
  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
17
  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
18
  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); }
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); } // import sourceQuestions from './source-questions.json';
20
20
  var stories = {
21
21
  title: 'Components/Sequence',
22
22
  component: _orchestrator["default"],
@@ -33,9 +33,13 @@ WithDeclarations.args = {
33
33
  id: 'sequence-declarations',
34
34
  source: _sourceDeclarations["default"]
35
35
  };
36
- var WithQuestions = Template.bind({});
37
- exports.WithQuestions = WithQuestions;
38
- WithQuestions.args = {
39
- id: 'sequence-questions',
40
- source: _sourceQuestions["default"]
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"]
41
45
  };
@@ -16,6 +16,15 @@
16
16
  "type": "VTL|MD"
17
17
  }
18
18
  },
19
+ {
20
+ "id": "kb9hi4j0-krnoclfe",
21
+ "declarationType": "INSTRUCTION",
22
+ "position": "AFTER_QUESTION_TEXT",
23
+ "label": {
24
+ "value": "\"Déclaration AFTER\"",
25
+ "type": "VTL|MD"
26
+ }
27
+ },
19
28
  {
20
29
  "id": "kb9hi4j0-krnoclfe",
21
30
  "declarationType": "HELP",