@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
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeOneCore","require","Sentry","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","reportError","message","__DEV__","captureException","Error","error","console","warn","getDebugExceptionInfo","OneError","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,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+C,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAA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,QAAgB,EAAExB,OAAgB,EAAEyB,IAAgC,EAAE;EACpG,IAAI,CAACxB,OAAO,EAAE;IACZ,IAAI;MACF1B,MAAM,CAACmD,aAAa,CAAC;QACnBF,QAAQ;QACRC,IAAI;QACJE,KAAK,EAAE,KAAK;QACZ3B;MACF,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd;IAAA;EAEJ,CAAC,MAAM;IACL,MAAMwB,MAAiB,GAAG,CAACJ,QAAQ,EAAExB,OAAO,CAAC;IAE7C,IAAIyB,IAAI,EAAE;MACRG,MAAM,CAACC,IAAI,CAACJ,IAAI,CAAC;IACnB;IAEApB,OAAO,CAACyB,GAAG,CAAC,GAAGF,MAAM,CAAC;EACxB;AACF"}
1
+ {"version":3,"names":["_reactNativeOneCore","require","Sentry","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","reportError","message","__DEV__","captureException","Error","error","console","warn","getDebugExceptionInfo","OneError","info","code","cause","reportException","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":";;;;;;;;AACA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+C,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA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ACC,QAAgB,EAAEvB,OAAgB,EAAEwB,IAAgC,EAAE;EACpG,IAAI,CAACvB,OAAO,EAAE;IACZ,IAAI;MACFxB,MAAM,CAACgD,aAAa,CAAC;QACnBF,QAAQ;QACRC,IAAI;QACJE,KAAK,EAAE,KAAK;QACZ1B;MACF,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd;IAAA;EAEJ,CAAC,MAAM;IACL,MAAMuB,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","exports","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":";;;;;;AAAO,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;AAACC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA;AAEK,MAAMM,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,CAACR,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGO,CAAC,CAACE,SAAS,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,CAAC,CACpEC,IAAI,CAAC,GAAG,CAAC;AAACT,OAAA,CAAAC,UAAA,GAAAA,UAAA;AAER,MAAMS,sBAAsB,GAAIR,GAAW,IAAaA,GAAG,CAACS,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AAACX,OAAA,CAAAU,sBAAA,GAAAA,sBAAA;AAEpF,MAAME,OAAO,GAAIV,GAAW,IAAK;EACtC;EACA,OAAO,gBAAgB,CAACW,IAAI,CAACX,GAAG,CAAC;AACnC,CAAC;AAACF,OAAA,CAAAY,OAAA,GAAAA,OAAA"}
1
+ {"version":3,"names":["capitalizeFirstLetter","string","charAt","toUpperCase","slice","exports","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":";;;;;;AAAO,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;AAACC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA;AAEK,MAAMM,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,CAACR,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGO,CAAC,CAACE,SAAS,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAAC,CACpEC,IAAI,CAAC,GAAG,CAAC;AAACT,OAAA,CAAAC,UAAA,GAAAA,UAAA;AAER,MAAMS,sBAAsB,GAAIR,GAAW,IAAaA,GAAG,CAACS,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AAACX,OAAA,CAAAU,sBAAA,GAAAA,sBAAA;AAEpF,MAAME,OAAO,GAAIV,GAAW,IAAK;EACtC;EACA,OAAO,gBAAgB,CAACW,IAAI,CAACX,GAAG,CAAC;AACnC,CAAC;AAACF,OAAA,CAAAY,OAAA,GAAAA,OAAA","ignoreList":[]}
@@ -9,10 +9,7 @@ exports.concatTestID = concatTestID;
9
9
  * @returns {string} concatenated identifier or undefined if one part is missing
10
10
  */
11
11
 
12
- function concatTestID(part1) {
13
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14
- args[_key - 1] = arguments[_key];
15
- }
12
+ function concatTestID(part1, ...args) {
16
13
  return args.reduce((aggr, part) => aggr && part ? `${aggr}.${part}` : undefined, part1 || undefined);
17
14
  }
18
15
  //# 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;;AAGO,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;;AAGO,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":["_testID","require","describe","it","expect","concatTestID","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,IAAAA,OAAA,GAAAC,OAAA;AAEAC,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7BC,EAAE,CAAC,2BAA2B,EAAE,MAAM;IACpCC,MAAM,CAAC,IAAAC,oBAAY,EAAC,GAAG,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;IACnCF,MAAM,CAAC,IAAAC,oBAAY,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;IAC1CF,MAAM,CAAC,IAAAC,oBAAY,EAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACnD,CAAC,CAAC;EAEFH,EAAE,CAAC,0BAA0B,EAAE,MAAM;IACnCC,MAAM,CAAC,IAAAC,oBAAY,EAAC,EAAE,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACxCH,MAAM,CAAC,IAAAC,oBAAY,EAACE,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC/CH,MAAM,CAAC,IAAAC,oBAAY,EAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACrDH,MAAM,CAAC,IAAAC,oBAAY,EAACE,SAAS,EAAE,WAAW,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACrDH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAEE,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAE,EAAE,EAAE,eAAe,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACtEH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAEE,SAAS,EAAE,eAAe,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;EAC/E,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_testID","require","describe","it","expect","concatTestID","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,IAAAA,OAAA,GAAAC,OAAA;AAEAC,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7BC,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","ignoreList":[]}
@@ -5,6 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useMemoAsync = useMemoAsync;
7
7
  var _react = require("react");
8
+ /**
9
+ * Utility hook that can be used the same way as `useMemo` when the initializer needs to be async
10
+ * @param factory Factory function to produce a value
11
+ * @param deps Hook dependency list (to trigger an update)
12
+ * @param initialValue Initial value before factory finishes producing a value (default = `undefined`)
13
+ * @param fallbackValue Used when factory fails to produce a value (default = `initialValue`)
14
+ * @returns Result from the {@link factory}, {@link initialValue} or {@link fallbackValue}
15
+ */
16
+
8
17
  function useMemoAsync(factory, deps, initialValue, fallbackValue) {
9
18
  const [value, setValue] = (0, _react.useState)(initialValue);
10
19
  (0, _react.useEffect)(() => {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","useMemoAsync","factory","deps","initialValue","fallbackValue","value","setValue","useState","useEffect","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,IAAAA,MAAA,GAAAC,OAAA;AA2BO,SAASC,YAAYA,CAC1BC,OAAyB,EACzBC,IAAoB,EACpBC,YAA4B,EAC5BC,aAA6B,EACM;EACnC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAoCJ,YAAY,CAAC;EACnF,IAAAK,gBAAS,EAAC,MAAM;IACd,MAAMC,SAAS,GAAG,IAAIC,eAAe,EAAE;IACvC,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAY;MACzB,IAAI;QACF,MAAMC,MAAM,GAAG,MAAMX,OAAO,CAACQ,SAAS,CAACI,MAAM,CAAC;QAC9C,IAAI,CAACJ,SAAS,CAACI,MAAM,CAACC,OAAO,EAAER,QAAQ,CAACM,MAAM,CAAC;MACjD,CAAC,CAAC,OAAOG,CAAC,EAAE;QACV,IAAI,CAACN,SAAS,CAACI,MAAM,CAACC,OAAO,EAAER,QAAQ,CAACF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,YAAY,CAAC;MACxE;IACF,CAAC;IACDQ,MAAM,EAAE,CAACK,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxB,OAAO,MAAMP,SAAS,CAACQ,KAAK,EAAE;IAC9B;EACF,CAAC,EAAEf,IAAI,CAAC;EACR,OAAOG,KAAK;AACd"}
1
+ {"version":3,"names":["_react","require","useMemoAsync","factory","deps","initialValue","fallbackValue","value","setValue","useState","useEffect","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,IAAAA,MAAA,GAAAC,OAAA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASO,SAASC,YAAYA,CAC1BC,OAAyB,EACzBC,IAAoB,EACpBC,YAA4B,EAC5BC,aAA6B,EACM;EACnC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAoCJ,YAAY,CAAC;EACnF,IAAAK,gBAAS,EAAC,MAAM;IACd,MAAMC,SAAS,GAAG,IAAIC,eAAe,CAAC,CAAC;IACvC,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAY;MACzB,IAAI;QACF,MAAMC,MAAM,GAAG,MAAMX,OAAO,CAACQ,SAAS,CAACI,MAAM,CAAC;QAC9C,IAAI,CAACJ,SAAS,CAACI,MAAM,CAACC,OAAO,EAAER,QAAQ,CAACM,MAAM,CAAC;MACjD,CAAC,CAAC,OAAOG,CAAC,EAAE;QACV,IAAI,CAACN,SAAS,CAACI,MAAM,CAACC,OAAO,EAAER,QAAQ,CAACF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,YAAY,CAAC;MACxE;IACF,CAAC;IACDQ,MAAM,CAAC,CAAC,CAACK,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxB,OAAO,MAAMP,SAAS,CAACQ,KAAK,CAAC,CAAC;IAC9B;EACF,CAAC,EAAEf,IAAI,CAAC;EACR,OAAOG,KAAK;AACd","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.generateUUID = void 0;
7
7
  var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /**
10
10
  * Insecure identifier generator
11
11
  * @returns {string} UUID v4
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeUuid","_interopRequireDefault","require","obj","__esModule","default","generateUUID","UUID","v4","exports"],"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,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAqC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAErC;AACA;AACA;AACA;AACA;AACO,MAAMG,YAAY,GAAGA,CAAA,KAAcC,wBAAI,CAACC,EAAE,EAAY;AAACC,OAAA,CAAAH,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"names":["_reactNativeUuid","_interopRequireDefault","require","e","__esModule","default","generateUUID","UUID","v4","exports"],"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,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAqC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErC;AACA;AACA;AACA;AACA;AACO,MAAMG,YAAY,GAAGA,CAAA,KAAcC,wBAAI,CAACC,EAAE,CAAC,CAAW;AAACC,OAAA,CAAAH,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './preview-credentials';\n"],"mappings":"AAAA,cAAc,uBAAuB"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './preview-credentials';\n"],"mappings":"AAAA,cAAc,uBAAuB","ignoreList":[]}
@@ -2,12 +2,11 @@ import React from 'react';
2
2
  import { View } from 'react-native';
3
3
  import { useCredentialListExpandedCard } from '../../utils/hooks/credential-card/credential-card-expanding';
4
4
  import { CredentialDetails } from '../credential/credential';
5
- export const PreviewCredentials = _ref => {
6
- let {
7
- credentials,
8
- labels,
9
- onImagePreview
10
- } = _ref;
5
+ export const PreviewCredentials = ({
6
+ credentials,
7
+ labels,
8
+ onImagePreview
9
+ }) => {
11
10
  const {
12
11
  expandedCredential,
13
12
  onHeaderPress
@@ -15,20 +14,17 @@ export const PreviewCredentials = _ref => {
15
14
  if (!credentials || credentials.length === 0) {
16
15
  return null;
17
16
  }
18
- return /*#__PURE__*/React.createElement(View, null, credentials.map((credential, index, _ref2) => {
19
- let {
20
- length
21
- } = _ref2;
22
- return /*#__PURE__*/React.createElement(View, {
23
- key: credential.id
24
- }, /*#__PURE__*/React.createElement(CredentialDetails, {
25
- credentialId: credential.id,
26
- expanded: expandedCredential === credential.id,
27
- labels: labels,
28
- lastItem: index === length - 1,
29
- onHeaderPress: onHeaderPress,
30
- onImagePreview: onImagePreview
31
- }));
32
- }));
17
+ return /*#__PURE__*/React.createElement(View, null, credentials.map((credential, index, {
18
+ length
19
+ }) => /*#__PURE__*/React.createElement(View, {
20
+ key: credential.id
21
+ }, /*#__PURE__*/React.createElement(CredentialDetails, {
22
+ credentialId: credential.id,
23
+ expanded: expandedCredential === credential.id,
24
+ labels: labels,
25
+ lastItem: index === length - 1,
26
+ onHeaderPress: onHeaderPress,
27
+ onImagePreview: onImagePreview
28
+ }))));
33
29
  };
34
30
  //# sourceMappingURL=preview-credentials.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","useCredentialListExpandedCard","CredentialDetails","PreviewCredentials","_ref","credentials","labels","onImagePreview","expandedCredential","onHeaderPress","length","createElement","map","credential","index","_ref2","key","id","credentialId","expanded","lastItem"],"sources":["preview-credentials.tsx"],"sourcesContent":["import { CredentialListItem } from '@procivis/react-native-one-core';\nimport React, { FC } from 'react';\nimport { ImageSourcePropType, View } from 'react-native';\n\nimport { useCredentialListExpandedCard } from '../../utils/hooks/credential-card/credential-card-expanding';\nimport { CardLabels } from '../../utils/parsers/credential';\nimport { CredentialDetails } from '../credential/credential';\n\ninterface PreviewCredentialsProps {\n credentials: CredentialListItem[] | undefined;\n labels: CardLabels;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n}\n\nexport const PreviewCredentials: FC<PreviewCredentialsProps> = ({ credentials, labels, onImagePreview }) => {\n const { expandedCredential, onHeaderPress } = useCredentialListExpandedCard();\n\n if (!credentials || credentials.length === 0) {\n return null;\n }\n\n return (\n <View>\n {credentials.map((credential, index, { length }) => (\n <View key={credential.id}>\n <CredentialDetails\n credentialId={credential.id}\n expanded={expandedCredential === credential.id}\n labels={labels}\n lastItem={index === length - 1}\n onHeaderPress={onHeaderPress}\n onImagePreview={onImagePreview}\n />\n </View>\n ))}\n </View>\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAA8BC,IAAI,QAAQ,cAAc;AAExD,SAASC,6BAA6B,QAAQ,6DAA6D;AAE3G,SAASC,iBAAiB,QAAQ,0BAA0B;AAQ5D,OAAO,MAAMC,kBAA+C,GAAGC,IAAA,IAA6C;EAAA,IAA5C;IAAEC,WAAW;IAAEC,MAAM;IAAEC;EAAe,CAAC,GAAAH,IAAA;EACrG,MAAM;IAAEI,kBAAkB;IAAEC;EAAc,CAAC,GAAGR,6BAA6B,EAAE;EAE7E,IAAI,CAACI,WAAW,IAAIA,WAAW,CAACK,MAAM,KAAK,CAAC,EAAE;IAC5C,OAAO,IAAI;EACb;EAEA,oBACEX,KAAA,CAAAY,aAAA,CAACX,IAAI,QACFK,WAAW,CAACO,GAAG,CAAC,CAACC,UAAU,EAAEC,KAAK,EAAAC,KAAA;IAAA,IAAE;MAAEL;IAAO,CAAC,GAAAK,KAAA;IAAA,oBAC7ChB,KAAA,CAAAY,aAAA,CAACX,IAAI;MAACgB,GAAG,EAAEH,UAAU,CAACI;IAAG,gBACvBlB,KAAA,CAAAY,aAAA,CAACT,iBAAiB;MAChBgB,YAAY,EAAEL,UAAU,CAACI,EAAG;MAC5BE,QAAQ,EAAEX,kBAAkB,KAAKK,UAAU,CAACI,EAAG;MAC/CX,MAAM,EAAEA,MAAO;MACfc,QAAQ,EAAEN,KAAK,KAAKJ,MAAM,GAAG,CAAE;MAC/BD,aAAa,EAAEA,aAAc;MAC7BF,cAAc,EAAEA;IAAe,EAC/B,CACG;EAAA,CACR,CAAC,CACG;AAEX,CAAC"}
1
+ {"version":3,"names":["React","View","useCredentialListExpandedCard","CredentialDetails","PreviewCredentials","credentials","labels","onImagePreview","expandedCredential","onHeaderPress","length","createElement","map","credential","index","key","id","credentialId","expanded","lastItem"],"sources":["preview-credentials.tsx"],"sourcesContent":["import { CredentialListItem } from '@procivis/react-native-one-core';\nimport React, { FC } from 'react';\nimport { ImageSourcePropType, View } from 'react-native';\n\nimport { useCredentialListExpandedCard } from '../../utils/hooks/credential-card/credential-card-expanding';\nimport { CardLabels } from '../../utils/parsers/credential';\nimport { CredentialDetails } from '../credential/credential';\n\ninterface PreviewCredentialsProps {\n credentials: CredentialListItem[] | undefined;\n labels: CardLabels;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n}\n\nexport const PreviewCredentials: FC<PreviewCredentialsProps> = ({ credentials, labels, onImagePreview }) => {\n const { expandedCredential, onHeaderPress } = useCredentialListExpandedCard();\n\n if (!credentials || credentials.length === 0) {\n return null;\n }\n\n return (\n <View>\n {credentials.map((credential, index, { length }) => (\n <View key={credential.id}>\n <CredentialDetails\n credentialId={credential.id}\n expanded={expandedCredential === credential.id}\n labels={labels}\n lastItem={index === length - 1}\n onHeaderPress={onHeaderPress}\n onImagePreview={onImagePreview}\n />\n </View>\n ))}\n </View>\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAA8BC,IAAI,QAAQ,cAAc;AAExD,SAASC,6BAA6B,QAAQ,6DAA6D;AAE3G,SAASC,iBAAiB,QAAQ,0BAA0B;AAQ5D,OAAO,MAAMC,kBAA+C,GAAGA,CAAC;EAAEC,WAAW;EAAEC,MAAM;EAAEC;AAAe,CAAC,KAAK;EAC1G,MAAM;IAAEC,kBAAkB;IAAEC;EAAc,CAAC,GAAGP,6BAA6B,CAAC,CAAC;EAE7E,IAAI,CAACG,WAAW,IAAIA,WAAW,CAACK,MAAM,KAAK,CAAC,EAAE;IAC5C,OAAO,IAAI;EACb;EAEA,oBACEV,KAAA,CAAAW,aAAA,CAACV,IAAI,QACFI,WAAW,CAACO,GAAG,CAAC,CAACC,UAAU,EAAEC,KAAK,EAAE;IAAEJ;EAAO,CAAC,kBAC7CV,KAAA,CAAAW,aAAA,CAACV,IAAI;IAACc,GAAG,EAAEF,UAAU,CAACG;EAAG,gBACvBhB,KAAA,CAAAW,aAAA,CAACR,iBAAiB;IAChBc,YAAY,EAAEJ,UAAU,CAACG,EAAG;IAC5BE,QAAQ,EAAEV,kBAAkB,KAAKK,UAAU,CAACG,EAAG;IAC/CV,MAAM,EAAEA,MAAO;IACfa,QAAQ,EAAEL,KAAK,KAAKJ,MAAM,GAAG,CAAE;IAC/BD,aAAa,EAAEA,aAAc;IAC7BF,cAAc,EAAEA;EAAe,CAChC,CACG,CACP,CACG,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -5,17 +5,16 @@ import { concatTestID } from '../../utils';
5
5
  import { useCoreConfig } from '../../utils/hooks/core/core-config';
6
6
  import { useCredentialDetail } from '../../utils/hooks/core/credentials';
7
7
  import { detailsCardFromCredentialWithClaims } from '../../utils/parsers/credential';
8
- export const CredentialDetails = _ref => {
9
- let {
10
- claims,
11
- credentialId,
12
- expanded = false,
13
- labels,
14
- lastItem,
15
- onHeaderPress,
16
- onImagePreview,
17
- headerAccessory
18
- } = _ref;
8
+ export const CredentialDetails = ({
9
+ claims,
10
+ credentialId,
11
+ expanded = false,
12
+ labels,
13
+ lastItem,
14
+ onHeaderPress,
15
+ onImagePreview,
16
+ headerAccessory
17
+ }) => {
19
18
  const {
20
19
  data: credential
21
20
  } = useCredentialDetail(credentialId);
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","CredentialDetailsCardListItem","concatTestID","useCoreConfig","useCredentialDetail","detailsCardFromCredentialWithClaims","CredentialDetails","_ref","claims","credentialId","expanded","labels","lastItem","onHeaderPress","onImagePreview","headerAccessory","data","credential","config","testID","id","card","attributes","header","accessory","createElement","style","styles","create","marginBottom"],"sources":["credential.tsx"],"sourcesContent":["import { Claim } from '@procivis/react-native-one-core';\nimport React, { FC } from 'react';\nimport { ImageSourcePropType, StyleSheet } from 'react-native';\n\nimport { CredentialDetailsCardListItem, CredentialHeaderProps } from '../../ui-components/credential/card';\nimport { concatTestID } from '../../utils';\nimport { useCoreConfig } from '../../utils/hooks/core/core-config';\nimport { useCredentialDetail } from '../../utils/hooks/core/credentials';\nimport { CardLabels, detailsCardFromCredentialWithClaims } from '../../utils/parsers/credential';\n\nexport interface CredentialDetailsProps {\n claims?: Claim[];\n credentialId: string;\n expanded?: boolean;\n headerAccessory?: CredentialHeaderProps['accessory'];\n labels: CardLabels;\n lastItem?: boolean;\n onHeaderPress?: (credentialId?: string) => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n}\n\nexport const CredentialDetails: FC<CredentialDetailsProps> = ({\n claims,\n credentialId,\n expanded = false,\n labels,\n lastItem,\n onHeaderPress,\n onImagePreview,\n headerAccessory,\n}) => {\n const { data: credential } = useCredentialDetail(credentialId);\n const { data: config } = useCoreConfig();\n\n if (!credential || !config) {\n return null;\n }\n const testID = concatTestID('Credential.credential', credential.id);\n\n const { card, attributes } = detailsCardFromCredentialWithClaims(\n credential,\n claims ?? credential.claims,\n config,\n testID,\n labels,\n );\n if (headerAccessory) {\n card.header.accessory = headerAccessory;\n }\n\n return (\n <CredentialDetailsCardListItem\n attributes={attributes}\n card={{\n ...card,\n credentialId,\n onHeaderPress,\n }}\n expanded={expanded}\n lastItem={lastItem}\n onImagePreview={onImagePreview}\n style={styles.credential}\n testID={testID}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n credential: {\n marginBottom: 8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Ae;IAC/BY,KAAK,EAAEC,MAAM,CAACV,UAAW;IACzBE,MAAM,EAAEA;EAAO,EACf;AAEN,CAAC;AAED,MAAMQ,MAAM,GAAG3B,UAAU,CAAC4B,MAAM,CAAC;EAC/BX,UAAU,EAAE;IACVY,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["React","StyleSheet","CredentialDetailsCardListItem","concatTestID","useCoreConfig","useCredentialDetail","detailsCardFromCredentialWithClaims","CredentialDetails","claims","credentialId","expanded","labels","lastItem","onHeaderPress","onImagePreview","headerAccessory","data","credential","config","testID","id","card","attributes","header","accessory","createElement","style","styles","create","marginBottom"],"sources":["credential.tsx"],"sourcesContent":["import { Claim } from '@procivis/react-native-one-core';\nimport React, { FC } from 'react';\nimport { ImageSourcePropType, StyleSheet } from 'react-native';\n\nimport { CredentialDetailsCardListItem, CredentialHeaderProps } from '../../ui-components/credential/card';\nimport { concatTestID } from '../../utils';\nimport { useCoreConfig } from '../../utils/hooks/core/core-config';\nimport { useCredentialDetail } from '../../utils/hooks/core/credentials';\nimport { CardLabels, detailsCardFromCredentialWithClaims } from '../../utils/parsers/credential';\n\nexport interface CredentialDetailsProps {\n claims?: Claim[];\n credentialId: string;\n expanded?: boolean;\n headerAccessory?: CredentialHeaderProps['accessory'];\n labels: CardLabels;\n lastItem?: boolean;\n onHeaderPress?: (credentialId?: string) => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n}\n\nexport const CredentialDetails: FC<CredentialDetailsProps> = ({\n claims,\n credentialId,\n expanded = false,\n labels,\n lastItem,\n onHeaderPress,\n onImagePreview,\n headerAccessory,\n}) => {\n const { data: credential } = useCredentialDetail(credentialId);\n const { data: config } = useCoreConfig();\n\n if (!credential || !config) {\n return null;\n }\n const testID = concatTestID('Credential.credential', credential.id);\n\n const { card, attributes } = detailsCardFromCredentialWithClaims(\n credential,\n claims ?? credential.claims,\n config,\n testID,\n labels,\n );\n if (headerAccessory) {\n card.header.accessory = headerAccessory;\n }\n\n return (\n <CredentialDetailsCardListItem\n attributes={attributes}\n card={{\n ...card,\n credentialId,\n onHeaderPress,\n }}\n expanded={expanded}\n lastItem={lastItem}\n onImagePreview={onImagePreview}\n style={styles.credential}\n testID={testID}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n credential: {\n marginBottom: 8,\n },\n});\n"],"mappings":"AACA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAA8BC,UAAU,QAAQ,cAAc;AAE9D,SAASC,6BAA6B,QAA+B,qCAAqC;AAC1G,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,aAAa,QAAQ,oCAAoC;AAClE,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAAqBC,mCAAmC,QAAQ,gCAAgC;AAahG,OAAO,MAAMC,iBAA6C,GAAGA,CAAC;EAC5DC,MAAM;EACNC,YAAY;EACZC,QAAQ,GAAG,KAAK;EAChBC,MAAM;EACNC,QAAQ;EACRC,aAAa;EACbC,cAAc;EACdC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC,IAAI,EAAEC;EAAW,CAAC,GAAGZ,mBAAmB,CAACI,YAAY,CAAC;EAC9D,MAAM;IAAEO,IAAI,EAAEE;EAAO,CAAC,GAAGd,aAAa,CAAC,CAAC;EAExC,IAAI,CAACa,UAAU,IAAI,CAACC,MAAM,EAAE;IAC1B,OAAO,IAAI;EACb;EACA,MAAMC,MAAM,GAAGhB,YAAY,CAAC,uBAAuB,EAAEc,UAAU,CAACG,EAAE,CAAC;EAEnE,MAAM;IAAEC,IAAI;IAAEC;EAAW,CAAC,GAAGhB,mCAAmC,CAC9DW,UAAU,EACVT,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIS,UAAU,CAACT,MAAM,EAC3BU,MAAM,EACNC,MAAM,EACNR,MACF,CAAC;EACD,IAAII,eAAe,EAAE;IACnBM,IAAI,CAACE,MAAM,CAACC,SAAS,GAAGT,eAAe;EACzC;EAEA,oBACEf,KAAA,CAAAyB,aAAA,CAACvB,6BAA6B;IAC5BoB,UAAU,EAAEA,UAAW;IACvBD,IAAI,EAAE;MACJ,GAAGA,IAAI;MACPZ,YAAY;MACZI;IACF,CAAE;IACFH,QAAQ,EAAEA,QAAS;IACnBE,QAAQ,EAAEA,QAAS;IACnBE,cAAc,EAAEA,cAAe;IAC/BY,KAAK,EAAEC,MAAM,CAACV,UAAW;IACzBE,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC;AAED,MAAMQ,MAAM,GAAG1B,UAAU,CAAC2B,MAAM,CAAC;EAC/BX,UAAU,EAAE;IACVY,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './credential';\n"],"mappings":"AAAA,cAAc,cAAc"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './credential';\n"],"mappings":"AAAA,cAAc,cAAc","ignoreList":[]}
@@ -2,12 +2,11 @@ import React, { memo, useCallback, useMemo } from 'react';
2
2
  import { Linking, StyleSheet, View } from 'react-native';
3
3
  import { Button, ButtonType } from '../../ui-components/buttons';
4
4
  import { concatTestID, reportException } from '../../utils';
5
- const EntityButtons = _ref => {
6
- let {
7
- entity,
8
- labels,
9
- testID
10
- } = _ref;
5
+ const EntityButtons = ({
6
+ entity,
7
+ labels,
8
+ testID
9
+ }) => {
11
10
  const buttons = useMemo(() => [{
12
11
  label: labels.visitWebsite,
13
12
  url: (entity === null || entity === void 0 ? void 0 : entity.website) || '',
@@ -29,21 +28,18 @@ const EntityButtons = _ref => {
29
28
  return /*#__PURE__*/React.createElement(View, {
30
29
  style: [styles.buttons],
31
30
  testID: testID
32
- }, buttons.map(_ref2 => {
33
- let {
34
- label,
35
- url,
36
- testID: testIdSuffix
37
- } = _ref2;
38
- return /*#__PURE__*/React.createElement(Button, {
39
- key: label,
40
- title: label,
41
- onPress: openURL(url),
42
- style: styles.urlButton,
43
- testID: concatTestID(testID, testIdSuffix),
44
- type: ButtonType.SmallTech
45
- });
46
- }));
31
+ }, buttons.map(({
32
+ label,
33
+ url,
34
+ testID: testIdSuffix
35
+ }) => /*#__PURE__*/React.createElement(Button, {
36
+ key: label,
37
+ title: label,
38
+ onPress: openURL(url),
39
+ style: styles.urlButton,
40
+ testID: concatTestID(testID, testIdSuffix),
41
+ type: ButtonType.SmallTech
42
+ })));
47
43
  };
48
44
  const styles = StyleSheet.create({
49
45
  buttons: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","memo","useCallback","useMemo","Linking","StyleSheet","View","Button","ButtonType","concatTestID","reportException","EntityButtons","_ref","entity","labels","testID","buttons","label","visitWebsite","url","website","termsAndServices","termsUrl","privacyPolicy","privacyUrl","filter","btn","Boolean","openURL","catch","e","createElement","style","styles","map","_ref2","testIdSuffix","key","title","onPress","urlButton","type","SmallTech","create","paddingBottom","paddingHorizontal","borderRadius","borderWidth","marginTop"],"sources":["EntityButtons.tsx"],"sourcesContent":["import { TrustEntity } from '@procivis/react-native-one-core';\nimport React, { FC, memo, useCallback, useMemo } from 'react';\nimport { Linking, StyleSheet, View } from 'react-native';\n\nimport { Button, ButtonType } from '../../ui-components/buttons';\nimport { EntityLabels } from '../../ui-components/screens/nerd-mode-screen';\nimport { concatTestID, reportException } from '../../utils';\n\nexport interface EntityButton {\n url: string;\n label: string;\n}\n\ninterface EntityButtonsProps {\n entity?: TrustEntity;\n labels: EntityLabels;\n testID?: string;\n}\n\nconst EntityButtons: FC<EntityButtonsProps> = ({ entity, labels, testID }) => {\n const buttons = useMemo(\n () =>\n [\n {\n label: labels.visitWebsite,\n url: entity?.website || '',\n testID: 'website',\n },\n {\n label: labels.termsAndServices,\n url: entity?.termsUrl || '',\n testID: 'termsOfService',\n },\n {\n label: labels.privacyPolicy,\n url: entity?.privacyUrl || '',\n testID: 'privacyPolicy',\n },\n ].filter((btn) => Boolean(btn.url)),\n [entity, labels],\n );\n\n const openURL = useCallback(\n (url: string) => () => {\n Linking.openURL(url).catch((e) => {\n reportException(e, 'Error opening entity link');\n });\n },\n [],\n );\n return (\n <View style={[styles.buttons]} testID={testID}>\n {buttons.map(({ label, url, testID: testIdSuffix }) => (\n <Button\n key={label}\n title={label}\n onPress={openURL(url)}\n style={styles.urlButton}\n testID={concatTestID(testID, testIdSuffix)}\n type={ButtonType.SmallTech}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttons: {\n paddingBottom: 10,\n paddingHorizontal: 12,\n },\n urlButton: {\n borderRadius: 4,\n borderWidth: 0,\n marginTop: 4,\n },\n});\n\nexport default memo(EntityButtons);\n"],"mappings":"AACA,OAAOA,KAAK,IAAQC,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC7D,SAASC,OAAO,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAExD,SAASC,MAAM,EAAEC,UAAU,QAAQ,6BAA6B;AAEhE,SAASC,YAAY,EAAEC,eAAe,QAAQ,aAAa;AAa3D,MAAMC,aAAqC,GAAGC,IAAA,IAAgC;EAAA,IAA/B;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAAH,IAAA;EACvE,MAAMI,OAAO,GAAGb,OAAO,CACrB,MACE,CACE;IACEc,KAAK,EAAEH,MAAM,CAACI,YAAY;IAC1BC,GAAG,EAAE,CAAAN,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEO,OAAO,KAAI,EAAE;IAC1BL,MAAM,EAAE;EACV,CAAC,EACD;IACEE,KAAK,EAAEH,MAAM,CAACO,gBAAgB;IAC9BF,GAAG,EAAE,CAAAN,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAES,QAAQ,KAAI,EAAE;IAC3BP,MAAM,EAAE;EACV,CAAC,EACD;IACEE,KAAK,EAAEH,MAAM,CAACS,aAAa;IAC3BJ,GAAG,EAAE,CAAAN,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEW,UAAU,KAAI,EAAE;IAC7BT,MAAM,EAAE;EAC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"names":["React","memo","useCallback","useMemo","Linking","StyleSheet","View","Button","ButtonType","concatTestID","reportException","EntityButtons","entity","labels","testID","buttons","label","visitWebsite","url","website","termsAndServices","termsUrl","privacyPolicy","privacyUrl","filter","btn","Boolean","openURL","catch","e","createElement","style","styles","map","testIdSuffix","key","title","onPress","urlButton","type","SmallTech","create","paddingBottom","paddingHorizontal","borderRadius","borderWidth","marginTop"],"sources":["EntityButtons.tsx"],"sourcesContent":["import { TrustEntity } from '@procivis/react-native-one-core';\nimport React, { FC, memo, useCallback, useMemo } from 'react';\nimport { Linking, StyleSheet, View } from 'react-native';\n\nimport { Button, ButtonType } from '../../ui-components/buttons';\nimport { EntityLabels } from '../../ui-components/screens/nerd-mode-screen';\nimport { concatTestID, reportException } from '../../utils';\n\nexport interface EntityButton {\n url: string;\n label: string;\n}\n\ninterface EntityButtonsProps {\n entity?: TrustEntity;\n labels: EntityLabels;\n testID?: string;\n}\n\nconst EntityButtons: FC<EntityButtonsProps> = ({ entity, labels, testID }) => {\n const buttons = useMemo(\n () =>\n [\n {\n label: labels.visitWebsite,\n url: entity?.website || '',\n testID: 'website',\n },\n {\n label: labels.termsAndServices,\n url: entity?.termsUrl || '',\n testID: 'termsOfService',\n },\n {\n label: labels.privacyPolicy,\n url: entity?.privacyUrl || '',\n testID: 'privacyPolicy',\n },\n ].filter((btn) => Boolean(btn.url)),\n [entity, labels],\n );\n\n const openURL = useCallback(\n (url: string) => () => {\n Linking.openURL(url).catch((e) => {\n reportException(e, 'Error opening entity link');\n });\n },\n [],\n );\n return (\n <View style={[styles.buttons]} testID={testID}>\n {buttons.map(({ label, url, testID: testIdSuffix }) => (\n <Button\n key={label}\n title={label}\n onPress={openURL(url)}\n style={styles.urlButton}\n testID={concatTestID(testID, testIdSuffix)}\n type={ButtonType.SmallTech}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttons: {\n paddingBottom: 10,\n paddingHorizontal: 12,\n },\n urlButton: {\n borderRadius: 4,\n border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EACF,CAAC;EACD,oBACE7B,KAAA,CAAA8B,aAAA,CAACxB,IAAI;IAACyB,KAAK,EAAE,CAACC,MAAM,CAACjB,OAAO,CAAE;IAACD,MAAM,EAAEA;EAAO,GAC3CC,OAAO,CAACkB,GAAG,CAAC,CAAC;IAAEjB,KAAK;IAAEE,GAAG;IAAEJ,MAAM,EAAEoB;EAAa,CAAC,kBAChDlC,KAAA,CAAA8B,aAAA,CAACvB,MAAM;IACL4B,GAAG,EAAEnB,KAAM;IACXoB,KAAK,EAAEpB,KAAM;IACbqB,OAAO,EAAEV,OAAO,CAACT,GAAG,CAAE;IACtBa,KAAK,EAAEC,MAAM,CAACM,SAAU;IACxBxB,MAAM,EAAEL,YAAY,CAACK,MAAM,EAAEoB,YAAY,CAAE;IAC3CK,IAAI,EAAE/B,UAAU,CAACgC;EAAU,CAC5B,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAMR,MAAM,GAAG3B,UAAU,CAACoC,MAAM,CAAC;EAC/B1B,OAAO,EAAE;IACP2B,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE;EACrB,CAAC;EACDL,SAAS,EAAE;IACTM,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,4BAAe7C,IAAI,CAACU,aAAa,CAAC","ignoreList":[]}
@@ -1,27 +1,26 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { memo } from 'react';
3
3
  import { View } from 'react-native';
4
4
  import { NerdModeItem } from '../../ui-components/nerd-view';
5
5
  import { EntityType } from '../../ui-components/screens/nerd-mode-screen';
6
6
  import { addElementIf } from '../../utils/array';
7
- const EntityAttributes = _ref => {
8
- var _trustEntity$did, _didId$split;
9
- let {
10
- trustEntity,
11
- trusted,
12
- labels,
13
- entityType,
14
- onCopyToClipboard
15
- } = _ref;
16
- const didId = (trustEntity === null || trustEntity === void 0 ? void 0 : (_trustEntity$did = trustEntity.did) === null || _trustEntity$did === void 0 ? void 0 : _trustEntity$did.did) || '';
17
- const didSections = (_didId$split = didId.split(':')) !== null && _didId$split !== void 0 ? _didId$split : [];
7
+ const EntityAttributes = ({
8
+ did,
9
+ trustEntity,
10
+ trusted,
11
+ labels,
12
+ entityType,
13
+ onCopyToClipboard
14
+ }) => {
15
+ var _did$split;
16
+ const didSections = (_did$split = did === null || did === void 0 ? void 0 : did.split(':')) !== null && _did$split !== void 0 ? _did$split : [];
18
17
  const identifier = didSections.pop();
19
18
  const didMethod = didSections.length ? didSections.join(':') + ':' : '';
20
19
  const attributes = [...addElementIf(trusted, {
21
20
  attributeKey: labels.trustRegistry,
22
21
  highlightedText: trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.trustAnchor.name,
23
22
  testID: 'trustRegistry'
24
- }), ...addElementIf(Boolean(didId), {
23
+ }), ...addElementIf(Boolean(did), {
25
24
  attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerDid : labels.entityDid,
26
25
  attributeText: identifier,
27
26
  canBeCopied: true,
@@ -1 +1 @@
1
- {"version":3,"names":["React","memo","View","NerdModeItem","EntityType","addElementIf","EntityAttributes","_ref","_trustEntity$did","_didId$split","trustEntity","trusted","labels","entityType","onCopyToClipboard","didId","did","didSections","split","identifier","pop","didMethod","length","join","attributes","attributeKey","trustRegistry","highlightedText","trustAnchor","name","testID","Boolean","CredentialEntity","issuerDid","entityDid","attributeText","canBeCopied","role","createElement","map","attribute","_extends","key"],"sources":["entity-attributes.tsx"],"sourcesContent":["import { TrustEntity } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { View } from 'react-native';\n\nimport { NerdModeItem } from '../../ui-components/nerd-view';\nimport { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { addElementIf } from '../../utils/array';\n\ninterface EntityAttributesProps {\n trustEntity?: TrustEntity;\n trusted: boolean;\n labels: AttributesLabels;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityAttributes: FC<EntityAttributesProps> = ({\n trustEntity,\n trusted,\n labels,\n entityType,\n onCopyToClipboard,\n}) => {\n const didId = trustEntity?.did?.did || '';\n const didSections = didId.split(':') ?? [];\n const identifier = didSections.pop();\n const didMethod = didSections.length ? didSections.join(':') + ':' : '';\n\n const attributes = [\n ...addElementIf(trusted, {\n attributeKey: labels.trustRegistry,\n highlightedText: trustEntity?.trustAnchor.name,\n testID: 'trustRegistry',\n }),\n ...addElementIf(Boolean(didId), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerDid : labels.entityDid,\n attributeText: identifier,\n canBeCopied: true,\n highlightedText: didMethod,\n testID: 'issuerDID',\n }),\n ...addElementIf(trusted && Boolean(trustEntity?.role), {\n attributeKey: labels.role,\n highlightedText: trustEntity?.role,\n testID: 'role',\n }),\n ];\n return (\n <View>\n {attributes.map((attribute) => (\n <NerdModeItem\n key={attribute.attributeKey}\n {...attribute}\n labels={labels}\n onCopyToClipboard={onCopyToClipboard}\n />\n ))}\n </View>\n );\n};\n\nexport default memo(EntityAttributes);\n"],"mappings":";AACA,OAAOA,KAAK,IAAQC,IAAI,QAAQ,OAAO;AACvC,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAA2BC,UAAU,QAAQ,8CAA8C;AAC3F,SAASC,YAAY,QAAQ,mBAAmB;AAUhD,MAAMC,gBAA2C,GAAGC,IAAA,IAM9C;EAAA,IAAAC,gBAAA,EAAAC,YAAA;EAAA,IAN+C;IACnDC,WAAW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IAAI;IAClCP,MAAM,EAAE;EACV,CAAC,CAAC,CACH;EACD,oBACE9B,KAAA,CAAAsC,aAAA,CAACpC,IAAI,QACFsB,UAAU,CAACe,GAAG,CAAEC,SAAS,iBACxBxC,KAAA,CAAAsC,aAAA,CAACnC,YAAY,EAAAsC,QAAA;IACXC,GAAG,EAAEF,SAAS,CAACf;EAAa,GACxBe,SAAS;IACb5B,MAAM,EAAEA,MAAO;IACfE,iBAAiB,EAAEA;EAAkB,GAExC,CAAC,CACG;AAEX,CAAC;AAED,4BAAeb,IAAI,CAACK,gBAAgB,CAAC"}
1
+ {"version":3,"names":["React","memo","View","NerdModeItem","EntityType","addElementIf","EntityAttributes","did","trustEntity","trusted","labels","entityType","onCopyToClipboard","_did$split","didSections","split","identifier","pop","didMethod","length","join","attributes","attributeKey","trustRegistry","highlightedText","trustAnchor","name","testID","Boolean","CredentialEntity","issuerDid","entityDid","attributeText","canBeCopied","role","createElement","map","attribute","_extends","key"],"sources":["entity-attributes.tsx"],"sourcesContent":["import { TrustEntity } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { View } from 'react-native';\n\nimport { NerdModeItem } from '../../ui-components/nerd-view';\nimport { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { addElementIf } from '../../utils/array';\n\ninterface EntityAttributesProps {\n did?: string;\n trustEntity?: TrustEntity;\n trusted: boolean;\n labels: AttributesLabels;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityAttributes: FC<EntityAttributesProps> = ({\n did,\n trustEntity,\n trusted,\n labels,\n entityType,\n onCopyToClipboard,\n}) => {\n const didSections = did?.split(':') ?? [];\n const identifier = didSections.pop();\n const didMethod = didSections.length ? didSections.join(':') + ':' : '';\n\n const attributes = [\n ...addElementIf(trusted, {\n attributeKey: labels.trustRegistry,\n highlightedText: trustEntity?.trustAnchor.name,\n testID: 'trustRegistry',\n }),\n ...addElementIf(Boolean(did), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerDid : labels.entityDid,\n attributeText: identifier,\n canBeCopied: true,\n highlightedText: didMethod,\n testID: 'issuerDID',\n }),\n ...addElementIf(trusted && Boolean(trustEntity?.role), {\n attributeKey: labels.role,\n highlightedText: trustEntity?.role,\n testID: 'role',\n }),\n ];\n return (\n <View>\n {attributes.map((attribute) => (\n <NerdModeItem\n key={attribute.attributeKey}\n {...attribute}\n labels={labels}\n onCopyToClipboard={onCopyToClipboard}\n />\n ))}\n </View>\n );\n};\n\nexport default memo(EntityAttributes);\n"],"mappings":";AACA,OAAOA,KAAK,IAAQC,IAAI,QAAQ,OAAO;AACvC,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAA2BC,UAAU,QAAQ,8CAA8C;AAC3F,SAASC,YAAY,QAAQ,mBAAmB;AAWhD,MAAMC,gBAA2C,GAAGA,CAAC;EACnDC,GAAG;EACHC,WAAW;EACXC,OAAO;EACPC,MAAM;EACNC,UAAU;EACVC;AACF,CAAC,KAAK;EAAA,IAAAC,UAAA;EACJ,MAAMC,WAAW,IAAAD,UAAA,GAAGN,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEQ,KAAK,CAAC,GAAG,CAAC,cAAAF,UAAA,cAAAA,UAAA,GAAI,EAAE;EACzC,MAAMG,UAAU,GAAGF,WAAW,CAACG,GAAG,CAAC,CAAC;EACpC,MAAMC,SAAS,GAAGJ,WAAW,CAACK,MAAM,GAAGL,WAAW,CAACM,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE;EAEvE,MAAMC,UAAU,GAAG,CACjB,GAAGhB,YAAY,CAACI,OAAO,EAAE;IACvBa,YAAY,EAAEZ,MAAM,CAACa,aAAa;IAClCC,eAAe,EAAEhB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEiB,WAAW,CAACC,IAAI;IAC9CC,MAAM,EAAE;EACV,CAAC,CAAC,EACF,GAAGtB,YAAY,CAACuB,OAAO,CAACrB,GAAG,CAAC,EAAE;IAC5Be,YAAY,EAAEX,UAAU,KAAKP,UAAU,CAACyB,gBAAgB,GAAGnB,MAAM,CAACoB,SAAS,GAAGpB,MAAM,CAACqB,SAAS;IAC9FC,aAAa,EAAEhB,UAAU;IACzBiB,WAAW,EAAE,IAAI;IACjBT,eAAe,EAAEN,SAAS;IAC1BS,MAAM,EAAE;EACV,CAAC,CAAC,EACF,GAAGtB,YAAY,CAACI,OAAO,IAAImB,OAAO,CAACpB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAE0B,IAAI,CAAC,EAAE;IACrDZ,YAAY,EAAEZ,MAAM,CAACwB,IAAI;IACzBV,eAAe,EAAEhB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAE0B,IAAI;IAClCP,MAAM,EAAE;EACV,CAAC,CAAC,CACH;EACD,oBACE3B,KAAA,CAAAmC,aAAA,CAACjC,IAAI,QACFmB,UAAU,CAACe,GAAG,CAAEC,SAAS,iBACxBrC,KAAA,CAAAmC,aAAA,CAAChC,YAAY,EAAAmC,QAAA;IACXC,GAAG,EAAEF,SAAS,CAACf;EAAa,GACxBe,SAAS;IACb3B,MAAM,EAAEA,MAAO;IACfE,iBAAiB,EAAEA;EAAkB,EACtC,CACF,CACG,CAAC;AAEX,CAAC;AAED,4BAAeX,IAAI,CAACK,gBAAgB,CAAC","ignoreList":[]}
@@ -1,25 +1,24 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import { TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';
3
3
  import React, { memo, useMemo } from 'react';
4
4
  import { View } from 'react-native';
5
5
  import EntityCluster from '../../ui-components/entity/entity-cluster';
6
6
  import { EntityTrustedIcon } from '../../ui-components/icons';
7
7
  import { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';
8
- import { concatTestID, replaceBreakingHyphens } from '../../utils';
8
+ import { concatTestID } from '../../utils';
9
9
  import { useTrustEntity } from '../../utils/hooks/core/trust-entity';
10
10
  import EntityAttributes from './entity-attributes';
11
11
  import EntityButtons from './EntityButtons';
12
- const EntityDetailsWithButtons = _ref => {
13
- let {
14
- did,
15
- entityLabels,
16
- attributesLabels,
17
- onCopyToClipboard,
18
- role,
19
- entityType,
20
- testID,
21
- ...props
22
- } = _ref;
12
+ const EntityDetailsWithButtons = ({
13
+ did,
14
+ entityLabels,
15
+ attributesLabels,
16
+ onCopyToClipboard,
17
+ role,
18
+ entityType,
19
+ testID,
20
+ ...props
21
+ }) => {
23
22
  let {
24
23
  data
25
24
  } = useTrustEntity(did === null || did === void 0 ? void 0 : did.id);
@@ -34,10 +33,10 @@ const EntityDetailsWithButtons = _ref => {
34
33
  }, [entityLabels, role, trustEntity, trusted]);
35
34
  const trustEntitySubline = useMemo(() => {
36
35
  if (!trusted) {
37
- return did !== null && did !== void 0 && did.did ? replaceBreakingHyphens(did.did) : undefined;
36
+ return undefined;
38
37
  }
39
38
  return `${entityLabels.trusted} • ${trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.trustAnchor.name}`;
40
- }, [trustEntity, trusted, entityLabels.trusted, did]);
39
+ }, [trustEntity, trusted, entityLabels.trusted]);
41
40
  const trustEntityStatusIcon = useMemo(() => {
42
41
  if (!trusted) {
43
42
  return undefined;
@@ -70,6 +69,7 @@ const EntityDetailsWithButtons = _ref => {
70
69
  labels: entityLabels,
71
70
  testID: concatTestID(testID, 'links')
72
71
  }), /*#__PURE__*/React.createElement(EntityAttributes, {
72
+ did: did === null || did === void 0 ? void 0 : did.did,
73
73
  trustEntity: trustEntity,
74
74
  trusted: trusted,
75
75
  labels: attributesLabels,
@@ -1 +1 @@
1
- {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","memo","useMemo","View","EntityCluster","EntityTrustedIcon","useAppColorScheme","concatTestID","replaceBreakingHyphens","useTrustEntity","EntityAttributes","EntityButtons","EntityDetailsWithButtons","_ref","did","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","data","id","trustEntity","undefined","colorScheme","trusted","Boolean","state","ACTIVE","BOTH","trustEntityName","ISSUER","unknownIssuer","unknownVerifier","name","trustEntitySubline","trustAnchor","trustEntityStatusIcon","createElement","style","backgroundColor","nerdView","background","_extends","avatar","logo","imageSource","uri","placeholderText","substring","statusIcon","entityName","subline","sublineColor","success","white","entity","labels"],"sources":["entity-details-with-buttons.tsx"],"sourcesContent":["import { DidListItem, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport React, { FC, memo, useMemo } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityTrustedIcon } from '../../ui-components/icons';\nimport { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';\nimport { concatTestID, replaceBreakingHyphens } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\nimport EntityAttributes from './entity-attributes';\nimport EntityButtons from './EntityButtons';\n\nexport type ContextRole = Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n\ninterface EntityDetailsWithButtonsProps {\n did?: DidListItem;\n entityLabels: EntityLabels;\n attributesLabels: AttributesLabels;\n style?: StyleProp<ViewStyle>;\n textColor?: string;\n testID?: string;\n role: ContextRole;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({\n did,\n entityLabels,\n attributesLabels,\n onCopyToClipboard,\n role,\n entityType,\n testID,\n ...props\n}) => {\n let { data } = useTrustEntity(did?.id);\n const trustEntity = data ?? undefined;\n\n const colorScheme = useAppColorScheme();\n\n const trusted = Boolean(\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role),\n );\n\n const trustEntityName = useMemo(() => {\n if (!trustEntity || !trusted) {\n return role === TrustEntityRoleEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier;\n }\n return trustEntity.name;\n }, [entityLabels, role, trustEntity, trusted]);\n\n const trustEntitySubline = useMemo(() => {\n if (!trusted) {\n return did?.did ? replaceBreakingHyphens(did.did) : undefined;\n }\n\n return `${entityLabels.trusted} • ${trustEntity?.trustAnchor.name}`;\n }, [trustEntity, trusted, entityLabels.trusted, did]);\n\n const trustEntityStatusIcon = useMemo(() => {\n if (!trusted) {\n return undefined;\n }\n return <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />;\n }, [testID, trusted]);\n\n return (\n <View style={{ backgroundColor: colorScheme.nerdView.background }}>\n <EntityCluster\n avatar={{\n avatar: trusted && trustEntity?.logo ? { imageSource: { uri: trustEntity.logo } } : undefined,\n placeholderText: trustEntity?.name.substring(0, 1),\n statusIcon: trustEntityStatusIcon,\n testID: concatTestID(testID, 'avatar'),\n }}\n entityName={trustEntityName}\n subline={trustEntitySubline}\n sublineColor={trusted ? colorScheme.success : colorScheme.white}\n testID={testID}\n {...props}\n />\n {trusted && <EntityButtons entity={trustEntity} labels={entityLabels} testID={concatTestID(testID, 'links')} />}\n <EntityAttributes\n trustEntity={trustEntity}\n trusted={trusted}\n labels={attributesLabels}\n onCopyToClipboard={onCopyToClipboard}\n entityType={entityType}\n />\n </View>\n );\n};\n\nexport default memo(EntityDetailsWithButtons);\n"],"mappings":";AAAA,SAAsBA,mBAAmB,EAAEC,oBAAoB,QAAQ,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AAE,CAAC,CAAC;MAClDC,UAAU,EAAEb,qBAAqB;MACjCnB,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,QAAQ;IACvC,CAAE;IACFiC,UAAU,EAAErB,eAAgB;IAC5BsB,OAAO,EAAEjB,kBAAmB;IAC5BkB,YAAY,EAAE5B,OAAO,GAAGD,WAAW,CAAC8B,OAAO,GAAG9B,WAAW,CAAC+B,KAAM;IAChErC,MAAM,EAAEA;EAAO,GACXC,KAAK,EACT,EACDM,OAAO,iBAAI3B,KAAA,CAAAwC,aAAA,CAAC7B,aAAa;IAAC+C,MAAM,EAAElC,WAAY;IAACmC,MAAM,EAAE5C,YAAa;IAACK,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,OAAO;EAAE,EAAG,eAC/GpB,KAAA,CAAAwC,aAAA,CAAC9B,gBAAgB;IACfc,WAAW,EAAEA,WAAY;IACzBG,OAAO,EAAEA,OAAQ;IACjBgC,MAAM,EAAE3C,gBAAiB;IACzBC,iBAAiB,EAAEA,iBAAkB;IACrCE,UAAU,EAAEA;EAAW,EACvB,CACG;AAEX,CAAC;AAED,4BAAelB,IAAI,CAACW,wBAAwB,CAAC"}
1
+ {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","memo","useMemo","View","EntityCluster","EntityTrustedIcon","useAppColorScheme","concatTestID","useTrustEntity","EntityAttributes","EntityButtons","EntityDetailsWithButtons","did","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","data","id","trustEntity","undefined","colorScheme","trusted","Boolean","state","ACTIVE","BOTH","trustEntityName","ISSUER","unknownIssuer","unknownVerifier","name","trustEntitySubline","trustAnchor","trustEntityStatusIcon","createElement","style","backgroundColor","nerdView","background","_extends","avatar","logo","imageSource","uri","placeholderText","substring","statusIcon","entityName","subline","sublineColor","success","white","entity","labels"],"sources":["entity-details-with-buttons.tsx"],"sourcesContent":["import { DidListItem, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport React, { FC, memo, useMemo } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityTrustedIcon } from '../../ui-components/icons';\nimport { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';\nimport { concatTestID } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\nimport EntityAttributes from './entity-attributes';\nimport EntityButtons from './EntityButtons';\n\nexport type ContextRole = Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n\ninterface EntityDetailsWithButtonsProps {\n did?: DidListItem;\n entityLabels: EntityLabels;\n attributesLabels: AttributesLabels;\n style?: StyleProp<ViewStyle>;\n textColor?: string;\n testID?: string;\n role: ContextRole;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({\n did,\n entityLabels,\n attributesLabels,\n onCopyToClipboard,\n role,\n entityType,\n testID,\n ...props\n}) => {\n let { data } = useTrustEntity(did?.id);\n const trustEntity = data ?? undefined;\n\n const colorScheme = useAppColorScheme();\n\n const trusted = Boolean(\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role),\n );\n\n const trustEntityName = useMemo(() => {\n if (!trustEntity || !trusted) {\n return role === TrustEntityRoleEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier;\n }\n return trustEntity.name;\n }, [entityLabels, role, trustEntity, trusted]);\n\n const trustEntitySubline = useMemo(() => {\n if (!trusted) {\n return undefined;\n }\n\n return `${entityLabels.trusted} • ${trustEntity?.trustAnchor.name}`;\n }, [trustEntity, trusted, entityLabels.trusted]);\n\n const trustEntityStatusIcon = useMemo(() => {\n if (!trusted) {\n return undefined;\n }\n return <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />;\n }, [testID, trusted]);\n\n return (\n <View style={{ backgroundColor: colorScheme.nerdView.background }}>\n <EntityCluster\n avatar={{\n avatar: trusted && trustEntity?.logo ? { imageSource: { uri: trustEntity.logo } } : undefined,\n placeholderText: trustEntity?.name.substring(0, 1),\n statusIcon: trustEntityStatusIcon,\n testID: concatTestID(testID, 'avatar'),\n }}\n entityName={trustEntityName}\n subline={trustEntitySubline}\n sublineColor={trusted ? colorScheme.success : colorScheme.white}\n testID={testID}\n {...props}\n />\n {trusted && <EntityButtons entity={trustEntity} labels={entityLabels} testID={concatTestID(testID, 'links')} />}\n <EntityAttributes\n did={did?.did}\n trustEntity={trustEntity}\n trusted={trusted}\n labels={attributesLabels}\n onCopyToClipboard={onCopyToClipboard}\n entityType={entityType}\n />\n </View>\n );\n};\n\nexport default memo(EntityDetailsWithButtons);\n"],"mappings":";AAAA,SAAsBA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AACxG,OAAOC,KAAK,IAAQC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAChD,SAAoBC,IAAI,QAAmB,cAAc;AAEzD,OAAOC,aAAa,MAAM,2CAA2C;AACrE,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,cAAc,QAAQ,qCAAqC;AACpE,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,aAAa,MAAM,iBAAiB;AAgB3C,MAAMC,wBAA2D,GAAGA,CAAC;EACnEC,GAAG;EACHC,YAAY;EACZC,gBAAgB;EAChBC,iBAAiB;EACjBC,IAAI;EACJC,UAAU;EACVC,MAAM;EACN,GAAGC;AACL,CAAC,KAAK;EACJ,IAAI;IAAEC;EAAK,CAAC,GAAGZ,cAAc,CAACI,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAES,EAAE,CAAC;EACtC,MAAMC,WAAW,GAAGF,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4BAAehB,IAAI,CAACU,wBAAwB,CAAC","ignoreList":[]}
@@ -4,16 +4,15 @@ import EntityCluster from '../../ui-components/entity/entity-cluster';
4
4
  import { EntityTrustedIcon } from '../../ui-components/icons';
5
5
  import { concatTestID, replaceBreakingHyphens } from '../../utils';
6
6
  import { useTrustEntity } from '../../utils/hooks/core/trust-entity';
7
- const EntityDetails = _ref => {
7
+ const EntityDetails = ({
8
+ labels,
9
+ renderMore,
10
+ role,
11
+ style,
12
+ testID,
13
+ ...props
14
+ }) => {
8
15
  var _props$did;
9
- let {
10
- labels,
11
- renderMore,
12
- role,
13
- style,
14
- testID,
15
- ...props
16
- } = _ref;
17
16
  const {
18
17
  data
19
18
  } = useTrustEntity('did' in props ? (_props$did = props.did) === null || _props$did === void 0 ? void 0 : _props$did.id : undefined);
@@ -1 +1 @@
1
- {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","useMemo","EntityCluster","EntityTrustedIcon","concatTestID","replaceBreakingHyphens","useTrustEntity","EntityDetails","_ref","_props$did","labels","renderMore","role","style","testID","props","data","did","id","undefined","trustEntity","entity","trusted","state","ACTIVE","BOTH","trustEntityName","unknown","name","trustEntitySubline","_props$did2","trustEntityStatusIcon","createElement","Fragment","avatar","logo","imageSource","uri","placeholderText","substring","statusIcon","entityName","subline"],"sources":["entity-details.tsx"],"sourcesContent":["import { DidListItem, TrustEntity, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: TrustEntity) => ReactNode;\n role: Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n} & (\n | {\n did?: DidListItem;\n }\n | {\n entity: TrustEntity;\n }\n);\n\nconst EntityDetails: FC<EntityDetailsProps> = ({ labels, renderMore, role, style, testID, ...props }) => {\n const { data } = useTrustEntity('did' in props ? props.did?.id : undefined);\n const trustEntity: TrustEntity | undefined = 'entity' in props ? props.entity : data ?? undefined;\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role);\n\n const trustEntityName = useMemo(() => {\n if (!trusted) {\n return labels.unknown;\n }\n return trustEntity.name;\n }, [labels.unknown, trustEntity, trusted]);\n\n const trustEntitySubline = useMemo(() => {\n if (!trustEntity) {\n return 'did' in props ? (props.did?.did ? replaceBreakingHyphens(props.did.did) : undefined) : undefined;\n }\n if (!trusted) {\n return replaceBreakingHyphens(trustEntity.did.did);\n }\n return undefined;\n }, [props, trustEntity, trusted]);\n\n const trustEntityStatusIcon = useMemo(() => {\n if (!trusted) {\n return undefined;\n }\n return <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />;\n }, [testID, trusted]);\n\n return (\n <>\n <EntityCluster\n avatar={\n trustEntity\n ? {\n avatar: trusted && trustEntity.logo ? { imageSource: { uri: trustEntity.logo } } : undefined,\n placeholderText: trustEntity.name.substring(0, 1),\n statusIcon: trustEntityStatusIcon,\n testID: concatTestID(testID, 'avatar'),\n }\n : undefined\n }\n entityName={trustEntityName}\n style={style}\n subline={trustEntitySubline}\n testID={testID}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mappings":"AAAA,SAAmCA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AACrH,OAAOC,KAAK,IAAmBC,OAAO,QAAQ,OAAO;AAGrD,OAAOC,aAAa,MAAM,2CAA2C;A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Aeb,aAAa"}
1
+ {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","useMemo","EntityCluster","EntityTrustedIcon","concatTestID","replaceBreakingHyphens","useTrustEntity","EntityDetails","labels","renderMore","role","style","testID","props","_props$did","data","did","id","undefined","trustEntity","entity","trusted","state","ACTIVE","BOTH","trustEntityName","unknown","name","trustEntitySubline","_props$did2","trustEntityStatusIcon","createElement","Fragment","avatar","logo","imageSource","uri","placeholderText","substring","statusIcon","entityName","subline"],"sources":["entity-details.tsx"],"sourcesContent":["import { DidListItem, TrustEntity, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: TrustEntity) => ReactNode;\n role: Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n} & (\n | {\n did?: DidListItem;\n }\n | {\n entity: TrustEntity;\n }\n);\n\nconst EntityDetails: FC<EntityDetailsProps> = ({ labels, renderMore, role, style, testID, ...props }) => {\n const { data } = useTrustEntity('did' in props ? props.did?.id : undefined);\n const trustEntity: TrustEntity | undefined = 'entity' in props ? props.entity : data ?? undefined;\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role);\n\n const trustEntityName = useMemo(() => {\n if (!trusted) {\n return labels.unknown;\n }\n return trustEntity.name;\n }, [labels.unknown, trustEntity, trusted]);\n\n const trustEntitySubline = useMemo(() => {\n if (!trustEntity) {\n return 'did' in props ? (props.did?.did ? replaceBreakingHyphens(props.did.did) : undefined) : undefined;\n }\n if (!trusted) {\n return replaceBreakingHyphens(trustEntity.did.did);\n }\n return undefined;\n }, [props, trustEntity, trusted]);\n\n const trustEntityStatusIcon = useMemo(() => {\n if (!trusted) {\n return undefined;\n }\n return <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />;\n }, [testID, trusted]);\n\n return (\n <>\n <EntityCluster\n avatar={\n trustEntity\n ? {\n avatar: trusted && trustEntity.logo ? { imageSource: { uri: trustEntity.logo } } : undefined,\n placeholderText: trustEntity.name.substring(0, 1),\n statusIcon: trustEntityStatusIcon,\n testID: concatTestID(testID, 'avatar'),\n }\n : undefined\n }\n entityName={trustEntityName}\n style={style}\n subline={trustEntitySubline}\n testID={testID}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mappings":"AAAA,SAAmCA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AACrH,OAAOC,KAAK,IAAmBC,OAAO,QAAQ,OAAO;AAGrD,OAAOC,aAAa,MAAM,2CAA2C;AACrE,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,YAAY,EAAEC,sBAAsB,QAAQ,aAAa;AAClE,SAASC,cAAc,QAAQ,qCAAqC;AAqBpE,MAAMC,aAAqC,GAAGA,CAAC;EAAEC,MAAM;EAAEC,UAAU;EAAEC,IAAI;EAAEC,KAAK;EAAEC,MAAM;EAAE,GAAGC;AAAM,CAAC,KAAK;EAAA,IAAAC,UAAA;EACvG,MAAM;IAAEC;EAAK,CAAC,GAAGT,cAAc,CAAC,KAAK,IAAIO,KAAK,IAAAC,UAAA,GAAGD,KAAK,CAACG,GAAG,cAAAF,UAAA,uBAATA,UAAA,CAAWG,EAAE,GAAGC,SAAS,CAAC;EAC3E,MAAMC,WAAoC,GAAG,QAAQ,IAAIN,KAAK,GAAGA,KAAK,CAACO,MA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