be-components 6.4.9 → 6.5.1
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/lib/commonjs/Clarity/FallbackClarity.js +22 -0
- package/lib/commonjs/Clarity/FallbackClarity.js.map +1 -0
- package/lib/commonjs/Clarity/index.js +13 -6
- package/lib/commonjs/Clarity/index.js.map +1 -1
- package/lib/module/Clarity/FallbackClarity.js +16 -0
- package/lib/module/Clarity/FallbackClarity.js.map +1 -0
- package/lib/module/Clarity/index.js +13 -6
- package/lib/module/Clarity/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Clarity/FallbackClarity.d.ts +9 -0
- package/lib/typescript/lib/commonjs/Clarity/FallbackClarity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Clarity/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Clarity/FallbackClarity.d.ts +8 -0
- package/lib/typescript/lib/module/Clarity/FallbackClarity.d.ts.map +1 -0
- package/lib/typescript/lib/module/Clarity/index.d.ts +1 -6
- package/lib/typescript/lib/module/Clarity/index.d.ts.map +1 -1
- package/lib/typescript/src/Clarity/FallbackClarity.d.ts +4 -0
- package/lib/typescript/src/Clarity/FallbackClarity.d.ts.map +1 -0
- package/lib/typescript/src/Clarity/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/Clarity/FallbackClarity.tsx +22 -0
- package/src/Clarity/index.tsx +19 -12
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const FBClarityFunctions = {
|
|
8
|
+
initializeClarity: project_id => {
|
|
9
|
+
console.log(project_id);
|
|
10
|
+
},
|
|
11
|
+
setCustomTag: (tag, value) => {
|
|
12
|
+
console.log(tag, value);
|
|
13
|
+
},
|
|
14
|
+
identify: (player_id, session_id) => {
|
|
15
|
+
console.log(player_id, session_id);
|
|
16
|
+
},
|
|
17
|
+
smartEvent: event => {
|
|
18
|
+
console.log(event);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = FBClarityFunctions;
|
|
22
|
+
//# sourceMappingURL=FallbackClarity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FBClarityFunctions","initializeClarity","project_id","console","log","setCustomTag","tag","value","identify","player_id","session_id","smartEvent","event","_default","exports","default"],"sourceRoot":"../../../src","sources":["Clarity/FallbackClarity.tsx"],"mappings":";;;;;;AAEA,MAAMA,kBAAiC,GAAG;EACtCC,iBAAiB,EAAGC,UAAiB,IAAU;IAC3CC,OAAO,CAACC,GAAG,CAACF,UAAU,CAAC;EAC3B,CAAC;EACDG,YAAY,EAAEA,CAACC,GAAU,EAAEC,KAAY,KAAU;IAC7CJ,OAAO,CAACC,GAAG,CAACE,GAAG,EAAEC,KAAK,CAAC;EAC3B,CAAC;EACDC,QAAQ,EAAEA,CAACC,SAAgB,EAAEC,UAAkB,KAAU;IACrDP,OAAO,CAACC,GAAG,CAACK,SAAS,EAAEC,UAAU,CAAC;EACtC,CAAC;EACDC,UAAU,EAAGC,KAAY,IAAK;IAC1BT,OAAO,CAACC,GAAG,CAACQ,KAAK,CAAC;EACtB;AACJ,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcf,kBAAkB","ignoreList":[]}
|
|
@@ -5,13 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
8
|
+
var _expoConstants = _interopRequireDefault(require("expo-constants"));
|
|
9
9
|
var _WebClarity = _interopRequireDefault(require("./WebClarity"));
|
|
10
|
+
var _FallbackClarity = _interopRequireDefault(require("./FallbackClarity"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
let BEClarity
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
let BEClarity;
|
|
13
|
+
if (_reactNative.Platform.OS === 'web') {
|
|
14
|
+
BEClarity = _WebClarity.default;
|
|
15
|
+
} else if (_expoConstants.default.executionEnvironment === 'storeClient') {
|
|
16
|
+
// In Expo Go — use fallback
|
|
17
|
+
BEClarity = _FallbackClarity.default;
|
|
18
|
+
} else {
|
|
19
|
+
// Only load native module in custom dev client or standalone
|
|
20
|
+
const RNClarityFunctions = require("./RNClarity").default;
|
|
21
|
+
BEClarity = RNClarityFunctions;
|
|
22
|
+
}
|
|
16
23
|
var _default = exports.default = BEClarity;
|
|
17
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_expoConstants","_interopRequireDefault","_WebClarity","_FallbackClarity","e","__esModule","default","BEClarity","Platform","OS","WebClarityFunctions","Constants","executionEnvironment","FBClarityFunctions","RNClarityFunctions","_default","exports"],"sourceRoot":"../../../src","sources":["Clarity/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAmD,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AASnD,IAAIG,SAAyB;AAE7B,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;EACzBF,SAAS,GAAGG,mBAAmB;AACjC,CAAC,MAAM,IAAIC,sBAAS,CAACC,oBAAoB,KAAK,aAAa,EAAE;EAC3D;EACAL,SAAS,GAAGM,wBAAkB;AAChC,CAAC,MAAM;EACL;EACA,MAAMC,kBAAkB,GAAGf,OAAO,CAAC,aAAa,CAAC,CAACO,OAAO;EACzDC,SAAS,GAAGO,kBAAkB;AAChC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEcC,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const FBClarityFunctions = {
|
|
2
|
+
initializeClarity: project_id => {
|
|
3
|
+
console.log(project_id);
|
|
4
|
+
},
|
|
5
|
+
setCustomTag: (tag, value) => {
|
|
6
|
+
console.log(tag, value);
|
|
7
|
+
},
|
|
8
|
+
identify: (player_id, session_id) => {
|
|
9
|
+
console.log(player_id, session_id);
|
|
10
|
+
},
|
|
11
|
+
smartEvent: event => {
|
|
12
|
+
console.log(event);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export default FBClarityFunctions;
|
|
16
|
+
//# sourceMappingURL=FallbackClarity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FBClarityFunctions","initializeClarity","project_id","console","log","setCustomTag","tag","value","identify","player_id","session_id","smartEvent","event"],"sourceRoot":"../../../src","sources":["Clarity/FallbackClarity.tsx"],"mappings":"AAEA,MAAMA,kBAAiC,GAAG;EACtCC,iBAAiB,EAAGC,UAAiB,IAAU;IAC3CC,OAAO,CAACC,GAAG,CAACF,UAAU,CAAC;EAC3B,CAAC;EACDG,YAAY,EAAEA,CAACC,GAAU,EAAEC,KAAY,KAAU;IAC7CJ,OAAO,CAACC,GAAG,CAACE,GAAG,EAAEC,KAAK,CAAC;EAC3B,CAAC;EACDC,QAAQ,EAAEA,CAACC,SAAgB,EAAEC,UAAkB,KAAU;IACrDP,OAAO,CAACC,GAAG,CAACK,SAAS,EAAEC,UAAU,CAAC;EACtC,CAAC;EACDC,UAAU,EAAGC,KAAY,IAAK;IAC1BT,OAAO,CAACC,GAAG,CAACQ,KAAK,CAAC;EACtB;AACJ,CAAC;AAED,eAAeZ,kBAAkB","ignoreList":[]}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
|
-
import
|
|
2
|
+
import Constants from "expo-constants";
|
|
3
3
|
import WebClarityFunctions from "./WebClarity";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})
|
|
4
|
+
import FBClarityFunctions from "./FallbackClarity";
|
|
5
|
+
let BEClarity;
|
|
6
|
+
if (Platform.OS === 'web') {
|
|
7
|
+
BEClarity = WebClarityFunctions;
|
|
8
|
+
} else if (Constants.executionEnvironment === 'storeClient') {
|
|
9
|
+
// In Expo Go — use fallback
|
|
10
|
+
BEClarity = FBClarityFunctions;
|
|
11
|
+
} else {
|
|
12
|
+
// Only load native module in custom dev client or standalone
|
|
13
|
+
const RNClarityFunctions = require("./RNClarity").default;
|
|
14
|
+
BEClarity = RNClarityFunctions;
|
|
15
|
+
}
|
|
9
16
|
export default BEClarity;
|
|
10
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","
|
|
1
|
+
{"version":3,"names":["Platform","Constants","WebClarityFunctions","FBClarityFunctions","BEClarity","OS","executionEnvironment","RNClarityFunctions","require","default"],"sourceRoot":"../../../src","sources":["Clarity/index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAOC,mBAAmB,MAAM,cAAc;AAC9C,OAAOC,kBAAkB,MAAM,mBAAmB;AASlD,IAAIC,SAAyB;AAE7B,IAAIJ,QAAQ,CAACK,EAAE,KAAK,KAAK,EAAE;EACzBD,SAAS,GAAGF,mBAAmB;AACjC,CAAC,MAAM,IAAID,SAAS,CAACK,oBAAoB,KAAK,aAAa,EAAE;EAC3D;EACAF,SAAS,GAAGD,kBAAkB;AAChC,CAAC,MAAM;EACL;EACA,MAAMI,kBAAkB,GAAGC,OAAO,CAAC,aAAa,CAAC,CAACC,OAAO;EACzDL,SAAS,GAAGG,kBAAkB;AAChC;AAEA,eAAeH,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const __esModule: boolean;
|
|
2
|
+
export default FBClarityFunctions;
|
|
3
|
+
declare namespace FBClarityFunctions {
|
|
4
|
+
function initializeClarity(project_id: any): void;
|
|
5
|
+
function setCustomTag(tag: any, value: any): void;
|
|
6
|
+
function identify(player_id: any, session_id: any): void;
|
|
7
|
+
function smartEvent(event: any): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=FallbackClarity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FallbackClarity.d.ts","sourceRoot":"","sources":["../../../../commonjs/Clarity/FallbackClarity.js"],"names":[],"mappings":";;;IAOqB,kDAElB;IACa,kDAEb;IACS,yDAET;IACW,sCAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commonjs/Clarity/index.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commonjs/Clarity/index.js"],"names":[],"mappings":";;AAWA,2BAAc"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default FBClarityFunctions;
|
|
2
|
+
declare namespace FBClarityFunctions {
|
|
3
|
+
function initializeClarity(project_id: any): void;
|
|
4
|
+
function setCustomTag(tag: any, value: any): void;
|
|
5
|
+
function identify(player_id: any, session_id: any): void;
|
|
6
|
+
function smartEvent(event: any): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=FallbackClarity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FallbackClarity.d.ts","sourceRoot":"","sources":["../../../../module/Clarity/FallbackClarity.js"],"names":[],"mappings":";;IACqB,kDAElB;IACa,kDAEb;IACS,yDAET;IACW,sCAEX"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
export default BEClarity;
|
|
2
|
-
declare let BEClarity:
|
|
3
|
-
initializeClarity: (project_id: any) => void;
|
|
4
|
-
setCustomTag: (tag: any, value: any) => void;
|
|
5
|
-
identify: (player_id: any, session_id: any) => void;
|
|
6
|
-
smartEvent: (event: any) => void;
|
|
7
|
-
} | undefined;
|
|
2
|
+
declare let BEClarity: any;
|
|
8
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Clarity/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Clarity/index.js"],"names":[],"mappings":";AAIA,2BAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FallbackClarity.d.ts","sourceRoot":"","sources":["../../../../src/Clarity/FallbackClarity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAExC,QAAA,MAAM,kBAAkB,EAAC,cAaxB,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Clarity/index.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Clarity/index.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAED,QAAA,IAAI,SAAS,EAAE,cAAc,CAAC;AAa9B,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "be-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.1",
|
|
4
4
|
"description": "Components for BettorEdge Apps",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -183,6 +183,7 @@
|
|
|
183
183
|
"expo-av": "~15.1.4",
|
|
184
184
|
"expo-camera": "~16.1.6",
|
|
185
185
|
"expo-clipboard": "~7.1.4",
|
|
186
|
+
"expo-constants": "^17.1.7",
|
|
186
187
|
"expo-contacts": "~14.2.4",
|
|
187
188
|
"expo-crypto": "~14.1.4",
|
|
188
189
|
"expo-dev-client": "~5.2.4",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BEClarityProps } from '.';
|
|
2
|
+
|
|
3
|
+
const FBClarityFunctions:BEClarityProps = {
|
|
4
|
+
initializeClarity: (project_id:string):void => {
|
|
5
|
+
console.log(project_id);
|
|
6
|
+
},
|
|
7
|
+
setCustomTag: (tag:string, value:string):void => {
|
|
8
|
+
console.log(tag, value)
|
|
9
|
+
},
|
|
10
|
+
identify: (player_id:string, session_id?:string):void => {
|
|
11
|
+
console.log(player_id, session_id)
|
|
12
|
+
},
|
|
13
|
+
smartEvent: (event:string) => {
|
|
14
|
+
console.log(event)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default FBClarityFunctions
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
package/src/Clarity/index.tsx
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
|
-
import
|
|
2
|
+
import Constants from "expo-constants";
|
|
3
3
|
import WebClarityFunctions from "./WebClarity";
|
|
4
|
-
|
|
4
|
+
import FBClarityFunctions from "./FallbackClarity";
|
|
5
5
|
|
|
6
6
|
export interface BEClarityProps {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
initializeClarity: (project_id: string) => void,
|
|
8
|
+
setCustomTag: (tag: string, value: string) => void,
|
|
9
|
+
identify: (player_id: string, session_id?: string) => void,
|
|
10
|
+
smartEvent: (event: string) => void
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
let BEClarity:BEClarityProps
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
13
|
+
let BEClarity: BEClarityProps;
|
|
14
|
+
|
|
15
|
+
if (Platform.OS === 'web') {
|
|
16
|
+
BEClarity = WebClarityFunctions;
|
|
17
|
+
} else if (Constants.executionEnvironment === 'storeClient') {
|
|
18
|
+
// In Expo Go — use fallback
|
|
19
|
+
BEClarity = FBClarityFunctions;
|
|
20
|
+
} else {
|
|
21
|
+
// Only load native module in custom dev client or standalone
|
|
22
|
+
const RNClarityFunctions = require("./RNClarity").default;
|
|
23
|
+
BEClarity = RNClarityFunctions;
|
|
24
|
+
}
|
|
18
25
|
|
|
19
|
-
export default BEClarity
|
|
26
|
+
export default BEClarity;
|