Merge remote-tracking branch 'origin/master'

This commit is contained in:
Salakar 2018-04-03 05:20:29 +01:00
commit 90d35ef6e9
10 changed files with 13079 additions and 839 deletions

View File

@ -25,6 +25,9 @@
# Ignore tests project # Ignore tests project
.*/tests/.* .*/tests/.*
# Ignore bridge project
.*/bridge/.*
[include] [include]
[libs] [libs]
@ -56,7 +59,5 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true
[version] [version]
^0.61.0 ^0.65.0

View File

@ -617,6 +617,9 @@ public class RNFirebaseNotificationManager {
String lightColor = channelMap.getString("lightColor"); String lightColor = channelMap.getString("lightColor");
channel.setLightColor(Color.parseColor(lightColor)); channel.setLightColor(Color.parseColor(lightColor));
} }
if (channelMap.hasKey("lightsEnabled")) {
channel.enableLights(channelMap.getBoolean("lightsEnabled"));
}
if (channelMap.hasKey("lockScreenVisibility")) { if (channelMap.hasKey("lockScreenVisibility")) {
channel.setLockscreenVisibility(channelMap.getInt("lockScreenVisibility")); channel.setLockscreenVisibility(channelMap.getInt("lockScreenVisibility"));
} }
@ -627,6 +630,9 @@ public class RNFirebaseNotificationManager {
Uri sound = getSound(channelMap.getString("sound")); Uri sound = getSound(channelMap.getString("sound"));
channel.setSound(sound, null); channel.setSound(sound, null);
} }
if (channelMap.hasKey("vibrationEnabled")) {
channel.enableVibration(channelMap.getBoolean("vibrationEnabled"));
}
if (channelMap.hasKey("vibrationPattern")) { if (channelMap.hasKey("vibrationPattern")) {
ReadableArray vibrationArray = channelMap.getArray("vibrationPattern"); ReadableArray vibrationArray = channelMap.getArray("vibrationPattern");
long[] vibration = new long[]{}; long[] vibration = new long[]{};

View File

@ -12,10 +12,12 @@ type NativeAndroidChannel = {|
group?: string, group?: string,
importance: ImportanceType, importance: ImportanceType,
lightColor?: string, lightColor?: string,
lightsEnabled?: boolean,
lockScreenVisibility?: VisibilityType, lockScreenVisibility?: VisibilityType,
name: string, name: string,
showBadge?: boolean, showBadge?: boolean,
sound?: string, sound?: string,
vibrationEnabled?: boolean,
vibrationPattern?: number[], vibrationPattern?: number[],
|}; |};
@ -26,10 +28,12 @@ export default class AndroidChannel {
_group: string | void; _group: string | void;
_importance: ImportanceType; _importance: ImportanceType;
_lightColor: string | void; _lightColor: string | void;
_lightsEnabled: boolean | void;
_lockScreenVisibility: VisibilityType; _lockScreenVisibility: VisibilityType;
_name: string; _name: string;
_showBadge: boolean | void; _showBadge: boolean | void;
_sound: string | void; _sound: string | void;
_vibrationEnabled: boolean | void;
_vibrationPattern: number[] | void; _vibrationPattern: number[] | void;
constructor(channelId: string, name: string, importance: ImportanceType) { constructor(channelId: string, name: string, importance: ImportanceType) {
@ -65,6 +69,10 @@ export default class AndroidChannel {
return this._lightColor; return this._lightColor;
} }
get lightsEnabled(): ?boolean {
return this._lightsEnabled;
}
get lockScreenVisibility(): ?VisibilityType { get lockScreenVisibility(): ?VisibilityType {
return this._lockScreenVisibility; return this._lockScreenVisibility;
} }
@ -81,10 +89,34 @@ export default class AndroidChannel {
return this._sound; return this._sound;
} }
get vibrationEnabled(): ?boolean {
return this._vibrationEnabled;
}
get vibrationPattern(): ?(number[]) { get vibrationPattern(): ?(number[]) {
return this._vibrationPattern; return this._vibrationPattern;
} }
/**
*
* @param lightsEnabled
* @returns {AndroidChannel}
*/
enableLights(lightsEnabled: boolean): AndroidChannel {
this._lightsEnabled = lightsEnabled;
return this;
}
/**
*
* @param vibrationEnabled
* @returns {AndroidChannel}
*/
enableVibration(vibrationEnabled: boolean): AndroidChannel {
this._vibrationEnabled = vibrationEnabled;
return this;
}
/** /**
* *
* @param bypassDnd * @param bypassDnd
@ -188,10 +220,12 @@ export default class AndroidChannel {
group: this._group, group: this._group,
importance: this._importance, importance: this._importance,
lightColor: this._lightColor, lightColor: this._lightColor,
lightsEnabled: this._lightsEnabled,
lockScreenVisibility: this._lockScreenVisibility, lockScreenVisibility: this._lockScreenVisibility,
name: this._name, name: this._name,
showBadge: this._showBadge, showBadge: this._showBadge,
sound: this._sound, sound: this._sound,
vibrationEnabled: this._vibrationEnabled,
vibrationPattern: this._vibrationPattern, vibrationPattern: this._vibrationPattern,
}; };
} }

10882
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -32,46 +32,10 @@
"jest": { "jest": {
"preset": "jest-react-native", "preset": "jest-react-native",
"setupFiles": [], "setupFiles": [],
"unmockedModulePathPatterns": [ "unmockedModulePathPatterns": ["./node_modules/react", "./node_modules/react-native", "./node_modues/react-native-mock", "./node_modules/react-addons-test-utils"]
"./node_modules/react",
"./node_modules/react-native",
"./node_modues/react-native-mock",
"./node_modules/react-addons-test-utils"
]
}, },
"license": "APACHE-2.0", "license": "APACHE-2.0",
"keywords": [ "keywords": ["react", "admob", "auth", "config", "digits", "fabric", "phone-auth", "sms", "firestore", "cloud-firestore", "datastore", "remote-config", "transactions", "react-native", "react-native-firebase", "firebase", "fcm", "apn", "gcm", "analytics", "messaging", "database", "android", "ios", "crash", "firestack", "performance", "firestore", "dynamic-links", "crashlytics"],
"react",
"admob",
"auth",
"config",
"digits",
"fabric",
"phone-auth",
"sms",
"firestore",
"cloud-firestore",
"datastore",
"remote-config",
"transactions",
"react-native",
"react-native-firebase",
"firebase",
"fcm",
"apn",
"gcm",
"analytics",
"messaging",
"database",
"android",
"ios",
"crash",
"firestack",
"performance",
"firestore",
"dynamic-links",
"crashlytics"
],
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",
"react-native": ">= 0.48.0", "react-native": ">= 0.48.0",
@ -93,15 +57,15 @@
"eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^2.6.0", "eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.7.0", "eslint-plugin-react": "^7.7.0",
"flow-bin": "^0.61.0", "flow-bin": "^0.65.0",
"flow-copy-source": "^1.3.0", "flow-copy-source": "^1.3.0",
"genversion": "^2.0.1", "genversion": "^2.0.1",
"husky": "^0.14.3", "husky": "^0.14.3",
"lint-staged": "^6.1.1", "lint-staged": "^6.1.1",
"prettier": "1.10.2", "prettier": "1.10.2",
"react": "^16.2.0", "react": "^16.3.0-alpha.1",
"react-dom": "^16.2.0", "react-dom": "^16.3.0-alpha.1",
"react-native": "^0.52.3", "react-native": "^0.54.4",
"rimraf": "^2.6.2", "rimraf": "^2.6.2",
"shelljs": "^0.7.8", "shelljs": "^0.7.8",
"typescript": "^2.7.2", "typescript": "^2.7.2",
@ -127,17 +91,8 @@
"url": "https://opencollective.com/react-native-firebase" "url": "https://opencollective.com/react-native-firebase"
}, },
"lint-staged": { "lint-staged": {
"lib/**/*.js": [ "lib/**/*.js": ["eslint --fix", "git add"],
"eslint --fix", "tests/{src|lib}/**/*.js": ["eslint --fix", "git add"],
"git add" "*.{json,md,scss}": ["prettier --write", "git add"]
],
"tests/{src|lib}/**/*.js": [
"eslint --fix",
"git add"
],
"*.{json,md,scss}": [
"prettier --write",
"git add"
]
} }
} }

View File

@ -50,7 +50,5 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true
[version] [version]
^0.61.0 ^0.65.0

View File

@ -13,7 +13,7 @@ target 'ReactNativeFirebaseDemo' do
# Pods for ReactNativeFirebaseDemo # Pods for ReactNativeFirebaseDemo
pod 'React', :path => '../node_modules/react-native', :subspecs => [ pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core', 'Core',
'BatchedBridge', 'CxxBridge',
'RCTText', 'RCTText',
'RCTNetwork', 'RCTNetwork',
'RCTWebSocket', 'RCTWebSocket',

View File

@ -1,4 +1,5 @@
PODS: PODS:
- boost-for-react-native (1.63.0)
- BoringSSL (10.0): - BoringSSL (10.0):
- BoringSSL/Implementation (= 10.0) - BoringSSL/Implementation (= 10.0)
- BoringSSL/Interface (= 10.0) - BoringSSL/Interface (= 10.0)
@ -7,6 +8,7 @@ PODS:
- BoringSSL/Interface (10.0) - BoringSSL/Interface (10.0)
- Crashlytics (3.10.1): - Crashlytics (3.10.1):
- Fabric (~> 1.7.5) - Fabric (~> 1.7.5)
- DoubleConversion (1.1.5)
- Fabric (1.7.6) - Fabric (1.7.6)
- Firebase/AdMob (4.11.0): - Firebase/AdMob (4.11.0):
- Firebase/Core - Firebase/Core
@ -118,11 +120,16 @@ PODS:
- FirebaseCore (~> 4.0) - FirebaseCore (~> 4.0)
- GTMSessionFetcher/Core (~> 1.1) - GTMSessionFetcher/Core (~> 1.1)
- FirebaseSwizzlingUtilities (1.0.0) - FirebaseSwizzlingUtilities (1.0.0)
- Folly (2016.09.26.00):
- boost-for-react-native
- DoubleConversion
- glog
- glog (0.3.4)
- Google-Mobile-Ads-SDK (7.29.0) - Google-Mobile-Ads-SDK (7.29.0)
- GoogleAPIClientForREST (1.3.2): - GoogleAPIClientForREST (1.3.4):
- GoogleAPIClientForREST/Core (= 1.3.2) - GoogleAPIClientForREST/Core (= 1.3.4)
- GTMSessionFetcher (>= 1.1.7) - GTMSessionFetcher (>= 1.1.7)
- GoogleAPIClientForREST/Core (1.3.2): - GoogleAPIClientForREST/Core (1.3.4):
- GTMSessionFetcher (>= 1.1.7) - GTMSessionFetcher (>= 1.1.7)
- GoogleSignIn (4.1.2): - GoogleSignIn (4.1.2):
- GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1) - GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
@ -183,32 +190,38 @@ PODS:
- nanopb/decode (0.3.8) - nanopb/decode (0.3.8)
- nanopb/encode (0.3.8) - nanopb/encode (0.3.8)
- Protobuf (3.5.0) - Protobuf (3.5.0)
- React (0.52.3): - React (0.54.4):
- React/Core (= 0.52.3) - React/Core (= 0.54.4)
- React/BatchedBridge (0.52.3): - React/Core (0.54.4):
- yoga (= 0.54.4.React)
- React/CxxBridge (0.54.4):
- Folly (= 2016.09.26.00)
- React/Core - React/Core
- React/cxxreact_legacy - React/cxxreact
- React/Core (0.52.3): - React/cxxreact (0.54.4):
- yoga (= 0.52.3.React) - boost-for-react-native (= 1.63.0)
- React/cxxreact_legacy (0.52.3): - Folly (= 2016.09.26.00)
- React/jschelpers_legacy - React/jschelpers
- React/jsinspector_legacy - React/jsinspector
- React/fishhook (0.52.3) - React/fishhook (0.54.4)
- React/jschelpers_legacy (0.52.3) - React/jschelpers (0.54.4):
- React/jsinspector_legacy (0.52.3) - Folly (= 2016.09.26.00)
- React/RCTBlob (0.52.3): - React/PrivateDatabase
- React/jsinspector (0.54.4)
- React/PrivateDatabase (0.54.4)
- React/RCTBlob (0.54.4):
- React/Core - React/Core
- React/RCTNetwork (0.52.3): - React/RCTNetwork (0.54.4):
- React/Core - React/Core
- React/RCTText (0.52.3): - React/RCTText (0.54.4):
- React/Core - React/Core
- React/RCTWebSocket (0.52.3): - React/RCTWebSocket (0.54.4):
- React/Core - React/Core
- React/fishhook - React/fishhook
- React/RCTBlob - React/RCTBlob
- RNFirebase (4.0.0-rc.2): - RNFirebase (4.0.0-rc.3):
- React - React
- yoga (0.52.3.React) - yoga (0.54.4.React)
DEPENDENCIES: DEPENDENCIES:
- Crashlytics (~> 3.10.1) - Crashlytics (~> 3.10.1)
@ -225,8 +238,8 @@ DEPENDENCIES:
- Firebase/Performance - Firebase/Performance
- Firebase/RemoteConfig - Firebase/RemoteConfig
- Firebase/Storage - Firebase/Storage
- React/BatchedBridge (from `../node_modules/react-native`)
- React/Core (from `../node_modules/react-native`) - React/Core (from `../node_modules/react-native`)
- React/CxxBridge (from `../node_modules/react-native`)
- React/RCTNetwork (from `../node_modules/react-native`) - React/RCTNetwork (from `../node_modules/react-native`)
- React/RCTText (from `../node_modules/react-native`) - React/RCTText (from `../node_modules/react-native`)
- React/RCTWebSocket (from `../node_modules/react-native`) - React/RCTWebSocket (from `../node_modules/react-native`)
@ -242,8 +255,10 @@ EXTERNAL SOURCES:
:path: ../node_modules/react-native/ReactCommon/yoga :path: ../node_modules/react-native/ReactCommon/yoga
SPEC CHECKSUMS: SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
BoringSSL: 32764dbaf5f5888cf51fbaa172a010126b41bcd4 BoringSSL: 32764dbaf5f5888cf51fbaa172a010126b41bcd4
Crashlytics: aee1a064cbbf99b32efa3f056a5f458d846bc8ff Crashlytics: aee1a064cbbf99b32efa3f056a5f458d846bc8ff
DoubleConversion: e22e0762848812a87afd67ffda3998d9ef29170c
Fabric: f8d42c893bb187326a7968b62abe55c36a987a46 Fabric: f8d42c893bb187326a7968b62abe55c36a987a46
Firebase: cc13dfab1038c8b45d7903e01fc690451d6d0b24 Firebase: cc13dfab1038c8b45d7903e01fc690451d6d0b24
FirebaseABTesting: d07d0ee833b842d5153549e4c7e2e2cb1c23a3f9 FirebaseABTesting: d07d0ee833b842d5153549e4c7e2e2cb1c23a3f9
@ -261,8 +276,10 @@ SPEC CHECKSUMS:
FirebaseRemoteConfig: df64ce784a45e9b9d4988030a59da6baede8bdb0 FirebaseRemoteConfig: df64ce784a45e9b9d4988030a59da6baede8bdb0
FirebaseStorage: 9a863a2bb96c406958eeff7c2f1dfa9f44c44a13 FirebaseStorage: 9a863a2bb96c406958eeff7c2f1dfa9f44c44a13
FirebaseSwizzlingUtilities: f1c49a5a372ac852c853722a5891a0a5e2344a6c FirebaseSwizzlingUtilities: f1c49a5a372ac852c853722a5891a0a5e2344a6c
Folly: 211775e49d8da0ca658aebc8eab89d642935755c
glog: 1de0bb937dccdc981596d3b5825ebfb765017ded
Google-Mobile-Ads-SDK: 375bbb821b3df2106c37b74f6b0a97576ddc5f6b Google-Mobile-Ads-SDK: 375bbb821b3df2106c37b74f6b0a97576ddc5f6b
GoogleAPIClientForREST: 4fa84fc61fdeea48dd7088de5c1a864ace18125b GoogleAPIClientForREST: f7951c455df271bc6259b3ddb4073d0026475ccf
GoogleSignIn: d9ef55b10f0aa401a5de2747f59b725e4b9732ac GoogleSignIn: d9ef55b10f0aa401a5de2747f59b725e4b9732ac
GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20 GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
gRPC: f54f0e6d603052b4562447da442ce2ff30bcdacc gRPC: f54f0e6d603052b4562447da442ce2ff30bcdacc
@ -274,10 +291,10 @@ SPEC CHECKSUMS:
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5 leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3 nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03 Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
React: 43e97926f429d846050880666de1809e22dd5cc5 React: c237e42de9c70e5cac6eeb52b4cfd3a0910c1f00
RNFirebase: dff98ceb517ef0b5e1858deb59eca186acc6edb0 RNFirebase: dff98ceb517ef0b5e1858deb59eca186acc6edb0
yoga: 55da126afc384965b96bff46652464373b330add yoga: 55da126afc384965b96bff46652464373b330add
PODFILE CHECKSUM: 98821556e9f752c7e43b1d6c5cf757cdaefcffa2 PODFILE CHECKSUM: b776d6f4d08bbd51cda6d929b57bfaa8031e7ead
COCOAPODS: 1.4.0 COCOAPODS: 1.4.0

2848
tests/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -34,8 +34,8 @@
"lodash.some": "^4.6.0", "lodash.some": "^4.6.0",
"prop-types": "^15.6.1", "prop-types": "^15.6.1",
"query-string": "^5.1.0", "query-string": "^5.1.0",
"react": "^16.2.0", "react": "^16.3.0-alpha.1",
"react-native": "^0.52.3", "react-native": "^0.54.4",
"react-native-vector-icons": "^4.5.0", "react-native-vector-icons": "^4.5.0",
"react-navigation": "^1.2.1", "react-navigation": "^1.2.1",
"react-redux": "^5.0.7", "react-redux": "^5.0.7",
@ -63,6 +63,7 @@
"eslint-plugin-import": "^2.9.0", "eslint-plugin-import": "^2.9.0",
"eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0", "eslint-plugin-react": "^6.10.0",
"flow-bin": "^0.65.0",
"jest": "19.0.2", "jest": "19.0.2",
"redux-immutable-state-invariant": "^1.2.4" "redux-immutable-state-invariant": "^1.2.4"
}, },