@inseefr/lunatic 3.0.7 → 3.0.8

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.
@@ -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<Record<string, unknown>>;
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<Record<string, unknown>>;
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;AAWlE,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"}
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 extends Record<string, unknown>>(name: keyof LunaticSlotComponents, OriginalComponent: FunctionComponent<T>): ComponentType<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"}
@@ -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';
@@ -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;
@@ -146,10 +146,7 @@ export type LunaticState = {
146
146
  currentErrors: Record<string, LunaticError[]> | undefined;
147
147
  isCritical: boolean;
148
148
  };
149
- getComponents: (params?: {
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: (params?: {
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 = ({ only, except, } = {}) => {
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,OAA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C;IAEH,MAAM,aAAa,GAAkC,GAAG,EAAE;QACzD,OAAO,UAAU,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACN,OAAO;QACP,WAAW;QACX,UAAU;QACV,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC;QACvC,aAAa,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;QACzD,UAAU;QACV,aAAa;QACb,cAAc;QACd,UAAU;QACV,QAAQ;QACR,eAAe;QACf,OAAO;QACP,cAAc;QACd,gBAAgB;QAChB,eAAe,EAAE,kBAAkB,CAAC,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC;QACxE,aAAa;QACb,QAAQ;QACR,OAAO,EAAE;YACR,aAAa;SACb;KACsB,CAAC;AAC1B,CAAC;AAED,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inseefr/lunatic",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Library of questionnaire components",
5
5
  "type": "module",
6
6
  "repository": {