@xapp/stentor-chat-widget 1.58.1 → 1.60.4

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.
Files changed (2) hide show
  1. package/lib/WidgetEnv.d.ts +39 -3
  2. package/package.json +2 -2
@@ -3,8 +3,40 @@ import { Response } from "stentor-models";
3
3
  import { WidgetTheme } from "./WidgetTheme";
4
4
  import { ChatUserInfo } from "./UserInfo";
5
5
  export interface CtaConfig {
6
- readonly message: string;
7
- readonly timeout: number;
6
+ /**
7
+ * Message to display in the chat bubble.
8
+ *
9
+ * An empty message will not display the chat bubble.
10
+ */
11
+ readonly message?: string;
12
+ /**
13
+ * How long, in milliseconds, to display the message
14
+ */
15
+ readonly timeout?: number;
16
+ /**
17
+ * The delay, in milliseconds, to wait until the message is displayed
18
+ */
19
+ readonly delay?: number;
20
+ /**
21
+ * Animation to perform on the button after the delay
22
+ */
23
+ readonly animation?: "wiggle" | "bounce";
24
+ /**
25
+ * How long to keep the animation going, in milliseconds. If an animation exists
26
+ */
27
+ readonly animationTimeout?: number;
28
+ }
29
+ export interface MobileCtaConfig extends CtaConfig {
30
+ /**
31
+ * Apply this config when
32
+ */
33
+ applyAtLessThanWidth?: string;
34
+ }
35
+ export interface Cta extends CtaConfig {
36
+ /**
37
+ * Mobile specific configuration
38
+ */
39
+ mobile?: MobileCtaConfig;
8
40
  }
9
41
  export declare type ServerType = "direct" | "websocket" | "local" | "websocketraw";
10
42
  /**
@@ -111,7 +143,7 @@ export interface WidgetEnv extends WidgetEnvDeprecated {
111
143
  /**
112
144
  * Optional configurable message that appears
113
145
  */
114
- readonly cta?: CtaConfig;
146
+ readonly cta?: Cta;
115
147
  /**
116
148
  * Optional, configure the chat button tab index
117
149
  */
@@ -298,6 +330,10 @@ export interface WidgetSendButtonConfig {
298
330
  readonly tabIndex?: string;
299
331
  }
300
332
  export interface WidgetChatButtonConfig {
333
+ /**
334
+ * Optional image url, recommended 24px by 24px in size.
335
+ */
336
+ readonly imageUrl?: string;
301
337
  readonly tabIndex?: string;
302
338
  }
303
339
  export interface WidgetClearButtonConfig {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.58.1",
7
+ "version": "1.60.4",
8
8
  "description": "Chat Widget channel for stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -38,5 +38,5 @@
38
38
  "build": "tsc -d true -p .",
39
39
  "clean": "rm -rf ./lib/*"
40
40
  },
41
- "gitHead": "5df1f47bded5b63ccfc7c54f1d2e3a9b3aae3236"
41
+ "gitHead": "9495737a10c3fec6155e777ed5a68a081a2f04d1"
42
42
  }