@inseefr/lunatic 2.6.3-rc.1 → 2.6.4
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/searching/meloto-order.d.ts +2 -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/stories/suggester/suggester-workers.stories.js +36 -1
- package/lib/stories/suggester/suggester.stories.js +8 -4
- 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/searching/meloto-order.js +6 -5
- 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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LunaticExpression, LunaticState } from '../../type';
|
|
2
|
+
export type ExpressionLogger = (expression: string | LunaticExpression, bindings: {
|
|
3
|
+
[variableName: string]: unknown;
|
|
4
|
+
}, e: unknown) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Generates methods to interact with variables
|
|
7
|
+
*/
|
|
8
|
+
declare function createExecuteExpression(variables: LunaticState['variables'], features: string[]): readonly [<T = unknown>(expObject: unknown, args?: Parameters<LunaticState['executeExpression']>[1]) => T, (name: string, value: unknown) => void];
|
|
9
|
+
export default createExecuteExpression;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Bindings = {
|
|
2
|
+
[variableName: string]: unknown;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* To avoid performance issue when recalculating expression, memoise the value for every expression, binding combo
|
|
6
|
+
*/
|
|
7
|
+
declare function createMemoizer(): readonly [(expression: string, bindings: Bindings, value: unknown) => void, (expression: string, bindings: Bindings) => any];
|
|
8
|
+
export default createMemoizer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LunaticState, LunaticVariable } from '../../type';
|
|
2
|
+
import { type ExpressionLogger } from './create-execute-expression';
|
|
3
|
+
type Args = {
|
|
4
|
+
variables: LunaticState['variables'];
|
|
5
|
+
bindings: {
|
|
6
|
+
[variableName: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
execute: (expObject: unknown, args: {
|
|
9
|
+
iteration?: number;
|
|
10
|
+
linksIterations?: number[];
|
|
11
|
+
logging?: ExpressionLogger;
|
|
12
|
+
}) => unknown;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Refresh calculated variables with the new value in the bindings
|
|
16
|
+
*/
|
|
17
|
+
declare function createRefreshCalculated({ variables, execute, bindings }: Args): readonly [(map: {
|
|
18
|
+
[variableName: string]: unknown;
|
|
19
|
+
}, { rootExpression, iteration, linksIterations, }?: {
|
|
20
|
+
rootExpression?: string | undefined;
|
|
21
|
+
iteration?: number | undefined;
|
|
22
|
+
linksIterations?: number[] | undefined;
|
|
23
|
+
}) => Record<string, unknown>, (name: string, variable: LunaticVariable) => void];
|
|
24
|
+
export default createRefreshCalculated;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { VTLBindings } from '../../type';
|
|
3
|
+
/**
|
|
4
|
+
* Run a VTL expression and return the result
|
|
5
|
+
*/
|
|
6
|
+
export declare function executeVtlExpression(expression: string, vtlBindings: {
|
|
7
|
+
[variableName: string]: unknown;
|
|
8
|
+
}): unknown;
|
|
9
|
+
declare function loggingDefault(expression: string, bindings: VTLBindings, e: unknown): void;
|
|
10
|
+
declare function executeExpression(vtlBindings: VTLBindings, expression: string, type: 'VTL' | 'VTL|MD', features: string[], logging?: typeof loggingDefault): ReactNode;
|
|
11
|
+
export default executeExpression;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './create-execute-expression';
|
|
@@ -0,0 +1,418 @@
|
|
|
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: {
|
|
102
|
+
label?: import("../../type-source").LabelType | undefined;
|
|
103
|
+
value?: string | undefined;
|
|
104
|
+
format?: string | undefined;
|
|
105
|
+
dateFormat?: string | undefined;
|
|
106
|
+
unit?: string | undefined;
|
|
107
|
+
options: {
|
|
108
|
+
value: string;
|
|
109
|
+
label: import("../../type-source").LabelType;
|
|
110
|
+
}[];
|
|
111
|
+
response: import("../../type-source").ResponseType;
|
|
112
|
+
bindingDependencies: string[];
|
|
113
|
+
componentType?: import("../../type-source").ComponentTypeEnum | undefined;
|
|
114
|
+
maxLength?: number | undefined;
|
|
115
|
+
min?: number | undefined;
|
|
116
|
+
max?: number | undefined;
|
|
117
|
+
decimals?: number | undefined;
|
|
118
|
+
colspan?: number | undefined;
|
|
119
|
+
rowspan?: number | undefined;
|
|
120
|
+
id?: string | undefined;
|
|
121
|
+
}[];
|
|
122
|
+
positioning: "HORIZONTAL";
|
|
123
|
+
} | {
|
|
124
|
+
required: boolean;
|
|
125
|
+
label: import("../../type-source").LabelType;
|
|
126
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
127
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
128
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
129
|
+
id: string;
|
|
130
|
+
bindingDependencies?: string[] | undefined;
|
|
131
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
132
|
+
mandatory?: boolean | undefined;
|
|
133
|
+
page: string;
|
|
134
|
+
componentType: "Loop";
|
|
135
|
+
loopDependencies: string[];
|
|
136
|
+
lines: {
|
|
137
|
+
min: import("../../type-source").LabelType;
|
|
138
|
+
max: import("../../type-source").LabelType;
|
|
139
|
+
};
|
|
140
|
+
components: import("../../type-source").ComponentType[];
|
|
141
|
+
iterations: import("../../type-source").LabelType;
|
|
142
|
+
maxPage: string;
|
|
143
|
+
depth: number;
|
|
144
|
+
paginatedLoop: boolean;
|
|
145
|
+
} | {
|
|
146
|
+
required: boolean;
|
|
147
|
+
label: import("../../type-source").LabelType;
|
|
148
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
149
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
150
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
151
|
+
id: string;
|
|
152
|
+
bindingDependencies?: string[] | undefined;
|
|
153
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
154
|
+
mandatory?: boolean | undefined;
|
|
155
|
+
page: string;
|
|
156
|
+
componentType: "Table";
|
|
157
|
+
lines: {
|
|
158
|
+
min: import("../../type-source").LabelType;
|
|
159
|
+
max: import("../../type-source").LabelType;
|
|
160
|
+
};
|
|
161
|
+
header: {
|
|
162
|
+
value: string;
|
|
163
|
+
label: string | import("../../type-source").LabelType;
|
|
164
|
+
options: {
|
|
165
|
+
value: string;
|
|
166
|
+
label: import("../../type-source").LabelType;
|
|
167
|
+
}[];
|
|
168
|
+
colspan?: number | undefined;
|
|
169
|
+
rowspan?: number | undefined;
|
|
170
|
+
}[];
|
|
171
|
+
body: {
|
|
172
|
+
label?: import("../../type-source").LabelType | undefined;
|
|
173
|
+
value?: string | undefined;
|
|
174
|
+
format?: string | undefined;
|
|
175
|
+
dateFormat?: string | undefined;
|
|
176
|
+
unit?: string | undefined;
|
|
177
|
+
options: {
|
|
178
|
+
value: string;
|
|
179
|
+
label: import("../../type-source").LabelType;
|
|
180
|
+
}[];
|
|
181
|
+
response: import("../../type-source").ResponseType;
|
|
182
|
+
bindingDependencies: string[];
|
|
183
|
+
componentType?: import("../../type-source").ComponentTypeEnum | undefined;
|
|
184
|
+
maxLength?: number | undefined;
|
|
185
|
+
min?: number | undefined;
|
|
186
|
+
max?: number | undefined;
|
|
187
|
+
decimals?: number | undefined;
|
|
188
|
+
colspan?: number | undefined;
|
|
189
|
+
rowspan?: number | undefined;
|
|
190
|
+
id?: string | undefined;
|
|
191
|
+
}[];
|
|
192
|
+
positioning: "HORIZONTAL";
|
|
193
|
+
} | {
|
|
194
|
+
required: boolean;
|
|
195
|
+
label: import("../../type-source").LabelType;
|
|
196
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
197
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
198
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
199
|
+
id: string;
|
|
200
|
+
bindingDependencies?: string[] | undefined;
|
|
201
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
202
|
+
mandatory?: boolean | undefined;
|
|
203
|
+
page: string;
|
|
204
|
+
componentType: "InputNumber";
|
|
205
|
+
unit: string;
|
|
206
|
+
response: import("../../type-source").ResponseType;
|
|
207
|
+
min?: number | undefined;
|
|
208
|
+
max?: number | undefined;
|
|
209
|
+
decimals?: number | undefined;
|
|
210
|
+
} | {
|
|
211
|
+
required: boolean;
|
|
212
|
+
label: import("../../type-source").LabelType;
|
|
213
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
214
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
215
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
216
|
+
id: string;
|
|
217
|
+
bindingDependencies?: string[] | undefined;
|
|
218
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
219
|
+
mandatory?: boolean | undefined;
|
|
220
|
+
page: string;
|
|
221
|
+
componentType: "Datepicker";
|
|
222
|
+
dateFormat: string;
|
|
223
|
+
response: import("../../type-source").ResponseType;
|
|
224
|
+
min?: string | undefined;
|
|
225
|
+
max?: string | undefined;
|
|
226
|
+
} | {
|
|
227
|
+
required: boolean;
|
|
228
|
+
label: import("../../type-source").LabelType;
|
|
229
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
230
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
231
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
232
|
+
id: string;
|
|
233
|
+
bindingDependencies?: string[] | undefined;
|
|
234
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
235
|
+
mandatory?: boolean | undefined;
|
|
236
|
+
page: string;
|
|
237
|
+
componentType: "CheckboxGroup";
|
|
238
|
+
responses: {
|
|
239
|
+
label: import("../../type-source").LabelType;
|
|
240
|
+
response: import("../../type-source").ResponseType;
|
|
241
|
+
id: string;
|
|
242
|
+
}[];
|
|
243
|
+
} | {
|
|
244
|
+
required: boolean;
|
|
245
|
+
label: import("../../type-source").LabelType;
|
|
246
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
247
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
248
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
249
|
+
id: string;
|
|
250
|
+
bindingDependencies?: string[] | undefined;
|
|
251
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
252
|
+
mandatory?: boolean | undefined;
|
|
253
|
+
page: string;
|
|
254
|
+
componentType: "CheckboxBoolean";
|
|
255
|
+
response: import("../../type-source").ResponseType;
|
|
256
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
257
|
+
} | {
|
|
258
|
+
required: boolean;
|
|
259
|
+
label: import("../../type-source").LabelType;
|
|
260
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
261
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
262
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
263
|
+
id: string;
|
|
264
|
+
bindingDependencies?: string[] | undefined;
|
|
265
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
266
|
+
mandatory?: boolean | undefined;
|
|
267
|
+
page: string;
|
|
268
|
+
componentType: "Radio";
|
|
269
|
+
options: {
|
|
270
|
+
value: string;
|
|
271
|
+
label: import("../../type-source").LabelType;
|
|
272
|
+
}[];
|
|
273
|
+
response: import("../../type-source").ResponseType;
|
|
274
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
275
|
+
} | {
|
|
276
|
+
required: boolean;
|
|
277
|
+
label: import("../../type-source").LabelType;
|
|
278
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
279
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
280
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
281
|
+
id: string;
|
|
282
|
+
bindingDependencies?: string[] | undefined;
|
|
283
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
284
|
+
mandatory?: boolean | undefined;
|
|
285
|
+
page: string;
|
|
286
|
+
componentType: "FilterDescription";
|
|
287
|
+
filterDescription: boolean;
|
|
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: "Dropdown";
|
|
300
|
+
options: {
|
|
301
|
+
value: string;
|
|
302
|
+
label: import("../../type-source").LabelType;
|
|
303
|
+
}[];
|
|
304
|
+
response: import("../../type-source").ResponseType;
|
|
305
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
306
|
+
} | {
|
|
307
|
+
required: boolean;
|
|
308
|
+
label: import("../../type-source").LabelType;
|
|
309
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
310
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
311
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
312
|
+
id: string;
|
|
313
|
+
bindingDependencies?: string[] | undefined;
|
|
314
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
315
|
+
mandatory?: boolean | undefined;
|
|
316
|
+
page: string;
|
|
317
|
+
componentType: "PairwiseLinks";
|
|
318
|
+
xAxisIterations: import("../../type-source").LabelType;
|
|
319
|
+
yAxisIterations: import("../../type-source").LabelType;
|
|
320
|
+
symLinks: {
|
|
321
|
+
[variableName: string]: Record<string, string>;
|
|
322
|
+
};
|
|
323
|
+
} | {
|
|
324
|
+
required: boolean;
|
|
325
|
+
label: import("../../type-source").LabelType;
|
|
326
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
327
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
328
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
329
|
+
id: string;
|
|
330
|
+
bindingDependencies?: string[] | undefined;
|
|
331
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
332
|
+
mandatory?: boolean | undefined;
|
|
333
|
+
page: string;
|
|
334
|
+
componentType: "Roundabout";
|
|
335
|
+
components: import("../../type-source").ComponentType[];
|
|
336
|
+
iterations: import("../../type-source").LabelType;
|
|
337
|
+
locked: boolean;
|
|
338
|
+
expressions: Record<string, import("../../type-source").LabelType>;
|
|
339
|
+
} | {
|
|
340
|
+
required: boolean;
|
|
341
|
+
label: import("../../type-source").LabelType;
|
|
342
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
343
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
344
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
345
|
+
id: string;
|
|
346
|
+
bindingDependencies?: string[] | undefined;
|
|
347
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
348
|
+
mandatory?: boolean | undefined;
|
|
349
|
+
page: string;
|
|
350
|
+
componentType: "Suggester";
|
|
351
|
+
storeName: string;
|
|
352
|
+
} | {
|
|
353
|
+
required: boolean;
|
|
354
|
+
label: import("../../type-source").LabelType;
|
|
355
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
356
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
357
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
358
|
+
id: string;
|
|
359
|
+
bindingDependencies?: string[] | undefined;
|
|
360
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
361
|
+
mandatory?: boolean | undefined;
|
|
362
|
+
page: string;
|
|
363
|
+
componentType: "Input" | "Textarea";
|
|
364
|
+
maxLength: number;
|
|
365
|
+
missingResponse?: import("../../type-source").ResponseType | undefined;
|
|
366
|
+
response: import("../../type-source").ResponseType;
|
|
367
|
+
} | {
|
|
368
|
+
required: boolean;
|
|
369
|
+
label: import("../../type-source").LabelType;
|
|
370
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
371
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
372
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
373
|
+
id: string;
|
|
374
|
+
bindingDependencies?: string[] | undefined;
|
|
375
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
376
|
+
mandatory?: boolean | undefined;
|
|
377
|
+
page: string;
|
|
378
|
+
componentType: "CheckboxOne";
|
|
379
|
+
} | {
|
|
380
|
+
required: boolean;
|
|
381
|
+
label: import("../../type-source").LabelType;
|
|
382
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
383
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
384
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
385
|
+
id: string;
|
|
386
|
+
bindingDependencies?: string[] | undefined;
|
|
387
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
388
|
+
mandatory?: boolean | undefined;
|
|
389
|
+
page: string;
|
|
390
|
+
componentType: "ConfirmationModal";
|
|
391
|
+
} | {
|
|
392
|
+
required: boolean;
|
|
393
|
+
label: import("../../type-source").LabelType;
|
|
394
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
395
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
396
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
397
|
+
id: string;
|
|
398
|
+
bindingDependencies?: string[] | undefined;
|
|
399
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
400
|
+
mandatory?: boolean | undefined;
|
|
401
|
+
page: string;
|
|
402
|
+
componentType: "ComponentSet";
|
|
403
|
+
components: import("../../type-source").ComponentType[];
|
|
404
|
+
} | {
|
|
405
|
+
required: boolean;
|
|
406
|
+
label: import("../../type-source").LabelType;
|
|
407
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
408
|
+
conditionFilter: import("../../type-source").ConditionFilterType;
|
|
409
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
410
|
+
id: string;
|
|
411
|
+
bindingDependencies?: string[] | undefined;
|
|
412
|
+
hierarchy: import("../../type-source").Hierarchy;
|
|
413
|
+
mandatory?: boolean | undefined;
|
|
414
|
+
page: string;
|
|
415
|
+
componentType: "QuestionExplication";
|
|
416
|
+
description: string;
|
|
417
|
+
bgColor?: string | undefined;
|
|
418
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LunaticComponentDefinition, LunaticState } from '../../type';
|
|
2
2
|
export type FilledProps = {
|
|
3
|
-
value
|
|
3
|
+
value: unknown;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
declare function fillComponentValue(component: LunaticComponentDefinition, state: LunaticState): LunaticComponentDefinition & FilledProps;
|
|
6
|
+
export default fillComponentValue;
|
|
@@ -10,12 +10,6 @@ export type FilledLunaticComponentProps<T = LunaticComponentDefinition['componen
|
|
|
10
10
|
}> & FilledManagementProps & FilledValueProps & FilledMissingResponseProps & FilledHandlersProps & FilledPaginationProps & {
|
|
11
11
|
conditionFilter?: boolean;
|
|
12
12
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Fill component with elements from the state
|
|
15
|
-
*
|
|
16
|
-
* Force typing for this function since it's doo dynamic
|
|
17
|
-
*/
|
|
18
|
-
export declare const fillComponent: (component: LunaticComponentDefinition, state: LunaticState) => FilledLunaticComponentProps;
|
|
19
13
|
/**
|
|
20
14
|
* Fill components with values coming from the state, and interpret VTL expression
|
|
21
15
|
*/
|