@xylabs/sdk-react 2.10.3 → 2.10.6
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/cjs5/index.js +19 -4
- package/dist/cjs5/index.js.map +1 -1
- package/dist/cjs5/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/cjs5/lib/isLocalHost.d.ts +1 -1
- package/dist/esm2015/index.js +19 -4
- package/dist/esm2015/index.js.map +1 -1
- package/dist/esm2015/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/esm2015/lib/isLocalHost.d.ts +1 -1
- package/dist/esm2017/index.js +19 -4
- package/dist/esm2017/index.js.map +1 -1
- package/dist/esm2017/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/esm2017/lib/isLocalHost.d.ts +1 -1
- package/dist/esm5/index.js +19 -4
- package/dist/esm5/index.js.map +1 -1
- package/dist/esm5/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/esm5/lib/isLocalHost.d.ts +1 -1
- package/dist/lib/Tracking/Drip/BaseEvent.js +4 -1
- package/dist/lib/Tracking/Drip/BaseEvent.js.map +1 -1
- package/dist/lib/Tracking/Facebook/Fbq.js +2 -1
- package/dist/lib/Tracking/Facebook/Fbq.js.map +1 -1
- package/dist/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/lib/Tracking/Facebook/StandardEvents.js.map +1 -1
- package/dist/lib/Tracking/Google/Gtag.js +4 -1
- package/dist/lib/Tracking/Google/Gtag.js.map +1 -1
- package/dist/lib/Tracking/Reddit/Rdt.js +2 -1
- package/dist/lib/Tracking/Reddit/Rdt.js.map +1 -1
- package/dist/lib/Tracking/Snapchat/Snaptr.js +2 -1
- package/dist/lib/Tracking/Snapchat/Snaptr.js.map +1 -1
- package/dist/lib/Tracking/Tapjoy/EF.js +2 -1
- package/dist/lib/Tracking/Tapjoy/EF.js.map +1 -1
- package/dist/lib/Tracking/Tiktok/Ttq.js +2 -1
- package/dist/lib/Tracking/Tiktok/Ttq.js.map +1 -1
- package/dist/lib/isLocalHost.d.ts +1 -1
- package/dist/lib/isLocalHost.js +1 -1
- package/dist/lib/isLocalHost.js.map +1 -1
- package/dist/node/index.js +19 -4
- package/dist/node/index.js.map +1 -1
- package/dist/node/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/node/lib/isLocalHost.d.ts +1 -1
- package/dist/node-esm/index.js +19 -4
- package/dist/node-esm/index.js.map +1 -1
- package/dist/node-esm/lib/Tracking/Facebook/StandardEvents.d.ts +4 -0
- package/dist/node-esm/lib/isLocalHost.d.ts +1 -1
- package/package.json +22 -22
- package/src/lib/Tracking/Drip/BaseEvent.ts +4 -2
- package/src/lib/Tracking/Facebook/Fbq.ts +2 -2
- package/src/lib/Tracking/Facebook/StandardEvents.ts +5 -0
- package/src/lib/Tracking/Google/Gtag.ts +4 -2
- package/src/lib/Tracking/Reddit/Rdt.ts +2 -2
- package/src/lib/Tracking/Snapchat/Snaptr.ts +2 -2
- package/src/lib/Tracking/Tapjoy/EF.ts +2 -1
- package/src/lib/Tracking/Tiktok/Ttq.ts +2 -2
- package/src/lib/isLocalHost.ts +8 -7
- package/dist/cjs5/lib/global.d.ts +0 -2
- package/dist/esm2015/lib/global.d.ts +0 -2
- package/dist/esm2017/lib/global.d.ts +0 -2
- package/dist/esm5/lib/global.d.ts +0 -2
- package/dist/lib/global.d.ts +0 -2
- package/dist/lib/global.js +0 -4
- package/dist/lib/global.js.map +0 -1
- package/dist/node/lib/global.d.ts +0 -2
- package/dist/node-esm/lib/global.d.ts +0 -2
- package/src/lib/global.ts +0 -4
|
@@ -19,6 +19,9 @@ export interface FacebookCartProperties extends FacebookValueProperties, Faceboo
|
|
|
19
19
|
contents?: FacebookContentsItem[];
|
|
20
20
|
num_items?: number;
|
|
21
21
|
}
|
|
22
|
+
export interface FacebookExternalId extends Record<string, string[] | undefined> {
|
|
23
|
+
external_id?: string[];
|
|
24
|
+
}
|
|
22
25
|
export declare type FacebookAddPaymentInfo = FacebookCartProperties;
|
|
23
26
|
export declare type FacebookAddToCart = FacebookCartProperties;
|
|
24
27
|
export declare type FacebookAddToWishList = FacebookCartProperties;
|
|
@@ -37,6 +40,7 @@ export interface FacebookStartTrial extends FacebookValueProperties {
|
|
|
37
40
|
}
|
|
38
41
|
export interface FacebookSubscribe extends FacebookValueProperties {
|
|
39
42
|
predicted_ltv?: string;
|
|
43
|
+
subscription_id?: string;
|
|
40
44
|
}
|
|
41
45
|
export declare type FacebookViewContent = FacebookCartProperties;
|
|
42
46
|
export declare class FacebookStandardEvents<T extends Record<string, unknown>> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const isLocalhost: boolean;
|
|
1
|
+
declare const isLocalhost: () => boolean;
|
|
2
2
|
export { isLocalhost };
|
package/dist/esm5/index.js
CHANGED
|
@@ -280,7 +280,7 @@ const getApiStage = () => {
|
|
|
280
280
|
return getApiStage$1(document.location.hostname);
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
-
const isLocalhost = !!(window.location.hostname === 'localhost' ||
|
|
283
|
+
const isLocalhost = () => !!(window.location.hostname === 'localhost' ||
|
|
284
284
|
// [::1] is the IPv6 localhost address.
|
|
285
285
|
window.location.hostname === '[::1]' ||
|
|
286
286
|
// 127.0.0.0/8 are considered localhost for IPv4.
|
|
@@ -394,11 +394,10 @@ class Referrer {
|
|
|
394
394
|
}
|
|
395
395
|
Referrer.storageId = '_coin_referrer';
|
|
396
396
|
|
|
397
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
398
|
-
const global = window;
|
|
399
|
-
|
|
400
397
|
class Fbq {
|
|
401
398
|
constructor(pixelId) {
|
|
399
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
400
|
+
const global = window;
|
|
402
401
|
this.pixelId = pixelId;
|
|
403
402
|
this.fbq = function () {
|
|
404
403
|
// eslint-disable-next-line prefer-rest-params,prefer-spread
|
|
@@ -548,6 +547,8 @@ class Gtag {
|
|
|
548
547
|
this.ga4id = ga4id;
|
|
549
548
|
this.awid = awid;
|
|
550
549
|
this.domains = domains;
|
|
550
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
551
|
+
const global = window;
|
|
551
552
|
global.dataLayer = (_a = global.dataLayer) !== null && _a !== void 0 ? _a : [];
|
|
552
553
|
this.gtag =
|
|
553
554
|
(_b = global.gtag) !== null && _b !== void 0 ? _b : function () {
|
|
@@ -583,6 +584,8 @@ class Gtag {
|
|
|
583
584
|
return sessionStorage.getItem('initialReferrer') || '';
|
|
584
585
|
}
|
|
585
586
|
static clearDataLayer() {
|
|
587
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
588
|
+
const global = window;
|
|
586
589
|
const dataLayer = global.dataLayer;
|
|
587
590
|
dataLayer.length = 0;
|
|
588
591
|
}
|
|
@@ -856,12 +859,16 @@ class DripBaseEvent {
|
|
|
856
859
|
});
|
|
857
860
|
}
|
|
858
861
|
getDcq() {
|
|
862
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
863
|
+
const global = window;
|
|
859
864
|
if (!global._dcq) {
|
|
860
865
|
throw Error('DCQ not found');
|
|
861
866
|
}
|
|
862
867
|
return global._dcq;
|
|
863
868
|
}
|
|
864
869
|
getDcs() {
|
|
870
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
871
|
+
const global = window;
|
|
865
872
|
if (!global._dcs) {
|
|
866
873
|
throw Error('DCS not found');
|
|
867
874
|
}
|
|
@@ -890,6 +897,8 @@ class Rdt {
|
|
|
890
897
|
}
|
|
891
898
|
}
|
|
892
899
|
static getRdt() {
|
|
900
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
901
|
+
const global = window;
|
|
893
902
|
if (global.rdt) {
|
|
894
903
|
return global.rdt;
|
|
895
904
|
}
|
|
@@ -972,6 +981,8 @@ class RedditStandardEvents {
|
|
|
972
981
|
|
|
973
982
|
class SnapTr {
|
|
974
983
|
static getSnapTr() {
|
|
984
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
985
|
+
const global = window;
|
|
975
986
|
if (global.snaptr) {
|
|
976
987
|
return global.snaptr;
|
|
977
988
|
}
|
|
@@ -1104,6 +1115,8 @@ class EF {
|
|
|
1104
1115
|
}
|
|
1105
1116
|
}
|
|
1106
1117
|
static getEF() {
|
|
1118
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1119
|
+
const global = window;
|
|
1107
1120
|
if (global.EF) {
|
|
1108
1121
|
return global.EF;
|
|
1109
1122
|
}
|
|
@@ -1169,6 +1182,8 @@ class Ttq {
|
|
|
1169
1182
|
}
|
|
1170
1183
|
}
|
|
1171
1184
|
static getTtq() {
|
|
1185
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1186
|
+
const global = window;
|
|
1172
1187
|
if (global.ttq) {
|
|
1173
1188
|
return global.ttq;
|
|
1174
1189
|
}
|