@rownd/react-native 3.0.1 → 3.1.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.
Files changed (63) hide show
  1. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  2. package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
  3. package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
  4. package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/android/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
  7. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  10. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  11. package/android/build.gradle +1 -1
  12. package/expo/plugin.js +2 -2
  13. package/ios/RowndPlugin.swift +1 -1
  14. package/lib/commonjs/components/GlobalContext.js +13 -33
  15. package/lib/commonjs/components/GlobalContext.js.map +1 -1
  16. package/lib/commonjs/components/GlobalContext.types.js.map +1 -1
  17. package/lib/commonjs/components/GlobalContext.web.js +4 -10
  18. package/lib/commonjs/components/GlobalContext.web.js.map +1 -1
  19. package/lib/commonjs/components/RequireSignIn.js +10 -20
  20. package/lib/commonjs/components/RequireSignIn.js.map +1 -1
  21. package/lib/commonjs/components/SignedIn.js +4 -13
  22. package/lib/commonjs/components/SignedIn.js.map +1 -1
  23. package/lib/commonjs/components/SignedOut.js +4 -13
  24. package/lib/commonjs/components/SignedOut.js.map +1 -1
  25. package/lib/commonjs/constants/action.js +1 -3
  26. package/lib/commonjs/constants/action.js.map +1 -1
  27. package/lib/commonjs/hooks/rownd.js +0 -3
  28. package/lib/commonjs/hooks/rownd.js.map +1 -1
  29. package/lib/commonjs/hooks/rownd.web.js +2 -3
  30. package/lib/commonjs/hooks/rownd.web.js.map +1 -1
  31. package/lib/commonjs/index.js +0 -6
  32. package/lib/commonjs/index.js.map +1 -1
  33. package/lib/commonjs/reducer/rowndReducer.js +16 -22
  34. package/lib/commonjs/reducer/rowndReducer.js.map +1 -1
  35. package/lib/commonjs/utils/config.js.map +1 -1
  36. package/lib/commonjs/utils/nativeModule.js +3 -21
  37. package/lib/commonjs/utils/nativeModule.js.map +1 -1
  38. package/lib/module/components/GlobalContext.js +7 -17
  39. package/lib/module/components/GlobalContext.js.map +1 -1
  40. package/lib/module/components/GlobalContext.types.js.map +1 -1
  41. package/lib/module/components/GlobalContext.web.js +4 -7
  42. package/lib/module/components/GlobalContext.web.js.map +1 -1
  43. package/lib/module/components/RequireSignIn.js +7 -11
  44. package/lib/module/components/RequireSignIn.js.map +1 -1
  45. package/lib/module/components/SignedIn.js +3 -8
  46. package/lib/module/components/SignedIn.js.map +1 -1
  47. package/lib/module/components/SignedOut.js +3 -8
  48. package/lib/module/components/SignedOut.js.map +1 -1
  49. package/lib/module/constants/action.js +0 -1
  50. package/lib/module/constants/action.js.map +1 -1
  51. package/lib/module/hooks/rownd.js.map +1 -1
  52. package/lib/module/hooks/rownd.web.js +2 -1
  53. package/lib/module/hooks/rownd.web.js.map +1 -1
  54. package/lib/module/index.js.map +1 -1
  55. package/lib/module/reducer/rowndReducer.js +15 -17
  56. package/lib/module/reducer/rowndReducer.js.map +1 -1
  57. package/lib/module/utils/config.js.map +1 -1
  58. package/lib/module/utils/nativeModule.js +0 -3
  59. package/lib/module/utils/nativeModule.js.map +1 -1
  60. package/lib/typescript/hooks/rownd.d.ts +1 -1
  61. package/package.json +2 -1
  62. package/rownd-react-native.podspec +1 -1
  63. package/src/hooks/rownd.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","Rownd","RowndPlugin","Proxy","get","Error","IOSRowndEventEmitter","OS","RowndPluginEventEmitter","configure","config","customizations","customizationConfig","requestSignIn","method","postSignInRedirect","intent","signOut","manageAccount","getAccessToken","token","getFirebaseIdToken","setUserDataValue","key","value","setUserData","data","handleSignInLink","url"],"sources":["nativeModule.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { RequestSignIn } from 'src/hooks/rownd';\nimport type { Customizations, IConfig } from './config';\n\nexport const LINKING_ERROR =\n `The package '@rownd/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\nexport const Rownd = NativeModules.RowndPlugin\n ? NativeModules.RowndPlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport const IOSRowndEventEmitter =\n Platform.OS !== 'ios'\n ? null\n : NativeModules.RowndPluginEventEmitter\n ? NativeModules.RowndPluginEventEmitter\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function configure(config: IConfig): Promise<string> {\n return Rownd.configure(config);\n}\n\nexport function customizations(customizationConfig: Customizations) {\n return Rownd.customizations(customizationConfig);\n}\n\nexport function requestSignIn(config?: RequestSignIn) {\n if (!config) {\n return Rownd.requestSignIn({ method: 'default' });\n }\n return Rownd.requestSignIn({\n method: config?.method,\n postSignInRedirect: config?.postSignInRedirect,\n intent: config?.intent\n });\n}\n\nexport function signOut() {\n return Rownd.signOut();\n}\n\nexport function manageAccount() {\n return Rownd.manageAccount();\n}\n\nexport function getAccessToken(token?: string): Promise<string> {\n return Rownd.getAccessToken(token || null);\n}\n\nexport function getFirebaseIdToken(): Promise<string> {\n return Rownd.getFirebaseIdToken();\n}\n\nexport function setUserDataValue(key: string, value: any) {\n return Rownd.setUserDataValue(\n key,\n Platform.OS === 'android' ? { value } : value\n );\n}\n\nexport function setUserData(data: Record<string, any>) {\n return Rownd.setUserData(data);\n}\n\nexport function handleSignInLink(url: string) {\n return Rownd.handleSignInLink(url);\n}\n"],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,EAAEN,MAAF,aAAEA,MAAF,uBAAEA,MAAM,CAAEM;EAHS,CAApB,CAAP;AAKD;AAED,OAAO,SAASC,OAAT,GAAmB;EACxB,OAAOhB,KAAK,CAACgB,OAAN,EAAP;AACD;AAED,OAAO,SAASC,aAAT,GAAyB;EAC9B,OAAOjB,KAAK,CAACiB,aAAN,EAAP;AACD;AAED,OAAO,SAASC,cAAT,CAAwBC,KAAxB,EAAyD;EAC9D,OAAOnB,KAAK,CAACkB,cAAN,CAAqBC,KAAK,IAAI,IAA9B,CAAP;AACD;AAED,OAAO,SAASC,kBAAT,GAA+C;EACpD,OAAOpB,KAAK,CAACoB,kBAAN,EAAP;AACD;AAED,OAAO,SAASC,gBAAT,CAA0BC,GAA1B,EAAuCC,KAAvC,EAAmD;EACxD,OAAOvB,KAAK,CAACqB,gBAAN,CACLC,GADK,EAEL3B,QAAQ,CAACW,EAAT,KAAgB,SAAhB,GAA4B;IAAEiB;EAAF,CAA5B,GAAwCA,KAFnC,CAAP;AAID;AAED,OAAO,SAASC,WAAT,CAAqBC,IAArB,EAAgD;EACrD,OAAOzB,KAAK,CAACwB,WAAN,CAAkBC,IAAlB,CAAP;AACD;AAED,OAAO,SAASC,gBAAT,CAA0BC,GAA1B,EAAuC;EAC5C,OAAO3B,KAAK,CAAC0B,gBAAN,CAAuBC,GAAvB,CAAP;AACD"}
1
+ {"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","Rownd","RowndPlugin","Proxy","get","Error","IOSRowndEventEmitter","OS","RowndPluginEventEmitter","configure","config","customizations","customizationConfig","requestSignIn","method","postSignInRedirect","intent","signOut","manageAccount","getAccessToken","token","getFirebaseIdToken","setUserDataValue","key","value","setUserData","data","handleSignInLink","url"],"sources":["nativeModule.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { RequestSignIn } from 'src/hooks/rownd';\nimport type { Customizations, IConfig } from './config';\n\nexport const LINKING_ERROR =\n `The package '@rownd/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\nexport const Rownd = NativeModules.RowndPlugin\n ? NativeModules.RowndPlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport const IOSRowndEventEmitter =\n Platform.OS !== 'ios'\n ? null\n : NativeModules.RowndPluginEventEmitter\n ? NativeModules.RowndPluginEventEmitter\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function configure(config: IConfig): Promise<string> {\n return Rownd.configure(config);\n}\n\nexport function customizations(customizationConfig: Customizations) {\n return Rownd.customizations(customizationConfig);\n}\n\nexport function requestSignIn(config?: RequestSignIn) {\n if (!config) {\n return Rownd.requestSignIn({ method: 'default' });\n }\n return Rownd.requestSignIn({\n method: config?.method,\n postSignInRedirect: config?.postSignInRedirect,\n intent: config?.intent\n });\n}\n\nexport function signOut() {\n return Rownd.signOut();\n}\n\nexport function manageAccount() {\n return Rownd.manageAccount();\n}\n\nexport function getAccessToken(token?: string): Promise<string> {\n return Rownd.getAccessToken(token || null);\n}\n\nexport function getFirebaseIdToken(): Promise<string> {\n return Rownd.getFirebaseIdToken();\n}\n\nexport function setUserDataValue(key: string, value: any) {\n return Rownd.setUserDataValue(\n key,\n Platform.OS === 'android' ? { value } : value\n );\n}\n\nexport function setUserData(data: Record<string, any>) {\n return Rownd.setUserData(data);\n}\n\nexport function handleSignInLink(url: string) {\n return Rownd.handleSignInLink(url);\n}\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAItD,OAAO,MAAMC,aAAa,GACvB,8EAA6E,GAC9ED,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;AAE/C,OAAO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,aAAa,CAAC,CAAC;AAC9B;AAEA,OAAO,SAASC,cAAcA,CAACC,KAAc,EAAmB;EAC9D,OAAOnB,KAAK,CAACkB,cAAc,CAACC,KAAK,IAAI,IAAI,CAAC;AAC5C;AAEA,OAAO,SAASC,kBAAkBA,CAAA,EAAoB;EACpD,OAAOpB,KAAK,CAACoB,kBAAkB,CAAC,CAAC;AACnC;AAEA,OAAO,SAASC,gBAAgBA,CAACC,GAAW,EAAEC,KAAU,EAAE;EACxD,OAAOvB,KAAK,CAACqB,gBAAgB,CAC3BC,GAAG,EACH3B,QAAQ,CAACW,EAAE,KAAK,SAAS,GAAG;IAAEiB;EAAM,CAAC,GAAGA,KAC1C,CAAC;AACH;AAEA,OAAO,SAASC,WAAWA,CAACC,IAAyB,EAAE;EACrD,OAAOzB,KAAK,CAACwB,WAAW,CAACC,IAAI,CAAC;AAChC;AAEA,OAAO,SAASC,gBAAgBA,CAACC,GAAW,EAAE;EAC5C,OAAO3B,KAAK,CAAC0B,gBAAgB,CAACC,GAAG,CAAC;AACpC","ignoreList":[]}
@@ -14,7 +14,7 @@ export declare type TRowndContext = {
14
14
  };
15
15
  declare type UserContext = {
16
16
  data: {
17
- id?: string;
17
+ user_id?: string;
18
18
  email?: string | null;
19
19
  phone?: string | null;
20
20
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rownd/react-native",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -61,6 +61,7 @@
61
61
  "eslint": "^8.4.1",
62
62
  "eslint-config-prettier": "^8.5.0",
63
63
  "eslint-plugin-prettier": "^4.0.0",
64
+ "expo": "^50.0.17",
64
65
  "jest": "^28.1.1",
65
66
  "pod-install": "^0.1.0",
66
67
  "prettier": "^2.0.5",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "Rownd", "~> 3.0.1"
20
+ s.dependency "Rownd", "~> 3.1.0"
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
@@ -26,7 +26,7 @@ export type TRowndContext = {
26
26
 
27
27
  type UserContext = {
28
28
  data: {
29
- id?: string;
29
+ user_id?: string;
30
30
  email?: string | null;
31
31
  phone?: string | null;
32
32
  [key: string]: any;