@xapp/stentor-chat-widget 1.50.0 → 1.51.0

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.
@@ -187,9 +187,12 @@ export interface WidgetBrandingConfig {
187
187
  * Enable display of the branding text
188
188
  */
189
189
  readonly enabled?: boolean;
190
+ /**
191
+ * Configurable text for the branding
192
+ */
190
193
  readonly text?: string;
191
194
  }
192
- export declare type WidgetMenuItems = WidgetMenuItemConfig | WidgetMenuItemStaticImage | WidgetMenuItemStaticText;
195
+ export declare type WidgetMenuItems = WidgetMenuItemConfig | WidgetMenuItemStaticImage | WidgetMenuItemStaticText | WidgetMenuItemOpenURL;
193
196
  export interface WidgetMenuConfig {
194
197
  /**
195
198
  * Set the location for the menu button.
@@ -203,7 +206,13 @@ export interface WidgetMenuConfig {
203
206
  * Menu items to be displayed.
204
207
  */
205
208
  readonly items: readonly WidgetMenuItems[];
209
+ /**
210
+ * Tab index for menu items.
211
+ */
206
212
  readonly itemsTabIndex?: string;
213
+ /**
214
+ * Menu button configuration
215
+ */
207
216
  readonly button?: WidgetMenuButtonConfig;
208
217
  }
209
218
  export interface WidgetInputConfig {
@@ -221,6 +230,20 @@ export interface WidgetMenuItemStaticText {
221
230
  readonly title: string;
222
231
  readonly body: string;
223
232
  }
233
+ export interface WidgetMenuItemOpenURL {
234
+ /**
235
+ * URL to be opened
236
+ */
237
+ readonly url: string;
238
+ /**
239
+ * Display label for the URL
240
+ */
241
+ readonly text: string;
242
+ /**
243
+ * How the URL opens, defaults to defined behavior on URL opening config.
244
+ */
245
+ readonly behavior?: WidgetUrlBehavior;
246
+ }
224
247
  export interface WidgetHeaderSubtitleConfig {
225
248
  readonly enabled?: boolean;
226
249
  readonly text?: string;
package/lib/guards.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { WidgetMenuItems, WidgetMenuItemConfig, WidgetMenuItemStaticImage, WidgetMenuItemStaticText } from "./WidgetEnv";
1
+ import { WidgetMenuItems, WidgetMenuItemConfig, WidgetMenuItemStaticImage, WidgetMenuItemStaticText, WidgetMenuItemOpenURL } from "./WidgetEnv";
2
2
  export declare function isStaticImageMenuItem(item: WidgetMenuItems): item is WidgetMenuItemStaticImage;
3
3
  export declare function isStaticTextMenuItem(item: WidgetMenuItems): item is WidgetMenuItemStaticText;
4
4
  export declare function isStandardMenuItem(item: WidgetMenuItems): item is WidgetMenuItemConfig;
5
+ export declare function isOpenURLMenuItem(item: WidgetMenuItems): item is WidgetMenuItemOpenURL;
package/lib/guards.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isStandardMenuItem = exports.isStaticTextMenuItem = exports.isStaticImageMenuItem = void 0;
3
+ exports.isOpenURLMenuItem = exports.isStandardMenuItem = exports.isStaticTextMenuItem = exports.isStaticImageMenuItem = void 0;
4
4
  function isStaticImageMenuItem(item) {
5
5
  return !!item && !!item.imageUrl;
6
6
  }
@@ -13,4 +13,8 @@ function isStandardMenuItem(item) {
13
13
  return !!item && !!item.label;
14
14
  }
15
15
  exports.isStandardMenuItem = isStandardMenuItem;
16
+ function isOpenURLMenuItem(item) {
17
+ return !!item && !!item.url;
18
+ }
19
+ exports.isOpenURLMenuItem = isOpenURLMenuItem;
16
20
  //# sourceMappingURL=guards.js.map
package/lib/guards.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":";;;AAEA,SAAgB,qBAAqB,CAAC,IAAqB;IACvD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAAkC,CAAC,QAAQ,CAAC;AACpE,CAAC;AAFD,sDAEC;AAED,SAAgB,oBAAoB,CAAC,IAAqB;IACtD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAAiC,CAAC,IAAI,CAAC;AAC/D,CAAC;AAFD,oDAEC;AAED,SAAgB,kBAAkB,CAAC,IAAqB;IACpD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAA6B,CAAC,KAAK,CAAC;AAC5D,CAAC;AAFD,gDAEC"}
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":";;;AAEA,SAAgB,qBAAqB,CAAC,IAAqB;IACvD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAAkC,CAAC,QAAQ,CAAC;AACpE,CAAC;AAFD,sDAEC;AAED,SAAgB,oBAAoB,CAAC,IAAqB;IACtD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAAiC,CAAC,IAAI,CAAC;AAC/D,CAAC;AAFD,oDAEC;AAED,SAAgB,kBAAkB,CAAC,IAAqB;IACpD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAA6B,CAAC,KAAK,CAAC;AAC5D,CAAC;AAFD,gDAEC;AAED,SAAgB,iBAAiB,CAAC,IAAqB;IACnD,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAA8B,CAAC,GAAG,CAAC;AAC3D,CAAC;AAFD,8CAEC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.50.0",
7
+ "version": "1.51.0",
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": "9c2936860632f34f43a7149343466e6e22c69138"
41
+ "gitHead": "d314fdeeef894c66ae6bcf577762374934d93028"
42
42
  }