@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.
- package/lib/components/CheckboxBoolean/CheckboxBoolean.js +39 -19
- package/lib/components/CheckboxGroup/CheckboxGroup.js +3 -2
- package/lib/components/CheckboxGroup/CustomCheckboxGroup.js +4 -5
- package/lib/components/CheckboxGroup/CustomCheckboxGroup.spec.js +3 -0
- package/lib/components/CheckboxOne/CheckboxOne.js +6 -7
- package/lib/components/Datepicker/Datepicker.js +43 -29
- package/lib/components/Dropdown/Dropdown.js +37 -37
- package/lib/components/Duration/Duration.js +41 -17
- package/lib/components/FilterDescription/FilterDescription.js +2 -3
- package/lib/components/Input/Input.js +39 -22
- package/lib/components/InputNumber/InputNumber.js +45 -35
- package/lib/components/InputNumber/__snapshots__/InputNumber.spec.tsx.snap +0 -2
- package/lib/components/Loop/Loop.js +52 -29
- package/lib/components/LunaticComponents.js +60 -51
- package/lib/components/Question/Question.js +23 -14
- package/lib/components/Radio/Radio.js +2 -2
- package/lib/components/RosterForLoop/RosterForLoop.js +13 -36
- package/lib/components/Roundabout/CustomRoundabout.js +2 -2
- package/lib/components/Roundabout/Roundabout.js +0 -1
- package/lib/components/Roundabout/RoundaboutItButton.js +2 -2
- package/lib/components/Roundabout/extra.js +6 -6
- package/lib/components/Sequence/Sequence.js +2 -3
- package/lib/components/Subsequence/Subsequence.js +2 -2
- package/lib/components/Subsequence/Subsequence.spec.js +1 -1
- package/lib/components/Suggester/CustomSuggester.js +9 -6
- package/lib/components/Suggester/Suggester.js +67 -4
- package/lib/components/Suggester/SuggesterNotification.js +2 -2
- package/lib/components/Summary/Summary.js +3 -3
- package/lib/components/Switch/Switch.js +42 -22
- package/lib/components/Textarea/Textarea.js +43 -24
- package/lib/components/library.js +0 -2
- package/lib/components/shared/Button/Button.js +2 -3
- package/lib/components/shared/Button/IconButton.js +0 -1
- package/lib/components/shared/Checkbox/CheckboxOption.js +2 -3
- package/lib/components/shared/Combobox/Combobox.js +5 -4
- package/lib/components/shared/Combobox/ComboboxContainer.js +2 -2
- package/lib/components/shared/Combobox/ComboboxContentBox.js +2 -2
- package/lib/components/shared/Combobox/Panel/ComboboxOption.js +2 -2
- package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.js +2 -2
- package/lib/components/shared/Combobox/Selection/ComboboxClearButton.js +2 -2
- package/lib/components/shared/Combobox/Selection/ComboboxInput.js +2 -2
- package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.js +2 -2
- package/lib/components/shared/ComponentErrors/ComponentErrors.js +0 -1
- package/lib/components/shared/Declarations/Declarations.js +6 -7
- package/lib/components/shared/Declarations/Declarations.spec.js +5 -5
- package/lib/components/shared/Fieldset/Fieldset.js +2 -3
- package/lib/components/shared/HOC/{customizedComponent.js → slottableComponent.js} +35 -13
- package/lib/components/shared/Icons/lunatic-icon.js +0 -1
- package/lib/components/shared/Label/Label.js +2 -3
- package/lib/components/shared/MDLabel/RouterLink.js +2 -2
- package/lib/components/shared/Missing/Missing.js +0 -1
- package/lib/components/shared/ModalControls/ModalControls.js +0 -1
- package/lib/components/shared/Notification.js +2 -2
- package/lib/components/shared/Radio/RadioGroup.js +4 -4
- package/lib/components/shared/Radio/RadioOption.js +2 -2
- package/lib/components/shared/Table/Table.js +2 -3
- package/lib/components/shared/Table/Tbody.js +2 -2
- package/lib/components/shared/Table/Td.js +2 -2
- package/lib/components/shared/Table/Th.js +2 -2
- package/lib/components/shared/Table/Thead.js +2 -2
- package/lib/components/shared/Table/Tr.js +2 -2
- package/lib/components/shared/VariableStatus/VariableStatus.js +0 -1
- package/lib/components/shared/suggester-loader-widget/dragger/dragger.js +0 -1
- package/lib/components/shared/suggester-loader-widget/widget.js +0 -1
- package/lib/css/components/Button.scss +24 -0
- package/lib/css/components/CheckboxGroup.scss +13 -0
- package/lib/css/components/CheckboxOne.scss +19 -0
- package/lib/css/components/CheckboxOption.scss +19 -0
- package/lib/css/components/Combobox.scss +206 -0
- package/lib/css/components/ComponentErrors.scss +5 -0
- package/lib/css/components/Datepicker.scss +19 -0
- package/lib/css/components/Declarations.scss +42 -0
- package/lib/css/components/Dragger.scss +8 -0
- package/lib/css/components/Dropdown.scss +38 -0
- package/lib/css/components/Duration.scss +9 -0
- package/lib/css/components/Fieldset.scss +5 -0
- package/lib/css/components/IconButton.scss +38 -0
- package/lib/css/components/Input.scss +42 -0
- package/lib/css/components/InputNumber.scss +11 -0
- package/lib/css/components/Label.scss +6 -0
- package/lib/css/components/Missing.scss +27 -0
- package/lib/css/components/ModalControls.scss +48 -0
- package/lib/css/components/RadioGroup.scss +21 -0
- package/lib/css/components/RosterForLoop.scss +39 -0
- package/lib/css/components/Roundabout.scss +13 -0
- package/lib/css/components/Sequence.scss +10 -0
- package/lib/css/components/Suggester.scss +170 -0
- package/lib/css/components/SuggesterWidget.scss +176 -0
- package/lib/css/components/Table.scss +27 -0
- package/lib/css/components/Textarea.scss +8 -0
- package/lib/css/components/VariableStatus.scss +36 -0
- package/lib/css/main.scss +181 -0
- package/lib/hooks/useSuggesterInfo.js +14 -12
- package/lib/main.css +1063 -0
- package/lib/main.css.map +1 -0
- package/lib/src/components/CheckboxBoolean/CheckboxBoolean.d.ts +10 -5
- package/lib/src/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/lib/src/components/CheckboxOne/CheckboxOne.d.ts +5 -12
- package/lib/src/components/Datepicker/Datepicker.d.ts +8 -10
- package/lib/src/components/Dropdown/Dropdown.d.ts +9 -12
- package/lib/src/components/Duration/Duration.d.ts +9 -7
- package/lib/src/components/FilterDescription/FilterDescription.d.ts +1 -1
- package/lib/src/components/Input/Input.d.ts +9 -8
- package/lib/src/components/InputNumber/InputNumber.d.ts +9 -10
- package/lib/src/components/Loop/Loop.d.ts +11 -18
- package/lib/src/components/LunaticComponents.d.ts +4 -2
- package/lib/src/components/Question/Question.d.ts +6 -4
- package/lib/src/components/RosterForLoop/RosterForLoop.d.ts +2 -22
- package/lib/src/components/Roundabout/Roundabout.d.ts +0 -1
- package/lib/src/components/Sequence/Sequence.d.ts +1 -2
- package/lib/src/components/Subsequence/Subsequence.d.ts +1 -1
- package/lib/src/components/Suggester/CustomSuggester.d.ts +7 -3
- package/lib/src/components/Suggester/Suggester.d.ts +1 -2
- package/lib/src/components/Suggester/SuggesterType.d.ts +6 -0
- package/lib/src/components/Suggester/helpers.d.ts +2 -2
- package/lib/src/components/Switch/Switch.d.ts +9 -0
- package/lib/src/components/Textarea/Textarea.d.ts +9 -10
- package/lib/src/components/library.d.ts +26 -93
- package/lib/src/components/shared/Button/Button.d.ts +0 -1
- package/lib/src/components/shared/Button/IconButton.d.ts +0 -1
- package/lib/src/components/shared/Checkbox/CheckboxOption.d.ts +0 -1
- package/lib/src/components/shared/Combobox/Combobox.d.ts +1 -1
- package/lib/src/components/shared/ComponentErrors/ComponentErrors.d.ts +0 -1
- package/lib/src/components/shared/Declarations/Declarations.d.ts +2 -3
- package/lib/src/components/shared/Fieldset/Fieldset.d.ts +0 -1
- package/lib/src/components/shared/HOC/slottableComponent.d.ts +105 -0
- package/lib/src/components/shared/Icons/lunatic-icon.d.ts +0 -1
- package/lib/src/components/shared/Label/Label.d.ts +0 -1
- package/lib/src/components/shared/Missing/Missing.d.ts +0 -1
- package/lib/src/components/shared/ModalControls/ModalControls.d.ts +0 -1
- package/lib/src/components/shared/Radio/RadioGroup.d.ts +1 -1
- package/lib/src/components/shared/Table/Table.d.ts +0 -1
- package/lib/src/components/shared/VariableStatus/VariableStatus.d.ts +0 -1
- package/lib/src/components/shared/suggester-loader-widget/dragger/dragger.d.ts +0 -1
- package/lib/src/components/shared/suggester-loader-widget/widget.d.ts +0 -1
- package/lib/src/components/type.d.ts +7 -7
- package/lib/src/hooks/use-track-changes.d.ts +9 -1
- package/lib/src/hooks/useSuggesterInfo.d.ts +1 -1
- package/lib/src/index.d.ts +1 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +106 -59
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +87 -58
- package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +47 -38
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +159 -87
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/lunatic-context.d.ts +1 -4
- package/lib/src/use-lunatic/replace-component-sequence.d.ts +23 -5
- package/lib/src/use-lunatic/type-source.d.ts +55 -46
- package/lib/src/use-lunatic/type.d.ts +4 -4
- package/lib/src/use-lunatic/use-lunatic.d.ts +63 -32
- package/lib/src/utils/variables.d.ts +10 -2
- package/lib/stories/{component-set/component-set.stories.js → behaviour/slots.stories.js} +36 -25
- package/lib/stories/checkbox-group/checkbox-group.stories.js +1 -6
- package/lib/stories/disabled/source.json +1 -1
- package/lib/stories/loop/source-roster.json +2 -2
- package/lib/stories/pairwise/pairwise-links.stories.js +1 -9
- package/lib/stories/suggester/fakeReferentiel.json +12 -0
- package/lib/stories/suggester/source-option-responses.json +145 -0
- package/lib/stories/suggester/suggester.stories.js +45 -7
- package/lib/stories/utils/orchestrator.js +4 -4
- package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +0 -1
- package/lib/use-lunatic/lunatic-context.js +2 -10
- package/lib/use-lunatic/replace-component-sequence.js +2 -3
- package/lib/use-lunatic/use-lunatic.js +1 -4
- package/lib/use-lunatic/use-lunatic.test.js +12 -37
- package/package.json +2 -2
- package/lib/components/ComponentSet/ComponentSet.js +0 -68
- package/lib/components/Dropdown/DropdownWritable.js +0 -58
- package/lib/components/Dropdown/renderer/WritableLabelRenderer.js +0 -38
- package/lib/components/Dropdown/renderer/WritableOptionRenderer.js +0 -140
- package/lib/src/components/ComponentSet/ComponentSet.d.ts +0 -7
- package/lib/src/components/Dropdown/DropdownWritable.d.ts +0 -17
- package/lib/src/components/Dropdown/renderer/WritableLabelRenderer.d.ts +0 -8
- package/lib/src/components/Dropdown/renderer/WritableOptionRenderer.d.ts +0 -8
- package/lib/src/components/shared/HOC/customizedComponent.d.ts +0 -5
- package/lib/src/components/type-custom.d.ts +0 -101
- package/lib/stories/checkbox-group/sourceComponentset.json +0 -424
- package/lib/stories/component-set/data-loop.json +0 -18
- package/lib/stories/component-set/data-roundabout.json +0 -25
- package/lib/stories/component-set/data.json +0 -25
- package/lib/stories/component-set/source-loop.json +0 -308
- package/lib/stories/component-set/source-roundabout.json +0 -434
- package/lib/stories/component-set/source.json +0 -113
- package/lib/stories/pairwise/source-componentset.json +0 -292
- package/lib/stories/suggester/source-component-set.json +0 -113
- /package/lib/components/{type-custom.js → Suggester/SuggesterType.js} +0 -0
|
@@ -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 './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>;
|
|
@@ -35,7 +35,7 @@ export type LunaticBaseProps<ValueType = unknown> = {
|
|
|
35
35
|
iteration?: number;
|
|
36
36
|
declarations?: {
|
|
37
37
|
id: string;
|
|
38
|
-
declarationType:
|
|
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) =>
|
|
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
|
};
|
package/lib/src/index.d.ts
CHANGED
|
@@ -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 {
|
|
12
|
+
export type { LunaticSlotComponents } from './components/shared/HOC/slottableComponent';
|
|
13
13
|
export type { LunaticSource } from './use-lunatic/type-source';
|