@saasquatch/squatch-js 2.3.2-27 → 2.3.2-28

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/types.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface WidgetConfig {
17
17
  widgetType?: WidgetType;
18
18
  engagementMedium?: EngagementMedium;
19
19
  container?: HTMLElement;
20
+ trigger?: string;
20
21
  jwt?: JWT;
21
22
  }
22
23
  export interface CookieWidgetConfig {
@@ -57,12 +58,14 @@ export declare type EngagementMedium =
57
58
  export declare type WidgetContext = {
58
59
  type: "cookie" | "error";
59
60
  engagementMedium?: EngagementMedium;
60
- container?: HTMLElement;
61
+ container?: HTMLElement | string;
62
+ trigger?: string;
61
63
  } | {
62
64
  type: "upsert";
63
65
  user: User;
64
66
  engagementMedium?: EngagementMedium;
65
- container?: HTMLElement;
67
+ container?: HTMLElement | string;
68
+ trigger?: string;
66
69
  };
67
70
  export declare type WidgetContextType = "upsert" | "cookie" | "error";
68
71
  /**
@@ -54,9 +54,9 @@ export default class Widgets {
54
54
  * @param {string} config.user.accountId The user account id
55
55
  * @param {WidgetType} config.widgetType The content of the widget.
56
56
  * @param {EngagementMedium} config.engagementMedium How to display the widget.
57
- * @param {string} config.jwt the JSON Web Token (JWT) that is used
58
- * to validate the data (can be disabled)
59
- @param {HTMLElement} config.container Element to load the widget into
57
+ * @param {string} config.jwt the JSON Web Token (JWT) that is used to validate the data (can be disabled)
58
+ * @param {HTMLElement | string | undefined} config.container Element to load the widget into
59
+ * @param {string | undefined} config.trigger Trigger element for opening the popup widget
60
60
  *
61
61
  * @return {Promise<WidgetResult>} json object if true, with a Widget and user details.
62
62
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasquatch/squatch-js",
3
- "version": "2.3.2-27",
3
+ "version": "2.3.2-28",
4
4
  "description": "The official Referral SaaSquatch Javascript Web/Browser SDK https://docs.referralsaasquatch.com/developer/squatchjs/",
5
5
  "license": "MIT",
6
6
  "types": "dist/squatch.d.ts",