@inseefr/lunatic 3.0.0-rc.13 → 3.0.0-rc.15
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/main.css +0 -2
- package/lib/main.css.map +1 -1
- package/lib/package.json +3 -3
- package/lib/src/components/Loop/Loop.d.ts +1 -1
- package/lib/src/components/LunaticComponents.d.ts +5 -4
- package/lib/src/components/LunaticComponents.js.map +1 -1
- package/lib/src/components/PairwiseLinks/PairwiseLinks.js +31 -5
- package/lib/src/components/PairwiseLinks/PairwiseLinks.js.map +1 -1
- package/lib/src/components/Radio/Radio.d.ts +1 -0
- package/lib/src/components/RosterForLoop/RosterForLoop.spec.js.map +1 -1
- package/lib/src/components/Sequence/Sequence.d.ts +3 -1
- package/lib/src/components/Subsequence/Subsequence.d.ts +3 -1
- package/lib/src/components/Suggester/CustomSuggester.d.ts +9 -8
- package/lib/src/components/Suggester/CustomSuggester.js +4 -31
- package/lib/src/components/Suggester/CustomSuggester.js.map +1 -1
- package/lib/src/components/Suggester/Suggester.d.ts +1 -1
- package/lib/src/components/Suggester/Suggester.js +57 -35
- package/lib/src/components/Suggester/Suggester.js.map +1 -1
- package/lib/src/components/Suggester/SuggesterNotification.d.ts +5 -6
- package/lib/src/components/Suggester/SuggesterNotification.js +5 -10
- package/lib/src/components/Suggester/SuggesterNotification.js.map +1 -1
- package/lib/src/components/Suggester/useSuggestions.d.ts +20 -0
- package/lib/src/components/Suggester/useSuggestions.js +86 -0
- package/lib/src/components/Suggester/useSuggestions.js.map +1 -0
- package/lib/src/components/Switch/Switch.d.ts +1 -0
- package/lib/src/components/library.d.ts +15 -5
- package/lib/src/components/shared/Combobox/Combobox.d.ts +2 -0
- package/lib/src/components/shared/Combobox/Combobox.js +5 -6
- package/lib/src/components/shared/Combobox/Combobox.js.map +1 -1
- package/lib/src/components/shared/Combobox/ComboboxType.d.ts +1 -0
- package/lib/src/components/shared/Combobox/Panel/ComboboxOption.js +4 -0
- package/lib/src/components/shared/Combobox/Panel/ComboboxOption.js.map +1 -1
- package/lib/src/components/shared/Combobox/Panel/ComboboxPanel.d.ts +1 -1
- package/lib/src/components/shared/Combobox/Panel/ComboboxPanel.js +15 -1
- package/lib/src/components/shared/Combobox/Panel/ComboboxPanel.js.map +1 -1
- package/lib/src/components/shared/Combobox/Selection/ComboboxLabelSelection.js +6 -0
- package/lib/src/components/shared/Combobox/Selection/ComboboxLabelSelection.js.map +1 -1
- package/lib/src/components/type.d.ts +41 -11
- package/lib/src/components/type.js.map +1 -1
- package/lib/src/hooks/use-track-changes.js +1 -1
- package/lib/src/hooks/use-track-changes.js.map +1 -1
- package/lib/src/hooks/useDebounce.d.ts +4 -0
- package/lib/src/hooks/useDebounce.js +23 -0
- package/lib/src/hooks/useDebounce.js.map +1 -0
- package/lib/src/hooks/useDocumentEvent.js +1 -1
- package/lib/src/hooks/useDocumentEvent.js.map +1 -1
- package/lib/src/hooks/{use-ref-sync.js → useRefSync.js} +1 -1
- package/lib/src/hooks/useRefSync.js.map +1 -0
- package/lib/src/hooks/useSuggesterInfo.d.ts +1 -1
- package/lib/src/i18n/dictionary.d.ts +16 -0
- package/lib/src/i18n/dictionary.js +16 -0
- package/lib/src/i18n/dictionary.js.map +1 -1
- package/lib/src/i18n/index.d.ts +1 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.js +3 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +71 -66
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +68 -63
- package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +16 -16
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +70 -60
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.js +16 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.js.map +1 -1
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +2 -1
- package/lib/src/use-lunatic/commons/use-components-from-state.js.map +1 -1
- package/lib/src/use-lunatic/hooks/use-page-has-response.d.ts +2 -2
- package/lib/src/use-lunatic/hooks/use-page-has-response.js +6 -3
- package/lib/src/use-lunatic/hooks/use-page-has-response.js.map +1 -1
- package/lib/src/use-lunatic/replace-component-sequence.d.ts +3 -3
- package/lib/src/use-lunatic/type-source.d.ts +7 -2
- package/lib/src/use-lunatic/use-lunatic.d.ts +4 -486
- package/lib/src/use-lunatic/use-lunatic.js +2 -2
- package/lib/src/use-lunatic/use-lunatic.js.map +1 -1
- package/lib/src/use-lunatic/use-lunatic.test.js +2 -2
- package/lib/src/use-lunatic/use-lunatic.test.js.map +1 -1
- package/lib/src/utils/function.d.ts +1 -0
- package/lib/src/utils/function.js +18 -0
- package/lib/src/utils/function.js.map +1 -1
- package/package.json +3 -3
- package/lib/src/components/Suggester/SuggesterStatus.d.ts +0 -23
- package/lib/src/components/Suggester/SuggesterStatus.js +0 -24
- package/lib/src/components/Suggester/SuggesterStatus.js.map +0 -1
- package/lib/src/hooks/use-ref-sync.js.map +0 -1
- /package/lib/src/hooks/{use-ref-sync.d.ts → useRefSync.d.ts} +0 -0
|
@@ -86,11 +86,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
86
86
|
};
|
|
87
87
|
header?: {
|
|
88
88
|
value: string;
|
|
89
|
-
label: string | import("../../type-source").LabelType
|
|
89
|
+
label: string | import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
90
90
|
options: {
|
|
91
91
|
value: string;
|
|
92
|
-
label: import("../../type-source").LabelType
|
|
93
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
92
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
93
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
94
94
|
}[];
|
|
95
95
|
colspan?: number | undefined;
|
|
96
96
|
rowspan?: number | undefined;
|
|
@@ -274,11 +274,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
274
274
|
};
|
|
275
275
|
header?: {
|
|
276
276
|
value: string;
|
|
277
|
-
label: string | import("../../type-source").LabelType
|
|
277
|
+
label: string | import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
278
278
|
options: {
|
|
279
279
|
value: string;
|
|
280
|
-
label: import("../../type-source").LabelType
|
|
281
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
280
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
281
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
282
282
|
}[];
|
|
283
283
|
colspan?: number | undefined;
|
|
284
284
|
rowspan?: number | undefined;
|
|
@@ -375,17 +375,17 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
375
375
|
componentType: "Table";
|
|
376
376
|
header: {
|
|
377
377
|
value: string;
|
|
378
|
-
label: string | import("../../type-source").LabelType
|
|
378
|
+
label: string | import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
379
379
|
options: {
|
|
380
380
|
value: string;
|
|
381
|
-
label: import("../../type-source").LabelType
|
|
382
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
381
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
382
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
383
383
|
}[];
|
|
384
384
|
colspan?: number | undefined;
|
|
385
385
|
rowspan?: number | undefined;
|
|
386
386
|
}[] | undefined;
|
|
387
387
|
body: ({
|
|
388
|
-
label: import("../../type-source").LabelType
|
|
388
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
389
389
|
colspan?: number | undefined;
|
|
390
390
|
rowspan?: number | undefined;
|
|
391
391
|
} | (import("../../type-source").ComponentType & {
|
|
@@ -510,8 +510,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
510
510
|
page: string;
|
|
511
511
|
componentType: "CheckboxGroup";
|
|
512
512
|
responses: {
|
|
513
|
-
label: import("../../type-source").LabelType
|
|
514
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
513
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
514
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
515
515
|
response: import("../../type-source").ResponseType;
|
|
516
516
|
id: string;
|
|
517
517
|
}[];
|
|
@@ -573,8 +573,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
573
573
|
componentType: "Radio";
|
|
574
574
|
options: {
|
|
575
575
|
value: string;
|
|
576
|
-
label: import("../../type-source").LabelType
|
|
577
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
576
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
577
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
578
578
|
}[];
|
|
579
579
|
response: {
|
|
580
580
|
name: string;
|
|
@@ -635,8 +635,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
635
635
|
componentType: "Dropdown";
|
|
636
636
|
options: {
|
|
637
637
|
value: string;
|
|
638
|
-
label: import("../../type-source").LabelType
|
|
639
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
638
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
639
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
640
640
|
}[];
|
|
641
641
|
response: {
|
|
642
642
|
name: string;
|
|
@@ -736,6 +736,11 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
736
736
|
response: {
|
|
737
737
|
name: string;
|
|
738
738
|
};
|
|
739
|
+
arbitrary?: {
|
|
740
|
+
response: {
|
|
741
|
+
name: string;
|
|
742
|
+
};
|
|
743
|
+
} | undefined;
|
|
739
744
|
optionResponses: {
|
|
740
745
|
name: string;
|
|
741
746
|
attribute: string;
|
|
@@ -805,8 +810,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
805
810
|
} | undefined;
|
|
806
811
|
options: {
|
|
807
812
|
value: string;
|
|
808
|
-
label: import("../../type-source").LabelType
|
|
809
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
813
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
814
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
810
815
|
}[];
|
|
811
816
|
} & import("./fill-management").FilledProps & import("./fill-component-value").FilledProps & import("./fill-missing-response").FilledProps & import("./fill-from-state").FilledProps & import("./fill-pagination").FilledProps & {
|
|
812
817
|
conditionFilter?: boolean | undefined;
|
|
@@ -865,15 +870,51 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
865
870
|
componentType: "Table";
|
|
866
871
|
header: {
|
|
867
872
|
value: string;
|
|
868
|
-
label: string | import("../../type-source").LabelType
|
|
873
|
+
label: string | import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
869
874
|
options: {
|
|
870
875
|
value: string;
|
|
871
|
-
label: import("../../type-source").LabelType
|
|
872
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
876
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
877
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
873
878
|
}[];
|
|
874
879
|
colspan?: number | undefined;
|
|
875
880
|
rowspan?: number | undefined;
|
|
876
881
|
}[] | undefined;
|
|
882
|
+
} | {
|
|
883
|
+
label: import("react").ReactNode;
|
|
884
|
+
description?: import("react").ReactNode;
|
|
885
|
+
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
886
|
+
conditionFilter?: import("react").ReactNode;
|
|
887
|
+
controls?: import("../../type-source").ControlType[] | undefined;
|
|
888
|
+
id: string;
|
|
889
|
+
bindingDependencies?: string[] | undefined;
|
|
890
|
+
hierarchy?: {
|
|
891
|
+
sequence: {
|
|
892
|
+
label: import("react").ReactNode;
|
|
893
|
+
id: string;
|
|
894
|
+
page: string;
|
|
895
|
+
};
|
|
896
|
+
subSequence?: {
|
|
897
|
+
label: import("react").ReactNode;
|
|
898
|
+
id: string;
|
|
899
|
+
page: string;
|
|
900
|
+
} | undefined;
|
|
901
|
+
} | undefined;
|
|
902
|
+
mandatory?: boolean | undefined;
|
|
903
|
+
page: string;
|
|
904
|
+
componentType: "Suggester";
|
|
905
|
+
storeName: string;
|
|
906
|
+
response: {
|
|
907
|
+
name: string;
|
|
908
|
+
};
|
|
909
|
+
arbitrary?: {
|
|
910
|
+
response: {
|
|
911
|
+
name: string;
|
|
912
|
+
};
|
|
913
|
+
} | undefined;
|
|
914
|
+
optionResponses: {
|
|
915
|
+
name: string;
|
|
916
|
+
attribute: string;
|
|
917
|
+
}[];
|
|
877
918
|
} | {
|
|
878
919
|
label: import("react").ReactNode;
|
|
879
920
|
description?: import("react").ReactNode;
|
|
@@ -1031,8 +1072,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
1031
1072
|
page: string;
|
|
1032
1073
|
componentType: "CheckboxGroup";
|
|
1033
1074
|
responses: {
|
|
1034
|
-
label: import("../../type-source").LabelType
|
|
1035
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
1075
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
1076
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
1036
1077
|
response: import("../../type-source").ResponseType;
|
|
1037
1078
|
id: string;
|
|
1038
1079
|
}[];
|
|
@@ -1090,8 +1131,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
1090
1131
|
componentType: "Radio";
|
|
1091
1132
|
options: {
|
|
1092
1133
|
value: string;
|
|
1093
|
-
label: import("../../type-source").LabelType
|
|
1094
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
1134
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
1135
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
1095
1136
|
}[];
|
|
1096
1137
|
response: {
|
|
1097
1138
|
name: string;
|
|
@@ -1148,8 +1189,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
1148
1189
|
componentType: "Dropdown";
|
|
1149
1190
|
options: {
|
|
1150
1191
|
value: string;
|
|
1151
|
-
label: import("../../type-source").LabelType
|
|
1152
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
1192
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
1193
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
1153
1194
|
}[];
|
|
1154
1195
|
response: {
|
|
1155
1196
|
name: string;
|
|
@@ -1157,37 +1198,6 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
1157
1198
|
missingResponse?: {
|
|
1158
1199
|
name: string;
|
|
1159
1200
|
} | undefined;
|
|
1160
|
-
} | {
|
|
1161
|
-
label: import("react").ReactNode;
|
|
1162
|
-
description?: import("react").ReactNode;
|
|
1163
|
-
declarations?: import("../../type-source").DeclarationType[] | undefined;
|
|
1164
|
-
conditionFilter?: import("react").ReactNode;
|
|
1165
|
-
controls?: import("../../type-source").ControlType[] | undefined;
|
|
1166
|
-
id: string;
|
|
1167
|
-
bindingDependencies?: string[] | undefined;
|
|
1168
|
-
hierarchy?: {
|
|
1169
|
-
sequence: {
|
|
1170
|
-
label: import("react").ReactNode;
|
|
1171
|
-
id: string;
|
|
1172
|
-
page: string;
|
|
1173
|
-
};
|
|
1174
|
-
subSequence?: {
|
|
1175
|
-
label: import("react").ReactNode;
|
|
1176
|
-
id: string;
|
|
1177
|
-
page: string;
|
|
1178
|
-
} | undefined;
|
|
1179
|
-
} | undefined;
|
|
1180
|
-
mandatory?: boolean | undefined;
|
|
1181
|
-
page: string;
|
|
1182
|
-
componentType: "Suggester";
|
|
1183
|
-
storeName: string;
|
|
1184
|
-
response: {
|
|
1185
|
-
name: string;
|
|
1186
|
-
};
|
|
1187
|
-
optionResponses: {
|
|
1188
|
-
name: string;
|
|
1189
|
-
attribute: string;
|
|
1190
|
-
}[];
|
|
1191
1201
|
} | {
|
|
1192
1202
|
label: import("react").ReactNode;
|
|
1193
1203
|
description?: import("react").ReactNode;
|
|
@@ -1249,8 +1259,8 @@ declare function fillSpecificExpressions(component: DeepTranslateExpression<Luna
|
|
|
1249
1259
|
} | undefined;
|
|
1250
1260
|
options: {
|
|
1251
1261
|
value: string;
|
|
1252
|
-
label: import("../../type-source").LabelType
|
|
1253
|
-
description?: import("../../type-source").LabelType | undefined;
|
|
1262
|
+
label: import("../../type-source").LabelType<"VTL" | "VTL|MD">;
|
|
1263
|
+
description?: import("../../type-source").LabelType<"VTL" | "VTL|MD"> | undefined;
|
|
1254
1264
|
}[];
|
|
1255
1265
|
};
|
|
1256
1266
|
export default fillSpecificExpressions;
|
|
@@ -109,6 +109,20 @@ function fillTable(component, state) {
|
|
|
109
109
|
})),
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* For suggester, inject the arbitrary value if necessary
|
|
114
|
+
*/
|
|
115
|
+
function fillSuggester(component, state) {
|
|
116
|
+
if (!component.arbitrary) {
|
|
117
|
+
return component;
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
...component,
|
|
121
|
+
arbitraryValue: state.executeExpression(component.arbitrary.response.name, {
|
|
122
|
+
iteration: state.pager.iteration,
|
|
123
|
+
}),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
112
126
|
/**
|
|
113
127
|
* Fill component specific props (RoundAbout for instance)
|
|
114
128
|
*/
|
|
@@ -125,6 +139,8 @@ function fillSpecificExpressions(component, state) {
|
|
|
125
139
|
return fillPairwise(component, state);
|
|
126
140
|
case 'Table':
|
|
127
141
|
return fillTable(component, state);
|
|
142
|
+
case 'Suggester':
|
|
143
|
+
return fillSuggester(component, state);
|
|
128
144
|
default:
|
|
129
145
|
return component;
|
|
130
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill-specific-expression.js","sourceRoot":"","sources":["../../../../../src/use-lunatic/commons/fill-components/fill-specific-expression.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,MAAM,8BAA8B,CAAC;AAC5E,OAAO,cAAc,EAAE,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;GAGG;AACH,SAAS,mBAAmB,CAC3B,SAA4E,EAC5E,KAA8C;IAE9C,MAAM,UAAU,GAAG,SAAS,CAAC,UAAoB,CAAC,CAAC,sEAAsE;IACzH,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,UAC7D,MAAM,EACN,CAAC,IAAI,EAAE,UAAU,CAAC;QAElB,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE;YACpE,OAAO,KAAK,CAAC,iBAAiB,CAAC,UAAU,EAAE;gBAC1C,SAAS;aACT,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAC3B,SAA0E,EAC1E,KAAmB;IAEnB,OAAO;QACN,GAAG,SAAS;QACZ,UAAU,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,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YACxC,CAAC;YACD,6EAA6E;YAC7E,OAAO;gBACN,GAAG,SAAS;gBACZ,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAC7B,qBAAqB,CAAC,SAAS,CAAC,KAAK,CAAC,CACtC;aACD,CAAC;QACH,CAAC,CAAC,CACF;KACD,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAC/B,SAA8D,EAC9D,KAAmB;IAEnB,QAAQ,SAAS,CAAC,aAAa,EAAE,CAAC;QACjC,KAAK,YAAY;YAChB,OAAO,mBAAmB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9C,KAAK,UAAU;YACd,OAAO,mBAAmB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9C,KAAK,MAAM,CAAC;QACZ,KAAK,eAAe;YACnB,OAAO,gCAAgC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC3D,KAAK,eAAe;YACnB,OAAO,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACvC,KAAK,OAAO;YACX,OAAO,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACpC;YACC,OAAO,SAAS,CAAC;IACnB,CAAC;AACF,CAAC;AAED,eAAe,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"fill-specific-expression.js","sourceRoot":"","sources":["../../../../../src/use-lunatic/commons/fill-components/fill-specific-expression.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,MAAM,8BAA8B,CAAC;AAC5E,OAAO,cAAc,EAAE,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;GAGG;AACH,SAAS,mBAAmB,CAC3B,SAA4E,EAC5E,KAA8C;IAE9C,MAAM,UAAU,GAAG,SAAS,CAAC,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K,CAAC,KAAK,CAAC,SAAS;SAChC,CAAC;KACF,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAC/B,SAA8D,EAC9D,KAAmB;IAEnB,QAAQ,SAAS,CAAC,aAAa,EAAE,CAAC;QACjC,KAAK,YAAY;YAChB,OAAO,mBAAmB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9C,KAAK,UAAU;YACd,OAAO,mBAAmB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9C,KAAK,MAAM,CAAC;QACZ,KAAK,eAAe;YACnB,OAAO,gCAAgC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC3D,KAAK,eAAe;YACnB,OAAO,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACvC,KAAK,OAAO;YACX,OAAO,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACpC,KAAK,WAAW;YACf,OAAO,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACxC;YACC,OAAO,SAAS,CAAC;IACnB,CAAC;AACF,CAAC;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { LunaticState } from '../type';
|
|
2
|
-
|
|
2
|
+
import type { LunaticComponentProps } from '../../components/type';
|
|
3
|
+
declare function useComponentsFromState(state: LunaticState): LunaticComponentProps[];
|
|
3
4
|
export default useComponentsFromState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-components-from-state.js","sourceRoot":"","sources":["../../../../src/use-lunatic/commons/use-components-from-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,cAAc,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-components-from-state.js","sourceRoot":"","sources":["../../../../src/use-lunatic/commons/use-components-from-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAI/C,SAAS,sBAAsB,CAAC,KAAmB;IAClD,OAAO,OAAO,CACb;QACC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;QACzC,MAAM,UAAU,GAAG,sBAAsB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QACjD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE;YAC5C,OAAO,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/D,CAAC,CAA4B,CAAC;IAC/B,CAAC,EACD,CAAC,KAAK,CAAC,CACP,CAAC;AACH,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FilledLunaticComponentProps } from '../commons/fill-components/fill-components';
|
|
2
1
|
import type { LunaticState } from '../type';
|
|
2
|
+
import type { LunaticComponentProps } from '../../components/type';
|
|
3
3
|
/**
|
|
4
4
|
* Check if a page has one response (value is filled for at least one field)
|
|
5
5
|
*/
|
|
6
|
-
export declare function usePageHasResponse(components:
|
|
6
|
+
export declare function usePageHasResponse(components: LunaticComponentProps[], executeExpression: LunaticState['executeExpression']): () => boolean;
|
|
@@ -11,7 +11,7 @@ export function usePageHasResponse(components, executeExpression) {
|
|
|
11
11
|
for (const component of components) {
|
|
12
12
|
// Some components are considered as "filled" by default
|
|
13
13
|
// We assume they are not in the same page has other components
|
|
14
|
-
if (['PairwiseLinks', 'Roundabout', 'Sequence', 'Subsequence'].includes(component.componentType)) {
|
|
14
|
+
if (['PairwiseLinks', 'Roundabout', 'Sequence', 'Subsequence'].includes(component.componentType ?? '')) {
|
|
15
15
|
return true;
|
|
16
16
|
}
|
|
17
17
|
// We have a missing response for this component
|
|
@@ -66,14 +66,17 @@ function isEmpty(value) {
|
|
|
66
66
|
*/
|
|
67
67
|
function isSubComponentsEmpty(components, executeExpression) {
|
|
68
68
|
for (const component of components) {
|
|
69
|
-
if ('responses' in component) {
|
|
69
|
+
if ('responses' in component && Array.isArray(component.responses)) {
|
|
70
70
|
for (const response of component.responses) {
|
|
71
|
-
if (!isEmpty(executeExpression(response.response
|
|
71
|
+
if (!isEmpty(executeExpression(response.response?.name))) {
|
|
72
72
|
return false;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
if ('response' in component &&
|
|
77
|
+
component.response &&
|
|
78
|
+
typeof component.response === 'object' &&
|
|
79
|
+
'name' in component.response &&
|
|
77
80
|
!isEmpty(executeExpression(component.response.name))) {
|
|
78
81
|
return false;
|
|
79
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-page-has-response.js","sourceRoot":"","sources":["../../../../src/use-lunatic/hooks/use-page-has-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-page-has-response.js","sourceRoot":"","sources":["../../../../src/use-lunatic/hooks/use-page-has-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CACjC,UAAmC,EACnC,iBAAoD;IAEpD,OAAO,WAAW,CAAC,GAAG,EAAE;QACvB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC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Q;YACtC,MAAM,IAAI,SAAS,CAAC,QAAQ;YAC5B,CAAC,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACnD,CAAC;YACF,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare function replaceComponentSequence(components: Array<LunaticCompon
|
|
|
14
14
|
} & {
|
|
15
15
|
paginatedLoop: true;
|
|
16
16
|
maxPage: string;
|
|
17
|
-
iterations: import("./type-source").LabelType
|
|
17
|
+
iterations: import("./type-source").LabelType<"VTL" | "VTL|MD">;
|
|
18
18
|
}) | (import("./type-source").ComponentTypeBase & {
|
|
19
19
|
componentType: "Loop";
|
|
20
20
|
loopDependencies: string[];
|
|
@@ -23,7 +23,7 @@ export declare function replaceComponentSequence(components: Array<LunaticCompon
|
|
|
23
23
|
} & {
|
|
24
24
|
paginatedLoop: false;
|
|
25
25
|
lines: {
|
|
26
|
-
min: import("./type-source").LabelType
|
|
27
|
-
max: import("./type-source").LabelType
|
|
26
|
+
min: import("./type-source").LabelType<"VTL" | "VTL|MD">;
|
|
27
|
+
max: import("./type-source").LabelType<"VTL" | "VTL|MD">;
|
|
28
28
|
};
|
|
29
29
|
}) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentTableType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentNumberType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDatePickerType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDurationType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxGroupType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxBooleanType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRadioType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentFilterDescriptionType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentDropdownType) | (Omit<import("./type-source").ComponentTypeBase, "label"> & import("./type-source").ComponentPairWiseLinksType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentRoundaboutType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentSuggesterType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentInputOrTextareaType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentCheckboxOneType) | (import("./type-source").ComponentTypeBase & import("./type-source").ComponentQuestionType))[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types used for source data (lunatic models and data.json)
|
|
3
3
|
*/
|
|
4
|
-
export type LabelType = {
|
|
4
|
+
export type LabelType<T extends 'VTL' | 'VTL|MD' = 'VTL' | 'VTL|MD'> = {
|
|
5
5
|
value: string;
|
|
6
|
-
type:
|
|
6
|
+
type: T;
|
|
7
7
|
};
|
|
8
8
|
export type ValuesType<T = unknown> = {
|
|
9
9
|
PREVIOUS: T | null;
|
|
@@ -210,6 +210,11 @@ export type ComponentSuggesterType = {
|
|
|
210
210
|
componentType: 'Suggester';
|
|
211
211
|
storeName: string;
|
|
212
212
|
response: ResponseType;
|
|
213
|
+
arbitrary?: {
|
|
214
|
+
response: {
|
|
215
|
+
name: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
213
218
|
optionResponses: {
|
|
214
219
|
name: string;
|
|
215
220
|
attribute: string;
|