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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (889) hide show
  1. package/README.md +3 -8
  2. package/lib/commonjs/components/backup/index.js.map +1 -1
  3. package/lib/commonjs/components/backup/preview-credentials.js +18 -22
  4. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  5. package/lib/commonjs/components/credential/credential.js +11 -12
  6. package/lib/commonjs/components/credential/credential.js.map +1 -1
  7. package/lib/commonjs/components/credential/index.js.map +1 -1
  8. package/lib/commonjs/components/entity/EntityButtons.js +20 -25
  9. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  10. package/lib/commonjs/components/entity/entity-attributes.js +16 -18
  11. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  12. package/lib/commonjs/components/entity/entity-details-with-buttons.js +31 -23
  13. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  14. package/lib/commonjs/components/entity/entity-details.js +30 -31
  15. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  16. package/lib/commonjs/components/entity/index.js +2 -2
  17. package/lib/commonjs/components/entity/index.js.map +1 -1
  18. package/lib/commonjs/components/history/history-details-screen.js +67 -0
  19. package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
  20. package/lib/commonjs/components/history/history-list-item-icon.js +97 -0
  21. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
  22. package/lib/commonjs/components/history/history-list-item.js +55 -0
  23. package/lib/commonjs/components/history/history-list-item.js.map +1 -0
  24. package/lib/commonjs/components/history/history-list-screen.js +123 -0
  25. package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
  26. package/lib/commonjs/components/history/history-list-section-header.js +39 -0
  27. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
  28. package/lib/commonjs/components/history/history-list.js +100 -0
  29. package/lib/commonjs/components/history/history-list.js.map +1 -0
  30. package/lib/commonjs/components/history/index.js +72 -0
  31. package/lib/commonjs/components/history/index.js.map +1 -0
  32. package/lib/commonjs/components/index.js +11 -0
  33. package/lib/commonjs/components/index.js.map +1 -1
  34. package/lib/commonjs/components/navigation/header-buttons.js +21 -25
  35. package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
  36. package/lib/commonjs/components/navigation/index.js.map +1 -1
  37. package/lib/commonjs/components/proof-request/group.js +4 -5
  38. package/lib/commonjs/components/proof-request/group.js.map +1 -1
  39. package/lib/commonjs/components/proof-request/index.js.map +1 -1
  40. package/lib/commonjs/components/proof-request/select-credential.js +11 -12
  41. package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
  42. package/lib/commonjs/components/proof-request/share-credential.js +25 -28
  43. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/commonjs/normalize-color.d.js.map +1 -1
  46. package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
  47. package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
  48. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
  49. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  50. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
  51. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  52. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
  53. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  54. package/lib/commonjs/ui-components/accessibility/index.js +1 -30
  55. package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
  56. package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
  57. package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
  58. package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
  59. package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
  60. package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
  61. package/lib/commonjs/ui-components/action-modal/index.js +1 -1
  62. package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
  63. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
  64. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  65. package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
  66. package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
  67. package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
  68. package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
  69. package/lib/commonjs/ui-components/blur/index.js +2 -2
  70. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  71. package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
  72. package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
  73. package/lib/commonjs/ui-components/buttons/button.js +19 -22
  74. package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
  75. package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
  76. package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
  77. package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
  78. package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
  79. package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
  80. package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
  81. package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
  82. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
  83. package/lib/commonjs/ui-components/buttons/index.js +9 -37
  84. package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
  85. package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
  86. package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
  87. package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
  88. package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
  89. package/lib/commonjs/ui-components/camera/index.js +2 -2
  90. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  91. package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
  92. package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
  93. package/lib/commonjs/ui-components/control/checkbox.js +11 -12
  94. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  95. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  96. package/lib/commonjs/ui-components/control/switch.js +10 -12
  97. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  98. package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
  99. package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
  100. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
  101. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  102. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
  103. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  104. package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
  105. package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
  106. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
  107. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  108. package/lib/commonjs/ui-components/credential/card/index.js +6 -41
  109. package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
  110. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
  111. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  112. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
  113. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  114. package/lib/commonjs/ui-components/credential/index.js +2 -25
  115. package/lib/commonjs/ui-components/credential/index.js.map +1 -1
  116. package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
  117. package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
  118. package/lib/commonjs/ui-components/credential/selector.js +8 -10
  119. package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
  120. package/lib/commonjs/ui-components/detail/detail.js +12 -14
  121. package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
  122. package/lib/commonjs/ui-components/detail/index.js +1 -1
  123. package/lib/commonjs/ui-components/detail/index.js.map +1 -1
  124. package/lib/commonjs/ui-components/entity/avatar.js +14 -16
  125. package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
  126. package/lib/commonjs/ui-components/entity/entity-cluster.js +16 -19
  127. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  128. package/lib/commonjs/ui-components/entity/index.js +2 -2
  129. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  130. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
  131. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
  132. package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
  133. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  134. package/lib/commonjs/ui-components/header/header.js +12 -14
  135. package/lib/commonjs/ui-components/header/header.js.map +1 -1
  136. package/lib/commonjs/ui-components/header/index.js +4 -24
  137. package/lib/commonjs/ui-components/header/index.js.map +1 -1
  138. package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
  139. package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
  140. package/lib/commonjs/ui-components/history/data-item.js +30 -23
  141. package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
  142. package/lib/commonjs/ui-components/history/history-details.js +181 -0
  143. package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
  144. package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
  145. package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
  146. package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
  147. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  148. package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
  149. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  150. package/lib/commonjs/ui-components/history/index.js +30 -9
  151. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  152. package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
  153. package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
  154. package/lib/commonjs/ui-components/icons/credential.js +60 -71
  155. package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
  156. package/lib/commonjs/ui-components/icons/entity.js +36 -9
  157. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  158. package/lib/commonjs/ui-components/icons/history.js +115 -133
  159. package/lib/commonjs/ui-components/icons/history.js.map +1 -1
  160. package/lib/commonjs/ui-components/icons/icons.js +73 -90
  161. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  162. package/lib/commonjs/ui-components/icons/index.js.map +1 -1
  163. package/lib/commonjs/ui-components/icons/input.js +3 -3
  164. package/lib/commonjs/ui-components/icons/input.js.map +1 -1
  165. package/lib/commonjs/ui-components/icons/keypad.js +69 -81
  166. package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
  167. package/lib/commonjs/ui-components/icons/loader.js +4 -4
  168. package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
  169. package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
  170. package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
  171. package/lib/commonjs/ui-components/icons/selector.js +8 -9
  172. package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
  173. package/lib/commonjs/ui-components/icons/wallet.js +16 -19
  174. package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
  175. package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
  176. package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
  177. package/lib/commonjs/ui-components/image/index.js +2 -9
  178. package/lib/commonjs/ui-components/image/index.js.map +1 -1
  179. package/lib/commonjs/ui-components/index.js.map +1 -1
  180. package/lib/commonjs/ui-components/input/index.js +2 -2
  181. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  182. package/lib/commonjs/ui-components/input/radio-group.js +28 -25
  183. package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
  184. package/lib/commonjs/ui-components/input/selection-input.js +27 -38
  185. package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
  186. package/lib/commonjs/ui-components/input/text-input.js +25 -28
  187. package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
  188. package/lib/commonjs/ui-components/list/index.js +20 -2
  189. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  190. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
  191. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
  192. package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
  193. package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
  194. package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
  195. package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
  196. package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
  197. package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
  198. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
  199. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
  200. package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
  201. package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
  202. package/lib/commonjs/ui-components/loader/index.js +2 -2
  203. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  204. package/lib/commonjs/ui-components/loader/loader.js +17 -17
  205. package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
  206. package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
  207. package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
  208. package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
  209. package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
  210. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
  211. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  212. package/lib/commonjs/ui-components/pin/index.js +2 -2
  213. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  214. package/lib/commonjs/ui-components/pin/keypad.js +19 -23
  215. package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
  216. package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
  217. package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
  218. package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
  219. package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
  220. package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
  221. package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
  222. package/lib/commonjs/ui-components/pin/pins.js +8 -9
  223. package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
  224. package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
  225. package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
  226. package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
  227. package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
  228. package/lib/commonjs/ui-components/screens/index.js +8 -49
  229. package/lib/commonjs/ui-components/screens/index.js.map +1 -1
  230. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +35 -42
  231. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  232. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
  233. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  234. package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
  235. package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
  236. package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
  237. package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
  238. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
  239. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
  240. package/lib/commonjs/ui-components/searchbar/index.js +2 -2
  241. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  242. package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
  243. package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
  244. package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
  245. package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
  246. package/lib/commonjs/ui-components/settings/index.js +2 -2
  247. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  248. package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
  249. package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
  250. package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
  251. package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
  252. package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
  253. package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
  254. package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
  255. package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
  256. package/lib/commonjs/ui-components/state/error-screen.js +10 -12
  257. package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
  258. package/lib/commonjs/ui-components/state/index.js +2 -2
  259. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  260. package/lib/commonjs/ui-components/text/base.js +14 -16
  261. package/lib/commonjs/ui-components/text/base.js.map +1 -1
  262. package/lib/commonjs/ui-components/text/font.js +11 -13
  263. package/lib/commonjs/ui-components/text/font.js.map +1 -1
  264. package/lib/commonjs/ui-components/text/index.js +2 -9
  265. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  266. package/lib/commonjs/ui-components/text/typography.js +10 -13
  267. package/lib/commonjs/ui-components/text/typography.js.map +1 -1
  268. package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
  269. package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
  270. package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
  271. package/lib/commonjs/ui-components/theme/index.js.map +1 -1
  272. package/lib/commonjs/utils/array.js.map +1 -1
  273. package/lib/commonjs/utils/backup.js.map +1 -1
  274. package/lib/commonjs/utils/color.js +1 -1
  275. package/lib/commonjs/utils/color.js.map +1 -1
  276. package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
  277. package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
  278. package/lib/commonjs/utils/date.js +3 -3
  279. package/lib/commonjs/utils/date.js.map +1 -1
  280. package/lib/commonjs/utils/filtering.js +11 -0
  281. package/lib/commonjs/utils/filtering.js.map +1 -0
  282. package/lib/commonjs/utils/history.js +76 -0
  283. package/lib/commonjs/utils/history.js.map +1 -0
  284. package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
  285. package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
  286. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
  287. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  288. package/lib/commonjs/utils/hooks/core/backup.js +31 -31
  289. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  290. package/lib/commonjs/utils/hooks/core/cache.js +44 -0
  291. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
  292. package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
  293. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  294. package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
  295. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  296. package/lib/commonjs/utils/hooks/core/core-init.js +44 -34
  297. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  298. package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
  299. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  300. package/lib/commonjs/utils/hooks/core/credentials.js +28 -37
  301. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  302. package/lib/commonjs/utils/hooks/core/dids.js +4 -6
  303. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  304. package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
  305. package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
  306. package/lib/commonjs/utils/hooks/core/history.js +5 -37
  307. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  308. package/lib/commonjs/utils/hooks/core/identifiers.js +20 -0
  309. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -0
  310. package/lib/commonjs/utils/hooks/core/index.js +22 -0
  311. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  312. package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
  313. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  314. package/lib/commonjs/utils/hooks/core/proofs.js +108 -76
  315. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  316. package/lib/commonjs/utils/hooks/core/query.js +1 -2
  317. package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
  318. package/lib/commonjs/utils/hooks/core/trust-entity.js +17 -7
  319. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  320. package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  321. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
  322. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  323. package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
  324. package/lib/commonjs/utils/hooks/index.js.map +1 -1
  325. package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
  326. package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
  327. package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
  328. package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  329. package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
  330. package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
  331. package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
  332. package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
  333. package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
  334. package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
  335. package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
  336. package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
  337. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  338. package/lib/commonjs/utils/index.js +37 -1
  339. package/lib/commonjs/utils/index.js.map +1 -1
  340. package/lib/commonjs/utils/navigation.js +5 -5
  341. package/lib/commonjs/utils/navigation.js.map +1 -1
  342. package/lib/commonjs/utils/parsers/credential-images.js +1 -1
  343. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  344. package/lib/commonjs/utils/parsers/credential-sharing.js +24 -25
  345. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  346. package/lib/commonjs/utils/parsers/credential.js +23 -26
  347. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  348. package/lib/commonjs/utils/parsers/index.js +11 -0
  349. package/lib/commonjs/utils/parsers/index.js.map +1 -1
  350. package/lib/commonjs/utils/parsers/query.js +4 -3
  351. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  352. package/lib/commonjs/utils/parsers/universal-links.js +33 -0
  353. package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
  354. package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
  355. package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
  356. package/lib/commonjs/utils/ref.js.map +1 -1
  357. package/lib/commonjs/utils/reporting.js +4 -2
  358. package/lib/commonjs/utils/reporting.js.map +1 -1
  359. package/lib/commonjs/utils/string.js.map +1 -1
  360. package/lib/commonjs/utils/testID.js +1 -4
  361. package/lib/commonjs/utils/testID.js.map +1 -1
  362. package/lib/commonjs/utils/testID.test.js.map +1 -1
  363. package/lib/commonjs/utils/useMemoAsync.js +9 -0
  364. package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
  365. package/lib/commonjs/utils/uuid.js +1 -1
  366. package/lib/commonjs/utils/uuid.js.map +1 -1
  367. package/lib/module/components/backup/index.js.map +1 -1
  368. package/lib/module/components/backup/preview-credentials.js +17 -21
  369. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  370. package/lib/module/components/credential/credential.js +10 -11
  371. package/lib/module/components/credential/credential.js.map +1 -1
  372. package/lib/module/components/credential/index.js.map +1 -1
  373. package/lib/module/components/entity/EntityButtons.js +17 -21
  374. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  375. package/lib/module/components/entity/entity-attributes.js +13 -14
  376. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  377. package/lib/module/components/entity/entity-details-with-buttons.js +29 -20
  378. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  379. package/lib/module/components/entity/entity-details.js +28 -28
  380. package/lib/module/components/entity/entity-details.js.map +1 -1
  381. package/lib/module/components/entity/index.js.map +1 -1
  382. package/lib/module/components/history/history-details-screen.js +59 -0
  383. package/lib/module/components/history/history-details-screen.js.map +1 -0
  384. package/lib/module/components/history/history-list-item-icon.js +87 -0
  385. package/lib/module/components/history/history-list-item-icon.js.map +1 -0
  386. package/lib/module/components/history/history-list-item.js +46 -0
  387. package/lib/module/components/history/history-list-item.js.map +1 -0
  388. package/lib/module/components/history/history-list-screen.js +114 -0
  389. package/lib/module/components/history/history-list-screen.js.map +1 -0
  390. package/lib/module/components/history/history-list-section-header.js +29 -0
  391. package/lib/module/components/history/history-list-section-header.js.map +1 -0
  392. package/lib/module/components/history/history-list.js +90 -0
  393. package/lib/module/components/history/history-list.js.map +1 -0
  394. package/lib/module/components/history/index.js +7 -0
  395. package/lib/module/components/history/index.js.map +1 -0
  396. package/lib/module/components/index.js +1 -0
  397. package/lib/module/components/index.js.map +1 -1
  398. package/lib/module/components/navigation/header-buttons.js +19 -23
  399. package/lib/module/components/navigation/header-buttons.js.map +1 -1
  400. package/lib/module/components/navigation/index.js.map +1 -1
  401. package/lib/module/components/proof-request/group.js +3 -4
  402. package/lib/module/components/proof-request/group.js.map +1 -1
  403. package/lib/module/components/proof-request/index.js.map +1 -1
  404. package/lib/module/components/proof-request/select-credential.js +10 -11
  405. package/lib/module/components/proof-request/select-credential.js.map +1 -1
  406. package/lib/module/components/proof-request/share-credential.js +23 -26
  407. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  408. package/lib/module/index.js.map +1 -1
  409. package/lib/module/normalize-color.d.js.map +1 -1
  410. package/lib/module/ui-components/accessibility/accessibility.js +5 -7
  411. package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
  412. package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
  413. package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  414. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
  415. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  416. package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
  417. package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  418. package/lib/module/ui-components/accessibility/index.js +4 -4
  419. package/lib/module/ui-components/accessibility/index.js.map +1 -1
  420. package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
  421. package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
  422. package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
  423. package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
  424. package/lib/module/ui-components/action-modal/index.js.map +1 -1
  425. package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
  426. package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  427. package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
  428. package/lib/module/ui-components/blur/blur-view.js +10 -11
  429. package/lib/module/ui-components/blur/blur-view.js.map +1 -1
  430. package/lib/module/ui-components/blur/index.js.map +1 -1
  431. package/lib/module/ui-components/buttons/back-button.js +10 -11
  432. package/lib/module/ui-components/buttons/back-button.js.map +1 -1
  433. package/lib/module/ui-components/buttons/button.js +17 -18
  434. package/lib/module/ui-components/buttons/button.js.map +1 -1
  435. package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
  436. package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
  437. package/lib/module/ui-components/buttons/filter-button.js +6 -7
  438. package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
  439. package/lib/module/ui-components/buttons/ghost-button.js +9 -10
  440. package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
  441. package/lib/module/ui-components/buttons/hold-button.js +236 -0
  442. package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
  443. package/lib/module/ui-components/buttons/index.js +8 -7
  444. package/lib/module/ui-components/buttons/index.js.map +1 -1
  445. package/lib/module/ui-components/buttons/scan-button.js +5 -6
  446. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  447. package/lib/module/ui-components/camera/camera-overlay.js +7 -9
  448. package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
  449. package/lib/module/ui-components/camera/index.js.map +1 -1
  450. package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
  451. package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
  452. package/lib/module/ui-components/control/checkbox.js +9 -10
  453. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  454. package/lib/module/ui-components/control/index.js.map +1 -1
  455. package/lib/module/ui-components/control/switch.js +8 -9
  456. package/lib/module/ui-components/control/switch.js.map +1 -1
  457. package/lib/module/ui-components/credential/card/credential-card.js +16 -17
  458. package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
  459. package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
  460. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  461. package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
  462. package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  463. package/lib/module/ui-components/credential/card/credential-header.js +21 -19
  464. package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
  465. package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
  466. package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  467. package/lib/module/ui-components/credential/card/index.js +10 -10
  468. package/lib/module/ui-components/credential/card/index.js.map +1 -1
  469. package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
  470. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  471. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
  472. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  473. package/lib/module/ui-components/credential/index.js +2 -2
  474. package/lib/module/ui-components/credential/index.js.map +1 -1
  475. package/lib/module/ui-components/credential/selector-status.js +3 -3
  476. package/lib/module/ui-components/credential/selector-status.js.map +1 -1
  477. package/lib/module/ui-components/credential/selector.js +5 -6
  478. package/lib/module/ui-components/credential/selector.js.map +1 -1
  479. package/lib/module/ui-components/detail/detail.js +9 -10
  480. package/lib/module/ui-components/detail/detail.js.map +1 -1
  481. package/lib/module/ui-components/detail/index.js.map +1 -1
  482. package/lib/module/ui-components/entity/avatar.js +10 -11
  483. package/lib/module/ui-components/entity/avatar.js.map +1 -1
  484. package/lib/module/ui-components/entity/entity-cluster.js +12 -14
  485. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  486. package/lib/module/ui-components/entity/index.js.map +1 -1
  487. package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
  488. package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
  489. package/lib/module/ui-components/header/foldable-header.js +10 -12
  490. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  491. package/lib/module/ui-components/header/header.js +10 -11
  492. package/lib/module/ui-components/header/header.js.map +1 -1
  493. package/lib/module/ui-components/header/index.js +6 -6
  494. package/lib/module/ui-components/header/index.js.map +1 -1
  495. package/lib/module/ui-components/header/navigation-header.js +23 -28
  496. package/lib/module/ui-components/header/navigation-header.js.map +1 -1
  497. package/lib/module/ui-components/history/data-item.js +23 -15
  498. package/lib/module/ui-components/history/data-item.js.map +1 -1
  499. package/lib/module/ui-components/history/history-details.js +171 -0
  500. package/lib/module/ui-components/history/history-details.js.map +1 -0
  501. package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
  502. package/lib/module/ui-components/history/history-item.js.map +1 -0
  503. package/lib/module/ui-components/history/history-section-header.js +6 -7
  504. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  505. package/lib/module/ui-components/history/history-section-list-item.js +8 -9
  506. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  507. package/lib/module/ui-components/history/index.js +5 -4
  508. package/lib/module/ui-components/history/index.js.map +1 -1
  509. package/lib/module/ui-components/icons/connectivity.js +16 -21
  510. package/lib/module/ui-components/icons/connectivity.js.map +1 -1
  511. package/lib/module/ui-components/icons/credential.js +57 -68
  512. package/lib/module/ui-components/icons/credential.js.map +1 -1
  513. package/lib/module/ui-components/icons/entity.js +31 -5
  514. package/lib/module/ui-components/icons/entity.js.map +1 -1
  515. package/lib/module/ui-components/icons/history.js +103 -128
  516. package/lib/module/ui-components/icons/history.js.map +1 -1
  517. package/lib/module/ui-components/icons/icons.js +70 -87
  518. package/lib/module/ui-components/icons/icons.js.map +1 -1
  519. package/lib/module/ui-components/icons/index.js.map +1 -1
  520. package/lib/module/ui-components/icons/input.js.map +1 -1
  521. package/lib/module/ui-components/icons/keypad.js +66 -78
  522. package/lib/module/ui-components/icons/keypad.js.map +1 -1
  523. package/lib/module/ui-components/icons/loader.js +1 -1
  524. package/lib/module/ui-components/icons/loader.js.map +1 -1
  525. package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
  526. package/lib/module/ui-components/icons/selector.js +5 -6
  527. package/lib/module/ui-components/icons/selector.js.map +1 -1
  528. package/lib/module/ui-components/icons/wallet.js +13 -16
  529. package/lib/module/ui-components/icons/wallet.js.map +1 -1
  530. package/lib/module/ui-components/image/image-or-component.js +12 -14
  531. package/lib/module/ui-components/image/image-or-component.js.map +1 -1
  532. package/lib/module/ui-components/image/index.js +2 -2
  533. package/lib/module/ui-components/image/index.js.map +1 -1
  534. package/lib/module/ui-components/index.js.map +1 -1
  535. package/lib/module/ui-components/input/index.js.map +1 -1
  536. package/lib/module/ui-components/input/radio-group.js +26 -22
  537. package/lib/module/ui-components/input/radio-group.js.map +1 -1
  538. package/lib/module/ui-components/input/selection-input.js +21 -31
  539. package/lib/module/ui-components/input/selection-input.js.map +1 -1
  540. package/lib/module/ui-components/input/text-input.js +21 -22
  541. package/lib/module/ui-components/input/text-input.js.map +1 -1
  542. package/lib/module/ui-components/list/index.js +1 -0
  543. package/lib/module/ui-components/list/index.js.map +1 -1
  544. package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
  545. package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
  546. package/lib/module/ui-components/list/list-section-header.js +8 -9
  547. package/lib/module/ui-components/list/list-section-header.js.map +1 -1
  548. package/lib/module/ui-components/list/list-title-header.js +4 -5
  549. package/lib/module/ui-components/list/list-title-header.js.map +1 -1
  550. package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
  551. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
  552. package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
  553. package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
  554. package/lib/module/ui-components/list/wallet/index.js +4 -0
  555. package/lib/module/ui-components/list/wallet/index.js.map +1 -0
  556. package/lib/module/ui-components/loader/index.js.map +1 -1
  557. package/lib/module/ui-components/loader/loader.js +14 -12
  558. package/lib/module/ui-components/loader/loader.js.map +1 -1
  559. package/lib/module/ui-components/loader/loading-result.js +21 -19
  560. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  561. package/lib/module/ui-components/nerd-view/index.js +2 -2
  562. package/lib/module/ui-components/nerd-view/index.js.map +1 -1
  563. package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
  564. package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  565. package/lib/module/ui-components/pin/index.js.map +1 -1
  566. package/lib/module/ui-components/pin/keypad.js +17 -19
  567. package/lib/module/ui-components/pin/keypad.js.map +1 -1
  568. package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
  569. package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
  570. package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
  571. package/lib/module/ui-components/pin/pin-lock.js +6 -7
  572. package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
  573. package/lib/module/ui-components/pin/pins.js +7 -8
  574. package/lib/module/ui-components/pin/pins.js.map +1 -1
  575. package/lib/module/ui-components/screens/backup-screen.js +13 -14
  576. package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
  577. package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
  578. package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
  579. package/lib/module/ui-components/screens/index.js +12 -12
  580. package/lib/module/ui-components/screens/index.js.map +1 -1
  581. package/lib/module/ui-components/screens/nerd-mode-screen.js +30 -35
  582. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  583. package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
  584. package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  585. package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
  586. package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
  587. package/lib/module/ui-components/screens/section-list-screen.js +11 -12
  588. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  589. package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
  590. package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
  591. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  592. package/lib/module/ui-components/searchbar/search-bar.js +11 -12
  593. package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
  594. package/lib/module/ui-components/settings/button-setting.js +10 -11
  595. package/lib/module/ui-components/settings/button-setting.js.map +1 -1
  596. package/lib/module/ui-components/settings/index.js.map +1 -1
  597. package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
  598. package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
  599. package/lib/module/ui-components/settings/setting-item.js +7 -8
  600. package/lib/module/ui-components/settings/setting-item.js.map +1 -1
  601. package/lib/module/ui-components/settings/settings-button.js +5 -6
  602. package/lib/module/ui-components/settings/settings-button.js.map +1 -1
  603. package/lib/module/ui-components/settings/switch-setting.js +9 -10
  604. package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
  605. package/lib/module/ui-components/state/error-screen.js +7 -8
  606. package/lib/module/ui-components/state/error-screen.js.map +1 -1
  607. package/lib/module/ui-components/state/index.js.map +1 -1
  608. package/lib/module/ui-components/text/base.js +12 -13
  609. package/lib/module/ui-components/text/base.js.map +1 -1
  610. package/lib/module/ui-components/text/font.js +10 -11
  611. package/lib/module/ui-components/text/font.js.map +1 -1
  612. package/lib/module/ui-components/text/index.js +2 -2
  613. package/lib/module/ui-components/text/index.js.map +1 -1
  614. package/lib/module/ui-components/text/typography.js +8 -10
  615. package/lib/module/ui-components/text/typography.js.map +1 -1
  616. package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
  617. package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
  618. package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
  619. package/lib/module/ui-components/theme/index.js.map +1 -1
  620. package/lib/module/utils/array.js.map +1 -1
  621. package/lib/module/utils/backup.js.map +1 -1
  622. package/lib/module/utils/color.js.map +1 -1
  623. package/lib/module/utils/contrasting-status-bar.js +5 -6
  624. package/lib/module/utils/contrasting-status-bar.js.map +1 -1
  625. package/lib/module/utils/date.js +4 -4
  626. package/lib/module/utils/date.js.map +1 -1
  627. package/lib/module/utils/filtering.js +4 -0
  628. package/lib/module/utils/filtering.js.map +1 -0
  629. package/lib/module/utils/history.js +66 -0
  630. package/lib/module/utils/history.js.map +1 -0
  631. package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
  632. package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
  633. package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
  634. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  635. package/lib/module/utils/hooks/core/backup.js +31 -31
  636. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  637. package/lib/module/utils/hooks/core/cache.js +37 -0
  638. package/lib/module/utils/hooks/core/cache.js.map +1 -0
  639. package/lib/module/utils/hooks/core/core-config.js +11 -0
  640. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  641. package/lib/module/utils/hooks/core/core-context.js +14 -9
  642. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  643. package/lib/module/utils/hooks/core/core-init.js +42 -30
  644. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  645. package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
  646. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  647. package/lib/module/utils/hooks/core/credentials.js +27 -36
  648. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  649. package/lib/module/utils/hooks/core/dids.js +3 -4
  650. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  651. package/lib/module/utils/hooks/core/error-code.js +3 -3
  652. package/lib/module/utils/hooks/core/error-code.js.map +1 -1
  653. package/lib/module/utils/hooks/core/history.js +4 -35
  654. package/lib/module/utils/hooks/core/history.js.map +1 -1
  655. package/lib/module/utils/hooks/core/identifiers.js +13 -0
  656. package/lib/module/utils/hooks/core/identifiers.js.map +1 -0
  657. package/lib/module/utils/hooks/core/index.js +2 -0
  658. package/lib/module/utils/hooks/core/index.js.map +1 -1
  659. package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
  660. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  661. package/lib/module/utils/hooks/core/proofs.js +102 -67
  662. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  663. package/lib/module/utils/hooks/core/query.js.map +1 -1
  664. package/lib/module/utils/hooks/core/trust-entity.js +16 -6
  665. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  666. package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  667. package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
  668. package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  669. package/lib/module/utils/hooks/http/client.js.map +1 -1
  670. package/lib/module/utils/hooks/index.js.map +1 -1
  671. package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
  672. package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
  673. package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
  674. package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  675. package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
  676. package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
  677. package/lib/module/utils/hooks/navigation/index.js.map +1 -1
  678. package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
  679. package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
  680. package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
  681. package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
  682. package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
  683. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  684. package/lib/module/utils/index.js +3 -0
  685. package/lib/module/utils/index.js.map +1 -1
  686. package/lib/module/utils/navigation.js +5 -5
  687. package/lib/module/utils/navigation.js.map +1 -1
  688. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  689. package/lib/module/utils/parsers/credential-sharing.js +23 -24
  690. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  691. package/lib/module/utils/parsers/credential.js +23 -25
  692. package/lib/module/utils/parsers/credential.js.map +1 -1
  693. package/lib/module/utils/parsers/index.js +1 -0
  694. package/lib/module/utils/parsers/index.js.map +1 -1
  695. package/lib/module/utils/parsers/query.js +4 -3
  696. package/lib/module/utils/parsers/query.js.map +1 -1
  697. package/lib/module/utils/parsers/universal-links.js +25 -0
  698. package/lib/module/utils/parsers/universal-links.js.map +1 -0
  699. package/lib/module/utils/parsers/universal-links.test.js +38 -0
  700. package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
  701. package/lib/module/utils/ref.js.map +1 -1
  702. package/lib/module/utils/reporting.js +1 -0
  703. package/lib/module/utils/reporting.js.map +1 -1
  704. package/lib/module/utils/string.js.map +1 -1
  705. package/lib/module/utils/testID.js +1 -4
  706. package/lib/module/utils/testID.js.map +1 -1
  707. package/lib/module/utils/testID.test.js.map +1 -1
  708. package/lib/module/utils/useMemoAsync.js +10 -0
  709. package/lib/module/utils/useMemoAsync.js.map +1 -1
  710. package/lib/module/utils/uuid.js.map +1 -1
  711. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  712. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -2
  713. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  714. package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
  715. package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
  716. package/lib/typescript/components/history/history-list-item.d.ts +21 -0
  717. package/lib/typescript/components/history/history-list-screen.d.ts +24 -0
  718. package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
  719. package/lib/typescript/components/history/history-list.d.ts +19 -0
  720. package/lib/typescript/components/history/index.d.ts +6 -0
  721. package/lib/typescript/components/index.d.ts +1 -0
  722. package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
  723. package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
  724. package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
  725. package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
  726. package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
  727. package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
  728. package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
  729. package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
  730. package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
  731. package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
  732. package/lib/typescript/ui-components/credential/index.d.ts +2 -1
  733. package/lib/typescript/ui-components/header/index.d.ts +6 -3
  734. package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
  735. package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
  736. package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
  737. package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
  738. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  739. package/lib/typescript/ui-components/history/index.d.ts +5 -4
  740. package/lib/typescript/ui-components/icons/entity.d.ts +1 -0
  741. package/lib/typescript/ui-components/icons/history.d.ts +22 -35
  742. package/lib/typescript/ui-components/image/index.d.ts +2 -1
  743. package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
  744. package/lib/typescript/ui-components/list/index.d.ts +1 -0
  745. package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
  746. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
  747. package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
  748. package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
  749. package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
  750. package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
  751. package/lib/typescript/ui-components/screens/index.d.ts +12 -6
  752. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +4 -4
  753. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  754. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  755. package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
  756. package/lib/typescript/utils/filtering.d.ts +1 -0
  757. package/lib/typescript/utils/history.d.ts +10 -0
  758. package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
  759. package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
  760. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
  761. package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
  762. package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
  763. package/lib/typescript/utils/hooks/core/credentials.d.ts +9 -4
  764. package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
  765. package/lib/typescript/utils/hooks/core/identifiers.d.ts +2 -0
  766. package/lib/typescript/utils/hooks/core/index.d.ts +2 -0
  767. package/lib/typescript/utils/hooks/core/proofs.d.ts +16 -9
  768. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -1
  769. package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
  770. package/lib/typescript/utils/index.d.ts +3 -0
  771. package/lib/typescript/utils/parsers/index.d.ts +1 -0
  772. package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
  773. package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
  774. package/lib/typescript/utils/ref.d.ts +1 -1
  775. package/package.json +61 -47
  776. package/src/components/entity/entity-attributes.tsx +5 -4
  777. package/src/components/entity/entity-details-with-buttons.tsx +20 -13
  778. package/src/components/entity/entity-details.tsx +24 -27
  779. package/src/components/history/history-details-screen.tsx +89 -0
  780. package/src/components/history/history-list-item-icon.tsx +113 -0
  781. package/src/components/history/history-list-item.tsx +64 -0
  782. package/src/components/history/history-list-screen.tsx +157 -0
  783. package/src/components/history/history-list-section-header.tsx +42 -0
  784. package/src/components/history/history-list.tsx +116 -0
  785. package/src/components/history/index.tsx +6 -0
  786. package/src/components/index.ts +1 -0
  787. package/src/components/proof-request/share-credential.tsx +2 -1
  788. package/src/ui-components/accessibility/accessibility.ts +2 -2
  789. package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
  790. package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
  791. package/src/ui-components/accessibility/index.ts +4 -3
  792. package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
  793. package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
  794. package/src/ui-components/buttons/back-button.stories.tsx +7 -8
  795. package/src/ui-components/buttons/button.stories.tsx +9 -10
  796. package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
  797. package/src/ui-components/buttons/connectivity-button.tsx +1 -1
  798. package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
  799. package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
  800. package/src/ui-components/buttons/hold-button.tsx +276 -0
  801. package/src/ui-components/buttons/index.ts +16 -6
  802. package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
  803. package/src/ui-components/control/checkbox.stories.tsx +8 -8
  804. package/src/ui-components/control/switch.stories.tsx +11 -8
  805. package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
  806. package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
  807. package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
  808. package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
  809. package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
  810. package/src/ui-components/credential/card/credential-header.tsx +4 -1
  811. package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
  812. package/src/ui-components/credential/card/index.ts +11 -5
  813. package/src/ui-components/credential/index.ts +2 -1
  814. package/src/ui-components/credential/selector.stories.tsx +7 -7
  815. package/src/ui-components/detail/detail.stories.tsx +11 -8
  816. package/src/ui-components/entity/avatar.stories.tsx +10 -7
  817. package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
  818. package/src/ui-components/entity/entity-cluster.tsx +1 -1
  819. package/src/ui-components/header/header.stories.tsx +10 -7
  820. package/src/ui-components/header/index.ts +6 -3
  821. package/src/ui-components/header/navigation-header.stories.tsx +11 -8
  822. package/src/ui-components/history/data-item.tsx +13 -4
  823. package/src/ui-components/history/history-details.tsx +247 -0
  824. package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
  825. package/src/ui-components/history/history-section-header.tsx +2 -2
  826. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  827. package/src/ui-components/history/index.ts +5 -4
  828. package/src/ui-components/icons/entity.tsx +27 -0
  829. package/src/ui-components/icons/history.tsx +84 -131
  830. package/src/ui-components/image/index.tsx +2 -1
  831. package/src/ui-components/input/radio-group.stories.tsx +34 -0
  832. package/src/ui-components/input/radio-group.tsx +8 -2
  833. package/src/ui-components/input/selection-input.stories.tsx +20 -17
  834. package/src/ui-components/list/index.ts +1 -0
  835. package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
  836. package/src/ui-components/list/wallet/empty-list.tsx +75 -0
  837. package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
  838. package/src/ui-components/list/wallet/index.tsx +4 -0
  839. package/src/ui-components/loader/loader.stories.tsx +6 -9
  840. package/src/ui-components/loader/loader.tsx +6 -3
  841. package/src/ui-components/loader/loading-result.stories.tsx +13 -10
  842. package/src/ui-components/loader/loading-result.tsx +8 -4
  843. package/src/ui-components/nerd-view/index.ts +2 -1
  844. package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
  845. package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
  846. package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
  847. package/src/ui-components/screens/index.ts +12 -6
  848. package/src/ui-components/screens/nerd-mode-screen.tsx +6 -6
  849. package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
  850. package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
  851. package/src/ui-components/searchbar/search-bar.tsx +2 -2
  852. package/src/ui-components/state/error-screen.stories.tsx +8 -9
  853. package/src/ui-components/state/error-screen.tsx +1 -1
  854. package/src/ui-components/text/index.ts +2 -1
  855. package/src/ui-components/text/typography.stories.tsx +19 -12
  856. package/src/ui-components/theme/color-scheme-context.tsx +1 -0
  857. package/src/ui-components/theme/color-scheme.ts +1 -0
  858. package/src/utils/date.ts +5 -5
  859. package/src/utils/filtering.ts +5 -0
  860. package/src/utils/history.ts +71 -0
  861. package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
  862. package/src/utils/hooks/connectivity/connectivity.ts +28 -4
  863. package/src/utils/hooks/core/backup.ts +25 -21
  864. package/src/utils/hooks/core/cache.ts +43 -0
  865. package/src/utils/hooks/core/core-config.ts +19 -0
  866. package/src/utils/hooks/core/core-context.tsx +15 -2
  867. package/src/utils/hooks/core/core-init.ts +45 -27
  868. package/src/utils/hooks/core/credential-schemas.ts +1 -1
  869. package/src/utils/hooks/core/credentials.ts +18 -17
  870. package/src/utils/hooks/core/history.ts +2 -57
  871. package/src/utils/hooks/core/identifiers.ts +18 -0
  872. package/src/utils/hooks/core/index.ts +3 -1
  873. package/src/utils/hooks/core/proof-schemas.ts +1 -1
  874. package/src/utils/hooks/core/proofs.ts +111 -51
  875. package/src/utils/hooks/core/trust-entity.ts +21 -13
  876. package/src/utils/hooks/navigation/open-settings.ts +2 -3
  877. package/src/utils/hooks/revocation/credential-status.ts +3 -2
  878. package/src/utils/index.ts +3 -0
  879. package/src/utils/navigation.ts +4 -2
  880. package/src/utils/parsers/credential-sharing.tsx +25 -25
  881. package/src/utils/parsers/credential.ts +5 -1
  882. package/src/utils/parsers/index.ts +1 -0
  883. package/src/utils/parsers/query.tsx +4 -2
  884. package/src/utils/parsers/universal-links.test.ts +57 -0
  885. package/src/utils/parsers/universal-links.ts +26 -0
  886. package/src/utils/ref.ts +1 -1
  887. package/src/utils/reporting.ts +1 -0
  888. package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
  889. package/lib/module/ui-components/history/history-list-item.js.map +0 -1
@@ -10,35 +10,25 @@ var _client = require("../http/client");
10
10
  var _coreContext = require("./core-context");
11
11
  var _history = require("./history");
12
12
  const PAGE_SIZE = 10;
13
- const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';
14
- exports.CREDENTIAL_SCHEMA_LIST_QUERY_KEY = CREDENTIAL_SCHEMA_LIST_QUERY_KEY;
15
- const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
16
- exports.CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY;
17
- const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
18
- exports.CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY;
19
- const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
20
- exports.CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = CREDENTIAL_SCHEMA_SHARE_QUERY_KEY;
13
+ const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = exports.CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';
14
+ const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = exports.CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
15
+ const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = exports.CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
16
+ const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = exports.CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
21
17
  const useCredentialSchemas = queryParams => {
22
18
  const {
23
19
  core,
24
20
  organisationId
25
21
  } = (0, _coreContext.useONECore)();
26
- return (0, _reactQuery.useInfiniteQuery)([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromCredentialSchemaListQueryParams)(queryParams)], _ref => {
27
- let {
28
- pageParam = 0
29
- } = _ref;
30
- return core.getCredentialSchemas({
31
- organisationId,
32
- page: pageParam,
33
- pageSize: PAGE_SIZE,
34
- ...queryParams
35
- }).then(_ref2 => {
36
- let {
37
- values
38
- } = _ref2;
39
- return values;
40
- });
41
- }, {
22
+ return (0, _reactQuery.useInfiniteQuery)([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromCredentialSchemaListQueryParams)(queryParams)], ({
23
+ pageParam = 0
24
+ }) => core.getCredentialSchemas({
25
+ organisationId,
26
+ page: pageParam,
27
+ pageSize: PAGE_SIZE,
28
+ ...queryParams
29
+ }).then(({
30
+ values
31
+ }) => values), {
42
32
  getNextPageParam: (lastPage, allPages) => lastPage.length === PAGE_SIZE ? allPages.length : undefined,
43
33
  keepPreviousData: true
44
34
  });
@@ -73,8 +63,7 @@ const useCredentialSchemaAccept = () => {
73
63
  });
74
64
  };
75
65
  exports.useCredentialSchemaAccept = useCredentialSchemaAccept;
76
- const useCredentialSchemaDetail = function (credentialId) {
77
- let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
66
+ const useCredentialSchemaDetail = (credentialId, active = true) => {
78
67
  const {
79
68
  core
80
69
  } = (0, _coreContext.useONECore)();
@@ -92,7 +81,7 @@ const useCredentialSchemaDelete = () => {
92
81
  return (0, _reactQuery.useMutation)(async credentialSchemaId => core.deleteCredentialSchema(credentialSchemaId), {
93
82
  onSuccess: async (_, credentialId) => {
94
83
  await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
95
- await queryClient.invalidateQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);
84
+ await queryClient.removeQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);
96
85
  await queryClient.invalidateQueries(_history.HISTORY_LIST_QUERY_KEY);
97
86
  }
98
87
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_reactQuery","require","_query","_client","_coreContext","_history","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","exports","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","useONECore","useInfiniteQuery","getQueryKeyFromCredentialSchemaListQueryParams","_ref","pageParam","getCredentialSchemas","page","pageSize","then","_ref2","values","getNextPageParam","lastPage","allPages","length","undefined","keepPreviousData","useCredentialSchemaPreview","url","httpClient","useHTTPClient","useQuery","get","response","ok","originalError","data","useCredentialSchemaAccept","queryClient","useQueryClient","useMutation","schema","importCredentialSchema","onSuccess","invalidateQueries","HISTORY_LIST_QUERY_KEY","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 ke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C,OAAO,CAACM,QAAQ,CAAC;IAC1BhC,gBAAgB,EAAE;EACpB,CAAC,CACF;AACH,CAAC;AAACxB,OAAA,CAAAuD,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"names":["_reactQuery","require","_query","_client","_coreContext","_history","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","exports","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","useONECore","useInfiniteQuery","getQueryKeyFromCredentialSchemaListQueryParams","pageParam","getCredentialSchemas","page","pageSize","then","values","getNextPageParam","lastPage","allPages","length","undefined","keepPreviousData","useCredentialSchemaPreview","url","httpClient","useHTTPClient","useQuery","get","response","ok","originalError","data","useCredentialSchemaAccept","queryClient","useQueryClient","useMutation","schema","importCredentialSchema","onSuccess","invalidateQueries","HISTORY_LIST_QUERY_KEY","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,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,MAAMK,SAAS,GAAG,EAAE;AACb,MAAMC,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAAG,wBAAwB;AACjE,MAAME,kCAAkC,GAAAD,OAAA,CAAAC,kCAAA,GAAG,0BAA0B;AACrE,MAAMC,mCAAmC,GAAAF,OAAA,CAAAE,mCAAA,GAAG,2BAA2B;AACvE,MAAMC,iCAAiC,GAAAH,OAAA,CAAAG,iCAAA,GAAG,yBAAyB;AAEnE,MAAMC,oBAAoB,GAAIC,WAAgD,IAAK;EACxF,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAU,EAAC,CAAC;EAE7C,OAAO,IAAAC,4BAAgB,EACrB,CAACV,gCAAgC,EAAE,GAAG,IAAAW,qDAA8C,EAACL,WAAW,CAAC,CAAC,EAClG,CAAC;IAAEM,SAAS,GAAG;EAAE,CAAC,KAChBL,IAAI,CACDM,oBAAoB,CAAC;IACpBL,cAAc;IACdM,IAAI,EAAEF,SAAS;IACfG,QAAQ,EAAEhB,SAAS;IACnB,GAAGO;EACL,CAAC,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AAO,IAAAmB,oBAAQ,EACb,CAACxB,iCAAiC,EAAEmD,QAAQ,CAAC,EAC7C,MAAOA,QAAQ,GAAGhD,IAAI,CAACiD,qBAAqB,CAACD,QAAQ,CAAC,GAAGE,OAAO,CAACC,MAAM,CAAC,CAAE,EAC1E;IACEX,OAAO,EAAEC,OAAO,CAACO,QAAQ,CAAC;IAC1BhC,gBAAgB,EAAE;EACpB,CACF,CAAC;AACH,CAAC;AAACtB,OAAA,CAAAqD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.usePagedCredentials = exports.useInvitationHandler = exports.useInvalidateCredentialDetails = exports.useCredentials = exports.useCredentialRevocationCheck = exports.useCredentialReject = exports.useCredentialDetail = exports.useCredentialDelete = exports.useCredentialAccept = void 0;
6
+ exports.usePagedCredentials = exports.useInvitationHandler = exports.useInvalidateCredentialDetails = exports.useCredentials = exports.useCredentialRevocationCheck = exports.useCredentialReject = exports.useCredentialDetail = exports.useCredentialDelete = exports.useCredentialAccept = exports.CREDENTIAL_LIST_QUERY_KEY = exports.CREDENTIAL_LIST_PAGED_QUERY_KEY = exports.CREDENTIAL_DETAIL_QUERY_KEY = void 0;
7
7
  var _reactNativeOneCore = require("@procivis/react-native-one-core");
8
8
  var _reactQuery = require("react-query");
9
9
  var _query = require("../../parsers/query");
@@ -12,9 +12,9 @@ var _credentialSchemas = require("./credential-schemas");
12
12
  var _errorCode = require("./error-code");
13
13
  var _history = require("./history");
14
14
  const PAGE_SIZE = 20;
15
- const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
16
- const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
17
- const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
15
+ const CREDENTIAL_LIST_QUERY_KEY = exports.CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
16
+ const CREDENTIAL_LIST_PAGED_QUERY_KEY = exports.CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
17
+ const CREDENTIAL_DETAIL_QUERY_KEY = exports.CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
18
18
  const useCredentials = queryParams => {
19
19
  const {
20
20
  core,
@@ -42,25 +42,21 @@ const usePagedCredentials = queryParams => {
42
42
  core,
43
43
  organisationId
44
44
  } = (0, _coreContext.useONECore)();
45
- return (0, _reactQuery.useInfiniteQuery)([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...(0, _query.getQueryKeyFromCredentialListQueryParams)(queryParams)], _ref => {
46
- let {
47
- pageParam = 0
48
- } = _ref;
49
- return core.getCredentials({
50
- organisationId,
51
- page: pageParam,
52
- pageSize: PAGE_SIZE,
53
- status: [_reactNativeOneCore.CredentialStateEnum.ACCEPTED, _reactNativeOneCore.CredentialStateEnum.SUSPENDED, _reactNativeOneCore.CredentialStateEnum.REVOKED],
54
- ...queryParams
55
- });
56
- }, {
45
+ return (0, _reactQuery.useInfiniteQuery)([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...(0, _query.getQueryKeyFromCredentialListQueryParams)(queryParams)], ({
46
+ pageParam = 0
47
+ }) => core.getCredentials({
48
+ organisationId,
49
+ page: pageParam,
50
+ pageSize: PAGE_SIZE,
51
+ status: [_reactNativeOneCore.CredentialStateEnum.ACCEPTED, _reactNativeOneCore.CredentialStateEnum.SUSPENDED, _reactNativeOneCore.CredentialStateEnum.REVOKED],
52
+ ...queryParams
53
+ }), {
57
54
  getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
58
55
  keepPreviousData: true
59
56
  });
60
57
  };
61
58
  exports.usePagedCredentials = usePagedCredentials;
62
- const useCredentialDetail = function (credentialId) {
63
- let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
59
+ const useCredentialDetail = (credentialId, active = true) => {
64
60
  const {
65
61
  core
66
62
  } = (0, _coreContext.useONECore)();
@@ -76,13 +72,10 @@ const useInvitationHandler = () => {
76
72
  core,
77
73
  organisationId
78
74
  } = (0, _coreContext.useONECore)();
79
- return (0, _reactQuery.useMutation)(async _ref2 => {
80
- let {
81
- invitationUrl,
82
- transport
83
- } = _ref2;
84
- return core.handleInvitation(invitationUrl, organisationId, [transport]);
85
- }, {
75
+ return (0, _reactQuery.useMutation)(async ({
76
+ invitationUrl,
77
+ transport
78
+ }) => core.handleInvitation(invitationUrl, organisationId, [transport]), {
86
79
  onSuccess: async result => {
87
80
  if ('credentialIds' in result) {
88
81
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
@@ -98,15 +91,13 @@ const useCredentialAccept = () => {
98
91
  const {
99
92
  core
100
93
  } = (0, _coreContext.useONECore)();
101
- return (0, _reactQuery.useMutation)(async _ref3 => {
102
- let {
103
- interactionId,
104
- didId,
105
- keyId,
106
- txCode
107
- } = _ref3;
108
- return core.holderAcceptCredential(interactionId, didId, keyId, txCode);
109
- }, {
94
+ return (0, _reactQuery.useMutation)(async ({
95
+ interactionId,
96
+ didId,
97
+ identifierId,
98
+ keyId,
99
+ txCode
100
+ }) => core.holderAcceptCredential(interactionId, didId, identifierId, keyId, txCode), {
110
101
  onSuccess: async () => {
111
102
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
112
103
  await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
@@ -134,12 +125,12 @@ const useCredentialReject = () => {
134
125
  });
135
126
  };
136
127
  exports.useCredentialReject = useCredentialReject;
137
- const useCredentialRevocationCheck = bypassCache => {
128
+ const useCredentialRevocationCheck = forceRefresh => {
138
129
  const queryClient = (0, _reactQuery.useQueryClient)();
139
130
  const {
140
131
  core
141
132
  } = (0, _coreContext.useONECore)();
142
- return (0, _reactQuery.useMutation)(async credentialIds => core.checkRevocation(credentialIds, bypassCache), {
133
+ return (0, _reactQuery.useMutation)(async credentialIds => core.checkRevocation(credentialIds, forceRefresh), {
143
134
  onSuccess: async () => {
144
135
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
145
136
  await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
@@ -156,7 +147,7 @@ const useCredentialDelete = () => {
156
147
  return (0, _reactQuery.useMutation)(async credentialId => core.deleteCredential(credentialId), {
157
148
  onSuccess: async (_, credentialId) => {
158
149
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
159
- await queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
150
+ await queryClient.removeQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
160
151
  await queryClient.invalidateQueries(_history.HISTORY_LIST_QUERY_KEY);
161
152
  }
162
153
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeOneCore","require","_reactQuery","_query","_coreContext","_credentialSchemas","_errorCode","_history","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","useONECore","useQuery","getQueryKeyFromCredentialListQueryParams","values","getCredentials","page","pageSize","status","CredentialStateEnum","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","exports","usePagedCredentials","useInfiniteQuery","_ref","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","arguments","getCredential","enabled","Boolean","useInvitationHandler","queryClient","useQueryClient","useMutation","_ref2","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","HISTORY_LIST_QUERY_KEY","useCredentialAccept","_ref3","interactionId","didId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","OneError","code","OneErrorCode","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_QUERY_KEY, credentialId]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAOA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAEA,MAAMO,SAAS,GAAG,EAAE;AACpB,MAAMC,yBAAyB,GAAG,iBAAiB;AACnD,MAAMC,+BAA+B,GAAG,uBAAuB;AAC/D,MAAMC,2BAA2B,GAAG,mBAAmB;AAEhD,MAAMC,cAAc,GAAIC,WAA0C,IAAK;EAC5E,MAAM;IAA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EAAE8B,YAAY,CAAC,CAAC;MAChF,MAAMO,WAAW,CAACS,iBAAiB,CAACE,+BAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAAC9B,OAAA,CAAAkD,mBAAA,GAAAA,mBAAA;AAEK,MAAMG,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAMlC,WAAW,GAAG,IAAAC,0BAAc,GAAE;EAEpC,OAAQR,YAAgC,IACtCO,WAAW,CAACS,iBAAiB,CAAC,CAAC9C,2BAA2B,EAAE8B,YAAY,CAAC,CAAC;AAC9E,CAAC;AAACZ,OAAA,CAAAqD,8BAAA,GAAAA,8BAAA"}
1
+ {"version":3,"names":["_reactNativeOneCore","require","_reactQuery","_query","_coreContext","_credentialSchemas","_errorCode","_history","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","exports","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","useONECore","useQuery","getQueryKeyFromCredentialListQueryParams","values","getCredentials","page","pageSize","status","CredentialStateEnum","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","usePagedCredentials","useInfiniteQuery","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","getCredential","enabled","Boolean","useInvitationHandler","queryClient","useQueryClient","useMutation","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","HISTORY_LIST_QUERY_KEY","useCredentialAccept","interactionId","didId","identifierId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","OneError","code","OneErrorCode","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 = {\n didId?: string;\n identifierId?: string;\n interactionId: string;\n keyId?: string;\n txCode?: string;\n };\n\n return useMutation(\n async ({ interactionId, didId, identifierId, keyId, txCode }: CredentialAcceptHookParams) =>\n core.holderAcceptCredential(interactionId, didId, identifierId, 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,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAEA,MAAMO,SAAS,GAAG,EAAE;AACb,MAAMC,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,iBAAiB;AACnD,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,uBAAuB;AAC/D,MAAMC,2BAA2B,GAAAF,OAAA,CAAAE,2BAAA,GAAG,mBAAmB;AAEvD,MAAMC,cAAc,GAAIC,WAA0C,IAAK;EAC5E,MAAM;IAAEC,IAAI;IAAEC;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F,CAAC,CAAC;AACJ,CAAC;AAAC9C,OAAA,CAAAkE,mBAAA,GAAAA,mBAAA;AAEK,MAAMI,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAMlC,WAAW,GAAG,IAAAC,0BAAc,EAAC,CAAC;EAEpC,OAAQP,YAAgC,IACtCM,WAAW,CAACQ,iBAAiB,CAAC,CAAC1C,2BAA2B,EAAE4B,YAAY,CAAC,CAAC;AAC9E,CAAC;AAAC9B,OAAA,CAAAsE,8BAAA,GAAAA,8BAAA","ignoreList":[]}
@@ -9,17 +9,15 @@ var _reactQuery = require("react-query");
9
9
  var _query = require("../../parsers/query");
10
10
  var _coreContext = require("./core-context");
11
11
  const PAGE_SIZE = 20;
12
- const DID_LIST_QUERY_KEY = 'did-list';
13
- exports.DID_LIST_QUERY_KEY = DID_LIST_QUERY_KEY;
12
+ const DID_LIST_QUERY_KEY = exports.DID_LIST_QUERY_KEY = 'did-list';
14
13
  const useDids = queryParams => {
15
14
  const {
16
15
  core,
17
16
  organisationId
18
17
  } = (0, _coreContext.useONECore)();
19
- return (0, _reactQuery.useQuery)([DID_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromDidListQueryParams)(queryParams)], async _ref => {
20
- let {
21
- pageParam = 0
22
- } = _ref;
18
+ return (0, _reactQuery.useQuery)([DID_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromDidListQueryParams)(queryParams)], async ({
19
+ pageParam = 0
20
+ }) => {
23
21
  const dids = await core.getDids({
24
22
  deactivated: false,
25
23
  organisationId,
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeOneCore","require","_reactQuery","_query","_coreContext","PAGE_SIZE","DID_LIST_QUERY_KEY","exports","useDids","queryParams","core","organisationId","useONECore","useQuery","getQueryKeyFromDidListQueryParams","_ref","pageParam","dids","getDids","deactivated","page","pageSize","type","DidTypeEnum","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,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAEA,MAAMI,SAAS,GAAG,EAAE;AACb,MAAMC,kBAAkB,GAAG,UAAU;AAACC,OAAA,CAAAD,kBAAA,GAAAA,kBAAA;AAEtC,MAAME,OAAO,GAAIC,WAAmC,IAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAU,GAAE;EAE7C,OAAO,IAAAC,oBAAQ,EACb,CAACP,kBAAkB,EAAE,GAAG,IAAAQ,wCAAiC,EAACL,WAAW,CAAC,CAAC,EACvE,MAAAM,IAAA,IAA6B;IAAA,IAAtB;MAAEC,SAAS,GAAG;IAAE,CAAC,GAAAD,IAAA;IACtB,MAAME,IAAI,GAAG,MAAMP,IAAI,CAACQ,OAAO,CAAC;MAC9BC,WAAW,EAAE,KAAK;MAClBR,cAAc;MACdS,IAAI,EAAEJ,SAAS;MACfK,QAAQ,EAAEhB,SAAS;MACnBiB,IAAI,EAAEC,+BAAW,CAACC,KAAK;MACvB,GAAGf;IACL,CAAC,CAAC;IAEF,OAAOQ,IAAI;EACb,CAAC,CACF;AACH,CAAC;AAACV,OAAA,CAAAC,OAAA,GAAAA,OAAA"}
1
+ {"version":3,"names":["_reactNativeOneCore","require","_reactQuery","_query","_coreContext","PAGE_SIZE","DID_LIST_QUERY_KEY","exports","useDids","queryParams","core","organisationId","useONECore","useQuery","getQueryKeyFromDidListQueryParams","pageParam","dids","getDids","deactivated","page","pageSize","type","DidTypeEnum","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,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAEA,MAAMI,SAAS,GAAG,EAAE;AACb,MAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,UAAU;AAErC,MAAME,OAAO,GAAIC,WAAmC,IAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAU,EAAC,CAAC;EAE7C,OAAO,IAAAC,oBAAQ,EACb,CAACP,kBAAkB,EAAE,GAAG,IAAAQ,wCAAiC,EAACL,WAAW,CAAC,CAAC,EACvE,OAAO;IAAEM,SAAS,GAAG;EAAE,CAAC,KAAK;IAC3B,MAAMC,IAAI,GAAG,MAAMN,IAAI,CAACO,OAAO,CAAC;MAC9BC,WAAW,EAAE,KAAK;MAClBP,cAAc;MACdQ,IAAI,EAAEJ,SAAS;MACfK,QAAQ,EAAEf,SAAS;MACnBgB,IAAI,EAAEC,+BAAW,CAACC,KAAK;MACvB,GAAGd;IACL,CAAC,CAAC;IAEF,OAAOO,IAAI;EACb,CACF,CAAC;AACH,CAAC;AAACT,OAAA,CAAAC,OAAA,GAAAA,OAAA","ignoreList":[]}
@@ -4,12 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.OneErrorCode = void 0;
7
- let OneErrorCode;
8
- exports.OneErrorCode = OneErrorCode;
9
- (function (OneErrorCode) {
7
+ let OneErrorCode = exports.OneErrorCode = /*#__PURE__*/function (OneErrorCode) {
10
8
  OneErrorCode["OrganisationAlreadyExists"] = "BR_0023";
11
9
  OneErrorCode["KeyStorageNotSupported"] = "BR_0039";
12
10
  OneErrorCode["OperationNotSupported"] = "BR_0062";
13
11
  OneErrorCode["NoTrustEntityFound"] = "BR_0186";
14
- })(OneErrorCode || (exports.OneErrorCode = OneErrorCode = {}));
12
+ return OneErrorCode;
13
+ }({});
15
14
  //# sourceMappingURL=error-code.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["OneErrorCode","exports"],"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":";;;;;;IAAYA,YAAY;AAAAC,OAAA,CAAAD,YAAA,GAAAA,YAAA;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAAC,OAAA,CAAAD,YAAA,GAAZA,YAAY"}
1
+ {"version":3,"names":["OneErrorCode","exports"],"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":";;;;;;IAAYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA","ignoreList":[]}
@@ -4,58 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useHistory = exports.HISTORY_LIST_QUERY_KEY = void 0;
7
- var _reactNativeOneCore = require("@procivis/react-native-one-core");
8
7
  var _reactQuery = require("react-query");
9
8
  var _query = require("../../parsers/query");
10
9
  var _coreContext = require("./core-context");
11
10
  const PAGE_SIZE = 20;
12
- const HISTORY_LIST_QUERY_KEY = 'history-list';
13
- exports.HISTORY_LIST_QUERY_KEY = HISTORY_LIST_QUERY_KEY;
11
+ const HISTORY_LIST_QUERY_KEY = exports.HISTORY_LIST_QUERY_KEY = 'history-list';
14
12
  const useHistory = queryParams => {
15
13
  const {
16
14
  core,
17
15
  organisationId
18
16
  } = (0, _coreContext.useONECore)();
19
- return (0, _reactQuery.useInfiniteQuery)([HISTORY_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromHistoryListQueryParams)(queryParams)], async _ref => {
20
- let {
21
- pageParam = 0
22
- } = _ref;
17
+ return (0, _reactQuery.useInfiniteQuery)([HISTORY_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromHistoryListQueryParams)(queryParams)], async ({
18
+ pageParam = 0
19
+ }) => {
23
20
  const historyPage = await core.getHistory({
24
21
  organisationId,
25
22
  page: pageParam,
26
23
  pageSize: PAGE_SIZE,
27
24
  ...queryParams
28
25
  });
29
- const credentialIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === _reactNativeOneCore.HistoryEntityTypeEnum.CREDENTIAL).map(historyItem => historyItem.entityId)));
30
- const proofIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === _reactNativeOneCore.HistoryEntityTypeEnum.PROOF).map(historyItem => historyItem.entityId)));
31
- const credentials = await core.getCredentials({
32
- ids: credentialIds,
33
- organisationId,
34
- page: 0,
35
- pageSize: credentialIds.length
36
- });
37
- const credentialDidsMap = Object.assign({}, ...credentials.values.map(credential => ({
38
- [credential.id]: credential.issuerDid
39
- })));
40
- const proofs = await Promise.all(proofIds.map(id => core.getProof(id)));
41
- const proofDidsMap = Object.assign({}, ...proofs.map(proof => {
42
- var _proof$verifierDid;
43
- return {
44
- [proof.id]: (_proof$verifierDid = proof.verifierDid) === null || _proof$verifierDid === void 0 ? void 0 : _proof$verifierDid.did
45
- };
46
- }));
47
- const result = {
48
- totalItems: historyPage.totalItems,
49
- totalPages: historyPage.totalPages,
50
- values: historyPage.values.map(item => {
51
- const did = item.entityType === _reactNativeOneCore.HistoryEntityTypeEnum.CREDENTIAL ? credentialDidsMap[item.entityId] : proofDidsMap[item.entityId];
52
- return {
53
- ...item,
54
- did
55
- };
56
- })
57
- };
58
- return result;
26
+ return historyPage;
59
27
  }, {
60
28
  getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
61
29
  keepPreviousData: true
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeOneCore","require","_reactQuery","_query","_coreContext","PAGE_SIZE","HISTORY_LIST_QUERY_KEY","exports","useHistory","queryParams","core","organisationId","useONECore","useInfiniteQuery","getQueryKeyFromHistoryListQueryParams","_ref","pageParam","historyPage","getHistory","page","pageSize","credentialIds","Array","from","Set","values","filter","historyItem","entityType","HistoryEntityTypeEnum","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,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAMA,MAAMI,SAAS,GAAG,EAAE;AACb,MAAMC,sBAAsB,GAAG,cAAc;AAACC,OAAA,CAAAD,sBAAA,GAAAA,sBAAA;AAE9C,MAAME,UAAU,GAAIC,WAAuC,IAAK;EACrE,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAU,GAAE;EAE7C,OAAO,IAAAC,4BAAgB,EACrB,CAACP,sBAAsB,EAAE,GAAG,IAAAQ,4CAAqC,EAACL,WAAW,CAAC,CAAC,EAC/E,MAAAM,IAAA,IAA6B;IAAA,IAAtB;MAAEC,SAAS,GAAG;IAAE,CAAC,GAAAD,IAAA;IACtB,MAAME,WAAW,GAAG,MAAMP,IAAI,CAACQ,UAAU,CAAC;MACxCP,cAAc;MACdQ,IAAI,EAAEH,SAAS;MACfI,QAAQ,EAAEf,SAAS;MACnB,GAAGI;IACL,CAAC,CAAC;IAEF,MAAMY,aAAa,GAAGC,KAAK,CAACC,IAAI,CAC9B,IAAIC,GAAG,CACLP,WAAW,CAACQ,MAAM,CACfC,MAAM,CAAEC,WAAW,IAAKA,WAAW,CAACC,UAAU,KAAKC,yCAAqB,CAACC,UAAU,CAAC,CACpFC,GAAG,CAAEJ,WAAW,IAAKA,WAAW,CAACK,QAAS,CAAC,CAC/C,CACF;IACD,MAAMC,QAAQ,GAAGX,KAAK,CAACC,IAAI,CACzB,IAAIC,GAAG,CACLP,WAAW,CAACQ,MAAM,CACfC,MAAM,CAAEC,WAAW,IAAKA,WAAW,CAACC,UAAU,KAAKC,yCAAqB,CAACK,KAAK,CAAC,CAC/EH,GAAG,CAAEJ,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O;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;AAACvD,OAAA,CAAAC,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_reactQuery","require","_query","_coreContext","PAGE_SIZE","HISTORY_LIST_QUERY_KEY","exports","useHistory","queryParams","core","organisationId","useONECore","useInfiniteQuery","getQueryKeyFromHistoryListQueryParams","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,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,SAAS,GAAG,EAAE;AACb,MAAMC,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,cAAc;AAE7C,MAAME,UAAU,GAAIC,WAAuC,IAAK;EACrE,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAU,EAAC,CAAC;EAE7C,OAAO,IAAAC,4BAAgB,EACrB,CAACP,sBAAsB,EAAE,GAAG,IAAAQ,4CAAqC,EAACL,WAAW,CAAC,CAAC,EAC/E,OAAO;IAAEM,SAAS,GAAG;EAAE,CAAC,KAAK;IAC3B,MAAMC,WAAW,GAAG,MAAMN,IAAI,CAACO,UAAU,CAAC;MACxCN,cAAc;MACdO,IAAI,EAAEH,SAAS;MACfI,QAAQ,EAAEd,SAAS;MACnB,GAAGI;IACL,CAAC,CAAC;IAEF,OAAOO,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;AAACnB,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useIdentifierDetails = exports.IDENTIFIER_DETAIL_QUERY_KEY = void 0;
7
+ var _reactQuery = require("react-query");
8
+ var _coreContext = require("./core-context");
9
+ const IDENTIFIER_DETAIL_QUERY_KEY = exports.IDENTIFIER_DETAIL_QUERY_KEY = 'identifier-detail';
10
+ const useIdentifierDetails = identifierId => {
11
+ const {
12
+ core
13
+ } = (0, _coreContext.useONECore)();
14
+ return (0, _reactQuery.useQuery)([IDENTIFIER_DETAIL_QUERY_KEY, identifierId], () => identifierId ? core.getIdentifier(identifierId) : undefined, {
15
+ enabled: Boolean(identifierId),
16
+ keepPreviousData: true
17
+ });
18
+ };
19
+ exports.useIdentifierDetails = useIdentifierDetails;
20
+ //# sourceMappingURL=identifiers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactQuery","require","_coreContext","IDENTIFIER_DETAIL_QUERY_KEY","exports","useIdentifierDetails","identifierId","core","useONECore","useQuery","getIdentifier","undefined","enabled","Boolean","keepPreviousData"],"sources":["identifiers.ts"],"sourcesContent":["import { useQuery } from \"react-query\";\n\nimport { useONECore } from \"./core-context\";\n\nexport const IDENTIFIER_DETAIL_QUERY_KEY = 'identifier-detail';\n\nexport const useIdentifierDetails = (identifierId: string | undefined) => {\n const { core } = useONECore();\n\n return useQuery(\n [IDENTIFIER_DETAIL_QUERY_KEY, identifierId],\n () => (identifierId ? core.getIdentifier(identifierId) : undefined),\n {\n enabled: Boolean(identifierId),\n keepPreviousData: true,\n },\n );\n}"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEO,MAAME,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,mBAAmB;AAEvD,MAAME,oBAAoB,GAAIC,YAAgC,IAAK;EACxE,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,uBAAU,EAAC,CAAC;EAE7B,OAAO,IAAAC,oBAAQ,EACb,CAACN,2BAA2B,EAAEG,YAAY,CAAC,EAC3C,MAAOA,YAAY,GAAGC,IAAI,CAACG,aAAa,CAACJ,YAAY,CAAC,GAAGK,SAAU,EACnE;IACEC,OAAO,EAAEC,OAAO,CAACP,YAAY,CAAC;IAC9BQ,gBAAgB,EAAE;EACpB,CACF,CAAC;AACH,CAAC;AAAAV,OAAA,CAAAC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -14,6 +14,17 @@ Object.keys(_backup).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
+ var _cache = require("./cache");
18
+ Object.keys(_cache).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _cache[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _cache[key];
25
+ }
26
+ });
27
+ });
17
28
  var _coreConfig = require("./core-config");
18
29
  Object.keys(_coreConfig).forEach(function (key) {
19
30
  if (key === "default" || key === "__esModule") return;
@@ -91,6 +102,17 @@ Object.keys(_history).forEach(function (key) {
91
102
  }
92
103
  });
93
104
  });
105
+ var _identifiers = require("./identifiers");
106
+ Object.keys(_identifiers).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _identifiers[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _identifiers[key];
113
+ }
114
+ });
115
+ });
94
116
  var _proofSchemas = require("./proof-schemas");
95
117
  Object.keys(_proofSchemas).forEach(function (key) {
96
118
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"names":["_backup","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_coreConfig","_coreContext","_coreInit","_credentialSchemas","_credentials","_dids","_history","_proofSchemas","_proofs","_query","_trustEntity"],"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,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MA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;AAAAC,MAAA,CAAAC,IAAA,CAAAiB,YAAA,EAAAhB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAe,YAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,YAAA,CAAAf,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_backup","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_cache","_coreConfig","_coreContext","_coreInit","_credentialSchemas","_credentials","_dids","_history","_identifiers","_proofSchemas","_proofs","_query","_trustEntity"],"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 './identifiers';\nexport * from './proof-schemas';\nexport * from './proofs';\nexport * from './query';\nexport * from './trust-entity';"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAA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