be-components 6.4.9 → 6.5.0

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.
@@ -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 _RNClarity = _interopRequireDefault(require("./RNClarity"));
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 = _reactNative.Platform.select({
12
- ios: _RNClarity.default,
13
- android: _RNClarity.default,
14
- web: _WebClarity.default
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","_RNClarity","_interopRequireDefault","_WebClarity","e","__esModule","default","BEClarity","Platform","select","ios","RNClarityFunctions","android","web","WebClarityFunctions","_default","exports"],"sourceRoot":"../../../src","sources":["Clarity/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA+C,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU/C,IAAIG,SAAwB,GAAGC,qBAAQ,CAACC,MAAM,CAAC;EAC7CC,GAAG,EAAEC,kBAAkB;EACvBC,OAAO,EAAED,kBAAkB;EAC3BE,GAAG,EAAEC;AACP,CAAC,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEaC,SAAS","ignoreList":[]}
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 RNClarityFunctions from "./RNClarity";
2
+ import Constants from "expo-constants";
3
3
  import WebClarityFunctions from "./WebClarity";
4
- let BEClarity = Platform.select({
5
- ios: RNClarityFunctions,
6
- android: RNClarityFunctions,
7
- web: WebClarityFunctions
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","RNClarityFunctions","WebClarityFunctions","BEClarity","select","ios","android","web"],"sourceRoot":"../../../src","sources":["Clarity/index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,kBAAkB,MAAM,aAAa;AAC5C,OAAOC,mBAAmB,MAAM,cAAc;AAU9C,IAAIC,SAAwB,GAAGH,QAAQ,CAACI,MAAM,CAAC;EAC7CC,GAAG,EAAEJ,kBAAkB;EACvBK,OAAO,EAAEL,kBAAkB;EAC3BM,GAAG,EAAEL;AACP,CAAC,CAAC;AAEF,eAAeC,SAAS","ignoreList":[]}
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":";;AAUA,2BAIG"}
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":";AAGA;;;;;cAIG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Clarity/index.js"],"names":[],"mappings":";AAIA,2BAAc"}
@@ -0,0 +1,4 @@
1
+ import type { BEClarityProps } from '.';
2
+ declare const FBClarityFunctions: BEClarityProps;
3
+ export default FBClarityFunctions;
4
+ //# sourceMappingURL=FallbackClarity.d.ts.map
@@ -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;IAC3B,iBAAiB,EAAE,CAAC,UAAU,EAAC,MAAM,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAC,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,CAAC,SAAS,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IACzD,UAAU,EAAC,CAAC,KAAK,EAAC,MAAM,KAAK,IAAI,CAAA;CACpC;AAED,QAAA,IAAI,SAAS,EAAC,cAIZ,CAAA;AAEF,eAAe,SAAS,CAAA"}
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.4.9",
3
+ "version": "6.5.0",
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
+
@@ -1,19 +1,26 @@
1
1
  import { Platform } from "react-native";
2
- import RNClarityFunctions from "./RNClarity";
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
- 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
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 = Platform.select({
14
- ios: RNClarityFunctions,
15
- android: RNClarityFunctions,
16
- web: WebClarityFunctions as any
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;