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

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 (874) 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 +15 -17
  11. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  12. package/lib/commonjs/components/entity/entity-details-with-buttons.js +18 -19
  13. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  14. package/lib/commonjs/components/entity/entity-details.js +12 -14
  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 +94 -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 +45 -0
  23. package/lib/commonjs/components/history/history-list-item.js.map +1 -0
  24. package/lib/commonjs/components/history/history-list-screen.js +121 -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 +23 -27
  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 +15 -18
  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 +7 -8
  157. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  158. package/lib/commonjs/ui-components/icons/history.js +113 -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 +34 -41
  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 +18 -12
  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 +27 -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/index.js +11 -0
  309. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  310. package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
  311. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  312. package/lib/commonjs/utils/hooks/core/proofs.js +107 -76
  313. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  314. package/lib/commonjs/utils/hooks/core/query.js +1 -2
  315. package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
  316. package/lib/commonjs/utils/hooks/core/trust-entity.js +8 -4
  317. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  318. package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  319. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
  320. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  321. package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
  322. package/lib/commonjs/utils/hooks/index.js.map +1 -1
  323. package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
  324. package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
  325. package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
  326. package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  327. package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
  328. package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
  329. package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
  330. package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
  331. package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
  332. package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
  333. package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
  334. package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
  335. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  336. package/lib/commonjs/utils/index.js +37 -1
  337. package/lib/commonjs/utils/index.js.map +1 -1
  338. package/lib/commonjs/utils/navigation.js +5 -5
  339. package/lib/commonjs/utils/navigation.js.map +1 -1
  340. package/lib/commonjs/utils/parsers/credential-images.js +1 -1
  341. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  342. package/lib/commonjs/utils/parsers/credential-sharing.js +16 -20
  343. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  344. package/lib/commonjs/utils/parsers/credential.js +16 -26
  345. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  346. package/lib/commonjs/utils/parsers/index.js +11 -0
  347. package/lib/commonjs/utils/parsers/index.js.map +1 -1
  348. package/lib/commonjs/utils/parsers/query.js +3 -2
  349. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  350. package/lib/commonjs/utils/parsers/universal-links.js +33 -0
  351. package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
  352. package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
  353. package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
  354. package/lib/commonjs/utils/ref.js.map +1 -1
  355. package/lib/commonjs/utils/reporting.js +4 -2
  356. package/lib/commonjs/utils/reporting.js.map +1 -1
  357. package/lib/commonjs/utils/string.js.map +1 -1
  358. package/lib/commonjs/utils/testID.js +1 -4
  359. package/lib/commonjs/utils/testID.js.map +1 -1
  360. package/lib/commonjs/utils/testID.test.js.map +1 -1
  361. package/lib/commonjs/utils/useMemoAsync.js +9 -0
  362. package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
  363. package/lib/commonjs/utils/uuid.js +1 -1
  364. package/lib/commonjs/utils/uuid.js.map +1 -1
  365. package/lib/module/components/backup/index.js.map +1 -1
  366. package/lib/module/components/backup/preview-credentials.js +17 -21
  367. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  368. package/lib/module/components/credential/credential.js +10 -11
  369. package/lib/module/components/credential/credential.js.map +1 -1
  370. package/lib/module/components/credential/index.js.map +1 -1
  371. package/lib/module/components/entity/EntityButtons.js +17 -21
  372. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  373. package/lib/module/components/entity/entity-attributes.js +12 -13
  374. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  375. package/lib/module/components/entity/entity-details-with-buttons.js +15 -15
  376. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  377. package/lib/module/components/entity/entity-details.js +8 -9
  378. package/lib/module/components/entity/entity-details.js.map +1 -1
  379. package/lib/module/components/entity/index.js.map +1 -1
  380. package/lib/module/components/history/history-details-screen.js +59 -0
  381. package/lib/module/components/history/history-details-screen.js.map +1 -0
  382. package/lib/module/components/history/history-list-item-icon.js +84 -0
  383. package/lib/module/components/history/history-list-item-icon.js.map +1 -0
  384. package/lib/module/components/history/history-list-item.js +36 -0
  385. package/lib/module/components/history/history-list-item.js.map +1 -0
  386. package/lib/module/components/history/history-list-screen.js +112 -0
  387. package/lib/module/components/history/history-list-screen.js.map +1 -0
  388. package/lib/module/components/history/history-list-section-header.js +29 -0
  389. package/lib/module/components/history/history-list-section-header.js.map +1 -0
  390. package/lib/module/components/history/history-list.js +90 -0
  391. package/lib/module/components/history/history-list.js.map +1 -0
  392. package/lib/module/components/history/index.js +7 -0
  393. package/lib/module/components/history/index.js.map +1 -0
  394. package/lib/module/components/index.js +1 -0
  395. package/lib/module/components/index.js.map +1 -1
  396. package/lib/module/components/navigation/header-buttons.js +19 -23
  397. package/lib/module/components/navigation/header-buttons.js.map +1 -1
  398. package/lib/module/components/navigation/index.js.map +1 -1
  399. package/lib/module/components/proof-request/group.js +3 -4
  400. package/lib/module/components/proof-request/group.js.map +1 -1
  401. package/lib/module/components/proof-request/index.js.map +1 -1
  402. package/lib/module/components/proof-request/select-credential.js +10 -11
  403. package/lib/module/components/proof-request/select-credential.js.map +1 -1
  404. package/lib/module/components/proof-request/share-credential.js +21 -25
  405. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  406. package/lib/module/index.js.map +1 -1
  407. package/lib/module/normalize-color.d.js.map +1 -1
  408. package/lib/module/ui-components/accessibility/accessibility.js +5 -7
  409. package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
  410. package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
  411. package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  412. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
  413. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  414. package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
  415. package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  416. package/lib/module/ui-components/accessibility/index.js +4 -4
  417. package/lib/module/ui-components/accessibility/index.js.map +1 -1
  418. package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
  419. package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
  420. package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
  421. package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
  422. package/lib/module/ui-components/action-modal/index.js.map +1 -1
  423. package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
  424. package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  425. package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
  426. package/lib/module/ui-components/blur/blur-view.js +10 -11
  427. package/lib/module/ui-components/blur/blur-view.js.map +1 -1
  428. package/lib/module/ui-components/blur/index.js.map +1 -1
  429. package/lib/module/ui-components/buttons/back-button.js +10 -11
  430. package/lib/module/ui-components/buttons/back-button.js.map +1 -1
  431. package/lib/module/ui-components/buttons/button.js +17 -18
  432. package/lib/module/ui-components/buttons/button.js.map +1 -1
  433. package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
  434. package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
  435. package/lib/module/ui-components/buttons/filter-button.js +6 -7
  436. package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
  437. package/lib/module/ui-components/buttons/ghost-button.js +9 -10
  438. package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
  439. package/lib/module/ui-components/buttons/hold-button.js +236 -0
  440. package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
  441. package/lib/module/ui-components/buttons/index.js +8 -7
  442. package/lib/module/ui-components/buttons/index.js.map +1 -1
  443. package/lib/module/ui-components/buttons/scan-button.js +5 -6
  444. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  445. package/lib/module/ui-components/camera/camera-overlay.js +7 -9
  446. package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
  447. package/lib/module/ui-components/camera/index.js.map +1 -1
  448. package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
  449. package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
  450. package/lib/module/ui-components/control/checkbox.js +9 -10
  451. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  452. package/lib/module/ui-components/control/index.js.map +1 -1
  453. package/lib/module/ui-components/control/switch.js +8 -9
  454. package/lib/module/ui-components/control/switch.js.map +1 -1
  455. package/lib/module/ui-components/credential/card/credential-card.js +16 -17
  456. package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
  457. package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
  458. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  459. package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
  460. package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  461. package/lib/module/ui-components/credential/card/credential-header.js +21 -19
  462. package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
  463. package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
  464. package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  465. package/lib/module/ui-components/credential/card/index.js +10 -10
  466. package/lib/module/ui-components/credential/card/index.js.map +1 -1
  467. package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
  468. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  469. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
  470. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  471. package/lib/module/ui-components/credential/index.js +2 -2
  472. package/lib/module/ui-components/credential/index.js.map +1 -1
  473. package/lib/module/ui-components/credential/selector-status.js +3 -3
  474. package/lib/module/ui-components/credential/selector-status.js.map +1 -1
  475. package/lib/module/ui-components/credential/selector.js +5 -6
  476. package/lib/module/ui-components/credential/selector.js.map +1 -1
  477. package/lib/module/ui-components/detail/detail.js +9 -10
  478. package/lib/module/ui-components/detail/detail.js.map +1 -1
  479. package/lib/module/ui-components/detail/index.js.map +1 -1
  480. package/lib/module/ui-components/entity/avatar.js +10 -11
  481. package/lib/module/ui-components/entity/avatar.js.map +1 -1
  482. package/lib/module/ui-components/entity/entity-cluster.js +11 -13
  483. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  484. package/lib/module/ui-components/entity/index.js.map +1 -1
  485. package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
  486. package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
  487. package/lib/module/ui-components/header/foldable-header.js +10 -12
  488. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  489. package/lib/module/ui-components/header/header.js +10 -11
  490. package/lib/module/ui-components/header/header.js.map +1 -1
  491. package/lib/module/ui-components/header/index.js +6 -6
  492. package/lib/module/ui-components/header/index.js.map +1 -1
  493. package/lib/module/ui-components/header/navigation-header.js +23 -28
  494. package/lib/module/ui-components/header/navigation-header.js.map +1 -1
  495. package/lib/module/ui-components/history/data-item.js +23 -15
  496. package/lib/module/ui-components/history/data-item.js.map +1 -1
  497. package/lib/module/ui-components/history/history-details.js +171 -0
  498. package/lib/module/ui-components/history/history-details.js.map +1 -0
  499. package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
  500. package/lib/module/ui-components/history/history-item.js.map +1 -0
  501. package/lib/module/ui-components/history/history-section-header.js +6 -7
  502. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  503. package/lib/module/ui-components/history/history-section-list-item.js +8 -9
  504. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  505. package/lib/module/ui-components/history/index.js +5 -4
  506. package/lib/module/ui-components/history/index.js.map +1 -1
  507. package/lib/module/ui-components/icons/connectivity.js +16 -21
  508. package/lib/module/ui-components/icons/connectivity.js.map +1 -1
  509. package/lib/module/ui-components/icons/credential.js +57 -68
  510. package/lib/module/ui-components/icons/credential.js.map +1 -1
  511. package/lib/module/ui-components/icons/entity.js +4 -5
  512. package/lib/module/ui-components/icons/entity.js.map +1 -1
  513. package/lib/module/ui-components/icons/history.js +101 -128
  514. package/lib/module/ui-components/icons/history.js.map +1 -1
  515. package/lib/module/ui-components/icons/icons.js +70 -87
  516. package/lib/module/ui-components/icons/icons.js.map +1 -1
  517. package/lib/module/ui-components/icons/index.js.map +1 -1
  518. package/lib/module/ui-components/icons/input.js.map +1 -1
  519. package/lib/module/ui-components/icons/keypad.js +66 -78
  520. package/lib/module/ui-components/icons/keypad.js.map +1 -1
  521. package/lib/module/ui-components/icons/loader.js +1 -1
  522. package/lib/module/ui-components/icons/loader.js.map +1 -1
  523. package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
  524. package/lib/module/ui-components/icons/selector.js +5 -6
  525. package/lib/module/ui-components/icons/selector.js.map +1 -1
  526. package/lib/module/ui-components/icons/wallet.js +13 -16
  527. package/lib/module/ui-components/icons/wallet.js.map +1 -1
  528. package/lib/module/ui-components/image/image-or-component.js +12 -14
  529. package/lib/module/ui-components/image/image-or-component.js.map +1 -1
  530. package/lib/module/ui-components/image/index.js +2 -2
  531. package/lib/module/ui-components/image/index.js.map +1 -1
  532. package/lib/module/ui-components/index.js.map +1 -1
  533. package/lib/module/ui-components/input/index.js.map +1 -1
  534. package/lib/module/ui-components/input/radio-group.js +26 -22
  535. package/lib/module/ui-components/input/radio-group.js.map +1 -1
  536. package/lib/module/ui-components/input/selection-input.js +21 -31
  537. package/lib/module/ui-components/input/selection-input.js.map +1 -1
  538. package/lib/module/ui-components/input/text-input.js +21 -22
  539. package/lib/module/ui-components/input/text-input.js.map +1 -1
  540. package/lib/module/ui-components/list/index.js +1 -0
  541. package/lib/module/ui-components/list/index.js.map +1 -1
  542. package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
  543. package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
  544. package/lib/module/ui-components/list/list-section-header.js +8 -9
  545. package/lib/module/ui-components/list/list-section-header.js.map +1 -1
  546. package/lib/module/ui-components/list/list-title-header.js +4 -5
  547. package/lib/module/ui-components/list/list-title-header.js.map +1 -1
  548. package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
  549. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
  550. package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
  551. package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
  552. package/lib/module/ui-components/list/wallet/index.js +4 -0
  553. package/lib/module/ui-components/list/wallet/index.js.map +1 -0
  554. package/lib/module/ui-components/loader/index.js.map +1 -1
  555. package/lib/module/ui-components/loader/loader.js +14 -12
  556. package/lib/module/ui-components/loader/loader.js.map +1 -1
  557. package/lib/module/ui-components/loader/loading-result.js +21 -19
  558. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  559. package/lib/module/ui-components/nerd-view/index.js +2 -2
  560. package/lib/module/ui-components/nerd-view/index.js.map +1 -1
  561. package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
  562. package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  563. package/lib/module/ui-components/pin/index.js.map +1 -1
  564. package/lib/module/ui-components/pin/keypad.js +17 -19
  565. package/lib/module/ui-components/pin/keypad.js.map +1 -1
  566. package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
  567. package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
  568. package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
  569. package/lib/module/ui-components/pin/pin-lock.js +6 -7
  570. package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
  571. package/lib/module/ui-components/pin/pins.js +7 -8
  572. package/lib/module/ui-components/pin/pins.js.map +1 -1
  573. package/lib/module/ui-components/screens/backup-screen.js +13 -14
  574. package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
  575. package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
  576. package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
  577. package/lib/module/ui-components/screens/index.js +12 -12
  578. package/lib/module/ui-components/screens/index.js.map +1 -1
  579. package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -34
  580. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  581. package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
  582. package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  583. package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
  584. package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
  585. package/lib/module/ui-components/screens/section-list-screen.js +11 -12
  586. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  587. package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
  588. package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
  589. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  590. package/lib/module/ui-components/searchbar/search-bar.js +11 -12
  591. package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
  592. package/lib/module/ui-components/settings/button-setting.js +10 -11
  593. package/lib/module/ui-components/settings/button-setting.js.map +1 -1
  594. package/lib/module/ui-components/settings/index.js.map +1 -1
  595. package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
  596. package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
  597. package/lib/module/ui-components/settings/setting-item.js +7 -8
  598. package/lib/module/ui-components/settings/setting-item.js.map +1 -1
  599. package/lib/module/ui-components/settings/settings-button.js +5 -6
  600. package/lib/module/ui-components/settings/settings-button.js.map +1 -1
  601. package/lib/module/ui-components/settings/switch-setting.js +9 -10
  602. package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
  603. package/lib/module/ui-components/state/error-screen.js +7 -8
  604. package/lib/module/ui-components/state/error-screen.js.map +1 -1
  605. package/lib/module/ui-components/state/index.js.map +1 -1
  606. package/lib/module/ui-components/text/base.js +12 -13
  607. package/lib/module/ui-components/text/base.js.map +1 -1
  608. package/lib/module/ui-components/text/font.js +10 -11
  609. package/lib/module/ui-components/text/font.js.map +1 -1
  610. package/lib/module/ui-components/text/index.js +2 -2
  611. package/lib/module/ui-components/text/index.js.map +1 -1
  612. package/lib/module/ui-components/text/typography.js +8 -10
  613. package/lib/module/ui-components/text/typography.js.map +1 -1
  614. package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
  615. package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
  616. package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
  617. package/lib/module/ui-components/theme/index.js.map +1 -1
  618. package/lib/module/utils/array.js.map +1 -1
  619. package/lib/module/utils/backup.js.map +1 -1
  620. package/lib/module/utils/color.js.map +1 -1
  621. package/lib/module/utils/contrasting-status-bar.js +5 -6
  622. package/lib/module/utils/contrasting-status-bar.js.map +1 -1
  623. package/lib/module/utils/date.js +4 -4
  624. package/lib/module/utils/date.js.map +1 -1
  625. package/lib/module/utils/filtering.js +4 -0
  626. package/lib/module/utils/filtering.js.map +1 -0
  627. package/lib/module/utils/history.js +66 -0
  628. package/lib/module/utils/history.js.map +1 -0
  629. package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
  630. package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
  631. package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
  632. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  633. package/lib/module/utils/hooks/core/backup.js +31 -31
  634. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  635. package/lib/module/utils/hooks/core/cache.js +37 -0
  636. package/lib/module/utils/hooks/core/cache.js.map +1 -0
  637. package/lib/module/utils/hooks/core/core-config.js +11 -0
  638. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  639. package/lib/module/utils/hooks/core/core-context.js +14 -9
  640. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  641. package/lib/module/utils/hooks/core/core-init.js +16 -8
  642. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  643. package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
  644. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  645. package/lib/module/utils/hooks/core/credentials.js +26 -36
  646. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  647. package/lib/module/utils/hooks/core/dids.js +3 -4
  648. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  649. package/lib/module/utils/hooks/core/error-code.js +3 -3
  650. package/lib/module/utils/hooks/core/error-code.js.map +1 -1
  651. package/lib/module/utils/hooks/core/history.js +4 -35
  652. package/lib/module/utils/hooks/core/history.js.map +1 -1
  653. package/lib/module/utils/hooks/core/index.js +1 -0
  654. package/lib/module/utils/hooks/core/index.js.map +1 -1
  655. package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
  656. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  657. package/lib/module/utils/hooks/core/proofs.js +101 -67
  658. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  659. package/lib/module/utils/hooks/core/query.js.map +1 -1
  660. package/lib/module/utils/hooks/core/trust-entity.js +7 -3
  661. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  662. package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  663. package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
  664. package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  665. package/lib/module/utils/hooks/http/client.js.map +1 -1
  666. package/lib/module/utils/hooks/index.js.map +1 -1
  667. package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
  668. package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
  669. package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
  670. package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  671. package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
  672. package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
  673. package/lib/module/utils/hooks/navigation/index.js.map +1 -1
  674. package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
  675. package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
  676. package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
  677. package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
  678. package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
  679. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  680. package/lib/module/utils/index.js +3 -0
  681. package/lib/module/utils/index.js.map +1 -1
  682. package/lib/module/utils/navigation.js +5 -5
  683. package/lib/module/utils/navigation.js.map +1 -1
  684. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  685. package/lib/module/utils/parsers/credential-sharing.js +15 -19
  686. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  687. package/lib/module/utils/parsers/credential.js +16 -25
  688. package/lib/module/utils/parsers/credential.js.map +1 -1
  689. package/lib/module/utils/parsers/index.js +1 -0
  690. package/lib/module/utils/parsers/index.js.map +1 -1
  691. package/lib/module/utils/parsers/query.js +3 -2
  692. package/lib/module/utils/parsers/query.js.map +1 -1
  693. package/lib/module/utils/parsers/universal-links.js +25 -0
  694. package/lib/module/utils/parsers/universal-links.js.map +1 -0
  695. package/lib/module/utils/parsers/universal-links.test.js +38 -0
  696. package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
  697. package/lib/module/utils/ref.js.map +1 -1
  698. package/lib/module/utils/reporting.js +1 -0
  699. package/lib/module/utils/reporting.js.map +1 -1
  700. package/lib/module/utils/string.js.map +1 -1
  701. package/lib/module/utils/testID.js +1 -4
  702. package/lib/module/utils/testID.js.map +1 -1
  703. package/lib/module/utils/testID.test.js.map +1 -1
  704. package/lib/module/utils/useMemoAsync.js +10 -0
  705. package/lib/module/utils/useMemoAsync.js.map +1 -1
  706. package/lib/module/utils/uuid.js.map +1 -1
  707. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  708. package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
  709. package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
  710. package/lib/typescript/components/history/history-list-item.d.ts +20 -0
  711. package/lib/typescript/components/history/history-list-screen.d.ts +22 -0
  712. package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
  713. package/lib/typescript/components/history/history-list.d.ts +19 -0
  714. package/lib/typescript/components/history/index.d.ts +6 -0
  715. package/lib/typescript/components/index.d.ts +1 -0
  716. package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
  717. package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
  718. package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
  719. package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
  720. package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
  721. package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
  722. package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
  723. package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
  724. package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
  725. package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
  726. package/lib/typescript/ui-components/credential/index.d.ts +2 -1
  727. package/lib/typescript/ui-components/header/index.d.ts +6 -3
  728. package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
  729. package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
  730. package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
  731. package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
  732. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  733. package/lib/typescript/ui-components/history/index.d.ts +5 -4
  734. package/lib/typescript/ui-components/icons/history.d.ts +20 -35
  735. package/lib/typescript/ui-components/image/index.d.ts +2 -1
  736. package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
  737. package/lib/typescript/ui-components/list/index.d.ts +1 -0
  738. package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
  739. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
  740. package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
  741. package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
  742. package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
  743. package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
  744. package/lib/typescript/ui-components/screens/index.d.ts +12 -6
  745. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  746. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  747. package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
  748. package/lib/typescript/utils/filtering.d.ts +1 -0
  749. package/lib/typescript/utils/history.d.ts +10 -0
  750. package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
  751. package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
  752. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
  753. package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
  754. package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
  755. package/lib/typescript/utils/hooks/core/credentials.d.ts +7 -3
  756. package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
  757. package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
  758. package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -8
  759. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -0
  760. package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
  761. package/lib/typescript/utils/index.d.ts +3 -0
  762. package/lib/typescript/utils/parsers/index.d.ts +1 -0
  763. package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
  764. package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
  765. package/lib/typescript/utils/ref.d.ts +1 -1
  766. package/package.json +60 -46
  767. package/src/components/entity/entity-attributes.tsx +4 -3
  768. package/src/components/entity/entity-details-with-buttons.tsx +4 -3
  769. package/src/components/history/history-details-screen.tsx +89 -0
  770. package/src/components/history/history-list-item-icon.tsx +108 -0
  771. package/src/components/history/history-list-item.tsx +53 -0
  772. package/src/components/history/history-list-screen.tsx +154 -0
  773. package/src/components/history/history-list-section-header.tsx +42 -0
  774. package/src/components/history/history-list.tsx +116 -0
  775. package/src/components/history/index.tsx +6 -0
  776. package/src/components/index.ts +1 -0
  777. package/src/ui-components/accessibility/accessibility.ts +2 -2
  778. package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
  779. package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
  780. package/src/ui-components/accessibility/index.ts +4 -3
  781. package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
  782. package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
  783. package/src/ui-components/buttons/back-button.stories.tsx +7 -8
  784. package/src/ui-components/buttons/button.stories.tsx +9 -10
  785. package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
  786. package/src/ui-components/buttons/connectivity-button.tsx +1 -1
  787. package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
  788. package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
  789. package/src/ui-components/buttons/hold-button.tsx +276 -0
  790. package/src/ui-components/buttons/index.ts +16 -6
  791. package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
  792. package/src/ui-components/control/checkbox.stories.tsx +8 -8
  793. package/src/ui-components/control/switch.stories.tsx +11 -8
  794. package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
  795. package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
  796. package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
  797. package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
  798. package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
  799. package/src/ui-components/credential/card/credential-header.tsx +4 -1
  800. package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
  801. package/src/ui-components/credential/card/index.ts +11 -5
  802. package/src/ui-components/credential/index.ts +2 -1
  803. package/src/ui-components/credential/selector.stories.tsx +7 -7
  804. package/src/ui-components/detail/detail.stories.tsx +11 -8
  805. package/src/ui-components/entity/avatar.stories.tsx +10 -7
  806. package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
  807. package/src/ui-components/header/header.stories.tsx +10 -7
  808. package/src/ui-components/header/index.ts +6 -3
  809. package/src/ui-components/header/navigation-header.stories.tsx +11 -8
  810. package/src/ui-components/history/data-item.tsx +13 -4
  811. package/src/ui-components/history/history-details.tsx +247 -0
  812. package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
  813. package/src/ui-components/history/history-section-header.tsx +2 -2
  814. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  815. package/src/ui-components/history/index.ts +5 -4
  816. package/src/ui-components/icons/history.tsx +82 -131
  817. package/src/ui-components/image/index.tsx +2 -1
  818. package/src/ui-components/input/radio-group.stories.tsx +34 -0
  819. package/src/ui-components/input/radio-group.tsx +8 -2
  820. package/src/ui-components/input/selection-input.stories.tsx +20 -17
  821. package/src/ui-components/list/index.ts +1 -0
  822. package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
  823. package/src/ui-components/list/wallet/empty-list.tsx +75 -0
  824. package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
  825. package/src/ui-components/list/wallet/index.tsx +4 -0
  826. package/src/ui-components/loader/loader.stories.tsx +6 -9
  827. package/src/ui-components/loader/loader.tsx +6 -3
  828. package/src/ui-components/loader/loading-result.stories.tsx +13 -10
  829. package/src/ui-components/loader/loading-result.tsx +8 -4
  830. package/src/ui-components/nerd-view/index.ts +2 -1
  831. package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
  832. package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
  833. package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
  834. package/src/ui-components/screens/index.ts +12 -6
  835. package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
  836. package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
  837. package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
  838. package/src/ui-components/searchbar/search-bar.tsx +2 -2
  839. package/src/ui-components/state/error-screen.stories.tsx +8 -9
  840. package/src/ui-components/state/error-screen.tsx +1 -1
  841. package/src/ui-components/text/index.ts +2 -1
  842. package/src/ui-components/text/typography.stories.tsx +19 -12
  843. package/src/ui-components/theme/color-scheme-context.tsx +1 -0
  844. package/src/ui-components/theme/color-scheme.ts +1 -0
  845. package/src/utils/date.ts +5 -5
  846. package/src/utils/filtering.ts +5 -0
  847. package/src/utils/history.ts +71 -0
  848. package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
  849. package/src/utils/hooks/connectivity/connectivity.ts +28 -4
  850. package/src/utils/hooks/core/backup.ts +25 -21
  851. package/src/utils/hooks/core/cache.ts +43 -0
  852. package/src/utils/hooks/core/core-config.ts +19 -0
  853. package/src/utils/hooks/core/core-context.tsx +15 -2
  854. package/src/utils/hooks/core/core-init.ts +21 -7
  855. package/src/utils/hooks/core/credential-schemas.ts +1 -1
  856. package/src/utils/hooks/core/credentials.ts +9 -14
  857. package/src/utils/hooks/core/history.ts +2 -57
  858. package/src/utils/hooks/core/index.ts +1 -0
  859. package/src/utils/hooks/core/proof-schemas.ts +1 -1
  860. package/src/utils/hooks/core/proofs.ts +107 -49
  861. package/src/utils/hooks/core/trust-entity.ts +7 -3
  862. package/src/utils/hooks/navigation/open-settings.ts +2 -3
  863. package/src/utils/hooks/revocation/credential-status.ts +3 -2
  864. package/src/utils/index.ts +3 -0
  865. package/src/utils/navigation.ts +4 -2
  866. package/src/utils/parsers/credential.ts +1 -1
  867. package/src/utils/parsers/index.ts +1 -0
  868. package/src/utils/parsers/query.tsx +2 -0
  869. package/src/utils/parsers/universal-links.test.ts +57 -0
  870. package/src/utils/parsers/universal-links.ts +26 -0
  871. package/src/utils/ref.ts +1 -1
  872. package/src/utils/reporting.ts +1 -0
  873. package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
  874. package/lib/module/ui-components/history/history-list-item.js.map +0 -1
@@ -3,12 +3,12 @@ import { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon
3
3
  import { formatDateLocalized, formatDateTimeLocalized } from '../date';
4
4
  import { concatTestID } from '../testID';
5
5
  import { getCarouselImagesFromClaims } from './credential-images';
6
- export let ValidityState;
7
- (function (ValidityState) {
6
+ export let ValidityState = /*#__PURE__*/function (ValidityState) {
8
7
  ValidityState["Revoked"] = "revoked";
9
8
  ValidityState["Suspended"] = "suspended";
10
9
  ValidityState["Valid"] = "valid";
11
- })(ValidityState || (ValidityState = {}));
10
+ return ValidityState;
11
+ }({});
12
12
  export const getValidityState = credential => {
13
13
  if ((credential === null || credential === void 0 ? void 0 : credential.state) === CredentialStateEnum.REVOKED) {
14
14
  return ValidityState.Revoked;
@@ -19,9 +19,9 @@ export const getValidityState = credential => {
19
19
  return ValidityState.Valid;
20
20
  };
21
21
  export const supportsSelectiveDisclosure = (credential, config) => {
22
- var _formatConfig$capabil, _formatConfig$capabil2;
22
+ var _formatConfig$capabil;
23
23
  const formatConfig = credential && (config === null || config === void 0 ? void 0 : config.format[credential.schema.format]);
24
- return formatConfig ? Boolean((_formatConfig$capabil = formatConfig.capabilities) === null || _formatConfig$capabil === void 0 ? void 0 : (_formatConfig$capabil2 = _formatConfig$capabil.features) === null || _formatConfig$capabil2 === void 0 ? void 0 : _formatConfig$capabil2.includes(FormatFeatureEnum.SelectiveDisclosure)) : undefined;
24
+ return formatConfig ? Boolean((_formatConfig$capabil = formatConfig.capabilities) === null || _formatConfig$capabil === void 0 || (_formatConfig$capabil = _formatConfig$capabil.features) === null || _formatConfig$capabil === void 0 ? void 0 : _formatConfig$capabil.includes(FormatFeatureEnum.SelectiveDisclosure)) : undefined;
25
25
  };
26
26
  const findClaimByPathParts = (path, claims) => {
27
27
  if (!(claims !== null && claims !== void 0 && claims.length)) {
@@ -45,12 +45,8 @@ export const hasMsoValidityIssues = credential => {
45
45
  const mdocMsoValidityIssue = Boolean((mdocMsoValidity === null || mdocMsoValidity === void 0 ? void 0 : mdocMsoValidity.nextUpdate) && new Date(mdocMsoValidity.nextUpdate) < new Date());
46
46
  return mdocMsoValidityIssue;
47
47
  };
48
- export const cardHeaderFromCredential = function (credential) {
48
+ export const cardHeaderFromCredential = (credential, claims = [], config, testID, labels) => {
49
49
  var _formatDateTimeLocali, _layoutProperties$log, _layoutProperties$log2, _layoutProperties$log3;
50
- let claims = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
51
- let config = arguments.length > 2 ? arguments[2] : undefined;
52
- let testID = arguments.length > 3 ? arguments[3] : undefined;
53
- let labels = arguments.length > 4 ? arguments[4] : undefined;
54
50
  let credentialDetailPrimary = (_formatDateTimeLocali = formatDateTimeLocalized(new Date(credential.issuanceDate))) !== null && _formatDateTimeLocali !== void 0 ? _formatDateTimeLocali : '';
55
51
  let credentialDetailSecondary;
56
52
  let credentialDetailErrorColor;
@@ -92,7 +88,7 @@ export const cardHeaderFromCredential = function (credential) {
92
88
  }
93
89
  }
94
90
  return {
95
- color: layoutProperties === null || layoutProperties === void 0 ? void 0 : (_layoutProperties$log = layoutProperties.logo) === null || _layoutProperties$log === void 0 ? void 0 : _layoutProperties$log.backgroundColor,
91
+ color: layoutProperties === null || layoutProperties === void 0 || (_layoutProperties$log = layoutProperties.logo) === null || _layoutProperties$log === void 0 ? void 0 : _layoutProperties$log.backgroundColor,
96
92
  credentialDetailErrorColor,
97
93
  credentialDetailPrimary,
98
94
  credentialDetailSecondary,
@@ -103,18 +99,13 @@ export const cardHeaderFromCredential = function (credential) {
103
99
  uri: layoutProperties.logo.image
104
100
  }
105
101
  } : undefined,
106
- iconLabelColor: layoutProperties === null || layoutProperties === void 0 ? void 0 : (_layoutProperties$log3 = layoutProperties.logo) === null || _layoutProperties$log3 === void 0 ? void 0 : _layoutProperties$log3.fontColor,
102
+ iconLabelColor: layoutProperties === null || layoutProperties === void 0 || (_layoutProperties$log3 = layoutProperties.logo) === null || _layoutProperties$log3 === void 0 ? void 0 : _layoutProperties$log3.fontColor,
107
103
  statusIcon,
108
104
  testID
109
105
  };
110
106
  };
111
- export const getCredentialCardPropsFromCredential = function (credential) {
107
+ export const getCredentialCardPropsFromCredential = (credential, claims = [], config, notice, testID, labels) => {
112
108
  var _layoutProperties$bac, _layoutProperties$bac2;
113
- let claims = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
114
- let config = arguments.length > 2 ? arguments[2] : undefined;
115
- let notice = arguments.length > 3 ? arguments[3] : undefined;
116
- let testID = arguments.length > 4 ? arguments[4] : undefined;
117
- let labels = arguments.length > 5 ? arguments[5] : undefined;
118
109
  const {
119
110
  layoutProperties
120
111
  } = credential.schema;
@@ -131,7 +122,7 @@ export const getCredentialCardPropsFromCredential = function (credential) {
131
122
  uri: layoutProperties.background.image
132
123
  }
133
124
  } : undefined,
134
- color: layoutProperties === null || layoutProperties === void 0 ? void 0 : (_layoutProperties$bac2 = layoutProperties.background) === null || _layoutProperties$bac2 === void 0 ? void 0 : _layoutProperties$bac2.color,
125
+ color: layoutProperties === null || layoutProperties === void 0 || (_layoutProperties$bac2 = layoutProperties.background) === null || _layoutProperties$bac2 === void 0 ? void 0 : _layoutProperties$bac2.color,
135
126
  header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),
136
127
  testID,
137
128
  notice
@@ -151,7 +142,7 @@ const detailsCardAttributeValueFromClaim = (claim, config, testID) => {
151
142
  const typeConfig = config === null || config === void 0 ? void 0 : config.datatype[claim.dataType];
152
143
  if (claim.array) {
153
144
  return {
154
- values: claim.value.map((arrayValue, index) => {
145
+ values: (claim.value || []).map((arrayValue, index) => {
155
146
  return detailsCardAttributeFromClaim({
156
147
  ...arrayValue,
157
148
  id: `${arrayValue.id}/${index}`
@@ -273,7 +264,7 @@ const insertAttributeInObject = (attribute, object) => {
273
264
  const nextParent = (_object$attributes = object.attributes) === null || _object$attributes === void 0 ? void 0 : _object$attributes.find(a => a.name === first);
274
265
  if (!nextParent) {
275
266
  var _object$attributes2;
276
- (_object$attributes2 = object.attributes) === null || _object$attributes2 === void 0 ? void 0 : _object$attributes2.push(nestAttributeInDummyObject(attribute));
267
+ (_object$attributes2 = object.attributes) === null || _object$attributes2 === void 0 || _object$attributes2.push(nestAttributeInDummyObject(attribute));
277
268
  } else {
278
269
  insertAttributeInObject({
279
270
  ...attribute,
@@ -285,18 +276,18 @@ function parseBase64Image(image) {
285
276
  return image ? '__BASE64IMAGE__' : '';
286
277
  }
287
278
  export function getCredentialSchemaWithoutImages(credentialSchema) {
288
- var _credentialSchema$lay, _credentialSchema$lay2, _credentialSchema$lay3, _credentialSchema$lay4, _credentialSchema$lay5, _credentialSchema$lay6;
279
+ var _credentialSchema$lay, _credentialSchema$lay2, _credentialSchema$lay3, _credentialSchema$lay4;
289
280
  return {
290
281
  ...credentialSchema,
291
282
  layoutProperties: {
292
283
  ...credentialSchema.layoutProperties,
293
284
  background: {
294
285
  ...((_credentialSchema$lay = credentialSchema.layoutProperties) === null || _credentialSchema$lay === void 0 ? void 0 : _credentialSchema$lay.background),
295
- image: parseBase64Image((_credentialSchema$lay2 = credentialSchema.layoutProperties) === null || _credentialSchema$lay2 === void 0 ? void 0 : (_credentialSchema$lay3 = _credentialSchema$lay2.background) === null || _credentialSchema$lay3 === void 0 ? void 0 : _credentialSchema$lay3.image)
286
+ image: parseBase64Image((_credentialSchema$lay2 = credentialSchema.layoutProperties) === null || _credentialSchema$lay2 === void 0 || (_credentialSchema$lay2 = _credentialSchema$lay2.background) === null || _credentialSchema$lay2 === void 0 ? void 0 : _credentialSchema$lay2.image)
296
287
  },
297
288
  logo: {
298
- ...((_credentialSchema$lay4 = credentialSchema.layoutProperties) === null || _credentialSchema$lay4 === void 0 ? void 0 : _credentialSchema$lay4.logo),
299
- image: parseBase64Image((_credentialSchema$lay5 = credentialSchema.layoutProperties) === null || _credentialSchema$lay5 === void 0 ? void 0 : (_credentialSchema$lay6 = _credentialSchema$lay5.logo) === null || _credentialSchema$lay6 === void 0 ? void 0 : _credentialSchema$lay6.image)
289
+ ...((_credentialSchema$lay3 = credentialSchema.layoutProperties) === null || _credentialSchema$lay3 === void 0 ? void 0 : _credentialSchema$lay3.logo),
290
+ image: parseBase64Image((_credentialSchema$lay4 = credentialSchema.layoutProperties) === null || _credentialSchema$lay4 === void 0 || (_credentialSchema$lay4 = _credentialSchema$lay4.logo) === null || _credentialSchema$lay4 === void 0 ? void 0 : _credentialSchema$lay4.image)
300
291
  }
301
292
  }
302
293
  };
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","_formatConfig$capabil2","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","cardHeaderFromCredential","_formatDateTimeLocali","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","arguments","labels","credentialDetailPrimary","issuanceDate","credentialDetailSecondary","credentialDetailErrorColor","credentialDetailTestID","statusIcon","layoutProperties","suspendEndDate","suspendedUntil","suspended","revoked","validityIssues","primary","primaryAttribute","secondary","secondaryAttribute","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","_layoutProperties$bac","_layoutProperties$bac2","notice","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","date","File","_typeConfig$params","params","showAs","String","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInObject","join","nestAttributeInDummyObject","pathParts","disabled","object","_object$attributes","nextParent","_object$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4","_credentialSchema$lay5","_credentialSchema$lay6"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n} from '@procivis/react-native-one-core';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n let credentialDetailPrimary = formatDateTimeLocalized(new Date(credential.issuanceDate)) ?? '';\n\n let credentialDetailSecondary: string | undefined;\n let credentialDetailErrorColor: boolean | undefined;\n let credentialDetailTestID: string | undefined;\n let statusIcon;\n\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n credentialDetailPrimary = credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended;\n credentialDetailTestID = concatTestID(testID, 'suspended');\n statusIcon = CredentialWarningIcon;\n break;\n case CredentialStateEnum.REVOKED:\n credentialDetailPrimary = labels.revoked;\n credentialDetailErrorColor = true;\n credentialDetailTestID = concatTestID(testID, 'revoked');\n statusIcon = CredentialErrorIcon;\n break;\n default: {\n if (hasMsoValidityIssues(credential)) {\n credentialDetailPrimary = labels.validityIssues;\n credentialDetailTestID = concatTestID(testID, 'validity-issue');\n statusIcon = CredentialWarningIcon;\n } else {\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n credentialDetailTestID = concatTestID(testID, 'detail');\n }\n break;\n }\n }\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: claim.value.map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.File: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyObject(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyObject = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n return {\n attributes: [nestAttributeInDummyObject({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: attribute.path,\n };\n};\n\n// Recursively insert an attribute into an object\n// Will create nested objects if necessary\nconst insertAttributeInObject = (attribute: CredentialAttribute, object: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = object.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n object.attributes?.push(nestAttributeInDummyObject(attribute));\n } else {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.image),\n },\n },\n };\n}\n"],"mappings":"AAAA,SAMEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,QACZ,iCAAiC;AAUxC,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,2BAA2B;AACnH,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,2BAA2B,QAAQ,qBAAqB;AAEjE,WAAYC,aAAa;AAIxB,WAJWA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAMzB,OAAO,MAAMC,gBAAgB,GAAIC,UAA0C,IAAK;EAC9E,IAAI,CAAAA,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACc,OAAO,EAAE;IACrD,OAAOJ,aAAa,CAACK,OAAO;EAC9B;EACA,IAAI,CAAAH,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACgB,SAAS,EAAE;IACvD,OAAON,aAAa,CAACO,SAAS;EAChC;EACA,OAAOP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IACF;EACF,CAAC;AACH"}
1
+ {"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","cardHeaderFromCredential","labels","_formatDateTimeLocali","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","credentialDetailPrimary","issuanceDate","credentialDetailSecondary","credentialDetailErrorColor","credentialDetailTestID","statusIcon","layoutProperties","suspendEndDate","suspendedUntil","suspended","revoked","validityIssues","primary","primaryAttribute","secondary","secondaryAttribute","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","date","File","_typeConfig$params","params","showAs","String","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInObject","join","nestAttributeInDummyObject","pathParts","disabled","object","_object$attributes","nextParent","_object$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n} from '@procivis/react-native-one-core';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n let credentialDetailPrimary = formatDateTimeLocalized(new Date(credential.issuanceDate)) ?? '';\n\n let credentialDetailSecondary: string | undefined;\n let credentialDetailErrorColor: boolean | undefined;\n let credentialDetailTestID: string | undefined;\n let statusIcon;\n\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n credentialDetailPrimary = credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended;\n credentialDetailTestID = concatTestID(testID, 'suspended');\n statusIcon = CredentialWarningIcon;\n break;\n case CredentialStateEnum.REVOKED:\n credentialDetailPrimary = labels.revoked;\n credentialDetailErrorColor = true;\n credentialDetailTestID = concatTestID(testID, 'revoked');\n statusIcon = CredentialErrorIcon;\n break;\n default: {\n if (hasMsoValidityIssues(credential)) {\n credentialDetailPrimary = labels.validityIssues;\n credentialDetailTestID = concatTestID(testID, 'validity-issue');\n statusIcon = CredentialWarningIcon;\n } else {\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n credentialDetailTestID = concatTestID(testID, 'detail');\n }\n break;\n }\n }\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: (claim.value || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.File: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyObject(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyObject = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n return {\n attributes: [nestAttributeInDummyObject({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: attribute.path,\n };\n};\n\n// Recursively insert an attribute into an object\n// Will create nested objects if necessary\nconst insertAttributeInObject = (attribute: CredentialAttribute, object: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = object.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n object.attributes?.push(nestAttributeInDummyObject(attribute));\n } else {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.image),\n },\n },\n };\n}\n"],"mappings":"AAAA,SAMEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,QACZ,iCAAiC;AAUxC,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,2BAA2B;AACnH,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,2B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M;IACLK,uBAAuB,CAAC;MAAE,GAAGL,SAAS;MAAEjG,IAAI,EAAEK,IAAI,CAACkG,IAAI,CAAC,GAAG;IAAE,CAAC,EAAEM,UAAU,CAAC;EAC7E;AACF,CAAC;AAED,SAASE,gBAAgBA,CAAC1D,KAAyB,EAAE;EACnD,OAAOA,KAAK,GAAG,iBAAiB,GAAG,EAAE;AACvC;AAEA,OAAO,SAAS2D,gCAAgCA,CAACC,gBAAkC,EAAE;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,sBAAA;EACnF,OAAO;IACL,GAAGJ,gBAAgB;IACnB5E,gBAAgB,EAAE;MAChB,GAAG4E,gBAAgB,CAAC5E,gBAAgB;MACpC+B,UAAU,EAAE;QACV,KAAA8C,qBAAA,GAAGD,gBAAgB,CAAC5E,gBAAgB,cAAA6E,qBAAA,uBAAjCA,qBAAA,CAAmC9C,UAAU;QAChDf,KAAK,EAAE0D,gBAAgB,EAAAI,sBAAA,GAACF,gBAAgB,CAAC5E,gBAAgB,cAAA8E,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmC/C,UAAU,cAAA+C,sBAAA,uBAA7CA,sBAAA,CAA+C9D,KAAK;MAC9E,CAAC;MACDL,IAAI,EAAE;QACJ,KAAAoE,sBAAA,GAAGH,gBAAgB,CAAC5E,gBAAgB,cAAA+E,sBAAA,uBAAjCA,sBAAA,CAAmCpE,IAAI;QAC1CK,KAAK,EAAE0D,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAAC5E,gBAAgB,cAAAgF,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCrE,IAAI,cAAAqE,sBAAA,uBAAvCA,sBAAA,CAAyChE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -2,4 +2,5 @@ export * from './credential';
2
2
  export * from './credential-images';
3
3
  export * from './credential-sharing';
4
4
  export * from './query';
5
+ export * from './universal-links';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './credential';\nexport * from './credential-images';\nexport * from './credential-sharing';\nexport * from './query';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,SAAS"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './credential';\nexport * from './credential-images';\nexport * from './credential-sharing';\nexport * from './query';\nexport * from './universal-links';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,SAAS;AACvB,cAAc,mBAAmB","ignoreList":[]}
@@ -28,9 +28,10 @@ export const getQueryKeyFromHistoryListQueryParams = queryParams => {
28
28
  credentialId,
29
29
  credentialSchemaId,
30
30
  searchText,
31
- searchType
31
+ searchType,
32
+ proofSchemaId
32
33
  } = queryParams;
33
- return [entityId, action, entityTypes, createdDateFrom, createdDateTo, didId, credentialId, credentialSchemaId, searchText, searchType];
34
+ return [entityId, action, entityTypes, createdDateFrom, createdDateTo, didId, credentialId, credentialSchemaId, searchText, searchType, proofSchemaId];
34
35
  };
35
36
  export const getQueryKeyFromCredentialSchemaListQueryParams = queryParams => {
36
37
  if (!queryParams) {
@@ -1 +1 @@
1
- {"version":3,"names":["getQueryKeyFromCredentialListQueryParams","queryParams","name","sort","sortDirection","exact","role","ids","status","include","getQueryKeyFromHistoryListQueryParams","entityId","action","entityTypes","createdDateFrom","createdDateTo","didId","credentialId","credentialSchemaId","searchText","searchType","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","proofStates","proofSchemaIds","getQueryKeyFromDidListQueryParams","did","type","deactivated","keyAlgorithms","keyRoles"],"sources":["query.tsx"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams?: Partial<CredentialListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, role, ids, status, include } = queryParams;\n return [name, sort, sortDirection, exact, role, ids, status, include];\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams?: Partial<HistoryListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const {\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n didId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n } = queryParams;\n return [\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n didId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n ];\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, include } = queryParams;\n return [name, sort, sortDirection, exact, ids, include];\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams?: Partial<ProofSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids } = queryParams;\n return [name, sort, sortDirection, exact, ids];\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams?: Partial<ProofListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds } = queryParams;\n return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams?: Partial<DidListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { name, did, type, deactivated, keyAlgorithms, keyRoles } = queryParams;\n return [name, did, type, deactivated, keyAlgorithms, keyRoles];\n};\n"],"mappings":"AASA,OAAO,MAAMA,wCAAwC,GAAIC,WAA0C,IAAK;EACtG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EAC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IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,CAAC;AAChD,CAAC;AAED,OAAO,MAAMgB,mCAAmC,GAAItB,WAAqC,IAAK;EAC5F,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEE,GAAG;IAAEiB,WAAW;IAAEC;EAAe,CAAC,GAAGxB,WAAW;EAC1F,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,EAAEiB,WAAW,EAAEC,cAAc,CAAC;AAC7E,CAAC;AAED,OAAO,MAAMC,iCAAiC,GAAIzB,WAAmC,IAAK;EACxF,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAM;IAAEC,IAAI;IAAEyB,GAAG;IAAEC,IAAI;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAG9B,WAAW;EAC7E,OAAO,CAACC,IAAI,EAAEyB,GAAG,EAAEC,IAAI,EAAEC,WAAW,EAAEC,aAAa,EAAEC,QAAQ,CAAC;AAChE,CAAC"}
1
+ {"version":3,"names":["getQueryKeyFromCredentialListQueryParams","queryParams","name","sort","sortDirection","exact","role","ids","status","include","getQueryKeyFromHistoryListQueryParams","entityId","action","entityTypes","createdDateFrom","createdDateTo","didId","credentialId","credentialSchemaId","searchText","searchType","proofSchemaId","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","proofStates","proofSchemaIds","getQueryKeyFromDidListQueryParams","did","type","deactivated","keyAlgorithms","keyRoles"],"sources":["query.tsx"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams?: Partial<CredentialListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, role, ids, status, include } = queryParams;\n return [name, sort, sortDirection, exact, role, ids, status, include];\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams?: Partial<HistoryListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const {\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n didId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n } = queryParams;\n return [\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n didId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n ];\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, include } = queryParams;\n return [name, sort, sortDirection, exact, ids, include];\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams?: Partial<ProofSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids } = queryParams;\n return [name, sort, sortDirection, exact, ids];\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams?: Partial<ProofListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds } = queryParams;\n return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams?: Partial<DidListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { name, did, type, deactivated, keyAlgorithms, keyRoles } = queryParams;\n return [name, did, type, deactivated, keyAlgorithms, keyRoles];\n};\n"],"mappings":"AASA,OAAO,MAAMA,wCAAwC,GAAIC,WAA0C,IAAK;EACtG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IA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EAAEC,KAAK,EAAEE,GAAG,CAAC;AAChD,CAAC;AAED,OAAO,MAAMiB,mCAAmC,GAAIvB,WAAqC,IAAK;EAC5F,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEE,GAAG;IAAEkB,WAAW;IAAEC;EAAe,CAAC,GAAGzB,WAAW;EAC1F,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,EAAEkB,WAAW,EAAEC,cAAc,CAAC;AAC7E,CAAC;AAED,OAAO,MAAMC,iCAAiC,GAAI1B,WAAmC,IAAK;EACxF,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAM;IAAEC,IAAI;IAAE0B,GAAG;IAAEC,IAAI;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAG/B,WAAW;EAC7E,OAAO,CAACC,IAAI,EAAE0B,GAAG,EAAEC,IAAI,EAAEC,WAAW,EAAEC,aAAa,EAAEC,QAAQ,CAAC;AAChE,CAAC","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ import parseUrl from 'parse-url';
2
+ export const parseUniversalLink = universalLink => {
3
+ let parsedUrl;
4
+ try {
5
+ parsedUrl = parseUrl(universalLink);
6
+ } catch (e) {
7
+ return undefined;
8
+ }
9
+ if (parsedUrl.parse_failed) {
10
+ return undefined;
11
+ }
12
+ const protocol = parsedUrl.protocol;
13
+ if (!['http', 'https'].includes(protocol)) {
14
+ return undefined;
15
+ }
16
+ if (!parsedUrl.pathname.startsWith('/app-link/')) {
17
+ return undefined;
18
+ }
19
+ if (parsedUrl.pathname === '/app-link/schema') {
20
+ return parsedUrl.query.url;
21
+ }
22
+ const originalProtocol = parsedUrl.pathname.split('/').pop();
23
+ return `${originalProtocol}://?${parsedUrl.search}`;
24
+ };
25
+ //# sourceMappingURL=universal-links.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["parseUrl","parseUniversalLink","universalLink","parsedUrl","e","undefined","parse_failed","protocol","includes","pathname","startsWith","query","url","originalProtocol","split","pop","search"],"sources":["universal-links.ts"],"sourcesContent":["import parseUrl from 'parse-url';\n\nexport const parseUniversalLink = (universalLink: string): string | undefined => {\n let parsedUrl: parseUrl.ParsedUrl;\n try {\n parsedUrl = parseUrl(universalLink);\n } catch (e) {\n return undefined;\n }\n\n if (parsedUrl.parse_failed) {\n return undefined;\n }\n const protocol = parsedUrl.protocol as string;\n if (!['http', 'https'].includes(protocol)) {\n return undefined;\n }\n if (!parsedUrl.pathname.startsWith('/app-link/')) {\n return undefined;\n }\n if (parsedUrl.pathname === '/app-link/schema') {\n return parsedUrl.query.url;\n }\n const originalProtocol = parsedUrl.pathname.split('/').pop();\n return `${originalProtocol}://?${parsedUrl.search}`;\n};\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,WAAW;AAEhC,OAAO,MAAMC,kBAAkB,GAAIC,aAAqB,IAAyB;EAC/E,IAAIC,SAA6B;EACjC,IAAI;IACFA,SAAS,GAAGH,QAAQ,CAACE,aAAa,CAAC;EACrC,CAAC,CAAC,OAAOE,CAAC,EAAE;IACV,OAAOC,SAAS;EAClB;EAEA,IAAIF,SAAS,CAACG,YAAY,EAAE;IAC1B,OAAOD,SAAS;EAClB;EACA,MAAME,QAAQ,GAAGJ,SAAS,CAACI,QAAkB;EAC7C,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAACC,QAAQ,CAACD,QAAQ,CAAC,EAAE;IACzC,OAAOF,SAAS;EAClB;EACA,IAAI,CAACF,SAAS,CAACM,QAAQ,CAACC,UAAU,CAAC,YAAY,CAAC,EAAE;IAChD,OAAOL,SAAS;EAClB;EACA,IAAIF,SAAS,CAACM,QAAQ,KAAK,kBAAkB,EAAE;IAC7C,OAAON,SAAS,CAACQ,KAAK,CAACC,GAAG;EAC5B;EACA,MAAMC,gBAAgB,GAAGV,SAAS,CAACM,QAAQ,CAACK,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC;EAC5D,OAAO,GAAGF,gBAAgB,OAAOV,SAAS,CAACa,MAAM,EAAE;AACrD,CAAC","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ import { parseUniversalLink } from './universal-links';
2
+ jest.mock('@react-native-community/netinfo', () => ({
3
+ addEventListener: () => {}
4
+ }));
5
+ jest.mock('react-native-bluetooth-state-manager', () => ({
6
+ onStateChange: () => {}
7
+ }));
8
+ describe('parseUniversalLink', () => {
9
+ test('Credential schema universal link url', () => {
10
+ const parsedLink = parseUniversalLink('https://desk.dev.procivis-one.com/app-link/schema?url=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Fschema%2Fv1%2F2c986182-0bca-4342-b0e0-4e149b1818c7');
11
+ expect(parsedLink).toStrictEqual('https://core.dev.procivis-one.com/ssi/schema/v1/2c986182-0bca-4342-b0e0-4e149b1818c7');
12
+ });
13
+ test('OpenID4VC credential offer universal link url', () => {
14
+ const parsedLink = parseUniversalLink('https://desk.dev.procivis-one.com/app-link/openid-credential-offer?credential_offer_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-issuer%2Fv1%2Ffde1ca86-3ea1-410e-9da4-b210355e5dd2%2Foffer%2F4e626c92-9f20-4031-992d-242563ab5ef3');
15
+ expect(parsedLink).toStrictEqual('openid-credential-offer://?credential_offer_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-issuer%2Fv1%2Ffde1ca86-3ea1-410e-9da4-b210355e5dd2%2Foffer%2F4e626c92-9f20-4031-992d-242563ab5ef3');
16
+ });
17
+ test('OpenID4VP proof request universal link url', () => {
18
+ const parsedLink = parseUniversalLink('https://desk.dev.procivis-one.com/app-link/openid4vp?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_id_scheme=verifier_attestation&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F74fe0d75-d568-4178-9f73-5cd4e3f5a2ae%2Fclient-request');
19
+ expect(parsedLink).toStrictEqual('openid4vp://?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_id_scheme=verifier_attestation&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F74fe0d75-d568-4178-9f73-5cd4e3f5a2ae%2Fclient-request');
20
+ });
21
+ test('Invalid link', () => {
22
+ const parsedLink = parseUniversalLink('invalid');
23
+ expect(parsedLink).toStrictEqual(undefined);
24
+ });
25
+ test('Non-universal link', () => {
26
+ const parsedLink = parseUniversalLink('openid4vp://?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_id_scheme=verifier_attestation&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F74fe0d75-d568-4178-9f73-5cd4e3f5a2ae%2Fclient-request');
27
+ expect(parsedLink).toStrictEqual(undefined);
28
+ });
29
+ test('Invalid https universal link url', () => {
30
+ const parsedLink = parseUniversalLink('https://desk.dev.procivis-one.com/app-schema/link?url=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Fschema%2Fv1%2F2c986182-0bca-4342-b0e0-4e149b1818c7');
31
+ expect(parsedLink).toStrictEqual(undefined);
32
+ });
33
+ test('Schema universal link url with invalid params', () => {
34
+ const parsedLink = parseUniversalLink('https://desk.dev.procivis-one.com/app-link/schema?key=value');
35
+ expect(parsedLink).toStrictEqual(undefined);
36
+ });
37
+ });
38
+ //# sourceMappingURL=universal-links.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["parseUniversalLink","jest","mock","addEventListener","onStateChange","describe","test","parsedLink","expect","toStrictEqual","undefined"],"sources":["universal-links.test.ts"],"sourcesContent":["import { parseUniversalLink } from './universal-links';\n\njest.mock('@react-native-community/netinfo', () => ({\n addEventListener: () => {},\n}));\n\njest.mock('react-native-bluetooth-state-manager', () => ({\n onStateChange: () => {},\n}));\n\ndescribe('parseUniversalLink', () => {\n test('Credential schema universal link url', () => {\n const parsedLink = parseUniversalLink(\n 'https://desk.dev.procivis-one.com/app-link/schema?url=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Fschema%2Fv1%2F2c986182-0bca-4342-b0e0-4e149b1818c7',\n );\n expect(parsedLink).toStrictEqual(\n 'https://core.dev.procivis-one.com/ssi/schema/v1/2c986182-0bca-4342-b0e0-4e149b1818c7',\n );\n });\n test('OpenID4VC credential offer universal link url', () => {\n const parsedLink = parseUniversalLink(\n 'https://desk.dev.procivis-one.com/app-link/openid-credential-offer?credential_offer_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-issuer%2Fv1%2Ffde1ca86-3ea1-410e-9da4-b210355e5dd2%2Foffer%2F4e626c92-9f20-4031-992d-242563ab5ef3',\n );\n expect(parsedLink).toStrictEqual(\n 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-issuer%2Fv1%2Ffde1ca86-3ea1-410e-9da4-b210355e5dd2%2Foffer%2F4e626c92-9f20-4031-992d-242563ab5ef3',\n );\n });\n test('OpenID4VP proof request universal link url', () => {\n const parsedLink = parseUniversalLink(\n 'https://desk.dev.procivis-one.com/app-link/openid4vp?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_id_scheme=verifier_attestation&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F74fe0d75-d568-4178-9f73-5cd4e3f5a2ae%2Fclient-request',\n );\n expect(parsedLink).toStrictEqual(\n 'openid4vp://?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_id_scheme=verifier_attestation&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F74fe0d75-d568-4178-9f73-5cd4e3f5a2ae%2Fclient-request',\n );\n });\n\n test('Invalid link', () => {\n const parsedLink = parseUniversalLink('invalid');\n expect(parsedLink).toStrictEqual(undefined);\n });\n test('Non-universal link', () => {\n const parsedLink = parseUniversalLink(\n 'openid4vp://?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_id_scheme=verifier_attestation&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F74fe0d75-d568-4178-9f73-5cd4e3f5a2ae%2Fclient-request',\n );\n expect(parsedLink).toStrictEqual(undefined);\n });\n test('Invalid https universal link url', () => {\n const parsedLink = parseUniversalLink(\n 'https://desk.dev.procivis-one.com/app-schema/link?url=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Fschema%2Fv1%2F2c986182-0bca-4342-b0e0-4e149b1818c7',\n );\n expect(parsedLink).toStrictEqual(undefined);\n });\n test('Schema universal link url with invalid params', () => {\n const parsedLink = parseUniversalLink('https://desk.dev.procivis-one.com/app-link/schema?key=value');\n expect(parsedLink).toStrictEqual(undefined);\n });\n});\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,mBAAmB;AAEtDC,IAAI,CAACC,IAAI,CAAC,iCAAiC,EAAE,OAAO;EAClDC,gBAAgB,EAAEA,CAAA,KAAM,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEHF,IAAI,CAACC,IAAI,CAAC,sCAAsC,EAAE,OAAO;EACvDE,aAAa,EAAEA,CAAA,KAAM,CAAC;AACxB,CAAC,CAAC,CAAC;AAEHC,QAAQ,CAAC,oBAAoB,EAAE,MAAM;EACnCC,IAAI,CAAC,sCAAsC,EAAE,MAAM;IACjD,MAAMC,UAAU,GAAGP,kBAAkB,CACnC,0JACF,CAAC;IACDQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAC9B,sFACF,CAAC;EACH,CAAC,CAAC;EACFH,IAAI,CAAC,+CAA+C,EAAE,MAAM;IAC1D,MAAMC,UAAU,GAAGP,kBAAkB,CACnC,gPACF,CAAC;IACDQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAC9B,wMACF,CAAC;EACH,CAAC,CAAC;EACFH,IAAI,CAAC,4CAA4C,EAAE,MAAM;IACvD,MAAMC,UAAU,GAAGP,kBAAkB,CACnC,2TACF,CAAC;IACDQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAC9B,mRACF,CAAC;EACH,CAAC,CAAC;EAEFH,IAAI,CAAC,cAAc,EAAE,MAAM;IACzB,MAAMC,UAAU,GAAGP,kBAAkB,CAAC,SAAS,CAAC;IAChDQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAACC,SAAS,CAAC;EAC7C,CAAC,CAAC;EACFJ,IAAI,CAAC,oBAAoB,EAAE,MAAM;IAC/B,MAAMC,UAAU,GAAGP,kBAAkB,CACnC,mRACF,CAAC;IACDQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAACC,SAAS,CAAC;EAC7C,CAAC,CAAC;EACFJ,IAAI,CAAC,kCAAkC,EAAE,MAAM;IAC7C,MAAMC,UAAU,GAAGP,kBAAkB,CACnC,0JACF,CAAC;IACDQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAACC,SAAS,CAAC;EAC7C,CAAC,CAAC;EACFJ,IAAI,CAAC,+CAA+C,EAAE,MAAM;IAC1D,MAAMC,UAAU,GAAGP,kBAAkB,CAAC,6DAA6D,CAAC;IACpGQ,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAACC,SAAS,CAAC;EAC7C,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useRef","isWritable","obj","key","desc","Object","getOwnPropertyDescriptor","getPrototypeOf","Boolean","writable","useForwardedRef","passedRef","localRef","ref","forwardedRef","instance","current","Function","e"],"sources":["ref.ts"],"sourcesContent":["import React, { useMemo, useRef } from 'react';\n\nconst isWritable = <T extends Object>(obj: T, key: keyof T) => {\n const desc =\n Object.getOwnPropertyDescriptor(obj, key) || Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key) || {};\n return Boolean(desc.writable);\n};\n\n/**\n * Transforms a forwarded ref to a locally usable reference object\n * @example\n * const Component = forwardRef<RefComponent, Props>((props, ref) => {\n * const [forwardedRef, refObject] = useForwardedRef(ref);\n * const onAction = useCallback(() => doSomething(refObject.current), [refObject]);\n * return <RefComponent ref={forwardedRef} {...props} />;\n * }\n */\nexport const useForwardedRef = <Component extends React.Component<any> | React.ComponentClass<any>>(\n passedRef?: React.Ref<Component>,\n) => {\n const localRef = useRef<Component>(null);\n return useMemo<[React.Ref<Component>, React.RefObject<Component>]>(() => {\n const ref: React.MutableRefObject<Component | null> = localRef;\n const forwardedRef: React.Ref<Component> = (instance: Component | null) => {\n ref.current = instance;\n if (passedRef) {\n if (passedRef instanceof Function) {\n passedRef(instance);\n } else if (isWritable(passedRef, 'current')) {\n try {\n (passedRef as any).current = instance;\n } catch (e) {}\n }\n }\n };\n\n return [forwardedRef, ref as React.RefObject<Component>];\n }, [passedRef]);\n};\n"],"mappings":"AAAA,SAAgBA,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAE9C,MAAMC,UAAU,GAAGA,CAAmBC,GAAM,EAAEC,GAAY,KAAK;EAC7D,MAAMC,IAAI,GACRC,MAAM,CAACC,wBAAwB,CAACJ,GAAG,EAAEC,GAAG,CAAC,IAAIE,MAAM,CAACC,wBAAwB,CAACD,MAAM,CAACE,cAAc,CAACL,GAAG,CAAC,EAAEC,GAAG,CAAC,IAAI,CAAC,CAAC;EACrH,OAAOK,OAAO,CAACJ,IAAI,CAACK,QAAQ,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAC1BC,SAAgC,IAC7B;EACH,MAAMC,QAAQ,GAAGZ,MAAM,CAAY,IAAI,CAAC;EACxC,OAAOD,OAAO,CAAqD,MAAM;IACvE,MAAMc,GAA6C,GAAGD,QAAQ;IAC9D,MAAME,YAAkC,GAAIC,QAA0B,IAAK;MACzEF,GAAG,CAACG,OAAO,GAAGD,QAAQ;MACtB,IAAIJ,SAAS,EAAE;QACb,IAAIA,SAAS,YAAYM,QAAQ,EAAE;UACjCN,SAAS,CAACI,QAAQ,CAAC;QACrB,CAAC,MAAM,IAAId,UAAU,CAACU,SAAS,EAAE,SAAS,CAAC,EAAE;UAC3C,IAAI;YACDA,SAAS,CAASK,OAAO,GAAGD,QAAQ;UACvC,CAAC,CAAC,OAAOG,CAAC,EAAE,CAAC;QACf;MACF;IACF,CAAC;IAED,OAAO,CAACJ,YAAY,EAAED,GAAG,CAA+B;EAC1D,CAAC,EAAE,CAACF,SAAS,CAAC,CAAC;AACjB,CAAC"}
1
+ {"version":3,"names":["useMemo","useRef","isWritable","obj","key","desc","Object","getOwnPropertyDescriptor","getPrototypeOf","Boolean","writable","useForwardedRef","passedRef","localRef","ref","forwardedRef","instance","current","Function","e"],"sources":["ref.ts"],"sourcesContent":["import React, { useMemo, useRef } from 'react';\n\nconst isWritable = <T extends Object>(obj: T, key: keyof T) => {\n const desc =\n Object.getOwnPropertyDescriptor(obj, key) || Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key) || {};\n return Boolean(desc.writable);\n};\n\n/**\n * Transforms a forwarded ref to a locally usable reference object\n * @example\n * const Component = forwardRef<RefComponent, Props>((props, ref) => {\n * const [forwardedRef, refObject] = useForwardedRef(ref);\n * const onAction = useCallback(() => doSomething(refObject.current), [refObject]);\n * return <RefComponent ref={forwardedRef} {...props} />;\n * }\n */\nexport const useForwardedRef = <Component extends React.ElementType<any, any>>(\n passedRef?: React.Ref<Component>,\n) => {\n const localRef = useRef<Component>(null);\n return useMemo<[React.Ref<Component>, React.RefObject<Component>]>(() => {\n const ref: React.MutableRefObject<Component | null> = localRef;\n const forwardedRef: React.Ref<Component> = (instance: Component | null) => {\n ref.current = instance;\n if (passedRef) {\n if (passedRef instanceof Function) {\n passedRef(instance);\n } else if (isWritable(passedRef, 'current')) {\n try {\n (passedRef as any).current = instance;\n } catch (e) {}\n }\n }\n };\n\n return [forwardedRef, ref as React.RefObject<Component>];\n }, [passedRef]);\n};\n"],"mappings":"AAAA,SAAgBA,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAE9C,MAAMC,UAAU,GAAGA,CAAmBC,GAAM,EAAEC,GAAY,KAAK;EAC7D,MAAMC,IAAI,GACRC,MAAM,CAACC,wBAAwB,CAACJ,GAAG,EAAEC,GAAG,CAAC,IAAIE,MAAM,CAACC,wBAAwB,CAACD,MAAM,CAACE,cAAc,CAACL,GAAG,CAAC,EAAEC,GAAG,CAAC,IAAI,CAAC,CAAC;EACrH,OAAOK,OAAO,CAACJ,IAAI,CAACK,QAAQ,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAC1BC,SAAgC,IAC7B;EACH,MAAMC,QAAQ,GAAGZ,MAAM,CAAY,IAAI,CAAC;EACxC,OAAOD,OAAO,CAAqD,MAAM;IACvE,MAAMc,GAA6C,GAAGD,QAAQ;IAC9D,MAAME,YAAkC,GAAIC,QAA0B,IAAK;MACzEF,GAAG,CAACG,OAAO,GAAGD,QAAQ;MACtB,IAAIJ,SAAS,EAAE;QACb,IAAIA,SAAS,YAAYM,QAAQ,EAAE;UACjCN,SAAS,CAACI,QAAQ,CAAC;QACrB,CAAC,MAAM,IAAId,UAAU,CAACU,SAAS,EAAE,SAAS,CAAC,EAAE;UAC3C,IAAI;YACDA,SAAS,CAASK,OAAO,GAAGD,QAAQ;UACvC,CAAC,CAAC,OAAOG,CAAC,EAAE,CAAC;QACf;MACF;IACF,CAAC;IAED,OAAO,CAACJ,YAAY,EAAED,GAAG,CAA+B;EAC1D,CAAC,EAAE,CAACF,SAAS,CAAC,CAAC;AACjB,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  import { OneError } from '@procivis/react-native-one-core';
2
3
  import * as Sentry from '@sentry/react-native';
3
4
  export function reportError(message) {
@@ -1 +1 @@
1
- {"version":3,"names":["OneError","Sentry","reportError","message","__DEV__","captureException","Error","error","console","warn","getDebugExceptionInfo","info","code","cause","reportException","e","withScope","scope","setExtra","_e$cause","includes","operation","originalError","stack","undefined","reportTraceInfo","category","data","addBreadcrumb","level","logged","push","log"],"sources":["reporting.ts"],"sourcesContent":["import { OneError } from '@procivis/react-native-one-core';\nimport * as Sentry from '@sentry/react-native';\n\nexport function reportError(message: string) {\n if (!__DEV__) {\n try {\n Sentry.captureException(new Error(message));\n } catch (error) {\n // do nothing\n }\n } else {\n console.warn('reportError:', message);\n }\n}\n\nconst getDebugExceptionInfo = (error: unknown, message: string | undefined) => {\n if (error instanceof OneError) {\n let info = `[${error.code}](${error.message})`;\n if (error.cause) {\n info = `${info}: ${error.cause}`;\n }\n return message ? `(${message}, ${info})` : info;\n }\n\n return message ? `(${message})` : '';\n};\n\nexport function reportException(e: unknown, message?: string) {\n if (!__DEV__) {\n try {\n Sentry.withScope((scope) => {\n if (message) {\n scope.setExtra('message', message);\n }\n\n if (e instanceof OneError) {\n // prevent reporting specific errors\n if (e.cause?.includes('BLE adapter not enabled')) {\n return;\n }\n\n scope.setExtra('operation', e.operation);\n scope.setExtra('code', e.code);\n scope.setExtra('codeMessage', e.message);\n if (e.cause) {\n scope.setExtra('cause', e.cause);\n }\n\n Sentry.captureException(e.originalError);\n } else {\n Sentry.captureException(e);\n }\n });\n } catch (error) {\n // do nothing\n }\n } else {\n const info = getDebugExceptionInfo(e, message);\n console.warn(`reportException${info}`, e, e instanceof Error ? e.stack : undefined);\n }\n}\n\nexport function reportTraceInfo(category: string, message?: string, data?: Sentry.Breadcrumb['data']) {\n if (!__DEV__) {\n try {\n Sentry.addBreadcrumb({\n category,\n data,\n level: 'log',\n message,\n });\n } catch (error) {\n // do nothing\n }\n } else {\n const logged: unknown[] = [category, message];\n\n if (data) {\n logged.push(data);\n }\n\n console.log(...logged);\n }\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iCAAiC;AAC1D,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAE9C,OAAO,SAASC,WAAWA,CAACC,OAAe,EAAE;EAC3C,IAAI,CAACC,OAAO,EAAE;IACZ,IAAI;MACFH,MAAM,CAACI,gBAAgB,CAAC,IAAIC,KAAK,CAACH,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd;IAAA;EAEJ,CAAC,MAAM;IACLC,OAAO,CAACC,IAAI,CAAC,cAAc,EAAEN,OAAO,CAAC;EACvC;AACF;AAEA,MAAMO,qBAAqB,GAAGA,CAACH,KAAc,EAAEJ,OAA2B,KAAK;EAC7E,IAAII,KAAK,YAAYP,QAAQ,EAAE;IAC7B,IAAIW,IAAI,GAAI,IAAGJ,KAAK,CAACK,IAAK,KAAIL,KAAK,CAACJ,OAAQ,GAAE;IAC9C,IAAII,KAAK,CAACM,KAAK,EAAE;MACfF,IAAI,GAAI,GAAEA,IAAK,KAAIJ,KAAK,CAACM,KAAM,EAAC;IAClC;IACA,OAAOV,OAAO,GAAI,IAAGA,OAAQ,KAAIQ,IAAK,GAAE,GAAGA,IAAI;EACjD;EAEA,OAAOR,OAAO,GAAI,IAAGA,OAAQ,GAAE,GAAG,EAAE;AACtC,CAAC;AAED,OAAO,SAASW,eAAeA,CAACC,CAAU,EAAEZ,OAAgB,EAAE;EAC5D,IAAI,CAACC,OAAO,EAAE;IACZ,IAAI;MACFH,MAAM,CAACe,SAAS,CAAEC,KAAK,IAAK;QAC1B,IAAId,OAAO,EAAE;UACXc,KAAK,CAACC,QAAQ,CAAC,SAAS,EAAEf,OAAO,CAAC;QACpC;QAEA,IAAIY,CAA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uB,MAAiB,GAAG,CAACJ,QAAQ,EAAEvB,OAAO,CAAC;IAE7C,IAAIwB,IAAI,EAAE;MACRG,MAAM,CAACC,IAAI,CAACJ,IAAI,CAAC;IACnB;IAEAnB,OAAO,CAACwB,GAAG,CAAC,GAAGF,MAAM,CAAC;EACxB;AACF"}
1
+ {"version":3,"names":["OneError","Sentry","reportError","message","__DEV__","captureException","Error","error","console","warn","getDebugExceptionInfo","info","code","cause","reportException","e","withScope","scope","setExtra","_e$cause","includes","operation","originalError","stack","undefined","reportTraceInfo","category","data","addBreadcrumb","level","logged","push","log"],"sources":["reporting.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { OneError } from '@procivis/react-native-one-core';\nimport * as Sentry from '@sentry/react-native';\n\nexport function reportError(message: string) {\n if (!__DEV__) {\n try {\n Sentry.captureException(new Error(message));\n } catch (error) {\n // do nothing\n }\n } else {\n console.warn('reportError:', message);\n }\n}\n\nconst getDebugExceptionInfo = (error: unknown, message: string | undefined) => {\n if (error instanceof OneError) {\n let info = `[${error.code}](${error.message})`;\n if (error.cause) {\n info = `${info}: ${error.cause}`;\n }\n return message ? `(${message}, ${info})` : info;\n }\n\n return message ? `(${message})` : '';\n};\n\nexport function reportException(e: unknown, message?: string) {\n if (!__DEV__) {\n try {\n Sentry.withScope((scope) => {\n if (message) {\n scope.setExtra('message', message);\n }\n\n if (e instanceof OneError) {\n // prevent reporting specific errors\n if (e.cause?.includes('BLE adapter not enabled')) {\n return;\n }\n\n scope.setExtra('operation', e.operation);\n scope.setExtra('code', e.code);\n scope.setExtra('codeMessage', e.message);\n if (e.cause) {\n scope.setExtra('cause', e.cause);\n }\n\n Sentry.captureException(e.originalError);\n } else {\n Sentry.captureException(e);\n }\n });\n } catch (error) {\n // do nothing\n }\n } else {\n const info = getDebugExceptionInfo(e, message);\n console.warn(`reportException${info}`, e, e instanceof Error ? e.stack : undefined);\n }\n}\n\nexport function reportTraceInfo(category: string, message?: string, data?: Sentry.Breadcrumb['data']) {\n if (!__DEV__) {\n try {\n Sentry.addBreadcrumb({\n category,\n data,\n level: 'log',\n message,\n });\n } catch (error) {\n // do nothing\n }\n } else {\n const logged: unknown[] = [category, message];\n\n if (data) {\n logged.push(data);\n }\n\n console.log(...logged);\n }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,iCAAiC;AAC1D,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAE9C,OAAO,SAASC,WAAWA,CAACC,OAAe,EAAE;EAC3C,IAAI,CAACC,OAAO,EAAE;IACZ,IAAI;MACFH,MAAM,CAACI,gBAAgB,CAAC,IAAIC,KAAK,CAACH,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd;IAAA;EAEJ,CAAC,MAAM;IACLC,OAAO,CAACC,IAAI,CAAC,cAAc,EAAEN,OAAO,CAAC;EACvC;AACF;AAEA,MAAMO,qBAAqB,GAAGA,CAACH,KAAc,EAAEJ,OAA2B,KAAK;EAC7E,IAAII,KAAK,YAAYP,QAAQ,EAAE;IAC7B,IAAIW,IAAI,GAAG,IAAIJ,KAAK,CAACK,IAAI,KAAKL,KAAK,CAACJ,OAAO,GAAG;IAC9C,IAAII,KAAK,CAACM,KAAK,EAAE;MACfF,IAAI,GAAG,GAAGA,IAAI,KAAKJ,KAAK,CAACM,KAAK,EAAE;IAClC;IACA,OAAOV,OAAO,GAAG,IAAIA,OAAO,KAAKQ,IAAI,GAAG,GAAGA,IAAI;EACjD;EAEA,OAAOR,OAAO,GAAG,IAAIA,OAAO,GAAG,GAAG,EAAE;AACtC,CAAC;AAED,OAAO,SAASW,eAAeA,CAACC,CAAU,EAAEZ,OAAgB,EAAE;EAC5D,IAAI,CAACC,OAAO,EAAE;IACZ,IAAI;MACFH,MAAM,CAACe,SAAS,CAAEC,KAAK,IAAK;QAC1B,IAAId,OAAO,EAAE;UACXc,KAAK,CAACC,QAAQ,CAAC,SAAS,EAAEf,OAAO,CAAC;QACpC;QAEA,IAAIY,CA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MuB,MAAiB,GAAG,CAACJ,QAAQ,EAAEvB,OAAO,CAAC;IAE7C,IAAIwB,IAAI,EAAE;MACRG,MAAM,CAACC,IAAI,CAACJ,IAAI,CAAC;IACnB;IAEAnB,OAAO,CAACwB,GAAG,CAAC,GAAGF,MAAM,CAAC;EACxB;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["capitalizeFirstLetter","string","charAt","toUpperCase","slice","capitalize","str","split","filter","x","map","substring","toLowerCase","join","replaceBreakingHyphens","replace","isASCII","test"],"sources":["string.ts"],"sourcesContent":["export const capitalizeFirstLetter = (string: string) => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nexport const capitalize = (str: string): string =>\n str\n ?.split(' ')\n .filter((x) => x)\n .map((x) => x.charAt(0).toUpperCase() + x.substring(1).toLowerCase())\n .join(' ');\n\nexport const replaceBreakingHyphens = (str: string): string => str.replace(/-/g, '\\u2011');\n\nexport const isASCII = (str: string) => {\n // eslint-disable-next-line no-control-regex\n return /^[\\x00-\\xFF]*$/.test(str);\n};\n"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAIC,MAAc,IAAK;EACvD,OAAOA,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGF,MAAM,CAACG,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,MAAMC,UAAU,GAAIC,GAAW,IACpCA,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CACCC,KAAK,CAAC,GAAG,CAAC,CACXC,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAC,CAChBC,GAAG,CAAED,CAAC,IAAKA,CAAC,CAACP,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGM,CAAC,CAACE,SAAS,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,CAAC,CACpEC,IAAI,CAAC,GAAG,CAAC;AAEd,OAAO,MAAMC,sBAAsB,GAAIR,GAAW,IAAaA,GAAG,CAACS,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AAE1F,OAAO,MAAMC,OAAO,GAAIV,GAAW,IAAK;EACtC;EACA,OAAO,gBAAgB,CAACW,IAAI,CAACX,GAAG,CAAC;AACnC,CAAC"}
1
+ {"version":3,"names":["capitalizeFirstLetter","string","charAt","toUpperCase","slice","capitalize","str","split","filter","x","map","substring","toLowerCase","join","replaceBreakingHyphens","replace","isASCII","test"],"sources":["string.ts"],"sourcesContent":["export const capitalizeFirstLetter = (string: string) => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nexport const capitalize = (str: string): string =>\n str\n ?.split(' ')\n .filter((x) => x)\n .map((x) => x.charAt(0).toUpperCase() + x.substring(1).toLowerCase())\n .join(' ');\n\nexport const replaceBreakingHyphens = (str: string): string => str.replace(/-/g, '\\u2011');\n\nexport const isASCII = (str: string) => {\n // eslint-disable-next-line no-control-regex\n return /^[\\x00-\\xFF]*$/.test(str);\n};\n"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAIC,MAAc,IAAK;EACvD,OAAOA,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGF,MAAM,CAACG,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,MAAMC,UAAU,GAAIC,GAAW,IACpCA,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CACCC,KAAK,CAAC,GAAG,CAAC,CACXC,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAC,CAChBC,GAAG,CAAED,CAAC,IAAKA,CAAC,CAACP,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGM,CAAC,CAACE,SAAS,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAAC,CACpEC,IAAI,CAAC,GAAG,CAAC;AAEd,OAAO,MAAMC,sBAAsB,GAAIR,GAAW,IAAaA,GAAG,CAACS,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AAE1F,OAAO,MAAMC,OAAO,GAAIV,GAAW,IAAK;EACtC;EACA,OAAO,gBAAgB,CAACW,IAAI,CAACX,GAAG,CAAC;AACnC,CAAC","ignoreList":[]}
@@ -3,10 +3,7 @@
3
3
  * @returns {string} concatenated identifier or undefined if one part is missing
4
4
  */
5
5
 
6
- export function concatTestID(part1) {
7
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
8
- args[_key - 1] = arguments[_key];
9
- }
6
+ export function concatTestID(part1, ...args) {
10
7
  return args.reduce((aggr, part) => aggr && part ? `${aggr}.${part}` : undefined, part1 || undefined);
11
8
  }
12
9
  //# sourceMappingURL=testID.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["concatTestID","part1","_len","arguments","length","args","Array","_key","reduce","aggr","part","undefined"],"sources":["testID.ts"],"sourcesContent":["/**\n * Create `testID` prop by concatenating parts\n * @returns {string} concatenated identifier or undefined if one part is missing\n */\nexport function concatTestID(part1: string, ...args: Array<string>): string;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined {\n return args.reduce((aggr, part) => (aggr && part ? `${aggr}.${part}` : undefined), part1 || undefined);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAGA,OAAO,SAASA,YAAYA,CAACC,KAAyB,EAA0D;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAArDC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAC7D,OAAOF,IAAI,CAACG,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAI,KAAMD,IAAI,IAAIC,IAAI,GAAI,GAAED,IAAK,IAAGC,IAAK,EAAC,GAAGC,SAAU,EAAEV,KAAK,IAAIU,SAAS,CAAC;AACxG"}
1
+ {"version":3,"names":["concatTestID","part1","args","reduce","aggr","part","undefined"],"sources":["testID.ts"],"sourcesContent":["/**\n * Create `testID` prop by concatenating parts\n * @returns {string} concatenated identifier or undefined if one part is missing\n */\nexport function concatTestID(part1: string, ...args: Array<string>): string;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined {\n return args.reduce((aggr, part) => (aggr && part ? `${aggr}.${part}` : undefined), part1 || undefined);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAGA,OAAO,SAASA,YAAYA,CAACC,KAAyB,EAAE,GAAGC,IAA+B,EAAsB;EAC9G,OAAOA,IAAI,CAACC,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAI,KAAMD,IAAI,IAAIC,IAAI,GAAG,GAAGD,IAAI,IAAIC,IAAI,EAAE,GAAGC,SAAU,EAAEL,KAAK,IAAIK,SAAS,CAAC;AACxG","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["concatTestID","describe","it","expect","toBe","undefined"],"sources":["testID.test.ts"],"sourcesContent":["import { concatTestID } from './testID';\n\ndescribe('concatTestID', () => {\n it('concatenates testID parts', () => {\n expect(concatTestID('A')).toBe('A');\n expect(concatTestID('A', 'B')).toBe('A.B');\n expect(concatTestID('A', 'B', 'C')).toBe('A.B.C');\n });\n\n it('recognizes missing parts', () => {\n expect(concatTestID('')).toBe(undefined);\n expect(concatTestID(undefined)).toBe(undefined);\n expect(concatTestID('', 'something')).toBe(undefined);\n expect(concatTestID(undefined, 'something')).toBe(undefined);\n expect(concatTestID('something', '')).toBe(undefined);\n expect(concatTestID('something', undefined)).toBe(undefined);\n expect(concatTestID('something', '', 'somethingElse')).toBe(undefined);\n expect(concatTestID('something', undefined, 'somethingElse')).toBe(undefined);\n });\n});\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,UAAU;AAEvCC,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7BC,EAAE,CAAC,2BAA2B,EAAE,MAAM;IACpCC,MAAM,CAACH,YAAY,CAAC,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,GAAG,CAAC;IACnCD,MAAM,CAACH,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,KAAK,CAAC;IAC1CD,MAAM,CAACH,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,OAAO,CAAC;EACnD,CAAC,CAAC;EAEFF,EAAE,CAAC,0BAA0B,EAAE,MAAM;IACnCC,MAAM,CAACH,YAAY,CAAC,EAAE,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACxCF,MAAM,CAACH,YAAY,CAACK,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC/CF,MAAM,CAACH,YAAY,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACrDF,MAAM,CAACH,YAAY,CAACK,SAAS,EAAE,WAAW,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACrDF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAEK,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAE,EAAE,EAAE,eAAe,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACtEF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAEK,SAAS,EAAE,eAAe,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;EAC/E,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["concatTestID","describe","it","expect","toBe","undefined"],"sources":["testID.test.ts"],"sourcesContent":["import { concatTestID } from './testID';\n\ndescribe('concatTestID', () => {\n it('concatenates testID parts', () => {\n expect(concatTestID('A')).toBe('A');\n expect(concatTestID('A', 'B')).toBe('A.B');\n expect(concatTestID('A', 'B', 'C')).toBe('A.B.C');\n });\n\n it('recognizes missing parts', () => {\n expect(concatTestID('')).toBe(undefined);\n expect(concatTestID(undefined)).toBe(undefined);\n expect(concatTestID('', 'something')).toBe(undefined);\n expect(concatTestID(undefined, 'something')).toBe(undefined);\n expect(concatTestID('something', '')).toBe(undefined);\n expect(concatTestID('something', undefined)).toBe(undefined);\n expect(concatTestID('something', '', 'somethingElse')).toBe(undefined);\n expect(concatTestID('something', undefined, 'somethingElse')).toBe(undefined);\n });\n});\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,UAAU;AAEvCC,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7BC,EAAE,CAAC,2BAA2B,EAAE,MAAM;IACpCC,MAAM,CAACH,YAAY,CAAC,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,GAAG,CAAC;IACnCD,MAAM,CAACH,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,KAAK,CAAC;IAC1CD,MAAM,CAACH,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,OAAO,CAAC;EACnD,CAAC,CAAC;EAEFF,EAAE,CAAC,0BAA0B,EAAE,MAAM;IACnCC,MAAM,CAACH,YAAY,CAAC,EAAE,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACxCF,MAAM,CAACH,YAAY,CAACK,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC/CF,MAAM,CAACH,YAAY,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACrDF,MAAM,CAACH,YAAY,CAACK,SAAS,EAAE,WAAW,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACrDF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAEK,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAE,EAAE,EAAE,eAAe,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACtEF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAEK,SAAS,EAAE,eAAe,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;EAC/E,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,14 @@
1
1
  import { useEffect, useState } from 'react';
2
+
3
+ /**
4
+ * Utility hook that can be used the same way as `useMemo` when the initializer needs to be async
5
+ * @param factory Factory function to produce a value
6
+ * @param deps Hook dependency list (to trigger an update)
7
+ * @param initialValue Initial value before factory finishes producing a value (default = `undefined`)
8
+ * @param fallbackValue Used when factory fails to produce a value (default = `initialValue`)
9
+ * @returns Result from the {@link factory}, {@link initialValue} or {@link fallbackValue}
10
+ */
11
+
2
12
  export function useMemoAsync(factory, deps, initialValue, fallbackValue) {
3
13
  const [value, setValue] = useState(initialValue);
4
14
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useState","useMemoAsync","factory","deps","initialValue","fallbackValue","value","setValue","abortCtrl","AbortController","update","result","signal","aborted","e","catch","abort"],"sources":["useMemoAsync.ts"],"sourcesContent":["import { DependencyList, useEffect, useState } from 'react';\n\ninterface FactoryFn<Value> {\n /**\n * Custom factory function\n * @param abortSignal Signaled when the deps change and the factory function need to be called again or when the parent component unmounts\n * @returns Result to be returned from the {@link useMemoAsync}\n */\n (abortSignal: AbortSignal): Value | Promise<Value>;\n}\n\n/**\n * Utility hook that can be used the same way as `useMemo` when the initializer needs to be async\n * @param factory Factory function to produce a value\n * @param deps Hook dependency list (to trigger an update)\n * @param initialValue Initial value before factory finishes producing a value (default = `undefined`)\n * @param fallbackValue Used when factory fails to produce a value (default = `initialValue`)\n * @returns Result from the {@link factory}, {@link initialValue} or {@link fallbackValue}\n */\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue;\nexport function useMemoAsync<Value>(factory: FactoryFn<Value>, deps: DependencyList): Value | undefined;\n\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue?: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue | undefined {\n const [value, setValue] = useState<Value | FallbackValue | undefined>(initialValue);\n useEffect(() => {\n const abortCtrl = new AbortController();\n const update = async () => {\n try {\n const result = await factory(abortCtrl.signal);\n if (!abortCtrl.signal.aborted) setValue(result);\n } catch (e) {\n if (!abortCtrl.signal.aborted) setValue(fallbackValue ?? initialValue);\n }\n };\n update().catch(() => {});\n return () => abortCtrl.abort();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n return value;\n}\n"],"mappings":"AAAA,SAAyBA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AA2B3D,OAAO,SAASC,YAAYA,CAC1BC,OAAyB,EACzBC,IAAoB,EACpBC,YAA4B,EAC5BC,aAA6B,EACM;EACnC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAAoCI,YAAY,CAAC;EACnFL,SAAS,CAAC,MAAM;IACd,MAAMS,SAAS,GAAG,IAAIC,eAAe,EAAE;IACvC,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAY;MACzB,IAAI;QACF,MAAMC,MAAM,GAAG,MAAMT,OAAO,CAACM,SAAS,CAACI,MAAM,CAAC;QAC9C,IAAI,CAACJ,SAAS,CAACI,MAAM,CAACC,OAAO,EAAEN,QAAQ,CAACI,MAAM,CAAC;MACjD,CAAC,CAAC,OAAOG,CAAC,EAAE;QACV,IAAI,CAACN,SAAS,CAACI,MAAM,CAACC,OAAO,EAAEN,QAAQ,CAACF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,YAAY,CAAC;MACxE;IACF,CAAC;IACDM,MAAM,EAAE,CAACK,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxB,OAAO,MAAMP,SAAS,CAACQ,KAAK,EAAE;IAC9B;EACF,CAAC,EAAEb,IAAI,CAAC;EACR,OAAOG,KAAK;AACd"}
1
+ {"version":3,"names":["useEffect","useState","useMemoAsync","factory","deps","initialValue","fallbackValue","value","setValue","abortCtrl","AbortController","update","result","signal","aborted","e","catch","abort"],"sources":["useMemoAsync.ts"],"sourcesContent":["import { DependencyList, useEffect, useState } from 'react';\n\ninterface FactoryFn<Value> {\n /**\n * Custom factory function\n * @param abortSignal Signaled when the deps change and the factory function need to be called again or when the parent component unmounts\n * @returns Result to be returned from the {@link useMemoAsync}\n */\n (abortSignal: AbortSignal): Value | Promise<Value>;\n}\n\n/**\n * Utility hook that can be used the same way as `useMemo` when the initializer needs to be async\n * @param factory Factory function to produce a value\n * @param deps Hook dependency list (to trigger an update)\n * @param initialValue Initial value before factory finishes producing a value (default = `undefined`)\n * @param fallbackValue Used when factory fails to produce a value (default = `initialValue`)\n * @returns Result from the {@link factory}, {@link initialValue} or {@link fallbackValue}\n */\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue;\nexport function useMemoAsync<Value>(factory: FactoryFn<Value>, deps: DependencyList): Value | undefined;\n\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue?: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue | undefined {\n const [value, setValue] = useState<Value | FallbackValue | undefined>(initialValue);\n useEffect(() => {\n const abortCtrl = new AbortController();\n const update = async () => {\n try {\n const result = await factory(abortCtrl.signal);\n if (!abortCtrl.signal.aborted) setValue(result);\n } catch (e) {\n if (!abortCtrl.signal.aborted) setValue(fallbackValue ?? initialValue);\n }\n };\n update().catch(() => {});\n return () => abortCtrl.abort();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n return value;\n}\n"],"mappings":"AAAA,SAAyBA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;;AAW3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASC,YAAYA,CAC1BC,OAAyB,EACzBC,IAAoB,EACpBC,YAA4B,EAC5BC,aAA6B,EACM;EACnC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAAoCI,YAAY,CAAC;EACnFL,SAAS,CAAC,MAAM;IACd,MAAMS,SAAS,GAAG,IAAIC,eAAe,CAAC,CAAC;IACvC,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAY;MACzB,IAAI;QACF,MAAMC,MAAM,GAAG,MAAMT,OAAO,CAACM,SAAS,CAACI,MAAM,CAAC;QAC9C,IAAI,CAACJ,SAAS,CAACI,MAAM,CAACC,OAAO,EAAEN,QAAQ,CAACI,MAAM,CAAC;MACjD,CAAC,CAAC,OAAOG,CAAC,EAAE;QACV,IAAI,CAACN,SAAS,CAACI,MAAM,CAACC,OAAO,EAAEN,QAAQ,CAACF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,YAAY,CAAC;MACxE;IACF,CAAC;IACDM,MAAM,CAAC,CAAC,CAACK,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxB,OAAO,MAAMP,SAAS,CAACQ,KAAK,CAAC,CAAC;IAC9B;EACF,CAAC,EAAEb,IAAI,CAAC;EACR,OAAOG,KAAK;AACd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["UUID","generateUUID","v4"],"sources":["uuid.ts"],"sourcesContent":["import UUID from 'react-native-uuid';\n\n/**\n * Insecure identifier generator\n * @returns {string} UUID v4\n * @example `11edc52b-2918-4d71-9058-f7285e29d894`\n */\nexport const generateUUID = (): string => UUID.v4() as string;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,mBAAmB;;AAEpC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAcD,IAAI,CAACE,EAAE,EAAY"}
1
+ {"version":3,"names":["UUID","generateUUID","v4"],"sources":["uuid.ts"],"sourcesContent":["import UUID from 'react-native-uuid';\n\n/**\n * Insecure identifier generator\n * @returns {string} UUID v4\n * @example `11edc52b-2918-4d71-9058-f7285e29d894`\n */\nexport const generateUUID = (): string => UUID.v4() as string;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,mBAAmB;;AAEpC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAcD,IAAI,CAACE,EAAE,CAAC,CAAW","ignoreList":[]}
@@ -2,6 +2,7 @@ import { TrustEntity } from '@procivis/react-native-one-core';
2
2
  import React from 'react';
3
3
  import { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';
4
4
  interface EntityAttributesProps {
5
+ did?: string;
5
6
  trustEntity?: TrustEntity;
6
7
  trusted: boolean;
7
8
  labels: AttributesLabels;
@@ -0,0 +1,20 @@
1
+ import { HistoryListItem } from '@procivis/react-native-one-core';
2
+ import { FC, ReactElement } from 'react';
3
+ import { ImageSourcePropType } from 'react-native';
4
+ import { HistoryDetailsLabels, HistoryDetailsViewProps } from '../../ui-components/history/history-details';
5
+ import { HistoryListItemLabels } from './history-list-item';
6
+ export type HistoryDetailsScreenLabels = HistoryDetailsLabels & {
7
+ item: HistoryListItemLabels;
8
+ };
9
+ export type HistoryDetailsScreenProps = {
10
+ assets: HistoryDetailsViewProps['assets'];
11
+ dataHeader: HistoryDetailsViewProps['data']['header'];
12
+ headerButton?: ReactElement;
13
+ item: HistoryListItem;
14
+ labels: HistoryDetailsScreenLabels;
15
+ onBackPressed: () => void;
16
+ onInfoPressed?: () => void;
17
+ onImagePreview: (title: string, image: ImageSourcePropType) => void;
18
+ testID?: string;
19
+ };
20
+ export declare const HistoryDetailsScreen: FC<HistoryDetailsScreenProps>;
@@ -0,0 +1,8 @@
1
+ import { HistoryActionEnum, HistoryListItem } from '@procivis/react-native-one-core';
2
+ import React, { FC } from 'react';
3
+ import { SvgProps } from 'react-native-svg';
4
+ export declare const getHistoryItemActionIcon: (action: HistoryActionEnum) => React.FC<SvgProps>;
5
+ export type HistoryListItemIconProps = {
6
+ item: HistoryListItem;
7
+ };
8
+ export declare const HistoryListItemIcon: FC<HistoryListItemIconProps>;
@@ -0,0 +1,20 @@
1
+ import { HistoryActionEnum, HistoryEntityTypeEnum, HistoryListItem } from '@procivis/react-native-one-core';
2
+ import { FC } from 'react';
3
+ export type HistoryListItemLabels = {
4
+ actions: {
5
+ [key in keyof typeof HistoryActionEnum]: string;
6
+ };
7
+ entityTypes: {
8
+ [key in keyof typeof HistoryEntityTypeEnum]: string;
9
+ };
10
+ };
11
+ export interface HistoryListItemViewProps {
12
+ dateFormatter?: (date: Date) => string;
13
+ first?: boolean;
14
+ item: HistoryListItem;
15
+ labels: HistoryListItemLabels;
16
+ last?: boolean;
17
+ onPress?: (item: HistoryListItem) => void;
18
+ testID?: string;
19
+ }
20
+ export declare const HistoryListItemView: FC<HistoryListItemViewProps>;