@beabee/beabee-common 1.19.12 → 1.19.13
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,15 +1,22 @@
|
|
|
1
|
-
import { CalloutComponentSchema,
|
|
1
|
+
import { CalloutComponentSchema, CalloutResponseAnswer } from "../data/callouts";
|
|
2
2
|
import { FilterArgs } from "../search";
|
|
3
3
|
import { CalloutResponseAnswerAddress, CalloutResponseAnswerFileUpload } from "../data/callouts";
|
|
4
4
|
export declare function flattenComponents(components: CalloutComponentSchema[]): CalloutComponentSchema[];
|
|
5
5
|
export declare function filterComponents(components: CalloutComponentSchema[], filterFn: (component: CalloutComponentSchema) => boolean): CalloutComponentSchema[];
|
|
6
|
-
|
|
6
|
+
interface SimpleCalloutFormSchema {
|
|
7
|
+
slides: {
|
|
8
|
+
id: string;
|
|
9
|
+
components: CalloutComponentSchema[];
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare function getCalloutComponents(formSchema: SimpleCalloutFormSchema): (CalloutComponentSchema & {
|
|
7
13
|
slideId: string;
|
|
8
14
|
fullKey: string;
|
|
9
15
|
})[];
|
|
10
|
-
export declare function getCalloutFilters(formSchema:
|
|
16
|
+
export declare function getCalloutFilters(formSchema: SimpleCalloutFormSchema): Record<string, FilterArgs & {
|
|
11
17
|
label: string;
|
|
12
18
|
}>;
|
|
13
19
|
export declare function isAddressAnswer(answer: CalloutResponseAnswer): answer is CalloutResponseAnswerAddress;
|
|
14
20
|
export declare function isFileUploadAnswer(answer: CalloutResponseAnswer): answer is CalloutResponseAnswerFileUpload;
|
|
15
21
|
export declare function stringifyAnswer(component: CalloutComponentSchema, answer: CalloutResponseAnswer | CalloutResponseAnswer[]): string;
|
|
22
|
+
export {};
|