@thenovaweb/druid-ogold-rn-sdk 0.0.6

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 (400) hide show
  1. package/README.md +58 -0
  2. package/lib/commonjs/@types/react-navigation.d.js +4 -0
  3. package/lib/commonjs/@types/react-navigation.d.js.map +1 -0
  4. package/lib/commonjs/assets/data/countries.json +802 -0
  5. package/lib/commonjs/assets/data/enhanced.json +119 -0
  6. package/lib/commonjs/assets/data/form.json +155 -0
  7. package/lib/commonjs/assets/images/center.jpg +0 -0
  8. package/lib/commonjs/assets/images/doc-outlined.png +0 -0
  9. package/lib/commonjs/assets/images/icons8-error-64.png +0 -0
  10. package/lib/commonjs/assets/images/light-off.png +0 -0
  11. package/lib/commonjs/assets/images/live-outlined.png +0 -0
  12. package/lib/commonjs/assets/images/live.png +0 -0
  13. package/lib/commonjs/assets/images/loader.gif +0 -0
  14. package/lib/commonjs/assets/images/not-live.png +0 -0
  15. package/lib/commonjs/assets/images/nova.png +0 -0
  16. package/lib/commonjs/assets/images/ogold.png +0 -0
  17. package/lib/commonjs/assets/images/overlay.png +0 -0
  18. package/lib/commonjs/assets/images/pending.png +0 -0
  19. package/lib/commonjs/assets/images/rejected.png +0 -0
  20. package/lib/commonjs/assets/images/three-dots-white.png +0 -0
  21. package/lib/commonjs/assets/images/verified.png +0 -0
  22. package/lib/commonjs/assets/themes/oGold.json +30 -0
  23. package/lib/commonjs/assets/themes/styles.js +94 -0
  24. package/lib/commonjs/assets/themes/styles.js.map +1 -0
  25. package/lib/commonjs/components/BasicInput.js +106 -0
  26. package/lib/commonjs/components/BasicInput.js.map +1 -0
  27. package/lib/commonjs/components/BlurBackground.js +34 -0
  28. package/lib/commonjs/components/BlurBackground.js.map +1 -0
  29. package/lib/commonjs/components/Camera.js +361 -0
  30. package/lib/commonjs/components/Camera.js.map +1 -0
  31. package/lib/commonjs/components/Checkbox.js +132 -0
  32. package/lib/commonjs/components/Checkbox.js.map +1 -0
  33. package/lib/commonjs/components/DatePicker.js +146 -0
  34. package/lib/commonjs/components/DatePicker.js.map +1 -0
  35. package/lib/commonjs/components/DropdownComponent.js +229 -0
  36. package/lib/commonjs/components/DropdownComponent.js.map +1 -0
  37. package/lib/commonjs/components/FaceOverlay.js +47 -0
  38. package/lib/commonjs/components/FaceOverlay.js.map +1 -0
  39. package/lib/commonjs/components/FadeBorder.js +53 -0
  40. package/lib/commonjs/components/FadeBorder.js.map +1 -0
  41. package/lib/commonjs/components/Field.js +58 -0
  42. package/lib/commonjs/components/Field.js.map +1 -0
  43. package/lib/commonjs/components/Loader.js +43 -0
  44. package/lib/commonjs/components/Loader.js.map +1 -0
  45. package/lib/commonjs/components/NavHeader.js +47 -0
  46. package/lib/commonjs/components/NavHeader.js.map +1 -0
  47. package/lib/commonjs/components/Navigator.js +171 -0
  48. package/lib/commonjs/components/Navigator.js.map +1 -0
  49. package/lib/commonjs/components/Section.js +43 -0
  50. package/lib/commonjs/components/Section.js.map +1 -0
  51. package/lib/commonjs/components/SelectImage.js +204 -0
  52. package/lib/commonjs/components/SelectImage.js.map +1 -0
  53. package/lib/commonjs/components/TextDivider.js +43 -0
  54. package/lib/commonjs/components/TextDivider.js.map +1 -0
  55. package/lib/commonjs/components/Toaster.js +29 -0
  56. package/lib/commonjs/components/Toaster.js.map +1 -0
  57. package/lib/commonjs/index.js +112 -0
  58. package/lib/commonjs/index.js.map +1 -0
  59. package/lib/commonjs/package.json +1 -0
  60. package/lib/commonjs/screens/DocumentsScreen.js +214 -0
  61. package/lib/commonjs/screens/DocumentsScreen.js.map +1 -0
  62. package/lib/commonjs/screens/ErrorScreen.js +47 -0
  63. package/lib/commonjs/screens/ErrorScreen.js.map +1 -0
  64. package/lib/commonjs/screens/FormScreen.js +149 -0
  65. package/lib/commonjs/screens/FormScreen.js.map +1 -0
  66. package/lib/commonjs/screens/ImageUploadScreen.js +240 -0
  67. package/lib/commonjs/screens/ImageUploadScreen.js.map +1 -0
  68. package/lib/commonjs/screens/LivenessScreen.js +268 -0
  69. package/lib/commonjs/screens/LivenessScreen.js.map +1 -0
  70. package/lib/commonjs/screens/ReportScreen.js +349 -0
  71. package/lib/commonjs/screens/ReportScreen.js.map +1 -0
  72. package/lib/commonjs/screens/SuccessScreen.js +99 -0
  73. package/lib/commonjs/screens/SuccessScreen.js.map +1 -0
  74. package/lib/commonjs/screens/WelcomeScreen.js +226 -0
  75. package/lib/commonjs/screens/WelcomeScreen.js.map +1 -0
  76. package/lib/commonjs/state/hooks.js +10 -0
  77. package/lib/commonjs/state/hooks.js.map +1 -0
  78. package/lib/commonjs/state/slices/confidenceSlice.js +67 -0
  79. package/lib/commonjs/state/slices/confidenceSlice.js.map +1 -0
  80. package/lib/commonjs/state/slices/customerSlice.js +99 -0
  81. package/lib/commonjs/state/slices/customerSlice.js.map +1 -0
  82. package/lib/commonjs/state/slices/enhancedSlice.js +27 -0
  83. package/lib/commonjs/state/slices/enhancedSlice.js.map +1 -0
  84. package/lib/commonjs/state/slices/formSlice.js +111 -0
  85. package/lib/commonjs/state/slices/formSlice.js.map +1 -0
  86. package/lib/commonjs/state/slices/immutableOcrSlice.js +51 -0
  87. package/lib/commonjs/state/slices/immutableOcrSlice.js.map +1 -0
  88. package/lib/commonjs/state/slices/livenessSlice.js +54 -0
  89. package/lib/commonjs/state/slices/livenessSlice.js.map +1 -0
  90. package/lib/commonjs/state/slices/loaderSlice.js +32 -0
  91. package/lib/commonjs/state/slices/loaderSlice.js.map +1 -0
  92. package/lib/commonjs/state/slices/ocrSlice.js +447 -0
  93. package/lib/commonjs/state/slices/ocrSlice.js.map +1 -0
  94. package/lib/commonjs/state/slices/themeSlice.js +50 -0
  95. package/lib/commonjs/state/slices/themeSlice.js.map +1 -0
  96. package/lib/commonjs/state/store.js +31 -0
  97. package/lib/commonjs/state/store.js.map +1 -0
  98. package/lib/commonjs/utils/axios.js +35 -0
  99. package/lib/commonjs/utils/axios.js.map +1 -0
  100. package/lib/commonjs/utils/constants.js +43 -0
  101. package/lib/commonjs/utils/constants.js.map +1 -0
  102. package/lib/commonjs/utils/helpers.js +147 -0
  103. package/lib/commonjs/utils/helpers.js.map +1 -0
  104. package/lib/commonjs/utils/nonSliceHelpers.js +91 -0
  105. package/lib/commonjs/utils/nonSliceHelpers.js.map +1 -0
  106. package/lib/commonjs/utils/types.js +2 -0
  107. package/lib/commonjs/utils/types.js.map +1 -0
  108. package/lib/commonjs/utils/validators.js +47 -0
  109. package/lib/commonjs/utils/validators.js.map +1 -0
  110. package/lib/commonjs/utils/widgetUtility.js +111 -0
  111. package/lib/commonjs/utils/widgetUtility.js.map +1 -0
  112. package/lib/module/@types/react-navigation.d.js +4 -0
  113. package/lib/module/@types/react-navigation.d.js.map +1 -0
  114. package/lib/module/assets/data/countries.json +802 -0
  115. package/lib/module/assets/data/enhanced.json +119 -0
  116. package/lib/module/assets/data/form.json +155 -0
  117. package/lib/module/assets/images/center.jpg +0 -0
  118. package/lib/module/assets/images/doc-outlined.png +0 -0
  119. package/lib/module/assets/images/icons8-error-64.png +0 -0
  120. package/lib/module/assets/images/light-off.png +0 -0
  121. package/lib/module/assets/images/live-outlined.png +0 -0
  122. package/lib/module/assets/images/live.png +0 -0
  123. package/lib/module/assets/images/loader.gif +0 -0
  124. package/lib/module/assets/images/not-live.png +0 -0
  125. package/lib/module/assets/images/nova.png +0 -0
  126. package/lib/module/assets/images/ogold.png +0 -0
  127. package/lib/module/assets/images/overlay.png +0 -0
  128. package/lib/module/assets/images/pending.png +0 -0
  129. package/lib/module/assets/images/rejected.png +0 -0
  130. package/lib/module/assets/images/three-dots-white.png +0 -0
  131. package/lib/module/assets/images/verified.png +0 -0
  132. package/lib/module/assets/themes/oGold.json +30 -0
  133. package/lib/module/assets/themes/styles.js +89 -0
  134. package/lib/module/assets/themes/styles.js.map +1 -0
  135. package/lib/module/components/BasicInput.js +102 -0
  136. package/lib/module/components/BasicInput.js.map +1 -0
  137. package/lib/module/components/BlurBackground.js +30 -0
  138. package/lib/module/components/BlurBackground.js.map +1 -0
  139. package/lib/module/components/Camera.js +356 -0
  140. package/lib/module/components/Camera.js.map +1 -0
  141. package/lib/module/components/Checkbox.js +128 -0
  142. package/lib/module/components/Checkbox.js.map +1 -0
  143. package/lib/module/components/DatePicker.js +141 -0
  144. package/lib/module/components/DatePicker.js.map +1 -0
  145. package/lib/module/components/DropdownComponent.js +224 -0
  146. package/lib/module/components/DropdownComponent.js.map +1 -0
  147. package/lib/module/components/FaceOverlay.js +41 -0
  148. package/lib/module/components/FaceOverlay.js.map +1 -0
  149. package/lib/module/components/FadeBorder.js +49 -0
  150. package/lib/module/components/FadeBorder.js.map +1 -0
  151. package/lib/module/components/Field.js +53 -0
  152. package/lib/module/components/Field.js.map +1 -0
  153. package/lib/module/components/Loader.js +39 -0
  154. package/lib/module/components/Loader.js.map +1 -0
  155. package/lib/module/components/NavHeader.js +43 -0
  156. package/lib/module/components/NavHeader.js.map +1 -0
  157. package/lib/module/components/Navigator.js +166 -0
  158. package/lib/module/components/Navigator.js.map +1 -0
  159. package/lib/module/components/Section.js +38 -0
  160. package/lib/module/components/Section.js.map +1 -0
  161. package/lib/module/components/SelectImage.js +200 -0
  162. package/lib/module/components/SelectImage.js.map +1 -0
  163. package/lib/module/components/TextDivider.js +39 -0
  164. package/lib/module/components/TextDivider.js.map +1 -0
  165. package/lib/module/components/Toaster.js +24 -0
  166. package/lib/module/components/Toaster.js.map +1 -0
  167. package/lib/module/index.js +100 -0
  168. package/lib/module/index.js.map +1 -0
  169. package/lib/module/package.json +1 -0
  170. package/lib/module/screens/DocumentsScreen.js +208 -0
  171. package/lib/module/screens/DocumentsScreen.js.map +1 -0
  172. package/lib/module/screens/ErrorScreen.js +42 -0
  173. package/lib/module/screens/ErrorScreen.js.map +1 -0
  174. package/lib/module/screens/FormScreen.js +142 -0
  175. package/lib/module/screens/FormScreen.js.map +1 -0
  176. package/lib/module/screens/ImageUploadScreen.js +235 -0
  177. package/lib/module/screens/ImageUploadScreen.js.map +1 -0
  178. package/lib/module/screens/LivenessScreen.js +262 -0
  179. package/lib/module/screens/LivenessScreen.js.map +1 -0
  180. package/lib/module/screens/ReportScreen.js +344 -0
  181. package/lib/module/screens/ReportScreen.js.map +1 -0
  182. package/lib/module/screens/SuccessScreen.js +94 -0
  183. package/lib/module/screens/SuccessScreen.js.map +1 -0
  184. package/lib/module/screens/WelcomeScreen.js +220 -0
  185. package/lib/module/screens/WelcomeScreen.js.map +1 -0
  186. package/lib/module/state/hooks.js +6 -0
  187. package/lib/module/state/hooks.js.map +1 -0
  188. package/lib/module/state/slices/confidenceSlice.js +58 -0
  189. package/lib/module/state/slices/confidenceSlice.js.map +1 -0
  190. package/lib/module/state/slices/customerSlice.js +92 -0
  191. package/lib/module/state/slices/customerSlice.js.map +1 -0
  192. package/lib/module/state/slices/enhancedSlice.js +21 -0
  193. package/lib/module/state/slices/enhancedSlice.js.map +1 -0
  194. package/lib/module/state/slices/formSlice.js +102 -0
  195. package/lib/module/state/slices/formSlice.js.map +1 -0
  196. package/lib/module/state/slices/immutableOcrSlice.js +44 -0
  197. package/lib/module/state/slices/immutableOcrSlice.js.map +1 -0
  198. package/lib/module/state/slices/livenessSlice.js +47 -0
  199. package/lib/module/state/slices/livenessSlice.js.map +1 -0
  200. package/lib/module/state/slices/loaderSlice.js +25 -0
  201. package/lib/module/state/slices/loaderSlice.js.map +1 -0
  202. package/lib/module/state/slices/ocrSlice.js +434 -0
  203. package/lib/module/state/slices/ocrSlice.js.map +1 -0
  204. package/lib/module/state/slices/themeSlice.js +45 -0
  205. package/lib/module/state/slices/themeSlice.js.map +1 -0
  206. package/lib/module/state/store.js +26 -0
  207. package/lib/module/state/store.js.map +1 -0
  208. package/lib/module/utils/axios.js +30 -0
  209. package/lib/module/utils/axios.js.map +1 -0
  210. package/lib/module/utils/constants.js +40 -0
  211. package/lib/module/utils/constants.js.map +1 -0
  212. package/lib/module/utils/helpers.js +139 -0
  213. package/lib/module/utils/helpers.js.map +1 -0
  214. package/lib/module/utils/nonSliceHelpers.js +80 -0
  215. package/lib/module/utils/nonSliceHelpers.js.map +1 -0
  216. package/lib/module/utils/types.js +2 -0
  217. package/lib/module/utils/types.js.map +1 -0
  218. package/lib/module/utils/validators.js +41 -0
  219. package/lib/module/utils/validators.js.map +1 -0
  220. package/lib/module/utils/widgetUtility.js +103 -0
  221. package/lib/module/utils/widgetUtility.js.map +1 -0
  222. package/lib/typescript/commonjs/package.json +1 -0
  223. package/lib/typescript/commonjs/src/assets/themes/styles.d.ts +82 -0
  224. package/lib/typescript/commonjs/src/assets/themes/styles.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/src/components/BasicInput.d.ts +3 -0
  226. package/lib/typescript/commonjs/src/components/BasicInput.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/src/components/BlurBackground.d.ts +3 -0
  228. package/lib/typescript/commonjs/src/components/BlurBackground.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/components/Camera.d.ts +8 -0
  230. package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/src/components/Checkbox.d.ts +3 -0
  232. package/lib/typescript/commonjs/src/components/Checkbox.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/src/components/DatePicker.d.ts +3 -0
  234. package/lib/typescript/commonjs/src/components/DatePicker.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/src/components/DropdownComponent.d.ts +3 -0
  236. package/lib/typescript/commonjs/src/components/DropdownComponent.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/src/components/FaceOverlay.d.ts +10 -0
  238. package/lib/typescript/commonjs/src/components/FaceOverlay.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/src/components/FadeBorder.d.ts +3 -0
  240. package/lib/typescript/commonjs/src/components/FadeBorder.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/src/components/Field.d.ts +3 -0
  242. package/lib/typescript/commonjs/src/components/Field.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/src/components/Loader.d.ts +6 -0
  244. package/lib/typescript/commonjs/src/components/Loader.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/src/components/NavHeader.d.ts +8 -0
  246. package/lib/typescript/commonjs/src/components/NavHeader.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/src/components/Navigator.d.ts +4 -0
  248. package/lib/typescript/commonjs/src/components/Navigator.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/src/components/Section.d.ts +3 -0
  250. package/lib/typescript/commonjs/src/components/Section.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/src/components/SelectImage.d.ts +3 -0
  252. package/lib/typescript/commonjs/src/components/SelectImage.d.ts.map +1 -0
  253. package/lib/typescript/commonjs/src/components/TextDivider.d.ts +6 -0
  254. package/lib/typescript/commonjs/src/components/TextDivider.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/src/components/Toaster.d.ts +3 -0
  256. package/lib/typescript/commonjs/src/components/Toaster.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/src/index.d.ts +29 -0
  258. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/src/screens/DocumentsScreen.d.ts +8 -0
  260. package/lib/typescript/commonjs/src/screens/DocumentsScreen.d.ts.map +1 -0
  261. package/lib/typescript/commonjs/src/screens/ErrorScreen.d.ts +4 -0
  262. package/lib/typescript/commonjs/src/screens/ErrorScreen.d.ts.map +1 -0
  263. package/lib/typescript/commonjs/src/screens/FormScreen.d.ts +10 -0
  264. package/lib/typescript/commonjs/src/screens/FormScreen.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/src/screens/ImageUploadScreen.d.ts +4 -0
  266. package/lib/typescript/commonjs/src/screens/ImageUploadScreen.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/src/screens/LivenessScreen.d.ts +8 -0
  268. package/lib/typescript/commonjs/src/screens/LivenessScreen.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/src/screens/ReportScreen.d.ts +8 -0
  270. package/lib/typescript/commonjs/src/screens/ReportScreen.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/src/screens/SuccessScreen.d.ts +7 -0
  272. package/lib/typescript/commonjs/src/screens/SuccessScreen.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/src/screens/WelcomeScreen.d.ts +9 -0
  274. package/lib/typescript/commonjs/src/screens/WelcomeScreen.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/src/state/hooks.d.ts +23 -0
  276. package/lib/typescript/commonjs/src/state/hooks.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/src/state/slices/confidenceSlice.d.ts +29 -0
  278. package/lib/typescript/commonjs/src/state/slices/confidenceSlice.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/src/state/slices/customerSlice.d.ts +58 -0
  280. package/lib/typescript/commonjs/src/state/slices/customerSlice.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/src/state/slices/enhancedSlice.d.ts +13 -0
  282. package/lib/typescript/commonjs/src/state/slices/enhancedSlice.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/src/state/slices/formSlice.d.ts +39 -0
  284. package/lib/typescript/commonjs/src/state/slices/formSlice.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/state/slices/immutableOcrSlice.d.ts +43 -0
  286. package/lib/typescript/commonjs/src/state/slices/immutableOcrSlice.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/src/state/slices/livenessSlice.d.ts +37 -0
  288. package/lib/typescript/commonjs/src/state/slices/livenessSlice.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/src/state/slices/loaderSlice.d.ts +13 -0
  290. package/lib/typescript/commonjs/src/state/slices/loaderSlice.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/src/state/slices/ocrSlice.d.ts +216 -0
  292. package/lib/typescript/commonjs/src/state/slices/ocrSlice.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/src/state/slices/themeSlice.d.ts +12 -0
  294. package/lib/typescript/commonjs/src/state/slices/themeSlice.d.ts.map +1 -0
  295. package/lib/typescript/commonjs/src/state/store.d.ts +26 -0
  296. package/lib/typescript/commonjs/src/state/store.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/src/utils/axios.d.ts +3 -0
  298. package/lib/typescript/commonjs/src/utils/axios.d.ts.map +1 -0
  299. package/lib/typescript/commonjs/src/utils/constants.d.ts +20 -0
  300. package/lib/typescript/commonjs/src/utils/constants.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/src/utils/helpers.d.ts +15 -0
  302. package/lib/typescript/commonjs/src/utils/helpers.d.ts.map +1 -0
  303. package/lib/typescript/commonjs/src/utils/nonSliceHelpers.d.ts +19 -0
  304. package/lib/typescript/commonjs/src/utils/nonSliceHelpers.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/src/utils/types.d.ts +52 -0
  306. package/lib/typescript/commonjs/src/utils/types.d.ts.map +1 -0
  307. package/lib/typescript/commonjs/src/utils/validators.d.ts +4 -0
  308. package/lib/typescript/commonjs/src/utils/validators.d.ts.map +1 -0
  309. package/lib/typescript/commonjs/src/utils/widgetUtility.d.ts +22 -0
  310. package/lib/typescript/commonjs/src/utils/widgetUtility.d.ts.map +1 -0
  311. package/lib/typescript/module/package.json +1 -0
  312. package/lib/typescript/module/src/assets/themes/styles.d.ts +82 -0
  313. package/lib/typescript/module/src/assets/themes/styles.d.ts.map +1 -0
  314. package/lib/typescript/module/src/components/BasicInput.d.ts +3 -0
  315. package/lib/typescript/module/src/components/BasicInput.d.ts.map +1 -0
  316. package/lib/typescript/module/src/components/BlurBackground.d.ts +3 -0
  317. package/lib/typescript/module/src/components/BlurBackground.d.ts.map +1 -0
  318. package/lib/typescript/module/src/components/Camera.d.ts +8 -0
  319. package/lib/typescript/module/src/components/Camera.d.ts.map +1 -0
  320. package/lib/typescript/module/src/components/Checkbox.d.ts +3 -0
  321. package/lib/typescript/module/src/components/Checkbox.d.ts.map +1 -0
  322. package/lib/typescript/module/src/components/DatePicker.d.ts +3 -0
  323. package/lib/typescript/module/src/components/DatePicker.d.ts.map +1 -0
  324. package/lib/typescript/module/src/components/DropdownComponent.d.ts +3 -0
  325. package/lib/typescript/module/src/components/DropdownComponent.d.ts.map +1 -0
  326. package/lib/typescript/module/src/components/FaceOverlay.d.ts +10 -0
  327. package/lib/typescript/module/src/components/FaceOverlay.d.ts.map +1 -0
  328. package/lib/typescript/module/src/components/FadeBorder.d.ts +3 -0
  329. package/lib/typescript/module/src/components/FadeBorder.d.ts.map +1 -0
  330. package/lib/typescript/module/src/components/Field.d.ts +3 -0
  331. package/lib/typescript/module/src/components/Field.d.ts.map +1 -0
  332. package/lib/typescript/module/src/components/Loader.d.ts +6 -0
  333. package/lib/typescript/module/src/components/Loader.d.ts.map +1 -0
  334. package/lib/typescript/module/src/components/NavHeader.d.ts +8 -0
  335. package/lib/typescript/module/src/components/NavHeader.d.ts.map +1 -0
  336. package/lib/typescript/module/src/components/Navigator.d.ts +4 -0
  337. package/lib/typescript/module/src/components/Navigator.d.ts.map +1 -0
  338. package/lib/typescript/module/src/components/Section.d.ts +3 -0
  339. package/lib/typescript/module/src/components/Section.d.ts.map +1 -0
  340. package/lib/typescript/module/src/components/SelectImage.d.ts +3 -0
  341. package/lib/typescript/module/src/components/SelectImage.d.ts.map +1 -0
  342. package/lib/typescript/module/src/components/TextDivider.d.ts +6 -0
  343. package/lib/typescript/module/src/components/TextDivider.d.ts.map +1 -0
  344. package/lib/typescript/module/src/components/Toaster.d.ts +3 -0
  345. package/lib/typescript/module/src/components/Toaster.d.ts.map +1 -0
  346. package/lib/typescript/module/src/index.d.ts +29 -0
  347. package/lib/typescript/module/src/index.d.ts.map +1 -0
  348. package/lib/typescript/module/src/screens/DocumentsScreen.d.ts +8 -0
  349. package/lib/typescript/module/src/screens/DocumentsScreen.d.ts.map +1 -0
  350. package/lib/typescript/module/src/screens/ErrorScreen.d.ts +4 -0
  351. package/lib/typescript/module/src/screens/ErrorScreen.d.ts.map +1 -0
  352. package/lib/typescript/module/src/screens/FormScreen.d.ts +10 -0
  353. package/lib/typescript/module/src/screens/FormScreen.d.ts.map +1 -0
  354. package/lib/typescript/module/src/screens/ImageUploadScreen.d.ts +4 -0
  355. package/lib/typescript/module/src/screens/ImageUploadScreen.d.ts.map +1 -0
  356. package/lib/typescript/module/src/screens/LivenessScreen.d.ts +8 -0
  357. package/lib/typescript/module/src/screens/LivenessScreen.d.ts.map +1 -0
  358. package/lib/typescript/module/src/screens/ReportScreen.d.ts +8 -0
  359. package/lib/typescript/module/src/screens/ReportScreen.d.ts.map +1 -0
  360. package/lib/typescript/module/src/screens/SuccessScreen.d.ts +7 -0
  361. package/lib/typescript/module/src/screens/SuccessScreen.d.ts.map +1 -0
  362. package/lib/typescript/module/src/screens/WelcomeScreen.d.ts +9 -0
  363. package/lib/typescript/module/src/screens/WelcomeScreen.d.ts.map +1 -0
  364. package/lib/typescript/module/src/state/hooks.d.ts +23 -0
  365. package/lib/typescript/module/src/state/hooks.d.ts.map +1 -0
  366. package/lib/typescript/module/src/state/slices/confidenceSlice.d.ts +29 -0
  367. package/lib/typescript/module/src/state/slices/confidenceSlice.d.ts.map +1 -0
  368. package/lib/typescript/module/src/state/slices/customerSlice.d.ts +58 -0
  369. package/lib/typescript/module/src/state/slices/customerSlice.d.ts.map +1 -0
  370. package/lib/typescript/module/src/state/slices/enhancedSlice.d.ts +13 -0
  371. package/lib/typescript/module/src/state/slices/enhancedSlice.d.ts.map +1 -0
  372. package/lib/typescript/module/src/state/slices/formSlice.d.ts +39 -0
  373. package/lib/typescript/module/src/state/slices/formSlice.d.ts.map +1 -0
  374. package/lib/typescript/module/src/state/slices/immutableOcrSlice.d.ts +43 -0
  375. package/lib/typescript/module/src/state/slices/immutableOcrSlice.d.ts.map +1 -0
  376. package/lib/typescript/module/src/state/slices/livenessSlice.d.ts +37 -0
  377. package/lib/typescript/module/src/state/slices/livenessSlice.d.ts.map +1 -0
  378. package/lib/typescript/module/src/state/slices/loaderSlice.d.ts +13 -0
  379. package/lib/typescript/module/src/state/slices/loaderSlice.d.ts.map +1 -0
  380. package/lib/typescript/module/src/state/slices/ocrSlice.d.ts +216 -0
  381. package/lib/typescript/module/src/state/slices/ocrSlice.d.ts.map +1 -0
  382. package/lib/typescript/module/src/state/slices/themeSlice.d.ts +12 -0
  383. package/lib/typescript/module/src/state/slices/themeSlice.d.ts.map +1 -0
  384. package/lib/typescript/module/src/state/store.d.ts +26 -0
  385. package/lib/typescript/module/src/state/store.d.ts.map +1 -0
  386. package/lib/typescript/module/src/utils/axios.d.ts +3 -0
  387. package/lib/typescript/module/src/utils/axios.d.ts.map +1 -0
  388. package/lib/typescript/module/src/utils/constants.d.ts +20 -0
  389. package/lib/typescript/module/src/utils/constants.d.ts.map +1 -0
  390. package/lib/typescript/module/src/utils/helpers.d.ts +15 -0
  391. package/lib/typescript/module/src/utils/helpers.d.ts.map +1 -0
  392. package/lib/typescript/module/src/utils/nonSliceHelpers.d.ts +19 -0
  393. package/lib/typescript/module/src/utils/nonSliceHelpers.d.ts.map +1 -0
  394. package/lib/typescript/module/src/utils/types.d.ts +52 -0
  395. package/lib/typescript/module/src/utils/types.d.ts.map +1 -0
  396. package/lib/typescript/module/src/utils/validators.d.ts +4 -0
  397. package/lib/typescript/module/src/utils/validators.d.ts.map +1 -0
  398. package/lib/typescript/module/src/utils/widgetUtility.d.ts +22 -0
  399. package/lib/typescript/module/src/utils/widgetUtility.d.ts.map +1 -0
  400. package/package.json +130 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["configureStore","loaderReducer","livenessReducer","themeReducer","enhancedReducer","confidenceReducer","ocrDataReducer","immutableOcrDataReducer","formDataReducer","customerReducer","store","reducer","loader","liveness","theme","enhanced","confidence","ocrData","formData","customer","immutableOcrData"],"sourceRoot":"..\\..\\..\\src","sources":["state/store.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,kBAAkB;AACjD,OAAOC,aAAa,MAAM,yBAAsB;AAChD,OAAOC,eAAe,MAAM,2BAAwB;AACpD,OAAOC,YAAY,MAAM,wBAAqB;AAC9C,OAAOC,eAAe,MAAM,2BAAwB;AACpD,OAAOC,iBAAiB,MAAM,6BAA0B;AACxD,OAAOC,cAAc,MAAM,sBAAmB;AAC9C,OAAOC,uBAAuB,MAAM,+BAA4B;AAChE,OAAOC,eAAe,MAAM,uBAAoB;AAChD,OAAOC,eAAe,MAAM,2BAAwB;AAEpD,OAAO,MAAMC,KAAK,GAAGV,cAAc,CAAC;EAClCW,OAAO,EAAE;IACPC,MAAM,EAAEX,aAAa;IACrBY,QAAQ,EAAEX,eAAe;IACzBY,KAAK,EAAEX,YAAY;IACnBY,QAAQ,EAAEX,eAAe;IACzBY,UAAU,EAAEX,iBAAiB;IAC7BY,OAAO,EAAEX,cAAc;IACvBY,QAAQ,EAAEV,eAAe;IACzBW,QAAQ,EAAEV,eAAe;IACzBW,gBAAgB,EAAEb;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import axios from "axios";
4
+
5
+ // NOTE: Use computer IP to use with local server instance
6
+ export const axiosClientInstance = axios.create({
7
+ baseURL: 'https://druid-api.thenovaweb.com'
8
+ });
9
+ export const attachClientToAxios = (clientUuid, clientSecret) => {
10
+ axiosClientInstance.interceptors.request.use(config => {
11
+ config.data = {
12
+ ...config.data,
13
+ clientUuid,
14
+ clientSecret
15
+ };
16
+ return config;
17
+ }, error => Promise.reject(error));
18
+ };
19
+ axiosClientInstance.interceptors.response.use(res => res, error => {
20
+ if (error.response) {
21
+ const errorData = error.response.data;
22
+ if (errorData?.errors && Array.isArray(errorData.errors)) {
23
+ return Promise.reject(errorData.errors[0].message);
24
+ } else if (errorData?.message) {
25
+ return Promise.reject(errorData.message);
26
+ }
27
+ }
28
+ return Promise.reject(error.message);
29
+ });
30
+ //# sourceMappingURL=axios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["axios","axiosClientInstance","create","baseURL","attachClientToAxios","clientUuid","clientSecret","interceptors","request","use","config","data","error","Promise","reject","response","res","errorData","errors","Array","isArray","message"],"sourceRoot":"..\\..\\..\\src","sources":["utils/axios.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;AACA,OAAO,MAAMC,mBAAmB,GAAGD,KAAK,CAACE,MAAM,CAAC;EAC9CC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,MAAMC,mBAAmB,GAAGA,CAACC,UAAkB,EAAEC,YAAoB,KAAK;EAC/EL,mBAAmB,CAACM,YAAY,CAACC,OAAO,CAACC,GAAG,CACzCC,MAAM,IAAK;IACVA,MAAM,CAACC,IAAI,GAAG;MAAE,GAAGD,MAAM,CAACC,IAAI;MAAEN,UAAU;MAAEC;IAAa,CAAC;IAC1D,OAAOI,MAAM;EACf,CAAC,EACAE,KAAK,IAAKC,OAAO,CAACC,MAAM,CAACF,KAAK,CACjC,CAAC;AACH,CAAC;AAEDX,mBAAmB,CAACM,YAAY,CAACQ,QAAQ,CAACN,GAAG,CAC3CO,GAAG,IAAIA,GAAG,EACVJ,KAAK,IAAI;EACP,IAAIA,KAAK,CAACG,QAAQ,EAAE;IAClB,MAAME,SAAS,GAAGL,KAAK,CAACG,QAAQ,CAACJ,IAAI;IACrC,IAAIM,SAAS,EAAEC,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACH,SAAS,CAACC,MAAM,CAAC,EAAE;MACxD,OAAOL,OAAO,CAACC,MAAM,CAACG,SAAS,CAACC,MAAM,CAAC,CAAC,CAAC,CAACG,OAAO,CAAC;IACpD,CAAC,MAAM,IAAIJ,SAAS,EAAEI,OAAO,EAAE;MAC7B,OAAOR,OAAO,CAACC,MAAM,CAACG,SAAS,CAACI,OAAO,CAAC;IAC1C;EACF;EACA,OAAOR,OAAO,CAACC,MAAM,CAACF,KAAK,CAACS,OAAO,CAAC;AACtC,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ export const DEFAULT_SECTIONS = {
4
+ PERSONAL_DETAILS: 'Personal Information',
5
+ PASSPORT: 'Passport Details',
6
+ EMIRATES_ID: 'Emirates / National ID Details (If Emirates ID is not available)'
7
+ };
8
+ export const DOCUMENT_TYPE = {
9
+ PASSPORT: 'passport',
10
+ EMIRATES_ID: 'emiratesid'
11
+ };
12
+ export const FIELD_TYPE = {
13
+ TEXT: 'text',
14
+ CHECKBOX: 'checkbox',
15
+ DATE: 'date',
16
+ COUNTRY_DD: 'country'
17
+ };
18
+ const personalDetails = new Map();
19
+ personalDetails.set('Name', 'name');
20
+ personalDetails.set('Surname', 'surname');
21
+ personalDetails.set('Gender', 'gender');
22
+ personalDetails.set('Date of Birth', 'dateOfBirth');
23
+ personalDetails.set('Nationality', 'nationality');
24
+ personalDetails.set('Country of Residence', 'countryOfResidence');
25
+ personalDetails.set('Country of Birth', 'countryOfBirth');
26
+ const passport = new Map();
27
+ passport.set('Passport No.', 'passportNumber');
28
+ passport.set('Date of Issue', 'dateOfIssue');
29
+ passport.set('Date of Expiry', 'dateOfExpiry');
30
+ passport.set('Passport Type', 'passportType');
31
+ passport.set('Issuing Country', 'countryOfIssue');
32
+ passport.set('Issuing Authority', 'authority');
33
+ const id = new Map();
34
+ id.set('National ID No.', 'emiratesIdNumber');
35
+ id.set('Date of Issue', 'dateOfIssue');
36
+ id.set('Date of Expiry', 'dateOfExpiry');
37
+ id.set('Issuing Country', 'countryOfIssue');
38
+ id.set('Issuing Authority', 'authority');
39
+ export { personalDetails, passport, id };
40
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_SECTIONS","PERSONAL_DETAILS","PASSPORT","EMIRATES_ID","DOCUMENT_TYPE","FIELD_TYPE","TEXT","CHECKBOX","DATE","COUNTRY_DD","personalDetails","Map","set","passport","id"],"sourceRoot":"..\\..\\..\\src","sources":["utils/constants.tsx"],"mappings":";;AAAA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,gBAAgB,EAAE,sBAAsB;EACxCC,QAAQ,EAAE,kBAAkB;EAC5BC,WAAW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,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC;AACtCE,EAAE,CAACF,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC;AACxCE,EAAE,CAACF,GAAG,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;AAC3CE,EAAE,CAACF,GAAG,CAAC,mBAAmB,EAAE,WAAW,CAAC;AAExC,SAASF,eAAe,EAAEG,QAAQ,EAAEC,EAAE","ignoreList":[]}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ import { DEFAULT_SECTIONS, id, passport, personalDetails } from "./constants.js";
4
+ import { store } from "../state/store.js";
5
+ import { removeBase64Header } from "./nonSliceHelpers.js";
6
+ /**
7
+ * Convert date format from display (dd/mm/yyyy) to form submission format (dd-mm-yyyy)
8
+ * NOTE: Make the date formats consistent across db and ocr, to remove the need to do this
9
+ */
10
+ export const convertDateFormatForSubmission = dateString => {
11
+ if (!dateString || dateString.replace(' ', '') === '') {
12
+ return '';
13
+ }
14
+ if (dateString.includes('/')) {
15
+ const [day, month, year] = dateString.split('/');
16
+ return `${day}-${month}-${year}`;
17
+ }
18
+ return dateString;
19
+ };
20
+
21
+ /**
22
+ * 1. Prepare form data for submission
23
+ */
24
+ export const prepareDefaultFormData = (form, customerData) => {
25
+ for (let section of form.sections) {
26
+ for (let field of section.fields) {
27
+ let {
28
+ answer,
29
+ label,
30
+ type
31
+ } = field;
32
+ if (answer && type === 'date') {
33
+ answer = convertDateFormatForSubmission(answer);
34
+ }
35
+ if (section.name === DEFAULT_SECTIONS.PERSONAL_DETAILS && personalDetails.has(label)) {
36
+ const key = personalDetails.get(label);
37
+ if (key && key in customerData) {
38
+ customerData[key] = answer ? answer : '';
39
+ }
40
+ } else if (section.name === DEFAULT_SECTIONS.PASSPORT && customerData.passport && passport.has(label)) {
41
+ const key = passport.get(label);
42
+ if (key && key in customerData.passport) {
43
+ customerData.passport[key] = answer ? answer : '';
44
+ }
45
+ } else if (section.name === DEFAULT_SECTIONS.EMIRATES_ID && customerData.emiratesId && id.has(label)) {
46
+ const key = id.get(label);
47
+ if (key && key in customerData.emiratesId) {
48
+ customerData.emiratesId[key] = answer ? answer : '';
49
+ }
50
+ }
51
+ }
52
+ }
53
+ };
54
+ export const getInitialCombinedDataObj = (isPassportMandatory, isNationalIDMandatory) => {
55
+ const state = store.getState();
56
+ const {
57
+ customer,
58
+ enhanced,
59
+ ocrData,
60
+ liveness
61
+ } = state;
62
+ const combinedData = {
63
+ name: '',
64
+ surname: '',
65
+ gender: '',
66
+ nationality: '',
67
+ dateOfBirth: '',
68
+ countryOfResidence: '',
69
+ countryOfBirth: '',
70
+ status: enhanced.isEnhanced ? 8 : 5,
71
+ email: customer.email,
72
+ phoneNumber: customer.phoneNumber,
73
+ clientUuid: customer.clientUuid,
74
+ clientSecret: customer.clientSecret,
75
+ ...(isNationalIDMandatory && {
76
+ emiratesId: {
77
+ emiratesIdNumber: '',
78
+ dateOfIssue: '',
79
+ dateOfExpiry: '',
80
+ placeOfIssue: '',
81
+ authority: '',
82
+ countryOfIssue: '',
83
+ frontImage: removeBase64Header(ocrData.emiratesid.frontImage),
84
+ backImage: removeBase64Header(ocrData.emiratesid.backImage),
85
+ idImage: removeBase64Header(ocrData.emiratesid.idImage),
86
+ idMatch: ocrData.emiratesid.idMatch,
87
+ idScore: ocrData.emiratesid.idScore,
88
+ idClassificationPassed: ocrData.emiratesid.idClassificationPassed
89
+ }
90
+ }),
91
+ ...(isPassportMandatory && {
92
+ passport: {
93
+ passportNumber: '',
94
+ passportType: '',
95
+ dateOfIssue: '',
96
+ dateOfExpiry: '',
97
+ placeOfIssue: '',
98
+ authority: '',
99
+ countryOfIssue: '',
100
+ frontImage: removeBase64Header(ocrData.passport.frontImage),
101
+ backImage: removeBase64Header(ocrData.passport.backImage),
102
+ idImage: removeBase64Header(ocrData.passport.idImage),
103
+ idMatch: ocrData.passport.idMatch,
104
+ idScore: ocrData.passport.idScore,
105
+ idClassificationPassed: ocrData.passport.idClassificationPassed
106
+ }
107
+ }),
108
+ isLive: liveness.isLive,
109
+ isLiveScore: liveness.isLiveScore,
110
+ isLiveFaces: liveness.isLiveFaces
111
+ };
112
+ return combinedData;
113
+ };
114
+ export const isFieldConfidenceLow = (sectionName, label, idFieldObj, passportFieldObj) => {
115
+ if (sectionName === DEFAULT_SECTIONS.PERSONAL_DETAILS) {
116
+ const key = personalDetails.get(label);
117
+ if (!key || !idFieldObj[key] && !passportFieldObj[key]) {
118
+ return;
119
+ } else {
120
+ const idFieldConfidence = idFieldObj[key] ? idFieldObj[key] : 0;
121
+ const passportFieldConfidence = passportFieldObj[key] ? passportFieldObj[key] : 0;
122
+ if (Math.max(idFieldConfidence, passportFieldConfidence) < 70) {
123
+ return true;
124
+ }
125
+ }
126
+ } else if (sectionName === DEFAULT_SECTIONS.PASSPORT) {
127
+ const key = passport.get(label);
128
+ if (key && passportFieldObj[key] && passportFieldObj[key] < 70) {
129
+ return true;
130
+ }
131
+ } else if (sectionName === DEFAULT_SECTIONS.EMIRATES_ID) {
132
+ const key = id.get(label);
133
+ if (key && idFieldObj[key] && idFieldObj[key] < 70) {
134
+ return true;
135
+ }
136
+ }
137
+ return false;
138
+ };
139
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_SECTIONS","id","passport","personalDetails","store","removeBase64Header","convertDateFormatForSubmission","dateString","replace","includes","day","month","year","split","prepareDefaultFormData","form","customerData","section","sections","field","fields","answer","label","type","name","PERSONAL_DETAILS","has","key","get","PASSPORT","EMIRATES_ID","emiratesId","getInitialCombinedDataObj","isPassportMandatory","isNationalIDMandatory","state","getState","customer","enhanced","ocrData","liveness","combinedData","surname","gender","nationality","dateOfBirth","countryOfResidence","countryOfBirth","status","isEnhanced","email","phoneNumber","clientUuid","clientSecret","emiratesIdNumber","dateOfIssue","dateOfExpiry","placeOfIssue","authority","countryOfIssue","frontImage","emiratesid","backImage","idImage","idMatch","idScore","idClassificationPassed","passportNumber","passportType","isLive","isLiveScore","isLiveFaces","isFieldConfidenceLow","sectionName","idFieldObj","passportFieldObj","idFieldConfidence","passportFieldConfidence","Math","max"],"sourceRoot":"..\\..\\..\\src","sources":["utils/helpers.tsx"],"mappings":";;AAEA,SAASA,gBAAgB,EAAEC,EAAE,EAAEC,QAAQ,EAAEC,eAAe,QAAQ,gBAAa;AAE7E,SAAoBC,KAAK,QAAQ,mBAAgB;AACjD,SAASC,kBAAkB,QAAQ,sBAAmB;AACtD;AACA;AACA;AACA;AACA,OAAO,MAAMC,8BAA8B,GAAIC,UAAkB,IAAa;EAC5E,IAAI,CAACA,UAAU,IAAIA,UAAU,CAACC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE;IACrD,OAAO,EAAE;EACX;EACA,IAAID,UAAU,CAACE,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC5B,MAAM,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,CAAC,GAAGL,UAAU,CAACM,KAAK,CAAC,GAAG,CAAC;IAChD,OAAO,GAAGH,GAAG,IAAIC,KAAK,IAAIC,IAAI,EAAE;EAClC;EACA,OAAOL,UAAU;AACnB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMO,sBAAsB,GAAGA,CAACC,IAAe,EAAEC,YAA0B,KAAK;EACrF,KAAK,IAAIC,OAAO,IAAIF,IAAI,CAACG,QAAQ,EAAE;IACjC,KAAK,IAAIC,KAAK,IAAIF,OAAO,CAACG,MAAM,EAAE;MAChC,IAAI;QAAEC,MAAM;QAAEC,KAAK;QAAEC;MAAK,CAAC,GAAGJ,KAAK;MACnC,IAAIE,MAAM,IAAIE,IAAI,KAAK,MAAM,EAAE;QAC7BF,MAAM,GAAGf,8BAA8B,CAACe,MAAM,CAAC;MACjD;MACA,IAAIJ,OAAO,CAACO,IAAI,KAAKxB,gBAAgB,CAACyB,gBAAgB,IAAItB,eAAe,CAACuB,GAAG,CAACJ,KAAK,CAAC,EAAE;QACpF,MAAMK,GAAG,GAAGxB,e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C,MAAM,IAAIJ,WAAW,KAAKzE,gBAAgB,CAAC6B,QAAQ,EAAE;IACpD,MAAMF,GAAG,GAAGzB,QAAQ,CAAC0B,GAAG,CAACN,KAAK,CAAC;IAC/B,IAAIK,GAAG,IAAIgD,gBAAgB,CAAChD,GAAG,CAAC,IAAIgD,gBAAgB,CAAChD,GAAG,CAAC,GAAG,EAAE,EAAE;MAC9D,OAAO,IAAI;IACb;EACF,CAAC,MAAM,IAAI8C,WAAW,KAAKzE,gBAAgB,CAAC8B,WAAW,EAAE;IACvD,MAAMH,GAAG,GAAG1B,EAAE,CAAC2B,GAAG,CAACN,KAAK,CAAC;IACzB,IAAIK,GAAG,IAAI+C,UAAU,CAAC/C,GAAG,CAAC,IAAI+C,UAAU,CAAC/C,GAAG,CAAC,GAAG,EAAE,EAAE;MAClD,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC","ignoreList":[]}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ export const getPassportType = temp => {
4
+ if (temp == 'P' || temp == 'Regular') return 'Regular';
5
+ if (temp == 'D' || temp == 'Diplomatic') return 'Diplomatic';
6
+ if (temp == 'others' || temp == 'Others') return 'Others';
7
+ return '';
8
+ };
9
+ export const getGender = temp => {
10
+ if (temp == 'M' || temp == 'Male' || temp == 'male') return 'male';
11
+ if (temp == 'F' || temp == 'Female' || temp == 'female') return 'female';
12
+ if (temp == 'others' || temp == 'Others') return 'others';
13
+ return '';
14
+ };
15
+ export const changeCase = input => {
16
+ if (!input) {
17
+ return '';
18
+ }
19
+ const words = input.split('_');
20
+ const capitalizedWords = words.map(word => {
21
+ if (word.length === 0) return word;
22
+ return word[0]?.toUpperCase() + word.slice(1).toLowerCase();
23
+ });
24
+ return capitalizedWords.join(' ');
25
+ };
26
+ export const capitalizeWords = input => {
27
+ if (!input) {
28
+ return '';
29
+ }
30
+ const capitalizedWords = input.split(' ').map(word => {
31
+ return word[0]?.toUpperCase() + word.slice(1).toLowerCase();
32
+ });
33
+ return capitalizedWords.join(' ');
34
+ };
35
+
36
+ /**
37
+ * Convert date format from received from DB (yyyy-mm-dd) to OCR/Display
38
+ * format (dd/mm/yyyy) and use it to fill in form answers
39
+ * OCR date format, display format: dd/mm/yyyy
40
+ * DB date format: yyyy-mm-dd
41
+ * Submit format: dd-mm-yyyy
42
+ */
43
+ export const convertDateFormatForForm = dateString => {
44
+ if (!dateString || dateString.replace(' ', '') === '') {
45
+ return '';
46
+ }
47
+ if (dateString.includes('-')) {
48
+ const [year, month, day] = dateString.split('-');
49
+ return `${day}/${month}/${year}`;
50
+ }
51
+ return dateString;
52
+ };
53
+
54
+ /**
55
+ * Convert date format from display (dd/mm/yyyy) to form submission format (dd-mm-yyyy)
56
+ * NOTE: Make the date formats consistent across db and ocr, to remove the need to do this
57
+ */
58
+ export const convertDateFormatForSubmission = dateString => {
59
+ if (!dateString || dateString.replace(' ', '') === '') {
60
+ return '';
61
+ }
62
+ if (dateString.includes('/')) {
63
+ const [day, month, year] = dateString.split('/');
64
+ return `${day}-${month}-${year}`;
65
+ }
66
+ return dateString;
67
+ };
68
+
69
+ // NOTE: Is redundant, the current packages do not add the base64 header to the front
70
+ export const removeBase64Header = base64String => {
71
+ if (!base64String) {
72
+ return '';
73
+ }
74
+ const base64Header = 'data:image/jpeg;base64,';
75
+ if (base64String.startsWith(base64Header)) {
76
+ return base64String.substring(base64Header.length);
77
+ }
78
+ return base64String;
79
+ };
80
+ //# sourceMappingURL=nonSliceHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getPassportType","temp","getGender","changeCase","input","words","split","capitalizedWords","map","word","length","toUpperCase","slice","toLowerCase","join","capitalizeWords","convertDateFormatForForm","dateString","replace","includes","year","month","day","convertDateFormatForSubmission","removeBase64Header","base64String","base64Header","startsWith","substring"],"sourceRoot":"..\\..\\..\\src","sources":["utils/nonSliceHelpers.tsx"],"mappings":";;AAEA,OAAO,MAAMA,eAAe,GAAIC,IAAY,IAAK;EAC/C,IA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B,OAAO,EAAE;EACX;EACA,MAAMC,YAAY,GAAG,yBAAyB;EAC9C,IAAID,YAAY,CAACE,UAAU,CAACD,YAAY,CAAC,EAAE;IACzC,OAAOD,YAAY,CAACG,SAAS,CAACF,YAAY,CAAChB,MAAM,CAAC;EACpD;EACA,OAAOe,YAAY;AACrB,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["utils/types.tsx"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ import { DEFAULT_SECTIONS, FIELD_TYPE } from "./constants.js";
4
+ export const isSectionValid = (section, isPassportMandatory, isNationalIDMandatory) => {
5
+ let allFieldsAreMandatory = false;
6
+ if (isPassportMandatory && section.name === DEFAULT_SECTIONS.PASSPORT || isNationalIDMandatory && section.name === DEFAULT_SECTIONS.EMIRATES_ID) {
7
+ allFieldsAreMandatory = true;
8
+ }
9
+ for (const field of section.fields) {
10
+ if ((field.required === true || allFieldsAreMandatory) && !field.answer) {
11
+ return false;
12
+ } else if (field.type === FIELD_TYPE.DATE && !validateDate(field.answer)) {
13
+ return false;
14
+ } else if (field.type === FIELD_TYPE.TEXT && field.answer.trim().length < 3) {
15
+ return false;
16
+ }
17
+ }
18
+ return true;
19
+ };
20
+ export const validateDate = dateString => {
21
+ if (dateString.trim() === '') {
22
+ return true;
23
+ }
24
+ var t = dateString.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
25
+ if (t) {
26
+ var d = t[1] && +t[1],
27
+ m = t[2] && +t[2],
28
+ y = t[3] && +t[3];
29
+ if (y && m && d) {
30
+ var date = new Date(y, m - 1, d);
31
+ if (date?.getFullYear() === y && date.getMonth() === m - 1) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ };
38
+
39
+ // ?? Remove
40
+ export const parseDate = validateDate;
41
+ //# sourceMappingURL=validators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_SECTIONS","FIELD_TYPE","isSectionValid","section","isPassportMandatory","isNationalIDMandatory","allFieldsAreMandatory","name","PASSPORT","EMIRATES_ID","field","fields","required","answer","type","DATE","validateDate","TEXT","trim","length","dateString","t","match","d","m","y","date","Date","getFullYear","getMonth","parseDate"],"sourceRoot":"..\\..\\..\\src","sources":["utils/validators.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,UAAU,QAAQ,gBAAa;AAE1D,OAAO,MAAMC,cAAc,GAAGA,CAACC,OAAY,EAAEC,mBAA4B,EAAEC,qBAA8B,KAAK;EAC5G,IAAIC,qBAAqB,GAAG,KAAK;EACjC,IAAKF,mBAAmB,IAAID,OAAO,CAACI,IAAI,KAAKP,gBAAgB,CAACQ,QAAQ,IAAKH,qBAAqB,IAAIF,OAAO,CAACI,IAAI,KAAKP,gBAAgB,CAACS,WAAW,EAAE;IACjJH,qBAAqB,GAAG,IAAI;EAC9B;EACA,KAAK,MAAMI,KAAK,IAAIP,OAAO,CAACQ,MAAM,EAAE;IAClC,IAAI,CAACD,KAAK,CAACE,QAAQ,KAAK,IAAI,IAAIN,qBAAqB,KAAK,CAACI,KAAK,CAACG,MAAM,EAAE;MACvE,OAAO,KAAK;IACd,CAAC,MAAM,IAAIH,KAAK,CAACI,IAAI,KAAKb,UAAU,CAACc,IAAI,IAAI,CAACC,YAAY,CAACN,KAAK,CAACG,MAAM,CAAC,EAAE;MACxE,OAAO,KAAK;IACd,CAAC,MAAM,IAAIH,KAAK,CAACI,IAAI,KAAKb,UAAU,CAACgB,IAAI,IAAIP,KAAK,CAACG,MAAM,CAACK,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,EAAE;MAC3E,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb,CAAC;AAED,OAAO,MAAMH,YAAY,GAAII,UAAkB,IAAK;EAClD,IAAIA,UAAU,CAACF,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;IAC5B,OAAO,IAAI;EACb;EACA,IAAIG,CAAC,GAAGD,UAAU,CAACE,KAAK,CAAC,6BAA6B,CAAC;EACvD,IAAID,CAAC,EAAE;IACL,IAAIE,CAAC,GAAGF,CAAC,CAAC,CAAC,CAAC,IAAI,CAACA,CAAC,CAAC,CAAC,CAAC;MACnBG,CAAC,GAAGH,CAAC,CAAC,CAAC,CAAC,IAAI,CAACA,CAAC,CAAC,CAAC,CAAC;MACjBI,CAAC,GAAGJ,CAAC,CAAC,CAAC,CAAC,IAAI,CAACA,CAAC,CAAC,CAAC,CAAC;IACnB,IAAII,CAAC,IAAID,CAAC,IAAID,CAAC,EAAE;MACf,IAAIG,IAAI,GAAG,IAAIC,IAAI,CAACF,CAAC,EAAED,CAAC,GAAG,CAAC,EAAED,CAAC,CAAC;MAChC,IAAIG,IAAI,EAAEE,WAAW,CAAC,CAAC,KAAKH,CAAC,IAAIC,IAAI,CAACG,QAAQ,CAAC,CAAC,KAAKL,CAAC,GAAG,CAAC,EAAE;QAC1D,OAAO,IAAI;MACb;IACF;EACF;EACA,OAAO,KAAK;AACd,CAAC;;AAED;AACA,OAAO,MAAMM,SAAS,GAAGd,YAAY","ignoreList":[]}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ import axios from "axios";
4
+ import validator from "validator";
5
+ export const getWidgetInfo = async data => {
6
+ try {
7
+ validateClientObj(data);
8
+ let res = await axios.post('https://druid-api.thenovaweb.com/customers/statusWithoutImages/clientAuth', data);
9
+ res = res.data.data;
10
+ const status = statusCodes[res.status];
11
+ const widgetInfo = {
12
+ status: status,
13
+ description: description[status],
14
+ buttonText: buttonText[status],
15
+ route: getRouteFromStatus(res.status)
16
+ };
17
+ return widgetInfo;
18
+ } catch (err) {
19
+ const defaultStatus = statusCodes[0];
20
+ const defaultWidgetInfo = {
21
+ status: defaultStatus,
22
+ description: description[defaultStatus],
23
+ buttonText: buttonText[defaultStatus],
24
+ route: getRouteFromStatus(0)
25
+ };
26
+ return defaultWidgetInfo;
27
+ }
28
+ };
29
+ export const statusCodes = {
30
+ 0: "not_started",
31
+ 1: "inactive",
32
+ 2: "draft",
33
+ 3: "more_data",
34
+ 4: "expired",
35
+ 5: "pending",
36
+ 6: "accepted",
37
+ 7: "rejected",
38
+ 8: "enhanced",
39
+ 9: "loading"
40
+ };
41
+ export const description = {
42
+ loading: "Fetching the status...",
43
+ not_started: "KYC is not initiated. Please start the process.",
44
+ inactive: "Client is currently inactive",
45
+ draft: "Please complete all the steps of the verification process.",
46
+ more_data: "Additional information is required to complete your verification.",
47
+ expired: "Your KYC information has expired. Please restart the process.",
48
+ pending: "Your verification is awaiting approval.",
49
+ accepted: "Your verification has been successfully completed.",
50
+ rejected: "Your verification was unsuccessful. Please try again.",
51
+ enhanced: "Enhanced KYC is required for your account. Please initiate the process."
52
+ };
53
+ export const buttonText = {
54
+ loading: "Loading",
55
+ not_started: "Get Started",
56
+ inactive: "Cannot Initiate",
57
+ draft: "Continue",
58
+ more_data: "Submit",
59
+ expired: "Renew KYC",
60
+ pending: "View Status",
61
+ accepted: "View Status",
62
+ rejected: "New Request",
63
+ enhanced: "Start Now",
64
+ failure: "Cannot Initiate"
65
+ };
66
+ export const getRouteFromStatus = statusCode => {
67
+ switch (statusCode) {
68
+ case 0:
69
+ case 1:
70
+ case 2:
71
+ case 3:
72
+ case 4:
73
+ return 'Home';
74
+ case 5:
75
+ case 6:
76
+ case 7:
77
+ case 9:
78
+ case 10:
79
+ return 'Report';
80
+ case 8:
81
+ return 'Form';
82
+ default:
83
+ return '';
84
+ }
85
+ };
86
+ export const validateClientObj = data => {
87
+ const {
88
+ clientSecret,
89
+ clientUuid,
90
+ phoneNumber,
91
+ email
92
+ } = data;
93
+ if (!clientSecret || !clientUuid) {
94
+ throw new Error('Please provide the Client Secret and Client UUID');
95
+ } else if (!phoneNumber && !email) {
96
+ throw new Error('Please provide a phone number or an email address');
97
+ } else if (phoneNumber && !validator.isMobilePhone(phoneNumber)) {
98
+ throw new Error('Please enter a valid phone number');
99
+ } else if (email && !validator.isEmail(email)) {
100
+ throw new Error('Please enter a valid email address');
101
+ }
102
+ };
103
+ //# sourceMappingURL=widgetUtility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["axios","validator","getWidgetInfo","data","validateClientObj","res","post","status","statusCodes","widgetInfo","description","buttonText","route","getRouteFromStatus","err","defaultStatus","defaultWidgetInfo","loading","not_started","inactive","draft","more_data","expired","pending","accepted","rejected","enhanced","failure","statusCode","clientSecret","clientUuid","phoneNumber","email","Error","isMobilePhone","isEmail"],"sourceRoot":"..\\..\\..\\src","sources":["utils/widgetUtility.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,SAAS,MAAM,WAAW;AAEjC,OAAO,MAAMC,aAAa,GAAG,MAAOC,IAA2B,IAAK;EAClE,IAAI;IACFC,iBAAiB,CAACD,IAAI,CAAC;IACvB,IAAIE,GAAG,GAAG,MAAML,KAAK,CAACM,IAAI,CACxB,2EAA2E,EAC3EH,IACF,CAAC;IACDE,GAAG,GAAGA,GAAG,CAACF,IAAI,CAACA,IAAI;IACnB,MAAMI,MAAM,GAAGC,WAAW,CAACH,GAAG,CAACE,MAAM,CAAC;IACtC,MAAME,UAAU,GAAG;MACjBF,MAAM,EAAEA,MAAM;MACdG,WAAW,EAAEA,WAAW,CAACH,MAAM,CAAC;MAChCI,UAAU,EAAEA,UAAU,CAACJ,MAAM,CAAC;MAC9BK,KAAK,EAAEC,kBAAkB,CAACR,GAAG,CAACE,MAAM;IACtC,CAAC;IACD,OAAOE,UAAU;EACnB,CAAC,CAAC,OAAOK,GAAG,EAAE;IACZ,MAAMC,aAAa,GAAGP,WAAW,CAAC,CAAC,CAAC;IACpC,MAAMQ,iBAAiB,GAAG;MACxBT,MAAM,EAAEQ,aAAa;MACrBL,WAAW,EAAEA,WAAW,CAACK,aAAa,CAAC;MACvCJ,UAAU,EAAEA,UAAU,CAACI,aAA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AAC;IACN,KAAK,CAAC;IACN,KAAK,EAAE;MACL,OAAO,QAAQ;IACjB,KAAK,CAAC;MACJ,OAAO,MAAM;IACf;MACE,OAAO,EAAE;EACb;AACF,CAAC;AAGD,OAAO,MAAMxB,iBAAiB,GAAID,IAA2B,IAAK;EAChE,MAAM;IAAE0B,YAAY;IAAEC,UAAU;IAAEC,WAAW;IAAEC;EAAM,CAAC,GAAG7B,IAAI;EAC7D,IAAI,CAAC0B,YAAY,IAAI,CAACC,UAAU,EAAE;IAChC,MAAM,IAAIG,KAAK,CAAC,kDAAkD,CAAC;EACrE,CAAC,MAAM,IAAI,CAACF,WAAW,IAAI,CAACC,KAAK,EAAE;IACjC,MAAM,IAAIC,KAAK,CAAC,mDAAmD,CAAC;EACtE,CAAC,MAAM,IAAIF,WAAW,IAAI,CAAC9B,SAAS,CAACiC,aAAa,CAACH,WAAW,CAAC,EAAE;IAC/D,MAAM,IAAIE,KAAK,CAAC,mCAAmC,CAAC;EACtD,CAAC,MAAM,IAAID,KAAK,IAAI,CAAC/B,SAAS,CAACkC,OAAO,CAACH,KAAK,CAAC,EAAE;IAC7C,MAAM,IAAIC,KAAK,CAAC,oCAAoC,CAAC;EACvD;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,82 @@
1
+ declare const globalStyles: {
2
+ container: {
3
+ flex: number;
4
+ backgroundColor: string;
5
+ };
6
+ toast: {
7
+ position: "absolute";
8
+ bottom: number;
9
+ borderRadius: number;
10
+ borderBottomLeftRadius: number;
11
+ borderBottomRightRadius: number;
12
+ color: string;
13
+ backgroundColor: string;
14
+ display: "flex";
15
+ flexDirection: "column";
16
+ minHeight: number;
17
+ minWidth: number;
18
+ };
19
+ toastText: {
20
+ color: string;
21
+ textAlign: "center";
22
+ fontSize: number;
23
+ flexWrap: "wrap";
24
+ paddingRight: number;
25
+ };
26
+ button: {
27
+ display: "flex";
28
+ margin: "auto";
29
+ paddingVertical: number;
30
+ borderRadius: number;
31
+ width: "100%";
32
+ backgroundColor: string;
33
+ };
34
+ buttonOutline: {
35
+ alignSelf: "center";
36
+ borderRadius: number;
37
+ paddingVertical: number;
38
+ width: "100%";
39
+ borderStyle: "solid";
40
+ borderWidth: number;
41
+ color: string;
42
+ borderColor: string;
43
+ left: number;
44
+ right: number;
45
+ paddingHorizontal: number;
46
+ };
47
+ buttonFilled: {
48
+ display: "flex";
49
+ borderRadius: number;
50
+ paddingVertical: number;
51
+ width: "100%";
52
+ left: number;
53
+ right: number;
54
+ backgroundColor: string;
55
+ color: string;
56
+ };
57
+ buttonTextDark: {
58
+ color: string;
59
+ textAlign: "center";
60
+ };
61
+ buttonTextLight: {
62
+ color: string;
63
+ textAlign: "center";
64
+ };
65
+ bFilled: {
66
+ display: "flex";
67
+ margin: "auto";
68
+ borderRadius: number;
69
+ paddingVertical: number;
70
+ width: "100%";
71
+ };
72
+ buttonContainer: {
73
+ bottom: number;
74
+ left: number;
75
+ right: number;
76
+ width: "100%";
77
+ paddingHorizontal: number;
78
+ gap: number;
79
+ };
80
+ };
81
+ export default globalStyles;
82
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/assets/themes/styles.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const BasicInputComponent: (props: any) => import("react").JSX.Element;
2
+ export default BasicInputComponent;
3
+ //# sourceMappingURL=BasicInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasicInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/BasicInput.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,mBAAmB,GAAI,OAAO,GAAG,gCAuEtC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const BlurBackground: ({ intensity, children }: any) => import("react").JSX.Element;
2
+ export default BlurBackground;
3
+ //# sourceMappingURL=BlurBackground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlurBackground.d.ts","sourceRoot":"","sources":["../../../../../src/components/BlurBackground.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,cAAc,GAAI,yBAA4B,GAAG,gCAUtD,CAAC;AAaF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface CameraProps {
2
+ setIsCameraOn: any;
3
+ Toast: any;
4
+ navigation: any;
5
+ }
6
+ declare const Camera: React.FC<CameraProps>;
7
+ export default Camera;
8
+ //# sourceMappingURL=Camera.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../src/components/Camera.tsx"],"names":[],"mappings":"AAoBA,UAAU,WAAW;IACnB,aAAa,EAAE,GAAG,CAAC;IACnB,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAyVjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const CheckboxComponent: (props: any) => import("react").JSX.Element;
2
+ export default CheckboxComponent;
3
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,iBAAiB,GAAI,OAAO,GAAG,gCA6FpC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const DatePicker: (props: any) => import("react").JSX.Element;
2
+ export default DatePicker;
3
+ //# sourceMappingURL=DatePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/DatePicker.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,UAAU,GAAI,OAAO,GAAG,gCA0G7B,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const DropdownComponent: (props: any) => import("react").JSX.Element;
2
+ export default DropdownComponent;
3
+ //# sourceMappingURL=DropdownComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownComponent.d.ts","sourceRoot":"","sources":["../../../../../src/components/DropdownComponent.tsx"],"names":[],"mappings":"AAYA,QAAA,MAAM,iBAAiB,GAAI,OAAO,GAAG,gCA+LpC,CAAA;AAKD,eAAe,iBAAiB,CAAA"}