@inseefr/lunatic 3.4.13 → 3.4.15

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 (196) hide show
  1. package/components/shared/Label/Label.js +1 -1
  2. package/components/shared/Label/Label.js.map +1 -1
  3. package/components/shared/Label/Label.spec.js +11 -3
  4. package/components/shared/Label/Label.spec.js.map +1 -1
  5. package/components/type.d.ts +1 -0
  6. package/esm/components/shared/Label/Label.js +1 -1
  7. package/esm/components/shared/Label/Label.js.map +1 -1
  8. package/esm/components/shared/Label/Label.spec.js +11 -3
  9. package/esm/components/shared/Label/Label.spec.js.map +1 -1
  10. package/esm/components/type.d.ts +1 -0
  11. package/esm/tests/utils/lunatic.d.ts +0 -4
  12. package/esm/tests/utils/lunatic.js +0 -4
  13. package/esm/tests/utils/lunatic.js.map +1 -1
  14. package/esm/type.source.d.ts +1 -5
  15. package/esm/use-lunatic/commons/variables/get-questionnaire-data.js +0 -8
  16. package/esm/use-lunatic/commons/variables/get-questionnaire-data.js.map +1 -1
  17. package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.js +0 -8
  18. package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.js.map +1 -1
  19. package/esm/use-lunatic/hooks/use-page-has-response.js +45 -35
  20. package/esm/use-lunatic/hooks/use-page-has-response.js.map +1 -1
  21. package/esm/use-lunatic/props/getComponentTypeProps.d.ts +1 -0
  22. package/esm/use-lunatic/type.d.ts +0 -4
  23. package/esm/utils/constants/variable-status.d.ts +0 -4
  24. package/esm/utils/constants/variable-status.js +0 -4
  25. package/esm/utils/constants/variable-status.js.map +1 -1
  26. package/esm/utils/variables.spec.js +0 -8
  27. package/esm/utils/variables.spec.js.map +1 -1
  28. package/package.json +2 -57
  29. package/src/components/Input/__snapshots__/Input.spec.tsx.snap +11 -0
  30. package/src/components/shared/Label/Label.spec.tsx +15 -3
  31. package/src/components/shared/Label/Label.tsx +1 -1
  32. package/src/components/type.ts +1 -0
  33. package/src/stories/accordion/source.json +1 -5
  34. package/src/stories/behaviour/cleaning/source-loop.json +3 -15
  35. package/src/stories/behaviour/cleaning/source.json +2 -10
  36. package/src/stories/behaviour/controls/boucles-n.json +2 -10
  37. package/src/stories/behaviour/controls/loop.json +2 -10
  38. package/src/stories/behaviour/controls/roundabout.json +3 -15
  39. package/src/stories/behaviour/controls/simple-numeric.json +19 -95
  40. package/src/stories/behaviour/controls/simple.json +7 -35
  41. package/src/stories/behaviour/filter/dataLoop.json +0 -8
  42. package/src/stories/behaviour/filter/source.json +0 -12
  43. package/src/stories/behaviour/filter/sourceLoop.json +0 -12
  44. package/src/stories/behaviour/missing/source.json +12 -60
  45. package/src/stories/behaviour/others/V2_DeclarationsSimples.json +14 -70
  46. package/src/stories/behaviour/others/V2_MinMaxSum_Boucles.json +5 -25
  47. package/src/stories/behaviour/others/V2_QuestSimple_Boucles.json +107 -535
  48. package/src/stories/behaviour/others/V2_TCMRallyeGames.json +33 -165
  49. package/src/stories/behaviour/others/test-dylan.json +5 -25
  50. package/src/stories/behaviour/paste/source.json +1 -5
  51. package/src/stories/behaviour/performance/source.json +4 -20
  52. package/src/stories/behaviour/resizing/source-resizing-cleaning.json +2 -10
  53. package/src/stories/behaviour/resizing/source.json +5 -25
  54. package/src/stories/checkbox-boolean/source.json +1 -5
  55. package/src/stories/checkbox-group/source.json +16 -80
  56. package/src/stories/checkbox-group/sourceCondition.json +3 -15
  57. package/src/stories/checkbox-group/sourceDetail.json +18 -90
  58. package/src/stories/checkbox-group/sourceLoop.json +2 -10
  59. package/src/stories/checkbox-one/source.json +1 -5
  60. package/src/stories/checkbox-one/sourceDetail.json +2 -10
  61. package/src/stories/date-picker/source.json +1 -5
  62. package/src/stories/declaration/source.json +2 -10
  63. package/src/stories/disabled/data.json +0 -16
  64. package/src/stories/disabled/source.json +7 -35
  65. package/src/stories/dropdown/data.json +2 -10
  66. package/src/stories/dropdown/source.json +2 -10
  67. package/src/stories/duration/mois.json +1 -5
  68. package/src/stories/duration/time.json +1 -5
  69. package/src/stories/filter-description/source-options.json +3 -15
  70. package/src/stories/input/source.json +1 -5
  71. package/src/stories/input-number/source-big-number.json +1 -5
  72. package/src/stories/input-number/source-euro.json +1 -5
  73. package/src/stories/input-number/source.json +1 -5
  74. package/src/stories/loop/source-bloc.json +2 -10
  75. package/src/stories/loop/source-paginated.json +2 -10
  76. package/src/stories/loop/source-roster.json +2 -10
  77. package/src/stories/loop/source-with-header.json +2 -10
  78. package/src/stories/overview/dataLoop.json +24 -120
  79. package/src/stories/overview/source.json +1 -5
  80. package/src/stories/overview/sourceLoop.json +24 -120
  81. package/src/stories/overview/sourceWithHierarchy.json +164 -820
  82. package/src/stories/pairwise/source.json +5 -25
  83. package/src/stories/question/source.json +2 -10
  84. package/src/stories/questionnaires/logement/data.json +0 -1288
  85. package/src/stories/questionnaires/logement/source-sequence.json +564 -2820
  86. package/src/stories/questionnaires/logement/source-sum.json +280 -1400
  87. package/src/stories/questionnaires/logement/source.json +564 -2820
  88. package/src/stories/questionnaires/recensement/source.json +106 -530
  89. package/src/stories/questionnaires/rp/source.json +8 -40
  90. package/src/stories/questionnaires/simpsons/source.json +104 -520
  91. package/src/stories/radio/source.json +1 -5
  92. package/src/stories/radio/sourceCondition.json +2 -10
  93. package/src/stories/radio/sourceDetail.json +2 -10
  94. package/src/stories/radio/sourceHorizontal.json +1 -5
  95. package/src/stories/roundabout/data1.json +0 -12
  96. package/src/stories/roundabout/data2.json +0 -16
  97. package/src/stories/roundabout/source.json +7 -35
  98. package/src/stories/suggester/source-arbitrary-response.json +6 -30
  99. package/src/stories/suggester/source-error.json +6 -30
  100. package/src/stories/suggester/source-multiline.json +0 -16
  101. package/src/stories/suggester/source-option-responses.json +5 -25
  102. package/src/stories/suggester/source.json +7 -35
  103. package/src/stories/summary/data.json +0 -16
  104. package/src/stories/summary/source.json +7 -35
  105. package/src/stories/switch/data-forced.json +2 -10
  106. package/src/stories/switch/source.json +4 -20
  107. package/src/stories/table/source-colspan.json +8 -40
  108. package/src/stories/table/table-dynamique.json +1 -5
  109. package/src/stories/text/source-roster.json +3 -15
  110. package/src/stories/text/source-table.json +9 -45
  111. package/src/stories/textarea/source.json +1 -5
  112. package/src/tests/utils/lunatic.ts +0 -4
  113. package/src/type.source.ts +1 -5
  114. package/src/use-lunatic/__snapshots__/use-lunatic.test.ts.snap +0 -1159
  115. package/src/use-lunatic/commons/variables/get-questionnaire-data.ts +0 -12
  116. package/src/use-lunatic/commons/variables/lunatic-variables-store.spec.ts +0 -8
  117. package/src/use-lunatic/hooks/use-page-has-response.test.ts +143 -0
  118. package/src/use-lunatic/hooks/use-page-has-response.ts +61 -44
  119. package/src/use-lunatic/type.ts +0 -4
  120. package/src/use-lunatic/use-lunatic.test.ts +0 -4
  121. package/src/utils/constants/variable-status.ts +0 -4
  122. package/src/utils/variables.spec.ts +0 -8
  123. package/tests/utils/lunatic.d.ts +0 -4
  124. package/tests/utils/lunatic.js +0 -4
  125. package/tests/utils/lunatic.js.map +1 -1
  126. package/tsconfig.build.tsbuildinfo +1 -1
  127. package/type.source.d.ts +1 -5
  128. package/use-lunatic/commons/variables/get-questionnaire-data.js +0 -8
  129. package/use-lunatic/commons/variables/get-questionnaire-data.js.map +1 -1
  130. package/use-lunatic/commons/variables/lunatic-variables-store.spec.js +0 -8
  131. package/use-lunatic/commons/variables/lunatic-variables-store.spec.js.map +1 -1
  132. package/use-lunatic/hooks/use-page-has-response.js +44 -34
  133. package/use-lunatic/hooks/use-page-has-response.js.map +1 -1
  134. package/use-lunatic/props/getComponentTypeProps.d.ts +1 -0
  135. package/use-lunatic/type.d.ts +0 -4
  136. package/utils/constants/variable-status.d.ts +0 -4
  137. package/utils/constants/variable-status.js +1 -5
  138. package/utils/constants/variable-status.js.map +1 -1
  139. package/utils/variables.spec.js +0 -8
  140. package/utils/variables.spec.js.map +1 -1
  141. package/constants/component-types.d.ts +0 -1
  142. package/constants/component-types.js +0 -5
  143. package/constants/component-types.js.map +0 -1
  144. package/constants/declarations.d.ts +0 -9
  145. package/constants/declarations.js +0 -15
  146. package/constants/declarations.js.map +0 -1
  147. package/constants/event-types.d.ts +0 -10
  148. package/constants/event-types.js +0 -16
  149. package/constants/event-types.js.map +0 -1
  150. package/constants/index.d.ts +0 -5
  151. package/constants/index.js +0 -22
  152. package/constants/index.js.map +0 -1
  153. package/constants/indexedDBStore.d.ts +0 -21
  154. package/constants/indexedDBStore.js +0 -22
  155. package/constants/indexedDBStore.js.map +0 -1
  156. package/constants/supported-preferences.d.ts +0 -1
  157. package/constants/supported-preferences.js +0 -36
  158. package/constants/supported-preferences.js.map +0 -1
  159. package/constants/value-types.d.ts +0 -5
  160. package/constants/value-types.js +0 -9
  161. package/constants/value-types.js.map +0 -1
  162. package/constants/variable-types.d.ts +0 -2
  163. package/constants/variable-types.js +0 -8
  164. package/constants/variable-types.js.map +0 -1
  165. package/esm/constants/component-types.d.ts +0 -1
  166. package/esm/constants/component-types.js +0 -2
  167. package/esm/constants/component-types.js.map +0 -1
  168. package/esm/constants/declarations.d.ts +0 -9
  169. package/esm/constants/declarations.js +0 -12
  170. package/esm/constants/declarations.js.map +0 -1
  171. package/esm/constants/event-types.d.ts +0 -10
  172. package/esm/constants/event-types.js +0 -13
  173. package/esm/constants/event-types.js.map +0 -1
  174. package/esm/constants/index.d.ts +0 -5
  175. package/esm/constants/index.js +0 -6
  176. package/esm/constants/index.js.map +0 -1
  177. package/esm/constants/indexedDBStore.d.ts +0 -21
  178. package/esm/constants/indexedDBStore.js +0 -19
  179. package/esm/constants/indexedDBStore.js.map +0 -1
  180. package/esm/constants/supported-preferences.d.ts +0 -1
  181. package/esm/constants/supported-preferences.js +0 -10
  182. package/esm/constants/supported-preferences.js.map +0 -1
  183. package/esm/constants/value-types.d.ts +0 -5
  184. package/esm/constants/value-types.js +0 -6
  185. package/esm/constants/value-types.js.map +0 -1
  186. package/esm/constants/variable-types.d.ts +0 -2
  187. package/esm/constants/variable-types.js +0 -5
  188. package/esm/constants/variable-types.js.map +0 -1
  189. package/src/constants/component-types.ts +0 -1
  190. package/src/constants/declarations.ts +0 -14
  191. package/src/constants/event-types.ts +0 -13
  192. package/src/constants/index.ts +0 -5
  193. package/src/constants/indexedDBStore.ts +0 -20
  194. package/src/constants/supported-preferences.ts +0 -10
  195. package/src/constants/value-types.ts +0 -5
  196. package/src/constants/variable-types.ts +0 -4
@@ -13,10 +13,6 @@ export function getQuestionnaireData(
13
13
  COLLECTED: {} as Record<
14
14
  string,
15
15
  {
16
- EDITED: unknown;
17
- FORCED: unknown;
18
- INPUTTED: unknown;
19
- PREVIOUS: unknown;
20
16
  COLLECTED: unknown;
21
17
  }
22
18
  >,
@@ -34,10 +30,6 @@ export function getQuestionnaireData(
34
30
  variableNames.map((name) => [
35
31
  name,
36
32
  {
37
- EDITED: null,
38
- FORCED: null,
39
- INPUTTED: null,
40
- PREVIOUS: null,
41
33
  COLLECTED: store.get(name),
42
34
  },
43
35
  ])
@@ -53,10 +45,6 @@ export function getQuestionnaireData(
53
45
 
54
46
  if (variable.variableType === 'COLLECTED') {
55
47
  result.COLLECTED[variable.name] = {
56
- PREVIOUS: null,
57
- FORCED: null,
58
- EDITED: null,
59
- INPUTTED: null,
60
48
  ...variable.values,
61
49
  COLLECTED: store.get(variable.name),
62
50
  };
@@ -449,10 +449,6 @@ describe('lunatic-variables-store', () => {
449
449
  {
450
450
  name: 'PRENOM',
451
451
  values: {
452
- EDITED: null,
453
- FORCED: null,
454
- INPUTTED: null,
455
- PREVIOUS: null,
456
452
  COLLECTED: 'John',
457
453
  },
458
454
  variableType: 'COLLECTED',
@@ -460,10 +456,6 @@ describe('lunatic-variables-store', () => {
460
456
  {
461
457
  name: 'NOM',
462
458
  values: {
463
- EDITED: null,
464
- FORCED: null,
465
- INPUTTED: null,
466
- PREVIOUS: null,
467
459
  COLLECTED: '',
468
460
  },
469
461
  variableType: 'COLLECTED',
@@ -0,0 +1,143 @@
1
+ import { describe, expect, it, vi } from 'vitest';
2
+ import { usePageHasResponse } from './use-page-has-response';
3
+ import { type LunaticComponentProps } from '../../components/type';
4
+ import { renderHook } from '@testing-library/react';
5
+
6
+ const defaultComponentValues = {
7
+ id: 'a',
8
+ value: null,
9
+ handleChanges: vi.fn(),
10
+ };
11
+
12
+ describe('usePageHasResponse', () => {
13
+ it('should be true when there are no components', () => {
14
+ const components: LunaticComponentProps[] = [];
15
+ const { result } = renderHook(() =>
16
+ usePageHasResponse(components, vi.fn())
17
+ );
18
+ expect(result.current()).toBeTruthy();
19
+ });
20
+
21
+ it('should be false when there is no value', () => {
22
+ const components: LunaticComponentProps[] = [
23
+ { ...defaultComponentValues, componentType: 'Text' },
24
+ ];
25
+ const { result } = renderHook(() =>
26
+ usePageHasResponse(components, vi.fn())
27
+ );
28
+ expect(result.current()).toBeFalsy();
29
+ });
30
+
31
+ it('should be true when there is a value', () => {
32
+ const components: LunaticComponentProps[] = [
33
+ {
34
+ ...defaultComponentValues,
35
+ componentType: 'Text',
36
+ value: 'my awesome value',
37
+ },
38
+ ];
39
+ const { result } = renderHook(() =>
40
+ usePageHasResponse(components, vi.fn())
41
+ );
42
+ expect(result.current()).toBeTruthy();
43
+ });
44
+
45
+ it('should be true for a Question component', () => {
46
+ const components: LunaticComponentProps[] = [
47
+ {
48
+ ...defaultComponentValues,
49
+ componentType: 'Question',
50
+ components: [
51
+ {
52
+ ...defaultComponentValues,
53
+ componentType: 'Text',
54
+ },
55
+ ],
56
+ value: { t1: 'my awesome value' },
57
+ },
58
+ ];
59
+ const { result } = renderHook(() =>
60
+ usePageHasResponse(components, vi.fn())
61
+ );
62
+ expect(result.current()).toBeTruthy();
63
+ });
64
+
65
+ it('should be true when there is a missing response', () => {
66
+ const components: LunaticComponentProps[] = [
67
+ {
68
+ ...defaultComponentValues,
69
+ componentType: 'Text',
70
+ missingResponse: { name: 'a_MISSING', value: 'my missing value' },
71
+ },
72
+ ];
73
+ const { result } = renderHook(() =>
74
+ usePageHasResponse(components, vi.fn())
75
+ );
76
+ expect(result.current()).toBeTruthy();
77
+ });
78
+
79
+ it('should be true for a QCM table', () => {
80
+ const mockExecuteExpression = vi.fn();
81
+ mockExecuteExpression.mockReturnValueOnce('my value');
82
+ const components: LunaticComponentProps[] = [
83
+ {
84
+ ...defaultComponentValues,
85
+ componentType: 'Table',
86
+ body: [
87
+ [
88
+ {
89
+ ...defaultComponentValues,
90
+ id: 't1',
91
+ componentType: 'CheckboxBoolean',
92
+ response: { name: 't1' },
93
+ },
94
+ ],
95
+ ],
96
+ header: [{ label: 'my label' }],
97
+ executeExpression: vi.fn(),
98
+ iteration: 0,
99
+ value: {},
100
+ },
101
+ ];
102
+ const { result } = renderHook(() =>
103
+ usePageHasResponse(components, mockExecuteExpression)
104
+ );
105
+ expect(result.current()).toBeTruthy();
106
+ });
107
+
108
+ it('should be true for a QCM table in a Question', () => {
109
+ const mockExecuteExpression = vi.fn();
110
+ mockExecuteExpression.mockReturnValueOnce('my value');
111
+ const components: LunaticComponentProps[] = [
112
+ {
113
+ ...defaultComponentValues,
114
+ componentType: 'Question',
115
+ components: [
116
+ {
117
+ ...defaultComponentValues,
118
+ componentType: 'Table',
119
+ body: [
120
+ [
121
+ {
122
+ ...defaultComponentValues,
123
+ id: 't1',
124
+ componentType: 'CheckboxBoolean',
125
+ response: { name: 't1' },
126
+ },
127
+ ],
128
+ ],
129
+ header: [{ label: 'my label' }],
130
+ executeExpression: vi.fn(),
131
+ iteration: 0,
132
+ value: { t1: true },
133
+ },
134
+ ],
135
+ value: {},
136
+ },
137
+ ];
138
+ const { result } = renderHook(() =>
139
+ usePageHasResponse(components, mockExecuteExpression)
140
+ );
141
+ expect(result.current()).toBeTruthy();
142
+ });
143
+ });
@@ -11,59 +11,76 @@ export function usePageHasResponse(
11
11
  executeExpression: LunaticReducerState['executeExpression']
12
12
  ): () => boolean {
13
13
  return useCallback(() => {
14
- if (!Array.isArray(components) || components.length === 0) {
14
+ return hasOneResponse(components, executeExpression);
15
+ }, [components, executeExpression]);
16
+ }
17
+
18
+ function hasOneResponse(
19
+ components: LunaticComponentProps[],
20
+ executeExpression: LunaticReducerState['executeExpression']
21
+ ): boolean {
22
+ if (!Array.isArray(components) || components.length === 0) {
23
+ return true;
24
+ }
25
+
26
+ for (const component of components) {
27
+ // Some components are considered as "filled" by default
28
+ // We assume they are not in the same page has other components
29
+ if (
30
+ ['PairwiseLinks', 'Roundabout', 'Sequence', 'Subsequence'].includes(
31
+ component.componentType ?? ''
32
+ )
33
+ ) {
15
34
  return true;
16
35
  }
17
36
 
18
- for (const component of components) {
19
- // Some components are considered as "filled" by default
20
- // We assume they are not in the same page has other components
21
- if (
22
- ['PairwiseLinks', 'Roundabout', 'Sequence', 'Subsequence'].includes(
23
- component.componentType ?? ''
24
- )
25
- ) {
26
- return true;
27
- }
37
+ // We have a missing response for this component
38
+ if (
39
+ 'missingResponse' in component &&
40
+ component.missingResponse &&
41
+ component.missingResponse.value
42
+ ) {
43
+ return true;
44
+ }
28
45
 
29
- // We have a missing response for this component
30
- if (
31
- 'missingResponse' in component &&
32
- component.missingResponse &&
33
- component.missingResponse.value
34
- ) {
35
- return true;
36
- }
46
+ // For Table, we have to extract components from its body and apply isSubComponentsEmpty function
47
+ if (component.componentType === 'Table') {
48
+ // Body is array for array (row), each "cell" could be an Label or Component, so we filter array.
49
+ const childrenComponent = component.body.reduce((_, row) => {
50
+ const componentsInRow = row.filter(
51
+ (cell) => isObject(cell) && 'componentType' in cell
52
+ );
53
+ return [..._, ...componentsInRow];
54
+ }, [] as LunaticComponentProps[]);
55
+ return !isSubComponentsEmpty(childrenComponent, executeExpression);
56
+ }
37
57
 
38
- // For Table, we have to extract components from its body and apply isSubComponentsEmpty function
39
- if (component.componentType === 'Table') {
40
- // Body is array for array (row), each "cell" could be an Label or Component, so we filter array.
41
- const childrenComponent = component.body.reduce((_, row) => {
42
- const componentsInRow = row.filter(
43
- (cell) => isObject(cell) && 'componentType' in cell
44
- );
45
- return [..._, ...componentsInRow];
46
- }, [] as LunaticComponentProps[]);
47
- return !isSubComponentsEmpty(childrenComponent, executeExpression);
48
- }
58
+ // We found a value in one of the root component
59
+ if ('value' in component && !isEmpty(component.value)) {
60
+ return true;
61
+ }
49
62
 
50
- // We found a value in one of the root component
51
- if ('value' in component && !isEmpty(component.value)) {
52
- return true;
53
- }
63
+ // For Question, we need to check subcomponents
64
+ if (
65
+ component.componentType === 'Question' &&
66
+ 'components' in component &&
67
+ Array.isArray(component.components) &&
68
+ hasOneResponse(component.components, executeExpression)
69
+ ) {
70
+ return true;
71
+ }
54
72
 
55
- // For rosterForLoop we need to inspect child components
56
- if (
57
- 'components' in component &&
58
- Array.isArray(component.components) &&
59
- !isSubComponentsEmpty(component.components, executeExpression)
60
- ) {
61
- return true;
62
- }
73
+ // For rosterForLoop we need to inspect child components
74
+ if (
75
+ 'components' in component &&
76
+ Array.isArray(component.components) &&
77
+ !isSubComponentsEmpty(component.components, executeExpression)
78
+ ) {
79
+ return true;
63
80
  }
81
+ }
64
82
 
65
- return false;
66
- }, [components, executeExpression]);
83
+ return false;
67
84
  }
68
85
 
69
86
  /**
@@ -74,10 +74,6 @@ export type PageTag = `${number}.${number}#${number}` | `${number}`;
74
74
  export type LunaticVariable = Variable;
75
75
  export type LunaticCollectedValue = Partial<{
76
76
  COLLECTED: unknown;
77
- EDITED: unknown;
78
- FORCED: unknown;
79
- INPUTTED: unknown;
80
- PREVIOUS: unknown;
81
77
  }>;
82
78
 
83
79
  // We need a mapped type to correlate type and variableType
@@ -20,10 +20,6 @@ const dataFromObject = (o: Record<string, unknown>): LunaticData => {
20
20
  (acc, k) => ({
21
21
  ...acc,
22
22
  [k]: {
23
- EDITED: null,
24
- FORCED: null,
25
- INPUTTED: null,
26
- PREVIOUS: null,
27
23
  COLLECTED: o[k],
28
24
  },
29
25
  }),
@@ -1,5 +1 @@
1
- export const PREVIOUS = 'PREVIOUS' as const;
2
1
  export const COLLECTED = 'COLLECTED' as const;
3
- export const FORCED = 'FORCED' as const;
4
- export const EDITED = 'EDITED' as const;
5
- export const INPUTTED = 'INPUTTED' as const;
@@ -15,10 +15,6 @@ const data = {
15
15
  },
16
16
  PRENOMS: {
17
17
  COLLECTED: ['Paul', 'Pierre'],
18
- EDITED: [],
19
- INPUTTED: [],
20
- FORCED: [],
21
- PREVIOUS: [],
22
18
  },
23
19
  AGE: {},
24
20
  },
@@ -49,10 +45,6 @@ const loopCollectedVariable = {
49
45
  variableType: 'COLLECTED',
50
46
  values: {
51
47
  COLLECTED: [],
52
- PREVIOUS: [],
53
- FORCED: [],
54
- EDITED: [],
55
- INPUTTED: [],
56
48
  },
57
49
  name: 'PRENOMS',
58
50
  } as LunaticVariable;
@@ -10,10 +10,6 @@ export declare function generateVariable({ type, name }: {
10
10
  variableType: string;
11
11
  name: string;
12
12
  values: {
13
- PREVIOUS: null;
14
13
  COLLECTED: null;
15
- FORCED: null;
16
- EDITED: null;
17
- INPUTTED: null;
18
14
  };
19
15
  };
@@ -24,11 +24,7 @@ function generateVariable({ type = 'COLLECTED', name = 'VARIABLE' }) {
24
24
  variableType: type,
25
25
  name: name,
26
26
  values: {
27
- PREVIOUS: null,
28
27
  COLLECTED: null,
29
- FORCED: null,
30
- EDITED: null,
31
- INPUTTED: null,
32
28
  },
33
29
  };
34
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lunatic.js","sourceRoot":"","sources":["../../src/tests/utils/lunatic.ts"],"names":[],"mappings":";;AAKA,oCAiBC;AAED,4CAYC;AAlCD;;GAEG;AACH,SAAgB,YAAY,CAC3B,IAAO;IAEP,OAAO;QACN,SAAS,EAAE,MAAM,CAAC,WAAW,CAC5B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YAC1C,GAAG;YACH;gBACC,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,KAAK;aAChB;SACD,CAAC,CACqB;QACxB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACZ,CAAC;AACH,CAAC;AAED,SAAgB,gBAAgB,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,IAAI,GAAG,UAAU,EAAE;IACzE,OAAO;QACN,YAAY,EAAE,IAAI;QAClB,IAAI,EAAE,IAAI;QACV,MAAM,EAAE;YACP,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,IAAI;SACd;KACD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"lunatic.js","sourceRoot":"","sources":["../../src/tests/utils/lunatic.ts"],"names":[],"mappings":";;AAKA,oCAiBC;AAED,4CAQC;AA9BD;;GAEG;AACH,SAAgB,YAAY,CAC3B,IAAO;IAEP,OAAO;QACN,SAAS,EAAE,MAAM,CAAC,WAAW,CAC5B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YAC1C,GAAG;YACH;gBACC,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,KAAK;aAChB;SACD,CAAC,CACqB;QACxB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACZ,CAAC;AACH,CAAC;AAED,SAAgB,gBAAgB,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,IAAI,GAAG,UAAU,EAAE;IACzE,OAAO;QACN,YAAY,EAAE,IAAI;QAClB,IAAI,EAAE,IAAI;QACV,MAAM,EAAE;YACP,SAAS,EAAE,IAAI;SACf;KACD,CAAC;AACH,CAAC"}