@saasquatch/squatch-js 2.4.3-1 → 2.4.3-3

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
@@ -32,7 +32,7 @@ export interface WidgetConfig {
32
32
  container?: HTMLElement | string;
33
33
  trigger?: string;
34
34
  jwt?: JWT;
35
- showOnReferral?: boolean;
35
+ displayOnLoad?: boolean;
36
36
  }
37
37
  /**
38
38
  * @param user The user details
@@ -80,6 +80,7 @@ export declare type WidgetContext = {
80
80
  engagementMedium?: EngagementMedium;
81
81
  container?: HTMLElement | string;
82
82
  trigger?: string;
83
+ displayOnLoad?: boolean;
83
84
  } | {
84
85
  type: "upsert";
85
86
  user?: User | null;
@@ -30,20 +30,6 @@ export default class Widgets {
30
30
  * let widgets = new Widgets({tenantAlias:'test_12b5bo1b25125'});
31
31
  */
32
32
  constructor(configin: ConfigOptions);
33
- /**
34
- * This function calls the {@link WidgetApi.cookieUser} method, and it renders
35
- * the widget if it is successful. Otherwise it shows the "error" widget.
36
- *
37
- * @param {Object} config Config details
38
- * @param {WidgetType} config.widgetType The content of the widget.
39
- * @param {EngagementMedium} config.engagementMedium How to display the widget.
40
- * @param {User} config.user An optional user to include
41
- * @param {string} config.jwt the JSON Web Token (JWT) that is used to
42
- * validate the data (can be disabled)
43
- *
44
- * @return {Promise<WidgetResult>} json object if true, with a Widget and user details.
45
- */
46
- createCookieUser(config: WidgetConfig): Promise<WidgetResult>;
47
33
  /**
48
34
  * This function calls the {@link WidgetApi.upsertUser} method, and it renders
49
35
  * the widget if it is successful. Otherwise it shows the "error" widget.
@@ -102,7 +88,6 @@ export default class Widgets {
102
88
  * @param {Object} config Config details
103
89
  * @param {string} config.widgetType The widget type (REFERRER_WIDGET, CONVERSION_WIDGET)
104
90
  * @param {string} config.engagementMedium (POPUP, EMBED)
105
- * @param {string} config.showOnReferral Whether to show
106
91
  * @returns {Widget} widget (PopupWidget, EmbedWidget, or CtaWidget)
107
92
  */
108
93
  private _renderWidget;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasquatch/squatch-js",
3
- "version": "2.4.3-1",
3
+ "version": "2.4.3-3",
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",
@@ -41,7 +41,7 @@
41
41
  "preversion": "run-s build",
42
42
  "demo": "msw init demo/dist/ --save && run-p static parcel",
43
43
  "demo:deploy": "run-s parcel:build parcel:deploy",
44
- "static": "serve dist",
44
+ "static": "serve -l 3333 -s dist",
45
45
  "parcel": "cd demo && parcel index.html",
46
46
  "parcel:build": "cd demo && parcel build index.html",
47
47
  "parcel:deploy": "surge demo/dist -d squathjs-demo.surge.sh"