@inseefr/lunatic 2.6.3-rc.1 → 2.6.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 +49 -3
- package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.js +3 -3
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +7 -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 -1
- 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/__snapshots__/datepicker.spec.tsx.snap +2 -0
- package/lib/components/datepicker/html/datepicker-input.js +4 -2
- package/lib/components/datepicker/html/datepicker.js +3 -3
- package/lib/components/datepicker/lunatic-datepicker.js +2 -1
- package/lib/components/dropdown/lunatic-dropdown.js +2 -1
- package/lib/components/index.js +4 -4
- 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 +10 -6
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +35 -27
- package/lib/components/loop/utils/get-initial-nb-rows.js +17 -0
- package/lib/components/lunatic-components.js +7 -27
- package/lib/components/pairwise-links/index.js +13 -0
- package/lib/components/pairwise-links/orchestrator.js +71 -0
- package/lib/components/pairwise-links/pairwise-links.js +30 -27
- package/lib/components/pairwise-links/row.js +74 -0
- 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 +6 -6
- package/lib/components/suggester/idb-suggester/idb-suggester.js +4 -3
- package/lib/components/suggester/lunatic-suggester.js +7 -4
- package/lib/components/suggester/searching/create-searching.js +20 -39
- package/lib/components/switch/html/switch.js +2 -2
- package/lib/components/switch/lunatic-switch.js +2 -1
- package/lib/components/table/cell.js +89 -0
- package/lib/components/table/{table-header.js → header.js} +5 -3
- package/lib/components/table/index.js +13 -0
- package/lib/components/table/lunatic-table.js +15 -24
- package/lib/components/table/row.js +40 -0
- package/lib/components/table/table-orchestrator.js +35 -0
- 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/combo-box.stories.d.ts +4 -6
- 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/datepicker-input.d.ts +2 -1
- package/lib/src/components/datepicker/html/datepicker.d.ts +1 -1
- 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/index.d.ts +2 -2
- 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/loop/block-for-loop.d.ts +4 -3
- package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +4 -3
- package/lib/src/components/loop/utils/get-initial-nb-rows.d.ts +4 -0
- package/lib/src/components/lunatic-components.d.ts +3 -5
- package/lib/src/components/pairwise-links/index.d.ts +1 -0
- package/lib/src/components/pairwise-links/orchestrator.d.ts +6 -0
- package/lib/src/components/pairwise-links/pairwise-links.d.ts +2 -1
- package/lib/src/components/pairwise-links/row.d.ts +7 -0
- 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/idb-suggester.d.ts +5 -2
- 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/switch/html/switch.d.ts +1 -1
- package/lib/src/components/table/cell.d.ts +19 -0
- package/lib/src/components/table/{table-header.d.ts → header.d.ts} +2 -2
- package/lib/src/components/table/index.d.ts +1 -0
- package/lib/src/components/table/lunatic-table.d.ts +1 -1
- package/lib/src/components/table/row.d.ts +18 -0
- package/lib/src/components/table/table-orchestrator.d.ts +4 -0
- package/lib/src/components/textarea/html/textarea.d.ts +3 -2
- package/lib/src/components/type.d.ts +9 -7
- package/lib/src/hooks/use-auto-focus.d.ts +6 -0
- package/lib/src/use-lunatic/actions.d.ts +19 -3
- package/lib/src/use-lunatic/commons/calculated-variables.d.ts +8 -0
- package/lib/src/use-lunatic/commons/compile-controls.d.ts +2 -3
- package/lib/src/use-lunatic/commons/execute-expression/create-execute-expression.d.ts +9 -0
- package/lib/src/use-lunatic/commons/execute-expression/create-memoizer.d.ts +8 -0
- package/lib/src/use-lunatic/commons/execute-expression/create-refresh-calculated.d.ts +24 -0
- package/lib/src/use-lunatic/commons/execute-expression/execute-expression.d.ts +11 -0
- package/lib/src/use-lunatic/commons/execute-expression/get-expressions-variables.d.ts +7 -0
- package/lib/src/use-lunatic/commons/execute-expression/get-expressions-variables.spec.d.ts +1 -0
- package/lib/src/use-lunatic/commons/execute-expression/get-safety-expression.d.ts +6 -0
- package/lib/src/use-lunatic/commons/execute-expression/index.d.ts +1 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +418 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-value.d.ts +3 -2
- package/lib/src/use-lunatic/commons/fill-components/fill-components.d.ts +0 -6
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +142 -107
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +89 -53
- package/lib/src/use-lunatic/commons/get-compatible-vtl-expression.d.ts +0 -1
- package/lib/src/use-lunatic/commons/get-component-value/get-component-value.d.ts +6 -0
- package/lib/src/use-lunatic/commons/get-component-value/index.d.ts +1 -0
- package/lib/src/use-lunatic/commons/get-data.d.ts +26 -0
- package/lib/src/use-lunatic/commons/index.d.ts +3 -0
- package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +9 -10
- package/lib/src/use-lunatic/reducer/reduce-handle-change/index.d.ts +1 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.d.ts +7 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.spec.d.ts +1 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.d.ts +4 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.d.ts +15 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-missing.d.ts +7 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-resizing.d.ts +4 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.d.ts +14 -0
- package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.d.ts +9 -0
- package/lib/src/use-lunatic/reducer/reduce-on-init.d.ts +12 -1
- package/lib/src/use-lunatic/reducer/reduce-on-init.spec.d.ts +1 -0
- package/lib/src/use-lunatic/type-source.d.ts +21 -7
- package/lib/src/use-lunatic/type.d.ts +12 -13
- package/lib/src/use-lunatic/use-lunatic.d.ts +62 -36
- package/lib/src/use-lunatic/use-suggesters.d.ts +2 -1
- package/lib/src/utils/array.d.ts +1 -6
- package/lib/src/utils/number.d.ts +0 -4
- package/lib/src/utils/suggester-workers/append-to-index/create-append-task.d.ts +1 -1
- package/lib/src/utils/suggester-workers/worker-path.d.ts +6 -0
- package/lib/src/utils/vtl/dataset-builder.d.ts +5 -0
- package/lib/src/utils/vtl/index.d.ts +1 -0
- package/lib/stories/behaviour/cleaning/source.json +151 -0
- package/lib/stories/behaviour/cleaning/test.stories.js +84 -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 +3 -3
- package/lib/stories/{resizing-questionnaire → behaviour/resizing}/test.stories.js +3 -3
- package/lib/use-lunatic/actions.js +3 -3
- package/lib/use-lunatic/commons/calculated-variables.js +104 -0
- package/lib/use-lunatic/commons/compile-controls.js +5 -3
- package/lib/use-lunatic/commons/execute-condition-filter.js +9 -1
- package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +233 -0
- package/lib/use-lunatic/commons/execute-expression/create-execute-expression.spec.js +155 -0
- package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +63 -0
- package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +149 -0
- package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.spec.js +130 -0
- package/lib/use-lunatic/commons/execute-expression/execute-expression.js +90 -0
- package/lib/use-lunatic/commons/execute-expression/execute-expression.spec.js +38 -0
- package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +40 -0
- package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.spec.js +31 -0
- package/lib/use-lunatic/commons/{fill-components/fill-iterations.js → execute-expression/get-safety-expression.js} +20 -30
- package/lib/use-lunatic/commons/execute-expression/index.js +13 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +3 -2
- package/lib/use-lunatic/{reducer/reduce-handle-change.js → commons/fill-components/fill-component-required.js} +8 -14
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +7 -21
- package/lib/use-lunatic/commons/fill-components/fill-components.js +4 -5
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +2 -0
- package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +13 -6
- package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +5 -58
- package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +0 -1
- package/lib/use-lunatic/commons/get-component-value/get-component-value.js +174 -0
- package/lib/use-lunatic/commons/get-component-value/index.js +13 -0
- package/lib/use-lunatic/commons/get-data.js +80 -0
- package/lib/use-lunatic/commons/index.js +21 -0
- package/lib/use-lunatic/initial-state.js +4 -6
- package/lib/use-lunatic/reducer/overview/overview-on-change.js +1 -1
- package/lib/use-lunatic/reducer/reduce-handle-change/__mocks__/source-cleaning-loop.json +792 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/index.js +13 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +78 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.spec.js +46 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +115 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +89 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +88 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +119 -0
- package/lib/use-lunatic/{commons/variables/get-questionnaire-data.js → reducer/reduce-handle-change/reduce-variables-array.js} +32 -53
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +28 -0
- package/lib/use-lunatic/reducer/reduce-on-init.js +184 -90
- package/lib/use-lunatic/reducer/reduce-on-init.spec.js +17 -0
- package/lib/use-lunatic/reducer/reducer.js +2 -2
- package/lib/use-lunatic/reducer/resolve-component-controls/resolve-simple-control.js +4 -2
- package/lib/use-lunatic/use-lunatic.js +29 -22
- package/lib/use-lunatic/use-lunatic.test.js +36 -133
- package/lib/use-lunatic/use-suggesters.js +4 -3
- package/lib/utils/array.js +6 -57
- package/lib/utils/get-component-value.js +9 -3
- package/lib/utils/number.js +1 -13
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +4 -3
- package/lib/utils/suggester-workers/worker-path.js +29 -0
- package/lib/utils/vtl/dataset-builder.js +27 -0
- package/lib/utils/vtl/index.js +13 -0
- package/package.json +15 -10
- package/scripts/build/add-workers-to-public.js +44 -0
- package/scripts/build/workers-paths.js +44 -0
- package/workers-release/lunatic-append-worker-0.3.0-experimental.js +2 -0
- package/workers-release/lunatic-append-worker-0.3.0-experimental.js.LICENSE.txt +34 -0
- package/workers-release/lunatic-label-worker-0.3.0-experimental.js +2 -0
- package/workers-release/lunatic-label-worker-0.3.0-experimental.js.LICENSE.txt +13 -0
- package/workers-release/lunatic-searching-worker-0.3.0-experimental.js +2 -0
- package/workers-release/lunatic-searching-worker-0.3.0-experimental.js.LICENSE.txt +34 -0
- package/lib/hooks/use-track-changes.js +0 -50
- package/lib/src/hooks/use-track-changes.d.ts +0 -9
- package/lib/src/use-lunatic/commons/component.d.ts +0 -22
- package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +0 -112
- package/lib/src/use-lunatic/commons/variables/behaviours/cleaning-behaviour.d.ts +0 -7
- package/lib/src/use-lunatic/commons/variables/behaviours/missing-behaviour.d.ts +0 -7
- package/lib/src/use-lunatic/commons/variables/behaviours/resizing-behaviour.d.ts +0 -7
- package/lib/src/use-lunatic/commons/variables/get-questionnaire-data.d.ts +0 -4
- package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +0 -77
- package/lib/src/use-lunatic/reducer/reduce-handle-change.d.ts +0 -6
- package/lib/src/utils/env.d.ts +0 -1
- package/lib/src/utils/store-tools/worker-path.d.ts +0 -1
- package/lib/src/utils/variables.d.ts +0 -5
- package/lib/src/utils/vtl.d.ts +0 -14
- package/lib/use-lunatic/commons/component.js +0 -22
- package/lib/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js +0 -39
- package/lib/use-lunatic/commons/variables/behaviours/missing-behaviour.js +0 -47
- package/lib/use-lunatic/commons/variables/behaviours/resizing-behaviour.js +0 -78
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +0 -330
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +0 -216
- package/lib/utils/array.spec.js +0 -30
- package/lib/utils/env.js +0 -10
- package/lib/utils/store-tools/worker-path.js +0 -13
- package/lib/utils/suggester-workers/create-worker.js +0 -55
- package/lib/utils/variables.js +0 -37
- package/lib/utils/vtl.js +0 -100
- /package/lib/src/use-lunatic/commons/{variables/lunatic-variables-store.spec.d.ts → execute-expression/create-refresh-calculated.spec.d.ts} +0 -0
- /package/lib/src/{utils/array.spec.d.ts → use-lunatic/commons/execute-expression/execute-expression.spec.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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { LunaticError } from '../../../../use-lunatic/type';
|
|
3
3
|
type Props = PropsWithChildren<{
|
|
4
4
|
classNamePrefix?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
id?: string;
|
|
7
7
|
classStyle?: string;
|
|
8
|
-
errors?:
|
|
8
|
+
errors?: LunaticError[];
|
|
9
9
|
}>;
|
|
10
10
|
declare const _default: import("react").ComponentType<Props>;
|
|
11
11
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { LunaticBaseProps } from '../../../type';
|
|
3
2
|
import './combo-box.scss';
|
|
4
3
|
import type { ComboBoxOptionType } from './combo-box.type';
|
|
5
4
|
import { type PanelProps } from './panel/panel';
|
|
6
5
|
import { type SelectionProps } from './selection/selection';
|
|
6
|
+
import type { LunaticError } from '../../../../use-lunatic/type';
|
|
7
7
|
type Props = SelectionProps & PanelProps & {
|
|
8
8
|
className?: string;
|
|
9
9
|
classNamePrefix?: string;
|
|
@@ -13,7 +13,7 @@ type Props = SelectionProps & PanelProps & {
|
|
|
13
13
|
getOptionValue?: (o: ComboBoxOptionType) => string;
|
|
14
14
|
label?: ReactNode;
|
|
15
15
|
description?: ReactNode;
|
|
16
|
-
errors?:
|
|
16
|
+
errors?: LunaticError[];
|
|
17
17
|
onChange?: (s: string | null) => void;
|
|
18
18
|
onSelect: (s: string | null) => void;
|
|
19
19
|
options: ComboBoxOptionType[];
|
|
@@ -12,6 +12,7 @@ export declare const Default: Story<{
|
|
|
12
12
|
id?: string | undefined;
|
|
13
13
|
classNamePrefix?: string | undefined;
|
|
14
14
|
readOnly?: boolean | undefined;
|
|
15
|
+
invalid?: boolean | undefined;
|
|
15
16
|
} & import("./selection/label-selection").LabelSelectionProps & import("./panel/panel").PanelProps & {
|
|
16
17
|
className?: string | undefined;
|
|
17
18
|
classNamePrefix?: string | undefined;
|
|
@@ -21,9 +22,7 @@ export declare const Default: Story<{
|
|
|
21
22
|
getOptionValue?: ((o: ComboBoxOptionType) => string) | undefined;
|
|
22
23
|
label?: import("react").ReactNode;
|
|
23
24
|
description?: import("react").ReactNode;
|
|
24
|
-
errors?:
|
|
25
|
-
[id: string]: import("../../../..").LunaticError[];
|
|
26
|
-
} | undefined;
|
|
25
|
+
errors?: import("../../../..").LunaticError[] | undefined;
|
|
27
26
|
onChange?: ((s: string | null) => void) | undefined;
|
|
28
27
|
onSelect: (s: string | null) => void;
|
|
29
28
|
options: ComboBoxOptionType[];
|
|
@@ -38,6 +37,7 @@ export declare const Editable: Story<{
|
|
|
38
37
|
id?: string | undefined;
|
|
39
38
|
classNamePrefix?: string | undefined;
|
|
40
39
|
readOnly?: boolean | undefined;
|
|
40
|
+
invalid?: boolean | undefined;
|
|
41
41
|
} & import("./selection/label-selection").LabelSelectionProps & import("./panel/panel").PanelProps & {
|
|
42
42
|
className?: string | undefined;
|
|
43
43
|
classNamePrefix?: string | undefined;
|
|
@@ -47,9 +47,7 @@ export declare const Editable: Story<{
|
|
|
47
47
|
getOptionValue?: ((o: ComboBoxOptionType) => string) | undefined;
|
|
48
48
|
label?: import("react").ReactNode;
|
|
49
49
|
description?: import("react").ReactNode;
|
|
50
|
-
errors?:
|
|
51
|
-
[id: string]: import("../../../..").LunaticError[];
|
|
52
|
-
} | undefined;
|
|
50
|
+
errors?: import("../../../..").LunaticError[] | undefined;
|
|
53
51
|
onChange?: ((s: string | null) => void) | undefined;
|
|
54
52
|
onSelect: (s: string | null) => void;
|
|
55
53
|
options: ComboBoxOptionType[];
|
|
@@ -8,5 +8,6 @@ export type SelectionProps = {
|
|
|
8
8
|
id?: string;
|
|
9
9
|
classNamePrefix?: string;
|
|
10
10
|
readOnly?: boolean;
|
|
11
|
+
invalid?: boolean;
|
|
11
12
|
} & LabelSelectionProps;
|
|
12
|
-
export declare function Selection({ labelRenderer, placeholder, search, expanded, disabled, readOnly, focused, onChange, selectedIndex, options, editable, labelId, id, classNamePrefix, }: SelectionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Selection({ labelRenderer, placeholder, search, expanded, disabled, readOnly, focused, onChange, selectedIndex, options, editable, labelId, id, classNamePrefix, invalid, }: SelectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import './errors.scss';
|
|
2
2
|
import type { LunaticError } from '../../../../use-lunatic/type';
|
|
3
3
|
type Props = {
|
|
4
|
-
errors?:
|
|
5
|
-
activeId?: string;
|
|
4
|
+
errors?: LunaticError[];
|
|
6
5
|
};
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Display a list of error as simple red text
|
|
8
|
+
*/
|
|
9
|
+
declare function Errors({ errors }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare function getComponentErrors(errors?: Record<string, LunaticError[]>, componentId?: string): LunaticError[] | undefined;
|
|
8
11
|
export default Errors;
|
|
@@ -8,6 +8,7 @@ export type Props = {
|
|
|
8
8
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
9
9
|
min?: string;
|
|
10
10
|
max?: string;
|
|
11
|
+
invalid?: boolean;
|
|
11
12
|
};
|
|
12
|
-
declare function DatepickerInput({ id, disabled, readOnly, labelId, value, onChange, min, max, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DatepickerInput({ id, disabled, readOnly, labelId, value, onChange, min, max, invalid, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default DatepickerInput;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './dropdown.scss';
|
|
3
3
|
import type { LunaticComponentProps } from '../../type';
|
|
4
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
4
5
|
export type DropdownProps = {
|
|
5
6
|
onSelect: (v: string | null) => void;
|
|
6
7
|
className?: string;
|
|
7
8
|
readOnly?: boolean;
|
|
8
|
-
|
|
9
|
+
errors?: LunaticError[];
|
|
10
|
+
} & Pick<LunaticComponentProps<'Dropdown'>, 'id' | 'disabled' | 'options' | 'writable' | 'value' | 'description' | 'label'>;
|
|
9
11
|
declare const _default: import("react").ComponentType<DropdownProps>;
|
|
10
12
|
export default _default;
|
|
@@ -10,7 +10,7 @@ export { default as InputNumber } from './input-number';
|
|
|
10
10
|
export { default as FilterDescription } from './filter-description';
|
|
11
11
|
export { Loop } from './loop/loop';
|
|
12
12
|
export { default as Modal } from './modal-controls';
|
|
13
|
-
export { PairwiseLinks } from './pairwise-links
|
|
13
|
+
export { default as PairwiseLinks } from './pairwise-links';
|
|
14
14
|
export { default as Radio } from './radio';
|
|
15
15
|
export { RosterForLoop } from './loop/roster-for-loop/roster-for-loop';
|
|
16
16
|
export { default as Sequence } from './sequence';
|
|
@@ -20,7 +20,7 @@ export { default as Switch } from './switch';
|
|
|
20
20
|
export { default as Textarea } from './textarea';
|
|
21
21
|
export { default as SuggesterLoaderWidget } from './suggester-loader-widget';
|
|
22
22
|
export { default as Roundabout } from './roundabout';
|
|
23
|
-
export {
|
|
23
|
+
export { default as Table } from './table';
|
|
24
24
|
export { LunaticComponentSet as ComponentSet } from './component-set/lunatic-component-set';
|
|
25
25
|
export { default as Duration } from './duration';
|
|
26
26
|
export { Summary } from './summary';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import './input.scss';
|
|
3
|
-
import type {
|
|
3
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
4
4
|
type Props = {
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
onChange: (v: string) => void;
|
|
7
7
|
description?: string;
|
|
8
|
-
errors
|
|
8
|
+
errors?: LunaticError[];
|
|
9
9
|
value?: string | null;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
readOnly?: boolean;
|
|
@@ -6,9 +6,9 @@ type Props = {
|
|
|
6
6
|
readOnly?: boolean;
|
|
7
7
|
required?: boolean;
|
|
8
8
|
labelId?: string;
|
|
9
|
-
min?: number;
|
|
10
9
|
max?: number;
|
|
11
10
|
decimals?: number;
|
|
11
|
+
invalid?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare const InputNumberThousand: ({ id, onChange, value, disabled, readOnly, required, labelId,
|
|
13
|
+
declare const InputNumberThousand: ({ id, onChange, value, disabled, readOnly, required, labelId, max, decimals, invalid, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default InputNumberThousand;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { type LunaticBaseProps } from '../../type';
|
|
3
2
|
import './input-number.scss';
|
|
3
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
4
4
|
type Props = {
|
|
5
5
|
id?: string;
|
|
6
6
|
onChange?: (n: number | null) => void;
|
|
@@ -9,13 +9,12 @@ type Props = {
|
|
|
9
9
|
readOnly?: boolean;
|
|
10
10
|
required?: boolean;
|
|
11
11
|
labelId?: string;
|
|
12
|
-
min?: number;
|
|
13
12
|
max?: number;
|
|
14
13
|
decimals?: number;
|
|
15
14
|
label?: ReactNode;
|
|
16
15
|
description?: string;
|
|
17
16
|
unit?: string;
|
|
18
|
-
errors?:
|
|
17
|
+
errors?: LunaticError[];
|
|
19
18
|
};
|
|
20
19
|
declare const _default: import("react").ComponentType<Props>;
|
|
21
20
|
export default _default;
|
|
@@ -7,12 +7,13 @@ export declare const BlockForLoop: import("react").ComponentType<import("../type
|
|
|
7
7
|
min: number;
|
|
8
8
|
max: number;
|
|
9
9
|
};
|
|
10
|
-
iterations
|
|
10
|
+
iterations?: number | undefined;
|
|
11
11
|
getComponents: (n: number) => import("../../use-lunatic/commons/fill-components/fill-components").FilledLunaticComponentProps[];
|
|
12
12
|
executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
|
|
13
|
-
iteration?: number |
|
|
13
|
+
iteration?: number | undefined;
|
|
14
|
+
linksIterations?: number[] | undefined;
|
|
15
|
+
logging?: import("../../use-lunatic/commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
|
|
14
16
|
bindingDependencies?: string[] | undefined;
|
|
15
|
-
deps?: string[] | undefined;
|
|
16
17
|
} | undefined) => T;
|
|
17
18
|
value: Record<string, unknown[]>;
|
|
18
19
|
headers?: {
|
|
@@ -7,12 +7,13 @@ export declare const RosterForLoop: import("react").ComponentType<import("../../
|
|
|
7
7
|
min: number;
|
|
8
8
|
max: number;
|
|
9
9
|
};
|
|
10
|
-
iterations
|
|
10
|
+
iterations?: number | undefined;
|
|
11
11
|
getComponents: (n: number) => import("../../../use-lunatic/commons/fill-components/fill-components").FilledLunaticComponentProps[];
|
|
12
12
|
executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
|
|
13
|
-
iteration?: number |
|
|
13
|
+
iteration?: number | undefined;
|
|
14
|
+
linksIterations?: number[] | undefined;
|
|
15
|
+
logging?: import("../../../use-lunatic/commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
|
|
14
16
|
bindingDependencies?: string[] | undefined;
|
|
15
|
-
deps?: string[] | undefined;
|
|
16
17
|
} | undefined) => T;
|
|
17
18
|
value: Record<string, unknown[]>;
|
|
18
19
|
headers?: {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { type PropsWithChildren, type
|
|
1
|
+
import { type PropsWithChildren, type ReactNode } from 'react';
|
|
2
2
|
import type { FilledLunaticComponentProps } from '../use-lunatic/commons/fill-components/fill-components';
|
|
3
3
|
type Props<T extends Record<string, unknown>> = {
|
|
4
|
-
components:
|
|
4
|
+
components: FilledLunaticComponentProps[];
|
|
5
5
|
autoFocusKey?: string;
|
|
6
6
|
componentProps?: (component: FilledLunaticComponentProps) => T;
|
|
7
|
-
wrapper?: (props: PropsWithChildren<FilledLunaticComponentProps & T
|
|
8
|
-
index: number;
|
|
9
|
-
}>) => ReactNode;
|
|
7
|
+
wrapper?: (props: PropsWithChildren<FilledLunaticComponentProps & T>) => ReactNode;
|
|
10
8
|
};
|
|
11
9
|
/**
|
|
12
10
|
* Entry point for orchestrators, this component display the list of fields
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './pairwise-links';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LunaticComponentProps } from '../type';
|
|
2
|
+
type Props = {
|
|
3
|
+
nbRows: number;
|
|
4
|
+
} & Omit<LunaticComponentProps<'PairwiseLinks'>, 'declarations'>;
|
|
5
|
+
declare function LinksOrchestrator(props: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export default LinksOrchestrator;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { LunaticComponentProps } from '../type';
|
|
2
|
-
|
|
2
|
+
declare const PairwiseLinks: ({ declarations, components, handleChange, value, missing, shortcut, features, preferences, management, executeExpression, xAxisIterations, yAxisIterations, id, symLinks, }: LunaticComponentProps<'PairwiseLinks'>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default PairwiseLinks;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LunaticComponentProps } from '../type';
|
|
2
|
+
type Props = {
|
|
3
|
+
linksIterations: [number, number];
|
|
4
|
+
lengths: number[];
|
|
5
|
+
} & Omit<LunaticComponentProps<'PairwiseLinks'>, 'declarations' | 'xAxisIterations' | 'yAxisIterations'>;
|
|
6
|
+
declare function Row({ components, value: valueMap, handleChange, features, missing, shortcut, management, className, preferences, executeExpression, linksIterations, symLinks, lengths, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default Row;
|
|
@@ -13,6 +13,7 @@ export type Props = {
|
|
|
13
13
|
shortcut?: boolean;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
readOnly?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
16
17
|
};
|
|
17
|
-
declare function RadioGroupContent({ options, value, id, onClick, checkboxStyle, shortcut, disabled, readOnly, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function RadioGroupContent({ options, value, id, onClick, checkboxStyle, shortcut, disabled, readOnly, invalid, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export default RadioGroupContent;
|
|
@@ -13,7 +13,7 @@ export type RadioGroupProps = {
|
|
|
13
13
|
label?: ReactNode;
|
|
14
14
|
onSelect: (v: string | null) => void;
|
|
15
15
|
checkboxStyle?: boolean;
|
|
16
|
-
errors?:
|
|
16
|
+
errors?: LunaticError[];
|
|
17
17
|
className?: string;
|
|
18
18
|
shortcut?: boolean;
|
|
19
19
|
disabled?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function findBestLabel(option: unknown, search: unknown): Promise<unknown>;
|
|
1
|
+
declare function findBestLabel(option: unknown, search: unknown, workersBasePath?: string): Promise<unknown>;
|
|
2
2
|
export default findBestLabel;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
1
2
|
import type { LunaticComponentProps } from '../../type';
|
|
2
|
-
type Props = Pick<LunaticComponentProps<'Suggester'>, 'storeName' | 'idbVersion' | 'id' | 'className' | 'optionRenderer' | 'labelRenderer' | 'disabled' | 'readOnly' | 'value' | 'label' | 'description' | 'getSuggesterStatus'
|
|
3
|
+
type Props = Pick<LunaticComponentProps<'Suggester'>, 'storeName' | 'idbVersion' | 'id' | 'className' | 'optionRenderer' | 'labelRenderer' | 'disabled' | 'readOnly' | 'value' | 'label' | 'description' | 'getSuggesterStatus'> & {
|
|
4
|
+
errors?: LunaticError[];
|
|
3
5
|
onSelect: (v: string | null) => void;
|
|
6
|
+
workersBasePath?: string;
|
|
4
7
|
};
|
|
5
|
-
export declare function IDBSuggester({ storeName, idbVersion, id, className, optionRenderer, labelRenderer, onSelect, disabled, value, label, description, getSuggesterStatus, errors, readOnly, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function IDBSuggester({ storeName, idbVersion, id, className, optionRenderer, labelRenderer, onSelect, disabled, value, label, description, getSuggesterStatus, errors, readOnly, workersBasePath, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LunaticComponentProps } from '../type';
|
|
2
|
-
declare function LunaticSuggester({ id, storeName, optionRenderer, labelRenderer, idbVersion, focused, value, handleChange, disabled, readOnly, errors, label, description, preferences, declarations, missing, missingResponse, management, response, className, getSuggesterStatus, }: LunaticComponentProps<'Suggester'>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function LunaticSuggester({ id, storeName, optionRenderer, labelRenderer, idbVersion, focused, value, handleChange, disabled, readOnly, errors, label, description, preferences, declarations, missing, missingResponse, management, response, className, getSuggesterStatus, workersBasePath, }: LunaticComponentProps<'Suggester'>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LunaticSuggester;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComboBoxOptionType } from '../../commons/components/combo-box/combo-box.type';
|
|
2
2
|
export declare function isWorkerCompatible(): boolean;
|
|
3
|
-
declare function createSearching(name: string, version: string): (search: string | null) => Promise<{
|
|
3
|
+
declare function createSearching(name: string, version: string, workersBasePath?: string): (search: string | null) => Promise<{
|
|
4
4
|
results: ComboBoxOptionType[];
|
|
5
5
|
}>;
|
|
6
6
|
export default createSearching;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LunaticBaseProps } from '../type';
|
|
2
|
+
import type { LunaticComponentDefinition, LunaticExpression } from '../../use-lunatic/type';
|
|
3
|
+
type Props = {
|
|
4
|
+
content: LunaticComponentDefinition | {
|
|
5
|
+
label: LunaticExpression;
|
|
6
|
+
rowspan?: number;
|
|
7
|
+
colspan?: number;
|
|
8
|
+
};
|
|
9
|
+
id: string;
|
|
10
|
+
executeExpression: LunaticBaseProps['executeExpression'];
|
|
11
|
+
iteration?: number;
|
|
12
|
+
value: Record<string, unknown>;
|
|
13
|
+
row?: string | number;
|
|
14
|
+
index?: string | number;
|
|
15
|
+
handleChange: LunaticBaseProps['handleChange'];
|
|
16
|
+
errors?: LunaticBaseProps['errors'];
|
|
17
|
+
};
|
|
18
|
+
declare function Cell({ content, id, executeExpression, iteration, value, row, index, handleChange, errors, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default Cell;
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
rowspan?: number;
|
|
8
8
|
}>;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export
|
|
10
|
+
declare function Header({ id, header }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export default Header;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './lunatic-table';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LunaticComponentProps } from '../type';
|
|
2
|
-
|
|
2
|
+
declare function LunaticTable(props: LunaticComponentProps<'Table'>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LunaticTable;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LunaticComponentDefinition, LunaticExpression } from '../../use-lunatic/type';
|
|
2
|
+
import type { LunaticBaseProps } from '../type';
|
|
3
|
+
type Props = {
|
|
4
|
+
components: Array<LunaticComponentDefinition | {
|
|
5
|
+
label: LunaticExpression;
|
|
6
|
+
rowspan?: number;
|
|
7
|
+
colspan?: number;
|
|
8
|
+
}>;
|
|
9
|
+
id: string;
|
|
10
|
+
executeExpression: LunaticBaseProps['executeExpression'];
|
|
11
|
+
iteration?: number;
|
|
12
|
+
valueMap: Record<string, unknown>;
|
|
13
|
+
rowIndex?: string | number;
|
|
14
|
+
handleChange: LunaticBaseProps['handleChange'];
|
|
15
|
+
errors?: LunaticBaseProps['errors'];
|
|
16
|
+
};
|
|
17
|
+
declare function Row({ id, components, executeExpression, valueMap, rowIndex, iteration, handleChange, errors, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Row;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LunaticComponentProps } from '../type';
|
|
2
|
+
type Props = Pick<LunaticComponentProps<'Table'>, 'body' | 'id' | 'executeExpression' | 'value' | 'handleChange' | 'iteration'>;
|
|
3
|
+
declare function TableOrchestrator({ body, id, executeExpression, value: valueMap, handleChange, iteration, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export default TableOrchestrator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import './textarea.scss';
|
|
3
|
-
import type
|
|
3
|
+
import { type LunaticError } from '../../../use-lunatic/type';
|
|
4
4
|
type Props = {
|
|
5
5
|
id?: string;
|
|
6
6
|
rows?: number;
|
|
@@ -11,8 +11,9 @@ type Props = {
|
|
|
11
11
|
label?: ReactNode;
|
|
12
12
|
value?: string | number | null;
|
|
13
13
|
description?: string;
|
|
14
|
-
errors?:
|
|
14
|
+
errors?: LunaticError[];
|
|
15
15
|
readOnly?: boolean;
|
|
16
|
+
required?: boolean;
|
|
16
17
|
};
|
|
17
18
|
declare const _default: import("react").ComponentType<Props>;
|
|
18
19
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LunaticComponentDefinition, LunaticError, LunaticState } from '../use-lunatic/type';
|
|
2
1
|
import type { CSSProperties, FunctionComponent, ReactNode } from 'react';
|
|
3
|
-
import { SuggesterStatus } from '../use-lunatic/use-suggesters';
|
|
4
2
|
import useLunatic from '../use-lunatic';
|
|
5
3
|
import type { FilledLunaticComponentProps } from '../use-lunatic/commons/fill-components/fill-components';
|
|
4
|
+
import type { LunaticComponentDefinition, LunaticError, LunaticExpression, LunaticState } from '../use-lunatic/type';
|
|
5
|
+
import { SuggesterStatus } from '../use-lunatic/use-suggesters';
|
|
6
6
|
type Formats = 'PTnHnM' | 'PnYnM';
|
|
7
7
|
export type VtlExpression = {
|
|
8
8
|
value: string;
|
|
@@ -60,7 +60,7 @@ export type SuggesterOption = {
|
|
|
60
60
|
};
|
|
61
61
|
type ComponentPropsByType = {
|
|
62
62
|
InputNumber: LunaticBaseProps<number | null> & {
|
|
63
|
-
min
|
|
63
|
+
min?: number;
|
|
64
64
|
max: number;
|
|
65
65
|
decimals: number;
|
|
66
66
|
unit?: string;
|
|
@@ -94,7 +94,7 @@ type ComponentPropsByType = {
|
|
|
94
94
|
min: number;
|
|
95
95
|
max: number;
|
|
96
96
|
};
|
|
97
|
-
iterations
|
|
97
|
+
iterations?: number;
|
|
98
98
|
getComponents: (n: number) => FilledLunaticComponentProps[];
|
|
99
99
|
executeExpression: LunaticState['executeExpression'];
|
|
100
100
|
value: Record<string, unknown[]>;
|
|
@@ -108,7 +108,7 @@ type ComponentPropsByType = {
|
|
|
108
108
|
min: number;
|
|
109
109
|
max: number;
|
|
110
110
|
};
|
|
111
|
-
iterations
|
|
111
|
+
iterations?: number;
|
|
112
112
|
getComponents: (n: number) => FilledLunaticComponentProps[];
|
|
113
113
|
executeExpression: LunaticState['executeExpression'];
|
|
114
114
|
value: Record<string, unknown[]>;
|
|
@@ -124,7 +124,9 @@ type ComponentPropsByType = {
|
|
|
124
124
|
rowspan?: number;
|
|
125
125
|
colspan?: number;
|
|
126
126
|
}>;
|
|
127
|
-
body:
|
|
127
|
+
body: Array<Array<{
|
|
128
|
+
label: LunaticExpression;
|
|
129
|
+
}>>;
|
|
128
130
|
executeExpression: LunaticState['executeExpression'];
|
|
129
131
|
iteration: LunaticState['pager']['iteration'];
|
|
130
132
|
};
|
|
@@ -232,10 +234,10 @@ type ComponentPropsByType = {
|
|
|
232
234
|
yAxisIterations: number;
|
|
233
235
|
symLinks: Record<string, Record<string, string>>;
|
|
234
236
|
value: Record<string, unknown[]>;
|
|
235
|
-
getComponents: (x: number, y: number) => FilledLunaticComponentProps[];
|
|
236
237
|
};
|
|
237
238
|
Suggester: LunaticBaseProps<string | null> & {
|
|
238
239
|
storeName: string;
|
|
240
|
+
workersBasePath?: string;
|
|
239
241
|
getSuggesterStatus: (name: string) => {
|
|
240
242
|
status: SuggesterStatus;
|
|
241
243
|
timestamp: number;
|
|
@@ -13,9 +13,23 @@ export declare enum ActionKind {
|
|
|
13
13
|
export type ActionHandleChange = {
|
|
14
14
|
type: ActionKind.HANDLE_CHANGE;
|
|
15
15
|
payload: {
|
|
16
|
-
|
|
16
|
+
response: {
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
17
19
|
value: unknown;
|
|
18
|
-
|
|
20
|
+
args?: {
|
|
21
|
+
loop?: boolean;
|
|
22
|
+
length?: number;
|
|
23
|
+
index?: number;
|
|
24
|
+
linksIterations?: number[];
|
|
25
|
+
symLinks?: {
|
|
26
|
+
[variableName: string]: Record<string, string>;
|
|
27
|
+
};
|
|
28
|
+
paginatedLoop?: unknown;
|
|
29
|
+
shallowIteration?: unknown;
|
|
30
|
+
lengths?: number[];
|
|
31
|
+
onChange?: LunaticState['handleChange'];
|
|
32
|
+
};
|
|
19
33
|
};
|
|
20
34
|
};
|
|
21
35
|
export type ActionGoToPage = {
|
|
@@ -40,6 +54,7 @@ export type ActionInit = {
|
|
|
40
54
|
goNextPage: () => void;
|
|
41
55
|
goPreviousPage: () => void;
|
|
42
56
|
withOverview: boolean;
|
|
57
|
+
workersBasePath?: string;
|
|
43
58
|
};
|
|
44
59
|
};
|
|
45
60
|
export type ActionOnSetWaiting = {
|
|
@@ -100,10 +115,11 @@ export declare const onInit: (payload: {
|
|
|
100
115
|
goNextPage: () => void;
|
|
101
116
|
goPreviousPage: () => void;
|
|
102
117
|
withOverview: boolean;
|
|
118
|
+
workersBasePath?: string | undefined;
|
|
103
119
|
}) => ActionInit & {
|
|
104
120
|
type: ActionKind.ON_INIT;
|
|
105
121
|
};
|
|
106
|
-
export declare const handleChange: (
|
|
122
|
+
export declare const handleChange: (response: ActionHandleChange['payload']['response'], value: ActionHandleChange['payload']['value'], args: ActionHandleChange['payload']['args']) => Action;
|
|
107
123
|
export declare const onSetWaiting: (status: boolean) => Action;
|
|
108
124
|
export declare const updateState: (payload: {
|
|
109
125
|
getSuggesterStatus: (name: string) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LunaticState, LunaticValues } from '../type';
|
|
2
|
+
export declare const interpretAllCalculatedVariables: ({ variables, partialVariables, builtVariables, }: {
|
|
3
|
+
variables: LunaticState['variables'];
|
|
4
|
+
builtVariables: LunaticValues;
|
|
5
|
+
partialVariables?: {
|
|
6
|
+
[variableName: string]: import("../type").LunaticStateVariable;
|
|
7
|
+
} | undefined;
|
|
8
|
+
}) => LunaticValues;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { LunaticError, LunaticState } from '../type';
|
|
2
2
|
export type StateForControls = Pick<LunaticState, 'pager' | 'pages' | 'isInLoop' | 'executeExpression'>;
|
|
3
|
-
|
|
3
|
+
declare function computeErrors(state: StateForControls): {
|
|
4
4
|
currentErrors: Record<string, LunaticError[]> | undefined;
|
|
5
5
|
isCritical: boolean;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
export {};
|
|
7
|
+
export default computeErrors;
|