@saasquatch/squatch-js 2.3.2-29 → 2.3.2-31
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/squatch.esm.js +22 -15
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +22 -15
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +2 -2
- package/dist/stats.html +1 -1
- package/dist/types.d.ts +17 -1
- package/dist/widgets/EmbedWidget.d.ts +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -12,14 +12,30 @@ export interface ConfigOptions {
|
|
|
12
12
|
npmCdn?: string;
|
|
13
13
|
debug?: boolean;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Config options for loading a widget
|
|
17
|
+
*
|
|
18
|
+
* @param user The user details
|
|
19
|
+
* @param widgetType The content of the widget.
|
|
20
|
+
* @param engagementMedium How to display the widget.
|
|
21
|
+
* @param container Element to load the widget into.
|
|
22
|
+
* @param trigger Trigger element's selector for opening the popup widget
|
|
23
|
+
* @param jwt the JSON Web Token (JWT) that is used
|
|
24
|
+
*/
|
|
15
25
|
export interface WidgetConfig {
|
|
16
26
|
user: User;
|
|
17
27
|
widgetType?: WidgetType;
|
|
18
28
|
engagementMedium?: EngagementMedium;
|
|
19
|
-
container?: HTMLElement;
|
|
29
|
+
container?: HTMLElement | string;
|
|
20
30
|
trigger?: string;
|
|
21
31
|
jwt?: JWT;
|
|
22
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @param user The user details
|
|
35
|
+
* @param widgetType The content of the widget.
|
|
36
|
+
* @param engagementMedium How to display the widget.
|
|
37
|
+
* @param jwt the JSON Web Token (JWT) that is used
|
|
38
|
+
*/
|
|
23
39
|
export interface CookieWidgetConfig {
|
|
24
40
|
user?: CookieUser;
|
|
25
41
|
widgetType?: WidgetType;
|
|
@@ -7,7 +7,7 @@ import Widget, { Params } from "./Widget";
|
|
|
7
7
|
*/
|
|
8
8
|
export default class EmbedWidget extends Widget {
|
|
9
9
|
element: HTMLElement;
|
|
10
|
-
constructor(params: Params, container
|
|
10
|
+
constructor(params: Params, container?: HTMLElement | string);
|
|
11
11
|
load(): Promise<void>;
|
|
12
12
|
open(): void;
|
|
13
13
|
close(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasquatch/squatch-js",
|
|
3
|
-
"version": "2.3.2-
|
|
3
|
+
"version": "2.3.2-31",
|
|
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",
|