@inseefr/lunatic 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Radio/Radio.d.ts +1 -1
- package/lib/components/Roundabout/extra.d.ts +1 -1
- package/lib/components/Sequence/Sequence.d.ts +1 -1
- package/lib/components/Subsequence/Subsequence.d.ts +1 -1
- package/lib/components/Switch/Switch.d.ts +1 -1
- package/lib/components/library.d.ts +8 -8
- package/lib/components/shared/Combobox/Selection/ComboboxInput.d.ts +2 -1
- package/lib/components/shared/Combobox/Selection/ComboboxInput.js.map +1 -1
- package/lib/components/shared/HOC/slottableComponent.d.ts +1 -1
- package/lib/components/shared/HOC/slottableComponent.js +2 -0
- package/lib/components/shared/HOC/slottableComponent.js.map +1 -1
- package/lib/components/type.d.ts +26 -24
- package/lib/index.d.ts +1 -1
- package/lib/type.source.d.ts +20 -20
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +1 -1
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
- package/lib/use-lunatic/commons/fill-components/fill-components.js +1 -1
- package/lib/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
- package/lib/use-lunatic/props/getComponentTypeProps.d.ts +28 -28
- package/lib/use-lunatic/props/propOptions.d.ts +9 -9
- package/lib/use-lunatic/props/propOptions.js +10 -20
- package/lib/use-lunatic/props/propOptions.js.map +1 -1
- package/lib/use-lunatic/props/propOptions.spec.d.ts +1 -0
- package/lib/use-lunatic/props/propOptions.spec.js +57 -0
- package/lib/use-lunatic/props/propOptions.spec.js.map +1 -0
- package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +6 -0
- package/lib/use-lunatic/reducer/commons/auto-explore-loop.js.map +1 -1
- package/lib/use-lunatic/type.d.ts +1 -4
- package/lib/use-lunatic/use-lunatic.d.ts +1 -4
- package/lib/use-lunatic/use-lunatic.js +1 -10
- package/lib/use-lunatic/use-lunatic.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Accordion: import("react").ComponentType<import("../type").LunaticBaseProps<string> & {
|
|
2
|
+
export declare const Accordion: import("react").ComponentType<import("../type").LunaticBaseProps<string> & import("../type").LunaticExtraProps & {
|
|
3
3
|
componentType?: "Accordion" | undefined;
|
|
4
4
|
items: {
|
|
5
5
|
label: import("react").ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Radio: import("react").ComponentType<import("../type").LunaticBaseProps<string | null> & {
|
|
2
|
+
export declare const Radio: import("react").ComponentType<import("../type").LunaticBaseProps<string | null> & import("../type").LunaticExtraProps & {
|
|
3
3
|
options: import("../../use-lunatic/props/propOptions").InterpretedOption[];
|
|
4
4
|
checkboxStyle?: boolean | undefined;
|
|
5
5
|
response: {
|
|
@@ -11,4 +11,4 @@ export declare const RoundaboutItTitle: React.ComponentType<{
|
|
|
11
11
|
export declare const RoundaboutItContainer: React.ComponentType<{
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}>;
|
|
14
|
-
export declare const RoundaboutPending: React.ComponentType<
|
|
14
|
+
export declare const RoundaboutPending: React.ComponentType<unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Sequence: import("react").ComponentType<Pick<import("../type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id" | "style"> & {
|
|
2
|
+
export declare const Sequence: import("react").ComponentType<Pick<import("../type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id" | "style"> & import("../type").LunaticExtraProps & {
|
|
3
3
|
componentType?: "Sequence" | undefined;
|
|
4
4
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Subsequence: import("react").ComponentType<Pick<import("../type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id"> & {
|
|
2
|
+
export declare const Subsequence: import("react").ComponentType<Pick<import("../type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id"> & import("../type").LunaticExtraProps & {
|
|
3
3
|
componentType?: "Subsequence" | undefined;
|
|
4
4
|
}>;
|
|
@@ -7,7 +7,7 @@ type CustomProps = Omit<LunaticComponentProps<'Switch'>, 'response' | 'handleCha
|
|
|
7
7
|
checked: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const CustomSwitch: React.ComponentType<CustomProps>;
|
|
10
|
-
export declare const Switch: React.ComponentType<import("../type").LunaticBaseProps<boolean> & {
|
|
10
|
+
export declare const Switch: React.ComponentType<import("../type").LunaticBaseProps<boolean> & import("../type").LunaticExtraProps & {
|
|
11
11
|
response: {
|
|
12
12
|
name: string;
|
|
13
13
|
};
|
|
@@ -16,13 +16,13 @@ import { CheckboxOne } from './CheckboxOne/CheckboxOne';
|
|
|
16
16
|
import { Suggester } from './Suggester/Suggester';
|
|
17
17
|
import { Summary } from './Summary/Summary';
|
|
18
18
|
export declare const library: {
|
|
19
|
-
Sequence: ComponentType<Pick<import("./type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id" | "style"> & {
|
|
19
|
+
Sequence: ComponentType<Pick<import("./type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id" | "style"> & import("./type").LunaticExtraProps & {
|
|
20
20
|
componentType?: "Sequence" | undefined;
|
|
21
21
|
}>;
|
|
22
|
-
Subsequence: ComponentType<Pick<import("./type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id"> & {
|
|
22
|
+
Subsequence: ComponentType<Pick<import("./type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id"> & import("./type").LunaticExtraProps & {
|
|
23
23
|
componentType?: "Subsequence" | undefined;
|
|
24
24
|
}>;
|
|
25
|
-
RosterForLoop: (props: import("./type").LunaticBaseProps<unknown> & {
|
|
25
|
+
RosterForLoop: (props: import("./type").LunaticBaseProps<unknown> & import("./type").LunaticExtraProps & {
|
|
26
26
|
lines: {
|
|
27
27
|
min: number;
|
|
28
28
|
max: number;
|
|
@@ -50,7 +50,7 @@ export declare const library: {
|
|
|
50
50
|
CheckboxGroup: typeof CheckboxGroup;
|
|
51
51
|
CheckboxOne: typeof CheckboxOne;
|
|
52
52
|
CheckboxBoolean: typeof CheckboxBoolean;
|
|
53
|
-
Radio: ComponentType<import("./type").LunaticBaseProps<string | null> & {
|
|
53
|
+
Radio: ComponentType<import("./type").LunaticBaseProps<string | null> & import("./type").LunaticExtraProps & {
|
|
54
54
|
options: import("../use-lunatic/props/propOptions").InterpretedOption[];
|
|
55
55
|
checkboxStyle?: boolean | undefined;
|
|
56
56
|
response: {
|
|
@@ -62,7 +62,7 @@ export declare const library: {
|
|
|
62
62
|
Input: typeof Input;
|
|
63
63
|
Duration: typeof Duration;
|
|
64
64
|
Textarea: typeof Textarea;
|
|
65
|
-
Switch: ComponentType<import("./type").LunaticBaseProps<boolean> & {
|
|
65
|
+
Switch: ComponentType<import("./type").LunaticBaseProps<boolean> & import("./type").LunaticExtraProps & {
|
|
66
66
|
response: {
|
|
67
67
|
name: string;
|
|
68
68
|
};
|
|
@@ -72,7 +72,7 @@ export declare const library: {
|
|
|
72
72
|
} | undefined;
|
|
73
73
|
componentType?: "Switch" | undefined;
|
|
74
74
|
}>;
|
|
75
|
-
Question: ({ components, ...props }: Pick<import("./type").LunaticBaseProps<unknown>, "label" | "description" | "declarations" | "id" | "errors" | "disabled" | "readOnly"> & {
|
|
75
|
+
Question: ({ components, ...props }: Pick<import("./type").LunaticBaseProps<unknown>, "label" | "description" | "declarations" | "id" | "errors" | "disabled" | "readOnly"> & import("./type").LunaticExtraProps & {
|
|
76
76
|
components: LunaticComponentProps<keyof import("./type").ComponentPropsByType>[];
|
|
77
77
|
componentType?: "Question" | undefined;
|
|
78
78
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -81,7 +81,7 @@ export declare const library: {
|
|
|
81
81
|
label?: import("react").ReactNode;
|
|
82
82
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
83
83
|
Dropdown: typeof Dropdown;
|
|
84
|
-
PairwiseLinks: ({ declarations, xAxisIterations, yAxisIterations, id, getComponents, }: Omit<import("./type").LunaticBaseProps<unknown>, "value"> & {
|
|
84
|
+
PairwiseLinks: ({ declarations, xAxisIterations, yAxisIterations, id, getComponents, }: Omit<import("./type").LunaticBaseProps<unknown>, "value"> & import("./type").LunaticExtraProps & {
|
|
85
85
|
components: import("..").LunaticComponentDefinition[];
|
|
86
86
|
features?: ("VTL" | "MD")[] | undefined;
|
|
87
87
|
executeExpression: <T extends unknown = unknown>(expression: import("../type.source").VTLExpression, args?: {
|
|
@@ -99,7 +99,7 @@ export declare const library: {
|
|
|
99
99
|
Roundabout: typeof Roundabout;
|
|
100
100
|
Suggester: typeof Suggester;
|
|
101
101
|
Summary: typeof Summary;
|
|
102
|
-
Accordion: ComponentType<import("./type").LunaticBaseProps<string> & {
|
|
102
|
+
Accordion: ComponentType<import("./type").LunaticBaseProps<string> & import("./type").LunaticExtraProps & {
|
|
103
103
|
componentType?: "Accordion" | undefined;
|
|
104
104
|
items: {
|
|
105
105
|
label: import("react").ReactNode;
|
|
@@ -6,5 +6,6 @@ export type InputProps = {
|
|
|
6
6
|
labelledBy?: string;
|
|
7
7
|
focused?: boolean;
|
|
8
8
|
invalid?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
9
10
|
} & HTMLAttributes<HTMLInputElement>;
|
|
10
|
-
export declare const ComboboxInput: React.ComponentType<
|
|
11
|
+
export declare const ComboboxInput: React.ComponentType<InputProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxInput.js","sourceRoot":"","sources":["../../../../../src/components/shared/Combobox/Selection/ComboboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EACb,MAAM,EACN,SAAS,GAGT,MAAM,OAAO,CAAC;AACf,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxInput.js","sourceRoot":"","sources":["../../../../../src/components/shared/Combobox/Selection/ComboboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EACb,MAAM,EACN,SAAS,GAGT,MAAM,OAAO,CAAC;AACf,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAYlE,SAAS,oBAAoB,CAAC,EAC7B,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,EAAE,EACF,UAAU,EACV,OAAO,EACP,SAAS,EACT,OAAO,GACK;IACZ,MAAM,OAAO,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAE/C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACzB,CAAC;IACF,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvB,MAAM,SAAS,GAAyB,CAAC,CAAC,EAAE,EAAE;QAC7C,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAClB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;YAC9C,CAAC,CAAC,cAAc,EAAE,CAAC;QACpB,CAAC;IACF,CAAC,CAAC;IAEF,OAAO,CACN,gBACC,GAAG,EAAE,OAAO,EACZ,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,SAAS,CAAC,EAC3D,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,kBACE,OAAO,EACrB,KAAK,EAAC,WAAW,EACjB,YAAY,EAAC,KAAK,EAClB,cAAc,EAAC,KAAK,EACpB,WAAW,EAAC,KAAK,EACjB,UAAU,EAAC,OAAO,EAClB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,qBACD,UAAU,EAC3B,SAAS,EAAE,SAAS,GACnB,CACF,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAC9C,eAAe,EACf,oBAAoB,CACpB,CAAC"}
|
|
@@ -106,4 +106,4 @@ export declare const SlotsProvider: ({ slots, children, }: PropsWithChildren<{
|
|
|
106
106
|
*
|
|
107
107
|
* The component can be replaced using the "slots" props on <LunaticComponents>
|
|
108
108
|
*/
|
|
109
|
-
export declare function slottableComponent<T
|
|
109
|
+
export declare function slottableComponent<T>(name: keyof LunaticSlotComponents, OriginalComponent: FunctionComponent<T>): ComponentType<T>;
|
|
@@ -18,8 +18,10 @@ export function slottableComponent(name, OriginalComponent) {
|
|
|
18
18
|
const custom = useContext(SlotsContext) ?? empty;
|
|
19
19
|
if (custom && name in custom) {
|
|
20
20
|
const SlotComponent = custom[name];
|
|
21
|
+
// @ts-ignore-next-line
|
|
21
22
|
return _jsx(SlotComponent, { ...props });
|
|
22
23
|
}
|
|
24
|
+
// @ts-ignore-next-line
|
|
23
25
|
return _jsx(OriginalComponent, { ...props });
|
|
24
26
|
};
|
|
25
27
|
DecoratedComponent.displayName = name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slottableComponent.js","sourceRoot":"","sources":["../../../../src/components/shared/HOC/slottableComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEN,aAAa,EAGb,UAAU,GACV,MAAM,OAAO,CAAC;AAyHf,MAAM,KAAK,GAAG,EAAgD,CAAC;AAE/D,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC7B,KAAK,EACL,QAAQ,GACuD,EAAE,EAAE;IACnE,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACxB,CAAC;IACD,OAAO,CACN,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAI,KAAK,YAC1C,QAAQ,GACc,CACxB,CAAC;AACH,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CACjC,IAAiC,EACjC,iBAAuC;IAEvC,MAAM,kBAAkB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACvC,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC;QAEjD,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YAC9B,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAqB,CAAC;YACvD,OAAO,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC;QACrC,CAAC;QAED,OAAO,KAAC,iBAAiB,OAAK,KAAK,GAAI,CAAC;IACzC,CAAC,CAAC;IACF,kBAAkB,CAAC,WAAW,GAAG,IAAI,CAAC;IACtC,OAAO,kBAAkB,CAAC;AAC3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"slottableComponent.js","sourceRoot":"","sources":["../../../../src/components/shared/HOC/slottableComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEN,aAAa,EAGb,UAAU,GACV,MAAM,OAAO,CAAC;AAyHf,MAAM,KAAK,GAAG,EAAgD,CAAC;AAE/D,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC7B,KAAK,EACL,QAAQ,GACuD,EAAE,EAAE;IACnE,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACxB,CAAC;IACD,OAAO,CACN,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAI,KAAK,YAC1C,QAAQ,GACc,CACxB,CAAC;AACH,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CACjC,IAAiC,EACjC,iBAAuC;IAEvC,MAAM,kBAAkB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACvC,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC;QAEjD,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YAC9B,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAqB,CAAC;YACvD,uBAAuB;YACvB,OAAO,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC;QACrC,CAAC;QAED,uBAAuB;QACvB,OAAO,KAAC,iBAAiB,OAAK,KAAK,GAAI,CAAC;IACzC,CAAC,CAAC;IACF,kBAAkB,CAAC,WAAW,GAAG,IAAI,CAAC;IACtC,OAAO,kBAAkB,CAAC;AAC3B,CAAC"}
|
package/lib/components/type.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export type VtlExpression = {
|
|
|
7
7
|
value: string;
|
|
8
8
|
type: 'VTL' | 'VTL|MD' | 'TXT';
|
|
9
9
|
};
|
|
10
|
+
export interface LunaticExtraProps {
|
|
11
|
+
}
|
|
10
12
|
export type LunaticBaseProps<ValueType = unknown> = {
|
|
11
13
|
id: string;
|
|
12
14
|
handleChanges: LunaticChangesHandler;
|
|
@@ -55,7 +57,7 @@ export type SuggesterOption = {
|
|
|
55
57
|
}>;
|
|
56
58
|
};
|
|
57
59
|
export type ComponentPropsByType = {
|
|
58
|
-
InputNumber: LunaticBaseProps<number | null> & {
|
|
60
|
+
InputNumber: LunaticBaseProps<number | null> & LunaticExtraProps & {
|
|
59
61
|
min?: number;
|
|
60
62
|
max?: number;
|
|
61
63
|
decimals?: number;
|
|
@@ -65,17 +67,17 @@ export type ComponentPropsByType = {
|
|
|
65
67
|
};
|
|
66
68
|
componentType?: 'InputNumber';
|
|
67
69
|
};
|
|
68
|
-
Duration: LunaticBaseProps<string | null> & {
|
|
70
|
+
Duration: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
69
71
|
format: Formats;
|
|
70
72
|
response: {
|
|
71
73
|
name: string;
|
|
72
74
|
};
|
|
73
75
|
componentType?: 'Duration';
|
|
74
76
|
};
|
|
75
|
-
Text: LunaticBaseProps<string> & {
|
|
77
|
+
Text: LunaticBaseProps<string> & LunaticExtraProps & {
|
|
76
78
|
componentType?: 'Text';
|
|
77
79
|
};
|
|
78
|
-
Input: LunaticBaseProps<string> & {
|
|
80
|
+
Input: LunaticBaseProps<string> & LunaticExtraProps & {
|
|
79
81
|
maxLength?: number;
|
|
80
82
|
value: null | string;
|
|
81
83
|
response: {
|
|
@@ -83,24 +85,24 @@ export type ComponentPropsByType = {
|
|
|
83
85
|
};
|
|
84
86
|
componentType?: 'Input';
|
|
85
87
|
};
|
|
86
|
-
Accordion: LunaticBaseProps<string> & {
|
|
88
|
+
Accordion: LunaticBaseProps<string> & LunaticExtraProps & {
|
|
87
89
|
componentType?: 'Accordion';
|
|
88
90
|
items: {
|
|
89
91
|
label: ReactNode;
|
|
90
92
|
body: ReactNode;
|
|
91
93
|
}[];
|
|
92
94
|
};
|
|
93
|
-
Sequence: Pick<LunaticBaseProps<string>, 'id' | 'label' | 'style' | 'declarations' | 'description'> & {
|
|
95
|
+
Sequence: Pick<LunaticBaseProps<string>, 'id' | 'label' | 'style' | 'declarations' | 'description'> & LunaticExtraProps & {
|
|
94
96
|
componentType?: 'Sequence';
|
|
95
97
|
};
|
|
96
|
-
Subsequence: Pick<LunaticBaseProps<string>, 'id' | 'label' | 'declarations' | 'description'> & {
|
|
98
|
+
Subsequence: Pick<LunaticBaseProps<string>, 'id' | 'label' | 'declarations' | 'description'> & LunaticExtraProps & {
|
|
97
99
|
componentType?: 'Subsequence';
|
|
98
100
|
};
|
|
99
|
-
Question: Pick<LunaticBaseProps<unknown>, 'label' | 'id' | 'description' | 'declarations' | 'errors' | 'disabled' | 'readOnly'> & {
|
|
101
|
+
Question: Pick<LunaticBaseProps<unknown>, 'label' | 'id' | 'description' | 'declarations' | 'errors' | 'disabled' | 'readOnly'> & LunaticExtraProps & {
|
|
100
102
|
components: LunaticComponentProps[];
|
|
101
103
|
componentType?: 'Question';
|
|
102
104
|
};
|
|
103
|
-
RosterForLoop: LunaticBaseProps<unknown> & {
|
|
105
|
+
RosterForLoop: LunaticBaseProps<unknown> & LunaticExtraProps & {
|
|
104
106
|
lines: {
|
|
105
107
|
min: number;
|
|
106
108
|
max: number;
|
|
@@ -117,7 +119,7 @@ export type ComponentPropsByType = {
|
|
|
117
119
|
paginatedLoop?: boolean;
|
|
118
120
|
componentType?: 'RosterForLoop';
|
|
119
121
|
};
|
|
120
|
-
Loop: LunaticBaseProps<unknown> & {
|
|
122
|
+
Loop: LunaticBaseProps<unknown> & LunaticExtraProps & {
|
|
121
123
|
lines: {
|
|
122
124
|
min: number;
|
|
123
125
|
max: number;
|
|
@@ -132,7 +134,7 @@ export type ComponentPropsByType = {
|
|
|
132
134
|
paginatedLoop?: boolean;
|
|
133
135
|
componentType?: 'Loop';
|
|
134
136
|
};
|
|
135
|
-
Table: LunaticBaseProps<unknown> & {
|
|
137
|
+
Table: LunaticBaseProps<unknown> & LunaticExtraProps & {
|
|
136
138
|
value: Record<string, unknown>;
|
|
137
139
|
header: Array<{
|
|
138
140
|
label: ReactNode;
|
|
@@ -147,7 +149,7 @@ export type ComponentPropsByType = {
|
|
|
147
149
|
iteration: LunaticReducerState['pager']['iteration'];
|
|
148
150
|
componentType?: 'Table';
|
|
149
151
|
};
|
|
150
|
-
Datepicker: LunaticBaseProps<string | null> & {
|
|
152
|
+
Datepicker: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
151
153
|
dateFormat: 'YYYY-MM-DD' | 'YYYY-MM' | 'YYYY';
|
|
152
154
|
min?: string;
|
|
153
155
|
max?: string;
|
|
@@ -156,7 +158,7 @@ export type ComponentPropsByType = {
|
|
|
156
158
|
};
|
|
157
159
|
componentType?: 'Datepicker';
|
|
158
160
|
};
|
|
159
|
-
CheckboxGroup: LunaticBaseProps<Record<string, boolean | null>> & {
|
|
161
|
+
CheckboxGroup: LunaticBaseProps<Record<string, boolean | null>> & LunaticExtraProps & {
|
|
160
162
|
options: {
|
|
161
163
|
id: string;
|
|
162
164
|
label: ReactNode;
|
|
@@ -170,11 +172,11 @@ export type ComponentPropsByType = {
|
|
|
170
172
|
}[];
|
|
171
173
|
componentType?: 'CheckboxGroup';
|
|
172
174
|
};
|
|
173
|
-
CheckboxOne: LunaticBaseProps<string | null> & {
|
|
175
|
+
CheckboxOne: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
174
176
|
options: Array<InterpretedOption>;
|
|
175
177
|
componentType?: 'CheckboxOne';
|
|
176
178
|
};
|
|
177
|
-
Switch: LunaticBaseProps<boolean> & {
|
|
179
|
+
Switch: LunaticBaseProps<boolean> & LunaticExtraProps & {
|
|
178
180
|
response: {
|
|
179
181
|
name: string;
|
|
180
182
|
};
|
|
@@ -184,13 +186,13 @@ export type ComponentPropsByType = {
|
|
|
184
186
|
};
|
|
185
187
|
componentType?: 'Switch';
|
|
186
188
|
};
|
|
187
|
-
CheckboxBoolean: LunaticBaseProps<boolean> & {
|
|
189
|
+
CheckboxBoolean: LunaticBaseProps<boolean> & LunaticExtraProps & {
|
|
188
190
|
response: {
|
|
189
191
|
name: string;
|
|
190
192
|
};
|
|
191
193
|
componentType?: 'CheckboxBoolean';
|
|
192
194
|
};
|
|
193
|
-
Radio: LunaticBaseProps<string | null> & {
|
|
195
|
+
Radio: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
194
196
|
options: Array<InterpretedOption>;
|
|
195
197
|
checkboxStyle?: boolean;
|
|
196
198
|
response: {
|
|
@@ -198,7 +200,7 @@ export type ComponentPropsByType = {
|
|
|
198
200
|
};
|
|
199
201
|
componentType?: 'Radio';
|
|
200
202
|
};
|
|
201
|
-
Roundabout: LunaticBaseProps<string> & {
|
|
203
|
+
Roundabout: LunaticBaseProps<string> & LunaticExtraProps & {
|
|
202
204
|
iterations: number;
|
|
203
205
|
goToPage: ReturnType<typeof useLunatic>['goToPage'];
|
|
204
206
|
page: number;
|
|
@@ -211,7 +213,7 @@ export type ComponentPropsByType = {
|
|
|
211
213
|
};
|
|
212
214
|
componentType?: 'Roundabout';
|
|
213
215
|
};
|
|
214
|
-
Dropdown: LunaticBaseProps<string | null> & {
|
|
216
|
+
Dropdown: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
215
217
|
options: Array<{
|
|
216
218
|
description?: ReactNode;
|
|
217
219
|
label: ReactNode;
|
|
@@ -222,7 +224,7 @@ export type ComponentPropsByType = {
|
|
|
222
224
|
};
|
|
223
225
|
componentType?: 'Dropdown';
|
|
224
226
|
};
|
|
225
|
-
Textarea: LunaticBaseProps<string> & {
|
|
227
|
+
Textarea: LunaticBaseProps<string> & LunaticExtraProps & {
|
|
226
228
|
cols?: number;
|
|
227
229
|
placeHolder?: string;
|
|
228
230
|
maxLength?: number;
|
|
@@ -232,10 +234,10 @@ export type ComponentPropsByType = {
|
|
|
232
234
|
};
|
|
233
235
|
componentType?: 'Textarea';
|
|
234
236
|
};
|
|
235
|
-
FilterDescription: Pick<LunaticBaseProps<string>, 'id' | 'label'> & {
|
|
237
|
+
FilterDescription: Pick<LunaticBaseProps<string>, 'id' | 'label'> & LunaticExtraProps & {
|
|
236
238
|
componentType?: 'FilterDescription';
|
|
237
239
|
};
|
|
238
|
-
PairwiseLinks: Omit<LunaticBaseProps, 'value'> & {
|
|
240
|
+
PairwiseLinks: Omit<LunaticBaseProps, 'value'> & LunaticExtraProps & {
|
|
239
241
|
components: LunaticComponentDefinition[];
|
|
240
242
|
features?: LunaticOptions['features'];
|
|
241
243
|
executeExpression: LunaticReducerState['executeExpression'];
|
|
@@ -246,7 +248,7 @@ export type ComponentPropsByType = {
|
|
|
246
248
|
getComponents: (x: number, y: number) => LunaticComponentProps[];
|
|
247
249
|
componentType?: 'PairwiseLinks';
|
|
248
250
|
};
|
|
249
|
-
Suggester: LunaticBaseProps<string | null> & {
|
|
251
|
+
Suggester: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
250
252
|
componentType?: 'Suggester';
|
|
251
253
|
storeName: string;
|
|
252
254
|
optionRenderer: FunctionComponent<{
|
|
@@ -277,7 +279,7 @@ export type ComponentPropsByType = {
|
|
|
277
279
|
executeExpression: LunaticReducerState['executeExpression'];
|
|
278
280
|
iteration: LunaticReducerState['pager']['iteration'];
|
|
279
281
|
};
|
|
280
|
-
Summary: LunaticBaseProps<string | null> & {
|
|
282
|
+
Summary: LunaticBaseProps<string | null> & LunaticExtraProps & {
|
|
281
283
|
componentType?: 'Summary';
|
|
282
284
|
executeExpression: LunaticReducerState['executeExpression'];
|
|
283
285
|
sections: Array<{
|
package/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export { Button } from './components/shared/Button/Button';
|
|
|
8
8
|
export { LunaticComponents } from './components/LunaticComponents';
|
|
9
9
|
export { default as useLunatic } from './use-lunatic';
|
|
10
10
|
export type { LunaticComponentDefinition, LunaticControl, LunaticData, LunaticValues, LunaticError, LunaticExpression, LunaticVariable, LunaticCollectedValue, LunaticStateVariable, LunaticState, LunaticPager, LunaticOptions, LunaticChangesHandler, } from './use-lunatic/type';
|
|
11
|
-
export type { LunaticComponentProps } from './components/type';
|
|
11
|
+
export type { LunaticComponentProps, LunaticExtraProps, } from './components/type';
|
|
12
12
|
export type { LunaticSlotComponents } from './components/shared/HOC/slottableComponent';
|
|
13
13
|
export type { LunaticSource } from './use-lunatic/type';
|
package/lib/type.source.d.ts
CHANGED
|
@@ -238,7 +238,7 @@ export type VariableScalarValue = string | number | null;
|
|
|
238
238
|
/**
|
|
239
239
|
* A lunatic survey unit
|
|
240
240
|
*/
|
|
241
|
-
export
|
|
241
|
+
export type LunaticSource = {
|
|
242
242
|
label?: VTLExpression;
|
|
243
243
|
pagination?: 'question' | 'sequence';
|
|
244
244
|
enoCoreVersion?: string;
|
|
@@ -284,8 +284,8 @@ export interface LunaticSource {
|
|
|
284
284
|
};
|
|
285
285
|
};
|
|
286
286
|
maxPage?: string;
|
|
287
|
-
}
|
|
288
|
-
export
|
|
287
|
+
};
|
|
288
|
+
export type VTLExpression = {
|
|
289
289
|
/**
|
|
290
290
|
* Valid VTL Expression
|
|
291
291
|
*/
|
|
@@ -295,8 +295,8 @@ export interface VTLExpression {
|
|
|
295
295
|
*/
|
|
296
296
|
bindingDependencies?: string[];
|
|
297
297
|
type: 'VTL' | 'VTL|MD' | 'TXT';
|
|
298
|
-
}
|
|
299
|
-
export
|
|
298
|
+
};
|
|
299
|
+
export type ComponentDefinitionBase = {
|
|
300
300
|
label?: VTLExpression;
|
|
301
301
|
description?: VTLExpression;
|
|
302
302
|
declarations?: Declaration[];
|
|
@@ -305,14 +305,14 @@ export interface ComponentDefinitionBase {
|
|
|
305
305
|
id: string;
|
|
306
306
|
mandatory?: boolean;
|
|
307
307
|
missingResponse?: ResponseDefinition;
|
|
308
|
-
}
|
|
309
|
-
export
|
|
308
|
+
};
|
|
309
|
+
export type Declaration = {
|
|
310
310
|
id: string;
|
|
311
311
|
declarationType: 'INSTRUCTION' | 'COMMENT' | 'HELP' | 'CODECARD' | 'WARNING' | 'STATEMENT';
|
|
312
312
|
position: 'AFTER_QUESTION_TEXT' | 'AFTER_RESPONSE' | 'BEFORE_QUESTION_TEXT' | 'DETACHABLE';
|
|
313
313
|
label: VTLExpression;
|
|
314
|
-
}
|
|
315
|
-
export
|
|
314
|
+
};
|
|
315
|
+
export type VTLScalarExpression = {
|
|
316
316
|
/**
|
|
317
317
|
* Valid VTL Expression
|
|
318
318
|
*/
|
|
@@ -322,8 +322,8 @@ export interface VTLScalarExpression {
|
|
|
322
322
|
*/
|
|
323
323
|
bindingDependencies?: string[];
|
|
324
324
|
type: 'VTL';
|
|
325
|
-
}
|
|
326
|
-
export
|
|
325
|
+
};
|
|
326
|
+
export type ControlDefinition = {
|
|
327
327
|
id: string;
|
|
328
328
|
criticality: 'INFO' | 'WARN' | 'ERROR';
|
|
329
329
|
typeOfControl?: 'FORMAT' | 'CONSISTENCY';
|
|
@@ -332,22 +332,22 @@ export interface ControlDefinition {
|
|
|
332
332
|
bindingDependencies?: string[];
|
|
333
333
|
type?: 'roundabout' | 'ROW' | 'simple';
|
|
334
334
|
iterations?: VTLScalarExpression;
|
|
335
|
-
}
|
|
336
|
-
export
|
|
335
|
+
};
|
|
336
|
+
export type ResponseDefinition = {
|
|
337
337
|
name: string;
|
|
338
|
-
}
|
|
339
|
-
export
|
|
338
|
+
};
|
|
339
|
+
export type ComponentText = {
|
|
340
340
|
componentType: 'Text';
|
|
341
341
|
label: VTLExpression;
|
|
342
|
-
}
|
|
343
|
-
export
|
|
342
|
+
};
|
|
343
|
+
export type ComponentAccordion = {
|
|
344
344
|
componentType: 'Accordion';
|
|
345
345
|
items: {
|
|
346
346
|
label: VTLExpression;
|
|
347
347
|
body: VTLExpression;
|
|
348
348
|
}[];
|
|
349
|
-
}
|
|
350
|
-
export
|
|
349
|
+
};
|
|
350
|
+
export type SuggesterDefinition = {
|
|
351
351
|
/**
|
|
352
352
|
* Name of the list (will be used as storeName for suggester)
|
|
353
353
|
*/
|
|
@@ -401,4 +401,4 @@ export interface SuggesterDefinition {
|
|
|
401
401
|
} | {
|
|
402
402
|
type: 'soft';
|
|
403
403
|
};
|
|
404
|
-
}
|
|
404
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { LunaticComponentDefinition, LunaticExpression, LunaticReducerState } from '../../type';
|
|
3
|
-
type UntranslatedProperties = 'expressions' | 'sections';
|
|
3
|
+
type UntranslatedProperties = 'expressions' | 'sections' | 'body' | 'controls' | 'components';
|
|
4
4
|
export type DeepTranslateExpression<T> = T extends LunaticExpression ? ReactNode : T extends (infer ElementType)[] ? DeepTranslateExpression<ElementType>[] : T extends {
|
|
5
5
|
[k: string | number]: unknown;
|
|
6
6
|
} ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill-component-expressions.js","sourceRoot":"","sources":["../../../../src/use-lunatic/commons/fill-components/fill-component-expressions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOpD,MAAM,cAAc,GAAG;IACtB,CAAC,OAAO,EAAE,IAAI,CAAC;IACf,CAAC,eAAe,EAAE,IAAI,CAAC;IACvB,CAAC,oBAAoB,EAAE,IAAI,CAAC;IAC5B,CAAC,aAAa,EAAE,IAAI,CAAC;IACrB,CAAC,YAAY,EAAE,UAAU,CAAC;IAC1B,CAAC,iBAAiB,EAAE,IAAI,CAAC;IACzB,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC/B,CAAC,wBAAwB,EAAE,IAAI,CAAC;IAChC,CAAC,qBAAqB,EAAE,IAAI,CAAC;IAC7B,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC9B,CAAC,qBAAqB,EAAE,UAAU,CAAC;IACnC,CAAC,aAAa,EAAE,IAAI,CAAC;IACrB,CAAC,YAAY,EAAE,IAAI,CAAC;IACpB,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC/B,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC/B,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAC7B,CAAC,cAAc,EAAE,IAAI,CAAC;IACtB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,iBAAiB;IACjB,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC/B,CAAC,sBAAsB,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEX,SAAS,UAAU,CAAC,CAAU;IAC7B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC;IACV,CAAC;IACD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QA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AC;
|
|
1
|
+
{"version":3,"file":"fill-component-expressions.js","sourceRoot":"","sources":["../../../../src/use-lunatic/commons/fill-components/fill-component-expressions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOpD,MAAM,cAAc,GAAG;IACtB,CAAC,OAAO,EAAE,IAAI,CAAC;IACf,CAAC,eAAe,EAAE,IAAI,CAAC;IACvB,CAAC,oBAAoB,EAAE,IAAI,CAAC;IAC5B,CAAC,aAAa,EAAE,IAAI,CAAC;IACrB,CAAC,YAAY,EAAE,UAAU,CAAC;IAC1B,CAAC,iBAAiB,EAAE,IAAI,CAAC;IACzB,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC/B,CAAC,wBAAwB,EAAE,IAAI,CAAC;IAChC,CAAC,qBAAqB,EAAE,IAAI,CAAC;IAC7B,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC9B,CAAC,qBAAqB,EAAE,UAAU,CAAC;IACnC,CAAC,aAAa,EAAE,IAAI,CAAC;IACrB,CAAC,YAAY,EAAE,IAAI,CAAC;IACpB,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC/B,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC/B,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAC7B,CAAC,cAAc,EAAE,IAAI,CAAC;IACtB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,iBAAiB;IACjB,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC/B,CAAC,sBAAsB,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEX,SAAS,UAAU,CAAC,CAAU;IAC7B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC;IACV,CAAC;IACD,IAAI,OAAO,CAAC,KAAK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,QAAQ;QAC9B,MAAM,IAAI,UAAU;QACpB,OAAO,IAAI,UAAU,CACtB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAC/B,GAAY,EACZ,IAAc,EACd,WAAoC;IAEpC,sDAAsD;IACtD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,+CAA+C;IAC/C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,GAAG,CAAC,EAAE,CAAC;QAC1C,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,OAAO;QACN,GAAG,GAAG;QACN,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC;KACrE,CAAC;AACH,CAAC"}
|
|
@@ -25,7 +25,7 @@ export const fillComponent = (component, state) => {
|
|
|
25
25
|
missingResponse: getMissingResponseProp(component, state),
|
|
26
26
|
management: state.management,
|
|
27
27
|
iterations: getIterationsProp(component, state),
|
|
28
|
-
options: getOptionsProp(interpretedProps, state, value),
|
|
28
|
+
options: getOptionsProp(interpretedProps, state.variables, state.handleChanges, state.pager.iteration, value),
|
|
29
29
|
...getComponentTypeProps(interpretedProps, state),
|
|
30
30
|
// This is too dynamic to be typed correctly, so we allow any here
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill-components.js","sour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AO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"fill-components.js","sourceRoot":"","sources":["../../../../src/use-lunatic/commons/fill-components/fill-components.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAezD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC5B,SAAqC,EACrC,KAAwB,EACgC,EAAE;IAC1D,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC7C,OAAO;QACN,GAAG,gBAAgB;QACnB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;QAChC,QAAQ,EAAE,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;QAChE,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,sBAAsB,CAAC,SAAS,EAAE,KAAK,CAAC;QACzD,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,UAAU,EAAE,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC;QAC/C,OAAO,EAAE,cAAc,CACtB,gBAAgB,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,KAAK,CAAC,SAAS,EACrB,KAAK,CACL;QACD,GAAG,qBAAqB,CAAC,gBAAgB,EAAE,KAAK,CAAC;QACjD,kEAAkE;KAC3D,CAAC;AACV,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,cAAc,CAC7B,UAAwC,EACxC,KAAwB;IAExB,OAAO,UAAU;SACf,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;SACnD,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
14
14
|
} | {
|
|
15
15
|
getComponents: (x: number, y: number) => import("../..").LunaticComponentProps[];
|
|
16
16
|
} | {
|
|
17
|
-
body: ((import("../../components/type").LunaticBaseProps<string> & {
|
|
17
|
+
body: ((import("../../components/type").LunaticBaseProps<string> & import("../..").LunaticExtraProps & {
|
|
18
18
|
maxLength?: number | undefined;
|
|
19
19
|
value: string | null;
|
|
20
20
|
response: {
|
|
@@ -23,7 +23,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
23
23
|
componentType?: "Input" | undefined;
|
|
24
24
|
} & {
|
|
25
25
|
conditionFilter?: boolean | undefined;
|
|
26
|
-
}) | (import("../../components/type").LunaticBaseProps<string> & {
|
|
26
|
+
}) | (import("../../components/type").LunaticBaseProps<string> & import("../..").LunaticExtraProps & {
|
|
27
27
|
cols?: number | undefined;
|
|
28
28
|
placeHolder?: string | undefined;
|
|
29
29
|
maxLength?: number | undefined;
|
|
@@ -34,24 +34,22 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
34
34
|
componentType?: "Textarea" | undefined;
|
|
35
35
|
} & {
|
|
36
36
|
conditionFilter?: boolean | undefined;
|
|
37
|
-
}) | (Pick<import("../../components/type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id" | "style"> & {
|
|
37
|
+
}) | (Pick<import("../../components/type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id" | "style"> & import("../..").LunaticExtraProps & {
|
|
38
38
|
componentType?: "Sequence" | undefined;
|
|
39
39
|
} & {
|
|
40
40
|
conditionFilter?: boolean | undefined;
|
|
41
|
-
}) | (Pick<import("../../components/type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id"> & {
|
|
41
|
+
}) | (Pick<import("../../components/type").LunaticBaseProps<string>, "label" | "description" | "declarations" | "id"> & import("../..").LunaticExtraProps & {
|
|
42
42
|
componentType?: "Subsequence" | undefined;
|
|
43
43
|
} & {
|
|
44
44
|
conditionFilter?: boolean | undefined;
|
|
45
|
-
}) | (import("../../components/type").LunaticBaseProps<string> & {
|
|
45
|
+
}) | (import("../../components/type").LunaticBaseProps<string> & import("../..").LunaticExtraProps & {
|
|
46
46
|
iterations: number;
|
|
47
47
|
goToPage: (page: {
|
|
48
48
|
page: number | import("../type").PageTag;
|
|
49
49
|
iteration?: number | undefined;
|
|
50
50
|
nbIterations?: number | undefined;
|
|
51
51
|
subPage?: number | undefined;
|
|
52
|
-
}) => void;
|
|
53
|
-
* Get component specific props (RoundAbout for instance)
|
|
54
|
-
*/
|
|
52
|
+
}) => void;
|
|
55
53
|
page: number;
|
|
56
54
|
locked?: boolean | undefined;
|
|
57
55
|
expressions: {
|
|
@@ -63,7 +61,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
63
61
|
componentType?: "Roundabout" | undefined;
|
|
64
62
|
} & {
|
|
65
63
|
conditionFilter?: boolean | undefined;
|
|
66
|
-
}) | (import("../../components/type").LunaticBaseProps<unknown> & {
|
|
64
|
+
}) | (import("../../components/type").LunaticBaseProps<unknown> & import("../..").LunaticExtraProps & {
|
|
67
65
|
lines: {
|
|
68
66
|
min: number;
|
|
69
67
|
max: number;
|
|
@@ -83,7 +81,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
83
81
|
componentType?: "Loop" | undefined;
|
|
84
82
|
} & {
|
|
85
83
|
conditionFilter?: boolean | undefined;
|
|
86
|
-
}) | (import("../../components/type").LunaticBaseProps<unknown> & {
|
|
84
|
+
}) | (import("../../components/type").LunaticBaseProps<unknown> & import("../..").LunaticExtraProps & {
|
|
87
85
|
lines: {
|
|
88
86
|
min: number;
|
|
89
87
|
max: number;
|
|
@@ -105,7 +103,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
105
103
|
componentType?: "RosterForLoop" | undefined;
|
|
106
104
|
} & {
|
|
107
105
|
conditionFilter?: boolean | undefined;
|
|
108
|
-
}) | (import("../../components/type").LunaticBaseProps<unknown> & {
|
|
106
|
+
}) | (import("../../components/type").LunaticBaseProps<unknown> & import("../..").LunaticExtraProps & {
|
|
109
107
|
value: Record<string, unknown>;
|
|
110
108
|
header: {
|
|
111
109
|
label: import("react").ReactNode;
|
|
@@ -125,7 +123,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
125
123
|
componentType?: "Table" | undefined;
|
|
126
124
|
} & {
|
|
127
125
|
conditionFilter?: boolean | undefined;
|
|
128
|
-
}) | (import("../../components/type").LunaticBaseProps<number | null> & {
|
|
126
|
+
}) | (import("../../components/type").LunaticBaseProps<number | null> & import("../..").LunaticExtraProps & {
|
|
129
127
|
min?: number | undefined;
|
|
130
128
|
max?: number | undefined;
|
|
131
129
|
decimals?: number | undefined;
|
|
@@ -136,7 +134,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
136
134
|
componentType?: "InputNumber" | undefined;
|
|
137
135
|
} & {
|
|
138
136
|
conditionFilter?: boolean | undefined;
|
|
139
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
137
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
140
138
|
format: "PnYnM" | "PTnHnM";
|
|
141
139
|
response: {
|
|
142
140
|
name: string;
|
|
@@ -144,7 +142,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
144
142
|
componentType?: "Duration" | undefined;
|
|
145
143
|
} & {
|
|
146
144
|
conditionFilter?: boolean | undefined;
|
|
147
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
145
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
148
146
|
dateFormat: "YYYY-MM-DD" | "YYYY" | "YYYY-MM";
|
|
149
147
|
min?: string | undefined;
|
|
150
148
|
max?: string | undefined;
|
|
@@ -154,7 +152,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
154
152
|
componentType?: "Datepicker" | undefined;
|
|
155
153
|
} & {
|
|
156
154
|
conditionFilter?: boolean | undefined;
|
|
157
|
-
}) | (import("../../components/type").LunaticBaseProps<Record<string, boolean | null>> & {
|
|
155
|
+
}) | (import("../../components/type").LunaticBaseProps<Record<string, boolean | null>> & import("../..").LunaticExtraProps & {
|
|
158
156
|
options: {
|
|
159
157
|
id: string;
|
|
160
158
|
label: import("react").ReactNode;
|
|
@@ -169,14 +167,14 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
169
167
|
componentType?: "CheckboxGroup" | undefined;
|
|
170
168
|
} & {
|
|
171
169
|
conditionFilter?: boolean | undefined;
|
|
172
|
-
}) | (import("../../components/type").LunaticBaseProps<boolean> & {
|
|
170
|
+
}) | (import("../../components/type").LunaticBaseProps<boolean> & import("../..").LunaticExtraProps & {
|
|
173
171
|
response: {
|
|
174
172
|
name: string;
|
|
175
173
|
};
|
|
176
174
|
componentType?: "CheckboxBoolean" | undefined;
|
|
177
175
|
} & {
|
|
178
176
|
conditionFilter?: boolean | undefined;
|
|
179
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
177
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
180
178
|
options: import("./propOptions").InterpretedOption[];
|
|
181
179
|
checkboxStyle?: boolean | undefined;
|
|
182
180
|
response: {
|
|
@@ -185,7 +183,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
185
183
|
componentType?: "Radio" | undefined;
|
|
186
184
|
} & {
|
|
187
185
|
conditionFilter?: boolean | undefined;
|
|
188
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
186
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
189
187
|
options: {
|
|
190
188
|
description?: import("react").ReactNode;
|
|
191
189
|
label: import("react").ReactNode;
|
|
@@ -197,17 +195,17 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
197
195
|
componentType?: "Dropdown" | undefined;
|
|
198
196
|
} & {
|
|
199
197
|
conditionFilter?: boolean | undefined;
|
|
200
|
-
}) | (Pick<import("../../components/type").LunaticBaseProps<unknown>, "label" | "description" | "declarations" | "id" | "errors" | "disabled" | "readOnly"> & {
|
|
198
|
+
}) | (Pick<import("../../components/type").LunaticBaseProps<unknown>, "label" | "description" | "declarations" | "id" | "errors" | "disabled" | "readOnly"> & import("../..").LunaticExtraProps & {
|
|
201
199
|
components: import("../..").LunaticComponentProps<keyof import("../../components/type").ComponentPropsByType>[];
|
|
202
200
|
componentType?: "Question" | undefined;
|
|
203
201
|
} & {
|
|
204
202
|
conditionFilter?: boolean | undefined;
|
|
205
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
203
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
206
204
|
options: import("./propOptions").InterpretedOption[];
|
|
207
205
|
componentType?: "CheckboxOne" | undefined;
|
|
208
206
|
} & {
|
|
209
207
|
conditionFilter?: boolean | undefined;
|
|
210
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
208
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
211
209
|
componentType?: "Suggester" | undefined;
|
|
212
210
|
storeName: string;
|
|
213
211
|
optionRenderer: import("react").FunctionComponent<{
|
|
@@ -243,7 +241,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
243
241
|
iteration: number | undefined;
|
|
244
242
|
} & {
|
|
245
243
|
conditionFilter?: boolean | undefined;
|
|
246
|
-
}) | (Omit<import("../../components/type").LunaticBaseProps<unknown>, "value"> & {
|
|
244
|
+
}) | (Omit<import("../../components/type").LunaticBaseProps<unknown>, "value"> & import("../..").LunaticExtraProps & {
|
|
247
245
|
components: LunaticComponentDefinition[];
|
|
248
246
|
features?: ("VTL" | "MD")[] | undefined;
|
|
249
247
|
executeExpression: <T extends unknown = unknown>(expression: import("../../type.source").VTLExpression, args?: {
|
|
@@ -259,7 +257,7 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
259
257
|
componentType?: "PairwiseLinks" | undefined;
|
|
260
258
|
} & {
|
|
261
259
|
conditionFilter?: boolean | undefined;
|
|
262
|
-
}) | (import("../../components/type").LunaticBaseProps<string | null> & {
|
|
260
|
+
}) | (import("../../components/type").LunaticBaseProps<string | null> & import("../..").LunaticExtraProps & {
|
|
263
261
|
componentType?: "Summary" | undefined;
|
|
264
262
|
executeExpression: <T extends unknown = unknown>(expression: import("../../type.source").VTLExpression, args?: {
|
|
265
263
|
iteration?: number | number[] | undefined;
|
|
@@ -278,11 +276,11 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
278
276
|
}[];
|
|
279
277
|
} & {
|
|
280
278
|
conditionFilter?: boolean | undefined;
|
|
281
|
-
}) | (import("../../components/type").LunaticBaseProps<string> & {
|
|
279
|
+
}) | (import("../../components/type").LunaticBaseProps<string> & import("../..").LunaticExtraProps & {
|
|
282
280
|
componentType?: "Text" | undefined;
|
|
283
281
|
} & {
|
|
284
282
|
conditionFilter?: boolean | undefined;
|
|
285
|
-
}) | (import("../../components/type").LunaticBaseProps<string> & {
|
|
283
|
+
}) | (import("../../components/type").LunaticBaseProps<string> & import("../..").LunaticExtraProps & {
|
|
286
284
|
componentType?: "Accordion" | undefined;
|
|
287
285
|
items: {
|
|
288
286
|
label: import("react").ReactNode;
|
|
@@ -290,18 +288,20 @@ export declare function getComponentTypeProps(component: DeepTranslateExpression
|
|
|
290
288
|
}[];
|
|
291
289
|
} & {
|
|
292
290
|
conditionFilter?: boolean | undefined;
|
|
293
|
-
}) | (import("../../components/type").LunaticBaseProps<boolean> & {
|
|
291
|
+
}) | (import("../../components/type").LunaticBaseProps<boolean> & import("../..").LunaticExtraProps & {
|
|
294
292
|
response: {
|
|
295
293
|
name: string;
|
|
296
294
|
};
|
|
297
295
|
statusLabel?: {
|
|
298
|
-
true: string;
|
|
296
|
+
true: string; /**
|
|
297
|
+
* Get component specific props (RoundAbout for instance)
|
|
298
|
+
*/
|
|
299
299
|
false: string;
|
|
300
300
|
} | undefined;
|
|
301
301
|
componentType?: "Switch" | undefined;
|
|
302
302
|
} & {
|
|
303
303
|
conditionFilter?: boolean | undefined;
|
|
304
|
-
}) | (Pick<import("../../components/type").LunaticBaseProps<string>, "label" | "id"> & {
|
|
304
|
+
}) | (Pick<import("../../components/type").LunaticBaseProps<string>, "label" | "id"> & import("../..").LunaticExtraProps & {
|
|
305
305
|
componentType?: "FilterDescription" | undefined;
|
|
306
306
|
} & {
|
|
307
307
|
conditionFilter?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LunaticComponentDefinition } from '../type';
|
|
1
|
+
import type { LunaticChangesHandler, LunaticComponentDefinition, LunaticState } from '../type';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import { fillComponent } from '../commons/fill-components/fill-components';
|
|
4
3
|
import type { DeepTranslateExpression } from '../commons/fill-components/fill-component-expressions';
|
|
4
|
+
import type { LunaticVariablesStore } from '../commons/variables/lunatic-variables-store';
|
|
5
5
|
export type InterpretedOption = {
|
|
6
6
|
label: ReactNode;
|
|
7
7
|
value?: string;
|
|
@@ -15,22 +15,22 @@ export type InterpretedOption = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Compute options for checkboxes / radios
|
|
17
17
|
*/
|
|
18
|
-
export declare function getOptionsProp(definition: DeepTranslateExpression<LunaticComponentDefinition>,
|
|
19
|
-
label:
|
|
18
|
+
export declare function getOptionsProp(definition: DeepTranslateExpression<LunaticComponentDefinition>, variables: LunaticVariablesStore, handleChanges: LunaticChangesHandler, pagerIteration: LunaticState['pager']['iteration'], value: unknown): {
|
|
19
|
+
label: ReactNode;
|
|
20
20
|
name: string;
|
|
21
21
|
id: string;
|
|
22
22
|
checked: boolean;
|
|
23
|
-
description:
|
|
24
|
-
detailLabel:
|
|
23
|
+
description: ReactNode;
|
|
24
|
+
detailLabel: ReactNode;
|
|
25
25
|
detailValue: unknown;
|
|
26
26
|
onCheck: (checked: boolean) => void;
|
|
27
27
|
onDetailChange: ((v: string) => void) | undefined;
|
|
28
28
|
}[] | {
|
|
29
|
-
label:
|
|
30
|
-
description:
|
|
29
|
+
label: ReactNode;
|
|
30
|
+
description: ReactNode;
|
|
31
31
|
value: string | boolean;
|
|
32
32
|
checked: boolean;
|
|
33
|
-
detailLabel:
|
|
33
|
+
detailLabel: ReactNode;
|
|
34
34
|
onCheck: () => void;
|
|
35
35
|
detailValue: unknown;
|
|
36
36
|
onDetailChange: ((value: string) => void) | null;
|
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
import { fillComponent } from '../commons/fill-components/fill-components';
|
|
2
1
|
import { isNumber } from '../../utils/number';
|
|
3
2
|
/**
|
|
4
3
|
* Compute options for checkboxes / radios
|
|
5
4
|
*/
|
|
6
|
-
export function getOptionsProp(definition,
|
|
5
|
+
export function getOptionsProp(definition, variables, handleChanges, pagerIteration, value) {
|
|
6
|
+
const iteration = isNumber(pagerIteration) ? [pagerIteration] : undefined;
|
|
7
|
+
//const iteration = pagerIteration ? [pagerIteration] : undefined;
|
|
7
8
|
if (definition.componentType === 'CheckboxGroup') {
|
|
8
|
-
const iteration = state.pager.iteration
|
|
9
|
-
? [state.pager.iteration]
|
|
10
|
-
: undefined;
|
|
11
9
|
return definition.responses.map((response) => ({
|
|
12
10
|
label: response.label,
|
|
13
11
|
name: response.response.name,
|
|
14
12
|
id: response.id,
|
|
15
|
-
checked: !!
|
|
13
|
+
checked: !!variables.get(response.response.name, iteration),
|
|
16
14
|
description: response.description,
|
|
17
15
|
detailLabel: response.detail?.label,
|
|
18
16
|
detailValue: response.detail?.response
|
|
19
|
-
?
|
|
17
|
+
? variables.get(response.detail.response.name, iteration)
|
|
20
18
|
: undefined,
|
|
21
19
|
onCheck: (checked) => {
|
|
22
|
-
|
|
20
|
+
handleChanges([{ name: response.response.name, value: checked }]);
|
|
23
21
|
},
|
|
24
22
|
onDetailChange: response.detail?.response
|
|
25
23
|
? (v) => {
|
|
26
|
-
|
|
27
|
-
{ name: response.detail.response.name, value: v },
|
|
28
|
-
]);
|
|
24
|
+
handleChanges([{ name: response.detail.response.name, value: v }]);
|
|
29
25
|
}
|
|
30
26
|
: undefined,
|
|
31
27
|
}));
|
|
@@ -40,20 +36,14 @@ export function getOptionsProp(definition, state, value) {
|
|
|
40
36
|
checked: value === option.value,
|
|
41
37
|
detailLabel: 'detail' in option ? option.detail?.label : undefined,
|
|
42
38
|
onCheck: () => {
|
|
43
|
-
|
|
44
|
-
{ name: definition.response.name, value: option.value },
|
|
45
|
-
]);
|
|
39
|
+
handleChanges([{ name: definition.response.name, value: option.value }]);
|
|
46
40
|
},
|
|
47
41
|
detailValue: 'detail' in option && option.detail
|
|
48
|
-
?
|
|
49
|
-
? [state.pager.iteration]
|
|
50
|
-
: undefined)
|
|
42
|
+
? variables.get(option.detail.response.name, iteration)
|
|
51
43
|
: null,
|
|
52
44
|
onDetailChange: 'detail' in option && option.detail
|
|
53
45
|
? (value) => {
|
|
54
|
-
|
|
55
|
-
{ name: option.detail.response.name, value },
|
|
56
|
-
]);
|
|
46
|
+
handleChanges([{ name: option.detail.response.name, value }]);
|
|
57
47
|
}
|
|
58
48
|
: null,
|
|
59
49
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propOptions.js","sourceRoot":"","sources":["../../../src/use-lunatic/props/propOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"propOptions.js","sourceRoot":"","sources":["../../../src/use-lunatic/props/propOptions.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAc9C;;GAEG;AACH,MAAM,UAAU,cAAc,CAC7B,UAA+D,EAC/D,SAAgC,EAChC,aAAoC,EACpC,cAAkD,EAClD,KAAc;IAEd,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1E,kEAAkE;IAElE,IAAI,UAAU,CAAC,aAAa,KAAK,eAAe,EAAE,CAAC;QAClD,OAAO,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC9C,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI;YAC5B,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;YAC3D,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK;YACnC,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ;gBACrC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,QA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M,CAAC,MAAM;YAClC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;YACvD,CAAC,CAAC,IAAI;QACR,cAAc,EACb,QAAQ,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM;YAClC,CAAC,CAAC,CAAC,KAAa,EAAE,EAAE;gBAClB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;YAChE,CAAC;YACF,CAAC,CAAC,IAAI;KACR,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { LunaticVariablesStore } from '../commons/variables/lunatic-variables-store';
|
|
3
|
+
import { getOptionsProp } from './propOptions';
|
|
4
|
+
describe('getOptionsProp()', () => {
|
|
5
|
+
let variables;
|
|
6
|
+
const checkboxGroupDefinition = {
|
|
7
|
+
id: 'CheckboxGroup',
|
|
8
|
+
componentType: 'CheckboxGroup',
|
|
9
|
+
responses: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Option 1',
|
|
12
|
+
response: { name: 'O1' },
|
|
13
|
+
id: 'id1',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: 'Option 2',
|
|
17
|
+
response: { name: 'O2' },
|
|
18
|
+
id: 'id2',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
let mockChange;
|
|
23
|
+
beforeEach(() => {
|
|
24
|
+
mockChange = vi.fn();
|
|
25
|
+
variables = new LunaticVariablesStore();
|
|
26
|
+
});
|
|
27
|
+
describe('CheckboxGroup', () => {
|
|
28
|
+
it('should check boxes', () => {
|
|
29
|
+
variables.set('O2', false);
|
|
30
|
+
let options = getOptionsProp(checkboxGroupDefinition, variables, mockChange, undefined, undefined);
|
|
31
|
+
expect(options[1].checked).toBe(false);
|
|
32
|
+
variables.set('O2', true);
|
|
33
|
+
options = getOptionsProp(checkboxGroupDefinition, variables, mockChange, undefined, undefined);
|
|
34
|
+
expect(options[1].checked).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
it('should check boxes correctly within iteration', () => {
|
|
37
|
+
variables.set('O1', []);
|
|
38
|
+
variables.set('O2', []);
|
|
39
|
+
let options = getOptionsProp(checkboxGroupDefinition, variables, mockChange, 0, undefined);
|
|
40
|
+
expect(options.filter((o) => o.checked), 'Nothing checked when variable empty').toHaveLength(0);
|
|
41
|
+
variables.set('O1', [true, 0]);
|
|
42
|
+
options = getOptionsProp(checkboxGroupDefinition, variables, mockChange, 0, undefined);
|
|
43
|
+
expect(options[0].checked).toBe(true);
|
|
44
|
+
expect(options[1].checked).toBe(false);
|
|
45
|
+
});
|
|
46
|
+
it('should create handleChange correctly', () => {
|
|
47
|
+
variables.set('O1', [true, false]);
|
|
48
|
+
variables.set('O2', [false, true]);
|
|
49
|
+
let options = getOptionsProp(checkboxGroupDefinition, variables, mockChange, 1, undefined);
|
|
50
|
+
options[1].onCheck(false);
|
|
51
|
+
expect(mockChange).toHaveBeenLastCalledWith([
|
|
52
|
+
{ name: 'O2', value: false },
|
|
53
|
+
]);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=propOptions.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propOptions.spec.js","sourceRoot":"","sources":["../../../src/use-lunatic/props/propOptions.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,cAAc,EA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C3C,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;aAC5B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -11,6 +11,12 @@ export function autoExploreLoop(state, direction = 'forward') {
|
|
|
11
11
|
let hasExploredLoop = false;
|
|
12
12
|
const isForward = direction === 'forward';
|
|
13
13
|
const goInsideSubpage = (subPages, nbIteration) => {
|
|
14
|
+
// For empty loop jump to the next page
|
|
15
|
+
if (nbIteration === 0) {
|
|
16
|
+
newPager.page += isForward ? 1 : -1;
|
|
17
|
+
hasExploredLoop = true;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
14
20
|
const maxSubPage = subPages.length;
|
|
15
21
|
const firstSubPage = pageStringToNumbers(subPages[isForward ? 0 : maxSubPage - 1]);
|
|
16
22
|
newPager.page = firstSubPage[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-explore-loop.js","sourceRoot":"","sources":["../../../../src/use-lunatic/reducer/commons/auto-explore-loop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,MAAM,UAAU,eAAe,CAC9B,KAA0B,EAC1B,YAAoC,SAAS;IAE7C,MAAM,QAAQ,GAAG;QAChB,GAAG,KAAK,CAAC,KAAK;KACd,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,eAAe,GAAG,KAAK,CAAC;IAC5B,MAAM,SAAS,GAAG,SAAS,KAAK,SAAS,CAAC;IAE1C,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAE,WAAmB,EAAE,EAAE;QACnE,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;QACnC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
149
|
-
getComponents: (
|
|
150
|
-
only?: LunaticComponentProps['componentType'];
|
|
151
|
-
except?: LunaticComponentProps['componentType'];
|
|
152
|
-
}) => LunaticComponentProps[];
|
|
149
|
+
getComponents: () => LunaticComponentProps[];
|
|
153
150
|
getData: (withRefreshedCalculated: boolean, variableNames?: string[]) => LunaticData;
|
|
154
151
|
getChangedData: (reset: boolean) => LunaticData;
|
|
155
152
|
resetChangedData: () => void;
|
|
@@ -10,10 +10,7 @@ declare function useLunatic(source: LunaticSource, data?: LunaticData, argOption
|
|
|
10
10
|
isInLoop: boolean;
|
|
11
11
|
overview: import("./hooks/useOverview").InterpretedLunaticOverviewItem[];
|
|
12
12
|
loopVariables: string[];
|
|
13
|
-
getComponents: (
|
|
14
|
-
only?: "Input" | "Textarea" | "Sequence" | "Subsequence" | "Roundabout" | "Loop" | "RosterForLoop" | "Table" | "InputNumber" | "Duration" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Question" | "CheckboxOne" | "Suggester" | "PairwiseLinks" | "Summary" | "Text" | "Accordion" | "Switch" | "FilterDescription" | undefined;
|
|
15
|
-
except?: "Input" | "Textarea" | "Sequence" | "Subsequence" | "Roundabout" | "Loop" | "RosterForLoop" | "Table" | "InputNumber" | "Duration" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Question" | "CheckboxOne" | "Suggester" | "PairwiseLinks" | "Summary" | "Text" | "Accordion" | "Switch" | "FilterDescription" | undefined;
|
|
16
|
-
} | undefined) => import("..").LunaticComponentProps[];
|
|
13
|
+
getComponents: () => import("..").LunaticComponentProps[];
|
|
17
14
|
goPreviousPage: () => void;
|
|
18
15
|
goNextPage: () => void;
|
|
19
16
|
goToPage: (page: {
|
|
@@ -96,16 +96,7 @@ function useLunatic(source, data = DEFAULT_DATA, argOptions = empty) {
|
|
|
96
96
|
management,
|
|
97
97
|
...state,
|
|
98
98
|
});
|
|
99
|
-
const getComponents = (
|
|
100
|
-
if (only && except) {
|
|
101
|
-
throw new Error('"only" and "except" cannot be used together in getComponents()');
|
|
102
|
-
}
|
|
103
|
-
if (only) {
|
|
104
|
-
return components.filter((c) => only.includes(c.componentType ?? ''));
|
|
105
|
-
}
|
|
106
|
-
if (except) {
|
|
107
|
-
return components.filter((c) => !except.includes(c.componentType ?? ''));
|
|
108
|
-
}
|
|
99
|
+
const getComponents = () => {
|
|
109
100
|
return components;
|
|
110
101
|
};
|
|
111
102
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lunatic.js","sourceRoot":"","sources":["../../src/use-lunatic/use-lunatic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAQxD,OAAO,CAAC,MAAM,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,c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