@rownd/react-native 0.2.5 → 2.2.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 (252) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +34 -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/RowndPlugin-Bridging-Header.h +3 -0
  10. package/ios/RowndPlugin.m +26 -0
  11. package/ios/RowndPlugin.swift +83 -0
  12. package/ios/RowndPluginEventEmitter.m +12 -0
  13. package/ios/RowndPluginEventEmitter.swift +19 -0
  14. package/lib/commonjs/components/GlobalContext.js +32 -298
  15. package/lib/commonjs/components/GlobalContext.js.map +1 -1
  16. package/lib/commonjs/components/{BottomSheetTextInput/types.js → GlobalContext.types.js} +1 -1
  17. package/lib/commonjs/components/GlobalContext.types.js.map +1 -0
  18. package/lib/commonjs/constants/action.js +13 -0
  19. package/lib/commonjs/constants/action.js.map +1 -0
  20. package/lib/commonjs/hooks/rownd.js +15 -146
  21. package/lib/commonjs/hooks/rownd.js.map +1 -1
  22. package/lib/commonjs/index.js +2 -12
  23. package/lib/commonjs/index.js.map +1 -1
  24. package/lib/commonjs/reducer/rowndReducer.js +89 -0
  25. package/lib/commonjs/reducer/rowndReducer.js.map +1 -0
  26. package/lib/commonjs/utils/config.js +0 -26
  27. package/lib/commonjs/utils/config.js.map +1 -1
  28. package/lib/commonjs/utils/nativeModule.js +72 -0
  29. package/lib/commonjs/utils/nativeModule.js.map +1 -0
  30. package/lib/module/components/GlobalContext.js +30 -293
  31. package/lib/module/components/GlobalContext.js.map +1 -1
  32. package/lib/module/components/GlobalContext.types.js +2 -0
  33. package/lib/module/components/GlobalContext.types.js.map +1 -0
  34. package/lib/module/constants/action.js +6 -0
  35. package/lib/module/constants/action.js.map +1 -0
  36. package/lib/module/hooks/rownd.js +12 -137
  37. package/lib/module/hooks/rownd.js.map +1 -1
  38. package/lib/module/index.js +2 -4
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/reducer/rowndReducer.js +78 -0
  41. package/lib/module/reducer/rowndReducer.js.map +1 -0
  42. package/lib/module/utils/config.js +1 -16
  43. package/lib/module/utils/config.js.map +1 -1
  44. package/lib/module/utils/nativeModule.js +48 -0
  45. package/lib/module/utils/nativeModule.js.map +1 -0
  46. package/lib/typescript/components/GlobalContext.d.ts +13 -0
  47. package/lib/typescript/{src/components/GlobalContext.d.ts → components/GlobalContext.types.d.ts} +9 -35
  48. package/lib/typescript/constants/action.d.ts +7 -0
  49. package/lib/typescript/{src/hooks → hooks}/rownd.d.ts +10 -13
  50. package/lib/typescript/index.d.ts +3 -0
  51. package/lib/typescript/reducer/rowndReducer.d.ts +4 -0
  52. package/lib/typescript/utils/config.d.ts +10 -0
  53. package/lib/typescript/utils/nativeModule.d.ts +10 -0
  54. package/package.json +36 -56
  55. package/rownd-react-native.podspec +36 -0
  56. package/src/components/GlobalContext.tsx +47 -457
  57. package/src/components/GlobalContext.types.ts +105 -0
  58. package/src/constants/action.ts +8 -0
  59. package/src/hooks/rownd.ts +29 -147
  60. package/src/index.tsx +2 -4
  61. package/src/reducer/rowndReducer.ts +78 -0
  62. package/src/utils/config.ts +0 -27
  63. package/src/utils/nativeModule.ts +69 -0
  64. package/android/src/main/java/com/reactnative/ReactNativePackage.java +0 -22
  65. package/android/src/main/java/com/reactnative/ReactNativeViewManager.java +0 -31
  66. package/ios/ReactNativeViewManager.m +0 -34
  67. package/lib/commonjs/assets/images/checkmark--filled.svg +0 -12
  68. package/lib/commonjs/assets/images/email-verify-waiting.svg +0 -36
  69. package/lib/commonjs/assets/images/error-icon-material.svg +0 -1
  70. package/lib/commonjs/assets/images/phone-verify-waiting.svg +0 -26
  71. package/lib/commonjs/components/AuthenticatedComponent.js +0 -35
  72. package/lib/commonjs/components/AuthenticatedComponent.js.map +0 -1
  73. package/lib/commonjs/components/AutoSigninDialog.js +0 -132
  74. package/lib/commonjs/components/AutoSigninDialog.js.map +0 -1
  75. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js +0 -65
  76. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js.map +0 -1
  77. package/lib/commonjs/components/BottomSheetTextInput/index.js +0 -24
  78. package/lib/commonjs/components/BottomSheetTextInput/index.js.map +0 -1
  79. package/lib/commonjs/components/BottomSheetTextInput/types.js.map +0 -1
  80. package/lib/commonjs/components/DarkText.js +0 -35
  81. package/lib/commonjs/components/DarkText.js.map +0 -1
  82. package/lib/commonjs/components/DefaultContext.js +0 -266
  83. package/lib/commonjs/components/DefaultContext.js.map +0 -1
  84. package/lib/commonjs/components/RowndComponents.js +0 -25
  85. package/lib/commonjs/components/RowndComponents.js.map +0 -1
  86. package/lib/commonjs/components/RowndProvider.js +0 -55
  87. package/lib/commonjs/components/RowndProvider.js.map +0 -1
  88. package/lib/commonjs/components/SignIn.js +0 -644
  89. package/lib/commonjs/components/SignIn.js.map +0 -1
  90. package/lib/commonjs/components/images/CheckmarkFilled.js +0 -40
  91. package/lib/commonjs/components/images/CheckmarkFilled.js.map +0 -1
  92. package/lib/commonjs/components/images/EmailVerifyWaiting.js +0 -100
  93. package/lib/commonjs/components/images/EmailVerifyWaiting.js.map +0 -1
  94. package/lib/commonjs/components/images/ErrorIcon.js +0 -31
  95. package/lib/commonjs/components/images/ErrorIcon.js.map +0 -1
  96. package/lib/commonjs/components/images/PhoneVerifyWaiting.js +0 -91
  97. package/lib/commonjs/components/images/PhoneVerifyWaiting.js.map +0 -1
  98. package/lib/commonjs/data/actions.js +0 -26
  99. package/lib/commonjs/data/actions.js.map +0 -1
  100. package/lib/commonjs/hooks/api.js +0 -155
  101. package/lib/commonjs/hooks/api.js.map +0 -1
  102. package/lib/commonjs/hooks/debounce.js +0 -38
  103. package/lib/commonjs/hooks/debounce.js.map +0 -1
  104. package/lib/commonjs/hooks/fingerprint.js +0 -176
  105. package/lib/commonjs/hooks/fingerprint.js.map +0 -1
  106. package/lib/commonjs/hooks/index.js +0 -48
  107. package/lib/commonjs/hooks/index.js.map +0 -1
  108. package/lib/commonjs/hooks/interval.js +0 -31
  109. package/lib/commonjs/hooks/interval.js.map +0 -1
  110. package/lib/commonjs/hooks/nav.js +0 -39
  111. package/lib/commonjs/hooks/nav.js.map +0 -1
  112. package/lib/commonjs/index.tsx.bak +0 -26
  113. package/lib/commonjs/types.js +0 -2
  114. package/lib/commonjs/types.js.map +0 -1
  115. package/lib/commonjs/utils/events.js +0 -57
  116. package/lib/commonjs/utils/events.js.map +0 -1
  117. package/lib/commonjs/utils/form.js +0 -46
  118. package/lib/commonjs/utils/form.js.map +0 -1
  119. package/lib/commonjs/utils/queue.js +0 -117
  120. package/lib/commonjs/utils/queue.js.map +0 -1
  121. package/lib/commonjs/utils/storage.js +0 -15
  122. package/lib/commonjs/utils/storage.js.map +0 -1
  123. package/lib/commonjs/utils/tokens.js +0 -35
  124. package/lib/commonjs/utils/tokens.js.map +0 -1
  125. package/lib/commonjs/utils/user-data.js +0 -21
  126. package/lib/commonjs/utils/user-data.js.map +0 -1
  127. package/lib/module/assets/images/checkmark--filled.svg +0 -12
  128. package/lib/module/assets/images/email-verify-waiting.svg +0 -36
  129. package/lib/module/assets/images/error-icon-material.svg +0 -1
  130. package/lib/module/assets/images/phone-verify-waiting.svg +0 -26
  131. package/lib/module/components/AuthenticatedComponent.js +0 -24
  132. package/lib/module/components/AuthenticatedComponent.js.map +0 -1
  133. package/lib/module/components/AutoSigninDialog.js +0 -110
  134. package/lib/module/components/AutoSigninDialog.js.map +0 -1
  135. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js +0 -52
  136. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js.map +0 -1
  137. package/lib/module/components/BottomSheetTextInput/index.js +0 -5
  138. package/lib/module/components/BottomSheetTextInput/index.js.map +0 -1
  139. package/lib/module/components/BottomSheetTextInput/types.js +0 -2
  140. package/lib/module/components/BottomSheetTextInput/types.js.map +0 -1
  141. package/lib/module/components/DarkText.js +0 -24
  142. package/lib/module/components/DarkText.js.map +0 -1
  143. package/lib/module/components/DefaultContext.js +0 -244
  144. package/lib/module/components/DefaultContext.js.map +0 -1
  145. package/lib/module/components/RowndComponents.js +0 -12
  146. package/lib/module/components/RowndComponents.js.map +0 -1
  147. package/lib/module/components/RowndProvider.js +0 -39
  148. package/lib/module/components/RowndProvider.js.map +0 -1
  149. package/lib/module/components/SignIn.js +0 -616
  150. package/lib/module/components/SignIn.js.map +0 -1
  151. package/lib/module/components/images/CheckmarkFilled.js +0 -27
  152. package/lib/module/components/images/CheckmarkFilled.js.map +0 -1
  153. package/lib/module/components/images/EmailVerifyWaiting.js +0 -87
  154. package/lib/module/components/images/EmailVerifyWaiting.js.map +0 -1
  155. package/lib/module/components/images/ErrorIcon.js +0 -18
  156. package/lib/module/components/images/ErrorIcon.js.map +0 -1
  157. package/lib/module/components/images/PhoneVerifyWaiting.js +0 -78
  158. package/lib/module/components/images/PhoneVerifyWaiting.js.map +0 -1
  159. package/lib/module/data/actions.js +0 -19
  160. package/lib/module/data/actions.js.map +0 -1
  161. package/lib/module/hooks/api.js +0 -135
  162. package/lib/module/hooks/api.js.map +0 -1
  163. package/lib/module/hooks/debounce.js +0 -29
  164. package/lib/module/hooks/debounce.js.map +0 -1
  165. package/lib/module/hooks/fingerprint.js +0 -157
  166. package/lib/module/hooks/fingerprint.js.map +0 -1
  167. package/lib/module/hooks/index.js +0 -7
  168. package/lib/module/hooks/index.js.map +0 -1
  169. package/lib/module/hooks/interval.js +0 -23
  170. package/lib/module/hooks/interval.js.map +0 -1
  171. package/lib/module/hooks/nav.js +0 -30
  172. package/lib/module/hooks/nav.js.map +0 -1
  173. package/lib/module/index.tsx.bak +0 -26
  174. package/lib/module/types.js +0 -2
  175. package/lib/module/types.js.map +0 -1
  176. package/lib/module/utils/events.js +0 -45
  177. package/lib/module/utils/events.js.map +0 -1
  178. package/lib/module/utils/form.js +0 -34
  179. package/lib/module/utils/form.js.map +0 -1
  180. package/lib/module/utils/queue.js +0 -109
  181. package/lib/module/utils/queue.js.map +0 -1
  182. package/lib/module/utils/storage.js +0 -6
  183. package/lib/module/utils/storage.js.map +0 -1
  184. package/lib/module/utils/tokens.js +0 -24
  185. package/lib/module/utils/tokens.js.map +0 -1
  186. package/lib/module/utils/user-data.js +0 -14
  187. package/lib/module/utils/user-data.js.map +0 -1
  188. package/lib/package.json +0 -173
  189. package/lib/typescript/src/components/AuthenticatedComponent.d.ts +0 -7
  190. package/lib/typescript/src/components/AutoSigninDialog.d.ts +0 -2
  191. package/lib/typescript/src/components/BottomSheetTextInput/BottomSheetTextInput.d.ts +0 -4
  192. package/lib/typescript/src/components/BottomSheetTextInput/index.d.ts +0 -2
  193. package/lib/typescript/src/components/BottomSheetTextInput/types.d.ts +0 -3
  194. package/lib/typescript/src/components/DarkText.d.ts +0 -3
  195. package/lib/typescript/src/components/DefaultContext.d.ts +0 -12
  196. package/lib/typescript/src/components/RowndComponents.d.ts +0 -2
  197. package/lib/typescript/src/components/RowndProvider.d.ts +0 -8
  198. package/lib/typescript/src/components/SignIn.d.ts +0 -2
  199. package/lib/typescript/src/components/images/CheckmarkFilled.d.ts +0 -4
  200. package/lib/typescript/src/components/images/EmailVerifyWaiting.d.ts +0 -4
  201. package/lib/typescript/src/components/images/ErrorIcon.d.ts +0 -4
  202. package/lib/typescript/src/components/images/PhoneVerifyWaiting.d.ts +0 -4
  203. package/lib/typescript/src/data/actions.d.ts +0 -20
  204. package/lib/typescript/src/hooks/api.d.ts +0 -12
  205. package/lib/typescript/src/hooks/debounce.d.ts +0 -5
  206. package/lib/typescript/src/hooks/fingerprint.d.ts +0 -12
  207. package/lib/typescript/src/hooks/index.d.ts +0 -6
  208. package/lib/typescript/src/hooks/interval.d.ts +0 -2
  209. package/lib/typescript/src/hooks/nav.d.ts +0 -6
  210. package/lib/typescript/src/index.d.ts +0 -4
  211. package/lib/typescript/src/types.d.ts +0 -26
  212. package/lib/typescript/src/utils/config.d.ts +0 -18
  213. package/lib/typescript/src/utils/events.d.ts +0 -22
  214. package/lib/typescript/src/utils/form.d.ts +0 -18
  215. package/lib/typescript/src/utils/queue.d.ts +0 -21
  216. package/lib/typescript/src/utils/storage.d.ts +0 -3
  217. package/lib/typescript/src/utils/tokens.d.ts +0 -4
  218. package/lib/typescript/src/utils/user-data.d.ts +0 -3
  219. package/react-native.podspec +0 -19
  220. package/src/assets/images/checkmark--filled.svg +0 -12
  221. package/src/assets/images/email-verify-waiting.svg +0 -36
  222. package/src/assets/images/error-icon-material.svg +0 -1
  223. package/src/assets/images/phone-verify-waiting.svg +0 -26
  224. package/src/components/AuthenticatedComponent.tsx +0 -30
  225. package/src/components/AutoSigninDialog.tsx +0 -131
  226. package/src/components/BottomSheetTextInput/BottomSheetTextInput.tsx +0 -57
  227. package/src/components/BottomSheetTextInput/index.ts +0 -5
  228. package/src/components/BottomSheetTextInput/types.ts +0 -3
  229. package/src/components/DarkText.tsx +0 -16
  230. package/src/components/DefaultContext.tsx +0 -278
  231. package/src/components/RowndComponents.tsx +0 -18
  232. package/src/components/RowndProvider.tsx +0 -56
  233. package/src/components/SignIn.tsx +0 -797
  234. package/src/components/images/CheckmarkFilled.tsx +0 -30
  235. package/src/components/images/EmailVerifyWaiting.tsx +0 -95
  236. package/src/components/images/ErrorIcon.tsx +0 -11
  237. package/src/components/images/PhoneVerifyWaiting.tsx +0 -74
  238. package/src/data/actions.ts +0 -21
  239. package/src/hooks/api.ts +0 -162
  240. package/src/hooks/debounce.ts +0 -36
  241. package/src/hooks/fingerprint.ts +0 -217
  242. package/src/hooks/index.ts +0 -7
  243. package/src/hooks/interval.ts +0 -25
  244. package/src/hooks/nav.tsx +0 -29
  245. package/src/index.tsx.bak +0 -26
  246. package/src/types.ts +0 -27
  247. package/src/utils/events.ts +0 -54
  248. package/src/utils/form.tsx +0 -64
  249. package/src/utils/queue.ts +0 -75
  250. package/src/utils/storage.ts +0 -7
  251. package/src/utils/tokens.ts +0 -26
  252. package/src/utils/user-data.ts +0 -15
@@ -1 +0,0 @@
1
- {"version":3,"names":["count","Queue","constructor","enqueue","item","push","dequeue","shift","size","length","AutoQueue","_cache","action","Promise","resolve","reject","payload","e"],"sources":["queue.ts"],"sourcesContent":["// import { logger } from \"./utils/log\";\n\nlet count = 0;\n\ntype QueueItem = {\n action: () => Promise<any>;\n resolve: (value?: any) => void;\n reject: (reason?: any) => void;\n count: number;\n};\n\nclass Queue {\n #_items: any[];\n constructor() {\n this.#_items = [];\n }\n enqueue(item: QueueItem | (() => Promise<any>)) {\n this.#_items.push(item);\n }\n dequeue(): any {\n return this.#_items.shift();\n }\n get size() {\n return this.#_items.length;\n }\n}\n\nclass AutoQueue<T> extends Queue {\n _cache: Record<string, unknown>;\n #_pendingPromise: boolean;\n constructor() {\n super();\n this.#_pendingPromise = false;\n this._cache = {};\n }\n\n enqueue(action: () => Promise<any>): Promise<T> {\n return new Promise((resolve, reject) => {\n super.enqueue({ action, resolve, reject, count: count++ });\n // logger.log('queued', count);\n this.dequeue();\n });\n }\n\n async dequeue() {\n if (this.#_pendingPromise) return false;\n\n const item = super.dequeue();\n\n if (!item) {\n this._cache = {};\n return false;\n }\n\n // logger.log('dequeued', item.count);\n\n try {\n this.#_pendingPromise = true;\n\n const payload = await item.action(this);\n\n this.#_pendingPromise = false;\n item.resolve(payload);\n } catch (e) {\n this.#_pendingPromise = false;\n item.reject(e);\n } finally {\n this.dequeue();\n }\n\n return true;\n }\n}\n\nexport default AutoQueue;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA,IAAIA,KAAK,GAAG,CAAZ;;;;AASA,MAAMC,KAAN,CAAY;EAEVC,WAAW,GAAG;IAAA;MAAA;MAAA;IAAA;;I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strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _reactNativeMmkv = require("react-native-mmkv");
9
-
10
- const storage = new _reactNativeMmkv.MMKV({
11
- id: 'rownd-storage'
12
- });
13
- var _default = storage;
14
- exports.default = _default;
15
- //# sourceMappingURL=storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["storage","MMKV","id"],"sources":["storage.ts"],"sourcesContent":["import { MMKV } from 'react-native-mmkv';\n\nconst storage = new MMKV({\n id: 'rownd-storage',\n});\n\nexport default storage;\n"],"mappings":";;;;;;;AAAA;;AAEA,MAAMA,OAAO,GAAG,IAAIC,qBAAJ,CAAS;EACvBC,EAAE,EAAE;AADmB,CAAT,CAAhB;eAIeF,O"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getAppId = getAppId;
7
- exports.getUserId = getUserId;
8
-
9
- var _jwtDecode = _interopRequireDefault(require("jwt-decode"));
10
-
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
- // Make sure token is always in a decoded form
14
- function normalizeToken(token) {
15
- if (typeof token === 'string') {
16
- return (0, _jwtDecode.default)(token);
17
- }
18
-
19
- return token;
20
- }
21
-
22
- function getAppId(token) {
23
- var _token, _token$aud, _token$aud$find;
24
-
25
- token = normalizeToken(token);
26
- return (_token = token) === null || _token === void 0 ? void 0 : (_token$aud = _token.aud) === null || _token$aud === void 0 ? void 0 : (_token$aud$find = _token$aud.find(aud => aud.startsWith('app:'))) === null || _token$aud$find === void 0 ? void 0 : _token$aud$find.substring(4);
27
- }
28
-
29
- function getUserId(token) {
30
- var _token2;
31
-
32
- token = normalizeToken(token);
33
- return (_token2 = token) === null || _token2 === void 0 ? void 0 : _token2.sub;
34
- }
35
- //# sourceMappingURL=tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["normalizeToken","token","jwt_decode","getAppId","aud","find","startsWith","substring","getUserId","sub"],"sources":["tokens.ts"],"sourcesContent":["import jwt_decode from 'jwt-decode';\n\ntype TokenInput = Record<string, any> | string;\n\n// Make sure token is always in a decoded form\nfunction normalizeToken(token: TokenInput): Record<string, any> {\n if (typeof token === 'string') {\n return jwt_decode(token);\n }\n\n return token;\n}\n\nexport function getAppId(token: TokenInput) {\n token = normalizeToken(token);\n\n return token?.aud\n ?.find((aud: string) => aud.startsWith('app:'))\n ?.substring(4);\n}\n\nexport function getUserId(token: TokenInput) {\n token = normalizeToken(token);\n\n return token?.sub;\n}\n"],"mappings":";;;;;;;;AAAA;;;;AAIA;AACA,SAASA,cAAT,CAAwBC,KAAxB,EAAgE;EAC9D,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;IAC7B,OAAO,IAAAC,kBAAA,EAAWD,KAAX,CAAP;EACD;;EAED,OAAOA,KAAP;AACD;;AAEM,SAASE,QAAT,CAAkBF,KAAlB,EAAqC;EAAA;;EAC1CA,KAAK,GAAGD,cAAc,CAACC,KAAD,CAAtB;EAEA,iBAAOA,KAAP,yDAAO,OAAOG,GAAd,kEAAO,WACHC,IADG,CACGD,GAAD,IAAiBA,GAAG,CAACE,UAAJ,CAAe,MAAf,CADnB,CAAP,oDAAO,gBAEHC,SAFG,CAEO,CAFP,CAAP;AAGD;;AAEM,SAASC,SAAT,CAAmBP,KAAnB,EAAsC;EAAA;;EAC3CA,KAAK,GAAGD,cAAc,CAACC,KAAD,CAAtB;EAEA,kBAAOA,KAAP,4CAAO,QAAOQ,GAAd;AACD"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.redactUserDataWithAcls = redactUserDataWithAcls;
7
-
8
- function redactUserDataWithAcls(userData, acls) {
9
- if (!userData) {
10
- return {};
11
- }
12
-
13
- return Object.entries(userData).reduce((acc, _ref) => {
14
- var _acls$key;
15
-
16
- let [key, value] = _ref;
17
- acc[key] = !(acls !== null && acls !== void 0 && acls[key]) || acls !== null && acls !== void 0 && (_acls$key = acls[key]) !== null && _acls$key !== void 0 && _acls$key.shared ? value : 'ROWND_REDACTED';
18
- return acc;
19
- }, {});
20
- }
21
- //# sourceMappingURL=user-data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["redactUserDataWithAcls","userData","acls","Object","entries","reduce","acc","key","value","shared"],"sources":["user-data.ts"],"sourcesContent":["export function redactUserDataWithAcls(\n userData: Record<string, any> | undefined | null,\n acls: Record<string, { shared: boolean }> | undefined | null\n): Record<string, any> {\n if (!userData) {\n return {};\n }\n return Object.entries(userData).reduce(\n (acc: Record<string, any>, [key, value]) => {\n acc[key] = !acls?.[key] || acls?.[key]?.shared ? value : 'ROWND_REDACTED';\n return acc;\n },\n {}\n );\n}\n"],"mappings":";;;;;;;AAAO,SAASA,sBAAT,CACLC,QADK,EAELC,IAFK,EAGgB;EACrB,IAAI,CAACD,QAAL,EAAe;IACb,OAAO,EAAP;EACD;;EACD,OAAOE,MAAM,CAACC,OAAP,CAAeH,QAAf,EAAyBI,MAAzB,CACL,CAACC,GAAD,WAA4C;IAAA;;IAAA,IAAjB,CAACC,GAAD,EAAMC,KAAN,CAAiB;IAC1CF,GAAG,CAACC,GAAD,CAAH,GAAW,EAACL,IAAD,aAACA,IAAD,eAACA,IAAI,CAAGK,GAAH,CAAL,KAAgBL,IAAhB,aAAgBA,IAAhB,4BAAgBA,IAAI,CAAGK,GAAH,CAApB,sCAAgB,UAAaE,MAA7B,GAAsCD,KAAtC,GAA8C,gBAAzD;IACA,OAAOF,GAAP;EACD,CAJI,EAKL,EALK,CAAP;AAOD"}
@@ -1,12 +0,0 @@
1
- <svg id="icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
- <defs>
3
- <style>
4
- .cls-1 {
5
- fill: none;
6
- }
7
- </style>
8
- </defs>
9
- <path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"/>
10
- <polygon id="inner-path" class="cls-1" points="14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591"/>
11
- <rect id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" class="cls-1" width="32" height="32"/>
12
- </svg>
@@ -1,36 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="79px" height="68px" viewBox="0 0 79 68" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>Group</title>
4
- <defs>
5
- <rect id="path-1" x="9.69736842" y="6.17105263" width="53.7763158" height="45.8421053" rx="8"></rect>
6
- <filter x="-27.0%" y="-20.7%" width="153.9%" height="163.3%" filterUnits="objectBoundingBox" id="filter-2">
7
- <feOffset dx="0" dy="5" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
8
- <feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
9
- <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
10
- </filter>
11
- <path d="M1.49198314,22.8826009 L27.3602885,37.5009111 C33.5004408,40.9707422 41.014234,40.9500831 47.1352131,37.4465401 L72.5558685,22.8961951 C73.0351888,22.6218404 73.6461631,22.7879979 73.9205178,23.2673182 C74.007089,23.4185653 74.0526316,23.5898106 74.0526316,23.7640813 L74.0526316,63 C74.0526316,65.209139 72.2617706,67 70.0526316,67 L4,67 C1.790861,67 2.705415e-16,65.209139 0,63 L0,23.7532056 C8.43762138e-16,23.2009209 0.44771525,22.7532056 1,22.7532056 C1.17240673,22.7532056 1.34188502,22.7977797 1.49198314,22.8826009 Z" id="path-3"></path>
12
- <filter x="-4.7%" y="-8.4%" width="109.5%" height="114.0%" filterUnits="objectBoundingBox" id="filter-4">
13
- <feOffset dx="0" dy="-1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
14
- <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
15
- <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
16
- </filter>
17
- </defs>
18
- <g id="V2-post--feedback" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
19
- <g id="xlg-1312px-16-column-copy-96" transform="translate(-616.000000, -265.000000)">
20
- <g id="Group" transform="translate(618.000000, 265.000000)">
21
- <path d="M1.1333848,21.7417845 L33.0948714,2.49908682 C35.6464021,0.96291506 38.8400625,0.97130271 41.383489,2.52085558 L72.9358668,21.743773 C73.4075139,22.0311185 73.5569199,22.6464036 73.2695744,23.1180507 C73.2235298,23.1936281 73.1676563,23.2627588 73.1034181,23.3236315 L37.2457723,57.3026316 L37.2457723,57.3026316 L0.965647178,23.3284209 C0.562522036,22.9509179 0.54175124,22.3180937 0.919254307,21.9149685 C0.982302388,21.8476412 1.0543624,21.7893607 1.1333848,21.7417845 Z" id="Path-28" fill="#545454"></path>
22
- <g id="Rectangle">
23
- <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
24
- <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
25
- </g>
26
- <rect id="Rectangle" fill-opacity="0.4" fill="#D8D8D8" x="18.5131579" y="19.3947368" width="36.1447368" height="3.52631579"></rect>
27
- <rect id="Rectangle-Copy" fill-opacity="0.4" fill="#D8D8D8" x="18.5131579" y="27.3289474" width="36.1447368" height="26.4473684"></rect>
28
- <g id="Rectangle">
29
- <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
30
- <use fill="#646464" fill-rule="evenodd" xlink:href="#path-3"></use>
31
- </g>
32
- <path d="M23.2845382,51.744338 L1.76315789,67 L1.76315789,67 L71.4078947,67 L49.8865144,51.744338 C41.9186006,46.0961966 31.252452,46.0961966 23.2845382,51.744338 Z" id="Path-29" fill="#545454"></path>
33
- </g>
34
- </g>
35
- </g>
36
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M24 34q.7 0 1.175-.475.475-.475.475-1.175 0-.7-.475-1.175Q24.7 30.7 24 30.7q-.7 0-1.175.475-.475.475-.475 1.175 0 .7.475 1.175Q23.3 34 24 34Zm-1.35-7.65h3V13.7h-3ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z"/></svg>
@@ -1,26 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="62px" height="100px" viewBox="0 0 62 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>unverified-phone</title>
4
- <defs>
5
- <rect id="path-1" x="0" y="0" width="58" height="96" rx="8"></rect>
6
- <filter x="-5.2%" y="-3.1%" width="110.3%" height="106.2%" filterUnits="objectBoundingBox" id="filter-2">
7
- <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
8
- <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
9
- <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
10
- </filter>
11
- </defs>
12
- <g id="SMS-verify-from-web-stay-on-web-(BR)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
13
- <g id="xlg-1312px-16-column-copy-51" transform="translate(-625.000000, -259.000000)">
14
- <g id="unverified-phone" transform="translate(627.000000, 261.000000)">
15
- <g id="Rectangle">
16
- <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
17
- <use fill="#444444" fill-rule="evenodd" xlink:href="#path-1"></use>
18
- </g>
19
- <circle id="Oval" fill="#000000" cx="29" cy="89" r="5"></circle>
20
- <rect id="Rectangle" fill="#FFFFFF" x="5" y="11" width="48" height="71" rx="2"></rect>
21
- <rect id="Rectangle" fill-opacity="0.4" fill="#D8D8D8" x="10" y="20" width="38" height="5"></rect>
22
- <rect id="Rectangle-Copy" fill-opacity="0.4" fill="#D8D8D8" x="10" y="31" width="38" height="36"></rect>
23
- </g>
24
- </g>
25
- </g>
26
- </svg>
@@ -1,24 +0,0 @@
1
- import React, { useEffect } from 'react';
2
-
3
- const {
4
- useRownd
5
- } = require('../hooks/rownd');
6
-
7
- export default function (_ref) {
8
- let {
9
- shouldRequestSignIn,
10
- renderContentWhenUnauthenticated,
11
- children
12
- } = _ref;
13
- const {
14
- is_authenticated,
15
- requestSignIn
16
- } = useRownd();
17
- useEffect(() => {
18
- if (shouldRequestSignIn && !is_authenticated) {
19
- requestSignIn();
20
- }
21
- }, [is_authenticated, requestSignIn, shouldRequestSignIn]);
22
- return /*#__PURE__*/React.createElement(React.Fragment, null, (is_authenticated || renderContentWhenUnauthenticated) && /*#__PURE__*/React.createElement(React.Fragment, null, children));
23
- }
24
- //# sourceMappingURL=AuthenticatedComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useEffect","useRownd","require","shouldRequestSignIn","renderContentWhenUnauthenticated","children","is_authenticated","requestSignIn"],"sources":["AuthenticatedComponent.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nconst { useRownd } = require('../hooks/rownd');\n\ninterface IAuthenticatedComponentProps {\n shouldRequestSignIn?: boolean;\n renderContentWhenUnauthenticated?: boolean;\n}\n\nexport default function ({\n shouldRequestSignIn,\n renderContentWhenUnauthenticated,\n children,\n}: React.PropsWithChildren<IAuthenticatedComponentProps>) {\n const { is_authenticated, requestSignIn } = useRownd();\n\n useEffect(() => {\n if (shouldRequestSignIn && !is_authenticated) {\n requestSignIn();\n }\n }, [is_authenticated, requestSignIn, shouldRequestSignIn]);\n\n return (\n <>\n {(is_authenticated || renderContentWhenUnauthenticated) && (\n <>{children}</>\n )}\n </>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;;AAEA,MAAM;EAAEC;AAAF,IAAeC,OAAO,CAAC,gBAAD,CAA5B;;AAOA,eAAe,gBAI2C;EAAA,IAJjC;IACvBC,mBADuB;IAEvBC,gCAFuB;IAGvBC;EAHuB,CAIiC;EACxD,MAAM;IAAEC,gBAAF;IAAoBC;EAApB,IAAsCN,QAAQ,EAApD;EAEAD,SAAS,CAAC,MAAM;IACd,IAAIG,mBAAmB,IAAI,CAACG,gBAA5B,EAA8C;MAC5CC,aAAa;IACd;EACF,CAJQ,EAIN,CAACD,gBAAD,EAAmBC,aAAnB,EAAkCJ,mBAAlC,CAJM,CAAT;EAMA,oBACE,0CACG,CAACG,gBAAgB,IAAIF,gCAArB,kBACC,0CAAGC,QAAH,CAFJ,CADF;AAOD"}
@@ -1,110 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
- import React, { useMemo, useCallback, useEffect, useRef } from 'react';
4
- import { View, Text, StyleSheet, ActivityIndicator } from 'react-native';
5
- import { BottomSheetBackdrop, BottomSheetModal } from '@gorhom/bottom-sheet';
6
- import bottomSheetMeta from '@gorhom/bottom-sheet/package.json';
7
- import { useTimeout } from 'usehooks-ts';
8
- import { useNav } from '../hooks';
9
- import { useGlobalContext } from './GlobalContext';
10
- import ErrorIcon from './images/ErrorIcon';
11
- export function AutoSigninDialog() {
12
- var _state$nav3, _state$nav3$options, _state$nav4, _state$nav4$options;
13
-
14
- const navTo = useNav();
15
- const {
16
- state
17
- } = useGlobalContext(); // Let the user know they're auto signing-in, then close when done
18
-
19
- useTimeout(() => {
20
- var _state$nav, _state$nav$options;
21
-
22
- if ((state === null || state === void 0 ? void 0 : (_state$nav = state.nav) === null || _state$nav === void 0 ? void 0 : (_state$nav$options = _state$nav.options) === null || _state$nav$options === void 0 ? void 0 : _state$nav$options.type) === 'error') {
23
- return;
24
- }
25
-
26
- handleClose();
27
- }, 3000);
28
- const bottomSheetModalRef = useRef(null);
29
- useEffect(() => {
30
- if (bottomSheetModalRef.current) {
31
- bottomSheetModalRef.current.present();
32
- }
33
- }, []);
34
- const handleClose = useCallback(() => {
35
- setTimeout(() => {
36
- navTo({
37
- hide: true
38
- });
39
- }, 150);
40
- }, [navTo]);
41
- const snapPoints = useMemo(() => ['30%', '60%'], []);
42
- const renderBackdrop = useCallback(props => /*#__PURE__*/React.createElement(BottomSheetBackdrop, _extends({}, props, {
43
- pressBehavior: "none"
44
- })), []);
45
- let extraBottomSheetProps = {};
46
-
47
- if (bottomSheetMeta.version.startsWith('4')) {
48
- var _state$nav2, _state$nav2$options;
49
-
50
- extraBottomSheetProps.keyboardBehavior = 'fillParent';
51
- extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';
52
- extraBottomSheetProps.enablePanDownToClose = (state === null || state === void 0 ? void 0 : (_state$nav2 = state.nav) === null || _state$nav2 === void 0 ? void 0 : (_state$nav2$options = _state$nav2.options) === null || _state$nav2$options === void 0 ? void 0 : _state$nav2$options.type) === 'error';
53
- }
54
-
55
- return /*#__PURE__*/React.createElement(BottomSheetModal, _extends({
56
- snapPoints: snapPoints,
57
- index: 0,
58
- backdropComponent: renderBackdrop,
59
- onDismiss: handleClose,
60
- style: styles.bottomSheet,
61
- ref: bottomSheetModalRef
62
- }, extraBottomSheetProps), /*#__PURE__*/React.createElement(View, {
63
- style: styles.innerContainer
64
- }, (state === null || state === void 0 ? void 0 : (_state$nav3 = state.nav) === null || _state$nav3 === void 0 ? void 0 : (_state$nav3$options = _state$nav3.options) === null || _state$nav3$options === void 0 ? void 0 : _state$nav3$options.type) === 'error' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ErrorIcon, null), /*#__PURE__*/React.createElement(Text, {
65
- style: styles.errorMessage
66
- }, state.nav.options.message || 'An error occurred. Please try again.')), (state === null || state === void 0 ? void 0 : (_state$nav4 = state.nav) === null || _state$nav4 === void 0 ? void 0 : (_state$nav4$options = _state$nav4.options) === null || _state$nav4$options === void 0 ? void 0 : _state$nav4$options.type) === 'sign-in' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActivityIndicator, {
67
- size: "large",
68
- color: "#5b0ae0"
69
- }), /*#__PURE__*/React.createElement(Text, {
70
- style: styles.signInMessage
71
- }, "Automatically signing you in. Just a sec..."))));
72
- }
73
- const styles = StyleSheet.create({
74
- modal: {// flex: 1,
75
- },
76
- bottomSheet: {
77
- shadowColor: '#000',
78
- shadowOffset: {
79
- width: 0,
80
- height: 12
81
- },
82
- shadowOpacity: 0.58,
83
- shadowRadius: 16.0,
84
- elevation: 24
85
- },
86
- innerContainer: {
87
- borderRadius: 20,
88
- borderColor: 'transparent',
89
- borderWidth: 0,
90
- padding: 25,
91
- textAlign: 'center'
92
- },
93
- signInMessage: {
94
- textAlign: 'center',
95
- fontSize: 24,
96
- padding: 20
97
- },
98
- errorMessage: {
99
- textAlign: 'center',
100
- fontSize: 24,
101
- padding: 20
102
- },
103
- errorIcon: {
104
- textAlign: 'center',
105
- color: '#DA1E28',
106
- height: 24,
107
- width: 24
108
- }
109
- });
110
- //# sourceMappingURL=AutoSigninDialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useMemo","useCallback","useEffect","useRef","View","Text","StyleSheet","ActivityIndicator","BottomSheetBackdrop","BottomSheetModal","bottomSheetMeta","useTimeout","useNav","useGlobalContext","ErrorIcon","AutoSigninDialog","navTo","state","nav","options","type","handleClose","bottomSheetModalRef","current","present","setTimeout","hide","snapPoints","renderBackdrop","props","extraBottomSheetProps","version","startsWith","keyboardBehavior","android_keyboardInputMode","enablePanDownToClose","styles","bottomSheet","innerContainer","errorMessage","message","signInMessage","create","modal","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","borderRadius","borderColor","borderWidth","padding","textAlign","fontSize","errorIcon","color"],"sources":["AutoSigninDialog.tsx"],"sourcesContent":["import React, { useMemo, useCallback, useEffect, useRef } from 'react';\nimport { View, Text, StyleSheet, ActivityIndicator } from 'react-native';\nimport {\n BottomSheetBackdrop,\n BottomSheetBackdropProps,\n BottomSheetModal,\n} from '@gorhom/bottom-sheet';\nimport bottomSheetMeta from '@gorhom/bottom-sheet/package.json';\nimport { useTimeout } from 'usehooks-ts';\n\nimport { useNav } from '../hooks';\nimport { useGlobalContext } from './GlobalContext';\n\nimport ErrorIcon from './images/ErrorIcon';\n\nexport function AutoSigninDialog() {\n const navTo = useNav();\n const { state } = useGlobalContext();\n\n // Let the user know they're auto signing-in, then close when done\n useTimeout(() => {\n if (state?.nav?.options?.type === 'error') {\n return;\n }\n\n handleClose();\n }, 3000);\n\n const bottomSheetModalRef = useRef<BottomSheetModal>(null);\n useEffect(() => {\n if (bottomSheetModalRef.current) {\n bottomSheetModalRef.current.present();\n }\n }, []);\n\n const handleClose = useCallback(() => {\n setTimeout(() => {\n navTo({ hide: true });\n }, 150);\n }, [navTo]);\n\n const snapPoints = useMemo(() => ['30%', '60%'], []);\n\n const renderBackdrop = useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop {...props} pressBehavior=\"none\" />\n ),\n []\n );\n\n let extraBottomSheetProps: any = {};\n if (bottomSheetMeta.version.startsWith('4')) {\n extraBottomSheetProps.keyboardBehavior = 'fillParent';\n extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';\n extraBottomSheetProps.enablePanDownToClose =\n state?.nav?.options?.type === 'error';\n }\n\n return (\n <BottomSheetModal\n snapPoints={snapPoints}\n index={0}\n backdropComponent={renderBackdrop}\n onDismiss={handleClose}\n style={styles.bottomSheet}\n ref={bottomSheetModalRef}\n {...extraBottomSheetProps}\n >\n <View style={styles.innerContainer}>\n {state?.nav?.options?.type === 'error' && (\n <>\n <ErrorIcon />\n <Text style={styles.errorMessage}>\n {state.nav.options.message ||\n 'An error occurred. Please try again.'}\n </Text>\n </>\n )}\n\n {state?.nav?.options?.type === 'sign-in' && (\n <>\n <ActivityIndicator size=\"large\" color=\"#5b0ae0\" />\n <Text style={styles.signInMessage}>\n Automatically signing you in. Just a sec...\n </Text>\n </>\n )}\n </View>\n </BottomSheetModal>\n );\n}\n\nconst styles = StyleSheet.create({\n modal: {\n // flex: 1,\n },\n bottomSheet: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 12,\n },\n shadowOpacity: 0.58,\n shadowRadius: 16.0,\n\n elevation: 24,\n },\n innerContainer: {\n borderRadius: 20,\n borderColor: 'transparent',\n borderWidth: 0,\n padding: 25,\n textAlign: 'center',\n },\n signInMessage: {\n textAlign: 'center',\n fontSize: 24,\n padding: 20,\n },\n errorMessage: {\n textAlign: 'center',\n fontSize: 24,\n padding: 20,\n },\n errorIcon: {\n textAlign: 'center',\n color: '#DA1E28',\n height: 24,\n width: 24,\n },\n});\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,EAAyBC,WAAzB,EAAsCC,SAAtC,EAAiDC,MAAjD,QAA+D,OAA/D;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,UAArB,EAAiCC,iBAAjC,QAA0D,cAA1D;AACA,SACEC,mBADF,EAGEC,gBAHF,QAIO,sBAJP;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AI/BN,WAAW,EAAE;IACXO,WAAW,EAAE,MADF;IAEXC,YAAY,EAAE;MACZC,KAAK,EAAE,CADK;MAEZC,MAAM,EAAE;IAFI,CAFH;IAMXC,aAAa,EAAE,IANJ;IAOXC,YAAY,EAAE,IAPH;IASXC,SAAS,EAAE;EATA,CAJkB;EAe/BZ,cAAc,EAAE;IACda,YAAY,EAAE,EADA;IAEdC,WAAW,EAAE,aAFC;IAGdC,WAAW,EAAE,CAHC;IAIdC,OAAO,EAAE,EAJK;IAKdC,SAAS,EAAE;EALG,CAfe;EAsB/Bd,aAAa,EAAE;IACbc,SAAS,EAAE,QADE;IAEbC,QAAQ,EAAE,EAFG;IAGbF,OAAO,EAAE;EAHI,CAtBgB;EA2B/Bf,YAAY,EAAE;IACZgB,SAAS,EAAE,QADC;IAEZC,QAAQ,EAAE,EAFE;IAGZF,OAAO,EAAE;EAHG,CA3BiB;EAgC/BG,SAAS,EAAE;IACTF,SAAS,EAAE,QADF;IAETG,KAAK,EAAE,SAFE;IAGTX,MAAM,EAAE,EAHC;IAITD,KAAK,EAAE;EAJE;AAhCoB,CAAlB,CAAf"}
@@ -1,52 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
- import React, { memo, useCallback, forwardRef } from 'react';
4
- import { TextInput } from 'react-native-gesture-handler';
5
-
6
- // @ts-ignore
7
- const {
8
- useBottomSheetInternal
9
- } = require('@gorhom/bottom-sheet/src/hooks/useBottomSheetInternal');
10
-
11
- const BottomSheetTextInputComponent = /*#__PURE__*/forwardRef((_ref, ref) => {
12
- let {
13
- onFocus,
14
- onBlur,
15
- ...rest
16
- } = _ref;
17
- //#region hooks
18
- // @ts-ignore
19
- let {
20
- shouldHandleKeyboardEvents
21
- } = useBottomSheetInternal(); //#endregion
22
-
23
- if (!shouldHandleKeyboardEvents) {
24
- shouldHandleKeyboardEvents = {};
25
- } //#region callbacks
26
-
27
-
28
- const handleOnFocus = useCallback(args => {
29
- shouldHandleKeyboardEvents.value = true;
30
-
31
- if (onFocus) {
32
- onFocus(args);
33
- }
34
- }, [onFocus, shouldHandleKeyboardEvents]);
35
- const handleOnBlur = useCallback(args => {
36
- shouldHandleKeyboardEvents.value = false;
37
-
38
- if (onBlur) {
39
- onBlur(args);
40
- }
41
- }, [onBlur, shouldHandleKeyboardEvents]); //#endregion
42
-
43
- return /*#__PURE__*/React.createElement(TextInput, _extends({
44
- ref: ref,
45
- onFocus: handleOnFocus,
46
- onBlur: handleOnBlur
47
- }, rest));
48
- });
49
- const BottomSheetTextInput = /*#__PURE__*/memo(BottomSheetTextInputComponent);
50
- BottomSheetTextInput.displayName = 'BottomSheetTextInput';
51
- export default BottomSheetTextInput;
52
- //# sourceMappingURL=BottomSheetTextInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","memo","useCallback","forwardRef","TextInput","useBottomSheetInternal","require","BottomSheetTextInputComponent","ref","onFocus","onBlur","rest","shouldHandleKeyboardEvents","handleOnFocus","args","value","handleOnBlur","BottomSheetTextInput","displayName"],"sources":["BottomSheetTextInput.tsx"],"sourcesContent":["import React, { memo, useCallback, forwardRef } from 'react';\nimport { TextInput } from 'react-native-gesture-handler';\nimport { BottomSheetTextInputProps } from './types';\n\n// @ts-ignore\nconst {\n useBottomSheetInternal,\n} = require('@gorhom/bottom-sheet/src/hooks/useBottomSheetInternal');\n\nconst BottomSheetTextInputComponent = forwardRef<\n TextInput,\n BottomSheetTextInputProps\n>(({ onFocus, onBlur, ...rest }, ref) => {\n //#region hooks\n // @ts-ignore\n let { shouldHandleKeyboardEvents } = useBottomSheetInternal();\n //#endregion\n\n if (!shouldHandleKeyboardEvents) {\n shouldHandleKeyboardEvents = {};\n }\n\n //#region callbacks\n const handleOnFocus = useCallback(\n (args) => {\n shouldHandleKeyboardEvents.value = true;\n if (onFocus) {\n onFocus(args);\n }\n },\n [onFocus, shouldHandleKeyboardEvents]\n );\n const handleOnBlur = useCallback(\n (args) => {\n shouldHandleKeyboardEvents.value = false;\n if (onBlur) {\n onBlur(args);\n }\n },\n [onBlur, shouldHandleKeyboardEvents]\n );\n //#endregion\n\n return (\n <TextInput\n ref={ref}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n {...rest}\n />\n );\n});\n\nconst BottomSheetTextInput = memo(BottomSheetTextInputComponent);\nBottomSheetTextInput.displayName = 'BottomSheetTextInput';\n\nexport default BottomSheetTextInput;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,IAAhB,EAAsBC,WAAtB,EAAmCC,UAAnC,QAAqD,OAArD;AACA,SAASC,SAAT,QAA0B,8BAA1B;;AAGA;AACA,MAAM;EACJC;AADI,IAEFC,OAAO,CAAC,uDAAD,CAFX;;AAIA,MAAMC,6BAA6B,gBAAGJ,UAAU,CAG9C,OAA+BK,GAA/B,KAAuC;EAAA,IAAtC;IAAEC,OAAF;IAAWC,MAAX;IAAmB,GAAGC;EAAtB,CAAsC;EACvC;EACA;EACA,IAAI;IAAEC;EAAF,IAAiCP,sBAAsB,EAA3D,CAHuC,CAIvC;;EAEA,IAAI,CAACO,0BAAL,EAAiC;IAC/BA,0BAA0B,GAAG,EAA7B;EACD,CARsC,CAUvC;;;EACA,MAAMC,aAAa,GAAGX,WAAW,CAC9BY,IAAD,IAAU;IACRF,0BAA0B,CAACG,KAA3B,GAAmC,IAAnC;;IACA,IAAIN,OAAJ,EAAa;MACXA,OAAO,CAACK,IAAD,CAAP;IACD;EACF,CAN8B,EAO/B,CAACL,OAAD,EAAUG,0BAAV,CAP+B,CAAjC;EASA,MAAMI,YAAY,GAAGd,WAAW,CAC7BY,IAAD,IAAU;IACRF,0BAA0B,CAACG,KAA3B,GAAmC,KAAnC;;IACA,IAAIL,MAAJ,EAAY;MACVA,MAAM,CAACI,IAAD,CAAN;IACD;EACF,CAN6B,EAO9B,CAACJ,MAAD,EAASE,0BAAT,CAP8B,CAAhC,CApBuC,CA6BvC;;EAEA,oBACE,oBAAC,SAAD;IACE,GAAG,EAAEJ,GADP;IAEE,OAAO,EAAEK,aAFX;IAGE,MAAM,EAAEG;EAHV,GAIML,IAJN,EADF;AAQD,CA1C+C,CAAhD;AA4CA,MAAMM,oBAAoB,gBAAGhB,IAAI,CAACM,6BAAD,CAAjC;AACAU,oBAAoB,CAACC,WAArB,GAAmC,sBAAnC;AAEA,eAAeD,oBAAf"}
@@ -1,5 +0,0 @@
1
- // @ts-ignore
2
- export { default } from './BottomSheetTextInput'; // @ts-ignore
3
-
4
- export { BottomSheetTextInputProps } from './types';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["default","BottomSheetTextInputProps"],"sources":["index.ts"],"sourcesContent":["// @ts-ignore\nexport { default } from './BottomSheetTextInput';\n\n// @ts-ignore\nexport { BottomSheetTextInputProps } from './types';\n"],"mappings":"AAAA;AACA,SAASA,OAAT,QAAwB,wBAAxB,C,CAEA;;AACA,SAASC,yBAAT,QAA0C,SAA1C"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { TextInputProps } from 'react-native';\n\nexport interface BottomSheetTextInputProps extends TextInputProps {}\n"],"mappings":""}
@@ -1,24 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
- import React from 'react';
4
- import { Text } from 'react-native';
5
- export default function DarkText(_ref) {
6
- let {
7
- style,
8
- children,
9
- ...rest
10
- } = _ref;
11
-
12
- if (style) {
13
- style.color = '#000000';
14
- } else {
15
- style = {
16
- color: '#000000'
17
- };
18
- }
19
-
20
- return /*#__PURE__*/React.createElement(Text, _extends({
21
- style: style
22
- }, rest), children);
23
- }
24
- //# sourceMappingURL=DarkText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Text","DarkText","style","children","rest","color"],"sources":["DarkText.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TextProps, TextStyle } from 'react-native';\n\nexport default function DarkText({ style, children, ...rest }: TextProps) {\n if (style) {\n (style as TextStyle).color = '#000000';\n } else {\n style = { color: '#000000' };\n }\n\n return (\n <Text style={style} {...rest}>\n {children}\n </Text>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAA2C,cAA3C;AAEA,eAAe,SAASC,QAAT,OAA2D;EAAA,IAAzC;IAAEC,KAAF;IAASC,QAAT;IAAmB,GAAGC;EAAtB,CAAyC;;EACxE,IAAIF,KAAJ,EAAW;IACRA,KAAD,CAAqBG,KAArB,GAA6B,SAA7B;EACD,CAFD,MAEO;IACLH,KAAK,GAAG;MAAEG,KAAK,EAAE;IAAT,CAAR;EACD;;EAED,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEH;EAAb,GAAwBE,IAAxB,GACGD,QADH,CADF;AAKD"}