@inseefr/lunatic 3.0.0-rc.1 → 3.0.0-rc.10

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 (185) hide show
  1. package/lib/components/CheckboxBoolean/CheckboxBoolean.js +39 -19
  2. package/lib/components/CheckboxGroup/CheckboxGroup.js +3 -2
  3. package/lib/components/CheckboxGroup/CustomCheckboxGroup.js +4 -5
  4. package/lib/components/CheckboxGroup/CustomCheckboxGroup.spec.js +3 -0
  5. package/lib/components/CheckboxOne/CheckboxOne.js +6 -7
  6. package/lib/components/Datepicker/Datepicker.js +43 -29
  7. package/lib/components/Dropdown/Dropdown.js +37 -37
  8. package/lib/components/Duration/Duration.js +41 -17
  9. package/lib/components/FilterDescription/FilterDescription.js +2 -3
  10. package/lib/components/Input/Input.js +39 -22
  11. package/lib/components/InputNumber/InputNumber.js +45 -35
  12. package/lib/components/InputNumber/__snapshots__/InputNumber.spec.tsx.snap +0 -2
  13. package/lib/components/Loop/Loop.js +52 -29
  14. package/lib/components/LunaticComponents.js +60 -51
  15. package/lib/components/Question/Question.js +23 -14
  16. package/lib/components/Radio/Radio.js +2 -2
  17. package/lib/components/RosterForLoop/RosterForLoop.js +13 -36
  18. package/lib/components/Roundabout/CustomRoundabout.js +2 -2
  19. package/lib/components/Roundabout/Roundabout.js +0 -1
  20. package/lib/components/Roundabout/RoundaboutItButton.js +2 -2
  21. package/lib/components/Roundabout/extra.js +6 -6
  22. package/lib/components/Sequence/Sequence.js +2 -3
  23. package/lib/components/Subsequence/Subsequence.js +2 -2
  24. package/lib/components/Subsequence/Subsequence.spec.js +1 -1
  25. package/lib/components/Suggester/CustomSuggester.js +9 -6
  26. package/lib/components/Suggester/Suggester.js +67 -4
  27. package/lib/components/Suggester/SuggesterNotification.js +2 -2
  28. package/lib/components/Summary/Summary.js +3 -3
  29. package/lib/components/Switch/Switch.js +42 -22
  30. package/lib/components/Textarea/Textarea.js +43 -24
  31. package/lib/components/library.js +0 -2
  32. package/lib/components/shared/Button/Button.js +2 -3
  33. package/lib/components/shared/Button/IconButton.js +0 -1
  34. package/lib/components/shared/Checkbox/CheckboxOption.js +2 -3
  35. package/lib/components/shared/Combobox/Combobox.js +5 -4
  36. package/lib/components/shared/Combobox/ComboboxContainer.js +2 -2
  37. package/lib/components/shared/Combobox/ComboboxContentBox.js +2 -2
  38. package/lib/components/shared/Combobox/Panel/ComboboxOption.js +2 -2
  39. package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.js +2 -2
  40. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.js +2 -2
  41. package/lib/components/shared/Combobox/Selection/ComboboxInput.js +2 -2
  42. package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.js +2 -2
  43. package/lib/components/shared/ComponentErrors/ComponentErrors.js +0 -1
  44. package/lib/components/shared/Declarations/Declarations.js +6 -7
  45. package/lib/components/shared/Declarations/Declarations.spec.js +5 -5
  46. package/lib/components/shared/Fieldset/Fieldset.js +2 -3
  47. package/lib/components/shared/HOC/{customizedComponent.js → slottableComponent.js} +35 -13
  48. package/lib/components/shared/Icons/lunatic-icon.js +0 -1
  49. package/lib/components/shared/Label/Label.js +2 -3
  50. package/lib/components/shared/MDLabel/RouterLink.js +2 -2
  51. package/lib/components/shared/Missing/Missing.js +0 -1
  52. package/lib/components/shared/ModalControls/ModalControls.js +0 -1
  53. package/lib/components/shared/Notification.js +2 -2
  54. package/lib/components/shared/Radio/RadioGroup.js +4 -4
  55. package/lib/components/shared/Radio/RadioOption.js +2 -2
  56. package/lib/components/shared/Table/Table.js +2 -3
  57. package/lib/components/shared/Table/Tbody.js +2 -2
  58. package/lib/components/shared/Table/Td.js +2 -2
  59. package/lib/components/shared/Table/Th.js +2 -2
  60. package/lib/components/shared/Table/Thead.js +2 -2
  61. package/lib/components/shared/Table/Tr.js +2 -2
  62. package/lib/components/shared/VariableStatus/VariableStatus.js +0 -1
  63. package/lib/components/shared/suggester-loader-widget/dragger/dragger.js +0 -1
  64. package/lib/components/shared/suggester-loader-widget/widget.js +0 -1
  65. package/lib/css/components/Button.scss +24 -0
  66. package/lib/css/components/CheckboxGroup.scss +13 -0
  67. package/lib/css/components/CheckboxOne.scss +19 -0
  68. package/lib/css/components/CheckboxOption.scss +19 -0
  69. package/lib/css/components/Combobox.scss +206 -0
  70. package/lib/css/components/ComponentErrors.scss +5 -0
  71. package/lib/css/components/Datepicker.scss +19 -0
  72. package/lib/css/components/Declarations.scss +42 -0
  73. package/lib/css/components/Dragger.scss +8 -0
  74. package/lib/css/components/Dropdown.scss +38 -0
  75. package/lib/css/components/Duration.scss +9 -0
  76. package/lib/css/components/Fieldset.scss +5 -0
  77. package/lib/css/components/IconButton.scss +38 -0
  78. package/lib/css/components/Input.scss +42 -0
  79. package/lib/css/components/InputNumber.scss +11 -0
  80. package/lib/css/components/Label.scss +6 -0
  81. package/lib/css/components/Missing.scss +27 -0
  82. package/lib/css/components/ModalControls.scss +48 -0
  83. package/lib/css/components/RadioGroup.scss +21 -0
  84. package/lib/css/components/RosterForLoop.scss +39 -0
  85. package/lib/css/components/Roundabout.scss +13 -0
  86. package/lib/css/components/Sequence.scss +10 -0
  87. package/lib/css/components/Suggester.scss +170 -0
  88. package/lib/css/components/SuggesterWidget.scss +176 -0
  89. package/lib/css/components/Table.scss +27 -0
  90. package/lib/css/components/Textarea.scss +8 -0
  91. package/lib/css/components/VariableStatus.scss +36 -0
  92. package/lib/css/main.scss +181 -0
  93. package/lib/hooks/useSuggesterInfo.js +14 -12
  94. package/lib/main.css +1063 -0
  95. package/lib/main.css.map +1 -0
  96. package/lib/src/components/CheckboxBoolean/CheckboxBoolean.d.ts +10 -5
  97. package/lib/src/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  98. package/lib/src/components/CheckboxOne/CheckboxOne.d.ts +5 -12
  99. package/lib/src/components/Datepicker/Datepicker.d.ts +8 -10
  100. package/lib/src/components/Dropdown/Dropdown.d.ts +9 -12
  101. package/lib/src/components/Duration/Duration.d.ts +9 -7
  102. package/lib/src/components/FilterDescription/FilterDescription.d.ts +1 -1
  103. package/lib/src/components/Input/Input.d.ts +9 -8
  104. package/lib/src/components/InputNumber/InputNumber.d.ts +9 -10
  105. package/lib/src/components/Loop/Loop.d.ts +11 -18
  106. package/lib/src/components/LunaticComponents.d.ts +4 -2
  107. package/lib/src/components/Question/Question.d.ts +6 -4
  108. package/lib/src/components/RosterForLoop/RosterForLoop.d.ts +2 -22
  109. package/lib/src/components/Roundabout/Roundabout.d.ts +0 -1
  110. package/lib/src/components/Sequence/Sequence.d.ts +1 -2
  111. package/lib/src/components/Subsequence/Subsequence.d.ts +1 -1
  112. package/lib/src/components/Suggester/CustomSuggester.d.ts +7 -3
  113. package/lib/src/components/Suggester/Suggester.d.ts +1 -2
  114. package/lib/src/components/Suggester/SuggesterType.d.ts +6 -0
  115. package/lib/src/components/Suggester/helpers.d.ts +2 -2
  116. package/lib/src/components/Switch/Switch.d.ts +9 -0
  117. package/lib/src/components/Textarea/Textarea.d.ts +9 -10
  118. package/lib/src/components/library.d.ts +26 -93
  119. package/lib/src/components/shared/Button/Button.d.ts +0 -1
  120. package/lib/src/components/shared/Button/IconButton.d.ts +0 -1
  121. package/lib/src/components/shared/Checkbox/CheckboxOption.d.ts +0 -1
  122. package/lib/src/components/shared/Combobox/Combobox.d.ts +1 -1
  123. package/lib/src/components/shared/ComponentErrors/ComponentErrors.d.ts +0 -1
  124. package/lib/src/components/shared/Declarations/Declarations.d.ts +2 -3
  125. package/lib/src/components/shared/Fieldset/Fieldset.d.ts +0 -1
  126. package/lib/src/components/shared/HOC/slottableComponent.d.ts +105 -0
  127. package/lib/src/components/shared/Icons/lunatic-icon.d.ts +0 -1
  128. package/lib/src/components/shared/Label/Label.d.ts +0 -1
  129. package/lib/src/components/shared/Missing/Missing.d.ts +0 -1
  130. package/lib/src/components/shared/ModalControls/ModalControls.d.ts +0 -1
  131. package/lib/src/components/shared/Radio/RadioGroup.d.ts +1 -1
  132. package/lib/src/components/shared/Table/Table.d.ts +0 -1
  133. package/lib/src/components/shared/VariableStatus/VariableStatus.d.ts +0 -1
  134. package/lib/src/components/shared/suggester-loader-widget/dragger/dragger.d.ts +0 -1
  135. package/lib/src/components/shared/suggester-loader-widget/widget.d.ts +0 -1
  136. package/lib/src/components/type.d.ts +7 -7
  137. package/lib/src/hooks/use-track-changes.d.ts +9 -1
  138. package/lib/src/hooks/useSuggesterInfo.d.ts +1 -1
  139. package/lib/src/index.d.ts +1 -1
  140. package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +106 -59
  141. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +87 -58
  142. package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +47 -38
  143. package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +159 -87
  144. package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
  145. package/lib/src/use-lunatic/lunatic-context.d.ts +1 -4
  146. package/lib/src/use-lunatic/replace-component-sequence.d.ts +23 -5
  147. package/lib/src/use-lunatic/type-source.d.ts +55 -46
  148. package/lib/src/use-lunatic/type.d.ts +4 -4
  149. package/lib/src/use-lunatic/use-lunatic.d.ts +63 -32
  150. package/lib/src/utils/variables.d.ts +10 -2
  151. package/lib/stories/{component-set/component-set.stories.js → behaviour/slots.stories.js} +36 -25
  152. package/lib/stories/checkbox-group/checkbox-group.stories.js +1 -6
  153. package/lib/stories/disabled/source.json +1 -1
  154. package/lib/stories/loop/source-roster.json +2 -2
  155. package/lib/stories/pairwise/pairwise-links.stories.js +1 -9
  156. package/lib/stories/suggester/fakeReferentiel.json +12 -0
  157. package/lib/stories/suggester/source-option-responses.json +145 -0
  158. package/lib/stories/suggester/suggester.stories.js +45 -7
  159. package/lib/stories/utils/orchestrator.js +4 -4
  160. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +0 -1
  161. package/lib/use-lunatic/lunatic-context.js +2 -10
  162. package/lib/use-lunatic/replace-component-sequence.js +2 -3
  163. package/lib/use-lunatic/use-lunatic.js +1 -4
  164. package/lib/use-lunatic/use-lunatic.test.js +12 -37
  165. package/package.json +2 -2
  166. package/lib/components/ComponentSet/ComponentSet.js +0 -68
  167. package/lib/components/Dropdown/DropdownWritable.js +0 -58
  168. package/lib/components/Dropdown/renderer/WritableLabelRenderer.js +0 -38
  169. package/lib/components/Dropdown/renderer/WritableOptionRenderer.js +0 -140
  170. package/lib/src/components/ComponentSet/ComponentSet.d.ts +0 -7
  171. package/lib/src/components/Dropdown/DropdownWritable.d.ts +0 -17
  172. package/lib/src/components/Dropdown/renderer/WritableLabelRenderer.d.ts +0 -8
  173. package/lib/src/components/Dropdown/renderer/WritableOptionRenderer.d.ts +0 -8
  174. package/lib/src/components/shared/HOC/customizedComponent.d.ts +0 -5
  175. package/lib/src/components/type-custom.d.ts +0 -101
  176. package/lib/stories/checkbox-group/sourceComponentset.json +0 -424
  177. package/lib/stories/component-set/data-loop.json +0 -18
  178. package/lib/stories/component-set/data-roundabout.json +0 -25
  179. package/lib/stories/component-set/data.json +0 -25
  180. package/lib/stories/component-set/source-loop.json +0 -308
  181. package/lib/stories/component-set/source-roundabout.json +0 -434
  182. package/lib/stories/component-set/source.json +0 -113
  183. package/lib/stories/pairwise/source-componentset.json +0 -292
  184. package/lib/stories/suggester/source-component-set.json +0 -113
  185. /package/lib/components/{type-custom.js → Suggester/SuggesterType.js} +0 -0
@@ -1,5 +1,4 @@
1
1
  import { type PropsWithChildren, type ReactNode } from 'react';
2
- import './Fieldset.scss';
3
2
  import type { LunaticBaseProps } from '../../type';
4
3
  type Props = PropsWithChildren<{
5
4
  legend?: ReactNode;
@@ -0,0 +1,105 @@
1
+ import { type ComponentType, type FunctionComponent, type PropsWithChildren } from 'react';
2
+ import type { Subsequence } from '../../Subsequence/Subsequence';
3
+ import type { CustomInput } from '../../Input/Input';
4
+ import type { Declaration, Declarations } from '../Declarations/Declarations';
5
+ import type { Label } from '../Label/Label';
6
+ import type { Table, Tbody, Td, Th, Thead, Tr } from '../Table';
7
+ import type { CustomTextarea } from '../../Textarea/Textarea';
8
+ import type { RadioGroup } from '../Radio/RadioGroup';
9
+ import type { CustomRoundabout } from '../../Roundabout/CustomRoundabout';
10
+ import type { RoundaboutContainer, RoundaboutItContainer, RoundaboutItTitle, RoundaboutLabel, RoundaboutPending } from '../../Roundabout/extra';
11
+ import type { RoundaboutItButton } from '../../Roundabout/RoundaboutItButton';
12
+ import type { Button } from '../Button/Button';
13
+ import type { CustomCheckboxBoolean } from '../../CheckboxBoolean/CheckboxBoolean';
14
+ import type { CheckboxOption } from '../Checkbox/CheckboxOption';
15
+ import type { CustomDatepicker } from '../../Datepicker/Datepicker';
16
+ import type { CustomDuration } from '../../Duration/Duration';
17
+ import type { Fieldset } from '../Fieldset/Fieldset';
18
+ import type { CustomInputNumber } from '../../InputNumber/InputNumber';
19
+ import type { CustomQuestion } from '../../Question/Question';
20
+ import type { RadioOption } from '../Radio/RadioOption';
21
+ import type { Sequence } from '../../Sequence/Sequence';
22
+ import type { CustomSwitch } from '../../Switch/Switch';
23
+ import type { CustomLoop } from '../../Loop/Loop';
24
+ import type { CustomDropdown } from '../../Dropdown/Dropdown';
25
+ import type { Combobox } from '../Combobox/Combobox';
26
+ import type { ComboboxContainer } from '../Combobox/ComboboxContainer';
27
+ import type { ComboboxContentBox } from '../Combobox/ComboboxContentBox';
28
+ import type { ComboboxOption } from '../Combobox/Panel/ComboboxOption';
29
+ import type { ComboboxPanelContainer } from '../Combobox/Panel/ComboboxPanelContainer';
30
+ import type { ComboboxClearButton } from '../Combobox/Selection/ComboboxClearButton';
31
+ import type { ComboboxLabelSelection } from '../Combobox/Selection/ComboboxLabelSelection';
32
+ import type { SuggesterNotification } from '../../Suggester/SuggesterNotification';
33
+ import type { Radio } from '../../Radio/Radio';
34
+ import type { ComboboxInput } from '../Combobox/Selection/ComboboxInput';
35
+ import type { CustomSuggester } from '../../Suggester/CustomSuggester';
36
+ import type { CustomCheckboxGroup } from '../../CheckboxGroup/CustomCheckboxGroup';
37
+ import type { RouterLink } from '../MDLabel/RouterLink';
38
+ import type { SummaryResponses, SummaryTitle } from '../../Summary/Summary';
39
+ import type { FilledLunaticComponentProps } from '../../../use-lunatic/commons/fill-components/fill-components';
40
+ /**
41
+ * Contains the type of every customizable component
42
+ */
43
+ export type LunaticSlotComponents = {
44
+ Input: typeof CustomInput;
45
+ InputNumber: typeof CustomInputNumber;
46
+ Sequence: typeof Sequence;
47
+ Switch: typeof CustomSwitch;
48
+ Subsequence: typeof Subsequence;
49
+ Textarea: typeof CustomTextarea;
50
+ Datepicker: typeof CustomDatepicker;
51
+ Duration: typeof CustomDuration;
52
+ Question: typeof CustomQuestion;
53
+ Loop: typeof CustomLoop;
54
+ Dropdown: typeof CustomDropdown;
55
+ Radio: typeof Radio;
56
+ Suggester: typeof CustomSuggester;
57
+ CheckboxBoolean: typeof CustomCheckboxBoolean;
58
+ CheckboxGroup: typeof CustomCheckboxGroup;
59
+ CheckboxOption: typeof CheckboxOption;
60
+ RadioGroup: typeof RadioGroup;
61
+ RadioOption: typeof RadioOption;
62
+ Combobox: typeof Combobox;
63
+ ComboboxContainer: typeof ComboboxContainer;
64
+ ComboboxContentBox: typeof ComboboxContentBox;
65
+ ComboboxPanelContainer: typeof ComboboxPanelContainer;
66
+ ComboboxOption: typeof ComboboxOption;
67
+ ComboboxInput: typeof ComboboxInput;
68
+ ComboboxClearButton: typeof ComboboxClearButton;
69
+ ComboboxLabelSelection: typeof ComboboxLabelSelection;
70
+ Roundabout: typeof CustomRoundabout;
71
+ RoundaboutContainer: typeof RoundaboutContainer;
72
+ RoundaboutLabel: typeof RoundaboutLabel;
73
+ RoundaboutItTitle: typeof RoundaboutItTitle;
74
+ RoundaboutItContainer: typeof RoundaboutItContainer;
75
+ RoundaboutItButton: typeof RoundaboutItButton;
76
+ RoundaboutPending: typeof RoundaboutPending;
77
+ SuggesterNotification: typeof SuggesterNotification;
78
+ SummaryTitle: typeof SummaryTitle;
79
+ SummaryResponses: typeof SummaryResponses;
80
+ Button: typeof Button;
81
+ Label: typeof Label;
82
+ Declarations: typeof Declarations;
83
+ Declaration: typeof Declaration;
84
+ Tr: typeof Tr;
85
+ Td: typeof Td;
86
+ Th: typeof Th;
87
+ Tbody: typeof Tbody;
88
+ Table: typeof Table;
89
+ Thead: typeof Thead;
90
+ Fieldset: typeof Fieldset;
91
+ Notification: typeof Notification;
92
+ RouterLink: typeof RouterLink;
93
+ ComponentWrapper: ComponentType<PropsWithChildren<FilledLunaticComponentProps & {
94
+ index: number;
95
+ }>>;
96
+ };
97
+ export declare const SlotsProvider: ({ slots, children, }: PropsWithChildren<{
98
+ slots?: Partial<LunaticSlotComponents> | undefined;
99
+ }>) => import("react/jsx-runtime").JSX.Element;
100
+ /**
101
+ * Create a replaceable version of a component
102
+ *
103
+ * The component can be replaced using the "slots" props on <LunaticComponents>
104
+ */
105
+ export declare function slottableComponent<T extends Record<string, unknown>>(name: keyof LunaticSlotComponents, OriginalComponent: FunctionComponent<T>): ComponentType<T>;
@@ -1,4 +1,3 @@
1
- import './lunatic-icon.scss';
2
1
  import { type PropsWithChildren } from 'react';
3
2
  export declare function LunaticIcon({ className, children, }: PropsWithChildren<{
4
3
  className?: string;
@@ -1,5 +1,4 @@
1
1
  import { type CSSProperties, type PropsWithChildren, type ReactNode } from 'react';
2
- import './Label.scss';
3
2
  type Props = PropsWithChildren<{
4
3
  id?: string;
5
4
  htmlFor?: string;
@@ -1,4 +1,3 @@
1
- import './Missing.scss';
2
1
  import { useLunaticMissing } from '../../../use-lunatic/lunatic-context';
3
2
  import type { LunaticBaseProps } from '../../type';
4
3
  type Props = {
@@ -1,6 +1,5 @@
1
1
  import { type MouseEventHandler } from 'react';
2
2
  import type { LunaticError } from '../../../use-lunatic/type';
3
- import './ModalControls.scss';
4
3
  type Props = {
5
4
  goNext: MouseEventHandler;
6
5
  onClose: MouseEventHandler;
@@ -1,4 +1,3 @@
1
- import './RadioGroup.scss';
2
1
  import type { ReactNode } from 'react';
3
2
  import type { LunaticError } from '../../../use-lunatic/type';
4
3
  export type RadioGroupProps = {
@@ -18,5 +17,6 @@ export type RadioGroupProps = {
18
17
  shortcut?: boolean;
19
18
  disabled?: boolean;
20
19
  readOnly?: boolean;
20
+ clearable?: boolean;
21
21
  };
22
22
  export declare const RadioGroup: import("react").ComponentType<RadioGroupProps>;
@@ -1,5 +1,4 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import './Table.scss';
3
2
  type Props = PropsWithChildren<{
4
3
  className?: string;
5
4
  id?: string;
@@ -1,5 +1,4 @@
1
1
  import { type PropsWithChildren } from 'react';
2
- import './VariableStatus.scss';
3
2
  type Props = PropsWithChildren<{
4
3
  id?: string;
5
4
  }>;
@@ -1,5 +1,4 @@
1
1
  import { type PropsWithChildren } from 'react';
2
- import './dragger.scss';
3
2
  type Props = PropsWithChildren<{
4
3
  el?: {
5
4
  style: {
@@ -1,5 +1,4 @@
1
1
  import type { SuggesterType } from '../../../use-lunatic/type-source';
2
- import './widget.scss';
3
2
  type Props = {
4
3
  absolute?: boolean;
5
4
  source: {
@@ -35,7 +35,7 @@ export type LunaticBaseProps<ValueType = unknown> = {
35
35
  iteration?: number;
36
36
  declarations?: {
37
37
  id: string;
38
- declarationType: string;
38
+ declarationType: 'INSTRUCTION' | 'COMMENT' | 'HELP' | 'CODECARD' | 'WARNING' | 'STATEMENT';
39
39
  position: string;
40
40
  label: ReactNode;
41
41
  }[];
@@ -85,11 +85,6 @@ type ComponentPropsByType = {
85
85
  Question: Pick<LunaticBaseProps<unknown>, 'label' | 'id' | 'description' | 'declarations'> & {
86
86
  components: FilledLunaticComponentProps[];
87
87
  };
88
- ComponentSet: LunaticBaseProps<unknown> & {
89
- components: FilledLunaticComponentProps[];
90
- value: Record<string, unknown>;
91
- response: undefined;
92
- };
93
88
  RosterForLoop: LunaticBaseProps<unknown> & {
94
89
  lines: {
95
90
  min: number;
@@ -211,7 +206,6 @@ type ComponentPropsByType = {
211
206
  response: {
212
207
  name: string;
213
208
  };
214
- writable?: boolean;
215
209
  };
216
210
  Textarea: LunaticBaseProps<string> & {
217
211
  cols?: number;
@@ -255,6 +249,12 @@ type ComponentPropsByType = {
255
249
  response: {
256
250
  name: string;
257
251
  };
252
+ optionResponses?: {
253
+ name: string;
254
+ attribute: string;
255
+ }[];
256
+ executeExpression: LunaticState['executeExpression'];
257
+ iteration: LunaticState['pager']['iteration'];
258
258
  };
259
259
  Summary: LunaticBaseProps<string | null> & {
260
260
  executeExpression: LunaticState['executeExpression'];
@@ -4,6 +4,14 @@ import type { LunaticData } from '../use-lunatic/type';
4
4
  * Allow tracking changed while interacting with Lunatic forms
5
5
  */
6
6
  export declare function useTrackChanges(enabled: boolean, store: LunaticVariablesStore, getData: (names: string[]) => LunaticData): {
7
- getChangedData: (reset?: boolean) => LunaticData;
7
+ getChangedData: (reset?: boolean) => Partial<Record<"EXTERNAL" | "CALCULATED", Record<string, unknown>> & {
8
+ COLLECTED: Record<string, Partial<{
9
+ COLLECTED: unknown;
10
+ EDITED: unknown;
11
+ FORCED: unknown;
12
+ INPUTED: unknown;
13
+ PREVIOUS: unknown;
14
+ }>>;
15
+ }>;
8
16
  resetChangedData: () => void;
9
17
  };
@@ -3,7 +3,7 @@ import type { SuggesterType } from '../use-lunatic/type-source';
3
3
  * Retrieves suggester info from indexedDB
4
4
  */
5
5
  export declare function useSuggesterInfo(storeName: string, version: string): {
6
- infos: SuggesterType | undefined;
7
6
  state: "Loading" | "Ready" | "Error";
7
+ infos: SuggesterType | undefined;
8
8
  fetchInfos: () => Promise<void>;
9
9
  };
@@ -9,5 +9,5 @@ export { LunaticComponents } from './components/LunaticComponents';
9
9
  export { default as useLunatic } from './use-lunatic';
10
10
  export type { LunaticComponentDefinition, LunaticControl, LunaticData, LunaticValues, LunaticError, LunaticExpression, LunaticVariable, LunaticCollectedValue, LunaticStateVariable, LunaticState, } from './use-lunatic/type';
11
11
  export type { LunaticComponentProps } from './components/type';
12
- export type { LunaticCustomizedComponent } from './components/type-custom';
12
+ export type { LunaticSlotComponents } from './components/shared/HOC/slottableComponent';
13
13
  export type { LunaticSource } from './use-lunatic/type-source';