@robylon/web-react-sdk 1.1.55-alpha.5 → 1.1.56
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/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ChatbotIframe.d.ts +0 -1
- package/dist/cjs/types/core/api.d.ts +1 -1
- package/dist/cjs/types/types.d.ts +0 -17
- package/dist/cjs/types/utils/chatbotSdk.d.ts +0 -2
- package/dist/cjs/types/utils/fetchData.d.ts +1 -18
- package/dist/cjs/types/utils/injectLauncherCdnWarmup.d.ts +1 -0
- package/dist/cjs/types/utils/proactive.d.ts +0 -2
- package/dist/cjs/types/vanilla/components/ChatbotFloatingButton.d.ts +3 -2
- package/dist/cjs/types/vanilla/components/ChatbotIframe.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ChatbotIframe.d.ts +0 -1
- package/dist/esm/types/core/api.d.ts +1 -1
- package/dist/esm/types/types.d.ts +0 -17
- package/dist/esm/types/utils/chatbotSdk.d.ts +0 -2
- package/dist/esm/types/utils/fetchData.d.ts +1 -18
- package/dist/esm/types/utils/injectLauncherCdnWarmup.d.ts +1 -0
- package/dist/esm/types/utils/proactive.d.ts +0 -2
- package/dist/esm/types/vanilla/components/ChatbotFloatingButton.d.ts +3 -2
- package/dist/esm/types/vanilla/components/ChatbotIframe.d.ts +2 -2
- package/dist/index.d.ts +0 -17
- package/dist/umd/robylon-chatbot.js +1 -1
- package/dist/umd/robylon-chatbot.js.map +1 -1
- package/dist/umd/types/components/ChatbotIframe.d.ts +0 -1
- package/dist/umd/types/core/api.d.ts +1 -1
- package/dist/umd/types/types.d.ts +0 -17
- package/dist/umd/types/utils/chatbotSdk.d.ts +0 -2
- package/dist/umd/types/utils/fetchData.d.ts +1 -18
- package/dist/umd/types/utils/injectLauncherCdnWarmup.d.ts +1 -0
- package/dist/umd/types/utils/proactive.d.ts +0 -2
- package/dist/umd/types/vanilla/components/ChatbotFloatingButton.d.ts +3 -2
- package/dist/umd/types/vanilla/components/ChatbotIframe.d.ts +2 -2
- package/package.json +2 -18
- package/dist/cjs/types/constants/iframeActions.d.ts +0 -10
- package/dist/esm/types/constants/iframeActions.d.ts +0 -10
- package/dist/umd/types/constants/iframeActions.d.ts +0 -10
|
@@ -7,7 +7,6 @@ interface ChatbotIframeProps {
|
|
|
7
7
|
isVisible: boolean;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
onEvent?: ChatbotEventHandler;
|
|
10
|
-
onIframeLoaded?: () => void;
|
|
11
10
|
onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
|
|
12
11
|
position?: "Left" | "Right";
|
|
13
12
|
bottomSpacing?: number;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param userToken The user token (optional)
|
|
6
6
|
* @returns The chatbot configuration
|
|
7
7
|
*/
|
|
8
|
-
export declare const fetchChatbotConfig: (apiKey: string, userId?: string, userToken?: string
|
|
8
|
+
export declare const fetchChatbotConfig: (apiKey: string, userId?: string, userToken?: string) => Promise<any>;
|
|
@@ -24,7 +24,6 @@ export interface ChatbotConfig {
|
|
|
24
24
|
userProfile?: Record<string, any>;
|
|
25
25
|
domain: string;
|
|
26
26
|
show_launcher: boolean;
|
|
27
|
-
show_history?: boolean;
|
|
28
27
|
brand_colour: string;
|
|
29
28
|
image_url?: string;
|
|
30
29
|
chat_interface_config?: {
|
|
@@ -50,21 +49,7 @@ export interface ChatbotConfig {
|
|
|
50
49
|
enabled: boolean;
|
|
51
50
|
delay: number;
|
|
52
51
|
};
|
|
53
|
-
launcher_scroll?: {
|
|
54
|
-
enabled: boolean;
|
|
55
|
-
depth: number;
|
|
56
|
-
};
|
|
57
|
-
auto_launch?: boolean;
|
|
58
|
-
auto_launch_delay?: {
|
|
59
|
-
enabled: boolean;
|
|
60
|
-
seconds: number;
|
|
61
|
-
};
|
|
62
|
-
auto_launch_scroll?: {
|
|
63
|
-
enabled: boolean;
|
|
64
|
-
depth: number;
|
|
65
|
-
};
|
|
66
52
|
launcher_size_multiplier?: number;
|
|
67
|
-
ws_url?: string;
|
|
68
53
|
}
|
|
69
54
|
interface RobylonSdkConfig {
|
|
70
55
|
chatbot_id: string;
|
|
@@ -132,8 +117,6 @@ export interface ProactiveMessage {
|
|
|
132
117
|
updated_at?: string;
|
|
133
118
|
created_at?: string;
|
|
134
119
|
delay?: number;
|
|
135
|
-
delay_type?: "scroll" | "time";
|
|
136
|
-
scroll_threshold?: number;
|
|
137
120
|
content_multiple?: {
|
|
138
121
|
message: string;
|
|
139
122
|
content_id?: string;
|
|
@@ -43,28 +43,11 @@ interface ChatbotResponse {
|
|
|
43
43
|
enabled: boolean;
|
|
44
44
|
delay: number;
|
|
45
45
|
};
|
|
46
|
-
launcher_scroll?: {
|
|
47
|
-
enabled: boolean;
|
|
48
|
-
depth: number;
|
|
49
|
-
};
|
|
50
|
-
auto_launch_delay?: {
|
|
51
|
-
enabled: boolean;
|
|
52
|
-
seconds: number;
|
|
53
|
-
};
|
|
54
|
-
auto_launch_scroll?: {
|
|
55
|
-
enabled: boolean;
|
|
56
|
-
depth: number;
|
|
57
|
-
};
|
|
58
46
|
launcher_size_multiplier?: number;
|
|
59
47
|
};
|
|
60
48
|
show_launcher: boolean;
|
|
61
|
-
auto_launch?: boolean;
|
|
62
|
-
};
|
|
63
|
-
router_connection_info?: {
|
|
64
|
-
url?: string;
|
|
65
|
-
access_token?: string;
|
|
66
49
|
};
|
|
67
50
|
};
|
|
68
51
|
}
|
|
69
|
-
export declare const fetchChatbotConfig: (chatbotId: string, userId: string | null | number, token?: string
|
|
52
|
+
export declare const fetchChatbotConfig: (chatbotId: string, userId: string | null | number, token?: string) => Promise<ChatbotResponse>;
|
|
70
53
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ensureLauncherCdnWarmupLinks: () => void;
|
|
@@ -29,8 +29,6 @@ export declare class ChatbotFloatingButton {
|
|
|
29
29
|
private proactiveElement;
|
|
30
30
|
private urlUnsubscribe;
|
|
31
31
|
private delayTimers;
|
|
32
|
-
private scrollHandlers;
|
|
33
|
-
private shownScrollMessages;
|
|
34
32
|
/**
|
|
35
33
|
* Creates a new ChatbotFloatingButton
|
|
36
34
|
* @param config The button configuration
|
|
@@ -40,6 +38,9 @@ export declare class ChatbotFloatingButton {
|
|
|
40
38
|
* Renders the button element
|
|
41
39
|
*/
|
|
42
40
|
private render;
|
|
41
|
+
private getImageLauncherSrc;
|
|
42
|
+
private appendChevronSvg;
|
|
43
|
+
private tryUpdateImageLauncherInPlace;
|
|
43
44
|
private createLauncherElement;
|
|
44
45
|
private createTextLauncher;
|
|
45
46
|
private createTextualImageLauncher;
|
|
@@ -21,7 +21,6 @@ interface ChatbotIframeConfig {
|
|
|
21
21
|
timestamp: number;
|
|
22
22
|
data?: any;
|
|
23
23
|
}) => void;
|
|
24
|
-
onIframeLoaded?: () => void;
|
|
25
24
|
onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
|
|
26
25
|
position?: "Left" | "Right";
|
|
27
26
|
bottomSpacing?: number;
|
|
@@ -41,7 +40,8 @@ export declare class ChatbotIframe {
|
|
|
41
40
|
private resizeHandler;
|
|
42
41
|
private overridesPayloadCache;
|
|
43
42
|
private proactiveDataSentInRegistration;
|
|
44
|
-
private
|
|
43
|
+
private buildOverridesPayload;
|
|
44
|
+
private hasUserProvidedOverrides;
|
|
45
45
|
/**
|
|
46
46
|
* Creates a new ChatbotIframe
|
|
47
47
|
* @param config The iframe configuration
|
package/dist/index.d.ts
CHANGED
|
@@ -77,7 +77,6 @@ interface ChatbotConfig {
|
|
|
77
77
|
userProfile?: Record<string, any>;
|
|
78
78
|
domain: string;
|
|
79
79
|
show_launcher: boolean;
|
|
80
|
-
show_history?: boolean;
|
|
81
80
|
brand_colour: string;
|
|
82
81
|
image_url?: string;
|
|
83
82
|
chat_interface_config?: {
|
|
@@ -103,21 +102,7 @@ interface ChatbotConfig {
|
|
|
103
102
|
enabled: boolean;
|
|
104
103
|
delay: number;
|
|
105
104
|
};
|
|
106
|
-
launcher_scroll?: {
|
|
107
|
-
enabled: boolean;
|
|
108
|
-
depth: number;
|
|
109
|
-
};
|
|
110
|
-
auto_launch?: boolean;
|
|
111
|
-
auto_launch_delay?: {
|
|
112
|
-
enabled: boolean;
|
|
113
|
-
seconds: number;
|
|
114
|
-
};
|
|
115
|
-
auto_launch_scroll?: {
|
|
116
|
-
enabled: boolean;
|
|
117
|
-
depth: number;
|
|
118
|
-
};
|
|
119
105
|
launcher_size_multiplier?: number;
|
|
120
|
-
ws_url?: string;
|
|
121
106
|
}
|
|
122
107
|
interface RobylonSdkConfig {
|
|
123
108
|
chatbot_id: string;
|
|
@@ -185,8 +170,6 @@ interface ProactiveMessage {
|
|
|
185
170
|
updated_at?: string;
|
|
186
171
|
created_at?: string;
|
|
187
172
|
delay?: number;
|
|
188
|
-
delay_type?: "scroll" | "time";
|
|
189
|
-
scroll_threshold?: number;
|
|
190
173
|
content_multiple?: {
|
|
191
174
|
message: string;
|
|
192
175
|
content_id?: string;
|