@saasquatch/squatch-js 2.5.1-5 → 2.5.1-7
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.d.ts +1 -1
- package/dist/squatch.esm.js +6 -6
- package/dist/squatch.js +6 -6
- package/dist/squatch.min.js +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/squatch.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare function widget(widgetConfig: WidgetConfig): Promise<WidgetResult
|
|
|
39
39
|
/**
|
|
40
40
|
* Extracts widget configuration from `_saasquatchExtra` UTM parameter. Initialises `squatch` and renders the widget as a {@link PopupWidget} via static instanct of {@link Widgets}.
|
|
41
41
|
*/
|
|
42
|
-
export declare function
|
|
42
|
+
export declare function auto(configIn: ConfigOptions): Promise<WidgetResult | undefined> | undefined;
|
|
43
43
|
/**
|
|
44
44
|
* Initializes the static `squatch` global. This sets up:
|
|
45
45
|
*
|
package/dist/squatch.esm.js
CHANGED
|
@@ -1603,17 +1603,17 @@ function asyncLoad() {
|
|
|
1603
1603
|
|
|
1604
1604
|
const loaded = window.squatch || null;
|
|
1605
1605
|
const cached = window._squatch || null;
|
|
1606
|
-
const auto = (_window$squatch = window.squatch) == null ? void 0 : _window$squatch.
|
|
1606
|
+
const auto = (_window$squatch = window.squatch) == null ? void 0 : _window$squatch.auto;
|
|
1607
1607
|
console.log({
|
|
1608
1608
|
loaded,
|
|
1609
1609
|
cached,
|
|
1610
1610
|
auto
|
|
1611
1611
|
});
|
|
1612
1612
|
|
|
1613
|
-
if (loaded && cached
|
|
1613
|
+
if (loaded && cached) {
|
|
1614
1614
|
const ready = cached.ready || [];
|
|
1615
|
-
ready.forEach(cb => setTimeout(() => cb(), 0));
|
|
1616
|
-
|
|
1615
|
+
ready.forEach(cb => setTimeout(() => cb(), 0)); // setTimeout(() => auto(), 0);
|
|
1616
|
+
// @ts-ignore -- intetionally deletes `_squatch` to cleanup initialization
|
|
1617
1617
|
|
|
1618
1618
|
window._squatch = undefined;
|
|
1619
1619
|
|
|
@@ -2241,7 +2241,7 @@ function widget(widgetConfig) {
|
|
|
2241
2241
|
* Extracts widget configuration from `_saasquatchExtra` UTM parameter. Initialises `squatch` and renders the widget as a {@link PopupWidget} via static instanct of {@link Widgets}.
|
|
2242
2242
|
*/
|
|
2243
2243
|
|
|
2244
|
-
function
|
|
2244
|
+
function auto(configIn) {
|
|
2245
2245
|
const configs = _getAutoConfig(configIn);
|
|
2246
2246
|
|
|
2247
2247
|
if (configs) {
|
|
@@ -2359,5 +2359,5 @@ if (typeof document !== "undefined" && !window.SaaSquatchDoNotAutoDrop) {
|
|
|
2359
2359
|
|
|
2360
2360
|
if (typeof document !== "undefined") asyncLoad();
|
|
2361
2361
|
|
|
2362
|
-
export { CtaWidget, EmbedWidget, PopupWidget, WidgetApi, Widgets,
|
|
2362
|
+
export { CtaWidget, EmbedWidget, PopupWidget, WidgetApi, Widgets, api, auto, autofill, events, help, init, pushCookie, ready, submitEmail, widget, widgets };
|
|
2363
2363
|
//# sourceMappingURL=squatch.esm.js.map
|
package/dist/squatch.js
CHANGED
|
@@ -1630,17 +1630,17 @@ function asyncLoad() {
|
|
|
1630
1630
|
|
|
1631
1631
|
const loaded = window.squatch || null;
|
|
1632
1632
|
const cached = window._squatch || null;
|
|
1633
|
-
const auto = (_window$squatch = window.squatch) == null ? void 0 : _window$squatch.
|
|
1633
|
+
const auto = (_window$squatch = window.squatch) == null ? void 0 : _window$squatch.auto;
|
|
1634
1634
|
console.log({
|
|
1635
1635
|
loaded,
|
|
1636
1636
|
cached,
|
|
1637
1637
|
auto
|
|
1638
1638
|
});
|
|
1639
1639
|
|
|
1640
|
-
if (loaded && cached
|
|
1640
|
+
if (loaded && cached) {
|
|
1641
1641
|
const ready = cached.ready || [];
|
|
1642
|
-
ready.forEach(cb => setTimeout(() => cb(), 0));
|
|
1643
|
-
|
|
1642
|
+
ready.forEach(cb => setTimeout(() => cb(), 0)); // setTimeout(() => auto(), 0);
|
|
1643
|
+
// @ts-ignore -- intetionally deletes `_squatch` to cleanup initialization
|
|
1644
1644
|
|
|
1645
1645
|
window._squatch = undefined;
|
|
1646
1646
|
|
|
@@ -2268,7 +2268,7 @@ function widget(widgetConfig) {
|
|
|
2268
2268
|
* Extracts widget configuration from `_saasquatchExtra` UTM parameter. Initialises `squatch` and renders the widget as a {@link PopupWidget} via static instanct of {@link Widgets}.
|
|
2269
2269
|
*/
|
|
2270
2270
|
|
|
2271
|
-
function
|
|
2271
|
+
function auto(configIn) {
|
|
2272
2272
|
const configs = _getAutoConfig(configIn);
|
|
2273
2273
|
|
|
2274
2274
|
if (configs) {
|
|
@@ -2391,8 +2391,8 @@ exports.EmbedWidget = EmbedWidget;
|
|
|
2391
2391
|
exports.PopupWidget = PopupWidget;
|
|
2392
2392
|
exports.WidgetApi = WidgetApi;
|
|
2393
2393
|
exports.Widgets = Widgets;
|
|
2394
|
-
exports._auto = _auto;
|
|
2395
2394
|
exports.api = api;
|
|
2395
|
+
exports.auto = auto;
|
|
2396
2396
|
exports.autofill = autofill;
|
|
2397
2397
|
exports.events = events;
|
|
2398
2398
|
exports.help = help;
|