@rownd/react-native 0.2.5 → 2.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 (253) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +15 -52
  3. package/android/build.gradle +127 -37
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +1 -1
  6. package/android/src/main/java/com/reactnativerowndplugin/RowndPluginModule.kt +98 -0
  7. package/android/src/main/java/com/reactnativerowndplugin/RowndPluginPackage.kt +16 -0
  8. package/ios/{ReactNative.xcodeproj → Rownd.xcodeproj}/project.pbxproj +13 -12
  9. package/ios/Rownd.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  10. package/ios/RowndPlugin-Bridging-Header.h +3 -0
  11. package/ios/RowndPlugin.m +26 -0
  12. package/ios/RowndPlugin.swift +83 -0
  13. package/ios/RowndPluginEventEmitter.m +12 -0
  14. package/ios/RowndPluginEventEmitter.swift +19 -0
  15. package/lib/commonjs/components/GlobalContext.js +30 -298
  16. package/lib/commonjs/components/GlobalContext.js.map +1 -1
  17. package/lib/commonjs/components/{BottomSheetTextInput/types.js → GlobalContext.types.js} +1 -1
  18. package/lib/commonjs/components/GlobalContext.types.js.map +1 -0
  19. package/lib/commonjs/constants/action.js +13 -0
  20. package/lib/commonjs/constants/action.js.map +1 -0
  21. package/lib/commonjs/hooks/rownd.js +15 -146
  22. package/lib/commonjs/hooks/rownd.js.map +1 -1
  23. package/lib/commonjs/index.js +2 -12
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/reducer/rowndReducer.js +89 -0
  26. package/lib/commonjs/reducer/rowndReducer.js.map +1 -0
  27. package/lib/commonjs/utils/config.js +0 -26
  28. package/lib/commonjs/utils/config.js.map +1 -1
  29. package/lib/commonjs/utils/nativeModule.js +72 -0
  30. package/lib/commonjs/utils/nativeModule.js.map +1 -0
  31. package/lib/module/components/GlobalContext.js +29 -293
  32. package/lib/module/components/GlobalContext.js.map +1 -1
  33. package/lib/module/components/GlobalContext.types.js +2 -0
  34. package/lib/module/components/GlobalContext.types.js.map +1 -0
  35. package/lib/module/constants/action.js +6 -0
  36. package/lib/module/constants/action.js.map +1 -0
  37. package/lib/module/hooks/rownd.js +12 -137
  38. package/lib/module/hooks/rownd.js.map +1 -1
  39. package/lib/module/index.js +2 -4
  40. package/lib/module/index.js.map +1 -1
  41. package/lib/module/reducer/rowndReducer.js +78 -0
  42. package/lib/module/reducer/rowndReducer.js.map +1 -0
  43. package/lib/module/utils/config.js +1 -16
  44. package/lib/module/utils/config.js.map +1 -1
  45. package/lib/module/utils/nativeModule.js +48 -0
  46. package/lib/module/utils/nativeModule.js.map +1 -0
  47. package/lib/typescript/components/GlobalContext.d.ts +13 -0
  48. package/lib/typescript/{src/components/GlobalContext.d.ts → components/GlobalContext.types.d.ts} +9 -35
  49. package/lib/typescript/constants/action.d.ts +7 -0
  50. package/lib/typescript/{src/hooks → hooks}/rownd.d.ts +10 -13
  51. package/lib/typescript/index.d.ts +3 -0
  52. package/lib/typescript/reducer/rowndReducer.d.ts +4 -0
  53. package/lib/typescript/utils/config.d.ts +10 -0
  54. package/lib/typescript/utils/nativeModule.d.ts +10 -0
  55. package/package.json +36 -56
  56. package/rownd-react-native.podspec +36 -0
  57. package/src/components/GlobalContext.tsx +44 -457
  58. package/src/components/GlobalContext.types.ts +105 -0
  59. package/src/constants/action.ts +8 -0
  60. package/src/hooks/rownd.ts +29 -147
  61. package/src/index.tsx +2 -4
  62. package/src/reducer/rowndReducer.ts +78 -0
  63. package/src/utils/config.ts +0 -27
  64. package/src/utils/nativeModule.ts +69 -0
  65. package/android/src/main/java/com/reactnative/ReactNativePackage.java +0 -22
  66. package/android/src/main/java/com/reactnative/ReactNativeViewManager.java +0 -31
  67. package/ios/ReactNativeViewManager.m +0 -34
  68. package/lib/commonjs/assets/images/checkmark--filled.svg +0 -12
  69. package/lib/commonjs/assets/images/email-verify-waiting.svg +0 -36
  70. package/lib/commonjs/assets/images/error-icon-material.svg +0 -1
  71. package/lib/commonjs/assets/images/phone-verify-waiting.svg +0 -26
  72. package/lib/commonjs/components/AuthenticatedComponent.js +0 -35
  73. package/lib/commonjs/components/AuthenticatedComponent.js.map +0 -1
  74. package/lib/commonjs/components/AutoSigninDialog.js +0 -132
  75. package/lib/commonjs/components/AutoSigninDialog.js.map +0 -1
  76. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js +0 -65
  77. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js.map +0 -1
  78. package/lib/commonjs/components/BottomSheetTextInput/index.js +0 -24
  79. package/lib/commonjs/components/BottomSheetTextInput/index.js.map +0 -1
  80. package/lib/commonjs/components/BottomSheetTextInput/types.js.map +0 -1
  81. package/lib/commonjs/components/DarkText.js +0 -35
  82. package/lib/commonjs/components/DarkText.js.map +0 -1
  83. package/lib/commonjs/components/DefaultContext.js +0 -266
  84. package/lib/commonjs/components/DefaultContext.js.map +0 -1
  85. package/lib/commonjs/components/RowndComponents.js +0 -25
  86. package/lib/commonjs/components/RowndComponents.js.map +0 -1
  87. package/lib/commonjs/components/RowndProvider.js +0 -55
  88. package/lib/commonjs/components/RowndProvider.js.map +0 -1
  89. package/lib/commonjs/components/SignIn.js +0 -644
  90. package/lib/commonjs/components/SignIn.js.map +0 -1
  91. package/lib/commonjs/components/images/CheckmarkFilled.js +0 -40
  92. package/lib/commonjs/components/images/CheckmarkFilled.js.map +0 -1
  93. package/lib/commonjs/components/images/EmailVerifyWaiting.js +0 -100
  94. package/lib/commonjs/components/images/EmailVerifyWaiting.js.map +0 -1
  95. package/lib/commonjs/components/images/ErrorIcon.js +0 -31
  96. package/lib/commonjs/components/images/ErrorIcon.js.map +0 -1
  97. package/lib/commonjs/components/images/PhoneVerifyWaiting.js +0 -91
  98. package/lib/commonjs/components/images/PhoneVerifyWaiting.js.map +0 -1
  99. package/lib/commonjs/data/actions.js +0 -26
  100. package/lib/commonjs/data/actions.js.map +0 -1
  101. package/lib/commonjs/hooks/api.js +0 -155
  102. package/lib/commonjs/hooks/api.js.map +0 -1
  103. package/lib/commonjs/hooks/debounce.js +0 -38
  104. package/lib/commonjs/hooks/debounce.js.map +0 -1
  105. package/lib/commonjs/hooks/fingerprint.js +0 -176
  106. package/lib/commonjs/hooks/fingerprint.js.map +0 -1
  107. package/lib/commonjs/hooks/index.js +0 -48
  108. package/lib/commonjs/hooks/index.js.map +0 -1
  109. package/lib/commonjs/hooks/interval.js +0 -31
  110. package/lib/commonjs/hooks/interval.js.map +0 -1
  111. package/lib/commonjs/hooks/nav.js +0 -39
  112. package/lib/commonjs/hooks/nav.js.map +0 -1
  113. package/lib/commonjs/index.tsx.bak +0 -26
  114. package/lib/commonjs/types.js +0 -2
  115. package/lib/commonjs/types.js.map +0 -1
  116. package/lib/commonjs/utils/events.js +0 -57
  117. package/lib/commonjs/utils/events.js.map +0 -1
  118. package/lib/commonjs/utils/form.js +0 -46
  119. package/lib/commonjs/utils/form.js.map +0 -1
  120. package/lib/commonjs/utils/queue.js +0 -117
  121. package/lib/commonjs/utils/queue.js.map +0 -1
  122. package/lib/commonjs/utils/storage.js +0 -15
  123. package/lib/commonjs/utils/storage.js.map +0 -1
  124. package/lib/commonjs/utils/tokens.js +0 -35
  125. package/lib/commonjs/utils/tokens.js.map +0 -1
  126. package/lib/commonjs/utils/user-data.js +0 -21
  127. package/lib/commonjs/utils/user-data.js.map +0 -1
  128. package/lib/module/assets/images/checkmark--filled.svg +0 -12
  129. package/lib/module/assets/images/email-verify-waiting.svg +0 -36
  130. package/lib/module/assets/images/error-icon-material.svg +0 -1
  131. package/lib/module/assets/images/phone-verify-waiting.svg +0 -26
  132. package/lib/module/components/AuthenticatedComponent.js +0 -24
  133. package/lib/module/components/AuthenticatedComponent.js.map +0 -1
  134. package/lib/module/components/AutoSigninDialog.js +0 -110
  135. package/lib/module/components/AutoSigninDialog.js.map +0 -1
  136. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js +0 -52
  137. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js.map +0 -1
  138. package/lib/module/components/BottomSheetTextInput/index.js +0 -5
  139. package/lib/module/components/BottomSheetTextInput/index.js.map +0 -1
  140. package/lib/module/components/BottomSheetTextInput/types.js +0 -2
  141. package/lib/module/components/BottomSheetTextInput/types.js.map +0 -1
  142. package/lib/module/components/DarkText.js +0 -24
  143. package/lib/module/components/DarkText.js.map +0 -1
  144. package/lib/module/components/DefaultContext.js +0 -244
  145. package/lib/module/components/DefaultContext.js.map +0 -1
  146. package/lib/module/components/RowndComponents.js +0 -12
  147. package/lib/module/components/RowndComponents.js.map +0 -1
  148. package/lib/module/components/RowndProvider.js +0 -39
  149. package/lib/module/components/RowndProvider.js.map +0 -1
  150. package/lib/module/components/SignIn.js +0 -616
  151. package/lib/module/components/SignIn.js.map +0 -1
  152. package/lib/module/components/images/CheckmarkFilled.js +0 -27
  153. package/lib/module/components/images/CheckmarkFilled.js.map +0 -1
  154. package/lib/module/components/images/EmailVerifyWaiting.js +0 -87
  155. package/lib/module/components/images/EmailVerifyWaiting.js.map +0 -1
  156. package/lib/module/components/images/ErrorIcon.js +0 -18
  157. package/lib/module/components/images/ErrorIcon.js.map +0 -1
  158. package/lib/module/components/images/PhoneVerifyWaiting.js +0 -78
  159. package/lib/module/components/images/PhoneVerifyWaiting.js.map +0 -1
  160. package/lib/module/data/actions.js +0 -19
  161. package/lib/module/data/actions.js.map +0 -1
  162. package/lib/module/hooks/api.js +0 -135
  163. package/lib/module/hooks/api.js.map +0 -1
  164. package/lib/module/hooks/debounce.js +0 -29
  165. package/lib/module/hooks/debounce.js.map +0 -1
  166. package/lib/module/hooks/fingerprint.js +0 -157
  167. package/lib/module/hooks/fingerprint.js.map +0 -1
  168. package/lib/module/hooks/index.js +0 -7
  169. package/lib/module/hooks/index.js.map +0 -1
  170. package/lib/module/hooks/interval.js +0 -23
  171. package/lib/module/hooks/interval.js.map +0 -1
  172. package/lib/module/hooks/nav.js +0 -30
  173. package/lib/module/hooks/nav.js.map +0 -1
  174. package/lib/module/index.tsx.bak +0 -26
  175. package/lib/module/types.js +0 -2
  176. package/lib/module/types.js.map +0 -1
  177. package/lib/module/utils/events.js +0 -45
  178. package/lib/module/utils/events.js.map +0 -1
  179. package/lib/module/utils/form.js +0 -34
  180. package/lib/module/utils/form.js.map +0 -1
  181. package/lib/module/utils/queue.js +0 -109
  182. package/lib/module/utils/queue.js.map +0 -1
  183. package/lib/module/utils/storage.js +0 -6
  184. package/lib/module/utils/storage.js.map +0 -1
  185. package/lib/module/utils/tokens.js +0 -24
  186. package/lib/module/utils/tokens.js.map +0 -1
  187. package/lib/module/utils/user-data.js +0 -14
  188. package/lib/module/utils/user-data.js.map +0 -1
  189. package/lib/package.json +0 -173
  190. package/lib/typescript/src/components/AuthenticatedComponent.d.ts +0 -7
  191. package/lib/typescript/src/components/AutoSigninDialog.d.ts +0 -2
  192. package/lib/typescript/src/components/BottomSheetTextInput/BottomSheetTextInput.d.ts +0 -4
  193. package/lib/typescript/src/components/BottomSheetTextInput/index.d.ts +0 -2
  194. package/lib/typescript/src/components/BottomSheetTextInput/types.d.ts +0 -3
  195. package/lib/typescript/src/components/DarkText.d.ts +0 -3
  196. package/lib/typescript/src/components/DefaultContext.d.ts +0 -12
  197. package/lib/typescript/src/components/RowndComponents.d.ts +0 -2
  198. package/lib/typescript/src/components/RowndProvider.d.ts +0 -8
  199. package/lib/typescript/src/components/SignIn.d.ts +0 -2
  200. package/lib/typescript/src/components/images/CheckmarkFilled.d.ts +0 -4
  201. package/lib/typescript/src/components/images/EmailVerifyWaiting.d.ts +0 -4
  202. package/lib/typescript/src/components/images/ErrorIcon.d.ts +0 -4
  203. package/lib/typescript/src/components/images/PhoneVerifyWaiting.d.ts +0 -4
  204. package/lib/typescript/src/data/actions.d.ts +0 -20
  205. package/lib/typescript/src/hooks/api.d.ts +0 -12
  206. package/lib/typescript/src/hooks/debounce.d.ts +0 -5
  207. package/lib/typescript/src/hooks/fingerprint.d.ts +0 -12
  208. package/lib/typescript/src/hooks/index.d.ts +0 -6
  209. package/lib/typescript/src/hooks/interval.d.ts +0 -2
  210. package/lib/typescript/src/hooks/nav.d.ts +0 -6
  211. package/lib/typescript/src/index.d.ts +0 -4
  212. package/lib/typescript/src/types.d.ts +0 -26
  213. package/lib/typescript/src/utils/config.d.ts +0 -18
  214. package/lib/typescript/src/utils/events.d.ts +0 -22
  215. package/lib/typescript/src/utils/form.d.ts +0 -18
  216. package/lib/typescript/src/utils/queue.d.ts +0 -21
  217. package/lib/typescript/src/utils/storage.d.ts +0 -3
  218. package/lib/typescript/src/utils/tokens.d.ts +0 -4
  219. package/lib/typescript/src/utils/user-data.d.ts +0 -3
  220. package/react-native.podspec +0 -19
  221. package/src/assets/images/checkmark--filled.svg +0 -12
  222. package/src/assets/images/email-verify-waiting.svg +0 -36
  223. package/src/assets/images/error-icon-material.svg +0 -1
  224. package/src/assets/images/phone-verify-waiting.svg +0 -26
  225. package/src/components/AuthenticatedComponent.tsx +0 -30
  226. package/src/components/AutoSigninDialog.tsx +0 -131
  227. package/src/components/BottomSheetTextInput/BottomSheetTextInput.tsx +0 -57
  228. package/src/components/BottomSheetTextInput/index.ts +0 -5
  229. package/src/components/BottomSheetTextInput/types.ts +0 -3
  230. package/src/components/DarkText.tsx +0 -16
  231. package/src/components/DefaultContext.tsx +0 -278
  232. package/src/components/RowndComponents.tsx +0 -18
  233. package/src/components/RowndProvider.tsx +0 -56
  234. package/src/components/SignIn.tsx +0 -797
  235. package/src/components/images/CheckmarkFilled.tsx +0 -30
  236. package/src/components/images/EmailVerifyWaiting.tsx +0 -95
  237. package/src/components/images/ErrorIcon.tsx +0 -11
  238. package/src/components/images/PhoneVerifyWaiting.tsx +0 -74
  239. package/src/data/actions.ts +0 -21
  240. package/src/hooks/api.ts +0 -162
  241. package/src/hooks/debounce.ts +0 -36
  242. package/src/hooks/fingerprint.ts +0 -217
  243. package/src/hooks/index.ts +0 -7
  244. package/src/hooks/interval.ts +0 -25
  245. package/src/hooks/nav.tsx +0 -29
  246. package/src/index.tsx.bak +0 -26
  247. package/src/types.ts +0 -27
  248. package/src/utils/events.ts +0 -54
  249. package/src/utils/form.tsx +0 -64
  250. package/src/utils/queue.ts +0 -75
  251. package/src/utils/storage.ts +0 -7
  252. package/src/utils/tokens.ts +0 -26
  253. package/src/utils/user-data.ts +0 -15
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.RowndProvider = RowndProvider;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- var _GlobalContext = require("./GlobalContext");
13
-
14
- var _DefaultContext = require("./DefaultContext");
15
-
16
- var _config = require("../utils/config");
17
-
18
- var _RowndComponents = require("./RowndComponents");
19
-
20
- var _bottomSheet = require("@gorhom/bottom-sheet");
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
- function RowndProvider(_ref) {
25
- let {
26
- appKey,
27
- apiUrl,
28
- children
29
- } = _ref;
30
- // const [isSigningIn, setIsSigningIn] = useState<boolean>(false);
31
- // const requestSignIn = useRef(function () {
32
- // setIsSigningIn(true);
33
- // });
34
- // const [rowndState, setRowndState] = useState<any>({
35
- // requestSignIn: requestSignIn.current,
36
- // });
37
- const config = (0, _config.createConfig)({
38
- appKey,
39
- apiUrl
40
- });
41
- return /*#__PURE__*/_react.default.createElement(_GlobalContext.GlobalContextProvider, {
42
- config: config
43
- }, /*#__PURE__*/_react.default.createElement(_DefaultContext.DefaultContext, {
44
- config: config
45
- }), /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetModalProvider, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
46
- style: styles.container
47
- }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, /*#__PURE__*/_react.default.createElement(_RowndComponents.RowndComponents, null)))));
48
- }
49
-
50
- const styles = _reactNative.StyleSheet.create({
51
- container: {
52
- flex: 1
53
- }
54
- });
55
- //# sourceMappingURL=RowndProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["RowndProvider","appKey","apiUrl","children","config","createConfig","styles","container","StyleSheet","create","flex"],"sources":["RowndProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { View, StyleSheet } from 'react-native';\nimport { GlobalContextProvider } from './GlobalContext';\nimport { DefaultContext } from './DefaultContext';\nimport { createConfig } from '../utils/config';\nimport { RowndComponents } from './RowndComponents';\nimport { BottomSheetModalProvider } from '@gorhom/bottom-sheet';\n\n// const RowndContext = createContext<TRowndContext | undefined>(undefined);\n\ninterface IRowndProviderProps {\n appKey: string;\n apiUrl?: string;\n children: React.ReactNode;\n}\n\nexport function RowndProvider({\n appKey,\n apiUrl,\n children,\n}: IRowndProviderProps) {\n // const [isSigningIn, setIsSigningIn] = useState<boolean>(false);\n\n // const requestSignIn = useRef(function () {\n // setIsSigningIn(true);\n // });\n\n // const [rowndState, setRowndState] = useState<any>({\n // requestSignIn: requestSignIn.current,\n // });\n\n const config = createConfig({\n appKey,\n apiUrl,\n });\n\n return (\n <GlobalContextProvider config={config}>\n <DefaultContext config={config} />\n <BottomSheetModalProvider>\n <View style={styles.container}>\n <>\n {children}\n <RowndComponents />\n </>\n </View>\n </BottomSheetModalProvider>\n </GlobalContextProvider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAUO,SAASA,aAAT,OAIiB;EAAA,IAJM;IAC5BC,MAD4B;IAE5BC,MAF4B;IAG5BC;EAH4B,CAIN;EACtB;EAEA;EACA;EACA;EAEA;EACA;EACA;EAEA,MAAMC,MAAM,GAAG,IAAAC,oBAAA,EAAa;IAC1BJ,MAD0B;IAE1BC;EAF0B,CAAb,CAAf;EAKA,oBACE,6BAAC,oCAAD;IAAuB,MAAM,EAAEE;EAA/B,gBACE,6BAAC,8BAAD;IAAgB,MAAM,EAAEA;EAAxB,EADF,eAEE,6BAAC,qCAAD,qBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEE,MAAM,CAACC;EAApB,gBACE,4DACGJ,QADH,eAEE,6BAAC,gCAAD,OAFF,CADF,CADF,CAFF,CADF;AAaD;;AAED,MAAMG,MAAM,GAAGE,uBAAA,CAAWC,MAAX,CAAkB;EAC/BF,SAAS,EAAE;IACTG,IAAI,EAAE;EADG;AADoB,CAAlB,CAAf"}