@saasquatch/squatch-js 2.6.0-1 → 2.6.0-10

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 (51) hide show
  1. package/.github/workflows/static.yml +89 -0
  2. package/CHANGELOG.md +3 -0
  3. package/README.md +14 -5
  4. package/coverage/clover.xml +882 -3
  5. package/coverage/coverage-final.json +21 -1
  6. package/coverage/lcov.info +1623 -0
  7. package/dist/api/WidgetApi.d.ts +3 -2
  8. package/dist/async.d.ts +5 -0
  9. package/dist/globals.d.ts +4 -0
  10. package/dist/squatch.d.ts +28 -16
  11. package/dist/squatch.esm.js +461 -244
  12. package/dist/squatch.esm.js.map +1 -1
  13. package/dist/squatch.js +460 -244
  14. package/dist/squatch.js.map +1 -1
  15. package/dist/squatch.min.js +1 -1
  16. package/dist/types.d.ts +8 -6
  17. package/dist/utils/validate.d.ts +2 -2
  18. package/dist/widgets/EmbedWidget.d.ts +9 -0
  19. package/dist/widgets/PopupWidget.d.ts +8 -3
  20. package/dist/widgets/Widgets.d.ts +21 -8
  21. package/dist/widgets/declarative/DeclarativeWidget.d.ts +72 -2
  22. package/dist/widgets/declarative/DeclarativeWidgets.d.ts +22 -0
  23. package/jest.config.ts +1 -3
  24. package/package.json +2 -2
  25. package/coverage/lcov-report/WidgetApi.ts.html +0 -631
  26. package/coverage/lcov-report/api/AnalyticsApi.ts.html +0 -304
  27. package/coverage/lcov-report/api/WidgetApi.ts.html +0 -631
  28. package/coverage/lcov-report/api/graphql.ts.html +0 -130
  29. package/coverage/lcov-report/utils/cookieUtils.ts.html +0 -415
  30. package/coverage/lcov-report/utils/decodeUserJwt.ts.html +0 -133
  31. package/coverage/lcov-report/utils/domready.ts.html +0 -160
  32. package/coverage/lcov-report/utils/io.ts.html +0 -400
  33. package/coverage/lcov-report/utils/utmUtils.ts.html +0 -277
  34. package/coverage/lcov-report/utils/validate.ts.html +0 -268
  35. package/coverage/lcov-report/validate.ts.html +0 -268
  36. package/coverage/lcov-report/widgets/EmbedWidget.ts.html +0 -433
  37. package/coverage/lcov-report/widgets/PopupWidget.ts.html +0 -670
  38. package/coverage/lcov-report/widgets/Widget.ts.html +0 -1165
  39. package/coverage/lcov-report/widgets/Widgets.ts.html +0 -1060
  40. package/coverage/lcov-report/widgets/declarative/DeclarativeWidget.ts.html +0 -499
  41. package/dist/squatch.min.js.map +0 -1
  42. package/dist/squatch.modern.js +0 -2
  43. package/dist/squatch.modern.js.map +0 -1
  44. package/dist/stats.html +0 -208
  45. package/dist/utils/domUtils.d.ts +0 -1
  46. package/dist/utils/loadEvent.d.ts +0 -2
  47. package/dist/widgets/CtaWidget.d.ts +0 -24
  48. package/dist/widgets/IREmbedWidget.d.ts +0 -29
  49. package/dist/widgets/IRPopupWidget.d.ts +0 -32
  50. package/dist/widgets/declarative/DeclarativeEmbedWidget.d.ts +0 -12
  51. package/stats.json +0 -1
@@ -1 +0,0 @@
1
- export declare const createFrame: (container: string | HTMLElement, instance: any) => void;
@@ -1,2 +0,0 @@
1
- import AnalyticsApi from "../api/AnalyticsApi";
2
- export declare function loadEvent(sqh: unknown, analyticsApi: AnalyticsApi): void;
@@ -1,24 +0,0 @@
1
- import PopupWidget from "./PopupWidget";
2
- import { Params } from "./Widget";
3
- /**
4
- * A CtaWidget is displayed on top of your page
5
- *
6
- * To create a CtaWidget use {@link Widgets}
7
- *
8
- */
9
- export default class CtaWidget extends PopupWidget {
10
- position: string;
11
- side: string;
12
- positionClass: string;
13
- ctaFrame: HTMLIFrameElement;
14
- constructor(params: Params, opts: any);
15
- load(): void;
16
- /**
17
- * @inheritdoc
18
- */
19
- open(): void;
20
- /**
21
- * @inheritdoc
22
- */
23
- close(): void;
24
- }
@@ -1,29 +0,0 @@
1
- import AnalyticsApi from "../api/AnalyticsApi";
2
- import { DeclarativeConfigOptions, EmbedWidget, WidgetApi } from "../squatch";
3
- export default class IREmbedWidget extends HTMLElement {
4
- widgetType: string | null;
5
- container: string | HTMLElement | null;
6
- element: HTMLElement;
7
- frame: HTMLIFrameElement;
8
- content: string;
9
- analyticsApi: AnalyticsApi;
10
- widgetApi: WidgetApi;
11
- config: DeclarativeConfigOptions;
12
- tenantAlias: string;
13
- token: string;
14
- widget: EmbedWidget;
15
- constructor();
16
- static get observedAttributes(): string[];
17
- attributeChangedCallback(attr: string, oldVal: string, newVal: string): void;
18
- _setupApi({ domain, tenantAlias }: {
19
- domain: string;
20
- tenantAlias: string;
21
- }): void;
22
- _loadPasswordlessWidget(): void;
23
- _loadUserWidget(jwt: string): void;
24
- _renderErrorWidget: () => void;
25
- _renderWidget: (res: any) => void;
26
- connectedCallback(): void;
27
- open(): void;
28
- close(): void;
29
- }
@@ -1,32 +0,0 @@
1
- import AnalyticsApi from "../api/AnalyticsApi";
2
- import { PopupWidget, WidgetApi, WidgetContext } from "../squatch";
3
- export default class IRPopupWidget extends HTMLElement {
4
- triggerElement: HTMLElement | null;
5
- popupdiv: HTMLElement;
6
- popupcontent: HTMLElement;
7
- widgetType: string | null;
8
- frame: HTMLIFrameElement;
9
- analyticsApi: AnalyticsApi;
10
- widgetApi: WidgetApi;
11
- content: string;
12
- widget: PopupWidget;
13
- constructor();
14
- static get observedAttributes(): string[];
15
- attributeChangedCallback(attr: string, oldVal: string, newVal: string): void;
16
- connectedCallback(): void;
17
- _setupApi({ domain, tenantAlias }: {
18
- domain: string;
19
- tenantAlias: string;
20
- }): void;
21
- _setFrameContents(res: any): void;
22
- _loadPasswordlessWidget(): void;
23
- _loadUserWidget(jwt: string): void;
24
- _renderErrorWidget(): void;
25
- _renderWidget(res: any, context: WidgetContext): void;
26
- protected _setupResizeHandler(): void;
27
- protected _clickedOutside({ target }: {
28
- target: any;
29
- }): void;
30
- open(): void;
31
- close(): void;
32
- }
@@ -1,12 +0,0 @@
1
- import DeclarativeWidget from "./DeclarativeWidget";
2
- export declare class DeclarativeEmbedWidget extends DeclarativeWidget {
3
- constructor();
4
- static get observedAttributes(): string[];
5
- attributeChangedCallback(attr: string, oldVal: string, newVal: string): void;
6
- renderWidget(): void;
7
- }
8
- export declare class DeclarativePopupWidget extends DeclarativeWidget {
9
- constructor();
10
- static get observedAttributes(): string[];
11
- attributeChangedCallback(attr: string, oldVal: string, newVal: string): void;
12
- }