@inseefr/lunatic 2.7.1 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -11
- package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.js +3 -3
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +2 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group-content.js +0 -2
- package/lib/components/checkbox/checkbox-group/html/checkbox-group-content.js +4 -2
- package/lib/components/checkbox/checkbox-group/html/checkbox-group.js +3 -3
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +2 -2
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +2 -1
- package/lib/components/checkbox/commons/checkbox-option.js +3 -1
- package/lib/components/commons/components/combo-box/combo-box-container.js +1 -2
- package/lib/components/commons/components/combo-box/combo-box.js +2 -2
- package/lib/components/commons/components/combo-box/selection/LabelOrInput.js +3 -1
- package/lib/components/commons/components/combo-box/selection/input.js +3 -1
- package/lib/components/commons/components/combo-box/selection/selection.js +3 -1
- package/lib/components/commons/components/errors/errors.js +12 -10
- package/lib/components/commons/components/errors/errors.spec.js +6 -6
- package/lib/components/component-set/html/__snapshots__/component-set.spec.tsx.snap +2 -0
- package/lib/components/component-set/html/component-set.js +2 -2
- package/lib/components/datepicker/html/DatepickerField.js +47 -0
- package/lib/components/datepicker/html/__snapshots__/datepicker.spec.tsx.snap +209 -17
- package/lib/components/datepicker/html/datepicker.js +104 -21
- package/lib/components/datepicker/html/datepicker.scss +19 -1
- package/lib/components/datepicker/html/datepicker.spec.js +71 -23
- package/lib/components/datepicker/lunatic-datepicker.js +5 -2
- package/lib/components/dropdown/lunatic-dropdown.js +2 -1
- package/lib/components/duration/duration.js +6 -7
- package/lib/components/duration/duration.scss +6 -14
- package/lib/components/duration/durationInput.js +14 -8
- package/lib/components/duration/durationUtils.js +38 -8
- package/lib/components/input/html/__snapshots__/input.spec.tsx.snap +2 -0
- package/lib/components/input/html/input.js +3 -3
- package/lib/components/input/lunatic-input.js +2 -1
- package/lib/components/input-number/html/__snapshots__/input-number.spec.tsx.snap +2 -2
- package/lib/components/input-number/html/input-number-thousand.js +4 -17
- package/lib/components/input-number/html/input-number.js +3 -5
- package/lib/components/input-number/lunatic-input-number.js +2 -3
- package/lib/components/loop/block-for-loop.js +3 -3
- package/lib/components/loop/roster-for-loop/__snapshots__/roster-for-loop.spec.tsx.snap +88 -0
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +7 -3
- package/lib/components/loop/roster-for-loop/roster-for-loop.spec.js +46 -0
- package/lib/components/lunatic-components.js +2 -11
- package/lib/components/radio/html/radio-group-content.js +4 -2
- package/lib/components/radio/html/radio-group.js +3 -3
- package/lib/components/radio/html/radio-option.js +3 -1
- package/lib/components/radio/lunatic-radio-group.js +2 -1
- package/lib/components/suggester/find-best-label/find-best-label.js +5 -5
- package/lib/components/suggester/idb-suggester/check-store.js +6 -3
- package/lib/components/suggester/idb-suggester/idb-suggester.js +8 -7
- package/lib/components/suggester/idb-suggester/suggester-status.js +1 -4
- package/lib/components/suggester/lunatic-suggester.js +7 -4
- package/lib/components/suggester/searching/create-searching.js +19 -42
- package/lib/components/suggester-loader-widget/loader-row.js +4 -2
- package/lib/components/suggester-loader-widget/loader.js +5 -4
- package/lib/components/suggester-loader-widget/widget.js +8 -8
- package/lib/components/switch/html/switch.js +2 -2
- package/lib/components/switch/lunatic-switch.js +2 -1
- package/lib/components/table/lunatic-table.js +2 -2
- package/lib/components/textarea/html/__snapshots__/textarea.spec.tsx.snap +2 -0
- package/lib/components/textarea/html/textarea.js +6 -4
- package/lib/components/textarea/lunatic-textarea.js +6 -3
- package/lib/hooks/use-auto-focus.js +26 -0
- package/lib/src/components/checkbox/checkbox-boolean/html/checkbox-boolean.d.ts +1 -1
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group-content.d.ts +2 -1
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group.d.ts +1 -1
- package/lib/src/components/checkbox/commons/checkbox-option.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +2 -2
- package/lib/src/components/commons/components/combo-box/combo-box.d.ts +2 -2
- package/lib/src/components/commons/components/combo-box/selection/LabelOrInput.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/input.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +2 -1
- package/lib/src/components/commons/components/errors/errors.d.ts +6 -3
- package/lib/src/components/datepicker/html/DatepickerField.d.ts +12 -0
- package/lib/src/components/datepicker/html/datepicker.d.ts +4 -3
- package/lib/src/components/datepicker/lunatic-datepicker.d.ts +1 -0
- package/lib/src/components/dropdown/html/dropdown-writable/dropdown-writable.d.ts +1 -1
- package/lib/src/components/dropdown/html/dropdown.d.ts +3 -1
- package/lib/src/components/duration/durationInput.d.ts +6 -2
- package/lib/src/components/duration/durationUtils.d.ts +24 -7
- package/lib/src/components/input/html/input.d.ts +2 -2
- package/lib/src/components/input-number/html/input-number-thousand.d.ts +2 -2
- package/lib/src/components/input-number/html/input-number.d.ts +2 -3
- package/lib/src/components/radio/html/radio-group-content.d.ts +2 -1
- package/lib/src/components/radio/html/radio-group.d.ts +1 -1
- package/lib/src/components/radio/html/radio-option.d.ts +1 -0
- package/lib/src/components/suggester/find-best-label/find-best-label.d.ts +1 -1
- package/lib/src/components/suggester/html/suggester.d.ts +1 -1
- package/lib/src/components/suggester/idb-suggester/check-store.d.ts +5 -2
- package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +5 -2
- package/lib/src/components/suggester/idb-suggester/suggester-status.d.ts +1 -4
- package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -1
- package/lib/src/components/suggester/searching/create-searching.d.ts +1 -1
- package/lib/src/components/suggester-loader-widget/loader-row.d.ts +2 -1
- package/lib/src/components/suggester-loader-widget/loader.d.ts +2 -1
- package/lib/src/components/suggester-loader-widget/widget.d.ts +3 -2
- package/lib/src/components/switch/html/switch.d.ts +1 -1
- package/lib/src/components/textarea/html/textarea.d.ts +3 -2
- package/lib/src/components/type.d.ts +5 -3
- package/lib/src/hooks/use-auto-focus.d.ts +6 -0
- package/lib/src/use-lunatic/actions.d.ts +2 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +383 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-value.d.ts +1 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-component-value.spec.d.ts +1 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +20 -0
- package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +4 -0
- package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +1 -0
- package/lib/src/use-lunatic/type.d.ts +1 -0
- package/lib/src/use-lunatic/use-lunatic.d.ts +8 -3
- package/lib/src/use-lunatic/use-suggesters.d.ts +2 -1
- package/lib/src/utils/suggester-workers/append-to-index/create-append-task.d.ts +2 -2
- package/lib/src/utils/suggester-workers/worker-path.d.ts +6 -0
- package/lib/stories/behaviour/cleaning/source.json +151 -0
- package/lib/stories/behaviour/cleaning/test.stories.js +83 -0
- package/lib/stories/{questionnaires-test → behaviour}/controls/controls.stories.js +5 -5
- package/lib/stories/{questionnaires-test → behaviour/others}/test.stories.js +7 -7
- package/lib/stories/{paste-questionnaire → behaviour/paste}/test.stories.js +5 -4
- package/lib/stories/{resizing-questionnaire → behaviour/resizing}/test.stories.js +5 -4
- package/lib/stories/date-picker/datepicker.stories.js +32 -29
- package/lib/stories/duration/duration.stories.js +4 -4
- package/lib/stories/duration/{source.json → mois.json} +1 -1
- package/lib/stories/duration/{source1.json → time.json} +1 -1
- package/lib/stories/loop/not-paginated-loop.stories.js +35 -0
- package/lib/stories/loop/source-bloc.json +2 -2
- package/lib/stories/loop/source-not-paginated.json +138 -0
- package/lib/stories/loop/source-paginated.json +2 -2
- package/lib/stories/suggester/suggester.stories.js +6 -37
- package/lib/stories/utils/referentiel.js +38 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-required.js +23 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +1 -1
- package/lib/use-lunatic/commons/fill-components/fill-component-value.spec.js +67 -0
- package/lib/use-lunatic/commons/fill-components/fill-components.js +2 -1
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +2 -0
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +15 -0
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +9 -1
- package/lib/use-lunatic/initial-state.js +2 -1
- package/lib/use-lunatic/reducer/reduce-on-init.js +4 -2
- package/lib/use-lunatic/use-lunatic.js +7 -3
- package/lib/use-lunatic/use-suggesters.js +55 -38
- package/lib/utils/env.js +9 -1
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +5 -4
- package/lib/utils/suggester-workers/create-worker.js +7 -1
- package/lib/utils/suggester-workers/worker-path.js +29 -0
- package/package.json +24 -11
- package/scripts/build/add-workers-to-public.js +44 -0
- package/scripts/build/workers-paths.js +45 -0
- package/workers-release/lunatic-append-worker-0.3.0.js +2 -0
- package/workers-release/lunatic-append-worker-0.3.0.js.LICENSE.txt +34 -0
- package/workers-release/lunatic-label-worker-0.3.0.js +2 -0
- package/workers-release/lunatic-label-worker-0.3.0.js.LICENSE.txt +13 -0
- package/workers-release/lunatic-search-worker-0.3.0.js +2 -0
- package/workers-release/lunatic-search-worker-0.3.0.js.LICENSE.txt +34 -0
- package/lib/components/datepicker/html/datepicker-container.js +0 -17
- package/lib/components/datepicker/html/datepicker-input.js +0 -35
- package/lib/env.d.js +0 -1
- package/lib/src/components/datepicker/html/datepicker-container.d.ts +0 -3
- package/lib/src/components/datepicker/html/datepicker-input.d.ts +0 -13
- package/lib/src/utils/get-component-value.d.ts +0 -5
- package/lib/src/utils/store-tools/worker-path.d.ts +0 -1
- package/lib/utils/get-component-value.js +0 -34
- package/lib/utils/get-component-value.test.js +0 -57
- package/lib/utils/store-tools/worker-path.js +0 -13
- package/lib/utils/suggester-workers/create-worker-ts.js +0 -54
- /package/lib/src/{utils/get-component-value.test.d.ts → components/loop/roster-for-loop/roster-for-loop.spec.d.ts} +0 -0
- /package/lib/src/utils/suggester-workers/{create-worker-ts.d.ts → create-worker.d.ts} +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_ControlesNonNum_horsBoucle_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_ControlesNum_horsBoucle_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_Controles_BouclesLiees2_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_Controles_BouclesLiees_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/boucles-n.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/controls-externes.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/controls-externes.stories.js +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_DeclarationsSimples.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_MinMaxSum_Boucles.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_QuestSimple_Boucles.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_TCMRallyeGames.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/test-dylan.json +0 -0
- /package/lib/stories/{paste-questionnaire → behaviour/paste}/source.json +0 -0
- /package/lib/stories/{resizing-questionnaire → behaviour/resizing}/source.json +0 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import type { LunaticComponentDefinition } from '../../type';
|
|
2
|
+
/**
|
|
3
|
+
* Add required attribute on component that are mandatory
|
|
4
|
+
*/
|
|
5
|
+
export declare function fillComponentRequired(component: LunaticComponentDefinition): (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentSequenceType & {
|
|
6
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
7
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentSubSequenceType & {
|
|
8
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
9
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentRosterForLoopType & {
|
|
10
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
11
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentLoopType & {
|
|
12
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
13
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentTableType & {
|
|
14
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
15
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentNumberType & {
|
|
16
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
17
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentDatePickerType & {
|
|
18
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
19
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentCheckboxGroupType & {
|
|
20
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
21
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentCheckboxBooleanType & {
|
|
22
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
23
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentRadioType & {
|
|
24
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
25
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentFilterDescriptionType & {
|
|
26
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
27
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentDropdownType & {
|
|
28
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
29
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentPairWiseLinksType & {
|
|
30
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
31
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentRoundaboutType & {
|
|
32
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
33
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentSuggesterType & {
|
|
34
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
35
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentInputOrTextareaType & {
|
|
36
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
37
|
+
}) | (import("../../type-source").ComponentTypeBase & {
|
|
38
|
+
componentType: "CheckboxOne";
|
|
39
|
+
} & {
|
|
40
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
41
|
+
}) | (import("../../type-source").ComponentTypeBase & {
|
|
42
|
+
componentType: "ConfirmationModal";
|
|
43
|
+
} & {
|
|
44
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
45
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentComponentSetType & {
|
|
46
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
47
|
+
}) | (import("../../type-source").ComponentTypeBase & import("../../type-source").ComponentQuestionExplicationType & {
|
|
48
|
+
componentType: "Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication";
|
|
49
|
+
}) | {
|
|
50
|
+
required: boolean;
|
|
51
|
+
label: import("../../type-source").LabelType;
|
|
52
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
53
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
54
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
55
|
+
id: string;
|
|
56
|
+
bindingDependencies?: string[] | undefined;
|
|
57
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
58
|
+
mandatory?: boolean | undefined;
|
|
59
|
+
page: string;
|
|
60
|
+
componentType: "Sequence";
|
|
61
|
+
} | {
|
|
62
|
+
required: boolean;
|
|
63
|
+
label: import("../../type-source").LabelType;
|
|
64
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
65
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
66
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
67
|
+
id: string;
|
|
68
|
+
bindingDependencies?: string[] | undefined;
|
|
69
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
70
|
+
mandatory?: boolean | undefined;
|
|
71
|
+
page: string;
|
|
72
|
+
componentType: "Subsequence";
|
|
73
|
+
gotoPage: string;
|
|
74
|
+
} | {
|
|
75
|
+
required: boolean;
|
|
76
|
+
label: import("../../type-source").LabelType;
|
|
77
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
78
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
79
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
80
|
+
id: string;
|
|
81
|
+
bindingDependencies?: string[] | undefined;
|
|
82
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
83
|
+
mandatory?: boolean | undefined;
|
|
84
|
+
page: string;
|
|
85
|
+
componentType: "RosterForLoop";
|
|
86
|
+
components: import("../../type-source").ComponentType[];
|
|
87
|
+
lines: {
|
|
88
|
+
min: import("../../type-source").LabelType;
|
|
89
|
+
max: import("../../type-source").LabelType;
|
|
90
|
+
};
|
|
91
|
+
header: {
|
|
92
|
+
value: string;
|
|
93
|
+
label: string | import("../../type-source").LabelType;
|
|
94
|
+
options: {
|
|
95
|
+
value: string;
|
|
96
|
+
label: import("../../type-source").LabelType;
|
|
97
|
+
}[];
|
|
98
|
+
colspan?: number | undefined;
|
|
99
|
+
rowspan?: number | undefined;
|
|
100
|
+
}[];
|
|
101
|
+
body: (import("../../type-source").ComponentType | {
|
|
102
|
+
label: import("../../type-source").LabelType;
|
|
103
|
+
})[][];
|
|
104
|
+
positioning: "HORIZONTAL";
|
|
105
|
+
} | {
|
|
106
|
+
required: boolean;
|
|
107
|
+
label: import("../../type-source").LabelType;
|
|
108
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
109
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
110
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
111
|
+
id: string;
|
|
112
|
+
bindingDependencies?: string[] | undefined;
|
|
113
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
114
|
+
mandatory?: boolean | undefined;
|
|
115
|
+
page: string;
|
|
116
|
+
componentType: "Loop";
|
|
117
|
+
loopDependencies: string[];
|
|
118
|
+
lines: {
|
|
119
|
+
min: import("../../type-source").LabelType;
|
|
120
|
+
max: import("../../type-source").LabelType;
|
|
121
|
+
};
|
|
122
|
+
components: import("../../type-source").ComponentType[];
|
|
123
|
+
iterations: import("../../type-source").LabelType;
|
|
124
|
+
maxPage: string;
|
|
125
|
+
depth: number;
|
|
126
|
+
paginatedLoop: boolean;
|
|
127
|
+
} | {
|
|
128
|
+
required: boolean;
|
|
129
|
+
label: import("../../type-source").LabelType;
|
|
130
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
131
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
132
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
133
|
+
id: string;
|
|
134
|
+
bindingDependencies?: string[] | undefined;
|
|
135
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
136
|
+
mandatory?: boolean | undefined;
|
|
137
|
+
page: string;
|
|
138
|
+
componentType: "Table";
|
|
139
|
+
lines: {
|
|
140
|
+
min: import("../../type-source").LabelType;
|
|
141
|
+
max: import("../../type-source").LabelType;
|
|
142
|
+
};
|
|
143
|
+
header: {
|
|
144
|
+
value: string;
|
|
145
|
+
label: string | import("../../type-source").LabelType;
|
|
146
|
+
options: {
|
|
147
|
+
value: string;
|
|
148
|
+
label: import("../../type-source").LabelType;
|
|
149
|
+
}[];
|
|
150
|
+
colspan?: number | undefined;
|
|
151
|
+
rowspan?: number | undefined;
|
|
152
|
+
}[];
|
|
153
|
+
body: (import("../../type-source").ComponentType | {
|
|
154
|
+
label: import("../../type-source").LabelType;
|
|
155
|
+
})[][];
|
|
156
|
+
positioning: "HORIZONTAL";
|
|
157
|
+
} | {
|
|
158
|
+
required: boolean;
|
|
159
|
+
label: import("../../type-source").LabelType;
|
|
160
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
161
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
162
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
163
|
+
id: string;
|
|
164
|
+
bindingDependencies?: string[] | undefined;
|
|
165
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
166
|
+
mandatory?: boolean | undefined;
|
|
167
|
+
page: string;
|
|
168
|
+
componentType: "InputNumber";
|
|
169
|
+
unit: string;
|
|
170
|
+
response: import("../../type-source").ResponseType;
|
|
171
|
+
min?: number | undefined;
|
|
172
|
+
max?: number | undefined;
|
|
173
|
+
decimals?: number | undefined;
|
|
174
|
+
} | {
|
|
175
|
+
required: boolean;
|
|
176
|
+
label: import("../../type-source").LabelType;
|
|
177
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
178
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
179
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
180
|
+
id: string;
|
|
181
|
+
bindingDependencies?: string[] | undefined;
|
|
182
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
183
|
+
mandatory?: boolean | undefined;
|
|
184
|
+
page: string;
|
|
185
|
+
componentType: "Datepicker";
|
|
186
|
+
dateFormat: string;
|
|
187
|
+
response: import("../../type-source").ResponseType;
|
|
188
|
+
min?: string | undefined;
|
|
189
|
+
max?: string | undefined;
|
|
190
|
+
} | {
|
|
191
|
+
required: boolean;
|
|
192
|
+
label: import("../../type-source").LabelType;
|
|
193
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
194
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
195
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
196
|
+
id: string;
|
|
197
|
+
bindingDependencies?: string[] | undefined;
|
|
198
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
199
|
+
mandatory?: boolean | undefined;
|
|
200
|
+
page: string;
|
|
201
|
+
componentType: "CheckboxGroup";
|
|
202
|
+
responses: {
|
|
203
|
+
label: import("../../type-source").LabelType;
|
|
204
|
+
response: import("../../type-source").ResponseType;
|
|
205
|
+
id: string;
|
|
206
|
+
}[];
|
|
207
|
+
} | {
|
|
208
|
+
required: boolean;
|
|
209
|
+
label: import("../../type-source").LabelType;
|
|
210
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
211
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
212
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
213
|
+
id: string;
|
|
214
|
+
bindingDependencies?: string[] | undefined;
|
|
215
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
216
|
+
mandatory?: boolean | undefined;
|
|
217
|
+
page: string;
|
|
218
|
+
componentType: "CheckboxBoolean";
|
|
219
|
+
response: import("../../type-source").ResponseType;
|
|
220
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
221
|
+
} | {
|
|
222
|
+
required: boolean;
|
|
223
|
+
label: import("../../type-source").LabelType;
|
|
224
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
225
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
226
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
227
|
+
id: string;
|
|
228
|
+
bindingDependencies?: string[] | undefined;
|
|
229
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
230
|
+
mandatory?: boolean | undefined;
|
|
231
|
+
page: string;
|
|
232
|
+
componentType: "Radio";
|
|
233
|
+
options: {
|
|
234
|
+
value: string;
|
|
235
|
+
label: import("../../type-source").LabelType;
|
|
236
|
+
}[];
|
|
237
|
+
response: import("../../type-source").ResponseType;
|
|
238
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
239
|
+
} | {
|
|
240
|
+
required: boolean;
|
|
241
|
+
label: import("../../type-source").LabelType;
|
|
242
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
243
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
244
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
245
|
+
id: string;
|
|
246
|
+
bindingDependencies?: string[] | undefined;
|
|
247
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
248
|
+
mandatory?: boolean | undefined;
|
|
249
|
+
page: string;
|
|
250
|
+
componentType: "FilterDescription";
|
|
251
|
+
filterDescription: boolean;
|
|
252
|
+
} | {
|
|
253
|
+
required: boolean;
|
|
254
|
+
label: import("../../type-source").LabelType;
|
|
255
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
256
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
257
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
258
|
+
id: string;
|
|
259
|
+
bindingDependencies?: string[] | undefined;
|
|
260
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
261
|
+
mandatory?: boolean | undefined;
|
|
262
|
+
page: string;
|
|
263
|
+
componentType: "Dropdown";
|
|
264
|
+
options: {
|
|
265
|
+
value: string;
|
|
266
|
+
label: import("../../type-source").LabelType;
|
|
267
|
+
}[];
|
|
268
|
+
response: import("../../type-source").ResponseType;
|
|
269
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
270
|
+
} | {
|
|
271
|
+
required: boolean;
|
|
272
|
+
label: import("../../type-source").LabelType;
|
|
273
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
274
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
275
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
276
|
+
id: string;
|
|
277
|
+
bindingDependencies?: string[] | undefined;
|
|
278
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
279
|
+
mandatory?: boolean | undefined;
|
|
280
|
+
page: string;
|
|
281
|
+
componentType: "PairwiseLinks";
|
|
282
|
+
xAxisIterations: import("../../type-source").LabelType;
|
|
283
|
+
yAxisIterations: import("../../type-source").LabelType;
|
|
284
|
+
symLinks: {
|
|
285
|
+
[variableName: string]: Record<string, string>;
|
|
286
|
+
};
|
|
287
|
+
components: import("../../type-source").ComponentType[];
|
|
288
|
+
} | {
|
|
289
|
+
required: boolean;
|
|
290
|
+
label: import("../../type-source").LabelType;
|
|
291
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
292
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
293
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
294
|
+
id: string;
|
|
295
|
+
bindingDependencies?: string[] | undefined;
|
|
296
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
297
|
+
mandatory?: boolean | undefined;
|
|
298
|
+
page: string;
|
|
299
|
+
componentType: "Roundabout";
|
|
300
|
+
components: import("../../type-source").ComponentType[];
|
|
301
|
+
iterations: import("../../type-source").LabelType;
|
|
302
|
+
locked: boolean;
|
|
303
|
+
expressions: Record<string, import("../../type-source").LabelType>;
|
|
304
|
+
} | {
|
|
305
|
+
required: boolean;
|
|
306
|
+
label: import("../../type-source").LabelType;
|
|
307
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
308
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
309
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
310
|
+
id: string;
|
|
311
|
+
bindingDependencies?: string[] | undefined;
|
|
312
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
313
|
+
mandatory?: boolean | undefined;
|
|
314
|
+
page: string;
|
|
315
|
+
componentType: "Suggester";
|
|
316
|
+
storeName: string;
|
|
317
|
+
} | {
|
|
318
|
+
required: boolean;
|
|
319
|
+
label: import("../../type-source").LabelType;
|
|
320
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
321
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
322
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
323
|
+
id: string;
|
|
324
|
+
bindingDependencies?: string[] | undefined;
|
|
325
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
326
|
+
mandatory?: boolean | undefined;
|
|
327
|
+
page: string;
|
|
328
|
+
componentType: "Input" | "Textarea";
|
|
329
|
+
maxLength: number;
|
|
330
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
331
|
+
response: import("../../type-source").ResponseType;
|
|
332
|
+
} | {
|
|
333
|
+
required: boolean;
|
|
334
|
+
label: import("../../type-source").LabelType;
|
|
335
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
336
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
337
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
338
|
+
id: string;
|
|
339
|
+
bindingDependencies?: string[] | undefined;
|
|
340
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
341
|
+
mandatory?: boolean | undefined;
|
|
342
|
+
page: string;
|
|
343
|
+
componentType: "CheckboxOne";
|
|
344
|
+
} | {
|
|
345
|
+
required: boolean;
|
|
346
|
+
label: import("../../type-source").LabelType;
|
|
347
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
348
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
349
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
350
|
+
id: string;
|
|
351
|
+
bindingDependencies?: string[] | undefined;
|
|
352
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
353
|
+
mandatory?: boolean | undefined;
|
|
354
|
+
page: string;
|
|
355
|
+
componentType: "ConfirmationModal";
|
|
356
|
+
} | {
|
|
357
|
+
required: boolean;
|
|
358
|
+
label: import("../../type-source").LabelType;
|
|
359
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
360
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
361
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
362
|
+
id: string;
|
|
363
|
+
bindingDependencies?: string[] | undefined;
|
|
364
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
365
|
+
mandatory?: boolean | undefined;
|
|
366
|
+
page: string;
|
|
367
|
+
componentType: "ComponentSet";
|
|
368
|
+
components: import("../../type-source").ComponentType[];
|
|
369
|
+
} | {
|
|
370
|
+
required: boolean;
|
|
371
|
+
label: import("../../type-source").LabelType;
|
|
372
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
373
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
374
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
375
|
+
id: string;
|
|
376
|
+
bindingDependencies?: string[] | undefined;
|
|
377
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
378
|
+
mandatory?: boolean | undefined;
|
|
379
|
+
page: string;
|
|
380
|
+
componentType: "QuestionExplication";
|
|
381
|
+
description: string;
|
|
382
|
+
bgColor?: string | undefined;
|
|
383
|
+
};
|
|
@@ -2,4 +2,4 @@ import type { LunaticComponentDefinition, LunaticState } from '../../type';
|
|
|
2
2
|
export type FilledProps = {
|
|
3
3
|
value?: unknown;
|
|
4
4
|
};
|
|
5
|
-
export declare function fillComponentValue(component: LunaticComponentDefinition, state: LunaticState): LunaticComponentDefinition & FilledProps;
|
|
5
|
+
export declare function fillComponentValue(component: LunaticComponentDefinition, state: Pick<LunaticState, 'pager' | 'variables'>): LunaticComponentDefinition & FilledProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,6 +34,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
34
34
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
35
35
|
timestamp: number;
|
|
36
36
|
};
|
|
37
|
+
workersBasePath: string | undefined;
|
|
37
38
|
goNextPage: () => void;
|
|
38
39
|
goPreviousPage: () => void;
|
|
39
40
|
label: import("../../type-source").LabelType;
|
|
@@ -69,6 +70,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
69
70
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
70
71
|
timestamp: number;
|
|
71
72
|
};
|
|
73
|
+
workersBasePath: string | undefined;
|
|
72
74
|
goNextPage: () => void;
|
|
73
75
|
goPreviousPage: () => void;
|
|
74
76
|
label: import("../../type-source").LabelType;
|
|
@@ -105,6 +107,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
105
107
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
106
108
|
timestamp: number;
|
|
107
109
|
};
|
|
110
|
+
workersBasePath: string | undefined;
|
|
108
111
|
goNextPage: () => void;
|
|
109
112
|
goPreviousPage: () => void;
|
|
110
113
|
label: import("../../type-source").LabelType;
|
|
@@ -159,6 +162,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
159
162
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
160
163
|
timestamp: number;
|
|
161
164
|
};
|
|
165
|
+
workersBasePath: string | undefined;
|
|
162
166
|
goNextPage: () => void;
|
|
163
167
|
goPreviousPage: () => void;
|
|
164
168
|
label: import("../../type-source").LabelType;
|
|
@@ -204,6 +208,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
204
208
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
205
209
|
timestamp: number;
|
|
206
210
|
};
|
|
211
|
+
workersBasePath: string | undefined;
|
|
207
212
|
goNextPage: () => void;
|
|
208
213
|
goPreviousPage: () => void;
|
|
209
214
|
label: import("../../type-source").LabelType;
|
|
@@ -257,6 +262,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
257
262
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
258
263
|
timestamp: number;
|
|
259
264
|
};
|
|
265
|
+
workersBasePath: string | undefined;
|
|
260
266
|
goNextPage: () => void;
|
|
261
267
|
goPreviousPage: () => void;
|
|
262
268
|
label: import("../../type-source").LabelType;
|
|
@@ -297,6 +303,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
297
303
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
298
304
|
timestamp: number;
|
|
299
305
|
};
|
|
306
|
+
workersBasePath: string | undefined;
|
|
300
307
|
goNextPage: () => void;
|
|
301
308
|
goPreviousPage: () => void;
|
|
302
309
|
label: import("../../type-source").LabelType;
|
|
@@ -336,6 +343,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
336
343
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
337
344
|
timestamp: number;
|
|
338
345
|
};
|
|
346
|
+
workersBasePath: string | undefined;
|
|
339
347
|
goNextPage: () => void;
|
|
340
348
|
goPreviousPage: () => void;
|
|
341
349
|
label: import("../../type-source").LabelType;
|
|
@@ -376,6 +384,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
376
384
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
377
385
|
timestamp: number;
|
|
378
386
|
};
|
|
387
|
+
workersBasePath: string | undefined;
|
|
379
388
|
goNextPage: () => void;
|
|
380
389
|
goPreviousPage: () => void;
|
|
381
390
|
label: import("../../type-source").LabelType;
|
|
@@ -413,6 +422,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
413
422
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
414
423
|
timestamp: number;
|
|
415
424
|
};
|
|
425
|
+
workersBasePath: string | undefined;
|
|
416
426
|
goNextPage: () => void;
|
|
417
427
|
goPreviousPage: () => void;
|
|
418
428
|
label: import("../../type-source").LabelType;
|
|
@@ -454,6 +464,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
454
464
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
455
465
|
timestamp: number;
|
|
456
466
|
};
|
|
467
|
+
workersBasePath: string | undefined;
|
|
457
468
|
goNextPage: () => void;
|
|
458
469
|
goPreviousPage: () => void;
|
|
459
470
|
label: import("../../type-source").LabelType;
|
|
@@ -490,6 +501,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
490
501
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
491
502
|
timestamp: number;
|
|
492
503
|
};
|
|
504
|
+
workersBasePath: string | undefined;
|
|
493
505
|
goNextPage: () => void;
|
|
494
506
|
goPreviousPage: () => void;
|
|
495
507
|
label: import("../../type-source").LabelType;
|
|
@@ -531,6 +543,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
531
543
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
532
544
|
timestamp: number;
|
|
533
545
|
};
|
|
546
|
+
workersBasePath: string | undefined;
|
|
534
547
|
goNextPage: () => void;
|
|
535
548
|
goPreviousPage: () => void;
|
|
536
549
|
label: import("../../type-source").LabelType;
|
|
@@ -572,6 +585,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
572
585
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
573
586
|
timestamp: number;
|
|
574
587
|
};
|
|
588
|
+
workersBasePath: string | undefined;
|
|
575
589
|
goNextPage: () => void;
|
|
576
590
|
goPreviousPage: () => void;
|
|
577
591
|
label: import("../../type-source").LabelType;
|
|
@@ -611,6 +625,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
611
625
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
612
626
|
timestamp: number;
|
|
613
627
|
};
|
|
628
|
+
workersBasePath: string | undefined;
|
|
614
629
|
goNextPage: () => void;
|
|
615
630
|
goPreviousPage: () => void;
|
|
616
631
|
label: import("../../type-source").LabelType;
|
|
@@ -647,6 +662,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
647
662
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
648
663
|
timestamp: number;
|
|
649
664
|
};
|
|
665
|
+
workersBasePath: string | undefined;
|
|
650
666
|
goNextPage: () => void;
|
|
651
667
|
goPreviousPage: () => void;
|
|
652
668
|
label: import("../../type-source").LabelType;
|
|
@@ -685,6 +701,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
685
701
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
686
702
|
timestamp: number;
|
|
687
703
|
};
|
|
704
|
+
workersBasePath: string | undefined;
|
|
688
705
|
goNextPage: () => void;
|
|
689
706
|
goPreviousPage: () => void;
|
|
690
707
|
label: import("../../type-source").LabelType;
|
|
@@ -720,6 +737,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
720
737
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
721
738
|
timestamp: number;
|
|
722
739
|
};
|
|
740
|
+
workersBasePath: string | undefined;
|
|
723
741
|
goNextPage: () => void;
|
|
724
742
|
goPreviousPage: () => void;
|
|
725
743
|
label: import("../../type-source").LabelType;
|
|
@@ -755,6 +773,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
755
773
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
756
774
|
timestamp: number;
|
|
757
775
|
};
|
|
776
|
+
workersBasePath: string | undefined;
|
|
758
777
|
goNextPage: () => void;
|
|
759
778
|
goPreviousPage: () => void;
|
|
760
779
|
label: import("../../type-source").LabelType;
|
|
@@ -791,6 +810,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
791
810
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
792
811
|
timestamp: number;
|
|
793
812
|
};
|
|
813
|
+
workersBasePath: string | undefined;
|
|
794
814
|
goNextPage: () => void;
|
|
795
815
|
goPreviousPage: () => void;
|
|
796
816
|
label: import("../../type-source").LabelType;
|
|
@@ -16,6 +16,10 @@ export declare class LunaticVariablesStore {
|
|
|
16
16
|
private eventTarget;
|
|
17
17
|
constructor();
|
|
18
18
|
static makeFromSource(source: LunaticSource, data: LunaticData): LunaticVariablesStore;
|
|
19
|
+
/**
|
|
20
|
+
* Create a new store from an object (useful for testing)
|
|
21
|
+
*/
|
|
22
|
+
static makeFromObject(values?: Record<string, unknown>): LunaticVariablesStore;
|
|
19
23
|
/**
|
|
20
24
|
* Retrieve variable value
|
|
21
25
|
*/
|
|
@@ -2,7 +2,7 @@ import { type FunctionComponent } from 'react';
|
|
|
2
2
|
import type { LunaticData, LunaticState } from './type';
|
|
3
3
|
import type { LunaticSource } from './type-source';
|
|
4
4
|
import type { LunaticComponentType } from '../components/type';
|
|
5
|
-
declare function useLunatic(source: LunaticSource, data: LunaticData | undefined, { features, preferences, savingType, onChange, management, shortcut, initialPage, lastReachedPage, autoSuggesterLoading, activeControls, getReferentiel, custom, withOverview, missing, missingStrategy, missingShortcut, dontKnowButton, refusedButton, trackChanges, }: {
|
|
5
|
+
declare function useLunatic(source: LunaticSource, data: LunaticData | undefined, { features, preferences, savingType, onChange, management, shortcut, initialPage, lastReachedPage, autoSuggesterLoading, activeControls, getReferentiel, custom, withOverview, missing, missingStrategy, missingShortcut, dontKnowButton, refusedButton, workersBasePath, trackChanges, }: {
|
|
6
6
|
features?: LunaticState['features'];
|
|
7
7
|
preferences?: LunaticState['preferences'];
|
|
8
8
|
savingType?: LunaticState['savingType'];
|
|
@@ -24,12 +24,13 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
24
24
|
};
|
|
25
25
|
dontKnowButton?: string;
|
|
26
26
|
refusedButton?: string;
|
|
27
|
+
workersBasePath?: string;
|
|
27
28
|
trackChanges?: boolean;
|
|
28
29
|
}): {
|
|
29
30
|
getComponents: ({ only, except, }?: {
|
|
30
31
|
only?: (keyof {
|
|
31
32
|
InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
|
|
32
|
-
min
|
|
33
|
+
min?: number | undefined;
|
|
33
34
|
max: number;
|
|
34
35
|
decimals: number;
|
|
35
36
|
unit?: string | undefined;
|
|
@@ -110,6 +111,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
110
111
|
iteration: number | undefined;
|
|
111
112
|
};
|
|
112
113
|
Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
|
|
114
|
+
format: "YYYY-MM-DD" | "YYYY-MM" | "YYYY";
|
|
113
115
|
min?: string | undefined;
|
|
114
116
|
max?: string | undefined;
|
|
115
117
|
response: {
|
|
@@ -226,6 +228,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
226
228
|
};
|
|
227
229
|
Suggester: import("../components/type").LunaticBaseProps<string | null> & {
|
|
228
230
|
storeName: string;
|
|
231
|
+
workersBasePath?: string | undefined;
|
|
229
232
|
getSuggesterStatus: (name: string) => {
|
|
230
233
|
status: import("./use-suggesters").SuggesterStatus;
|
|
231
234
|
timestamp: number;
|
|
@@ -272,7 +275,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
272
275
|
})[] | undefined;
|
|
273
276
|
except?: (keyof {
|
|
274
277
|
InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
|
|
275
|
-
min
|
|
278
|
+
min?: number | undefined;
|
|
276
279
|
max: number;
|
|
277
280
|
decimals: number;
|
|
278
281
|
unit?: string | undefined;
|
|
@@ -353,6 +356,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
353
356
|
iteration: number | undefined;
|
|
354
357
|
};
|
|
355
358
|
Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
|
|
359
|
+
format: "YYYY-MM-DD" | "YYYY-MM" | "YYYY";
|
|
356
360
|
min?: string | undefined;
|
|
357
361
|
max?: string | undefined;
|
|
358
362
|
response: {
|
|
@@ -469,6 +473,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
469
473
|
};
|
|
470
474
|
Suggester: import("../components/type").LunaticBaseProps<string | null> & {
|
|
471
475
|
storeName: string;
|
|
476
|
+
workersBasePath?: string | undefined;
|
|
472
477
|
getSuggesterStatus: (name: string) => {
|
|
473
478
|
status: import("./use-suggesters").SuggesterStatus;
|
|
474
479
|
timestamp: number;
|