Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f60fe530d6
|
@ -76,6 +76,9 @@
|
||||||
# Ignore dist folder
|
# Ignore dist folder
|
||||||
.*/dist/.*
|
.*/dist/.*
|
||||||
|
|
||||||
|
# Ignore tests project
|
||||||
|
.*/tests/.*
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
node_modules/fbjs/lib
|
node_modules/fbjs/lib
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
*/
|
*/
|
||||||
import ModuleBase from './../../utils/ModuleBase';
|
import ModuleBase from './../../utils/ModuleBase';
|
||||||
|
|
||||||
|
import type FirebaseApp from '../core/firebase-app';
|
||||||
|
|
||||||
const AlphaNumericUnderscore = /^[a-zA-Z0-9_]+$/;
|
const AlphaNumericUnderscore = /^[a-zA-Z0-9_]+$/;
|
||||||
|
|
||||||
const ReservedEventNames = [
|
const ReservedEventNames = [
|
||||||
|
@ -26,7 +28,7 @@ export default class Analytics extends ModuleBase {
|
||||||
static _NAMESPACE = 'analytics';
|
static _NAMESPACE = 'analytics';
|
||||||
static _NATIVE_MODULE = 'RNFirebaseAnalytics';
|
static _NATIVE_MODULE = 'RNFirebaseAnalytics';
|
||||||
|
|
||||||
constructor(firebaseApp: Object, options: Object = {}) {
|
constructor(firebaseApp: FirebaseApp, options: Object = {}) {
|
||||||
super(firebaseApp, options);
|
super(firebaseApp, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +57,7 @@ export default class Analytics extends ModuleBase {
|
||||||
// types are supported. String parameter values can be up to 36 characters long. The "firebase_"
|
// types are supported. String parameter values can be up to 36 characters long. The "firebase_"
|
||||||
// prefix is reserved and should not be used for parameter names.
|
// prefix is reserved and should not be used for parameter names.
|
||||||
|
|
||||||
return this._native.logEvent(name, params);
|
this._native.logEvent(name, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +65,7 @@ export default class Analytics extends ModuleBase {
|
||||||
* @param enabled
|
* @param enabled
|
||||||
*/
|
*/
|
||||||
setAnalyticsCollectionEnabled(enabled: boolean): void {
|
setAnalyticsCollectionEnabled(enabled: boolean): void {
|
||||||
return this._native.setAnalyticsCollectionEnabled(enabled);
|
this._native.setAnalyticsCollectionEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,7 +74,7 @@ export default class Analytics extends ModuleBase {
|
||||||
* @param screenClassOverride
|
* @param screenClassOverride
|
||||||
*/
|
*/
|
||||||
setCurrentScreen(screenName: string, screenClassOverride: string): void {
|
setCurrentScreen(screenName: string, screenClassOverride: string): void {
|
||||||
return this._native.setCurrentScreen(screenName, screenClassOverride);
|
this._native.setCurrentScreen(screenName, screenClassOverride);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +82,7 @@ export default class Analytics extends ModuleBase {
|
||||||
* @param milliseconds
|
* @param milliseconds
|
||||||
*/
|
*/
|
||||||
setMinimumSessionDuration(milliseconds: number = 10000): void {
|
setMinimumSessionDuration(milliseconds: number = 10000): void {
|
||||||
return this._native.setMinimumSessionDuration(milliseconds);
|
this._native.setMinimumSessionDuration(milliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,7 +90,7 @@ export default class Analytics extends ModuleBase {
|
||||||
* @param milliseconds
|
* @param milliseconds
|
||||||
*/
|
*/
|
||||||
setSessionTimeoutDuration(milliseconds: number = 1800000): void {
|
setSessionTimeoutDuration(milliseconds: number = 1800000): void {
|
||||||
return this._native.setSessionTimeoutDuration(milliseconds);
|
this._native.setSessionTimeoutDuration(milliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,7 +98,7 @@ export default class Analytics extends ModuleBase {
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
setUserId(id: string): void {
|
setUserId(id: string): void {
|
||||||
return this._native.setUserId(id);
|
this._native.setUserId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,7 +107,7 @@ export default class Analytics extends ModuleBase {
|
||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
setUserProperty(name: string, value: string): void {
|
setUserProperty(name: string, value: string): void {
|
||||||
return this._native.setUserProperty(name, value);
|
this._native.setUserProperty(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue