@robylon/web-react-sdk 1.1.41-staging.9 → 1.1.41
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 +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/RobylonChatbot.d.ts +1 -1
- package/dist/cjs/types/core/config.d.ts +0 -7
- package/dist/cjs/types/types.d.ts +1 -30
- package/dist/cjs/types/utils/fetchData.d.ts +1 -1
- package/dist/cjs/types/utils/proactive.d.ts +1 -16
- package/dist/cjs/types/vanilla/components/ChatbotFloatingButton.d.ts +0 -4
- package/dist/cjs/types/vanilla/index.d.ts +1 -0
- package/dist/esm/index.js +1 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/RobylonChatbot.d.ts +1 -1
- package/dist/esm/types/core/config.d.ts +0 -7
- package/dist/esm/types/types.d.ts +1 -30
- package/dist/esm/types/utils/fetchData.d.ts +1 -1
- package/dist/esm/types/utils/proactive.d.ts +1 -16
- package/dist/esm/types/vanilla/components/ChatbotFloatingButton.d.ts +0 -4
- package/dist/esm/types/vanilla/index.d.ts +1 -0
- package/dist/index.d.ts +4 -32
- package/dist/umd/robylon-chatbot.js +1 -1
- package/dist/umd/robylon-chatbot.js.map +1 -1
- package/dist/umd/types/components/RobylonChatbot.d.ts +1 -1
- package/dist/umd/types/core/config.d.ts +0 -7
- package/dist/umd/types/types.d.ts +1 -30
- package/dist/umd/types/utils/fetchData.d.ts +1 -1
- package/dist/umd/types/utils/proactive.d.ts +1 -16
- package/dist/umd/types/vanilla/components/ChatbotFloatingButton.d.ts +0 -4
- package/dist/umd/types/vanilla/index.d.ts +1 -0
- package/package.json +3 -5
- package/dist/cjs/types/utils/mockProactive.d.ts +0 -2
- package/dist/cjs/types/utils/sanitize.d.ts +0 -4
- package/dist/cjs/types/utils/url.d.ts +0 -8
- package/dist/esm/types/utils/mockProactive.d.ts +0 -2
- package/dist/esm/types/utils/sanitize.d.ts +0 -4
- package/dist/esm/types/utils/url.d.ts +0 -8
- package/dist/umd/types/utils/mockProactive.d.ts +0 -2
- package/dist/umd/types/utils/sanitize.d.ts +0 -4
- package/dist/umd/types/utils/url.d.ts +0 -8
|
@@ -9,7 +9,7 @@ interface ChatbotProps {
|
|
|
9
9
|
position?: "Left" | "Right";
|
|
10
10
|
sideSpacing?: number;
|
|
11
11
|
bottomSpacing?: number;
|
|
12
|
-
show_launcher?: boolean;
|
|
12
|
+
show_launcher?: boolean | null;
|
|
13
13
|
launcher_type?: "TEXT" | "IMAGE" | "TEXTUAL_IMAGE";
|
|
14
14
|
launcher_properties_text?: string;
|
|
15
15
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ChatbotConfig } from "../types";
|
|
2
|
-
import { ProactiveMessage } from "src/types";
|
|
3
2
|
/**
|
|
4
3
|
* Normalizes the configuration properties
|
|
5
4
|
* @param props The configuration properties
|
|
@@ -33,9 +32,3 @@ export declare const initializeChatbotConfig: (props: {
|
|
|
33
32
|
user_token?: string;
|
|
34
33
|
user_profile?: Record<string, any>;
|
|
35
34
|
}) => Promise<ChatbotConfig>;
|
|
36
|
-
/**
|
|
37
|
-
* Normalizes proactive messages from backend to an array form, preserving order.
|
|
38
|
-
* - Accepts undefined, single object, or array of objects
|
|
39
|
-
* - Migrates legacy `content` to `content_multiple`
|
|
40
|
-
*/
|
|
41
|
-
export declare const normalizeProactiveMessages: (input: any) => ProactiveMessage[] | undefined;
|
|
@@ -44,7 +44,7 @@ export interface ChatbotConfig {
|
|
|
44
44
|
url: string;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
proactive_message_obj?: ProactiveMessage
|
|
47
|
+
proactive_message_obj?: ProactiveMessage | undefined;
|
|
48
48
|
launcher_delay: {
|
|
49
49
|
enabled: boolean;
|
|
50
50
|
delay: number;
|
|
@@ -78,29 +78,6 @@ export declare enum ProactiveSendTimeType {
|
|
|
78
78
|
WORKING_HOURS = "WORKING_HOURS",
|
|
79
79
|
ALWAYS = "ALWAYS"
|
|
80
80
|
}
|
|
81
|
-
export declare enum DisplayAttributesType {
|
|
82
|
-
"URL" = "URL"
|
|
83
|
-
}
|
|
84
|
-
export declare enum LogicalConditionType {
|
|
85
|
-
AND = "AND",
|
|
86
|
-
OR = "OR"
|
|
87
|
-
}
|
|
88
|
-
export declare enum ConditionType {
|
|
89
|
-
IS = "IS",
|
|
90
|
-
IS_NOT = "IS_NOT",
|
|
91
|
-
CONTAINS = "CONTAINS",
|
|
92
|
-
DOES_NOT_CONTAIN = "DOES_NOT_CONTAIN",
|
|
93
|
-
STARTS_WITH = "STARTS_WITH",
|
|
94
|
-
ENDS_WITH = "ENDS_WITH"
|
|
95
|
-
}
|
|
96
|
-
export interface ContentDisplayAttribute {
|
|
97
|
-
type: DisplayAttributesType;
|
|
98
|
-
value: string;
|
|
99
|
-
condition: ConditionType;
|
|
100
|
-
}
|
|
101
|
-
export interface LogicalConditionAttribute {
|
|
102
|
-
logical_condition: LogicalConditionType;
|
|
103
|
-
}
|
|
104
81
|
export interface ProactiveMessage {
|
|
105
82
|
message_id: string;
|
|
106
83
|
org_id: string;
|
|
@@ -111,11 +88,5 @@ export interface ProactiveMessage {
|
|
|
111
88
|
updated_by_name?: string;
|
|
112
89
|
updated_at?: string;
|
|
113
90
|
created_at?: string;
|
|
114
|
-
delay?: number;
|
|
115
|
-
content_multiple?: {
|
|
116
|
-
message: string;
|
|
117
|
-
content_id?: string;
|
|
118
|
-
message_display_attributes: (ContentDisplayAttribute | LogicalConditionAttribute)[];
|
|
119
|
-
}[];
|
|
120
91
|
}
|
|
121
92
|
export {};
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { ProactiveMessage } from "src/types";
|
|
2
2
|
export declare const hideProactiveForThisPage: () => void;
|
|
3
3
|
export declare const isProactiveHiddenThisPage: () => boolean;
|
|
4
|
-
export declare const
|
|
5
|
-
content_string: string | null;
|
|
6
|
-
message_id: string | null;
|
|
7
|
-
}) => void;
|
|
8
|
-
export declare const getAndClearLastClickedProactive: () => {
|
|
9
|
-
input_id: null;
|
|
10
|
-
content_string: string | null;
|
|
11
|
-
message_id: string | null;
|
|
12
|
-
} | null;
|
|
13
|
-
export interface VisibleContent {
|
|
14
|
-
messageId: string;
|
|
15
|
-
contentIndex: number;
|
|
16
|
-
html: string;
|
|
17
|
-
delayMs: number;
|
|
18
|
-
}
|
|
19
|
-
export declare const evaluateProactiveMessages: (messages?: ProactiveMessage[]) => VisibleContent[];
|
|
4
|
+
export declare const shouldShowProactiveMessage: (message?: ProactiveMessage, now?: Date) => boolean;
|
|
@@ -26,8 +26,6 @@ export declare class ChatbotFloatingButton {
|
|
|
26
26
|
private resizeObserver;
|
|
27
27
|
private handleResizeFunction;
|
|
28
28
|
private proactiveElement;
|
|
29
|
-
private urlUnsubscribe;
|
|
30
|
-
private delayTimers;
|
|
31
29
|
/**
|
|
32
30
|
* Creates a new ChatbotFloatingButton
|
|
33
31
|
* @param config The button configuration
|
|
@@ -71,8 +69,6 @@ export declare class ChatbotFloatingButton {
|
|
|
71
69
|
* Unmounts and destroys the button
|
|
72
70
|
*/
|
|
73
71
|
destroy(): void;
|
|
74
|
-
private clearProactiveDelays;
|
|
75
|
-
private injectAnimationStyles;
|
|
76
72
|
private renderProactiveIfNeeded;
|
|
77
73
|
}
|
|
78
74
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robylon/web-react-sdk",
|
|
3
|
-
"version": "1.1.41
|
|
3
|
+
"version": "1.1.41",
|
|
4
4
|
"description": "React SDK for Robylon AI Chatbot",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
"build:vanilla": "cross-env TARGET=unpkg rollup -c",
|
|
45
45
|
"build:development:cloudfront": "npm run clean && cross-env NODE_ENV=development TARGET=cloudfront rollup -c",
|
|
46
46
|
"build:staging:cloudfront": "npm run clean && cross-env NODE_ENV=staging PUBLISH_TYPE=staging TARGET=cloudfront rollup -c",
|
|
47
|
-
"build:production:cloudfront": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production TARGET=cloudfront rollup -c"
|
|
48
|
-
"dev:watch": "cross-env NODE_ENV=development TARGET=npm rollup -c -w"
|
|
47
|
+
"build:production:cloudfront": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production TARGET=cloudfront rollup -c"
|
|
49
48
|
},
|
|
50
49
|
"publishConfig": {
|
|
51
50
|
"access": "public"
|
|
@@ -99,8 +98,7 @@
|
|
|
99
98
|
"react-dom": "*"
|
|
100
99
|
},
|
|
101
100
|
"dependencies": {
|
|
102
|
-
"lodash": "^4.17.21"
|
|
103
|
-
"dompurify": "^3.1.6"
|
|
101
|
+
"lodash": "^4.17.21"
|
|
104
102
|
},
|
|
105
103
|
"husky": {
|
|
106
104
|
"prepare": "husky install"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ConditionType, DisplayAttributesType } from "src/types";
|
|
2
|
-
type UrlChangeListener = (href: string) => void;
|
|
3
|
-
export declare const getCurrentHref: () => string;
|
|
4
|
-
export declare const buildLocationKey: () => string;
|
|
5
|
-
export declare const subscribeToUrlChanges: (cb: UrlChangeListener) => (() => void);
|
|
6
|
-
export declare const initUrlObserver: () => void;
|
|
7
|
-
export declare const matchCondition: (type: DisplayAttributesType, value: string, condition: ConditionType, href: string) => boolean;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ConditionType, DisplayAttributesType } from "src/types";
|
|
2
|
-
type UrlChangeListener = (href: string) => void;
|
|
3
|
-
export declare const getCurrentHref: () => string;
|
|
4
|
-
export declare const buildLocationKey: () => string;
|
|
5
|
-
export declare const subscribeToUrlChanges: (cb: UrlChangeListener) => (() => void);
|
|
6
|
-
export declare const initUrlObserver: () => void;
|
|
7
|
-
export declare const matchCondition: (type: DisplayAttributesType, value: string, condition: ConditionType, href: string) => boolean;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ConditionType, DisplayAttributesType } from "src/types";
|
|
2
|
-
type UrlChangeListener = (href: string) => void;
|
|
3
|
-
export declare const getCurrentHref: () => string;
|
|
4
|
-
export declare const buildLocationKey: () => string;
|
|
5
|
-
export declare const subscribeToUrlChanges: (cb: UrlChangeListener) => (() => void);
|
|
6
|
-
export declare const initUrlObserver: () => void;
|
|
7
|
-
export declare const matchCondition: (type: DisplayAttributesType, value: string, condition: ConditionType, href: string) => boolean;
|
|
8
|
-
export {};
|