@procivis/one-react-native-components 0.2.54 → 0.3.27

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 (889) hide show
  1. package/README.md +3 -8
  2. package/lib/commonjs/components/backup/index.js.map +1 -1
  3. package/lib/commonjs/components/backup/preview-credentials.js +18 -22
  4. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  5. package/lib/commonjs/components/credential/credential.js +11 -12
  6. package/lib/commonjs/components/credential/credential.js.map +1 -1
  7. package/lib/commonjs/components/credential/index.js.map +1 -1
  8. package/lib/commonjs/components/entity/EntityButtons.js +20 -25
  9. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  10. package/lib/commonjs/components/entity/entity-attributes.js +16 -18
  11. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  12. package/lib/commonjs/components/entity/entity-details-with-buttons.js +31 -23
  13. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  14. package/lib/commonjs/components/entity/entity-details.js +30 -31
  15. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  16. package/lib/commonjs/components/entity/index.js +2 -2
  17. package/lib/commonjs/components/entity/index.js.map +1 -1
  18. package/lib/commonjs/components/history/history-details-screen.js +67 -0
  19. package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
  20. package/lib/commonjs/components/history/history-list-item-icon.js +97 -0
  21. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
  22. package/lib/commonjs/components/history/history-list-item.js +55 -0
  23. package/lib/commonjs/components/history/history-list-item.js.map +1 -0
  24. package/lib/commonjs/components/history/history-list-screen.js +123 -0
  25. package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
  26. package/lib/commonjs/components/history/history-list-section-header.js +39 -0
  27. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
  28. package/lib/commonjs/components/history/history-list.js +100 -0
  29. package/lib/commonjs/components/history/history-list.js.map +1 -0
  30. package/lib/commonjs/components/history/index.js +72 -0
  31. package/lib/commonjs/components/history/index.js.map +1 -0
  32. package/lib/commonjs/components/index.js +11 -0
  33. package/lib/commonjs/components/index.js.map +1 -1
  34. package/lib/commonjs/components/navigation/header-buttons.js +21 -25
  35. package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
  36. package/lib/commonjs/components/navigation/index.js.map +1 -1
  37. package/lib/commonjs/components/proof-request/group.js +4 -5
  38. package/lib/commonjs/components/proof-request/group.js.map +1 -1
  39. package/lib/commonjs/components/proof-request/index.js.map +1 -1
  40. package/lib/commonjs/components/proof-request/select-credential.js +11 -12
  41. package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
  42. package/lib/commonjs/components/proof-request/share-credential.js +25 -28
  43. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/commonjs/normalize-color.d.js.map +1 -1
  46. package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
  47. package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
  48. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
  49. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  50. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
  51. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  52. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
  53. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  54. package/lib/commonjs/ui-components/accessibility/index.js +1 -30
  55. package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
  56. package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
  57. package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
  58. package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
  59. package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
  60. package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
  61. package/lib/commonjs/ui-components/action-modal/index.js +1 -1
  62. package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
  63. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
  64. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  65. package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
  66. package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
  67. package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
  68. package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
  69. package/lib/commonjs/ui-components/blur/index.js +2 -2
  70. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  71. package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
  72. package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
  73. package/lib/commonjs/ui-components/buttons/button.js +19 -22
  74. package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
  75. package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
  76. package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
  77. package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
  78. package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
  79. package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
  80. package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
  81. package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
  82. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
  83. package/lib/commonjs/ui-components/buttons/index.js +9 -37
  84. package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
  85. package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
  86. package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
  87. package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
  88. package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
  89. package/lib/commonjs/ui-components/camera/index.js +2 -2
  90. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  91. package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
  92. package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
  93. package/lib/commonjs/ui-components/control/checkbox.js +11 -12
  94. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  95. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  96. package/lib/commonjs/ui-components/control/switch.js +10 -12
  97. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  98. package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
  99. package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
  100. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
  101. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  102. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
  103. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  104. package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
  105. package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
  106. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
  107. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  108. package/lib/commonjs/ui-components/credential/card/index.js +6 -41
  109. package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
  110. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
  111. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  112. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
  113. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  114. package/lib/commonjs/ui-components/credential/index.js +2 -25
  115. package/lib/commonjs/ui-components/credential/index.js.map +1 -1
  116. package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
  117. package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
  118. package/lib/commonjs/ui-components/credential/selector.js +8 -10
  119. package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
  120. package/lib/commonjs/ui-components/detail/detail.js +12 -14
  121. package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
  122. package/lib/commonjs/ui-components/detail/index.js +1 -1
  123. package/lib/commonjs/ui-components/detail/index.js.map +1 -1
  124. package/lib/commonjs/ui-components/entity/avatar.js +14 -16
  125. package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
  126. package/lib/commonjs/ui-components/entity/entity-cluster.js +16 -19
  127. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  128. package/lib/commonjs/ui-components/entity/index.js +2 -2
  129. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  130. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
  131. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
  132. package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
  133. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  134. package/lib/commonjs/ui-components/header/header.js +12 -14
  135. package/lib/commonjs/ui-components/header/header.js.map +1 -1
  136. package/lib/commonjs/ui-components/header/index.js +4 -24
  137. package/lib/commonjs/ui-components/header/index.js.map +1 -1
  138. package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
  139. package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
  140. package/lib/commonjs/ui-components/history/data-item.js +30 -23
  141. package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
  142. package/lib/commonjs/ui-components/history/history-details.js +181 -0
  143. package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
  144. package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
  145. package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
  146. package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
  147. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  148. package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
  149. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  150. package/lib/commonjs/ui-components/history/index.js +30 -9
  151. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  152. package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
  153. package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
  154. package/lib/commonjs/ui-components/icons/credential.js +60 -71
  155. package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
  156. package/lib/commonjs/ui-components/icons/entity.js +36 -9
  157. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  158. package/lib/commonjs/ui-components/icons/history.js +115 -133
  159. package/lib/commonjs/ui-components/icons/history.js.map +1 -1
  160. package/lib/commonjs/ui-components/icons/icons.js +73 -90
  161. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  162. package/lib/commonjs/ui-components/icons/index.js.map +1 -1
  163. package/lib/commonjs/ui-components/icons/input.js +3 -3
  164. package/lib/commonjs/ui-components/icons/input.js.map +1 -1
  165. package/lib/commonjs/ui-components/icons/keypad.js +69 -81
  166. package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
  167. package/lib/commonjs/ui-components/icons/loader.js +4 -4
  168. package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
  169. package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
  170. package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
  171. package/lib/commonjs/ui-components/icons/selector.js +8 -9
  172. package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
  173. package/lib/commonjs/ui-components/icons/wallet.js +16 -19
  174. package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
  175. package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
  176. package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
  177. package/lib/commonjs/ui-components/image/index.js +2 -9
  178. package/lib/commonjs/ui-components/image/index.js.map +1 -1
  179. package/lib/commonjs/ui-components/index.js.map +1 -1
  180. package/lib/commonjs/ui-components/input/index.js +2 -2
  181. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  182. package/lib/commonjs/ui-components/input/radio-group.js +28 -25
  183. package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
  184. package/lib/commonjs/ui-components/input/selection-input.js +27 -38
  185. package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
  186. package/lib/commonjs/ui-components/input/text-input.js +25 -28
  187. package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
  188. package/lib/commonjs/ui-components/list/index.js +20 -2
  189. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  190. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
  191. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
  192. package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
  193. package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
  194. package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
  195. package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
  196. package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
  197. package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
  198. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
  199. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
  200. package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
  201. package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
  202. package/lib/commonjs/ui-components/loader/index.js +2 -2
  203. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  204. package/lib/commonjs/ui-components/loader/loader.js +17 -17
  205. package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
  206. package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
  207. package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
  208. package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
  209. package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
  210. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
  211. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  212. package/lib/commonjs/ui-components/pin/index.js +2 -2
  213. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  214. package/lib/commonjs/ui-components/pin/keypad.js +19 -23
  215. package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
  216. package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
  217. package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
  218. package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
  219. package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
  220. package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
  221. package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
  222. package/lib/commonjs/ui-components/pin/pins.js +8 -9
  223. package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
  224. package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
  225. package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
  226. package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
  227. package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
  228. package/lib/commonjs/ui-components/screens/index.js +8 -49
  229. package/lib/commonjs/ui-components/screens/index.js.map +1 -1
  230. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +35 -42
  231. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  232. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
  233. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  234. package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
  235. package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
  236. package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
  237. package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
  238. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
  239. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
  240. package/lib/commonjs/ui-components/searchbar/index.js +2 -2
  241. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  242. package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
  243. package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
  244. package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
  245. package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
  246. package/lib/commonjs/ui-components/settings/index.js +2 -2
  247. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  248. package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
  249. package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
  250. package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
  251. package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
  252. package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
  253. package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
  254. package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
  255. package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
  256. package/lib/commonjs/ui-components/state/error-screen.js +10 -12
  257. package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
  258. package/lib/commonjs/ui-components/state/index.js +2 -2
  259. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  260. package/lib/commonjs/ui-components/text/base.js +14 -16
  261. package/lib/commonjs/ui-components/text/base.js.map +1 -1
  262. package/lib/commonjs/ui-components/text/font.js +11 -13
  263. package/lib/commonjs/ui-components/text/font.js.map +1 -1
  264. package/lib/commonjs/ui-components/text/index.js +2 -9
  265. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  266. package/lib/commonjs/ui-components/text/typography.js +10 -13
  267. package/lib/commonjs/ui-components/text/typography.js.map +1 -1
  268. package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
  269. package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
  270. package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
  271. package/lib/commonjs/ui-components/theme/index.js.map +1 -1
  272. package/lib/commonjs/utils/array.js.map +1 -1
  273. package/lib/commonjs/utils/backup.js.map +1 -1
  274. package/lib/commonjs/utils/color.js +1 -1
  275. package/lib/commonjs/utils/color.js.map +1 -1
  276. package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
  277. package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
  278. package/lib/commonjs/utils/date.js +3 -3
  279. package/lib/commonjs/utils/date.js.map +1 -1
  280. package/lib/commonjs/utils/filtering.js +11 -0
  281. package/lib/commonjs/utils/filtering.js.map +1 -0
  282. package/lib/commonjs/utils/history.js +76 -0
  283. package/lib/commonjs/utils/history.js.map +1 -0
  284. package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
  285. package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
  286. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
  287. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  288. package/lib/commonjs/utils/hooks/core/backup.js +31 -31
  289. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  290. package/lib/commonjs/utils/hooks/core/cache.js +44 -0
  291. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
  292. package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
  293. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  294. package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
  295. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  296. package/lib/commonjs/utils/hooks/core/core-init.js +44 -34
  297. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  298. package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
  299. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  300. package/lib/commonjs/utils/hooks/core/credentials.js +28 -37
  301. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  302. package/lib/commonjs/utils/hooks/core/dids.js +4 -6
  303. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  304. package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
  305. package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
  306. package/lib/commonjs/utils/hooks/core/history.js +5 -37
  307. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  308. package/lib/commonjs/utils/hooks/core/identifiers.js +20 -0
  309. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -0
  310. package/lib/commonjs/utils/hooks/core/index.js +22 -0
  311. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  312. package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
  313. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  314. package/lib/commonjs/utils/hooks/core/proofs.js +108 -76
  315. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  316. package/lib/commonjs/utils/hooks/core/query.js +1 -2
  317. package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
  318. package/lib/commonjs/utils/hooks/core/trust-entity.js +17 -7
  319. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  320. package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  321. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
  322. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  323. package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
  324. package/lib/commonjs/utils/hooks/index.js.map +1 -1
  325. package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
  326. package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
  327. package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
  328. package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  329. package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
  330. package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
  331. package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
  332. package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
  333. package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
  334. package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
  335. package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
  336. package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
  337. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  338. package/lib/commonjs/utils/index.js +37 -1
  339. package/lib/commonjs/utils/index.js.map +1 -1
  340. package/lib/commonjs/utils/navigation.js +5 -5
  341. package/lib/commonjs/utils/navigation.js.map +1 -1
  342. package/lib/commonjs/utils/parsers/credential-images.js +1 -1
  343. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  344. package/lib/commonjs/utils/parsers/credential-sharing.js +24 -25
  345. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  346. package/lib/commonjs/utils/parsers/credential.js +23 -26
  347. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  348. package/lib/commonjs/utils/parsers/index.js +11 -0
  349. package/lib/commonjs/utils/parsers/index.js.map +1 -1
  350. package/lib/commonjs/utils/parsers/query.js +4 -3
  351. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  352. package/lib/commonjs/utils/parsers/universal-links.js +33 -0
  353. package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
  354. package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
  355. package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
  356. package/lib/commonjs/utils/ref.js.map +1 -1
  357. package/lib/commonjs/utils/reporting.js +4 -2
  358. package/lib/commonjs/utils/reporting.js.map +1 -1
  359. package/lib/commonjs/utils/string.js.map +1 -1
  360. package/lib/commonjs/utils/testID.js +1 -4
  361. package/lib/commonjs/utils/testID.js.map +1 -1
  362. package/lib/commonjs/utils/testID.test.js.map +1 -1
  363. package/lib/commonjs/utils/useMemoAsync.js +9 -0
  364. package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
  365. package/lib/commonjs/utils/uuid.js +1 -1
  366. package/lib/commonjs/utils/uuid.js.map +1 -1
  367. package/lib/module/components/backup/index.js.map +1 -1
  368. package/lib/module/components/backup/preview-credentials.js +17 -21
  369. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  370. package/lib/module/components/credential/credential.js +10 -11
  371. package/lib/module/components/credential/credential.js.map +1 -1
  372. package/lib/module/components/credential/index.js.map +1 -1
  373. package/lib/module/components/entity/EntityButtons.js +17 -21
  374. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  375. package/lib/module/components/entity/entity-attributes.js +13 -14
  376. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  377. package/lib/module/components/entity/entity-details-with-buttons.js +29 -20
  378. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  379. package/lib/module/components/entity/entity-details.js +28 -28
  380. package/lib/module/components/entity/entity-details.js.map +1 -1
  381. package/lib/module/components/entity/index.js.map +1 -1
  382. package/lib/module/components/history/history-details-screen.js +59 -0
  383. package/lib/module/components/history/history-details-screen.js.map +1 -0
  384. package/lib/module/components/history/history-list-item-icon.js +87 -0
  385. package/lib/module/components/history/history-list-item-icon.js.map +1 -0
  386. package/lib/module/components/history/history-list-item.js +46 -0
  387. package/lib/module/components/history/history-list-item.js.map +1 -0
  388. package/lib/module/components/history/history-list-screen.js +114 -0
  389. package/lib/module/components/history/history-list-screen.js.map +1 -0
  390. package/lib/module/components/history/history-list-section-header.js +29 -0
  391. package/lib/module/components/history/history-list-section-header.js.map +1 -0
  392. package/lib/module/components/history/history-list.js +90 -0
  393. package/lib/module/components/history/history-list.js.map +1 -0
  394. package/lib/module/components/history/index.js +7 -0
  395. package/lib/module/components/history/index.js.map +1 -0
  396. package/lib/module/components/index.js +1 -0
  397. package/lib/module/components/index.js.map +1 -1
  398. package/lib/module/components/navigation/header-buttons.js +19 -23
  399. package/lib/module/components/navigation/header-buttons.js.map +1 -1
  400. package/lib/module/components/navigation/index.js.map +1 -1
  401. package/lib/module/components/proof-request/group.js +3 -4
  402. package/lib/module/components/proof-request/group.js.map +1 -1
  403. package/lib/module/components/proof-request/index.js.map +1 -1
  404. package/lib/module/components/proof-request/select-credential.js +10 -11
  405. package/lib/module/components/proof-request/select-credential.js.map +1 -1
  406. package/lib/module/components/proof-request/share-credential.js +23 -26
  407. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  408. package/lib/module/index.js.map +1 -1
  409. package/lib/module/normalize-color.d.js.map +1 -1
  410. package/lib/module/ui-components/accessibility/accessibility.js +5 -7
  411. package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
  412. package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
  413. package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  414. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
  415. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  416. package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
  417. package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  418. package/lib/module/ui-components/accessibility/index.js +4 -4
  419. package/lib/module/ui-components/accessibility/index.js.map +1 -1
  420. package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
  421. package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
  422. package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
  423. package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
  424. package/lib/module/ui-components/action-modal/index.js.map +1 -1
  425. package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
  426. package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  427. package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
  428. package/lib/module/ui-components/blur/blur-view.js +10 -11
  429. package/lib/module/ui-components/blur/blur-view.js.map +1 -1
  430. package/lib/module/ui-components/blur/index.js.map +1 -1
  431. package/lib/module/ui-components/buttons/back-button.js +10 -11
  432. package/lib/module/ui-components/buttons/back-button.js.map +1 -1
  433. package/lib/module/ui-components/buttons/button.js +17 -18
  434. package/lib/module/ui-components/buttons/button.js.map +1 -1
  435. package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
  436. package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
  437. package/lib/module/ui-components/buttons/filter-button.js +6 -7
  438. package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
  439. package/lib/module/ui-components/buttons/ghost-button.js +9 -10
  440. package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
  441. package/lib/module/ui-components/buttons/hold-button.js +236 -0
  442. package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
  443. package/lib/module/ui-components/buttons/index.js +8 -7
  444. package/lib/module/ui-components/buttons/index.js.map +1 -1
  445. package/lib/module/ui-components/buttons/scan-button.js +5 -6
  446. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  447. package/lib/module/ui-components/camera/camera-overlay.js +7 -9
  448. package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
  449. package/lib/module/ui-components/camera/index.js.map +1 -1
  450. package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
  451. package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
  452. package/lib/module/ui-components/control/checkbox.js +9 -10
  453. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  454. package/lib/module/ui-components/control/index.js.map +1 -1
  455. package/lib/module/ui-components/control/switch.js +8 -9
  456. package/lib/module/ui-components/control/switch.js.map +1 -1
  457. package/lib/module/ui-components/credential/card/credential-card.js +16 -17
  458. package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
  459. package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
  460. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  461. package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
  462. package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  463. package/lib/module/ui-components/credential/card/credential-header.js +21 -19
  464. package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
  465. package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
  466. package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  467. package/lib/module/ui-components/credential/card/index.js +10 -10
  468. package/lib/module/ui-components/credential/card/index.js.map +1 -1
  469. package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
  470. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  471. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
  472. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  473. package/lib/module/ui-components/credential/index.js +2 -2
  474. package/lib/module/ui-components/credential/index.js.map +1 -1
  475. package/lib/module/ui-components/credential/selector-status.js +3 -3
  476. package/lib/module/ui-components/credential/selector-status.js.map +1 -1
  477. package/lib/module/ui-components/credential/selector.js +5 -6
  478. package/lib/module/ui-components/credential/selector.js.map +1 -1
  479. package/lib/module/ui-components/detail/detail.js +9 -10
  480. package/lib/module/ui-components/detail/detail.js.map +1 -1
  481. package/lib/module/ui-components/detail/index.js.map +1 -1
  482. package/lib/module/ui-components/entity/avatar.js +10 -11
  483. package/lib/module/ui-components/entity/avatar.js.map +1 -1
  484. package/lib/module/ui-components/entity/entity-cluster.js +12 -14
  485. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  486. package/lib/module/ui-components/entity/index.js.map +1 -1
  487. package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
  488. package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
  489. package/lib/module/ui-components/header/foldable-header.js +10 -12
  490. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  491. package/lib/module/ui-components/header/header.js +10 -11
  492. package/lib/module/ui-components/header/header.js.map +1 -1
  493. package/lib/module/ui-components/header/index.js +6 -6
  494. package/lib/module/ui-components/header/index.js.map +1 -1
  495. package/lib/module/ui-components/header/navigation-header.js +23 -28
  496. package/lib/module/ui-components/header/navigation-header.js.map +1 -1
  497. package/lib/module/ui-components/history/data-item.js +23 -15
  498. package/lib/module/ui-components/history/data-item.js.map +1 -1
  499. package/lib/module/ui-components/history/history-details.js +171 -0
  500. package/lib/module/ui-components/history/history-details.js.map +1 -0
  501. package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
  502. package/lib/module/ui-components/history/history-item.js.map +1 -0
  503. package/lib/module/ui-components/history/history-section-header.js +6 -7
  504. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  505. package/lib/module/ui-components/history/history-section-list-item.js +8 -9
  506. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  507. package/lib/module/ui-components/history/index.js +5 -4
  508. package/lib/module/ui-components/history/index.js.map +1 -1
  509. package/lib/module/ui-components/icons/connectivity.js +16 -21
  510. package/lib/module/ui-components/icons/connectivity.js.map +1 -1
  511. package/lib/module/ui-components/icons/credential.js +57 -68
  512. package/lib/module/ui-components/icons/credential.js.map +1 -1
  513. package/lib/module/ui-components/icons/entity.js +31 -5
  514. package/lib/module/ui-components/icons/entity.js.map +1 -1
  515. package/lib/module/ui-components/icons/history.js +103 -128
  516. package/lib/module/ui-components/icons/history.js.map +1 -1
  517. package/lib/module/ui-components/icons/icons.js +70 -87
  518. package/lib/module/ui-components/icons/icons.js.map +1 -1
  519. package/lib/module/ui-components/icons/index.js.map +1 -1
  520. package/lib/module/ui-components/icons/input.js.map +1 -1
  521. package/lib/module/ui-components/icons/keypad.js +66 -78
  522. package/lib/module/ui-components/icons/keypad.js.map +1 -1
  523. package/lib/module/ui-components/icons/loader.js +1 -1
  524. package/lib/module/ui-components/icons/loader.js.map +1 -1
  525. package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
  526. package/lib/module/ui-components/icons/selector.js +5 -6
  527. package/lib/module/ui-components/icons/selector.js.map +1 -1
  528. package/lib/module/ui-components/icons/wallet.js +13 -16
  529. package/lib/module/ui-components/icons/wallet.js.map +1 -1
  530. package/lib/module/ui-components/image/image-or-component.js +12 -14
  531. package/lib/module/ui-components/image/image-or-component.js.map +1 -1
  532. package/lib/module/ui-components/image/index.js +2 -2
  533. package/lib/module/ui-components/image/index.js.map +1 -1
  534. package/lib/module/ui-components/index.js.map +1 -1
  535. package/lib/module/ui-components/input/index.js.map +1 -1
  536. package/lib/module/ui-components/input/radio-group.js +26 -22
  537. package/lib/module/ui-components/input/radio-group.js.map +1 -1
  538. package/lib/module/ui-components/input/selection-input.js +21 -31
  539. package/lib/module/ui-components/input/selection-input.js.map +1 -1
  540. package/lib/module/ui-components/input/text-input.js +21 -22
  541. package/lib/module/ui-components/input/text-input.js.map +1 -1
  542. package/lib/module/ui-components/list/index.js +1 -0
  543. package/lib/module/ui-components/list/index.js.map +1 -1
  544. package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
  545. package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
  546. package/lib/module/ui-components/list/list-section-header.js +8 -9
  547. package/lib/module/ui-components/list/list-section-header.js.map +1 -1
  548. package/lib/module/ui-components/list/list-title-header.js +4 -5
  549. package/lib/module/ui-components/list/list-title-header.js.map +1 -1
  550. package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
  551. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
  552. package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
  553. package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
  554. package/lib/module/ui-components/list/wallet/index.js +4 -0
  555. package/lib/module/ui-components/list/wallet/index.js.map +1 -0
  556. package/lib/module/ui-components/loader/index.js.map +1 -1
  557. package/lib/module/ui-components/loader/loader.js +14 -12
  558. package/lib/module/ui-components/loader/loader.js.map +1 -1
  559. package/lib/module/ui-components/loader/loading-result.js +21 -19
  560. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  561. package/lib/module/ui-components/nerd-view/index.js +2 -2
  562. package/lib/module/ui-components/nerd-view/index.js.map +1 -1
  563. package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
  564. package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  565. package/lib/module/ui-components/pin/index.js.map +1 -1
  566. package/lib/module/ui-components/pin/keypad.js +17 -19
  567. package/lib/module/ui-components/pin/keypad.js.map +1 -1
  568. package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
  569. package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
  570. package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
  571. package/lib/module/ui-components/pin/pin-lock.js +6 -7
  572. package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
  573. package/lib/module/ui-components/pin/pins.js +7 -8
  574. package/lib/module/ui-components/pin/pins.js.map +1 -1
  575. package/lib/module/ui-components/screens/backup-screen.js +13 -14
  576. package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
  577. package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
  578. package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
  579. package/lib/module/ui-components/screens/index.js +12 -12
  580. package/lib/module/ui-components/screens/index.js.map +1 -1
  581. package/lib/module/ui-components/screens/nerd-mode-screen.js +30 -35
  582. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  583. package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
  584. package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  585. package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
  586. package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
  587. package/lib/module/ui-components/screens/section-list-screen.js +11 -12
  588. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  589. package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
  590. package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
  591. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  592. package/lib/module/ui-components/searchbar/search-bar.js +11 -12
  593. package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
  594. package/lib/module/ui-components/settings/button-setting.js +10 -11
  595. package/lib/module/ui-components/settings/button-setting.js.map +1 -1
  596. package/lib/module/ui-components/settings/index.js.map +1 -1
  597. package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
  598. package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
  599. package/lib/module/ui-components/settings/setting-item.js +7 -8
  600. package/lib/module/ui-components/settings/setting-item.js.map +1 -1
  601. package/lib/module/ui-components/settings/settings-button.js +5 -6
  602. package/lib/module/ui-components/settings/settings-button.js.map +1 -1
  603. package/lib/module/ui-components/settings/switch-setting.js +9 -10
  604. package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
  605. package/lib/module/ui-components/state/error-screen.js +7 -8
  606. package/lib/module/ui-components/state/error-screen.js.map +1 -1
  607. package/lib/module/ui-components/state/index.js.map +1 -1
  608. package/lib/module/ui-components/text/base.js +12 -13
  609. package/lib/module/ui-components/text/base.js.map +1 -1
  610. package/lib/module/ui-components/text/font.js +10 -11
  611. package/lib/module/ui-components/text/font.js.map +1 -1
  612. package/lib/module/ui-components/text/index.js +2 -2
  613. package/lib/module/ui-components/text/index.js.map +1 -1
  614. package/lib/module/ui-components/text/typography.js +8 -10
  615. package/lib/module/ui-components/text/typography.js.map +1 -1
  616. package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
  617. package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
  618. package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
  619. package/lib/module/ui-components/theme/index.js.map +1 -1
  620. package/lib/module/utils/array.js.map +1 -1
  621. package/lib/module/utils/backup.js.map +1 -1
  622. package/lib/module/utils/color.js.map +1 -1
  623. package/lib/module/utils/contrasting-status-bar.js +5 -6
  624. package/lib/module/utils/contrasting-status-bar.js.map +1 -1
  625. package/lib/module/utils/date.js +4 -4
  626. package/lib/module/utils/date.js.map +1 -1
  627. package/lib/module/utils/filtering.js +4 -0
  628. package/lib/module/utils/filtering.js.map +1 -0
  629. package/lib/module/utils/history.js +66 -0
  630. package/lib/module/utils/history.js.map +1 -0
  631. package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
  632. package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
  633. package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
  634. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  635. package/lib/module/utils/hooks/core/backup.js +31 -31
  636. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  637. package/lib/module/utils/hooks/core/cache.js +37 -0
  638. package/lib/module/utils/hooks/core/cache.js.map +1 -0
  639. package/lib/module/utils/hooks/core/core-config.js +11 -0
  640. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  641. package/lib/module/utils/hooks/core/core-context.js +14 -9
  642. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  643. package/lib/module/utils/hooks/core/core-init.js +42 -30
  644. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  645. package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
  646. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  647. package/lib/module/utils/hooks/core/credentials.js +27 -36
  648. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  649. package/lib/module/utils/hooks/core/dids.js +3 -4
  650. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  651. package/lib/module/utils/hooks/core/error-code.js +3 -3
  652. package/lib/module/utils/hooks/core/error-code.js.map +1 -1
  653. package/lib/module/utils/hooks/core/history.js +4 -35
  654. package/lib/module/utils/hooks/core/history.js.map +1 -1
  655. package/lib/module/utils/hooks/core/identifiers.js +13 -0
  656. package/lib/module/utils/hooks/core/identifiers.js.map +1 -0
  657. package/lib/module/utils/hooks/core/index.js +2 -0
  658. package/lib/module/utils/hooks/core/index.js.map +1 -1
  659. package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
  660. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  661. package/lib/module/utils/hooks/core/proofs.js +102 -67
  662. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  663. package/lib/module/utils/hooks/core/query.js.map +1 -1
  664. package/lib/module/utils/hooks/core/trust-entity.js +16 -6
  665. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  666. package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  667. package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
  668. package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  669. package/lib/module/utils/hooks/http/client.js.map +1 -1
  670. package/lib/module/utils/hooks/index.js.map +1 -1
  671. package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
  672. package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
  673. package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
  674. package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  675. package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
  676. package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
  677. package/lib/module/utils/hooks/navigation/index.js.map +1 -1
  678. package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
  679. package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
  680. package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
  681. package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
  682. package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
  683. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  684. package/lib/module/utils/index.js +3 -0
  685. package/lib/module/utils/index.js.map +1 -1
  686. package/lib/module/utils/navigation.js +5 -5
  687. package/lib/module/utils/navigation.js.map +1 -1
  688. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  689. package/lib/module/utils/parsers/credential-sharing.js +23 -24
  690. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  691. package/lib/module/utils/parsers/credential.js +23 -25
  692. package/lib/module/utils/parsers/credential.js.map +1 -1
  693. package/lib/module/utils/parsers/index.js +1 -0
  694. package/lib/module/utils/parsers/index.js.map +1 -1
  695. package/lib/module/utils/parsers/query.js +4 -3
  696. package/lib/module/utils/parsers/query.js.map +1 -1
  697. package/lib/module/utils/parsers/universal-links.js +25 -0
  698. package/lib/module/utils/parsers/universal-links.js.map +1 -0
  699. package/lib/module/utils/parsers/universal-links.test.js +38 -0
  700. package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
  701. package/lib/module/utils/ref.js.map +1 -1
  702. package/lib/module/utils/reporting.js +1 -0
  703. package/lib/module/utils/reporting.js.map +1 -1
  704. package/lib/module/utils/string.js.map +1 -1
  705. package/lib/module/utils/testID.js +1 -4
  706. package/lib/module/utils/testID.js.map +1 -1
  707. package/lib/module/utils/testID.test.js.map +1 -1
  708. package/lib/module/utils/useMemoAsync.js +10 -0
  709. package/lib/module/utils/useMemoAsync.js.map +1 -1
  710. package/lib/module/utils/uuid.js.map +1 -1
  711. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  712. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -2
  713. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  714. package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
  715. package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
  716. package/lib/typescript/components/history/history-list-item.d.ts +21 -0
  717. package/lib/typescript/components/history/history-list-screen.d.ts +24 -0
  718. package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
  719. package/lib/typescript/components/history/history-list.d.ts +19 -0
  720. package/lib/typescript/components/history/index.d.ts +6 -0
  721. package/lib/typescript/components/index.d.ts +1 -0
  722. package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
  723. package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
  724. package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
  725. package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
  726. package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
  727. package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
  728. package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
  729. package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
  730. package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
  731. package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
  732. package/lib/typescript/ui-components/credential/index.d.ts +2 -1
  733. package/lib/typescript/ui-components/header/index.d.ts +6 -3
  734. package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
  735. package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
  736. package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
  737. package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
  738. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  739. package/lib/typescript/ui-components/history/index.d.ts +5 -4
  740. package/lib/typescript/ui-components/icons/entity.d.ts +1 -0
  741. package/lib/typescript/ui-components/icons/history.d.ts +22 -35
  742. package/lib/typescript/ui-components/image/index.d.ts +2 -1
  743. package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
  744. package/lib/typescript/ui-components/list/index.d.ts +1 -0
  745. package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
  746. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
  747. package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
  748. package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
  749. package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
  750. package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
  751. package/lib/typescript/ui-components/screens/index.d.ts +12 -6
  752. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +4 -4
  753. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  754. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  755. package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
  756. package/lib/typescript/utils/filtering.d.ts +1 -0
  757. package/lib/typescript/utils/history.d.ts +10 -0
  758. package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
  759. package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
  760. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
  761. package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
  762. package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
  763. package/lib/typescript/utils/hooks/core/credentials.d.ts +9 -4
  764. package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
  765. package/lib/typescript/utils/hooks/core/identifiers.d.ts +2 -0
  766. package/lib/typescript/utils/hooks/core/index.d.ts +2 -0
  767. package/lib/typescript/utils/hooks/core/proofs.d.ts +16 -9
  768. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -1
  769. package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
  770. package/lib/typescript/utils/index.d.ts +3 -0
  771. package/lib/typescript/utils/parsers/index.d.ts +1 -0
  772. package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
  773. package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
  774. package/lib/typescript/utils/ref.d.ts +1 -1
  775. package/package.json +61 -47
  776. package/src/components/entity/entity-attributes.tsx +5 -4
  777. package/src/components/entity/entity-details-with-buttons.tsx +20 -13
  778. package/src/components/entity/entity-details.tsx +24 -27
  779. package/src/components/history/history-details-screen.tsx +89 -0
  780. package/src/components/history/history-list-item-icon.tsx +113 -0
  781. package/src/components/history/history-list-item.tsx +64 -0
  782. package/src/components/history/history-list-screen.tsx +157 -0
  783. package/src/components/history/history-list-section-header.tsx +42 -0
  784. package/src/components/history/history-list.tsx +116 -0
  785. package/src/components/history/index.tsx +6 -0
  786. package/src/components/index.ts +1 -0
  787. package/src/components/proof-request/share-credential.tsx +2 -1
  788. package/src/ui-components/accessibility/accessibility.ts +2 -2
  789. package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
  790. package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
  791. package/src/ui-components/accessibility/index.ts +4 -3
  792. package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
  793. package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
  794. package/src/ui-components/buttons/back-button.stories.tsx +7 -8
  795. package/src/ui-components/buttons/button.stories.tsx +9 -10
  796. package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
  797. package/src/ui-components/buttons/connectivity-button.tsx +1 -1
  798. package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
  799. package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
  800. package/src/ui-components/buttons/hold-button.tsx +276 -0
  801. package/src/ui-components/buttons/index.ts +16 -6
  802. package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
  803. package/src/ui-components/control/checkbox.stories.tsx +8 -8
  804. package/src/ui-components/control/switch.stories.tsx +11 -8
  805. package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
  806. package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
  807. package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
  808. package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
  809. package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
  810. package/src/ui-components/credential/card/credential-header.tsx +4 -1
  811. package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
  812. package/src/ui-components/credential/card/index.ts +11 -5
  813. package/src/ui-components/credential/index.ts +2 -1
  814. package/src/ui-components/credential/selector.stories.tsx +7 -7
  815. package/src/ui-components/detail/detail.stories.tsx +11 -8
  816. package/src/ui-components/entity/avatar.stories.tsx +10 -7
  817. package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
  818. package/src/ui-components/entity/entity-cluster.tsx +1 -1
  819. package/src/ui-components/header/header.stories.tsx +10 -7
  820. package/src/ui-components/header/index.ts +6 -3
  821. package/src/ui-components/header/navigation-header.stories.tsx +11 -8
  822. package/src/ui-components/history/data-item.tsx +13 -4
  823. package/src/ui-components/history/history-details.tsx +247 -0
  824. package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
  825. package/src/ui-components/history/history-section-header.tsx +2 -2
  826. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  827. package/src/ui-components/history/index.ts +5 -4
  828. package/src/ui-components/icons/entity.tsx +27 -0
  829. package/src/ui-components/icons/history.tsx +84 -131
  830. package/src/ui-components/image/index.tsx +2 -1
  831. package/src/ui-components/input/radio-group.stories.tsx +34 -0
  832. package/src/ui-components/input/radio-group.tsx +8 -2
  833. package/src/ui-components/input/selection-input.stories.tsx +20 -17
  834. package/src/ui-components/list/index.ts +1 -0
  835. package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
  836. package/src/ui-components/list/wallet/empty-list.tsx +75 -0
  837. package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
  838. package/src/ui-components/list/wallet/index.tsx +4 -0
  839. package/src/ui-components/loader/loader.stories.tsx +6 -9
  840. package/src/ui-components/loader/loader.tsx +6 -3
  841. package/src/ui-components/loader/loading-result.stories.tsx +13 -10
  842. package/src/ui-components/loader/loading-result.tsx +8 -4
  843. package/src/ui-components/nerd-view/index.ts +2 -1
  844. package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
  845. package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
  846. package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
  847. package/src/ui-components/screens/index.ts +12 -6
  848. package/src/ui-components/screens/nerd-mode-screen.tsx +6 -6
  849. package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
  850. package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
  851. package/src/ui-components/searchbar/search-bar.tsx +2 -2
  852. package/src/ui-components/state/error-screen.stories.tsx +8 -9
  853. package/src/ui-components/state/error-screen.tsx +1 -1
  854. package/src/ui-components/text/index.ts +2 -1
  855. package/src/ui-components/text/typography.stories.tsx +19 -12
  856. package/src/ui-components/theme/color-scheme-context.tsx +1 -0
  857. package/src/ui-components/theme/color-scheme.ts +1 -0
  858. package/src/utils/date.ts +5 -5
  859. package/src/utils/filtering.ts +5 -0
  860. package/src/utils/history.ts +71 -0
  861. package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
  862. package/src/utils/hooks/connectivity/connectivity.ts +28 -4
  863. package/src/utils/hooks/core/backup.ts +25 -21
  864. package/src/utils/hooks/core/cache.ts +43 -0
  865. package/src/utils/hooks/core/core-config.ts +19 -0
  866. package/src/utils/hooks/core/core-context.tsx +15 -2
  867. package/src/utils/hooks/core/core-init.ts +45 -27
  868. package/src/utils/hooks/core/credential-schemas.ts +1 -1
  869. package/src/utils/hooks/core/credentials.ts +18 -17
  870. package/src/utils/hooks/core/history.ts +2 -57
  871. package/src/utils/hooks/core/identifiers.ts +18 -0
  872. package/src/utils/hooks/core/index.ts +3 -1
  873. package/src/utils/hooks/core/proof-schemas.ts +1 -1
  874. package/src/utils/hooks/core/proofs.ts +111 -51
  875. package/src/utils/hooks/core/trust-entity.ts +21 -13
  876. package/src/utils/hooks/navigation/open-settings.ts +2 -3
  877. package/src/utils/hooks/revocation/credential-status.ts +3 -2
  878. package/src/utils/index.ts +3 -0
  879. package/src/utils/navigation.ts +4 -2
  880. package/src/utils/parsers/credential-sharing.tsx +25 -25
  881. package/src/utils/parsers/credential.ts +5 -1
  882. package/src/utils/parsers/index.ts +1 -0
  883. package/src/utils/parsers/query.tsx +4 -2
  884. package/src/utils/parsers/universal-links.test.ts +57 -0
  885. package/src/utils/parsers/universal-links.ts +26 -0
  886. package/src/utils/ref.ts +1 -1
  887. package/src/utils/reporting.ts +1 -0
  888. package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
  889. package/lib/module/ui-components/history/history-list-item.js.map +0 -1
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useUpdateRemoteTrustEntity = exports.useTrustEntity = exports.useRemoteTrustEntity = exports.useCreateTrustAnchor = exports.useCreateRemoteTrustEntity = void 0;
6
+ exports.useUpdateRemoteTrustEntity = exports.useTrustEntity = exports.useRemoteTrustEntity = exports.useCreateTrustAnchor = exports.useCreateRemoteTrustEntity = exports.TrustManagementEnum = exports.TRUST_ENTITY_DETAIL_QUERY_KEY = exports.REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = void 0;
7
7
  var _reactNativeOneCore = require("@procivis/react-native-one-core");
8
8
  var _react = require("react");
9
9
  var _reactQuery = require("react-query");
@@ -12,8 +12,9 @@ var _client = require("../http/client");
12
12
  var _coreContext = require("./core-context");
13
13
  var _errorCode = require("./error-code");
14
14
  var _history = require("./history");
15
- const TRUST_ENTITY_DETAIL_QUERY_KEY = 'trust-entity-detail';
16
- const REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = 'remote-trust-entity-detail';
15
+ var _identifiers = require("./identifiers");
16
+ const TRUST_ENTITY_DETAIL_QUERY_KEY = exports.TRUST_ENTITY_DETAIL_QUERY_KEY = 'trust-entity-detail';
17
+ const REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = exports.REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = 'remote-trust-entity-detail';
17
18
  const useCreateTrustAnchor = publisherReference => {
18
19
  const httpClient = (0, _client.useHTTPClient)();
19
20
  return (0, _react.useCallback)(async core => {
@@ -33,25 +34,30 @@ const useCreateTrustAnchor = publisherReference => {
33
34
  isPublisher: false,
34
35
  name: trustAnchor.name,
35
36
  publisherReference,
36
- type: 'SIMPLE_TRUST_LIST'
37
+ type: TrustManagementEnum.SimpleTrustList
37
38
  }).catch(err => {
38
39
  (0, _reporting.reportException)(err, 'Failed to create trust anchor');
39
40
  throw err;
40
41
  });
41
42
  }, [publisherReference, httpClient]);
42
43
  };
44
+
45
+ // NOTE: As per ONE-5672, only handles DID Identifier details
43
46
  exports.useCreateTrustAnchor = useCreateTrustAnchor;
44
- const useTrustEntity = didId => {
47
+ const useTrustEntity = identifierId => {
45
48
  const {
46
49
  core
47
50
  } = (0, _coreContext.useONECore)();
48
- return (0, _reactQuery.useQuery)([TRUST_ENTITY_DETAIL_QUERY_KEY, didId], () => didId ? core.getTrustEntityByDid(didId).catch(e => {
51
+ const {
52
+ data: identifierDetail
53
+ } = (0, _identifiers.useIdentifierDetails)(identifierId);
54
+ return (0, _reactQuery.useQuery)([TRUST_ENTITY_DETAIL_QUERY_KEY, identifierId], () => identifierDetail !== null && identifierDetail !== void 0 && identifierDetail.did ? core.getTrustEntityByDid(identifierDetail.did.id).catch(e => {
49
55
  if (e instanceof _reactNativeOneCore.OneError && e.code === _errorCode.OneErrorCode.NoTrustEntityFound) {
50
56
  return null;
51
57
  }
52
58
  throw e;
53
59
  }) : undefined, {
54
- enabled: Boolean(didId),
60
+ enabled: Boolean(identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.did),
55
61
  keepPreviousData: true
56
62
  });
57
63
  };
@@ -92,4 +98,8 @@ const useUpdateRemoteTrustEntity = () => {
92
98
  });
93
99
  };
94
100
  exports.useUpdateRemoteTrustEntity = useUpdateRemoteTrustEntity;
101
+ let TrustManagementEnum = exports.TrustManagementEnum = /*#__PURE__*/function (TrustManagementEnum) {
102
+ TrustManagementEnum["SimpleTrustList"] = "SIMPLE_TRUST_LIST";
103
+ return TrustManagementEnum;
104
+ }({});
95
105
  //# sourceMappingURL=trust-entity.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeOneCore","require","_react","_reactQuery","_reporting","_client","_coreContext","_errorCode","_history","TRUST_ENTITY_DETAIL_QUERY_KEY","REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY","useCreateTrustAnchor","publisherReference","httpClient","useHTTPClient","useCallback","core","trustAnchors","getTrustAnchors","page","pageSize","values","length","response","get","ok","data","trustAnchor","createTrustAnchor","isPublisher","name","type","catch","err","reportException","exports","useTrustEntity","didId","useONECore","useQuery","getTrustEntityByDid","e","OneError","code","OneErrorCode","NoTrustEntityFound","undefined","enabled","Boolean","keepPreviousData","useRemoteTrustEntity","did","getRemoteTrustEntity","useCreateRemoteTrustEntity","queryClient","useQueryClient","useMutation","request","createRemoteTrustEntity","onSuccess","invalidateQueries","HISTORY_LIST_QUERY_KEY","useUpdateRemoteTrustEntity","updateRemoteTrustEntity"],"sources":["trust-entity.ts"],"sourcesContent":["import {\n CreateRemoteTrustEntityRequest,\n ONECore,\n OneError,\n TrustAnchor,\n UpdateRemoteTrustEntityRequest,\n} from '@procivis/react-native-one-core';\nimport { useCallback } from 'react';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { reportException } from '../../reporting';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst TRUST_ENTITY_DETAIL_QUERY_KEY = 'trust-entity-detail';\nconst REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = 'remote-trust-entity-detail';\n\nexport const useCreateTrustAnchor = (publisherReference: string) => {\n const httpClient = useHTTPClient();\n\n return useCallback(\n async (core: ONECore) => {\n const trustAnchors = await core.getTrustAnchors({\n page: 0,\n pageSize: 1,\n });\n if (trustAnchors.values.length > 0) {\n return;\n }\n const response = await httpClient.get<TrustAnchor>(publisherReference);\n if (!response.ok || !response.data) {\n return;\n }\n const trustAnchor = response.data;\n await core\n .createTrustAnchor({\n isPublisher: false,\n name: trustAnchor.name,\n publisherReference,\n type: 'SIMPLE_TRUST_LIST',\n })\n .catch((err) => {\n reportException(err, 'Failed to create trust anchor');\n throw err;\n });\n },\n [publisherReference, httpClient],\n );\n};\n\nexport const useTrustEntity = (didId: string | undefined) => {\n const { core } = useONECore();\n\n return useQuery(\n [TRUST_ENTITY_DETAIL_QUERY_KEY, didId],\n () =>\n didId\n ? core.getTrustEntityByDid(didId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.NoTrustEntityFound) {\n return null;\n }\n throw e;\n })\n : undefined,\n {\n enabled: Boolean(didId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useRemoteTrustEntity = (did: string | undefined) => {\n const { core } = useONECore();\n\n return useQuery(\n [REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY, did],\n () => (did ? core.getRemoteTrustEntity(did) : undefined),\n {\n enabled: Boolean(did),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCreateRemoteTrustEntity = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (request: CreateRemoteTrustEntityRequest) => core.createRemoteTrustEntity(request), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useUpdateRemoteTrustEntity = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (request: UpdateRemoteTrustEntityRequest) => core.updateRemoteTrustEntity(request), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAEA,MAAMQ,6BAA6B,GAAG,qBAAqB;AAC3D,MAAMC,oCAAoC,GAAG,4BAA4B;AAElE,MAAMC,oBAAoB,GAAIC,kBAA0B,IAAK;EAClE,MAAMC,UAAU,GAAG,IAAAC,qBAAa,GAAE;EAElC,OAAO,IAAAC,kBAAW,EAChB,MAAOC,IAAa,IAAK;IACvB,MAAMC,YAAY,GAAG,MAAMD,IAAI,CAACE,eAAe,CAAC;MAC9CC,IAAI,EAAE,CAAC;MACPC,QAAQ,EAAE;IACZ,CAAC,CA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E,MAAM4C,WAAW,CAACM,iBAAiB,CAACC,+BAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAAC1B,OAAA,CAAA2B,0BAAA,GAAAA,0BAAA"}
1
+ {"version":3,"names":["_reactNativeOneCore","require","_react","_reactQuery","_reporting","_client","_coreContext","_errorCode","_history","_identifiers","TRUST_ENTITY_DETAIL_QUERY_KEY","exports","REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY","useCreateTrustAnchor","publisherReference","httpClient","useHTTPClient","useCallback","core","trustAnchors","getTrustAnchors","page","pageSize","values","length","response","get","ok","data","trustAnchor","createTrustAnchor","isPublisher","name","type","TrustManagementEnum","SimpleTrustList","catch","err","reportException","useTrustEntity","identifierId","useONECore","identifierDetail","useIdentifierDetails","useQuery","did","getTrustEntityByDid","id","e","OneError","code","OneErrorCode","NoTrustEntityFound","undefined","enabled","Boolean","keepPreviousData","useRemoteTrustEntity","getRemoteTrustEntity","useCreateRemoteTrustEntity","queryClient","useQueryClient","useMutation","request","createRemoteTrustEntity","onSuccess","invalidateQueries","HISTORY_LIST_QUERY_KEY","useUpdateRemoteTrustEntity","updateRemoteTrustEntity"],"sources":["trust-entity.ts"],"sourcesContent":["import {\n CreateRemoteTrustEntityRequest,\n ONECore,\n OneError,\n TrustAnchor,\n UpdateRemoteTrustEntityRequest,\n} from '@procivis/react-native-one-core';\nimport { useCallback } from 'react';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { reportException } from '../../reporting';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\nimport { useIdentifierDetails } from './identifiers';\n\nexport const TRUST_ENTITY_DETAIL_QUERY_KEY = 'trust-entity-detail';\nexport const REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = 'remote-trust-entity-detail';\n\nexport const useCreateTrustAnchor = (publisherReference: string) => {\n const httpClient = useHTTPClient();\n\n return useCallback(\n async (core: ONECore) => {\n const trustAnchors = await core.getTrustAnchors({\n page: 0,\n pageSize: 1,\n });\n if (trustAnchors.values.length > 0) {\n return;\n }\n const response = await httpClient.get<TrustAnchor>(publisherReference);\n if (!response.ok || !response.data) {\n return;\n }\n const trustAnchor = response.data;\n await core\n .createTrustAnchor({\n isPublisher: false,\n name: trustAnchor.name,\n publisherReference,\n type: TrustManagementEnum.SimpleTrustList,\n })\n .catch((err) => {\n reportException(err, 'Failed to create trust anchor');\n throw err;\n });\n },\n [publisherReference, httpClient],\n );\n};\n\n// NOTE: As per ONE-5672, only handles DID Identifier details\nexport const useTrustEntity = (identifierId: string | undefined) => {\n const { core } = useONECore();\n\n const { data: identifierDetail } = useIdentifierDetails(identifierId);\n\n return useQuery(\n [TRUST_ENTITY_DETAIL_QUERY_KEY, identifierId],\n () =>\n identifierDetail?.did\n ? core.getTrustEntityByDid(identifierDetail.did.id).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.NoTrustEntityFound) {\n return null;\n }\n throw e;\n })\n : undefined,\n {\n enabled: Boolean(identifierDetail?.did),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useRemoteTrustEntity = (did: string | undefined) => {\n const { core } = useONECore();\n\n return useQuery(\n [REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY, did],\n () => (did ? core.getRemoteTrustEntity(did) : undefined),\n {\n enabled: Boolean(did),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCreateRemoteTrustEntity = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (request: CreateRemoteTrustEntityRequest) => core.createRemoteTrustEntity(request), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useUpdateRemoteTrustEntity = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (request: UpdateRemoteTrustEntityRequest) => core.updateRemoteTrustEntity(request), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport enum TrustManagementEnum {\n SimpleTrustList = 'SIMPLE_TRUST_LIST',\n}\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAEO,MAAMS,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG,qBAAqB;AAC3D,MAAME,oCAAoC,GAAAD,OAAA,CAAAC,oCAAA,GAAG,4BAA4B;AAEzE,MAAMC,oBAAoB,GAAIC,kBAA0B,IAAK;EAClE,MAAMC,UAAU,GAAG,IAAAC,qBAAa,EAAC,CAAC;EAElC,OAAO,IAAAC,kBAAW,EAChB,MAAOC,IAAa,IAAK;IACvB,MAAMC,YAAY,GAAG,MAAMD,IAAI,CAACE,eAAe,CAAC;MAC9CC,IAAI,EAAE,CAAC;MACPC,QAAQ,EAAE;IACZ,CAAC,CAAC;IACF,IAAIH,YAAY,CAACI,MAAM,CAACC,MAAM,GAAG,CAAC,EAAE;MAClC;IACF;IACA,MAAMC,QAAQ,GAAG,MAAMV,UAAU,CAACW,GAAG,CAAcZ,kBAAkB,CAAC;IACtE,IAAI,CAACW,QAAQ,CAACE,EAAE,IAAI,CAACF,QAAQ,CAACG,IAAI,EAAE;MAClC;IACF;IACA,MAAMC,WAAW,GAAGJ,QAAQ,CAACG,IAAI;IACjC,MAAMV,IAAI,CACPY,iBAAiB,CAA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C,+BAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAACxD,OAAA,CAAAyD,0BAAA,GAAAA,0BAAA;AAAA,IAEUlC,mBAAmB,GAAAvB,OAAA,CAAAuB,mBAAA,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","useCredentialCardExpanded","expanded","setExpanded","useState","onHeaderPress","useCallback","oldValue","exports","useCredentialListExpandedCard","expandedCredential","setExpandedCredential","initialized","setInitialized","credentialId","undefined","setInitialCredential","foldCards"],"sources":["credential-card-expanding.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useCredentialCardExpanded = () => {\n const [expanded, setExpanded] = useState(true);\n\n const onHeaderPress = useCallback(() => {\n setExpanded((oldValue) => !oldValue);\n }, []);\n\n return { expanded, onHeaderPress };\n};\n\nexport const useCredentialListExpandedCard = () => {\n const [expandedCredential, setExpandedCredential] = useState<string>();\n const [initialized, setInitialized] = useState(false);\n\n const onHeaderPress = useCallback((credentialId?: string) => {\n if (!credentialId) {\n return;\n }\n setInitialized(true);\n setExpandedCredential((oldValue) => {\n if (credentialId === oldValue) {\n return undefined;\n }\n return credentialId;\n });\n }, []);\n\n const setInitialCredential = useCallback(\n (credentialId: string) => {\n if (!initialized) {\n setExpandedCredential(credentialId);\n }\n setInitialized(true);\n },\n [initialized],\n );\n\n const foldCards = useCallback(() => {\n setExpandedCredential(undefined);\n }, []);\n\n return { expandedCredential, foldCards, onHeaderPress, setInitialCredential };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC7C,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;EAE9C,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAAC,MAAM;IACtCH,WAAW,CAAEI,QAAQ,IAAK,CAACA,QAAQ,CAAC;EACtC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAEL,QAAQ;IAAEG;EAAc,CAAC;AACpC,CAAC;AAACG,OAAA,CAAAP,yBAAA,GAAAA,yBAAA;AAEK,MAAMQ,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAM,CAACC,kBAAkB,EAAEC,qBAAqB,CAAC,GAAG,IAAAP,eAAQ,GAAU;EACtE,MAAM,CAACQ,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAT,eAAQ,EAAC,KAAK,CAAC;EAErD,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAAEQ,YAAqB,IAAK;IAC3D,IAAI,CAACA,YAAY,EAAE;MACjB;IACF;IACAD,cAAc,CAAC,IAAI,CAAC;IACpBF,qBAAqB,CAAEJ,QAAQ,IAAK;MAClC,IAAIO,YAAY,KAAKP,QAAQ,EAAE;QAC7B,OAAOQ,SAAS;MAClB;MACA,OAAOD,YAAY;IACrB,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,oBAAoB,GAAG,IAAAV,kBAAW,EACrCQ,YAAoB,IAAK;IACxB,IAAI,CAACF,WAAW,EAAE;MAChBD,qBAAqB,CAACG,YAAY,CAAC;IACrC;IACAD,cAAc,CAAC,IAAI,CAAC;EACtB,CAAC,EACD,CAACD,WAAW,CAAC,CACd;EAED,MAAMK,SAAS,GAAG,IAAAX,kBAAW,EAAC,MAAM;IAClCK,qBAAqB,CAACI,SAAS,CAAC;EAClC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAEL,kBAAkB;IAAEO,SAAS;IAAEZ,aAAa;IAAEW;EAAqB,CAAC;AAC/E,CAAC;AAACR,OAAA,CAAAC,6BAAA,GAAAA,6BAAA"}
1
+ {"version":3,"names":["_react","require","useCredentialCardExpanded","expanded","setExpanded","useState","onHeaderPress","useCallback","oldValue","exports","useCredentialListExpandedCard","expandedCredential","setExpandedCredential","initialized","setInitialized","credentialId","undefined","setInitialCredential","foldCards"],"sources":["credential-card-expanding.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useCredentialCardExpanded = () => {\n const [expanded, setExpanded] = useState(true);\n\n const onHeaderPress = useCallback(() => {\n setExpanded((oldValue) => !oldValue);\n }, []);\n\n return { expanded, onHeaderPress };\n};\n\nexport const useCredentialListExpandedCard = () => {\n const [expandedCredential, setExpandedCredential] = useState<string>();\n const [initialized, setInitialized] = useState(false);\n\n const onHeaderPress = useCallback((credentialId?: string) => {\n if (!credentialId) {\n return;\n }\n setInitialized(true);\n setExpandedCredential((oldValue) => {\n if (credentialId === oldValue) {\n return undefined;\n }\n return credentialId;\n });\n }, []);\n\n const setInitialCredential = useCallback(\n (credentialId: string) => {\n if (!initialized) {\n setExpandedCredential(credentialId);\n }\n setInitialized(true);\n },\n [initialized],\n );\n\n const foldCards = useCallback(() => {\n setExpandedCredential(undefined);\n }, []);\n\n return { expandedCredential, foldCards, onHeaderPress, setInitialCredential };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC7C,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;EAE9C,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAAC,MAAM;IACtCH,WAAW,CAAEI,QAAQ,IAAK,CAACA,QAAQ,CAAC;EACtC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAEL,QAAQ;IAAEG;EAAc,CAAC;AACpC,CAAC;AAACG,OAAA,CAAAP,yBAAA,GAAAA,yBAAA;AAEK,MAAMQ,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAM,CAACC,kBAAkB,EAAEC,qBAAqB,CAAC,GAAG,IAAAP,eAAQ,EAAS,CAAC;EACtE,MAAM,CAACQ,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAT,eAAQ,EAAC,KAAK,CAAC;EAErD,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAAEQ,YAAqB,IAAK;IAC3D,IAAI,CAACA,YAAY,EAAE;MACjB;IACF;IACAD,cAAc,CAAC,IAAI,CAAC;IACpBF,qBAAqB,CAAEJ,QAAQ,IAAK;MAClC,IAAIO,YAAY,KAAKP,QAAQ,EAAE;QAC7B,OAAOQ,SAAS;MAClB;MACA,OAAOD,YAAY;IACrB,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,oBAAoB,GAAG,IAAAV,kBAAW,EACrCQ,YAAoB,IAAK;IACxB,IAAI,CAACF,WAAW,EAAE;MAChBD,qBAAqB,CAACG,YAAY,CAAC;IACrC;IACAD,cAAc,CAAC,IAAI,CAAC;EACtB,CAAC,EACD,CAACD,WAAW,CACd,CAAC;EAED,MAAMK,SAAS,GAAG,IAAAX,kBAAW,EAAC,MAAM;IAClCK,qBAAqB,CAACI,SAAS,CAAC;EAClC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAEL,kBAAkB;IAAEO,SAAS;IAAEZ,aAAa;IAAEW;EAAqB,CAAC;AAC/E,CAAC;AAACR,OAAA,CAAAC,6BAAA,GAAAA,6BAAA","ignoreList":[]}
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useOnScrollHeaderState = void 0;
7
7
  var _react = require("react");
8
- const useOnScrollHeaderState = function () {
9
- let offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 30;
8
+ const useOnScrollHeaderState = (offset = 30) => {
10
9
  const [titleVisible, setTitleVisible] = (0, _react.useState)(false);
11
10
  const onScroll = (0, _react.useCallback)(event => {
12
11
  const scrollOffset = event.nativeEvent.contentOffset.y;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","useOnScrollHeaderState","offset","arguments","length","undefined","titleVisible","setTitleVisible","useState","onScroll","useCallback","event","scrollOffset","nativeEvent","contentOffset","y","exports"],"sources":["on-scroll-header-state.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\n\nexport const useOnScrollHeaderState = (offset = 30) => {\n const [titleVisible, setTitleVisible] = useState(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const scrollOffset = event.nativeEvent.contentOffset.y;\n setTitleVisible(scrollOffset > offset);\n },\n [offset],\n );\n\n return { onScroll, titleVisible };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAG,SAAAA,CAAA,EAAiB;EAAA,IAAhBC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAChD,MAAM,CAACG,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEvD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EACzBC,KAA8C,IAAK;IAClD,MAAMC,YAAY,GAAGD,KAAK,CAACE,WAAW,CAACC,aAAa,CAACC,CAAC;IACtDR,eAAe,CAACK,YAAY,GAAGV,MAAM,CAAC;EACxC,CAAC,EACD,CAACA,MAAM,CAAC,CACT;EAED,OAAO;IAAEO,QAAQ;IAAEH;EAAa,CAAC;AACnC,CAAC;AAACU,OAAA,CAAAf,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"names":["_react","require","useOnScrollHeaderState","offset","titleVisible","setTitleVisible","useState","onScroll","useCallback","event","scrollOffset","nativeEvent","contentOffset","y","exports"],"sources":["on-scroll-header-state.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\n\nexport const useOnScrollHeaderState = (offset = 30) => {\n const [titleVisible, setTitleVisible] = useState(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const scrollOffset = event.nativeEvent.contentOffset.y;\n setTitleVisible(scrollOffset > offset);\n },\n [offset],\n );\n\n return { onScroll, titleVisible };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAACC,MAAM,GAAG,EAAE,KAAK;EACrD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEvD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EACzBC,KAA8C,IAAK;IAClD,MAAMC,YAAY,GAAGD,KAAK,CAACE,WAAW,CAACC,aAAa,CAACC,CAAC;IACtDR,eAAe,CAACK,YAAY,GAAGP,MAAM,CAAC;EACxC,CAAC,EACD,CAACA,MAAM,CACT,CAAC;EAED,OAAO;IAAEI,QAAQ;IAAEH;EAAa,CAAC;AACnC,CAAC;AAACU,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_apisauce","require","_react","useHTTPClient","useMemo","create","headers","Accept","baseURL","undefined","exports"],"sources":["client.ts"],"sourcesContent":["import { ApisauceInstance, create } from 'apisauce';\nimport { useMemo } from 'react';\n\nexport const useHTTPClient = () => {\n return useMemo<ApisauceInstance>(() => {\n return create({\n headers: {\n Accept: 'application/json',\n },\n baseURL: undefined,\n });\n }, []);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,aAAa,GAAGA,CAAA,KAAM;EACjC,OAAO,IAAAC,cAAO,EAAmB,MAAM;IACrC,OAAO,IAAAC,gBAAM,EAAC;MACZC,OAAO,EAAE;QACPC,MAAM,EAAE;MACV,CAAC;MACDC,OAAO,EAAEC;IACX,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACC,OAAA,CAAAP,aAAA,GAAAA,aAAA"}
1
+ {"version":3,"names":["_apisauce","require","_react","useHTTPClient","useMemo","create","headers","Accept","baseURL","undefined","exports"],"sources":["client.ts"],"sourcesContent":["import { ApisauceInstance, create } from 'apisauce';\nimport { useMemo } from 'react';\n\nexport const useHTTPClient = () => {\n return useMemo<ApisauceInstance>(() => {\n return create({\n headers: {\n Accept: 'application/json',\n },\n baseURL: undefined,\n });\n }, []);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,aAAa,GAAGA,CAAA,KAAM;EACjC,OAAO,IAAAC,cAAO,EAAmB,MAAM;IACrC,OAAO,IAAAC,gBAAM,EAAC;MACZC,OAAO,EAAE;QACPC,MAAM,EAAE;MACV,CAAC;MACDC,OAAO,EAAEC;IACX,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACC,OAAA,CAAAP,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_connectivity","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_core","_credentialCardExpanding","_onScrollHeaderState","_listContentInset","_navigation","_pinSecurity","_credentialStatus"],"sources":["index.ts"],"sourcesContent":["export * from './connectivity/connectivity';\nexport * from './core';\nexport * from './credential-card/credential-card-expanding';\nexport * from './header/on-scroll-header-state';\nexport * from './list/list-content-inset';\nexport * from './navigation';\nexport * from './pin-security/pin-security';\nexport * from './revocation/credential-status';\n"],"mappings":";;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MA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AK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,iBAAA,CAAAX,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_connectivity","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_core","_credentialCardExpanding","_onScrollHeaderState","_listContentInset","_navigation","_pinSecurity","_credentialStatus"],"sources":["index.ts"],"sourcesContent":["export * from './connectivity/connectivity';\nexport * from './core';\nexport * from './credential-card/credential-card-expanding';\nexport * from './header/on-scroll-header-state';\nexport * from './list/list-content-inset';\nexport * from './navigation';\nexport * from './pin-security/pin-security';\nexport * from './revocation/credential-status';\n"],"mappings":";;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,aAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,wBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,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A,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,WAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,YAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,YAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,YAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,YAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,iBAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,iBAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,iBAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,iBAAA,CAAAX,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useListContentInset = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
9
- const useListContentInset = function () {
10
- let {
11
- additionalBottomPadding = 54,
12
- headerHeight = 48,
13
- modalPresentation = false
14
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
15
- additionalBottomPadding: 54,
16
- headerHeight: 48,
17
- modalPresentation: false
18
- };
9
+ const useListContentInset = ({
10
+ additionalBottomPadding = 54,
11
+ headerHeight = 48,
12
+ modalPresentation = false
13
+ } = {
14
+ additionalBottomPadding: 54,
15
+ headerHeight: 48,
16
+ modalPresentation: false
17
+ }) => {
19
18
  const {
20
19
  top,
21
20
  bottom
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_reactNativeSafeAreaContext","useListContentInset","additionalBottomPadding","headerHeight","modalPresentation","arguments","length","undefined","top","bottom","useSafeAreaInsets","topSafeAreaInset","Platform","OS","contentInsetsStyle","paddingBottom","paddingTop","exports"],"sources":["list-content-inset.ts"],"sourcesContent":["import { Platform, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype ListContentInsetProps = {\n additionalBottomPadding?: number;\n headerHeight?: number;\n modalPresentation?: boolean;\n};\n\nexport const useListContentInset = (\n { additionalBottomPadding = 54, headerHeight = 48, modalPresentation = false }: ListContentInsetProps = {\n additionalBottomPadding: 54,\n headerHeight: 48,\n modalPresentation: false,\n },\n) => {\n const { top, bottom } = useSafeAreaInsets();\n const topSafeAreaInset = !modalPresentation || Platform.OS === 'android' ? top : 0;\n const contentInsetsStyle: ViewStyle = {\n paddingBottom: bottom + additionalBottomPadding,\n paddingTop: topSafeAreaInset + headerHeight,\n };\n return contentInsetsStyle;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AAQO,MAAME,mBAAmB,GAAG,SAAAA,CAAA,EAM9B;EAAA,IALH;IAAEC,uBAAuB,GAAG,EAAE;IAAEC,YAAY,GAAG,EAAE;IAAEC,iBAAiB,GAAG;EAA6B,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IACtGH,uBAAuB,EAAE,EAAE;IAC3BC,YAAY,EAAE,EAAE;IAChBC,iBAAiB,EAAE;EACrB,CAAC;EAED,MAAM;IAAEI,GAAG;IAAEC;EAAO,CAAC,GAAG,IAAAC,6CAAiB,GAAE;EAC3C,MAAMC,gBAAgB,GAAG,CAACP,iBAAiB,IAAIQ,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAGL,GAAG,GAAG,CAAC;EAClF,MAAMM,kBAA6B,GAAG;IACpCC,aAAa,EAAEN,MAAM,GAAGP,uBAAuB;IAC/Cc,UAAU,EAAEL,gBAAgB,GAAGR;EACjC,CAAC;EACD,OAAOW,kBAAkB;AAC3B,CAAC;AAACG,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_reactNative","require","_reactNativeSafeAreaContext","useListContentInset","additionalBottomPadding","headerHeight","modalPresentation","top","bottom","useSafeAreaInsets","topSafeAreaInset","Platform","OS","contentInsetsStyle","paddingBottom","paddingTop","exports"],"sources":["list-content-inset.ts"],"sourcesContent":["import { Platform, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype ListContentInsetProps = {\n additionalBottomPadding?: number;\n headerHeight?: number;\n modalPresentation?: boolean;\n};\n\nexport const useListContentInset = (\n { additionalBottomPadding = 54, headerHeight = 48, modalPresentation = false }: ListContentInsetProps = {\n additionalBottomPadding: 54,\n headerHeight: 48,\n modalPresentation: false,\n },\n) => {\n const { top, bottom } = useSafeAreaInsets();\n const topSafeAreaInset = !modalPresentation || Platform.OS === 'android' ? top : 0;\n const contentInsetsStyle: ViewStyle = {\n paddingBottom: bottom + additionalBottomPadding,\n paddingTop: topSafeAreaInset + headerHeight,\n };\n return contentInsetsStyle;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AAQO,MAAME,mBAAmB,GAAGA,CACjC;EAAEC,uBAAuB,GAAG,EAAE;EAAEC,YAAY,GAAG,EAAE;EAAEC,iBAAiB,GAAG;AAA6B,CAAC,GAAG;EACtGF,uBAAuB,EAAE,EAAE;EAC3BC,YAAY,EAAE,EAAE;EAChBC,iBAAiB,EAAE;AACrB,CAAC,KACE;EACH,MAAM;IAAEC,GAAG;IAAEC;EAAO,CAAC,GAAG,IAAAC,6CAAiB,EAAC,CAAC;EAC3C,MAAMC,gBAAgB,GAAG,CAACJ,iBAAiB,IAAIK,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAGL,GAAG,GAAG,CAAC;EAClF,MAAMM,kBAA6B,GAAG;IACpCC,aAAa,EAAEN,MAAM,GAAGJ,uBAAuB;IAC/CW,UAAU,EAAEL,gBAAgB,GAAGL;EACjC,CAAC;EACD,OAAOQ,kBAAkB;AAC3B,CAAC;AAACG,OAAA,CAAAb,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_native","require","_react","useBeforeRemove","callback","navigation","useNavigation","removed","useRef","useEffect","current","addListener","e","preventDefault","dispatch","data","action","exports"],"sources":["before-remove.tsx"],"sourcesContent":["import { useNavigation } from '@react-navigation/native';\nimport { useEffect, useRef } from 'react';\n\nexport const useBeforeRemove = (callback: () => void) => {\n const navigation = useNavigation();\n const removed = useRef<boolean>();\n\n useEffect(() => {\n if (removed.current) {\n return;\n }\n return navigation.addListener('beforeRemove', (e) => {\n if (removed.current) {\n return;\n }\n removed.current = true;\n e.preventDefault();\n callback();\n navigation.dispatch(e.data.action);\n });\n }, [callback, navigation]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,eAAe,GAAIC,QAAoB,IAAK;EACvD,MAAMC,UAAU,GAAG,IAAAC,qBAAa,GAAE;EAClC,MAAMC,OAAO,GAAG,IAAAC,aAAM,GAAW;EAEjC,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIF,OAAO,CAACG,OAAO,EAAE;MACnB;IACF;IACA,OAAOL,UAAU,CAACM,WAAW,CAAC,cAAc,EAAGC,CAAC,IAAK;MACnD,IAAIL,OAAO,CAACG,OAAO,EAAE;QACnB;MACF;MACAH,OAAO,CAACG,OAAO,GAAG,IAAI;MACtBE,CAAC,CAACC,cAAc,EAAE;MAClBT,QAAQ,EAAE;MACVC,UAAU,CAACS,QAAQ,CAACF,CAAC,CAACG,IAAI,CAACC,MAAM,CAAC;IACpC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACZ,QAAQ,EAAEC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAACY,OAAA,CAAAd,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_native","require","_react","useBeforeRemove","callback","navigation","useNavigation","removed","useRef","useEffect","current","addListener","e","preventDefault","dispatch","data","action","exports"],"sources":["before-remove.tsx"],"sourcesContent":["import { useNavigation } from '@react-navigation/native';\nimport { useEffect, useRef } from 'react';\n\nexport const useBeforeRemove = (callback: () => void) => {\n const navigation = useNavigation();\n const removed = useRef<boolean>();\n\n useEffect(() => {\n if (removed.current) {\n return;\n }\n return navigation.addListener('beforeRemove', (e) => {\n if (removed.current) {\n return;\n }\n removed.current = true;\n e.preventDefault();\n callback();\n navigation.dispatch(e.data.action);\n });\n }, [callback, navigation]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,eAAe,GAAIC,QAAoB,IAAK;EACvD,MAAMC,UAAU,GAAG,IAAAC,qBAAa,EAAC,CAAC;EAClC,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAU,CAAC;EAEjC,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIF,OAAO,CAACG,OAAO,EAAE;MACnB;IACF;IACA,OAAOL,UAAU,CAACM,WAAW,CAAC,cAAc,EAAGC,CAAC,IAAK;MACnD,IAAIL,OAAO,CAACG,OAAO,EAAE;QACnB;MACF;MACAH,OAAO,CAACG,OAAO,GAAG,IAAI;MACtBE,CAAC,CAACC,cAAc,CAAC,CAAC;MAClBT,QAAQ,CAAC,CAAC;MACVC,UAAU,CAACS,QAAQ,CAACF,CAAC,CAACG,IAAI,CAACC,MAAM,CAAC;IACpC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACZ,QAAQ,EAAEC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAACY,OAAA,CAAAd,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","useCloseButtonTimeout","active","closeButtonHandler","closeTimeout","setCloseTimeout","useState","useEffect","interval","setInterval","prev","next","clearInterval","exports"],"sources":["close-button-timeout.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport const useCloseButtonTimeout = (active: boolean, closeButtonHandler: () => void) => {\n const [closeTimeout, setCloseTimeout] = useState(5);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const interval = setInterval(() => {\n setCloseTimeout((prev) => {\n const next = prev - 1;\n return next > 0 ? next : 0;\n });\n }, 1000);\n return () => {\n clearInterval(interval);\n };\n }, [active]);\n\n useEffect(() => {\n if (active && closeTimeout === 0) {\n closeButtonHandler();\n }\n }, [closeTimeout, active, closeButtonHandler]);\n\n return { closeTimeout };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,qBAAqB,GAAGA,CAACC,MAAe,EAAEC,kBAA8B,KAAK;EACxF,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC,CAAC;EAEnD,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACL,MAAM,EAAE;MACX;IACF;IAEA,MAAMM,QAAQ,GAAGC,WAAW,CAAC,MAAM;MACjCJ,eAAe,CAAEK,IAAI,IAAK;QACxB,MAAMC,IAAI,GAAGD,IAAI,GAAG,CAAC;QACrB,OAAOC,IAAI,GAAG,CAAC,GAAGA,IAAI,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,IAAI,CAAC;IACR,OAAO,MAAM;MACXC,aAAa,CAACJ,QAAQ,CAAC;IACzB,CAAC;EACH,CAAC,EAAE,CAACN,MAAM,CAAC,CAAC;EAEZ,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIL,MAAM,IAAIE,YAAY,KAAK,CAAC,EAAE;MAChCD,kBAAkB,EAAE;IACtB;EACF,CAAC,EAAE,CAACC,YAAY,EAAEF,MAAM,EAAEC,kBAAkB,CAAC,CAAC;EAE9C,OAAO;IAAEC;EAAa,CAAC;AACzB,CAAC;AAACS,OAAA,CAAAZ,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"names":["_react","require","useCloseButtonTimeout","active","closeButtonHandler","closeTimeout","setCloseTimeout","useState","useEffect","interval","setInterval","prev","next","clearInterval","exports"],"sources":["close-button-timeout.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport const useCloseButtonTimeout = (active: boolean, closeButtonHandler: () => void) => {\n const [closeTimeout, setCloseTimeout] = useState(5);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const interval = setInterval(() => {\n setCloseTimeout((prev) => {\n const next = prev - 1;\n return next > 0 ? next : 0;\n });\n }, 1000);\n return () => {\n clearInterval(interval);\n };\n }, [active]);\n\n useEffect(() => {\n if (active && closeTimeout === 0) {\n closeButtonHandler();\n }\n }, [closeTimeout, active, closeButtonHandler]);\n\n return { closeTimeout };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,qBAAqB,GAAGA,CAACC,MAAe,EAAEC,kBAA8B,KAAK;EACxF,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC,CAAC;EAEnD,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACL,MAAM,EAAE;MACX;IACF;IAEA,MAAMM,QAAQ,GAAGC,WAAW,CAAC,MAAM;MACjCJ,eAAe,CAAEK,IAAI,IAAK;QACxB,MAAMC,IAAI,GAAGD,IAAI,GAAG,CAAC;QACrB,OAAOC,IAAI,GAAG,CAAC,GAAGA,IAAI,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,IAAI,CAAC;IACR,OAAO,MAAM;MACXC,aAAa,CAACJ,QAAQ,CAAC;IACzB,CAAC;EACH,CAAC,EAAE,CAACN,MAAM,CAAC,CAAC;EAEZ,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIL,MAAM,IAAIE,YAAY,KAAK,CAAC,EAAE;MAChCD,kBAAkB,CAAC,CAAC;IACtB;EACF,CAAC,EAAE,CAACC,YAAY,EAAEF,MAAM,EAAEC,kBAAkB,CAAC,CAAC;EAE9C,OAAO;IAAEC;EAAa,CAAC;AACzB,CAAC;AAACS,OAAA,CAAAZ,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -10,10 +10,9 @@ var _reporting = require("../../reporting");
10
10
  const useRuntimeDeepLinkHandling = (enabled, handleInvitationUrl) => {
11
11
  const [deepLinkURL, setDeepLinkURL] = (0, _react.useState)();
12
12
  (0, _react.useEffect)(() => {
13
- const subscription = _reactNative.Linking.addEventListener('url', _ref => {
14
- let {
15
- url
16
- } = _ref;
13
+ const subscription = _reactNative.Linking.addEventListener('url', ({
14
+ url
15
+ }) => {
17
16
  (0, _reporting.reportTraceInfo)('Connection', 'Runtime deep link');
18
17
  setDeepLinkURL(url);
19
18
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reporting","useRuntimeDeepLinkHandling","enabled","handleInvitationUrl","deepLinkURL","setDeepLinkURL","useState","useEffect","subscription","Linking","addEventListener","_ref","url","reportTraceInfo","remove","undefined","exports","initialDeepLinkHandled","useInitialDeepLinkHandling","useCallback","getInitialURL","then","catch","e","reportException"],"sources":["deep-link.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { Linking } from 'react-native';\n\nimport { reportException, reportTraceInfo } from '../../reporting';\n\nexport const useRuntimeDeepLinkHandling = (enabled: boolean, handleInvitationUrl: (invitationUrl: string) => void) => {\n const [deepLinkURL, setDeepLinkURL] = useState<string>();\n useEffect(() => {\n const subscription = Linking.addEventListener('url', ({ url }) => {\n reportTraceInfo('Connection', 'Runtime deep link');\n setDeepLinkURL(url);\n });\n return () => subscription.remove();\n }, []);\n\n useEffect(() => {\n if (!enabled || !deepLinkURL) {\n return;\n }\n setDeepLinkURL(undefined);\n handleInvitationUrl(deepLinkURL);\n }, [deepLinkURL, enabled, handleInvitationUrl]);\n};\n\nlet initialDeepLinkHandled = false;\nexport const useInitialDeepLinkHandling = (handleInvitationUrl: (invitationUrl: string) => void) => {\n return useCallback(() => {\n if (!initialDeepLinkHandled) {\n Linking.getInitialURL()\n .then((url) => {\n initialDeepLinkHandled = true;\n if (url) {\n reportTraceInfo('Connection', 'Initial deep link');\n handleInvitationUrl(url);\n }\n })\n .catch((e) => reportException(e, 'Failed to get initial deep link'));\n }\n }, [handleInvitationUrl]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEO,MAAMG,0BAA0B,GAAGA,CAACC,OAAgB,EAAEC,mBAAoD,KAAK;EACpH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,GAAU;EACxD,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,YAAY,GAAGC,oBAAO,CAACC,gBAAgB,CAAC,KAAK,EAAEC,IAAA,IAAa;MAAA,IAAZ;QAAEC;MAAI,CAAC,GAAAD,IAAA;MAC3D,IAAAE,0BAAe,EAAC,YAAY,EAAE,mBAAmB,CAAC;MAClDR,cAAc,CAACO,GAAG,CAAC;IACrB,CAAC,CAAC;IACF,OAAO,MAAMJ,YAAY,CAACM,MAAM,EAAE;EACpC,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAP,gBAAS,EAAC,MAAM;IACd,IAAI,CAACL,OAAO,IAAI,CAACE,WAAW,EAAE;MAC5B;IACF;IACAC,cAAc,CAACU,SAAS,CAAC;IACzBZ,mBAAmB,CAACC,WAAW,CAAC;EAClC,CAAC,EAAE,CAACA,WAAW,EAAEF,OAAO,EAAEC,mBAAmB,CAAC,CAAC;AACjD,CAAC;AAACa,OAAA,CAAAf,0BAAA,GAAAA,0BAAA;AAEF,IAAIgB,sBAAsB,GAAG,KAAK;AAC3B,MAAMC,0BAA0B,GAAIf,mBAAoD,IAAK;EAClG,OAAO,IAAAgB,kBAAW,EAAC,MAAM;IACvB,IAAI,CAACF,sBAAsB,EAAE;MAC3BR,oBAAO,CAACW,aAAa,EAAE,CACpBC,IAAI,CAAET,GAAG,IAAK;QACbK,sBAAsB,GAAG,IAAI;QAC7B,IAAIL,GAAG,EAAE;UACP,IAAAC,0BAAe,EAAC,YAAY,EAAE,mBAAmB,CAAC;UAClDV,mBAAmB,CAACS,GAAG,CAAC;QAC1B;MACF,CAAC,CAAC,CACDU,KAAK,CAAEC,CAAC,IAAK,IAAAC,0BAAe,EAACD,CAAC,EAAE,iCAAiC,CAAC,CAAC;IACxE;EACF,CAAC,EAAE,CAACpB,mBAAmB,CAAC,CAAC;AAC3B,CAAC;AAACa,OAAA,CAAAE,0BAAA,GAAAA,0BAAA"}
1
+ {"version":3,"names":["_react","require","_reactNative","_reporting","useRuntimeDeepLinkHandling","enabled","handleInvitationUrl","deepLinkURL","setDeepLinkURL","useState","useEffect","subscription","Linking","addEventListener","url","reportTraceInfo","remove","undefined","exports","initialDeepLinkHandled","useInitialDeepLinkHandling","useCallback","getInitialURL","then","catch","e","reportException"],"sources":["deep-link.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { Linking } from 'react-native';\n\nimport { reportException, reportTraceInfo } from '../../reporting';\n\nexport const useRuntimeDeepLinkHandling = (enabled: boolean, handleInvitationUrl: (invitationUrl: string) => void) => {\n const [deepLinkURL, setDeepLinkURL] = useState<string>();\n useEffect(() => {\n const subscription = Linking.addEventListener('url', ({ url }) => {\n reportTraceInfo('Connection', 'Runtime deep link');\n setDeepLinkURL(url);\n });\n return () => subscription.remove();\n }, []);\n\n useEffect(() => {\n if (!enabled || !deepLinkURL) {\n return;\n }\n setDeepLinkURL(undefined);\n handleInvitationUrl(deepLinkURL);\n }, [deepLinkURL, enabled, handleInvitationUrl]);\n};\n\nlet initialDeepLinkHandled = false;\nexport const useInitialDeepLinkHandling = (handleInvitationUrl: (invitationUrl: string) => void) => {\n return useCallback(() => {\n if (!initialDeepLinkHandled) {\n Linking.getInitialURL()\n .then((url) => {\n initialDeepLinkHandled = true;\n if (url) {\n reportTraceInfo('Connection', 'Initial deep link');\n handleInvitationUrl(url);\n }\n })\n .catch((e) => reportException(e, 'Failed to get initial deep link'));\n }\n }, [handleInvitationUrl]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEO,MAAMG,0BAA0B,GAAGA,CAACC,OAAgB,EAAEC,mBAAoD,KAAK;EACpH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAS,CAAC;EACxD,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,YAAY,GAAGC,oBAAO,CAACC,gBAAgB,CAAC,KAAK,EAAE,CAAC;MAAEC;IAAI,CAAC,KAAK;MAChE,IAAAC,0BAAe,EAAC,YAAY,EAAE,mBAAmB,CAAC;MAClDP,cAAc,CAACM,GAAG,CAAC;IACrB,CAAC,CAAC;IACF,OAAO,MAAMH,YAAY,CAACK,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAN,gBAAS,EAAC,MAAM;IACd,IAAI,CAACL,OAAO,IAAI,CAACE,WAAW,EAAE;MAC5B;IACF;IACAC,cAAc,CAACS,SAAS,CAAC;IACzBX,mBAAmB,CAACC,WAAW,CAAC;EAClC,CAAC,EAAE,CAACA,WAAW,EAAEF,OAAO,EAAEC,mBAAmB,CAAC,CAAC;AACjD,CAAC;AAACY,OAAA,CAAAd,0BAAA,GAAAA,0BAAA;AAEF,IAAIe,sBAAsB,GAAG,KAAK;AAC3B,MAAMC,0BAA0B,GAAId,mBAAoD,IAAK;EAClG,OAAO,IAAAe,kBAAW,EAAC,MAAM;IACvB,IAAI,CAACF,sBAAsB,EAAE;MAC3BP,oBAAO,CAACU,aAAa,CAAC,CAAC,CACpBC,IAAI,CAAET,GAAG,IAAK;QACbK,sBAAsB,GAAG,IAAI;QAC7B,IAAIL,GAAG,EAAE;UACP,IAAAC,0BAAe,EAAC,YAAY,EAAE,mBAAmB,CAAC;UAClDT,mBAAmB,CAACQ,GAAG,CAAC;QAC1B;MACF,CAAC,CAAC,CACDU,KAAK,CAAEC,CAAC,IAAK,IAAAC,0BAAe,EAACD,CAAC,EAAE,iCAAiC,CAAC,CAAC;IACxE;EACF,CAAC,EAAE,CAACnB,mBAAmB,CAAC,CAAC;AAC3B,CAAC;AAACY,OAAA,CAAAE,0BAAA,GAAAA,0BAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_beforeRemove","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_closeButtonTimeout","_deepLink","_openSettings"],"sources":["index.ts"],"sourcesContent":["export * from './before-remove';\nexport * from './close-button-timeout';\nexport * from './deep-link';\nexport * from './open-settings';\n"],"mappings":";;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,aAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,mBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,mBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,mBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,mBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,SAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,SAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,SAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,SAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,aAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,aAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,aAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,aAAA,CAAAP,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_beforeRemove","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_closeButtonTimeout","_deepLink","_openSettings"],"sources":["index.ts"],"sourcesContent":["export * from './before-remove';\nexport * from './close-button-timeout';\nexport * from './deep-link';\nexport * from './open-settings';\n"],"mappings":";;;;;AAAA,I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AAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,aAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,aAAA,CAAAP,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useOpenSettings = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNative = require("react-native");
9
- var _reactNativeBluetoothStateManager = require("react-native-bluetooth-state-manager");
10
9
  const useOpenSettings = () => {
11
10
  const openBleSettings = (0, _react.useCallback)(() => {
12
11
  if (_reactNative.Platform.OS === 'ios') {
@@ -30,7 +29,7 @@ const useOpenSettings = () => {
30
29
  }
31
30
  }, []);
32
31
  const openAppPermissionSettings = (0, _react.useCallback)(() => {
33
- (0, _reactNativeBluetoothStateManager.openSettings)().catch(() => {});
32
+ _reactNative.Linking.openSettings().catch(() => {});
34
33
  }, []);
35
34
  return {
36
35
  openAppPermissionSettings,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeBluetoothStateManager","useOpenSettings","openBleSettings","useCallback","Platform","OS","Linking","openURL","catch","sendIntent","openMobileNetworkSettings","openWiFiSettings","openAppPermissionSettings","openSettings","exports"],"sources":["open-settings.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { Linking, Platform } from 'react-native';\nimport { openSettings } from 'react-native-bluetooth-state-manager';\n\nexport const useOpenSettings = () => {\n const openBleSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=Bluetooth').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.BLUETOOTH_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openMobileNetworkSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=MOBILE_DATA_SETTINGS_ID').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIRELESS_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openWiFiSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=WIFI').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIFI_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openAppPermissionSettings = useCallback(() => {\n openSettings().catch(() => {});\n }, []);\n\n return {\n openAppPermissionSettings,\n openBleSettings,\n openMobileNetworkSettings,\n openWiFiSettings,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,iCAAA,GAAAF,OAAA;AAEO,MAAMG,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,eAAe,GAAG,IAAAC,kBAAW,EAAC,MAAM;IACxC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBC,oBAAO,CAACC,OAAO,CAAC,0BAA0B,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC,MAAM;MACLF,oBAAO,CAACG,UAAU,CAAC,qCAAqC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,yBAAyB,GAAG,IAAAP,kBAAW,EAAC,MAAM;IAClD,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBC,oBAAO,CAACC,OAAO,CAAC,wCAAwC,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLF,oBAAO,CAACG,UAAU,CAAC,oCAAoC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,gBAAgB,GAAG,IAAAR,kBAAW,EAAC,MAAM;IACzC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBC,oBAAO,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC,MAAM;MACLF,oBAAO,CAACG,UAAU,CAAC,gCAAgC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMI,yBAAyB,GAAG,IAAAT,kBAAW,EAAC,MAAM;IAClD,IAAAU,8CAAY,GAAE,CAACL,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLI,yBAAyB;IACzBV,eAAe;IACfQ,yBAAyB;IACzBC;EACF,CAAC;AACH,CAAC;AAACG,OAAA,CAAAb,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_react","require","_reactNative","useOpenSettings","openBleSettings","useCallback","Platform","OS","Linking","openURL","catch","sendIntent","openMobileNetworkSettings","openWiFiSettings","openAppPermissionSettings","openSettings","exports"],"sources":["open-settings.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { Linking, Platform } from 'react-native';\n\nexport const useOpenSettings = () => {\n const openBleSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=Bluetooth').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.BLUETOOTH_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openMobileNetworkSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=MOBILE_DATA_SETTINGS_ID').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIRELESS_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openWiFiSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=WIFI').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIFI_SETTINGS').catch(() => {});\n }\n }, []);\n \n const openAppPermissionSettings = useCallback(() => {\n Linking.openSettings().catch(() => {});\n }, []);\n\n return {\n openAppPermissionSettings,\n openBleSettings,\n openMobileNetworkSettings,\n openWiFiSettings,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEO,MAAME,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,eAAe,GAAG,IAAAC,kBAAW,EAAC,MAAM;IACxC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBC,oBAAO,CAACC,OAAO,CAAC,0BAA0B,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC,MAAM;MACLF,oBAAO,CAACG,UAAU,CAAC,qCAAqC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,yBAAyB,GAAG,IAAAP,kBAAW,EAAC,MAAM;IAClD,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBC,oBAAO,CAACC,OAAO,CAAC,wCAAwC,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLF,oBAAO,CAACG,UAAU,CAAC,oCAAoC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,gBAAgB,GAAG,IAAAR,kBAAW,EAAC,MAAM;IACzC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBC,oBAAO,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC,MAAM;MACLF,oBAAO,CAACG,UAAU,CAAC,gCAAgC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMI,yBAAyB,GAAG,IAAAT,kBAAW,EAAC,MAAM;IAClDG,oBAAO,CAACO,YAAY,CAAC,CAAC,CAACL,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EACxC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLI,yBAAyB;IACzBV,eAAe;IACfQ,yBAAyB;IACzBC;EACF,CAAC;AACH,CAAC;AAACG,OAAA,CAAAb,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -11,8 +11,7 @@ const getSecureSystemTime = async () => {
11
11
  // converting nanoseconds to seconds
12
12
  return Math.floor((await (0, _reactNativeSystemTime.getTime)()) / 1000000000);
13
13
  };
14
- const usePinCodeSecurity = function (failedAttempts, lastAttemptTimestamp, setPinCodeSecurity) {
15
- let allowedAttempts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 3;
14
+ const usePinCodeSecurity = (failedAttempts, lastAttemptTimestamp, setPinCodeSecurity, allowedAttempts = 3) => {
16
15
  const [attempts, setAttempts] = (0, _react.useState)(failedAttempts);
17
16
  const [lastTimestamp, setLastTimestamp] = (0, _react.useState)(lastAttemptTimestamp);
18
17
  const [isBlocked, setIsBlocked] = (0, _react.useState)(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNativeSystemTime","_reporting","getSecureSystemTime","Math","floor","getTime","usePinCodeSecurity","failedAttempts","lastAttemptTimestamp","setPinCodeSecurity","allowedAttempts","arguments","length","undefined","attempts","setAttempts","useState","lastTimestamp","setLastTimestamp","isBlocked","setIsBlocked","blockRemainingTime","setBlockRemainingTime","timer","useRef","calculateBlockTime","useCallback","then","currentTime","waitingtime","pow","timepassed","blockTime","max","catch","e","reportException","addFailedAttempt","newAttempts","resetPinSecurity","useEffect","current","setInterval","clearInterval","exports"],"sources":["pin-security.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getTime } from 'react-native-system-time';\n\nimport { reportException } from '../../reporting';\n\nconst getSecureSystemTime = async () => {\n // converting nanoseconds to seconds\n return Math.floor((await getTime()) / 1000000000);\n};\n\nexport const usePinCodeSecurity = (\n failedAttempts: number,\n lastAttemptTimestamp: number | undefined,\n setPinCodeSecurity: (failedAttempts: number, lastAttemptTimestamp: number | undefined) => void,\n allowedAttempts = 3,\n) => {\n const [attempts, setAttempts] = useState(failedAttempts);\n const [lastTimestamp, setLastTimestamp] = useState(lastAttemptTimestamp);\n const [isBlocked, setIsBlocked] = useState(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);\n const [blockRemainingTime, setBlockRemainingTime] = useState(0);\n const timer = useRef<ReturnType<typeof setInterval>>();\n\n const calculateBlockTime = useCallback(() => {\n if (!lastTimestamp) {\n return;\n }\n // Get seconds since device boot\n getSecureSystemTime()\n .then((currentTime) => {\n // Compute how long should the user wait\n const waitingtime = Math.pow(2, attempts - allowedAttempts) * 60;\n\n // Get how much time passed since the last attempt\n const timepassed = currentTime - lastTimestamp;\n\n let blockTime = waitingtime - timepassed;\n\n if (timepassed < 0) {\n // Device was rebooted since the last attempt\n // Current time goes from zero again\n blockTime = waitingtime - currentTime;\n }\n\n setIsBlocked(blockTime > 0);\n setBlockRemainingTime(Math.max(0, blockTime));\n if (blockTime <= 0) {\n setPinCodeSecurity(attempts, undefined);\n setLastTimestamp(undefined);\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, lastTimestamp, setPinCodeSecurity]);\n\n const addFailedAttempt = useCallback(() => {\n getSecureSystemTime()\n .then((currentTime) => {\n const newAttempts = attempts + 1;\n setPinCodeSecurity(newAttempts, currentTime);\n setAttempts(newAttempts);\n setLastTimestamp(currentTime);\n if (newAttempts === allowedAttempts) {\n calculateBlockTime();\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, calculateBlockTime, setPinCodeSecurity]);\n\n const resetPinSecurity = useCallback(() => {\n setPinCodeSecurity(0, undefined);\n setLastTimestamp(undefined);\n setAttempts(0);\n }, [setPinCodeSecurity]);\n\n useEffect(() => {\n if (isBlocked && timer.current === undefined) {\n timer.current = setInterval(calculateBlockTime, 500);\n } else if (!isBlocked && timer.current !== undefined) {\n clearInterval(timer.current);\n timer.current = undefined;\n }\n }, [isBlocked, calculateBlockTime]);\n\n useEffect(() => {\n if (attempts >= allowedAttempts && lastAttemptTimestamp && !isBlocked) {\n calculateBlockTime();\n }\n }, [allowedAttempts, attempts, calculateBlockTime, isBlocked, lastAttemptTimestamp]);\n\n return {\n addFailedAttempt,\n blockRemainingTime,\n isBlocked,\n resetPinSecurity,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAMG,mBAAmB,GAAG,MAAAA,CAAA,KAAY;EACtC;EACA,OAAOC,IAAI,CAACC,KAAK,CAAC,CAAC,MAAM,IAAAC,8BAAO,GAAE,IAAI,UAAU,CAAC;AACnD,CAAC;AAEM,MAAMC,kBAAkB,GAAG,SAAAA,CAChCC,cAAsB,EACtBC,oBAAwC,EACxCC,kBAA8F,EAE3F;EAAA,IADHC,eAAe,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAEnB,MAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EAACT,cAAc,CAAC;EACxD,MAAM,CAACU,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAF,eAAQ,EAACR,oBAAoB,CAAC;EACxE,MAAM,CAACW,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAJ,eAAQ,EAACT,cAAc,IAAIG,eAAe,IAAIF,oBAAoB,KAAKK,SAAS,CAAC;EACnH,MAAM,CAACQ,kBAAkB,EAAEC,qBAAqB,CAAC,GAAG,IAAAN,eAAQ,EAAC,CAAC,CAA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AC;AAACK,OAAA,CAAAtC,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_react","require","_reactNativeSystemTime","_reporting","getSecureSystemTime","Math","floor","getTime","usePinCodeSecurity","failedAttempts","lastAttemptTimestamp","setPinCodeSecurity","allowedAttempts","attempts","setAttempts","useState","lastTimestamp","setLastTimestamp","isBlocked","setIsBlocked","undefined","blockRemainingTime","setBlockRemainingTime","timer","useRef","calculateBlockTime","useCallback","then","currentTime","waitingtime","pow","timepassed","blockTime","max","catch","e","reportException","addFailedAttempt","newAttempts","resetPinSecurity","useEffect","current","setInterval","clearInterval","exports"],"sources":["pin-security.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getTime } from 'react-native-system-time';\n\nimport { reportException } from '../../reporting';\n\nconst getSecureSystemTime = async () => {\n // converting nanoseconds to seconds\n return Math.floor((await getTime()) / 1000000000);\n};\n\nexport const usePinCodeSecurity = (\n failedAttempts: number,\n lastAttemptTimestamp: number | undefined,\n setPinCodeSecurity: (failedAttempts: number, lastAttemptTimestamp: number | undefined) => void,\n allowedAttempts = 3,\n) => {\n const [attempts, setAttempts] = useState(failedAttempts);\n const [lastTimestamp, setLastTimestamp] = useState(lastAttemptTimestamp);\n const [isBlocked, setIsBlocked] = useState(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);\n const [blockRemainingTime, setBlockRemainingTime] = useState(0);\n const timer = useRef<ReturnType<typeof setInterval>>();\n\n const calculateBlockTime = useCallback(() => {\n if (!lastTimestamp) {\n return;\n }\n // Get seconds since device boot\n getSecureSystemTime()\n .then((currentTime) => {\n // Compute how long should the user wait\n const waitingtime = Math.pow(2, attempts - allowedAttempts) * 60;\n\n // Get how much time passed since the last attempt\n const timepassed = currentTime - lastTimestamp;\n\n let blockTime = waitingtime - timepassed;\n\n if (timepassed < 0) {\n // Device was rebooted since the last attempt\n // Current time goes from zero again\n blockTime = waitingtime - currentTime;\n }\n\n setIsBlocked(blockTime > 0);\n setBlockRemainingTime(Math.max(0, blockTime));\n if (blockTime <= 0) {\n setPinCodeSecurity(attempts, undefined);\n setLastTimestamp(undefined);\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, lastTimestamp, setPinCodeSecurity]);\n\n const addFailedAttempt = useCallback(() => {\n getSecureSystemTime()\n .then((currentTime) => {\n const newAttempts = attempts + 1;\n setPinCodeSecurity(newAttempts, currentTime);\n setAttempts(newAttempts);\n setLastTimestamp(currentTime);\n if (newAttempts === allowedAttempts) {\n calculateBlockTime();\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, calculateBlockTime, setPinCodeSecurity]);\n\n const resetPinSecurity = useCallback(() => {\n setPinCodeSecurity(0, undefined);\n setLastTimestamp(undefined);\n setAttempts(0);\n }, [setPinCodeSecurity]);\n\n useEffect(() => {\n if (isBlocked && timer.current === undefined) {\n timer.current = setInterval(calculateBlockTime, 500);\n } else if (!isBlocked && timer.current !== undefined) {\n clearInterval(timer.current);\n timer.current = undefined;\n }\n }, [isBlocked, calculateBlockTime]);\n\n useEffect(() => {\n if (attempts >= allowedAttempts && lastAttemptTimestamp && !isBlocked) {\n calculateBlockTime();\n }\n }, [allowedAttempts, attempts, calculateBlockTime, isBlocked, lastAttemptTimestamp]);\n\n return {\n addFailedAttempt,\n blockRemainingTime,\n isBlocked,\n resetPinSecurity,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAMG,mBAAmB,GAAG,MAAAA,CAAA,KAAY;EACtC;EACA,OAAOC,IAAI,CAACC,KAAK,CAAC,CAAC,MAAM,IAAAC,8BAAO,EAAC,CAAC,IAAI,UAAU,CAAC;AACnD,CAAC;AAEM,MAAMC,kBAAkB,GAAGA,CAChCC,cAAsB,EACtBC,oBAAwC,EACxCC,kBAA8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kB,OAAO,CAAC;MAC5BlB,KAAK,CAACkB,OAAO,GAAGrB,SAAS;IAC3B;EACF,CAAC,EAAE,CAACF,SAAS,EAAEO,kBAAkB,CAAC,CAAC;EAEnC,IAAAe,gBAAS,EAAC,MAAM;IACd,IAAI3B,QAAQ,IAAID,eAAe,IAAIF,oBAAoB,IAAI,CAACQ,SAAS,EAAE;MACrEO,kBAAkB,CAAC,CAAC;IACtB;EACF,CAAC,EAAE,CAACb,eAAe,EAAEC,QAAQ,EAAEY,kBAAkB,EAAEP,SAAS,EAAER,oBAAoB,CAAC,CAAC;EAEpF,OAAO;IACL2B,gBAAgB;IAChBhB,kBAAkB;IAClBH,SAAS;IACTqB;EACF,CAAC;AACH,CAAC;AAACK,OAAA,CAAApC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -14,13 +14,14 @@ var _credentials = require("../core/credentials");
14
14
  *
15
15
  * Navigates to the result page if some credential states were updated
16
16
  * @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials
17
+ * @param {boolean} forceRefresh revocation check forces cache refresh
17
18
  */
18
- const useCredentialStatusCheck = credentialIds => {
19
+ const useCredentialStatusCheck = (credentialIds, forceRefresh = false) => {
19
20
  const isFocused = (0, _native.useIsFocused)();
20
21
  const checkDone = (0, _react.useRef)(false);
21
22
  const {
22
23
  mutateAsync: check
23
- } = (0, _credentials.useCredentialRevocationCheck)();
24
+ } = (0, _credentials.useCredentialRevocationCheck)(forceRefresh);
24
25
  const {
25
26
  data: credentials
26
27
  } = (0, _credentials.useCredentials)({
@@ -31,34 +32,24 @@ const useCredentialStatusCheck = credentialIds => {
31
32
  if (!credentials || !credentials.length || checkDone.current || !isFocused) {
32
33
  return [];
33
34
  }
34
- const results = await check(credentials.map(_ref => {
35
- let {
36
- id
37
- } = _ref;
38
- return id;
39
- })).catch(e => {
35
+ const results = await check(credentials.map(({
36
+ id
37
+ }) => id)).catch(e => {
40
38
  (0, _reporting.reportException)(e, 'Revocation check failed');
41
39
  return [];
42
40
  });
43
- const updatedCredentialIds = results.filter(_ref2 => {
41
+ const updatedCredentialIds = results.filter(({
42
+ credentialId,
43
+ status: newStatus,
44
+ success
45
+ }) => {
44
46
  var _credentials$find;
45
- let {
46
- credentialId,
47
- status: newStatus,
48
- success
49
- } = _ref2;
50
- return success && ((_credentials$find = credentials.find(_ref3 => {
51
- let {
52
- id
53
- } = _ref3;
54
- return id === credentialId;
55
- })) === null || _credentials$find === void 0 ? void 0 : _credentials$find.state) !== newStatus;
56
- }).map(_ref4 => {
57
- let {
58
- credentialId
59
- } = _ref4;
60
- return credentialId;
61
- });
47
+ return success && ((_credentials$find = credentials.find(({
48
+ id
49
+ }) => id === credentialId)) === null || _credentials$find === void 0 ? void 0 : _credentials$find.state) !== newStatus;
50
+ }).map(({
51
+ credentialId
52
+ }) => credentialId);
62
53
  return updatedCredentialIds;
63
54
  }, [check, credentials, isFocused]);
64
55
  return checkCredentialsStatus;
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeOneCore","require","_native","_react","_reporting","_credentials","useCredentialStatusCheck","credentialIds","isFocused","useIsFocused","checkDone","useRef","mutateAsync","check","useCredentialRevocationCheck","data","credentials","useCredentials","ids","status","CredentialStateEnum","ACCEPTED","SUSPENDED","checkCredentialsStatus","useCallback","length","current","results","map","_ref","id","catch","e","reportException","updatedCredentialIds","filter","_ref2","_credentials$find","credentialId","newStatus","success","find","_ref3","state","_ref4","exports"],"sources":["credential-status.ts"],"sourcesContent":["import { CredentialStateEnum } from '@procivis/react-native-one-core';\nimport { useIsFocused } from '@react-navigation/native';\nimport { useCallback, useRef } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useCredentialRevocationCheck, useCredentials } from '../core/credentials';\n\n/**\n * Runs revocation check on background for all potential updates\n *\n * Navigates to the result page if some credential states were updated\n * @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials\n */\nexport const useCredentialStatusCheck = (credentialIds?: string[]) => {\n const isFocused = useIsFocused();\n const checkDone = useRef(false);\n const { mutateAsync: check } = useCredentialRevocationCheck();\n const { data: credentials } = useCredentials({\n ids: credentialIds,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED],\n });\n\n const checkCredentialsStatus = useCallback(async () => {\n if (!credentials || !credentials.length || checkDone.current || !isFocused) {\n return [];\n }\n\n const results = await check(credentials.map(({ id }) => id)).catch((e) => {\n reportException(e, 'Revocation check failed');\n return [];\n });\n\n const updatedCredentialIds = results\n .filter(\n ({ credentialId, status: newStatus, success }) =>\n success && credentials.find(({ id }) => id === credentialId)?.state !== newStatus,\n )\n .map(({ credentialId }) => credentialId);\n\n return updatedCredentialIds;\n }, [check, credentials, isFocused]);\n\n return checkCredentialsStatus;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,wBAAwB,GAAIC,aAAwB,IAAK;EACpE,MAAMC,SAAS,GAAG,IAAAC,oBAAY,GAAE;EAChC,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAC/B,MAAM;IAAEC,WAAW,EAAEC;EAAM,CAAC,GAAG,IAAAC,yCAA4B,GAAE;EAC7D,MAAM;IAAEC,IAAI,EAAEC;EAAY,CAAC,GAAG,IAAAC,2BAAc,EAAC;IAC3CC,GAAG,EAAEX,aAAa;IAClBY,MAAM,EAAE,CAACC,uCAAmB,CAACC,QAAQ,EAAED,uCAAmB,CAACE,SAAS;EACtE,CAAC,CAAC;EAEF,MAAMC,sBAAsB,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrD,IAAI,CAACR,WAAW,IAAI,CAACA,WAAW,CAACS,MAAM,IAAIf,SAAS,CAACgB,OAAO,IAAI,CAAClB,SAAS,EAAE;MAC1E,OAAO,EAAE;IACX;IAEA,MAAMmB,OAAO,GAAG,MAAMd,KAAK,CAACG,WAAW,CAACY,GAAG,CAACC,IAAA;MAAA,IAAC;QAAEC;MAAG,CAAC,GAAAD,IAAA;MAAA,OAAKC,EAAE;IAAA,EAAC,CAAC,CAACC,KAAK,CAAEC,CAAC,IAAK;MACxE,IAAAC,0BAAe,EAACD,CAAC,EAAE,yBAAyB,CAAC;MAC7C,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,MAAME,oBAAoB,GAAGP,OAAO,CACjCQ,MAAM,CACLC,KAAA;MAAA,IAAAC,iBAAA;MAAA,IAAC;QAAEC,YAAY;QAAEnB,MAAM,EAAEoB,SAAS;QAAEC;MAAQ,CAAC,GAAAJ,KAAA;MAAA,OAC3CI,OAAO,IAAI,EAAAH,iBAAA,GAAArB,WAAW,CAACyB,IAAI,CAACC,KAAA;QAAA,IAAC;UAAEZ;QAAG,CAAC,GAAAY,KAAA;QAAA,OAAKZ,EAAE,KAAKQ,YAAY;MAAA,EAAC,cAAAD,iBAAA,uBAAjDA,iBAAA,CAAmDM,KAAK,MAAKJ,SAAS;IAAA,EACpF,CACAX,GAAG,CAACgB,KAAA;MAAA,IAAC;QAAEN;MAAa,CAAC,GAAAM,KAAA;MAAA,OAAKN,YAAY;IAAA,EAAC;IAE1C,OAAOJ,oBAAoB;EAC7B,CAAC,EAAE,CAACrB,KAAK,EAAEG,WAAW,EAAER,SAAS,CAAC,CAAC;EAEnC,OAAOe,sBAAsB;AAC/B,CAAC;AAACsB,OAAA,CAAAvC,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"names":["_reactNativeOneCore","require","_native","_react","_reporting","_credentials","useCredentialStatusCheck","credentialIds","forceRefresh","isFocused","useIsFocused","checkDone","useRef","mutateAsync","check","useCredentialRevocationCheck","data","credentials","useCredentials","ids","status","CredentialStateEnum","ACCEPTED","SUSPENDED","checkCredentialsStatus","useCallback","length","current","results","map","id","catch","e","reportException","updatedCredentialIds","filter","credentialId","newStatus","success","_credentials$find","find","state","exports"],"sources":["credential-status.ts"],"sourcesContent":["import { CredentialStateEnum } from '@procivis/react-native-one-core';\nimport { useIsFocused } from '@react-navigation/native';\nimport { useCallback, useRef } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useCredentialRevocationCheck, useCredentials } from '../core/credentials';\n\n/**\n * Runs revocation check on background for all potential updates\n *\n * Navigates to the result page if some credential states were updated\n * @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials\n * @param {boolean} forceRefresh revocation check forces cache refresh\n */\nexport const useCredentialStatusCheck = (credentialIds?: string[], forceRefresh = false) => {\n const isFocused = useIsFocused();\n const checkDone = useRef(false);\n const { mutateAsync: check } = useCredentialRevocationCheck(forceRefresh);\n const { data: credentials } = useCredentials({\n ids: credentialIds,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED],\n });\n\n const checkCredentialsStatus = useCallback(async () => {\n if (!credentials || !credentials.length || checkDone.current || !isFocused) {\n return [];\n }\n\n const results = await check(credentials.map(({ id }) => id)).catch((e) => {\n reportException(e, 'Revocation check failed');\n return [];\n });\n\n const updatedCredentialIds = results\n .filter(\n ({ credentialId, status: newStatus, success }) =>\n success && credentials.find(({ id }) => id === credentialId)?.state !== newStatus,\n )\n .map(({ credentialId }) => credentialId);\n\n return updatedCredentialIds;\n }, [check, credentials, isFocused]);\n\n return checkCredentialsStatus;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,wBAAwB,GAAGA,CAACC,aAAwB,EAAEC,YAAY,GAAG,KAAK,KAAK;EAC1F,MAAMC,SAAS,GAAG,IAAAC,oBAAY,EAAC,CAAC;EAChC,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AW,EAAER,SAAS,CAAC,CAAC;EAEnC,OAAOe,sBAAsB;AAC/B,CAAC;AAACkB,OAAA,CAAApC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -21,6 +21,18 @@ Object.defineProperty(exports, "concatTestID", {
21
21
  });
22
22
  var _contrastingStatusBar = _interopRequireDefault(require("./contrasting-status-bar"));
23
23
  var _testID = require("./testID");
24
+ var _array = require("./array");
25
+ Object.keys(_array).forEach(function (key) {
26
+ if (key === "default" || key === "__esModule") return;
27
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
28
+ if (key in exports && exports[key] === _array[key]) return;
29
+ Object.defineProperty(exports, key, {
30
+ enumerable: true,
31
+ get: function () {
32
+ return _array[key];
33
+ }
34
+ });
35
+ });
24
36
  var _backup = require("./backup");
25
37
  Object.keys(_backup).forEach(function (key) {
26
38
  if (key === "default" || key === "__esModule") return;
@@ -57,6 +69,30 @@ Object.keys(_date).forEach(function (key) {
57
69
  }
58
70
  });
59
71
  });
72
+ var _filtering = require("./filtering");
73
+ Object.keys(_filtering).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
76
+ if (key in exports && exports[key] === _filtering[key]) return;
77
+ Object.defineProperty(exports, key, {
78
+ enumerable: true,
79
+ get: function () {
80
+ return _filtering[key];
81
+ }
82
+ });
83
+ });
84
+ var _history = require("./history");
85
+ Object.keys(_history).forEach(function (key) {
86
+ if (key === "default" || key === "__esModule") return;
87
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
88
+ if (key in exports && exports[key] === _history[key]) return;
89
+ Object.defineProperty(exports, key, {
90
+ enumerable: true,
91
+ get: function () {
92
+ return _history[key];
93
+ }
94
+ });
95
+ });
60
96
  var _hooks = require("./hooks");
61
97
  Object.keys(_hooks).forEach(function (key) {
62
98
  if (key === "default" || key === "__esModule") return;
@@ -153,5 +189,5 @@ Object.keys(_uuid).forEach(function (key) {
153
189
  }
154
190
  });
155
191
  });
156
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
192
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
157
193
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_contrastingStatusBar","_interopRequireDefault","require","_testID","_backup","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_color","_date","_hooks","_navigation","_parsers","_ref","_reporting","_string","_useMemoAsync","_uuid","obj","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { concatTestID } from './testID';\n\nexport { concatTestID, ContrastingStatusBar };\n\nexport * from './backup';\nexport * from './color';\nexport * from './date';\nexport * from './hooks';\nexport * from './navigation';\nexport * from './parsers';\nexport * from './ref';\nexport * from './reporting';\nexport * from './string';\nexport * from './useMemoAsync';\nexport * from './uuid';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,OAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,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,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAiB,aAAA,CAAAjB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,aAAA,CAAAjB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAkB,KAAA,GAAAxB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAoB,KAAA,EAAAnB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAkB,KAAA,CAAAlB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,KAAA,CAAAlB,GAAA;IAAA;EAAA;AAAA;AAAuB,SAAAP,uBAAA0B,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
1
+ {"version":3,"names":["_contrastingStatusBar","_interopRequireDefault","require","_testID","_array","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_backup","_color","_date","_filtering","_history","_hooks","_navigation","_parsers","_ref","_reporting","_string","_useMemoAsync","_uuid","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { concatTestID } from './testID';\n\nexport { concatTestID, ContrastingStatusBar };\n\nexport * from './array';\nexport * from './backup';\nexport * from './color';\nexport * from './date';\nexport * from './filtering';\nexport * from './history';\nexport * from './hooks';\nexport * from './navigation';\nexport *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A,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAqB,KAAA,CAAArB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAa,KAAA,CAAArB,GAAA;IAAA;EAAA;AAAA;AAAuB,SAAAP,uBAAA6B,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -15,9 +15,7 @@ var _reactNative = require("react-native");
15
15
  * @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked
16
16
  * * return `false` to allow back navigation, return `true` to block back navigation
17
17
  */
18
- const useBlockOSBackNavigation = function () {
19
- let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
20
- let onAndroidBack = arguments.length > 1 ? arguments[1] : undefined;
18
+ const useBlockOSBackNavigation = (block = true, onAndroidBack) => {
21
19
  const navigation = (0, _native.useNavigation)();
22
20
  const isFocused = (0, _native.useIsFocused)();
23
21
 
@@ -41,8 +39,10 @@ const useBlockOSBackNavigation = function () {
41
39
  var _onAndroidBack;
42
40
  return (_onAndroidBack = onAndroidBack === null || onAndroidBack === void 0 ? void 0 : onAndroidBack()) !== null && _onAndroidBack !== void 0 ? _onAndroidBack : true;
43
41
  };
44
- _reactNative.BackHandler.addEventListener('hardwareBackPress', handler);
45
- return () => _reactNative.BackHandler.removeEventListener('hardwareBackPress', handler);
42
+ const subscription = _reactNative.BackHandler.addEventListener('hardwareBackPress', handler);
43
+ return () => {
44
+ subscription.remove();
45
+ };
46
46
  }
47
47
  return undefined;
48
48
  }, [block, isFocused, onAndroidBack]);