@screeb/react-native 0.8.1 → 0.8.4

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/README.md CHANGED
@@ -141,6 +141,21 @@ setProperties(
141
141
  );
142
142
  ```
143
143
 
144
+ ## Run example
145
+
146
+ ```sh
147
+ npm install
148
+
149
+ cd example/
150
+ npm install
151
+
152
+ cd ios/
153
+ pod install
154
+
155
+ npm run android
156
+ npm run ios
157
+ ```
158
+
144
159
  ## License
145
160
 
146
161
  MIT
@@ -10,6 +10,8 @@ import androidx.annotation.NonNull
10
10
  import android.content.Context
11
11
  import android.util.Log
12
12
  import app.screeb.sdk.Screeb
13
+ import android.os.Handler
14
+ import android.os.Looper
13
15
 
14
16
  class ScreebModuleModule(reactContext: ReactApplicationContext) :
15
17
  ReactContextBaseJavaModule(reactContext) {
@@ -25,7 +27,9 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
25
27
  if (properties != null) {
26
28
  map = properties.toHashMap()
27
29
  }
28
- screeb?.pluginInit(channelId, userId, map)
30
+ Handler(Looper.getMainLooper()).post {
31
+ screeb?.pluginInit(channelId, userId, map)
32
+ }
29
33
  }
30
34
 
31
35
  @ReactMethod
@@ -35,7 +39,9 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
35
39
  if (properties != null) {
36
40
  map = properties.toHashMap()
37
41
  }
38
- screeb?.setIdentity(userId, map)
42
+ Handler(Looper.getMainLooper()).post {
43
+ screeb?.setIdentity(userId, map)
44
+ }
39
45
  }
40
46
 
41
47
  @ReactMethod
@@ -45,7 +51,9 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
45
51
  if (properties != null) {
46
52
  map = properties.toHashMap()
47
53
  }
48
- screeb?.trackEvent(eventId, map)
54
+ Handler(Looper.getMainLooper()).post {
55
+ screeb?.trackEvent(eventId, map)
56
+ }
49
57
  }
50
58
 
51
59
  @ReactMethod
@@ -55,7 +63,9 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
55
63
  if (properties != null) {
56
64
  map = properties.toHashMap()
57
65
  }
58
- screeb?.trackScreen(screen, map)
66
+ Handler(Looper.getMainLooper()).post {
67
+ screeb?.trackScreen(screen, map)
68
+ }
59
69
  }
60
70
 
61
71
  @ReactMethod
@@ -64,7 +74,9 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
64
74
  "ScreebModule",
65
75
  "Called setVisitorProperties with " + properties.toHashMap().size + " properties"
66
76
  )
67
- screeb?.setVisitorProperties(properties.toHashMap())
77
+ Handler(Looper.getMainLooper()).post {
78
+ screeb?.setVisitorProperties(properties.toHashMap())
79
+ }
68
80
  }
69
81
 
70
82
  companion object {
@@ -1,5 +1,6 @@
1
1
  import Screeb
2
2
  import UIKit
3
+ import Foundation
3
4
 
4
5
  @objc(ScreebModule)
5
6
  class ScreebModule: NSObject {
@@ -14,7 +15,9 @@ class ScreebModule: NSObject {
14
15
  map = self.mapToAnyEncodable(map: properties_!)
15
16
  }
16
17
  if let controller = UIApplication.shared.keyWindow?.rootViewController {
17
- Screeb.initSdk(context: controller, channelId: channelId, identity: userId_, visitorProperty: map)
18
+ DispatchQueue.main.async {
19
+ Screeb.initSdk(context: controller, channelId: channelId, identity: userId_, visitorProperty: map)
20
+ }
18
21
  } else {
19
22
  print("Screeb : error init, could not find rootViewController")
20
23
  }
@@ -25,7 +28,9 @@ class ScreebModule: NSObject {
25
28
  if (properties_ != nil) {
26
29
  map = self.mapToAnyEncodable(map: properties_!)
27
30
  }
28
- Screeb.setIdentity(uniqueVisitorId: userId, visitorProperty: map)
31
+ DispatchQueue.main.async {
32
+ Screeb.setIdentity(uniqueVisitorId: userId, visitorProperty: map)
33
+ }
29
34
  }
30
35
 
31
36
  @objc func trackEvent(_ eventId: String, properties properties_: [String: Any]?) {
@@ -33,7 +38,9 @@ class ScreebModule: NSObject {
33
38
  if (properties_ != nil) {
34
39
  map = self.mapToAnyEncodable(map: properties_!)
35
40
  }
36
- Screeb.trackEvent(name: eventId, trackingEventProperties: map)
41
+ DispatchQueue.main.async {
42
+ Screeb.trackEvent(name: eventId, trackingEventProperties: map)
43
+ }
37
44
  }
38
45
 
39
46
  @objc func trackScreen(_ screen: String, properties properties_: [String: Any]?) {
@@ -41,13 +48,17 @@ class ScreebModule: NSObject {
41
48
  if (properties_ != nil) {
42
49
  map = self.mapToAnyEncodable(map: properties_!)
43
50
  }
44
- Screeb.trackScreen(name: screen, trackingEventProperties: map)
51
+ DispatchQueue.main.async {
52
+ Screeb.trackScreen(name: screen, trackingEventProperties: map)
53
+ }
45
54
  }
46
55
 
47
56
  @objc(setProperties:)
48
57
  func setVisitorPropertiesImpl(_ properties: [String: Any]) {
49
58
  let map = self.mapToAnyEncodable(map: properties)
50
- Screeb.visitorProperty(visitorProperty: map)
59
+ DispatchQueue.main.async {
60
+ Screeb.visitorProperty(visitorProperty: map)
61
+ }
51
62
  }
52
63
 
53
64
  private func mapToAnyEncodable(map: [String: Any]) -> [String: AnyEncodable?] {
package/package.json CHANGED
@@ -1,12 +1,21 @@
1
1
  {
2
2
  "name": "@screeb/react-native",
3
- "version": "0.8.1",
3
+ "version": "0.8.4",
4
4
  "description": "A react-native module to integrate Screeb mobile sdk for Android and/or iOS.",
5
- "main": "lib/commonjs/index",
6
- "module": "lib/module/index",
7
- "types": "lib/typescript/index.d.ts",
5
+ "scripts": {
6
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
7
+ "example": "yarn --cwd example",
8
+ "pods": "cd example && pod-install --quiet"
9
+ },
8
10
  "react-native": "src/index",
9
11
  "source": "src/index",
12
+ "keywords": [
13
+ "react-native",
14
+ "ios",
15
+ "android",
16
+ "screeb",
17
+ "survey"
18
+ ],
10
19
  "files": [
11
20
  "src",
12
21
  "lib",
@@ -21,23 +30,6 @@
21
30
  "!**/__fixtures__",
22
31
  "!**/__mocks__"
23
32
  ],
24
- "scripts": {
25
- "test": "jest",
26
- "typescript": "tsc --noEmit",
27
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
28
- "prepare": "bob build",
29
- "release": "release-it",
30
- "example": "yarn --cwd example",
31
- "pods": "cd example && pod-install --quiet",
32
- "bootstrap": "yarn example && yarn && yarn pods"
33
- },
34
- "keywords": [
35
- "react-native",
36
- "ios",
37
- "android",
38
- "screeb",
39
- "survey"
40
- ],
41
33
  "repository": {
42
34
  "type": "git",
43
35
  "url": "git+https://github.com/ScreebApp/sdk-reactnative.git"
@@ -55,878 +47,8 @@
55
47
  "publishConfig": {
56
48
  "registry": "https://registry.npmjs.org/"
57
49
  },
58
- "devDependencies": {
59
- "@commitlint/config-conventional": "^16.2.1",
60
- "@react-native-community/eslint-config": "^3.0.1",
61
- "@release-it/conventional-changelog": "^4.2.0",
62
- "@types/jest": "^27.4.1",
63
- "@types/react": "^17.0.39",
64
- "@types/react-native": "^0.67.1",
65
- "commitlint": "^16.2.1",
66
- "eslint": "^8.10.0",
67
- "eslint-config-prettier": "^8.4.0",
68
- "eslint-plugin-prettier": "^4.0.0",
69
- "husky": "^7.0.4",
70
- "jest": "^27.5.1",
71
- "pod-install": "^0.1.0",
72
- "prettier": "^2.0.5",
73
- "react": "17.0.2",
74
- "react-native": "0.68.2",
75
- "react-native-builder-bob": "^0.18.0",
76
- "release-it": "^14.2.2",
77
- "typescript": "^4.1.3"
78
- },
79
50
  "peerDependencies": {
80
51
  "react": "*",
81
52
  "react-native": "*"
82
- },
83
- "jest": {
84
- "preset": "react-native",
85
- "modulePathIgnorePatterns": [
86
- "<rootDir>/example/node_modules",
87
- "<rootDir>/lib/"
88
- ]
89
- },
90
- "commitlint": {
91
- "extends": [
92
- "@commitlint/config-conventional"
93
- ]
94
- },
95
- "release-it": {
96
- "git": {
97
- "commitMessage": "chore: release ${version}",
98
- "tagName": "v${version}"
99
- },
100
- "npm": {
101
- "publish": true
102
- },
103
- "github": {
104
- "release": true
105
- },
106
- "plugins": {
107
- "@release-it/conventional-changelog": {
108
- "preset": "angular"
109
- }
110
- }
111
- },
112
- "eslintConfig": {
113
- "root": true,
114
- "extends": [
115
- "@react-native-community",
116
- "prettier"
117
- ],
118
- "rules": {
119
- "prettier/prettier": [
120
- "error",
121
- {
122
- "quoteProps": "consistent",
123
- "singleQuote": true,
124
- "tabWidth": 2,
125
- "trailingComma": "es5",
126
- "useTabs": false
127
- }
128
- ]
129
- }
130
- },
131
- "eslintIgnore": [
132
- "node_modules/",
133
- "lib/"
134
- ],
135
- "prettier": {
136
- "quoteProps": "consistent",
137
- "singleQuote": true,
138
- "tabWidth": 2,
139
- "trailingComma": "es5",
140
- "useTabs": false
141
- },
142
- "react-native-builder-bob": {
143
- "source": "src",
144
- "output": "lib",
145
- "targets": [
146
- "commonjs",
147
- "module",
148
- [
149
- "typescript",
150
- {
151
- "project": "tsconfig.build.json"
152
- }
153
- ]
154
- ]
155
- },
156
- "directories": {
157
- "example": "example",
158
- "lib": "lib"
159
- },
160
- "dependencies": {
161
- "JSONStream": "^1.3.5",
162
- "abab": "^2.0.5",
163
- "abort-controller": "^3.0.0",
164
- "absolute-path": "^0.0.0",
165
- "accepts": "^1.3.8",
166
- "acorn": "^8.7.0",
167
- "acorn-globals": "^6.0.0",
168
- "acorn-jsx": "^5.3.2",
169
- "acorn-walk": "^7.2.0",
170
- "add-stream": "^1.0.0",
171
- "agent-base": "^6.0.2",
172
- "aggregate-error": "^3.1.0",
173
- "ajv": "^6.12.6",
174
- "anser": "^1.4.10",
175
- "ansi-align": "^3.0.1",
176
- "ansi-escapes": "^4.3.2",
177
- "ansi-fragments": "^0.2.1",
178
- "ansi-regex": "^5.0.1",
179
- "ansi-styles": "^3.2.1",
180
- "anymatch": "^3.1.2",
181
- "appdirsjs": "^1.2.6",
182
- "arg": "^4.1.3",
183
- "argparse": "^2.0.1",
184
- "arr-diff": "^4.0.0",
185
- "arr-flatten": "^1.1.0",
186
- "arr-union": "^3.1.0",
187
- "array-filter": "^0.0.1",
188
- "array-ify": "^1.0.0",
189
- "array-includes": "^3.1.4",
190
- "array-map": "^0.0.0",
191
- "array-reduce": "^0.0.0",
192
- "array-union": "^2.1.0",
193
- "array-unique": "^0.3.2",
194
- "array.prototype.flatmap": "^1.2.5",
195
- "arrify": "^1.0.1",
196
- "asap": "^2.0.6",
197
- "assign-symbols": "^1.0.0",
198
- "ast-types": "^0.14.2",
199
- "astral-regex": "^1.0.0",
200
- "async": "^2.6.3",
201
- "async-limiter": "^1.0.1",
202
- "async-retry": "^1.3.3",
203
- "asynckit": "^0.4.0",
204
- "at-least-node": "^1.0.0",
205
- "atob": "^2.1.2",
206
- "babel-core": "^7.0.0-bridge.0",
207
- "babel-eslint": "^10.1.0",
208
- "babel-jest": "^27.5.1",
209
- "babel-plugin-dynamic-import-node": "^2.3.3",
210
- "babel-plugin-istanbul": "^6.1.1",
211
- "babel-plugin-jest-hoist": "^27.5.1",
212
- "babel-plugin-polyfill-corejs2": "^0.3.1",
213
- "babel-plugin-polyfill-corejs3": "^0.5.2",
214
- "babel-plugin-polyfill-regenerator": "^0.3.1",
215
- "babel-plugin-syntax-trailing-function-commas": "^7.0.0-beta.0",
216
- "babel-preset-current-node-syntax": "^1.0.1",
217
- "babel-preset-fbjs": "^3.4.0",
218
- "babel-preset-jest": "^27.5.1",
219
- "balanced-match": "^1.0.2",
220
- "base": "^0.11.2",
221
- "base64-js": "^1.5.1",
222
- "before-after-hook": "^2.2.2",
223
- "big-integer": "^1.6.51",
224
- "bl": "^4.1.0",
225
- "boxen": "^5.1.2",
226
- "bplist-creator": "^0.1.0",
227
- "bplist-parser": "^0.3.0",
228
- "brace-expansion": "^1.1.11",
229
- "braces": "^3.0.2",
230
- "browser-process-hrtime": "^1.0.0",
231
- "browserslist": "^4.20.2",
232
- "bser": "^2.1.1",
233
- "buffer": "^5.7.1",
234
- "buffer-from": "^1.1.2",
235
- "bytes": "^3.0.0",
236
- "cache-base": "^1.0.1",
237
- "cacheable-lookup": "^5.0.4",
238
- "cacheable-request": "^7.0.2",
239
- "call-bind": "^1.0.2",
240
- "caller-callsite": "^2.0.0",
241
- "caller-path": "^2.0.0",
242
- "callsites": "^3.1.0",
243
- "camelcase": "^5.3.1",
244
- "camelcase-keys": "^6.2.2",
245
- "caniuse-lite": "^1.0.30001319",
246
- "capture-exit": "^2.0.0",
247
- "chalk": "^2.4.2",
248
- "char-regex": "^1.0.2",
249
- "chardet": "^0.7.0",
250
- "ci-info": "^3.3.0",
251
- "cjs-module-lexer": "^1.2.2",
252
- "class-utils": "^0.3.6",
253
- "clean-stack": "^2.2.0",
254
- "cli-boxes": "^2.2.1",
255
- "cli-cursor": "^2.1.0",
256
- "cli-spinners": "^2.6.1",
257
- "cli-width": "^3.0.0",
258
- "cliui": "^7.0.4",
259
- "clone": "^1.0.4",
260
- "clone-deep": "^4.0.1",
261
- "clone-response": "^1.0.2",
262
- "co": "^4.6.0",
263
- "collect-v8-coverage": "^1.0.1",
264
- "collection-visit": "^1.0.0",
265
- "color-convert": "^1.9.3",
266
- "color-name": "^1.1.3",
267
- "colorette": "^1.4.0",
268
- "colors": "^1.4.0",
269
- "combined-stream": "^1.0.8",
270
- "command-exists": "^1.2.9",
271
- "commander": "^2.20.3",
272
- "commondir": "^1.0.1",
273
- "compare-func": "^2.0.0",
274
- "component-emitter": "^1.3.0",
275
- "compressible": "^2.0.18",
276
- "compression": "^1.7.4",
277
- "concat-map": "^0.0.1",
278
- "concat-stream": "^2.0.0",
279
- "configstore": "^5.0.1",
280
- "connect": "^3.7.0",
281
- "conventional-changelog": "^3.1.25",
282
- "conventional-changelog-angular": "^5.0.13",
283
- "conventional-changelog-atom": "^2.0.8",
284
- "conventional-changelog-codemirror": "^2.0.8",
285
- "conventional-changelog-conventionalcommits": "^4.6.3",
286
- "conventional-changelog-core": "^4.2.4",
287
- "conventional-changelog-ember": "^2.0.9",
288
- "conventional-changelog-eslint": "^3.0.9",
289
- "conventional-changelog-express": "^2.0.6",
290
- "conventional-changelog-jquery": "^3.0.11",
291
- "conventional-changelog-jshint": "^2.0.9",
292
- "conventional-changelog-preset-loader": "^2.3.4",
293
- "conventional-changelog-writer": "^5.0.1",
294
- "conventional-commits-filter": "^2.0.7",
295
- "conventional-commits-parser": "^3.2.4",
296
- "conventional-recommended-bump": "^6.1.0",
297
- "convert-source-map": "^1.8.0",
298
- "copy-descriptor": "^0.1.1",
299
- "core-js-compat": "^3.21.1",
300
- "core-util-is": "^1.0.3",
301
- "cosmiconfig": "^7.0.1",
302
- "cosmiconfig-typescript-loader": "^1.0.6",
303
- "create-require": "^1.1.1",
304
- "cross-spawn": "^7.0.3",
305
- "crypto-random-string": "^2.0.0",
306
- "cssom": "^0.4.4",
307
- "cssstyle": "^2.3.0",
308
- "csstype": "^3.0.11",
309
- "dargs": "^7.0.0",
310
- "data-urls": "^2.0.0",
311
- "dateformat": "^3.0.3",
312
- "dayjs": "^1.11.0",
313
- "debug": "^4.3.4",
314
- "decamelize": "^1.2.0",
315
- "decamelize-keys": "^1.1.0",
316
- "decimal.js": "^10.3.1",
317
- "decode-uri-component": "^0.2.0",
318
- "decompress-response": "^6.0.0",
319
- "dedent": "^0.7.0",
320
- "deep-extend": "^0.6.0",
321
- "deep-is": "^0.1.4",
322
- "deepmerge": "^4.2.2",
323
- "defaults": "^1.0.3",
324
- "defer-to-connect": "^2.0.1",
325
- "define-properties": "^1.1.3",
326
- "define-property": "^2.0.2",
327
- "del": "^6.0.0",
328
- "delayed-stream": "^1.0.0",
329
- "denodeify": "^1.2.1",
330
- "depd": "^1.1.2",
331
- "deprecation": "^2.3.1",
332
- "destroy": "^1.0.4",
333
- "detect-newline": "^3.1.0",
334
- "diff": "^4.0.2",
335
- "diff-sequences": "^27.5.1",
336
- "dir-glob": "^3.0.1",
337
- "doctrine": "^3.0.0",
338
- "domexception": "^2.0.1",
339
- "dot-prop": "^5.3.0",
340
- "duplexer3": "^0.1.4",
341
- "ee-first": "^1.1.1",
342
- "electron-to-chromium": "^1.4.89",
343
- "emittery": "^0.8.1",
344
- "emoji-regex": "^8.0.0",
345
- "encodeurl": "^1.0.2",
346
- "end-of-stream": "^1.4.4",
347
- "envinfo": "^7.8.1",
348
- "error-ex": "^1.3.2",
349
- "error-stack-parser": "^2.0.7",
350
- "errorhandler": "^1.5.1",
351
- "es-abstract": "^1.19.1",
352
- "es-to-primitive": "^1.2.1",
353
- "escalade": "^3.1.1",
354
- "escape-goat": "^2.1.1",
355
- "escape-html": "^1.0.3",
356
- "escape-string-regexp": "^1.0.5",
357
- "escodegen": "^2.0.0",
358
- "eslint-plugin-eslint-comments": "^3.2.0",
359
- "eslint-plugin-flowtype": "^2.50.3",
360
- "eslint-plugin-jest": "^22.4.1",
361
- "eslint-plugin-react": "^7.29.4",
362
- "eslint-plugin-react-hooks": "^4.3.0",
363
- "eslint-plugin-react-native-globals": "^0.1.2",
364
- "eslint-scope": "^7.1.1",
365
- "eslint-utils": "^3.0.0",
366
- "eslint-visitor-keys": "^1.3.0",
367
- "espree": "^9.3.1",
368
- "esprima": "^4.0.1",
369
- "esquery": "^1.4.0",
370
- "esrecurse": "^4.3.0",
371
- "estraverse": "^5.3.0",
372
- "esutils": "^2.0.3",
373
- "etag": "^1.8.1",
374
- "event-target-shim": "^5.0.1",
375
- "exec-sh": "^0.3.6",
376
- "execa": "^5.1.1",
377
- "exit": "^0.1.2",
378
- "expand-brackets": "^2.1.4",
379
- "expect": "^27.5.1",
380
- "extend-shallow": "^3.0.2",
381
- "external-editor": "^3.1.0",
382
- "extglob": "^2.0.4",
383
- "fast-deep-equal": "^3.1.3",
384
- "fast-diff": "^1.2.0",
385
- "fast-glob": "^3.2.11",
386
- "fast-json-stable-stringify": "^2.1.0",
387
- "fast-levenshtein": "^2.0.6",
388
- "fastq": "^1.13.0",
389
- "fb-watchman": "^2.0.1",
390
- "figures": "^3.2.0",
391
- "file-entry-cache": "^6.0.1",
392
- "fill-range": "^7.0.1",
393
- "filter-obj": "^1.1.0",
394
- "finalhandler": "^1.1.2",
395
- "find-cache-dir": "^2.1.0",
396
- "find-up": "^5.0.0",
397
- "flat-cache": "^3.0.4",
398
- "flatted": "^3.2.5",
399
- "flow-parser": "^0.121.0",
400
- "for-in": "^1.0.2",
401
- "form-data": "^3.0.1",
402
- "fragment-cache": "^0.2.1",
403
- "fresh": "^0.5.2",
404
- "fs-extra": "^10.0.1",
405
- "fs.realpath": "^1.0.0",
406
- "fsevents": "^2.3.2",
407
- "function-bind": "^1.1.1",
408
- "functional-red-black-tree": "^1.0.1",
409
- "gensync": "^1.0.0-beta.2",
410
- "get-caller-file": "^2.0.5",
411
- "get-intrinsic": "^1.1.1",
412
- "get-package-type": "^0.1.0",
413
- "get-pkg-repo": "^4.2.1",
414
- "get-stdin": "^6.0.0",
415
- "get-stream": "^6.0.1",
416
- "get-symbol-description": "^1.0.0",
417
- "get-value": "^2.0.6",
418
- "git-raw-commits": "^2.0.11",
419
- "git-remote-origin-url": "^2.0.0",
420
- "git-semver-tags": "^4.1.1",
421
- "git-up": "^4.0.5",
422
- "git-url-parse": "^11.6.0",
423
- "gitconfiglocal": "^1.0.0",
424
- "glob": "^7.2.0",
425
- "glob-parent": "^6.0.2",
426
- "global-dirs": "^0.1.1",
427
- "globals": "^11.12.0",
428
- "globby": "^11.1.0",
429
- "got": "^11.8.3",
430
- "graceful-fs": "^4.2.9",
431
- "handlebars": "^4.7.7",
432
- "hard-rejection": "^2.1.0",
433
- "has": "^1.0.3",
434
- "has-bigints": "^1.0.1",
435
- "has-flag": "^3.0.0",
436
- "has-symbols": "^1.0.3",
437
- "has-tostringtag": "^1.0.0",
438
- "has-value": "^1.0.0",
439
- "has-values": "^1.0.0",
440
- "has-yarn": "^2.1.0",
441
- "hermes-engine": "^0.10.0",
442
- "hermes-parser": "^0.4.7",
443
- "hermes-profile-transformer": "^0.0.6",
444
- "hosted-git-info": "^4.1.0",
445
- "html-encoding-sniffer": "^2.0.1",
446
- "html-escaper": "^2.0.2",
447
- "http-cache-semantics": "^4.1.0",
448
- "http-errors": "^1.8.1",
449
- "http-proxy-agent": "^4.0.1",
450
- "http2-wrapper": "^1.0.3",
451
- "https-proxy-agent": "^5.0.0",
452
- "human-signals": "^2.1.0",
453
- "iconv-lite": "^0.4.24",
454
- "ieee754": "^1.2.1",
455
- "ignore": "^5.2.0",
456
- "image-size": "^0.6.3",
457
- "import-cwd": "^3.0.0",
458
- "import-fresh": "^3.3.0",
459
- "import-from": "^3.0.0",
460
- "import-lazy": "^2.1.0",
461
- "import-local": "^3.1.0",
462
- "imurmurhash": "^0.1.4",
463
- "indent-string": "^4.0.0",
464
- "inflight": "^1.0.6",
465
- "inherits": "^2.0.4",
466
- "ini": "^1.3.8",
467
- "inquirer": "^8.2.0",
468
- "internal-slot": "^1.0.3",
469
- "interpret": "^1.4.0",
470
- "invariant": "^2.2.4",
471
- "ip": "^1.1.5",
472
- "is-absolute": "^1.0.0",
473
- "is-accessor-descriptor": "^1.0.0",
474
- "is-arrayish": "^0.2.1",
475
- "is-bigint": "^1.0.4",
476
- "is-boolean-object": "^1.1.2",
477
- "is-buffer": "^1.1.6",
478
- "is-callable": "^1.2.4",
479
- "is-ci": "^3.0.1",
480
- "is-core-module": "^2.8.1",
481
- "is-data-descriptor": "^1.0.0",
482
- "is-date-object": "^1.0.5",
483
- "is-descriptor": "^1.0.2",
484
- "is-directory": "^0.3.1",
485
- "is-docker": "^2.2.1",
486
- "is-extendable": "^1.0.1",
487
- "is-extglob": "^2.1.1",
488
- "is-fullwidth-code-point": "^2.0.0",
489
- "is-generator-fn": "^2.1.0",
490
- "is-git-dirty": "^2.0.1",
491
- "is-git-repository": "^2.0.0",
492
- "is-glob": "^4.0.3",
493
- "is-installed-globally": "^0.4.0",
494
- "is-interactive": "^1.0.0",
495
- "is-negative-zero": "^2.0.2",
496
- "is-npm": "^5.0.0",
497
- "is-number": "^7.0.0",
498
- "is-number-object": "^1.0.6",
499
- "is-obj": "^2.0.0",
500
- "is-path-cwd": "^2.2.0",
501
- "is-path-inside": "^3.0.3",
502
- "is-plain-obj": "^1.1.0",
503
- "is-plain-object": "^2.0.4",
504
- "is-potential-custom-element-name": "^1.0.1",
505
- "is-regex": "^1.1.4",
506
- "is-relative": "^1.0.0",
507
- "is-shared-array-buffer": "^1.0.1",
508
- "is-ssh": "^1.3.3",
509
- "is-stream": "^2.0.1",
510
- "is-string": "^1.0.7",
511
- "is-symbol": "^1.0.4",
512
- "is-text-path": "^1.0.1",
513
- "is-typedarray": "^1.0.0",
514
- "is-unc-path": "^1.0.0",
515
- "is-unicode-supported": "^0.1.0",
516
- "is-weakref": "^1.0.2",
517
- "is-windows": "^1.0.2",
518
- "is-wsl": "^1.1.0",
519
- "is-yarn-global": "^0.3.0",
520
- "isarray": "^1.0.0",
521
- "isexe": "^2.0.0",
522
- "isobject": "^3.0.1",
523
- "istanbul-lib-coverage": "^3.2.0",
524
- "istanbul-lib-instrument": "^5.1.0",
525
- "istanbul-lib-report": "^3.0.0",
526
- "istanbul-lib-source-maps": "^4.0.1",
527
- "istanbul-reports": "^3.1.4",
528
- "jest-changed-files": "^27.5.1",
529
- "jest-circus": "^27.5.1",
530
- "jest-cli": "^27.5.1",
531
- "jest-config": "^27.5.1",
532
- "jest-diff": "^27.5.1",
533
- "jest-docblock": "^27.5.1",
534
- "jest-each": "^27.5.1",
535
- "jest-environment-jsdom": "^27.5.1",
536
- "jest-environment-node": "^27.5.1",
537
- "jest-get-type": "^27.5.1",
538
- "jest-haste-map": "^27.5.1",
539
- "jest-jasmine2": "^27.5.1",
540
- "jest-leak-detector": "^27.5.1",
541
- "jest-matcher-utils": "^27.5.1",
542
- "jest-message-util": "^27.5.1",
543
- "jest-mock": "^27.5.1",
544
- "jest-pnp-resolver": "^1.2.2",
545
- "jest-regex-util": "^27.5.1",
546
- "jest-resolve": "^27.5.1",
547
- "jest-resolve-dependencies": "^27.5.1",
548
- "jest-runner": "^27.5.1",
549
- "jest-runtime": "^27.5.1",
550
- "jest-serializer": "^27.5.1",
551
- "jest-snapshot": "^27.5.1",
552
- "jest-util": "^27.5.1",
553
- "jest-validate": "^27.5.1",
554
- "jest-watcher": "^27.5.1",
555
- "jest-worker": "^27.5.1",
556
- "jetifier": "^1.6.8",
557
- "joi": "^17.6.0",
558
- "js-tokens": "^4.0.0",
559
- "js-yaml": "^4.1.0",
560
- "jsc-android": "^250230.2.1",
561
- "jscodeshift": "^0.11.0",
562
- "jsdom": "^16.7.0",
563
- "jsesc": "^2.5.2",
564
- "json-buffer": "^3.0.1",
565
- "json-parse-better-errors": "^1.0.2",
566
- "json-parse-even-better-errors": "^2.3.1",
567
- "json-schema-traverse": "^0.4.1",
568
- "json-stable-stringify-without-jsonify": "^1.0.1",
569
- "json-stringify-safe": "^5.0.1",
570
- "json5": "^2.2.1",
571
- "jsonfile": "^6.1.0",
572
- "jsonify": "^0.0.0",
573
- "jsonparse": "^1.3.1",
574
- "jsx-ast-utils": "^3.2.1",
575
- "keyv": "^4.1.1",
576
- "kind-of": "^6.0.3",
577
- "klaw": "^1.3.1",
578
- "kleur": "^3.0.3",
579
- "latest-version": "^5.1.0",
580
- "leven": "^3.1.0",
581
- "levn": "^0.4.1",
582
- "lines-and-columns": "^1.2.4",
583
- "load-json-file": "^4.0.0",
584
- "locate-path": "^6.0.0",
585
- "lodash": "^4.17.21",
586
- "lodash.debounce": "^4.0.8",
587
- "lodash.ismatch": "^4.4.0",
588
- "lodash.merge": "^4.6.2",
589
- "lodash.throttle": "^4.1.1",
590
- "log-symbols": "^2.2.0",
591
- "logkitty": "^0.7.1",
592
- "loose-envify": "^1.4.0",
593
- "lowercase-keys": "^2.0.0",
594
- "lru-cache": "^6.0.0",
595
- "macos-release": "^2.5.0",
596
- "make-dir": "^3.1.0",
597
- "make-error": "^1.3.6",
598
- "makeerror": "^1.0.12",
599
- "map-cache": "^0.2.2",
600
- "map-obj": "^4.3.0",
601
- "map-visit": "^1.0.0",
602
- "meow": "^8.1.2",
603
- "merge-stream": "^2.0.0",
604
- "merge2": "^1.4.1",
605
- "metro": "^0.66.2",
606
- "metro-babel-register": "^0.66.2",
607
- "metro-babel-transformer": "^0.66.2",
608
- "metro-cache": "^0.66.2",
609
- "metro-cache-key": "^0.66.2",
610
- "metro-config": "^0.66.2",
611
- "metro-core": "^0.66.2",
612
- "metro-hermes-compiler": "^0.66.2",
613
- "metro-inspector-proxy": "^0.66.2",
614
- "metro-minify-uglify": "^0.66.2",
615
- "metro-react-native-babel-preset": "^0.66.2",
616
- "metro-react-native-babel-transformer": "^0.66.2",
617
- "metro-resolver": "^0.66.2",
618
- "metro-runtime": "^0.66.2",
619
- "metro-source-map": "^0.66.2",
620
- "metro-symbolicate": "^0.66.2",
621
- "metro-transform-plugins": "^0.66.2",
622
- "metro-transform-worker": "^0.66.2",
623
- "micromatch": "^4.0.4",
624
- "mime": "^2.6.0",
625
- "mime-db": "^1.52.0",
626
- "mime-types": "^2.1.35",
627
- "mimic-fn": "^2.1.0",
628
- "mimic-response": "^1.0.1",
629
- "min-indent": "^1.0.1",
630
- "minimatch": "^3.1.2",
631
- "minimist": "^1.2.6",
632
- "minimist-options": "^4.1.0",
633
- "mixin-deep": "^1.3.2",
634
- "mkdirp": "^0.5.5",
635
- "modify-values": "^1.0.1",
636
- "ms": "^2.1.2",
637
- "mute-stream": "^0.0.8",
638
- "nanomatch": "^1.2.13",
639
- "natural-compare": "^1.4.0",
640
- "negotiator": "^0.6.3",
641
- "neo-async": "^2.6.2",
642
- "new-github-release-url": "^1.0.0",
643
- "nice-try": "^1.0.5",
644
- "nocache": "^2.1.0",
645
- "node-dir": "^0.1.17",
646
- "node-fetch": "^2.6.7",
647
- "node-int64": "^0.4.0",
648
- "node-releases": "^2.0.2",
649
- "node-stream-zip": "^1.15.0",
650
- "normalize-package-data": "^3.0.3",
651
- "normalize-path": "^3.0.0",
652
- "normalize-url": "^6.1.0",
653
- "npm-run-path": "^4.0.1",
654
- "nullthrows": "^1.1.1",
655
- "nwsapi": "^2.2.0",
656
- "ob1": "^0.66.2",
657
- "object-assign": "^4.1.1",
658
- "object-copy": "^0.1.0",
659
- "object-inspect": "^1.12.0",
660
- "object-keys": "^1.1.1",
661
- "object-visit": "^1.0.1",
662
- "object.assign": "^4.1.2",
663
- "object.entries": "^1.1.5",
664
- "object.fromentries": "^2.0.5",
665
- "object.hasown": "^1.1.0",
666
- "object.pick": "^1.3.0",
667
- "object.values": "^1.1.5",
668
- "on-finished": "^2.3.0",
669
- "on-headers": "^1.0.2",
670
- "once": "^1.4.0",
671
- "onetime": "^5.1.2",
672
- "open": "^6.4.0",
673
- "optionator": "^0.9.1",
674
- "options": "^0.0.6",
675
- "ora": "^3.4.0",
676
- "os-name": "^4.0.1",
677
- "os-tmpdir": "^1.0.2",
678
- "p-cancelable": "^2.1.1",
679
- "p-finally": "^1.0.0",
680
- "p-limit": "^3.1.0",
681
- "p-locate": "^5.0.0",
682
- "p-map": "^4.0.0",
683
- "p-try": "^2.2.0",
684
- "package-json": "^6.5.0",
685
- "parent-module": "^1.0.1",
686
- "parse-json": "^5.2.0",
687
- "parse-path": "^5.0.0",
688
- "parse-url": "^6.0.0",
689
- "parse5": "^6.0.1",
690
- "parseurl": "^1.3.3",
691
- "pascalcase": "^0.1.1",
692
- "path-exists": "^4.0.0",
693
- "path-is-absolute": "^1.0.1",
694
- "path-key": "^3.1.1",
695
- "path-parse": "^1.0.7",
696
- "path-type": "^4.0.0",
697
- "picocolors": "^1.0.0",
698
- "picomatch": "^2.3.1",
699
- "pify": "^2.3.0",
700
- "pirates": "^4.0.5",
701
- "pkg-dir": "^4.2.0",
702
- "plist": "^3.0.4",
703
- "posix-character-classes": "^0.1.1",
704
- "prelude-ls": "^1.2.1",
705
- "prepend-file": "^2.0.1",
706
- "prepend-http": "^2.0.0",
707
- "prettier-linter-helpers": "^1.0.0",
708
- "pretty-format": "^27.5.1",
709
- "process-nextick-args": "^2.0.1",
710
- "promise": "^8.1.0",
711
- "prompts": "^2.4.2",
712
- "prop-types": "^15.8.1",
713
- "protocols": "^1.4.8",
714
- "psl": "^1.8.0",
715
- "pump": "^3.0.0",
716
- "punycode": "^2.1.1",
717
- "pupa": "^2.1.1",
718
- "q": "^1.5.1",
719
- "qs": "^6.10.3",
720
- "query-string": "^6.14.1",
721
- "queue-microtask": "^1.2.3",
722
- "quick-lru": "^4.0.1",
723
- "range-parser": "^1.2.1",
724
- "rc": "^1.2.8",
725
- "react-devtools-core": "^4.19.1",
726
- "react-is": "^17.0.2",
727
- "react-native-codegen": "^0.0.8",
728
- "react-refresh": "^0.4.3",
729
- "read-pkg": "^3.0.0",
730
- "read-pkg-up": "^3.0.0",
731
- "readable-stream": "^3.6.0",
732
- "readline": "^1.3.0",
733
- "recast": "^0.20.5",
734
- "rechoir": "^0.6.2",
735
- "redent": "^3.0.0",
736
- "regenerate": "^1.4.2",
737
- "regenerate-unicode-properties": "^10.0.1",
738
- "regenerator-runtime": "^0.13.9",
739
- "regenerator-transform": "^0.14.5",
740
- "regex-not": "^1.0.2",
741
- "regexp.prototype.flags": "^1.4.1",
742
- "regexpp": "^3.2.0",
743
- "regexpu-core": "^5.0.1",
744
- "registry-auth-token": "^4.2.1",
745
- "registry-url": "^5.1.0",
746
- "regjsgen": "^0.6.0",
747
- "regjsparser": "^0.8.4",
748
- "remove-trailing-separator": "^1.1.0",
749
- "repeat-element": "^1.1.4",
750
- "repeat-string": "^1.6.1",
751
- "require-directory": "^2.1.1",
752
- "require-main-filename": "^2.0.0",
753
- "resolve": "^1.22.0",
754
- "resolve-alpn": "^1.2.1",
755
- "resolve-cwd": "^3.0.0",
756
- "resolve-from": "^5.0.0",
757
- "resolve-global": "^1.0.0",
758
- "resolve-url": "^0.2.1",
759
- "resolve.exports": "^1.1.0",
760
- "responselike": "^2.0.0",
761
- "restore-cursor": "^2.0.0",
762
- "ret": "^0.1.15",
763
- "retry": "^0.13.1",
764
- "reusify": "^1.0.4",
765
- "rimraf": "^3.0.2",
766
- "rsvp": "^4.8.5",
767
- "run-async": "^2.4.1",
768
- "run-parallel": "^1.2.0",
769
- "rxjs": "^7.5.5",
770
- "safe-buffer": "^5.1.2",
771
- "safe-regex": "^1.1.0",
772
- "safer-buffer": "^2.1.2",
773
- "sane": "^4.1.0",
774
- "sax": "^1.2.4",
775
- "saxes": "^5.0.1",
776
- "scheduler": "^0.20.2",
777
- "semver": "^7.3.5",
778
- "semver-diff": "^3.1.1",
779
- "send": "^0.17.2",
780
- "serialize-error": "^2.1.0",
781
- "serve-static": "^1.14.2",
782
- "set-blocking": "^2.0.0",
783
- "set-value": "^2.0.1",
784
- "setprototypeof": "^1.2.0",
785
- "shallow-clone": "^3.0.1",
786
- "shebang-command": "^2.0.0",
787
- "shebang-regex": "^3.0.0",
788
- "shell-quote": "^1.6.1",
789
- "shelljs": "^0.8.5",
790
- "side-channel": "^1.0.4",
791
- "signal-exit": "^3.0.7",
792
- "simple-plist": "^1.3.0",
793
- "sisteransi": "^1.0.5",
794
- "slash": "^3.0.0",
795
- "slice-ansi": "^2.1.0",
796
- "snapdragon": "^0.8.2",
797
- "snapdragon-node": "^2.1.1",
798
- "snapdragon-util": "^3.0.1",
799
- "source-map": "^0.5.7",
800
- "source-map-resolve": "^0.5.3",
801
- "source-map-support": "^0.5.21",
802
- "source-map-url": "^0.4.1",
803
- "spdx-correct": "^3.1.1",
804
- "spdx-exceptions": "^2.3.0",
805
- "spdx-expression-parse": "^3.0.1",
806
- "spdx-license-ids": "^3.0.11",
807
- "split": "^1.0.1",
808
- "split-on-first": "^1.1.0",
809
- "split-string": "^3.1.0",
810
- "split2": "^3.2.2",
811
- "sprintf-js": "^1.0.3",
812
- "stack-utils": "^2.0.5",
813
- "stackframe": "^1.2.1",
814
- "stacktrace-parser": "^0.1.10",
815
- "static-extend": "^0.1.2",
816
- "statuses": "^1.5.0",
817
- "stream-buffers": "^2.2.0",
818
- "strict-uri-encode": "^2.0.0",
819
- "string-length": "^4.0.2",
820
- "string-width": "^4.2.3",
821
- "string.prototype.matchall": "^4.0.7",
822
- "string.prototype.trimend": "^1.0.4",
823
- "string.prototype.trimstart": "^1.0.4",
824
- "string_decoder": "^1.3.0",
825
- "strip-ansi": "^6.0.1",
826
- "strip-bom": "^4.0.0",
827
- "strip-eof": "^1.0.0",
828
- "strip-final-newline": "^2.0.0",
829
- "strip-indent": "^3.0.0",
830
- "strip-json-comments": "^3.1.1",
831
- "sudo-prompt": "^9.2.1",
832
- "supports-color": "^5.5.0",
833
- "supports-hyperlinks": "^2.2.0",
834
- "supports-preserve-symlinks-flag": "^1.0.0",
835
- "symbol-tree": "^3.2.4",
836
- "temp": "^0.8.3",
837
- "temp-dir": "^1.0.0",
838
- "temp-write": "^4.0.0",
839
- "terminal-link": "^2.1.1",
840
- "test-exclude": "^6.0.0",
841
- "text-extensions": "^1.9.0",
842
- "text-table": "^0.2.0",
843
- "throat": "^6.0.1",
844
- "through": "^2.3.8",
845
- "through2": "^4.0.2",
846
- "tmp": "^0.0.33",
847
- "tmpl": "^1.0.5",
848
- "to-fast-properties": "^2.0.0",
849
- "to-object-path": "^0.3.0",
850
- "to-readable-stream": "^1.0.0",
851
- "to-regex": "^3.0.2",
852
- "to-regex-range": "^5.0.1",
853
- "toidentifier": "^1.0.1",
854
- "tough-cookie": "^4.0.0",
855
- "tr46": "^2.1.0",
856
- "trim-newlines": "^3.0.1",
857
- "ts-node": "^10.7.0",
858
- "tslib": "^2.3.1",
859
- "tsutils": "^3.21.0",
860
- "type-check": "^0.4.0",
861
- "type-detect": "^4.0.8",
862
- "type-fest": "^0.21.3",
863
- "typedarray": "^0.0.6",
864
- "typedarray-to-buffer": "^3.1.5",
865
- "uglify-es": "^3.3.9",
866
- "uglify-js": "^3.15.3",
867
- "ultron": "^1.0.2",
868
- "unbox-primitive": "^1.0.1",
869
- "unc-path-regex": "^0.1.2",
870
- "unicode-canonical-property-names-ecmascript": "^2.0.0",
871
- "unicode-match-property-ecmascript": "^2.0.0",
872
- "unicode-match-property-value-ecmascript": "^2.0.0",
873
- "unicode-property-aliases-ecmascript": "^2.0.0",
874
- "union-value": "^1.0.1",
875
- "unique-string": "^2.0.0",
876
- "universal-user-agent": "^6.0.0",
877
- "universalify": "^2.0.0",
878
- "unpipe": "^1.0.0",
879
- "unset-value": "^1.0.0",
880
- "update-notifier": "^5.1.0",
881
- "uri-js": "^4.4.1",
882
- "urix": "^0.1.0",
883
- "url-join": "^4.0.1",
884
- "url-parse-lax": "^3.0.0",
885
- "use": "^3.1.1",
886
- "use-subscription": "^1.5.1",
887
- "util-deprecate": "^1.0.2",
888
- "utils-merge": "^1.0.1",
889
- "uuid": "^8.3.2",
890
- "v8-compile-cache": "^2.3.0",
891
- "v8-compile-cache-lib": "^3.0.0",
892
- "v8-to-istanbul": "^8.1.1",
893
- "validate-npm-package-license": "^3.0.4",
894
- "vary": "^1.1.2",
895
- "vlq": "^1.0.1",
896
- "w3c-hr-time": "^1.0.2",
897
- "w3c-xmlserializer": "^2.0.0",
898
- "walker": "^1.0.8",
899
- "wcwidth": "^1.0.1",
900
- "webidl-conversions": "^6.1.0",
901
- "whatwg-encoding": "^1.0.5",
902
- "whatwg-fetch": "^3.6.2",
903
- "whatwg-mimetype": "^2.3.0",
904
- "whatwg-url": "^8.7.0",
905
- "which": "^2.0.2",
906
- "which-boxed-primitive": "^1.0.2",
907
- "which-module": "^2.0.0",
908
- "widest-line": "^3.1.0",
909
- "wildcard-match": "^5.1.2",
910
- "windows-release": "^4.0.0",
911
- "word-wrap": "^1.2.3",
912
- "wordwrap": "^1.0.0",
913
- "wrap-ansi": "^7.0.0",
914
- "wrappy": "^1.0.2",
915
- "write-file-atomic": "^3.0.3",
916
- "ws": "^7.5.7",
917
- "xcode": "^2.1.0",
918
- "xdg-basedir": "^4.0.0",
919
- "xml-name-validator": "^3.0.0",
920
- "xmlbuilder": "^9.0.7",
921
- "xmlchars": "^2.2.0",
922
- "xmldoc": "^1.1.2",
923
- "xtend": "^4.0.2",
924
- "y18n": "^5.0.8",
925
- "yallist": "^4.0.0",
926
- "yaml": "^1.10.2",
927
- "yargs": "^17.4.0",
928
- "yargs-parser": "^20.2.9",
929
- "yn": "^3.1.1",
930
- "yocto-queue": "^0.1.0"
931
53
  }
932
- }
54
+ }
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
10
10
  s.license = package["license"]
11
11
  s.authors = package["author"]
12
12
 
13
- s.platforms = { :ios => "10.0" }
13
+ s.platforms = { :ios => "12.0" }
14
14
  s.source = { :git => "https://github.com/ScreebApp/sdk-reactnative.git", :tag => "#{s.version}" }
15
15
 
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.initSdk = initSdk;
7
- exports.setIdentity = setIdentity;
8
- exports.setProperties = setProperties;
9
- exports.trackEvent = trackEvent;
10
- exports.trackScreen = trackScreen;
11
-
12
- var _reactNative = require("react-native");
13
-
14
- const LINKING_ERROR = `The package '@screeb/react-native' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
15
- ios: "- You have run 'pod install'\n",
16
- default: ''
17
- }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
18
- const ScreebModule = _reactNative.NativeModules.ScreebModule ? _reactNative.NativeModules.ScreebModule : new Proxy({}, {
19
- get() {
20
- throw new Error(LINKING_ERROR);
21
- }
22
-
23
- });
24
-
25
- function initSdk(androidChannelId, iosChannelId, userId, properties) {
26
- if (_reactNative.Platform.OS === 'ios') {
27
- return ScreebModule.initSdk(iosChannelId, userId, properties);
28
- } else {
29
- return ScreebModule.initSdk(androidChannelId, userId, properties);
30
- }
31
- }
32
-
33
- function setIdentity(userId, properties) {
34
- return ScreebModule.setIdentity(userId, properties);
35
- }
36
-
37
- function trackEvent(name, properties) {
38
- return ScreebModule.trackEvent(name, properties);
39
- }
40
-
41
- function trackScreen(name, properties) {
42
- return ScreebModule.trackScreen(name, properties);
43
- }
44
-
45
- function setProperties(properties) {
46
- return ScreebModule.setProperties(properties);
47
- }
48
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.tsx"],"names":["LINKING_ERROR","Platform","select","ios","default","ScreebModule","NativeModules","Proxy","get","Error","initSdk","androidChannelId","iosChannelId","userId","properties","OS","setIdentity","trackEvent","name","trackScreen","setProperties"],"mappings":";;;;;;;;;;;AAAA;;AAEA,MAAMA,aAAa,GAChB,+EAAD,GACAC,sBAASC,MAAT,CAAgB;AAAEC,EAAAA,GAAG,EAAE,gCAAP;AAAyCC,EAAAA,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,YAAY,GAAGC,2BAAcD,YAAd,GACjBC,2BAAcD,YADG,GAEjB,IAAIE,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUT,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;;AAWO,SAASU,OAAT,CACHC,gBADG,EAEHC,YAFG,EAGHC,MAHG,EAIHC,UAJG,EAI4B;AACjC,MAAIb,sBAASc,EAAT,KAAgB,KAApB,EAA2B;AACzB,WAAOV,YAAY,CAACK,OAAb,CAAqBE,YAArB,EAAmCC,MAAnC,EAA2CC,UAA3C,CAAP;AACD,GAFD,MAEO;AACL,WAAOT,YAAY,CAACK,OAAb,CAAqBC,gBAArB,EAAuCE,MAAvC,EAA+CC,UAA/C,CAAP;AACD;AACF;;AACM,SAASE,WAAT,CAAqBH,MAArB,EAAqCC,UAArC,EAAoE;AACzE,SAAOT,YAAY,CAACW,WAAb,CAAyBH,MAAzB,EAAiCC,UAAjC,CAAP;AACD;;AACM,SAASG,UAAT,CAAoBC,IAApB,EAAkCJ,UAAlC,EAAiE;AACtE,SAAOT,YAAY,CAACY,UAAb,CAAwBC,IAAxB,EAA8BJ,UAA9B,CAAP;AACD;;AACM,SAASK,WAAT,CAAqBD,IAArB,EAAmCJ,UAAnC,EAAkE;AACvE,SAAOT,YAAY,CAACc,WAAb,CAAyBD,IAAzB,EAA+BJ,UAA/B,CAAP;AACD;;AACM,SAASM,aAAT,CAAuBN,UAAvB,EAAsD;AAC3D,SAAOT,YAAY,CAACe,aAAb,CAA2BN,UAA3B,CAAP;AACD","sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package '@screeb/react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst ScreebModule = NativeModules.ScreebModule\n ? NativeModules.ScreebModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function initSdk(\n androidChannelId: string,\n iosChannelId: string,\n userId?: string,\n properties?: Map<string, any>) {\n if (Platform.OS === 'ios') {\n return ScreebModule.initSdk(iosChannelId, userId, properties);\n } else {\n return ScreebModule.initSdk(androidChannelId, userId, properties);\n }\n}\nexport function setIdentity(userId: string, properties?: Map<string, any>) {\n return ScreebModule.setIdentity(userId, properties);\n}\nexport function trackEvent(name: string, properties?: Map<string, any>) {\n return ScreebModule.trackEvent(name, properties);\n}\nexport function trackScreen(name: string, properties?: Map<string, any>) {\n return ScreebModule.trackScreen(name, properties);\n}\nexport function setProperties(properties?: Map<string, any>) {\n return ScreebModule.setProperties(properties);\n}\n"]}
@@ -1,31 +0,0 @@
1
- import { NativeModules, Platform } from 'react-native';
2
- const LINKING_ERROR = `The package '@screeb/react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
3
- ios: "- You have run 'pod install'\n",
4
- default: ''
5
- }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
6
- const ScreebModule = NativeModules.ScreebModule ? NativeModules.ScreebModule : new Proxy({}, {
7
- get() {
8
- throw new Error(LINKING_ERROR);
9
- }
10
-
11
- });
12
- export function initSdk(androidChannelId, iosChannelId, userId, properties) {
13
- if (Platform.OS === 'ios') {
14
- return ScreebModule.initSdk(iosChannelId, userId, properties);
15
- } else {
16
- return ScreebModule.initSdk(androidChannelId, userId, properties);
17
- }
18
- }
19
- export function setIdentity(userId, properties) {
20
- return ScreebModule.setIdentity(userId, properties);
21
- }
22
- export function trackEvent(name, properties) {
23
- return ScreebModule.trackEvent(name, properties);
24
- }
25
- export function trackScreen(name, properties) {
26
- return ScreebModule.trackScreen(name, properties);
27
- }
28
- export function setProperties(properties) {
29
- return ScreebModule.setProperties(properties);
30
- }
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.tsx"],"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","ScreebModule","Proxy","get","Error","initSdk","androidChannelId","iosChannelId","userId","properties","OS","setIdentity","trackEvent","name","trackScreen","setProperties"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAEA,MAAMC,aAAa,GAChB,+EAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;AAAEC,EAAAA,GAAG,EAAE,gCAAP;AAAyCC,EAAAA,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,YAAY,GAAGN,aAAa,CAACM,YAAd,GACjBN,aAAa,CAACM,YADG,GAEjB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUP,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAWA,OAAO,SAASQ,OAAT,CACHC,gBADG,EAEHC,YAFG,EAGHC,MAHG,EAIHC,UAJG,EAI4B;AACjC,MAAIb,QAAQ,CAACc,EAAT,KAAgB,KAApB,EAA2B;AACzB,WAAOT,YAAY,CAACI,OAAb,CAAqBE,YAArB,EAAmCC,MAAnC,EAA2CC,UAA3C,CAAP;AACD,GAFD,MAEO;AACL,WAAOR,YAAY,CAACI,OAAb,CAAqBC,gBAArB,EAAuCE,MAAvC,EAA+CC,UAA/C,CAAP;AACD;AACF;AACD,OAAO,SAASE,WAAT,CAAqBH,MAArB,EAAqCC,UAArC,EAAoE;AACzE,SAAOR,YAAY,CAACU,WAAb,CAAyBH,MAAzB,EAAiCC,UAAjC,CAAP;AACD;AACD,OAAO,SAASG,UAAT,CAAoBC,IAApB,EAAkCJ,UAAlC,EAAiE;AACtE,SAAOR,YAAY,CAACW,UAAb,CAAwBC,IAAxB,EAA8BJ,UAA9B,CAAP;AACD;AACD,OAAO,SAASK,WAAT,CAAqBD,IAArB,EAAmCJ,UAAnC,EAAkE;AACvE,SAAOR,YAAY,CAACa,WAAb,CAAyBD,IAAzB,EAA+BJ,UAA/B,CAAP;AACD;AACD,OAAO,SAASM,aAAT,CAAuBN,UAAvB,EAAsD;AAC3D,SAAOR,YAAY,CAACc,aAAb,CAA2BN,UAA3B,CAAP;AACD","sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package '@screeb/react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst ScreebModule = NativeModules.ScreebModule\n ? NativeModules.ScreebModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function initSdk(\n androidChannelId: string,\n iosChannelId: string,\n userId?: string,\n properties?: Map<string, any>) {\n if (Platform.OS === 'ios') {\n return ScreebModule.initSdk(iosChannelId, userId, properties);\n } else {\n return ScreebModule.initSdk(androidChannelId, userId, properties);\n }\n}\nexport function setIdentity(userId: string, properties?: Map<string, any>) {\n return ScreebModule.setIdentity(userId, properties);\n}\nexport function trackEvent(name: string, properties?: Map<string, any>) {\n return ScreebModule.trackEvent(name, properties);\n}\nexport function trackScreen(name: string, properties?: Map<string, any>) {\n return ScreebModule.trackScreen(name, properties);\n}\nexport function setProperties(properties?: Map<string, any>) {\n return ScreebModule.setProperties(properties);\n}\n"]}
@@ -1,5 +0,0 @@
1
- export declare function initSdk(androidChannelId: string, iosChannelId: string, userId?: string, properties?: Map<string, any>): any;
2
- export declare function setIdentity(userId: string, properties?: Map<string, any>): any;
3
- export declare function trackEvent(name: string, properties?: Map<string, any>): any;
4
- export declare function trackScreen(name: string, properties?: Map<string, any>): any;
5
- export declare function setProperties(properties?: Map<string, any>): any;