@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.
@@ -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>): void;
86
+ update(config: Partial<ChatbotIframeConfig>, waitForAppReady?: boolean): void;
80
87
  /**
81
88
  * Unmounts and destroys the iframe
82
89
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robylon/web-react-sdk",
3
- "version": "1.1.50-staging.8",
3
+ "version": "1.1.51-staging.9",
4
4
  "description": "React SDK for Robylon AI Chatbot",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",