@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,20 +1,20 @@
1
1
  import { initializeCore } from '@procivis/react-native-one-core';
2
2
  import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
3
3
  import { reportException } from '../../reporting';
4
- import { useCreateTrustAnchor } from './trust-entity';
4
+ import { getEnabledTrustManagement } from './core-config';
5
+ import { TrustManagementEnum, useCreateTrustAnchor } from './trust-entity';
5
6
  const defaultContextValue = {
6
7
  core: {},
7
8
  organisationId: '11111111-2222-3333-a444-ffffffffffff',
8
9
  initialize: () => Promise.reject()
9
10
  };
10
11
  const ONECoreContext = /*#__PURE__*/createContext(defaultContextValue);
11
- export const ONECoreContextProvider = _ref => {
12
- let {
13
- children,
14
- organisationId = '11111111-2222-3333-a444-ffffffffffff',
15
- publisherReference,
16
- config
17
- } = _ref;
12
+ export const ONECoreContextProvider = ({
13
+ children,
14
+ organisationId = '11111111-2222-3333-a444-ffffffffffff',
15
+ publisherReference,
16
+ config
17
+ }) => {
18
18
  const [core, setCore] = useState();
19
19
  const createTrustAnchor = useCreateTrustAnchor(publisherReference);
20
20
  const initialize = useCallback(async force => {
@@ -44,7 +44,12 @@ export const ONECoreContextProvider = _ref => {
44
44
  if (!core) {
45
45
  return;
46
46
  }
47
- createTrustAnchor(core).catch(() => {});
47
+ core.getConfig().then(coreConfig => {
48
+ const trustManagementEnabled = getEnabledTrustManagement(coreConfig).includes(TrustManagementEnum.SimpleTrustList);
49
+ if (trustManagementEnabled) {
50
+ createTrustAnchor(core).catch(() => {});
51
+ }
52
+ }).catch(() => {});
48
53
  }, [core, createTrustAnchor]);
49
54
  const contextValue = useMemo(() => ({
50
55
  core: core !== null && core !== void 0 ? core : defaultContextValue.core,
@@ -1 +1 @@
1
- {"version":3,"names":["initializeCore","React","createContext","useCallback","useContext","useEffect","useMemo","useState","reportException","useCreateTrustAnchor","defaultContextValue","core","organisationId","initialize","Promise","reject","ONECoreContext","ONECoreContextProvider","_ref","children","publisherReference","config","setCore","createTrustAnchor","force","coreInstance","e","corePromise","then","c","uninitialize","catch","contextValue","createElement","Provider","value","useONECore"],"sources":["core-context.tsx"],"sourcesContent":["import { initializeCore, ONECore } from '@procivis/react-native-one-core';\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useCreateTrustAnchor } from './trust-entity';\n\ninterface ContextValue {\n core: ONECore;\n organisationId: string;\n initialize: (force?: boolean) => Promise<ONECore>;\n}\n\nconst defaultContextValue: ContextValue = {\n core: {} as ONECore,\n organisationId: '11111111-2222-3333-a444-ffffffffffff',\n initialize: () => Promise.reject(),\n};\n\nexport type ONECoreContextProviderProps = {\n config?: Record<string, unknown>;\n organisationId?: string;\n publisherReference: string;\n};\n\nconst ONECoreContext = createContext<ContextValue>(defaultContextValue);\n\nexport const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProviderProps>> = ({\n children,\n organisationId = '11111111-2222-3333-a444-ffffffffffff',\n publisherReference,\n config,\n}) => {\n const [core, setCore] = useState<ONECore>();\n const createTrustAnchor = useCreateTrustAnchor(publisherReference);\n\n const initialize = useCallback(\n async (force?: boolean) => {\n if (core && !force) {\n return core;\n }\n\n try {\n const coreInstance = await initializeCore(config);\n setCore(coreInstance);\n return coreInstance;\n } catch (e) {\n reportException(e, 'Failed to initialize core');\n throw e;\n }\n },\n [core, config],\n );\n\n useEffect(\n () => {\n const corePromise = initialize();\n return () => {\n corePromise\n .then((c) => c?.uninitialize(false))\n .catch((e) => {\n reportException(e, 'Core uninitialization error');\n });\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n useEffect(() => {\n if (!core) {\n return;\n }\n createTrustAnchor(core).catch(() => {});\n }, [core, createTrustAnchor]);\n\n const contextValue = useMemo(\n () => ({\n core: core ?? defaultContextValue.core,\n organisationId,\n initialize,\n }),\n [core, initialize, organisationId],\n );\n\n if (!core) {\n return null;\n }\n\n return <ONECoreContext.Provider value={contextValue}>{children}</ONECoreContext.Provider>;\n};\n\nexport const useONECore = () => useContext(ONECoreContext);\n"],"mappings":"AAAA,SAASA,cAAc,QAAiB,iCAAiC;AACzE,OAAOC,KAAK,IACVC,aAAa,EAGbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,OAAO;AAEd,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,oBAAoB,QAAQ,gBAAgB;AAQrD,MAAMC,mBAAiC,GAAG;EACxCC,IAAI,EAAE,CAAC,CAAY;EACnBC,cAAc,EAAE,sCAAsC;EACtDC,UAAU,EAAEA,CAAA,KAAMC,OAAO,CAACC,MAAM;AAClC,CAAC;AAQD,MAAMC,cAAc,gBAAGd,aAAa,CAAeQ,mBAAmB,CAAC;AAEvE,OAAO,MAAMO,sBAA0E,GAAGC,IAAA,IAKpF;EAAA,IALqF;IACzFC,QAAQ;IACRP,cAAc,GAAG,sCAAsC;IACvDQ,kBAAkB;IAClBC;EACF,CAAC,GAAAH,IAAA;EACC,MAAM,CAACP,IAAI,EAAEW,OAAO,CAAC,GAAGf,QAAQ,EAAW;EAC3C,MAAMgB,iBAAiB,GAAGd,oBAAoB,CAACW,kBAAkB,CAAC;EAElE,MAAMP,UAAU,GAAGV,WAAW,CAC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QAAQ;IAACC,KAAK,EAAEH;EAAa,GAAEb,QAAQ,CAA2B;AAC3F,CAAC;AAED,OAAO,MAAMiB,UAAU,GAAGA,CAAA,KAAMhC,UAAU,CAACY,cAAc,CAAC"}
1
+ {"version":3,"names":["initializeCore","React","createContext","useCallback","useContext","useEffect","useMemo","useState","reportException","getEnabledTrustManagement","TrustManagementEnum","useCreateTrustAnchor","defaultContextValue","core","organisationId","initialize","Promise","reject","ONECoreContext","ONECoreContextProvider","children","publisherReference","config","setCore","createTrustAnchor","force","coreInstance","e","corePromise","then","c","uninitialize","catch","getConfig","coreConfig","trustManagementEnabled","includes","SimpleTrustList","contextValue","createElement","Provider","value","useONECore"],"sources":["core-context.tsx"],"sourcesContent":["import { initializeCore, ONECore } from '@procivis/react-native-one-core';\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { reportException } from '../../reporting';\nimport { getEnabledTrustManagement } from './core-config';\nimport { TrustManagementEnum, useCreateTrustAnchor } from './trust-entity';\n\ninterface ContextValue {\n core: ONECore;\n organisationId: string;\n initialize: (force?: boolean) => Promise<ONECore>;\n}\n\nconst defaultContextValue: ContextValue = {\n core: {} as ONECore,\n organisationId: '11111111-2222-3333-a444-ffffffffffff',\n initialize: () => Promise.reject(),\n};\n\nexport type ONECoreContextProviderProps = {\n config?: Record<string, unknown>;\n organisationId?: string;\n publisherReference: string;\n};\n\nconst ONECoreContext = createContext<ContextValue>(defaultContextValue);\n\nexport const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProviderProps>> = ({\n children,\n organisationId = '11111111-2222-3333-a444-ffffffffffff',\n publisherReference,\n config,\n}) => {\n const [core, setCore] = useState<ONECore>();\n const createTrustAnchor = useCreateTrustAnchor(publisherReference);\n\n const initialize = useCallback(\n async (force?: boolean) => {\n if (core && !force) {\n return core;\n }\n\n try {\n const coreInstance = await initializeCore(config);\n setCore(coreInstance);\n return coreInstance;\n } catch (e) {\n reportException(e, 'Failed to initialize core');\n throw e;\n }\n },\n [core, config],\n );\n\n useEffect(\n () => {\n const corePromise = initialize();\n return () => {\n corePromise\n .then((c) => c?.uninitialize(false))\n .catch((e) => {\n reportException(e, 'Core uninitialization error');\n });\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n useEffect(() => {\n if (!core) {\n return;\n }\n\n core\n .getConfig()\n .then((coreConfig) => {\n const trustManagementEnabled = getEnabledTrustManagement(coreConfig).includes(\n TrustManagementEnum.SimpleTrustList,\n );\n\n if (trustManagementEnabled) {\n createTrustAnchor(core).catch(() => {});\n }\n })\n .catch(() => {});\n }, [core, createTrustAnchor]);\n\n const contextValue = useMemo(\n () => ({\n core: core ?? defaultContextValue.core,\n organisationId,\n initialize,\n }),\n [core, initialize, organisationId],\n );\n\n if (!core) {\n return null;\n }\n\n return <ONECoreContext.Provider value={contextValue}>{children}</ONECoreContext.Provider>;\n};\n\nexport const useONECore = () => useContext(ONECoreContext);\n"],"mappings":"AAAA,SAASA,cAAc,QAAiB,iCAAiC;AACzE,OAAOC,KAAK,IACVC,aAAa,EAGbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,OAAO;AAEd,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,yBAAyB,QAAQ,eAAe;AACzD,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,gBAAgB;AAQ1E,MAAMC,mBAAiC,GAAG;EACxCC,IAAI,EAAE,CAAC,CAAY;EACnBC,cAAc,EAAE,sCAAsC;EACtDC,UAAU,EAAEA,CAAA,KAAMC,OAAO,CAACC,MAAM,CAAC;AACnC,CAAC;AAQD,MAAMC,cAAc,gBAAGhB,aAAa,CAAeU,mBAAmB,CAAC;AAEvE,OAAO,MAAMO,sBAA0E,GAAGA,CAAC;EACzFC,QAAQ;EACRN,cAAc,GAAG,sCAAsC;EACvDO,kBAAkB;EAClBC;AACF,CAAC,KAAK;E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C;MACzC;IACF,CAAC,CAAC,CACDA,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EACpB,CAAC,EAAE,CAACnB,IAAI,EAAEW,iBAAiB,CAAC,CAAC;EAE7B,MAAMc,YAAY,GAAGhC,OAAO,CAC1B,OAAO;IACLO,IAAI,EAAEA,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAID,mBAAmB,CAACC,IAAI;IACtCC,cAAc;IACdC;EACF,CAAC,CAAC,EACF,CAACF,IAAI,EAAEE,UAAU,EAAED,cAAc,CACnC,CAAC;EAED,IAAI,CAACD,IAAI,EAAE;IACT,OAAO,IAAI;EACb;EAEA,oBAAOZ,KAAA,CAAAsC,aAAA,CAACrB,cAAc,CAACsB,QAAQ;IAACC,KAAK,EAAEH;EAAa,GAAElB,QAAkC,CAAC;AAC3F,CAAC;AAED,OAAO,MAAMsB,UAAU,GAAGA,CAAA,KAAMtC,UAAU,CAACc,cAAc,CAAC","ignoreList":[]}
@@ -8,7 +8,7 @@ export const HW_DID_NAME_PREFIX = 'holder-did-hw-key';
8
8
  const generateHwDid = async (core, organisationId) => {
9
9
  const hwKeyId = await core.generateKey({
10
10
  keyParams: {},
11
- keyType: 'ES256',
11
+ keyType: 'ECDSA',
12
12
  name: 'holder-key-hw',
13
13
  organisationId,
14
14
  storageParams: {},
@@ -40,7 +40,7 @@ const generateHwDid = async (core, organisationId) => {
40
40
  const generateSwDid = async (core, organisationId) => {
41
41
  const swKeyId = await core.generateKey({
42
42
  keyParams: {},
43
- keyType: 'EDDSA',
43
+ keyType: 'ECDSA',
44
44
  name: 'holder-key-sw',
45
45
  organisationId,
46
46
  storageParams: {},
@@ -60,23 +60,31 @@ const generateSwDid = async (core, organisationId) => {
60
60
  params: {}
61
61
  });
62
62
  };
63
-
64
- // create base local identifiers in the wallet
65
- export const useInitializeONECoreIdentifiers = () => {
63
+ /**
64
+ * Create base local identifiers
65
+ * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be created
66
+ * @returns [hwDidId, swDidId]
67
+ */
68
+ export const useInitializeONECoreIdentifiers = ({
69
+ generateHwKey,
70
+ generateSwKey
71
+ }) => {
66
72
  const {
67
73
  core,
68
74
  organisationId
69
75
  } = useONECore();
70
76
  return useCallback(async () => {
71
- return await core.createOrganisation(organisationId).catch(e => {
77
+ return await core.createOrganisation({
78
+ id: organisationId
79
+ }).catch(e => {
72
80
  if (e instanceof OneError && e.code === OneErrorCode.OrganisationAlreadyExists) {
73
81
  return;
74
82
  }
75
83
  throw e;
76
- }).then(() => Promise.all([generateHwDid(core, organisationId), generateSwDid(core, organisationId)])).catch(err => {
84
+ }).then(() => Promise.all([generateHwKey ? generateHwDid(core, organisationId) : null, generateSwKey ? generateSwDid(core, organisationId) : null])).catch(err => {
77
85
  reportException(err, 'Failed to create base identifiers');
78
86
  throw err;
79
87
  });
80
- }, [core, organisationId]);
88
+ }, [core, organisationId, generateHwKey, generateSwKey]);
81
89
  };
82
90
  //# sourceMappingURL=core-init.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["OneError","useCallback","reportException","useONECore","OneErrorCode","SW_DID_NAME_PREFIX","HW_DID_NAME_PREFIX","generateHwDid","core","organisationId","hwKeyId","generateKey","keyParams","keyType","name","storageParams","storageType","catch","e","code","KeyStorageNotSupported","createDid","didMethod","keys","assertionMethod","authentication","capabilityDelegation","capabilityInvocation","keyAgreement","params","generateSwDid","swKeyId","useInitializeONECoreIdentifiers","createOrganisation","OrganisationAlreadyExists","then","Promise","all","err"],"sources":["core-init.ts"],"sourcesContent":["import { ONECore, OneError } from '@procivis/react-native-one-core';\nimport { useCallback } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useONECore } from './core-context';\nimport { OneErrorCode } from './error-code';\n\nexport const SW_DID_NAME_PREFIX = 'holder-did-sw-key';\nexport const HW_DID_NAME_PREFIX = 'holder-did-hw-key';\n\nconst generateHwDid = async (core: ONECore, organisationId: string) => {\n const hwKeyId = await core\n .generateKey({\n keyParams: {},\n keyType: 'ES256',\n name: 'holder-key-hw',\n organisationId,\n storageParams: {},\n storageType: 'SECURE_ELEMENT',\n })\n .catch((e) => {\n // ignore if HW keys not supported by device\n if (e instanceof OneError && e.code === OneErrorCode.KeyStorageNotSupported) {\n return null;\n }\n throw e;\n });\n\n if (hwKeyId) {\n return core.createDid({\n didMethod: 'KEY',\n keys: {\n assertionMethod: [hwKeyId],\n authentication: [hwKeyId],\n capabilityDelegation: [hwKeyId],\n capabilityInvocation: [hwKeyId],\n keyAgreement: [hwKeyId],\n },\n name: HW_DID_NAME_PREFIX,\n organisationId,\n params: {},\n });\n }\n\n return null;\n};\n\nconst generateSwDid = async (core: ONECore, organisationId: string) => {\n const swKeyId = await core.generateKey({\n keyParams: {},\n keyType: 'EDDSA',\n name: 'holder-key-sw',\n organisationId,\n storageParams: {},\n storageType: 'INTERNAL',\n });\n\n return core.createDid({\n didMethod: 'KEY',\n keys: {\n assertionMethod: [swKeyId],\n authentication: [swKeyId],\n capabilityDelegation: [swKeyId],\n capabilityInvocation: [swKeyId],\n keyAgreement: [swKeyId],\n },\n name: SW_DID_NAME_PREFIX,\n organisationId,\n params: {},\n });\n};\n\n// create base local identifiers in the wallet\nexport const useInitializeONECoreIdentifiers = () => {\n const { core, organisationId } = useONECore();\n\n return useCallback(async () => {\n return await core\n .createOrganisation(organisationId)\n .catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OrganisationAlreadyExists) {\n return;\n }\n throw e;\n })\n .then(() => Promise.all([generateHwDid(core, organisationId), generateSwDid(core, organisationId)]))\n .catch((err) => {\n reportException(err, 'Failed to create base identifiers');\n throw err;\n });\n }, [core, organisationId]);\n};\n"],"mappings":"AAAA,SAAkBA,QAAQ,QAAQ,iCAAiC;AACnE,SAASC,WAAW,QAAQ,OAAO;AAEnC,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,kBAAkB,GAAG,mBAAmB;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EAEF,OAAOR,IAAI,CAACa,SAAS,CAAC;IACpBC,SAAS,EAAE,KAAK;IAChBC,IAAI,EAAE;MACJC,eAAe,EAAE,CAACO,OAAO,CAAC;MAC1BN,cAAc,EAAE,CAACM,OAAO,CAAC;MACzBL,oBAAoB,EAAE,CAACK,OAAO,CAAC;MAC/BJ,oBAAoB,EAAE,CAACI,OAAO,CAAC;MAC/BH,YAAY,EAAE,CAACG,OAAO;IACxB,CAAC;IACDjB,IAAI,EAAET,kBAAkB;IACxBI,cAAc;IACdoB,MAAM,EAAE,CAAC;EACX,CAAC,CAAC;AACJ,CAAC;;AAED;AACA,OAAO,MAAMG,+BAA+B,GAAGA,CAAA,KAAM;EACnD,MAAM;IAAExB,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,EAAE;EAE7C,OAAOF,WAAW,CAAC,YAAY;IAC7B,OAAO,MAAMO,IAAI,CACdyB,kBAAkB,CAACxB,cAAc,CAAC,CAClCQ,KAAK,CAAEC,CAAC,IAAK;MACZ,IAAIA,CAAC,YAAYlB,QAAQ,IAAIkB,CAAC,CAACC,IAAI,KAAKf,YAAY,CAAC8B,yBAAyB,EAAE;QAC9E;MACF;MACA,MAAMhB,CAAC;IACT,CAAC,CAAC,CACDiB,IAAI,CAAC,MAAMC,OAAO,CAACC,GAAG,CAAC,CAAC9B,aAAa,CAACC,IAAI,EAAEC,cAAc,CAAC,EAAEqB,aAAa,CAACtB,IAAI,EAAEC,cAAc,CAAC,CAAC,CAAC,CAAC,CACnGQ,KAAK,CAAEqB,GAAG,IAAK;MACdpC,eAAe,CAACoC,GAAG,EAAE,mCAAmC,CAAC;MACzD,MAAMA,GAAG;IACX,CAAC,CAAC;EACN,CAAC,EAAE,CAAC9B,IAAI,EAAEC,cAAc,CAAC,CAAC;AAC5B,CAAC"}
1
+ {"version":3,"names":["OneError","useCallback","reportException","useONECore","OneErrorCode","SW_DID_NAME_PREFIX","HW_DID_NAME_PREFIX","generateHwDid","core","organisationId","hwKeyId","generateKey","keyParams","keyType","name","storageParams","storageType","catch","e","code","KeyStorageNotSupported","createDid","didMethod","keys","assertionMethod","authentication","capabilityDelegation","capabilityInvocation","keyAgreement","params","generateSwDid","swKeyId","useInitializeONECoreIdentifiers","generateHwKey","generateSwKey","createOrganisation","id","OrganisationAlreadyExists","then","Promise","all","err"],"sources":["core-init.ts"],"sourcesContent":["import { ONECore, OneError } from '@procivis/react-native-one-core';\nimport { useCallback } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useONECore } from './core-context';\nimport { OneErrorCode } from './error-code';\n\nexport const SW_DID_NAME_PREFIX = 'holder-did-sw-key';\nexport const HW_DID_NAME_PREFIX = 'holder-did-hw-key';\n\nconst generateHwDid = async (core: ONECore, organisationId: string) => {\n const hwKeyId = await core\n .generateKey({\n keyParams: {},\n keyType: 'ECDSA',\n name: 'holder-key-hw',\n organisationId,\n storageParams: {},\n storageType: 'SECURE_ELEMENT',\n })\n .catch((e) => {\n // ignore if HW keys not supported by device\n if (e instanceof OneError && e.code === OneErrorCode.KeyStorageNotSupported) {\n return null;\n }\n throw e;\n });\n\n if (hwKeyId) {\n return core.createDid({\n didMethod: 'KEY',\n keys: {\n assertionMethod: [hwKeyId],\n authentication: [hwKeyId],\n capabilityDelegation: [hwKeyId],\n capabilityInvocation: [hwKeyId],\n keyAgreement: [hwKeyId],\n },\n name: HW_DID_NAME_PREFIX,\n organisationId,\n params: {},\n });\n }\n\n return null;\n};\n\nconst generateSwDid = async (core: ONECore, organisationId: string) => {\n const swKeyId = await core.generateKey({\n keyParams: {},\n keyType: 'ECDSA',\n name: 'holder-key-sw',\n organisationId,\n storageParams: {},\n storageType: 'INTERNAL',\n });\n\n return core.createDid({\n didMethod: 'KEY',\n keys: {\n assertionMethod: [swKeyId],\n authentication: [swKeyId],\n capabilityDelegation: [swKeyId],\n capabilityInvocation: [swKeyId],\n keyAgreement: [swKeyId],\n },\n name: SW_DID_NAME_PREFIX,\n organisationId,\n params: {},\n });\n};\n\nexport interface IdentifiersInitializationConfig {\n generateHwKey: boolean;\n generateSwKey: boolean;\n}\n\n/**\n * Create base local identifiers\n * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be created\n * @returns [hwDidId, swDidId]\n */\nexport const useInitializeONECoreIdentifiers = ({ generateHwKey, generateSwKey }: IdentifiersInitializationConfig) => {\n const { core, organisationId } = useONECore();\n\n return useCallback(async () => {\n return await core\n .createOrganisation({ id: organisationId })\n .catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OrganisationAlreadyExists) {\n return;\n }\n throw e;\n })\n .then(() =>\n Promise.all([\n generateHwKey ? generateHwDid(core, organisationId) : null,\n generateSwKey ? generateSwDid(core, organisationId) : null,\n ]),\n )\n .catch((err) => {\n reportException(err, 'Failed to create base identifiers');\n throw err;\n });\n }, [core, organisationId, generateHwKey, generateSwKey]);\n};\n"],"mappings":"AAAA,SAAkBA,QAAQ,QAAQ,iCAAiC;AACnE,SAASC,WAAW,QAAQ,OAAO;AAEnC,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,kBAAkB,GAAG,mBAAmB;AACrD,OAAO,MAAMC,kBAAkB,GAAG,mBAAmB;AAErD,MAAMC,aAAa,GAAG,MAAAA,CAAOC,IAAa,EAAEC,cAAsB,KAAK;EACrE,MAAMC,OAAO,GAAG,MAAMF,IAAI,CACvBG,WAAW,CAAC;IACXC,SAAS,EAAE,CAAC,CAAC;IACbC,OAAO,EAAE,OAAO;IAChBC,IAAI,EAAE,eAAe;IACrBL,cAAc;IACdM,aAAa,EAAE,CAAC,CAAC;IACjBC,WAAW,EAAE;EACf,CAAC,CAAC,CACDC,KAAK,CAAEC,CAAC,IAAK;IACZ;IACA,IAAIA,CAAC,YAAYlB,QAAQ,IAAIkB,CAAC,CAACC,IAAI,KAAKf,YAAY,CAACgB,sBAAsB,EAAE;MAC3E,OAAO,IAAI;IACb;IACA,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H,MAAM;IAAE1B,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,CAAC,CAAC;EAE7C,OAAOF,WAAW,CAAC,YAAY;IAC7B,OAAO,MAAMO,IAAI,CACd2B,kBAAkB,CAAC;MAAEC,EAAE,EAAE3B;IAAe,CAAC,CAAC,CAC1CQ,KAAK,CAAEC,CAAC,IAAK;MACZ,IAAIA,CAAC,YAAYlB,QAAQ,IAAIkB,CAAC,CAACC,IAAI,KAAKf,YAAY,CAACiC,yBAAyB,EAAE;QAC9E;MACF;MACA,MAAMnB,CAAC;IACT,CAAC,CAAC,CACDoB,IAAI,CAAC,MACJC,OAAO,CAACC,GAAG,CAAC,CACVP,aAAa,GAAG1B,aAAa,CAACC,IAAI,EAAEC,cAAc,CAAC,GAAG,IAAI,EAC1DyB,aAAa,GAAGJ,aAAa,CAACtB,IAAI,EAAEC,cAAc,CAAC,GAAG,IAAI,CAC3D,CACH,CAAC,CACAQ,KAAK,CAAEwB,GAAG,IAAK;MACdvC,eAAe,CAACuC,GAAG,EAAE,mCAAmC,CAAC;MACzD,MAAMA,GAAG;IACX,CAAC,CAAC;EACN,CAAC,EAAE,CAACjC,IAAI,EAAEC,cAAc,EAAEwB,aAAa,EAAEC,aAAa,CAAC,CAAC;AAC1D,CAAC","ignoreList":[]}
@@ -13,22 +13,16 @@ export const useCredentialSchemas = queryParams => {
13
13
  core,
14
14
  organisationId
15
15
  } = useONECore();
16
- return useInfiniteQuery([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)], _ref => {
17
- let {
18
- pageParam = 0
19
- } = _ref;
20
- return core.getCredentialSchemas({
21
- organisationId,
22
- page: pageParam,
23
- pageSize: PAGE_SIZE,
24
- ...queryParams
25
- }).then(_ref2 => {
26
- let {
27
- values
28
- } = _ref2;
29
- return values;
30
- });
31
- }, {
16
+ return useInfiniteQuery([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)], ({
17
+ pageParam = 0
18
+ }) => core.getCredentialSchemas({
19
+ organisationId,
20
+ page: pageParam,
21
+ pageSize: PAGE_SIZE,
22
+ ...queryParams
23
+ }).then(({
24
+ values
25
+ }) => values), {
32
26
  getNextPageParam: (lastPage, allPages) => lastPage.length === PAGE_SIZE ? allPages.length : undefined,
33
27
  keepPreviousData: true
34
28
  });
@@ -60,8 +54,7 @@ export const useCredentialSchemaAccept = () => {
60
54
  }
61
55
  });
62
56
  };
63
- export const useCredentialSchemaDetail = function (credentialId) {
64
- let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
57
+ export const useCredentialSchemaDetail = (credentialId, active = true) => {
65
58
  const {
66
59
  core
67
60
  } = useONECore();
@@ -78,7 +71,7 @@ export const useCredentialSchemaDelete = () => {
78
71
  return useMutation(async credentialSchemaId => core.deleteCredentialSchema(credentialSchemaId), {
79
72
  onSuccess: async (_, credentialId) => {
80
73
  await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
81
- await queryClient.invalidateQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);
74
+ await queryClient.removeQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);
82
75
  await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
83
76
  }
84
77
  });
@@ -1 +1 @@
1
- {"version":3,"names":["useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialSchemaListQueryParams","useHTTPClient","useONECore","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","_ref","pageParam","getCredentialSchemas","page","pageSize","then","_ref2","values","getNextPageParam","lastPage","allPages","length","undefined","keepPreviousData","useCredentialSchemaPreview","url","httpClient","get","response","ok","originalError","data","useCredentialSchemaAccept","queryClient","schema","importCredentialSchema","onSuccess","invalidateQueries","useCredentialSchemaDetail","credentialId","active","arguments","getCredentialSchema","enabled","Boolean","useCredentialSchemaDelete","credentialSchemaId","deleteCredentialSchema","_","useShareCredentialSchema","schemaId","shareCredentialSchema","Promise","reject"],"sources":["credential-schemas.ts"],"sourcesContent":["import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 10;\nexport const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';\nexport const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';\nexport const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';\nexport const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';\n\nexport const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],\n ({ pageParam = 0 }) =>\n core\n .getCredentialSchemas({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n })\n .then(({ values }) => values),\n {\n getNextPageParam: (lastPage, allPages) => (lastPage.length === PAGE_SIZE ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaPreview = (url: string) => {\n const httpClient = useHTTPClient();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY, url],\n () =>\n httpClient.get(url).then((response) => {\n if (!response.ok) {\n throw response.originalError;\n }\n return response.data as ImportCredentialSchemaRequestSchema;\n }),\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaAccept = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async (schema: ImportCredentialSchemaRequestSchema) =>\n core.importCredentialSchema({\n organisationId,\n schema,\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialSchemaDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredentialSchema(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialSchemaId: string) => core.deleteCredentialSchema(credentialSchemaId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useShareCredentialSchema = (schemaId?: string) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_SHARE_QUERY_KEY, schemaId],\n () => (schemaId ? core.shareCredentialSchema(schemaId) : Promise.reject()),\n {\n enabled: Boolean(schemaId),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,8CAA8C,QAAQ,qBAAqB;AACpF,SAASC,aAAa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,EAAE;EAE7B,OAAOL,WAAW,CAAC,MAAOoD,kBAA0B,IAAKtC,IAAI,CAACuC,sBAAsB,CAACD,kBAAkB,CAAC,EAAE;IACxGV,SAAS,EAAE,MAAAA,CAAOY,CAAC,EAAET,YAAY,KAAK;MACpC,MAAMN,WAAW,CAACI,iBAAiB,CAACnC,gCAAgC,CAAC;MACrE,MAAM+B,WAAW,CAACI,iBAAiB,CAAC,CAAClC,kCAAkC,EAAEoC,YAAY,CAAC,CAAC;MACvF,MAAMN,WAAW,CAACI,iBAAiB,CAACrC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMiD,wBAAwB,GAAIC,QAAiB,IAAK;EAC7D,MAAM;IAAE1C;EAAK,CAAC,GAAGT,UAAU,EAAE;EAE7B,OAAOJ,QAAQ,CACb,CAACU,iCAAiC,EAAE6C,QAAQ,CAAC,EAC7C,MAAOA,QAAQ,GAAG1C,IAAI,CAAC2C,qBAAqB,CAACD,QAAQ,CAAC,GAAGE,OAAO,CAACC,MAAM,EAAG,EAC1E;IACEV,OAAO,EAAEC,OAAO,CAACM,QAAQ,CAAC;IAC1B3B,gBAAgB,EAAE;EACpB,CAAC,CACF;AACH,CAAC"}
1
+ {"version":3,"names":["useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialSchemaListQueryParams","useHTTPClient","useONECore","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","pageParam","getCredentialSchemas","page","pageSize","then","values","getNextPageParam","lastPage","allPages","length","undefined","keepPreviousData","useCredentialSchemaPreview","url","httpClient","get","response","ok","originalError","data","useCredentialSchemaAccept","queryClient","schema","importCredentialSchema","onSuccess","invalidateQueries","useCredentialSchemaDetail","credentialId","active","getCredentialSchema","enabled","Boolean","useCredentialSchemaDelete","credentialSchemaId","deleteCredentialSchema","_","removeQueries","useShareCredentialSchema","schemaId","shareCredentialSchema","Promise","reject"],"sources":["credential-schemas.ts"],"sourcesContent":["import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 10;\nexport const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';\nexport const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';\nexport const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';\nexport const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';\n\nexport const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],\n ({ pageParam = 0 }) =>\n core\n .getCredentialSchemas({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n })\n .then(({ values }) => values),\n {\n getNextPageParam: (lastPage, allPages) => (lastPage.length === PAGE_SIZE ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaPreview = (url: string) => {\n const httpClient = useHTTPClient();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY, url],\n () =>\n httpClient.get(url).then((response) => {\n if (!response.ok) {\n throw response.originalError;\n }\n return response.data as ImportCredentialSchemaRequestSchema;\n }),\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaAccept = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async (schema: ImportCredentialSchemaRequestSchema) =>\n core.importCredentialSchema({\n organisationId,\n schema,\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialSchemaDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredentialSchema(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialSchemaId: string) => core.deleteCredentialSchema(credentialSchemaId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.removeQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useShareCredentialSchema = (schemaId?: string) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_SHARE_QUERY_KEY, schemaId],\n () => (schemaId ? core.shareCredentialSchema(schemaId) : Promise.reject()),\n {\n enabled: Boolean(schemaId),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,8CAA8C,QAAQ,qBAAqB;AACpF,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,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AC;MACrE,MAAM6B,WAAW,CAACe,aAAa,CAAC,CAAC3C,kCAAkC,EAAEkC,YAAY,CAAC,CAAC;MACnF,MAAMN,WAAW,CAACI,iBAAiB,CAACnC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM+C,wBAAwB,GAAIC,QAAiB,IAAK;EAC7D,MAAM;IAAExC;EAAK,CAAC,GAAGT,UAAU,CAAC,CAAC;EAE7B,OAAOJ,QAAQ,CACb,CAACU,iCAAiC,EAAE2C,QAAQ,CAAC,EAC7C,MAAOA,QAAQ,GAAGxC,IAAI,CAACyC,qBAAqB,CAACD,QAAQ,CAAC,GAAGE,OAAO,CAACC,MAAM,CAAC,CAAE,EAC1E;IACEX,OAAO,EAAEC,OAAO,CAACO,QAAQ,CAAC;IAC1B3B,gBAAgB,EAAE;EACpB,CACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -6,9 +6,9 @@ import { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';
6
6
  import { OneErrorCode } from './error-code';
7
7
  import { HISTORY_LIST_QUERY_KEY } from './history';
8
8
  const PAGE_SIZE = 20;
9
- const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
10
- const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
11
- const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
9
+ export const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
10
+ export const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
11
+ export const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
12
12
  export const useCredentials = queryParams => {
13
13
  const {
14
14
  core,
@@ -35,24 +35,20 @@ export const usePagedCredentials = queryParams => {
35
35
  core,
36
36
  organisationId
37
37
  } = useONECore();
38
- return useInfiniteQuery([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)], _ref => {
39
- let {
40
- pageParam = 0
41
- } = _ref;
42
- return core.getCredentials({
43
- organisationId,
44
- page: pageParam,
45
- pageSize: PAGE_SIZE,
46
- status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
47
- ...queryParams
48
- });
49
- }, {
38
+ return useInfiniteQuery([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)], ({
39
+ pageParam = 0
40
+ }) => core.getCredentials({
41
+ organisationId,
42
+ page: pageParam,
43
+ pageSize: PAGE_SIZE,
44
+ status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
45
+ ...queryParams
46
+ }), {
50
47
  getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
51
48
  keepPreviousData: true
52
49
  });
53
50
  };
54
- export const useCredentialDetail = function (credentialId) {
55
- let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
51
+ export const useCredentialDetail = (credentialId, active = true) => {
56
52
  const {
57
53
  core
58
54
  } = useONECore();
@@ -67,13 +63,10 @@ export const useInvitationHandler = () => {
67
63
  core,
68
64
  organisationId
69
65
  } = useONECore();
70
- return useMutation(async _ref2 => {
71
- let {
72
- invitationUrl,
73
- transport
74
- } = _ref2;
75
- return core.handleInvitation(invitationUrl, organisationId, [transport]);
76
- }, {
66
+ return useMutation(async ({
67
+ invitationUrl,
68
+ transport
69
+ }) => core.handleInvitation(invitationUrl, organisationId, [transport]), {
77
70
  onSuccess: async result => {
78
71
  if ('credentialIds' in result) {
79
72
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
@@ -88,15 +81,12 @@ export const useCredentialAccept = () => {
88
81
  const {
89
82
  core
90
83
  } = useONECore();
91
- return useMutation(async _ref3 => {
92
- let {
93
- interactionId,
94
- didId,
95
- keyId,
96
- txCode
97
- } = _ref3;
98
- return core.holderAcceptCredential(interactionId, didId, keyId, txCode);
99
- }, {
84
+ return useMutation(async ({
85
+ interactionId,
86
+ didId,
87
+ keyId,
88
+ txCode
89
+ }) => core.holderAcceptCredential(interactionId, didId, keyId, txCode), {
100
90
  onSuccess: async () => {
101
91
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
102
92
  await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
@@ -122,12 +112,12 @@ export const useCredentialReject = () => {
122
112
  }
123
113
  });
124
114
  };
125
- export const useCredentialRevocationCheck = bypassCache => {
115
+ export const useCredentialRevocationCheck = forceRefresh => {
126
116
  const queryClient = useQueryClient();
127
117
  const {
128
118
  core
129
119
  } = useONECore();
130
- return useMutation(async credentialIds => core.checkRevocation(credentialIds, bypassCache), {
120
+ return useMutation(async credentialIds => core.checkRevocation(credentialIds, forceRefresh), {
131
121
  onSuccess: async () => {
132
122
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
133
123
  await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
@@ -143,7 +133,7 @@ export const useCredentialDelete = () => {
143
133
  return useMutation(async credentialId => core.deleteCredential(credentialId), {
144
134
  onSuccess: async (_, credentialId) => {
145
135
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
146
- await queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
136
+ await queryClient.removeQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
147
137
  await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
148
138
  }
149
139
  });
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialStateEnum","OneError","useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialListQueryParams","useONECore","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","OneErrorCode","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","values","getCredentials","page","pageSize","status","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","usePagedCredentials","_ref","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","arguments","getCredential","enabled","Boolean","useInvitationHandler","queryClient","_ref2","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","useCredentialAccept","_ref3","interactionId","didId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","code","OperationNotSupported","useCredentialRevocationCheck","bypassCache","credentialIds","checkRevocation","useCredentialDelete","deleteCredential","_","useInvalidateCredentialDetails"],"sources":["credentials.ts"],"sourcesContent":["import {\n BypassCache,\n CredentialListQuery,\n CredentialStateEnum,\n InvitationResult,\n OneError,\n} from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 20;\nconst CREDENTIAL_LIST_QUERY_KEY = 'credential-list';\nconst CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';\nconst CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';\n\nexport const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],\n async () => {\n const { values } = await core.getCredentials({\n organisationId,\n page: 0,\n // TODO: workaround pagination for now, until it's supported by UI\n pageSize: 10000,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n });\n return values;\n },\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [\n CREDENTIAL_LIST_QUERY_KEY,\n CREDENTIAL_LIST_PAGED_QUERY_KEY,\n ...getQueryKeyFromCredentialListQueryParams(queryParams),\n ],\n ({ pageParam = 0 }) =>\n core.getCredentials({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n }),\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredential(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useInvitationHandler = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ invitationUrl, transport }: { invitationUrl: string; transport: 'HTTP' | 'MQTT' | 'BLE' }) =>\n core.handleInvitation(invitationUrl, organisationId, [transport]),\n {\n onSuccess: async (result: InvitationResult) => {\n if ('credentialIds' in result) {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n }\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n type CredentialAcceptHookParams = { didId: string; interactionId: string; keyId?: string; txCode?: string };\n\n return useMutation(\n async ({ interactionId, didId, keyId, txCode }: CredentialAcceptHookParams) =>\n core.holderAcceptCredential(interactionId, didId, keyId, txCode),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectCredential(interactionId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialRevocationCheck = (bypassCache?: BypassCache[]) => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialIds: string[]) => core.checkRevocation(credentialIds, bypassCache), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useCredentialDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialId: string) => core.deleteCredential(credentialId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useInvalidateCredentialDetails = () => {\n const queryClient = useQueryClient();\n\n return (credentialId: string | undefined) =>\n queryClient.invalidateQueries([CREDENTIAL_DETAIL_QU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AAC,EAAElC,YAAY,KAAK;MACpC,MAAMO,WAAW,CAACO,iBAAiB,CAACxC,yBAAyB,CAAC;MAC9D,MAAMiC,WAAW,CAACO,iBAAiB,CAAC,CAACtC,2BAA2B,EAAEwB,YAAY,CAAC,CAAC;MAChF,MAAMO,WAAW,CAACO,iBAAiB,CAAC1C,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM+D,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAM5B,WAAW,GAAGxC,cAAc,EAAE;EAEpC,OAAQiC,YAAgC,IACtCO,WAAW,CAACO,iBAAiB,CAAC,CAACtC,2BAA2B,EAAEwB,YAAY,CAAC,CAAC;AAC9E,CAAC"}
1
+ {"version":3,"names":["CredentialStateEnum","OneError","useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialListQueryParams","useONECore","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","OneErrorCode","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","values","getCredentials","page","pageSize","status","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","usePagedCredentials","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","getCredential","enabled","Boolean","useInvitationHandler","queryClient","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","useCredentialAccept","interactionId","didId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","code","OperationNotSupported","useCredentialRevocationCheck","forceRefresh","credentialIds","checkRevocation","useCredentialDelete","deleteCredential","_","removeQueries","useInvalidateCredentialDetails"],"sources":["credentials.ts"],"sourcesContent":["import { CredentialListQuery, CredentialStateEnum, InvitationResult, OneError } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialListQueryParams } from '../../parsers/query';\nimport { Transport } from '../connectivity/connectivity';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 20;\nexport const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';\nexport const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';\nexport const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';\n\nexport const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],\n async () => {\n const { values } = await core.getCredentials({\n organisationId,\n page: 0,\n // TODO: workaround pagination for now, until it's supported by UI\n pageSize: 10000,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n });\n return values;\n },\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [\n CREDENTIAL_LIST_QUERY_KEY,\n CREDENTIAL_LIST_PAGED_QUERY_KEY,\n ...getQueryKeyFromCredentialListQueryParams(queryParams),\n ],\n ({ pageParam = 0 }) =>\n core.getCredentials({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n }),\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredential(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useInvitationHandler = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ invitationUrl, transport }: { invitationUrl: string; transport: Transport }) =>\n core.handleInvitation(invitationUrl, organisationId, [transport]),\n {\n onSuccess: async (result: InvitationResult) => {\n if ('credentialIds' in result) {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n }\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n type CredentialAcceptHookParams = { didId: string; interactionId: string; keyId?: string; txCode?: string };\n\n return useMutation(\n async ({ interactionId, didId, keyId, txCode }: CredentialAcceptHookParams) =>\n core.holderAcceptCredential(interactionId, didId, keyId, txCode),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectCredential(interactionId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialRevocationCheck = (forceRefresh: boolean) => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialIds: string[]) => core.checkRevocation(credentialIds, forceRefresh), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useCredentialDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialId: string) => core.deleteCredential(credentialId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.removeQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useInvalidateCredentialDetails = () => {\n const queryClient = useQueryClient();\n\n return (credentialId: string | undefined) =>\n queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n};\n"],"mappings":"AAAA,SAA8BA,mBAAmB,EAAoBC,QAAQ,QAAQ,iCAAiC;AACtH,SAASC,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,wCAAwC,QAAQ,qBAAqB;AAE9E,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,gCAAgC,QAAQ,sBAAsB;AACvE,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,yBAAyB,GAAG,iBAAiB;AAC1D,OAAO,MAAMC,+BAA+B,GAAG,uBAAuB;AACtE,OAAO,MAAMC,2BAA2B,GAAG,mBAAmB;AAE9D,OAAO,MAAMC,cAAc,GAAIC,WAA0C,IAAK;EAC5E,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGX,UAAU,CAAC,CAAC;E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MAAAA,CAAA,KAAY;MACrB,MAAMJ,WAAW,CAACM,iBAAiB,CAACrC,yBAAyB,CAAC;MAC9D,MAAM+B,WAAW,CAACM,iBAAiB,CAACnC,2BAA2B,CAAC;MAChE,MAAM6B,WAAW,CAACM,iBAAiB,CAACvC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMwD,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMvB,WAAW,GAAGtC,cAAc,CAAC,CAAC;EACpC,MAAM;IAAEY;EAAK,CAAC,GAAGV,UAAU,CAAC,CAAC;EAE7B,OAAOJ,WAAW,CAAC,MAAOkC,YAAoB,IAAKpB,IAAI,CAACkD,gBAAgB,CAAC9B,YAAY,CAAC,EAAE;IACtFU,SAAS,EAAE,MAAAA,CAAOqB,CAAC,EAAE/B,YAAY,KAAK;MACpC,MAAMM,WAAW,CAACM,iBAAiB,CAACrC,yBAAyB,CAAC;MAC9D,MAAM+B,WAAW,CAAC0B,aAAa,CAAC,CAACvD,2BAA2B,EAAEuB,YAAY,CAAC,CAAC;MAC5E,MAAMM,WAAW,CAACM,iBAAiB,CAACvC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM4D,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAM3B,WAAW,GAAGtC,cAAc,CAAC,CAAC;EAEpC,OAAQgC,YAAgC,IACtCM,WAAW,CAACM,iBAAiB,CAAC,CAACnC,2BAA2B,EAAEuB,YAAY,CAAC,CAAC;AAC9E,CAAC","ignoreList":[]}
@@ -9,10 +9,9 @@ export const useDids = queryParams => {
9
9
  core,
10
10
  organisationId
11
11
  } = useONECore();
12
- return useQuery([DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)], async _ref => {
13
- let {
14
- pageParam = 0
15
- } = _ref;
12
+ return useQuery([DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)], async ({
13
+ pageParam = 0
14
+ }) => {
16
15
  const dids = await core.getDids({
17
16
  deactivated: false,
18
17
  organisationId,
@@ -1 +1 @@
1
- {"version":3,"names":["DidTypeEnum","useQuery","getQueryKeyFromDidListQueryParams","useONECore","PAGE_SIZE","DID_LIST_QUERY_KEY","useDids","queryParams","core","organisationId","_ref","pageParam","dids","getDids","deactivated","page","pageSize","type","LOCAL"],"sources":["dids.ts"],"sourcesContent":["import { DidListQuery, DidTypeEnum } from '@procivis/react-native-one-core';\nimport { useQuery } from 'react-query';\n\nimport { getQueryKeyFromDidListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nconst PAGE_SIZE = 20;\nexport const DID_LIST_QUERY_KEY = 'did-list';\n\nexport const useDids = (queryParams?: Partial<DidListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const dids = await core.getDids({\n deactivated: false,\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n type: DidTypeEnum.LOCAL,\n ...queryParams,\n });\n\n return dids;\n },\n );\n};\n"],"mappings":"AAAA,SAAuBA,WAAW,QAAQ,iCAAiC;AAC3E,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,iCAAiC,QAAQ,qBAAqB;AACvE,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,kBAAkB,GAAG,UAAU;AAE5C,OAAO,MAAMC,OAAO,GAAIC,WAAmC,IAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,EAAE;EAE7C,OAAOF,QAAQ,CACb,CAACI,kBAAkB,EAAE,GAAGH,iCAAiC,CAACK,WAAW,CAAC,CAAC,EACvE,MAAAG,IAAA,IAA6B;IAAA,IAAtB;MAAEC,SAAS,GAAG;IAAE,CAAC,GAAAD,IAAA;IACtB,MAAME,IAAI,GAAG,MAAMJ,IAAI,CAACK,OAAO,CAAC;MAC9BC,WAAW,EAAE,KAAK;MAClBL,cAAc;MACdM,IAAI,EAAEJ,SAAS;MACfK,QAAQ,EAAEZ,SAAS;MACnBa,IAAI,EAAEjB,WAAW,CAACkB,KAAK;MACvB,GAAGX;IACL,CAAC,CAAC;IAEF,OAAOK,IAAI;EACb,CAAC,CACF;AACH,CAAC"}
1
+ {"version":3,"names":["DidTypeEnum","useQuery","getQueryKeyFromDidListQueryParams","useONECore","PAGE_SIZE","DID_LIST_QUERY_KEY","useDids","queryParams","core","organisationId","pageParam","dids","getDids","deactivated","page","pageSize","type","LOCAL"],"sources":["dids.ts"],"sourcesContent":["import { DidListQuery, DidTypeEnum } from '@procivis/react-native-one-core';\nimport { useQuery } from 'react-query';\n\nimport { getQueryKeyFromDidListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nconst PAGE_SIZE = 20;\nexport const DID_LIST_QUERY_KEY = 'did-list';\n\nexport const useDids = (queryParams?: Partial<DidListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const dids = await core.getDids({\n deactivated: false,\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n type: DidTypeEnum.LOCAL,\n ...queryParams,\n });\n\n return dids;\n },\n );\n};\n"],"mappings":"AAAA,SAAuBA,WAAW,QAAQ,iCAAiC;AAC3E,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,iCAAiC,QAAQ,qBAAqB;AACvE,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,kBAAkB,GAAG,UAAU;AAE5C,OAAO,MAAMC,OAAO,GAAIC,WAAmC,IAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,CAAC,CAAC;EAE7C,OAAOF,QAAQ,CACb,CAACI,kBAAkB,EAAE,GAAGH,iCAAiC,CAACK,WAAW,CAAC,CAAC,EACvE,OAAO;IAAEG,SAAS,GAAG;EAAE,CAAC,KAAK;IAC3B,MAAMC,IAAI,GAAG,MAAMH,IAAI,CAACI,OAAO,CAAC;MAC9BC,WAAW,EAAE,KAAK;MAClBJ,cAAc;MACdK,IAAI,EAAEJ,SAAS;MACfK,QAAQ,EAAEX,SAAS;MACnBY,IAAI,EAAEhB,WAAW,CAACiB,KAAK;MACvB,GAAGV;IACL,CAAC,CAAC;IAEF,OAAOI,IAAI;EACb,CACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- export let OneErrorCode;
2
- (function (OneErrorCode) {
1
+ export let OneErrorCode = /*#__PURE__*/function (OneErrorCode) {
3
2
  OneErrorCode["OrganisationAlreadyExists"] = "BR_0023";
4
3
  OneErrorCode["KeyStorageNotSupported"] = "BR_0039";
5
4
  OneErrorCode["OperationNotSupported"] = "BR_0062";
6
5
  OneErrorCode["NoTrustEntityFound"] = "BR_0186";
7
- })(OneErrorCode || (OneErrorCode = {}));
6
+ return OneErrorCode;
7
+ }({});
8
8
  //# sourceMappingURL=error-code.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["OneErrorCode"],"sources":["error-code.ts"],"sourcesContent":["export enum OneErrorCode {\n OrganisationAlreadyExists = 'BR_0023',\n KeyStorageNotSupported = 'BR_0039',\n OperationNotSupported = 'BR_0062',\n NoTrustEntityFound = 'BR_0186',\n}\n"],"mappings":"AAAA,WAAYA,YAAY;AAKvB,WALWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY"}
1
+ {"version":3,"names":["OneErrorCode"],"sources":["error-code.ts"],"sourcesContent":["export enum OneErrorCode {\n OrganisationAlreadyExists = 'BR_0023',\n KeyStorageNotSupported = 'BR_0039',\n OperationNotSupported = 'BR_0062',\n NoTrustEntityFound = 'BR_0186',\n}\n"],"mappings":"AAAA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { HistoryEntityTypeEnum } from '@procivis/react-native-one-core';
2
1
  import { useInfiniteQuery } from 'react-query';
3
2
  import { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';
4
3
  import { useONECore } from './core-context';
@@ -9,46 +8,16 @@ export const useHistory = queryParams => {
9
8
  core,
10
9
  organisationId
11
10
  } = useONECore();
12
- return useInfiniteQuery([HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)], async _ref => {
13
- let {
14
- pageParam = 0
15
- } = _ref;
11
+ return useInfiniteQuery([HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)], async ({
12
+ pageParam = 0
13
+ }) => {
16
14
  const historyPage = await core.getHistory({
17
15
  organisationId,
18
16
  page: pageParam,
19
17
  pageSize: PAGE_SIZE,
20
18
  ...queryParams
21
19
  });
22
- const credentialIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === HistoryEntityTypeEnum.CREDENTIAL).map(historyItem => historyItem.entityId)));
23
- const proofIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === HistoryEntityTypeEnum.PROOF).map(historyItem => historyItem.entityId)));
24
- const credentials = await core.getCredentials({
25
- ids: credentialIds,
26
- organisationId,
27
- page: 0,
28
- pageSize: credentialIds.length
29
- });
30
- const credentialDidsMap = Object.assign({}, ...credentials.values.map(credential => ({
31
- [credential.id]: credential.issuerDid
32
- })));
33
- const proofs = await Promise.all(proofIds.map(id => core.getProof(id)));
34
- const proofDidsMap = Object.assign({}, ...proofs.map(proof => {
35
- var _proof$verifierDid;
36
- return {
37
- [proof.id]: (_proof$verifierDid = proof.verifierDid) === null || _proof$verifierDid === void 0 ? void 0 : _proof$verifierDid.did
38
- };
39
- }));
40
- const result = {
41
- totalItems: historyPage.totalItems,
42
- totalPages: historyPage.totalPages,
43
- values: historyPage.values.map(item => {
44
- const did = item.entityType === HistoryEntityTypeEnum.CREDENTIAL ? credentialDidsMap[item.entityId] : proofDidsMap[item.entityId];
45
- return {
46
- ...item,
47
- did
48
- };
49
- })
50
- };
51
- return result;
20
+ return historyPage;
52
21
  }, {
53
22
  getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
54
23
  keepPreviousData: true
@@ -1 +1 @@
1
- {"version":3,"names":["HistoryEntityTypeEnum","useInfiniteQuery","getQueryKeyFromHistoryListQueryParams","useONECore","PAGE_SIZE","HISTORY_LIST_QUERY_KEY","useHistory","queryParams","core","organisationId","_ref","pageParam","historyPage","getHistory","page","pageSize","credentialIds","Array","from","Set","values","filter","historyItem","entityType","CREDENTIAL","map","entityId","proofIds","PROOF","credentials","getCredentials","ids","length","credentialDidsMap","Object","assign","credential","id","issuerDid","proofs","Promise","all","getProof","proofDidsMap","proof","_proof$verifierDid","verifierDid","did","result","totalItems","totalPages","item","getNextPageParam","lastPage","allPages","undefined","keepPreviousData"],"sources":["history.ts"],"sourcesContent":["import { HistoryEntityTypeEnum, HistoryListItem, HistoryListQuery, ItemList } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery } from 'react-query';\n\nimport { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nexport type HistoryListItemWithDid = HistoryListItem & {\n did?: string;\n};\n\nconst PAGE_SIZE = 20;\nexport const HISTORY_LIST_QUERY_KEY = 'history-list';\n\nexport const useHistory = (queryParams?: Partial<HistoryListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const historyPage = await core.getHistory({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n });\n\n const credentialIds = Array.from(\n new Set(\n historyPage.values\n .filter((historyItem) => historyItem.entityType === HistoryEntityTypeEnum.CREDENTIAL)\n .map((historyItem) => historyItem.entityId!),\n ),\n );\n const proofIds = Array.from(\n new Set(\n historyPage.values\n .filter((historyItem) => historyItem.entityType === HistoryEntityTypeEnum.PROOF)\n .map((historyItem) => historyItem.entityId!),\n ),\n );\n\n const credentials = await core.getCredentials({\n ids: credentialIds,\n organisationId,\n page: 0,\n pageSize: credentialIds.length,\n });\n const credentialDidsMap: Record<string, string> = Object.assign(\n {},\n ...credentials.values.map((credential) => ({\n [credential.id]: credential.issuerDid,\n })),\n );\n\n const proofs = await Promise.all(proofIds.map((id) => core.getProof(id)));\n const proofDidsMap: Record<string, string> = Object.assign(\n {},\n ...proofs.map((proof) => ({\n [proof.id]: proof.verifierDid?.did,\n })),\n );\n\n const result: ItemList<HistoryListItemWithDid> = {\n totalItems: historyPage.totalItems,\n totalPages: historyPage.totalPages,\n values: historyPage.values.map((item) => {\n const did =\n item.entityType === HistoryEntityTypeEnum.CREDENTIAL\n ? credentialDidsMap[item.entityId!]\n : proofDidsMap[item.entityId!];\n return {\n ...item,\n did,\n };\n }),\n };\n\n return result;\n },\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AAAA,SAASA,qBAAqB,QAAqD,iCAAiC;AACpH,SAASC,gBAAgB,QAAQ,aAAa;AAE9C,SAASC,qCAAqC,QAAQ,qBAAqB;AAC3E,SAASC,UAAU,QAAQ,gBAAgB;AAM3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,sBAAsB,GAAG,cAAc;AAEpD,OAAO,MAAMC,UAAU,GAAIC,WAAuC,IAAK;EACrE,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,EAAE;EAE7C,OAAOF,gBAAgB,CACrB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QAAQ,CAACF,GAAG,CAAEY,EAAE,IAAK7B,IAAI,CAACkC,QAAQ,CAACL,EAAE,CAAC,CAAC,CAAC;IACzE,MAAMM,YAAoC,GAAGT,MAAM,CAACC,MAAM,CACxD,CAAC,CAAC,EACF,GAAGI,MAAM,CAACd,GAAG,CAAEmB,KAAK;MAAA,IAAAC,kBAAA;MAAA,OAAM;QACxB,CAACD,KAAK,CAACP,EAAE,IAAAQ,kBAAA,GAAGD,KAAK,CAACE,WAAW,cAAAD,kBAAA,uBAAjBA,kBAAA,CAAmBE;MACjC,CAAC;IAAA,CAAC,CAAC,CACJ;IAED,MAAMC,MAAwC,GAAG;MAC/CC,UAAU,EAAErC,WAAW,CAACqC,UAAU;MAClCC,UAAU,EAAEtC,WAAW,CAACsC,UAAU;MAClC9B,MAAM,EAAER,WAAW,CAACQ,MAAM,CAACK,GAAG,CAAE0B,IAAI,IAAK;QACvC,MAAMJ,GAAG,GACPI,IAAI,CAAC5B,UAAU,KAAKvB,qBAAqB,CAACwB,UAAU,GAChDS,iBAAiB,CAACkB,IAAI,CAACzB,QAAQ,CAAE,GACjCiB,YAAY,CAACQ,IAAI,CAACzB,QAAQ,CAAE;QAClC,OAAO;UACL,GAAGyB,IAAI;UACPJ;QACF,CAAC;MACH,CAAC;IACH,CAAC;IAED,OAAOC,MAAM;EACf,CAAC,EACD;IACEI,gBAAgB,EAAEA,CAACC,QAAQ,EAAEC,QAAQ,KAAMA,QAAQ,CAACtB,MAAM,GAAGqB,QAAQ,CAACH,UAAU,GAAGI,QAAQ,CAACtB,MAAM,GAAGuB,SAAU;IAC/GC,gBAAgB,EAAE;EACpB,CAAC,CACF;AACH,CAAC"}
1
+ {"version":3,"names":["useInfiniteQuery","getQueryKeyFromHistoryListQueryParams","useONECore","PAGE_SIZE","HISTORY_LIST_QUERY_KEY","useHistory","queryParams","core","organisationId","pageParam","historyPage","getHistory","page","pageSize","getNextPageParam","lastPage","allPages","length","totalPages","undefined","keepPreviousData"],"sources":["history.ts"],"sourcesContent":["import { HistoryListQuery } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery } from 'react-query';\n\nimport { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nconst PAGE_SIZE = 20;\nexport const HISTORY_LIST_QUERY_KEY = 'history-list';\n\nexport const useHistory = (queryParams?: Partial<HistoryListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const historyPage = await core.getHistory({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n });\n\n return historyPage;\n },\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,QAAQ,aAAa;AAE9C,SAASC,qCAAqC,QAAQ,qBAAqB;AAC3E,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,sBAAsB,GAAG,cAAc;AAEpD,OAAO,MAAMC,UAAU,GAAIC,WAAuC,IAAK;EACrE,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,CAAC,CAAC;EAE7C,OAAOF,gBAAgB,CACrB,CAACI,sBAAsB,EAAE,GAAGH,qCAAqC,CAACK,WAAW,CAAC,CAAC,EAC/E,OAAO;IAAEG,SAAS,GAAG;EAAE,CAAC,KAAK;IAC3B,MAAMC,WAAW,GAAG,MAAMH,IAAI,CAACI,UAAU,CAAC;MACxCH,cAAc;MACdI,IAAI,EAAEH,SAAS;MACfI,QAAQ,EAAEV,SAAS;MACnB,GAAGG;IACL,CAAC,CAAC;IAEF,OAAOI,WAAW;EACpB,CAAC,EACD;IACEI,gBAAgB,EAAEA,CAACC,QAAQ,EAAEC,QAAQ,KAAMA,QAAQ,CAACC,MAAM,GAAGF,QAAQ,CAACG,UAAU,GAAGF,QAAQ,CAACC,MAAM,GAAGE,SAAU;IAC/GC,gBAAgB,EAAE;EACpB,CACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  export * from './backup';
2
+ export * from './cache';
2
3
  export * from './core-config';
3
4
  export * from './core-context';
4
5
  export * from './core-init';
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './core-config';\nexport * from './core-context';\nexport * from './core-init';\nexport * from './credential-schemas';\nexport * from './credentials';\nexport * from './dids';\nexport * from './history';\nexport * from './proof-schemas';\nexport * from './proofs';\nexport * from './query';\nexport * from './trust-entity';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,gBAAgB"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './cache';\nexport * from './core-config';\nexport * from './core-context';\nexport * from './core-init';\nexport * from './credential-schemas';\nexport * from './credentials';\nexport * from './dids';\nexport * from './history';\nexport * from './proof-schemas';\nexport * from './proofs';\nexport * from './query';\nexport * from './trust-entity';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,gBAAgB","ignoreList":[]}