@beabee/beabee-common 1.19.13 → 1.19.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.
|
@@ -3,6 +3,8 @@ export interface BaseCalloutComponentSchema {
|
|
|
3
3
|
type: string;
|
|
4
4
|
key: string;
|
|
5
5
|
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
placeholder?: string;
|
|
6
8
|
input?: boolean;
|
|
7
9
|
adminOnly?: boolean;
|
|
8
10
|
[key: string]: unknown;
|
|
@@ -40,20 +42,28 @@ export interface RadioCalloutComponentSchema extends BaseCalloutComponentSchema
|
|
|
40
42
|
}[];
|
|
41
43
|
}
|
|
42
44
|
export type CalloutComponentSchema = ContentCalloutComponentSchema | SelectCalloutComponentSchema | RadioCalloutComponentSchema | InputCalloutComponentSchema | NestableCalloutComponentSchema;
|
|
43
|
-
export interface
|
|
44
|
-
prevText: string;
|
|
45
|
-
nextText: string;
|
|
45
|
+
export interface SetCalloutNavigationSchema {
|
|
46
46
|
nextSlideId: string;
|
|
47
|
-
submitText: string;
|
|
48
47
|
}
|
|
49
|
-
export interface
|
|
48
|
+
export interface SetCalloutSlideSchema {
|
|
50
49
|
id: string;
|
|
51
50
|
title: string;
|
|
52
51
|
components: CalloutComponentSchema[];
|
|
53
|
-
navigation:
|
|
52
|
+
navigation: SetCalloutNavigationSchema;
|
|
53
|
+
}
|
|
54
|
+
export interface SetCalloutFormSchema {
|
|
55
|
+
slides: SetCalloutSlideSchema[];
|
|
56
|
+
}
|
|
57
|
+
export interface GetCalloutNavigationSchema extends SetCalloutNavigationSchema {
|
|
58
|
+
prevText: string;
|
|
59
|
+
nextText: string;
|
|
60
|
+
submitText: string;
|
|
61
|
+
}
|
|
62
|
+
export interface GetCalloutSlideSchema extends SetCalloutSlideSchema {
|
|
63
|
+
navigation: GetCalloutNavigationSchema;
|
|
54
64
|
}
|
|
55
|
-
export interface
|
|
56
|
-
slides:
|
|
65
|
+
export interface GetCalloutFormSchema extends SetCalloutFormSchema {
|
|
66
|
+
slides: GetCalloutSlideSchema[];
|
|
57
67
|
}
|
|
58
68
|
export interface CalloutResponseAnswerAddress {
|
|
59
69
|
formatted_address: string;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { CalloutComponentSchema, CalloutResponseAnswer } from "../data/callouts";
|
|
1
|
+
import { CalloutComponentSchema, CalloutResponseAnswer, SetCalloutFormSchema } 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
|
-
|
|
7
|
-
slides: {
|
|
8
|
-
id: string;
|
|
9
|
-
components: CalloutComponentSchema[];
|
|
10
|
-
}[];
|
|
11
|
-
}
|
|
12
|
-
export declare function getCalloutComponents(formSchema: SimpleCalloutFormSchema): (CalloutComponentSchema & {
|
|
6
|
+
export declare function getCalloutComponents(formSchema: SetCalloutFormSchema): (CalloutComponentSchema & {
|
|
13
7
|
slideId: string;
|
|
14
8
|
fullKey: string;
|
|
15
9
|
})[];
|
|
16
|
-
export declare function getCalloutFilters(formSchema:
|
|
10
|
+
export declare function getCalloutFilters(formSchema: SetCalloutFormSchema): Record<string, FilterArgs & {
|
|
17
11
|
label: string;
|
|
18
12
|
}>;
|
|
19
13
|
export declare function isAddressAnswer(answer: CalloutResponseAnswer): answer is CalloutResponseAnswerAddress;
|
|
20
14
|
export declare function isFileUploadAnswer(answer: CalloutResponseAnswer): answer is CalloutResponseAnswerFileUpload;
|
|
21
15
|
export declare function stringifyAnswer(component: CalloutComponentSchema, answer: CalloutResponseAnswer | CalloutResponseAnswer[]): string;
|
|
22
|
-
export {};
|