@robylon/web-react-sdk 1.1.50-staging.8 → 1.1.51-staging.9
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/types.d.ts +5 -0
- package/dist/cjs/types/utils/proactive.d.ts +5 -1
- package/dist/cjs/types/vanilla/components/ChatbotIframe.d.ts +9 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/types.d.ts +5 -0
- package/dist/esm/types/utils/proactive.d.ts +5 -1
- package/dist/esm/types/vanilla/components/ChatbotIframe.d.ts +9 -2
- package/dist/index.d.ts +6 -1
- package/dist/umd/robylon-chatbot.js +1 -1
- package/dist/umd/robylon-chatbot.js.map +1 -1
- package/dist/umd/types/types.d.ts +5 -0
- package/dist/umd/types/utils/proactive.d.ts +5 -1
- package/dist/umd/types/vanilla/components/ChatbotIframe.d.ts +9 -2
- package/package.json +1 -1
|
@@ -93,6 +93,10 @@ export declare enum ConditionType {
|
|
|
93
93
|
STARTS_WITH = "STARTS_WITH",
|
|
94
94
|
ENDS_WITH = "ENDS_WITH"
|
|
95
95
|
}
|
|
96
|
+
export declare enum MessageDisplayType {
|
|
97
|
+
BUTTON = "BUTTON",
|
|
98
|
+
TEXT = "TEXT"
|
|
99
|
+
}
|
|
96
100
|
export interface ContentDisplayAttribute {
|
|
97
101
|
type: DisplayAttributesType;
|
|
98
102
|
value: string;
|
|
@@ -115,6 +119,7 @@ export interface ProactiveMessage {
|
|
|
115
119
|
content_multiple?: {
|
|
116
120
|
message: string;
|
|
117
121
|
content_id?: string;
|
|
122
|
+
message_display_type?: MessageDisplayType;
|
|
118
123
|
message_display_attributes: (ContentDisplayAttribute | LogicalConditionAttribute)[];
|
|
119
124
|
}[];
|
|
120
125
|
}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { ProactiveMessage } from "src/types";
|
|
1
|
+
import { ProactiveMessage, MessageDisplayType } from "src/types";
|
|
2
2
|
export declare const hideProactiveForThisPage: () => void;
|
|
3
3
|
export declare const isProactiveHiddenThisPage: () => boolean;
|
|
4
4
|
export declare const setLastClickedProactive: (params: {
|
|
5
5
|
content_string: string | null;
|
|
6
6
|
message_id: string | null;
|
|
7
|
+
content_id: string | null;
|
|
7
8
|
}) => void;
|
|
8
9
|
export declare const getAndClearLastClickedProactive: () => {
|
|
9
10
|
input_id: null;
|
|
10
11
|
content_string: string | null;
|
|
11
12
|
message_id: string | null;
|
|
13
|
+
content_id?: string | null;
|
|
12
14
|
} | null;
|
|
13
15
|
export interface VisibleContent {
|
|
14
16
|
messageId: string;
|
|
15
17
|
contentIndex: number;
|
|
16
18
|
html: string;
|
|
17
19
|
delayMs: number;
|
|
20
|
+
contentId: string | null;
|
|
21
|
+
messageDisplayType: MessageDisplayType;
|
|
18
22
|
}
|
|
19
23
|
export declare const evaluateProactiveMessages: (messages?: ProactiveMessage[]) => VisibleContent[];
|
|
@@ -34,6 +34,9 @@ export declare class ChatbotIframe {
|
|
|
34
34
|
private config;
|
|
35
35
|
private isInitialized;
|
|
36
36
|
private hasRegistered;
|
|
37
|
+
private isAppReady;
|
|
38
|
+
private shouldWaitForAppReady;
|
|
39
|
+
private hasPendingOpenRequest;
|
|
37
40
|
private resizeHandler;
|
|
38
41
|
private overridesPayloadCache;
|
|
39
42
|
private proactiveDataSentInRegistration;
|
|
@@ -70,13 +73,17 @@ export declare class ChatbotIframe {
|
|
|
70
73
|
/**
|
|
71
74
|
* Updates the iframe visibility
|
|
72
75
|
* @param isVisible Whether the iframe should be visible
|
|
76
|
+
* @param waitForAppReady If true, defer postMessages until APP_READY is received
|
|
73
77
|
*/
|
|
74
|
-
updateVisibility(isVisible: boolean): void;
|
|
78
|
+
updateVisibility(isVisible: boolean, waitForAppReady?: boolean): void;
|
|
79
|
+
private showIframe;
|
|
80
|
+
private hideIframe;
|
|
81
|
+
private sendOpenAndRegisterIfReady;
|
|
75
82
|
/**
|
|
76
83
|
* Updates the iframe with new configuration
|
|
77
84
|
* @param config The new configuration
|
|
78
85
|
*/
|
|
79
|
-
update(config: Partial<ChatbotIframeConfig
|
|
86
|
+
update(config: Partial<ChatbotIframeConfig>, waitForAppReady?: boolean): void;
|
|
80
87
|
/**
|
|
81
88
|
* Unmounts and destroys the iframe
|
|
82
89
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -146,6 +146,10 @@ declare enum ConditionType {
|
|
|
146
146
|
STARTS_WITH = "STARTS_WITH",
|
|
147
147
|
ENDS_WITH = "ENDS_WITH"
|
|
148
148
|
}
|
|
149
|
+
declare enum MessageDisplayType {
|
|
150
|
+
BUTTON = "BUTTON",
|
|
151
|
+
TEXT = "TEXT"
|
|
152
|
+
}
|
|
149
153
|
interface ContentDisplayAttribute {
|
|
150
154
|
type: DisplayAttributesType;
|
|
151
155
|
value: string;
|
|
@@ -168,6 +172,7 @@ interface ProactiveMessage {
|
|
|
168
172
|
content_multiple?: {
|
|
169
173
|
message: string;
|
|
170
174
|
content_id?: string;
|
|
175
|
+
message_display_type?: MessageDisplayType;
|
|
171
176
|
message_display_attributes: (ContentDisplayAttribute | LogicalConditionAttribute)[];
|
|
172
177
|
}[];
|
|
173
178
|
}
|
|
@@ -215,4 +220,4 @@ declare const _default: {
|
|
|
215
220
|
getState: () => string;
|
|
216
221
|
};
|
|
217
222
|
|
|
218
|
-
export { MemoizedRobylonChatbot as Chatbot, type ChatbotConfig, ChatbotInterfaceType, type ChatbotRef, type ChatbotState, ConditionType, type ContentDisplayAttribute, DisplayAttributesType, LauncherType, type LogicalConditionAttribute, LogicalConditionType, type ProactiveMessage, ProactiveSendTimeType, _default as RobylonChatbot, type WidgetInterfaceProperties, WidgetPositionEnums, useChatbot };
|
|
223
|
+
export { MemoizedRobylonChatbot as Chatbot, type ChatbotConfig, ChatbotInterfaceType, type ChatbotRef, type ChatbotState, ConditionType, type ContentDisplayAttribute, DisplayAttributesType, LauncherType, type LogicalConditionAttribute, LogicalConditionType, MessageDisplayType, type ProactiveMessage, ProactiveSendTimeType, _default as RobylonChatbot, type WidgetInterfaceProperties, WidgetPositionEnums, useChatbot };
|