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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (874) hide show
  1. package/README.md +3 -8
  2. package/lib/commonjs/components/backup/index.js.map +1 -1
  3. package/lib/commonjs/components/backup/preview-credentials.js +18 -22
  4. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  5. package/lib/commonjs/components/credential/credential.js +11 -12
  6. package/lib/commonjs/components/credential/credential.js.map +1 -1
  7. package/lib/commonjs/components/credential/index.js.map +1 -1
  8. package/lib/commonjs/components/entity/EntityButtons.js +20 -25
  9. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  10. package/lib/commonjs/components/entity/entity-attributes.js +15 -17
  11. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  12. package/lib/commonjs/components/entity/entity-details-with-buttons.js +18 -19
  13. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  14. package/lib/commonjs/components/entity/entity-details.js +12 -14
  15. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  16. package/lib/commonjs/components/entity/index.js +2 -2
  17. package/lib/commonjs/components/entity/index.js.map +1 -1
  18. package/lib/commonjs/components/history/history-details-screen.js +67 -0
  19. package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
  20. package/lib/commonjs/components/history/history-list-item-icon.js +94 -0
  21. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
  22. package/lib/commonjs/components/history/history-list-item.js +45 -0
  23. package/lib/commonjs/components/history/history-list-item.js.map +1 -0
  24. package/lib/commonjs/components/history/history-list-screen.js +121 -0
  25. package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
  26. package/lib/commonjs/components/history/history-list-section-header.js +39 -0
  27. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
  28. package/lib/commonjs/components/history/history-list.js +100 -0
  29. package/lib/commonjs/components/history/history-list.js.map +1 -0
  30. package/lib/commonjs/components/history/index.js +72 -0
  31. package/lib/commonjs/components/history/index.js.map +1 -0
  32. package/lib/commonjs/components/index.js +11 -0
  33. package/lib/commonjs/components/index.js.map +1 -1
  34. package/lib/commonjs/components/navigation/header-buttons.js +21 -25
  35. package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
  36. package/lib/commonjs/components/navigation/index.js.map +1 -1
  37. package/lib/commonjs/components/proof-request/group.js +4 -5
  38. package/lib/commonjs/components/proof-request/group.js.map +1 -1
  39. package/lib/commonjs/components/proof-request/index.js.map +1 -1
  40. package/lib/commonjs/components/proof-request/select-credential.js +11 -12
  41. package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
  42. package/lib/commonjs/components/proof-request/share-credential.js +23 -27
  43. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/commonjs/normalize-color.d.js.map +1 -1
  46. package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
  47. package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
  48. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
  49. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  50. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
  51. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  52. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
  53. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  54. package/lib/commonjs/ui-components/accessibility/index.js +1 -30
  55. package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
  56. package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
  57. package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
  58. package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
  59. package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
  60. package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
  61. package/lib/commonjs/ui-components/action-modal/index.js +1 -1
  62. package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
  63. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
  64. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  65. package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
  66. package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
  67. package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
  68. package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
  69. package/lib/commonjs/ui-components/blur/index.js +2 -2
  70. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  71. package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
  72. package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
  73. package/lib/commonjs/ui-components/buttons/button.js +19 -22
  74. package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
  75. package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
  76. package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
  77. package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
  78. package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
  79. package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
  80. package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
  81. package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
  82. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
  83. package/lib/commonjs/ui-components/buttons/index.js +9 -37
  84. package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
  85. package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
  86. package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
  87. package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
  88. package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
  89. package/lib/commonjs/ui-components/camera/index.js +2 -2
  90. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  91. package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
  92. package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
  93. package/lib/commonjs/ui-components/control/checkbox.js +11 -12
  94. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  95. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  96. package/lib/commonjs/ui-components/control/switch.js +10 -12
  97. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  98. package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
  99. package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
  100. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
  101. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  102. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
  103. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  104. package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
  105. package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
  106. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
  107. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  108. package/lib/commonjs/ui-components/credential/card/index.js +6 -41
  109. package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
  110. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
  111. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  112. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
  113. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  114. package/lib/commonjs/ui-components/credential/index.js +2 -25
  115. package/lib/commonjs/ui-components/credential/index.js.map +1 -1
  116. package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
  117. package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
  118. package/lib/commonjs/ui-components/credential/selector.js +8 -10
  119. package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
  120. package/lib/commonjs/ui-components/detail/detail.js +12 -14
  121. package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
  122. package/lib/commonjs/ui-components/detail/index.js +1 -1
  123. package/lib/commonjs/ui-components/detail/index.js.map +1 -1
  124. package/lib/commonjs/ui-components/entity/avatar.js +14 -16
  125. package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
  126. package/lib/commonjs/ui-components/entity/entity-cluster.js +15 -18
  127. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  128. package/lib/commonjs/ui-components/entity/index.js +2 -2
  129. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  130. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
  131. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
  132. package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
  133. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  134. package/lib/commonjs/ui-components/header/header.js +12 -14
  135. package/lib/commonjs/ui-components/header/header.js.map +1 -1
  136. package/lib/commonjs/ui-components/header/index.js +4 -24
  137. package/lib/commonjs/ui-components/header/index.js.map +1 -1
  138. package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
  139. package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
  140. package/lib/commonjs/ui-components/history/data-item.js +30 -23
  141. package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
  142. package/lib/commonjs/ui-components/history/history-details.js +181 -0
  143. package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
  144. package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
  145. package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
  146. package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
  147. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  148. package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
  149. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  150. package/lib/commonjs/ui-components/history/index.js +30 -9
  151. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  152. package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
  153. package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
  154. package/lib/commonjs/ui-components/icons/credential.js +60 -71
  155. package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
  156. package/lib/commonjs/ui-components/icons/entity.js +7 -8
  157. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  158. package/lib/commonjs/ui-components/icons/history.js +113 -133
  159. package/lib/commonjs/ui-components/icons/history.js.map +1 -1
  160. package/lib/commonjs/ui-components/icons/icons.js +73 -90
  161. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  162. package/lib/commonjs/ui-components/icons/index.js.map +1 -1
  163. package/lib/commonjs/ui-components/icons/input.js +3 -3
  164. package/lib/commonjs/ui-components/icons/input.js.map +1 -1
  165. package/lib/commonjs/ui-components/icons/keypad.js +69 -81
  166. package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
  167. package/lib/commonjs/ui-components/icons/loader.js +4 -4
  168. package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
  169. package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
  170. package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
  171. package/lib/commonjs/ui-components/icons/selector.js +8 -9
  172. package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
  173. package/lib/commonjs/ui-components/icons/wallet.js +16 -19
  174. package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
  175. package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
  176. package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
  177. package/lib/commonjs/ui-components/image/index.js +2 -9
  178. package/lib/commonjs/ui-components/image/index.js.map +1 -1
  179. package/lib/commonjs/ui-components/index.js.map +1 -1
  180. package/lib/commonjs/ui-components/input/index.js +2 -2
  181. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  182. package/lib/commonjs/ui-components/input/radio-group.js +28 -25
  183. package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
  184. package/lib/commonjs/ui-components/input/selection-input.js +27 -38
  185. package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
  186. package/lib/commonjs/ui-components/input/text-input.js +25 -28
  187. package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
  188. package/lib/commonjs/ui-components/list/index.js +20 -2
  189. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  190. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
  191. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
  192. package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
  193. package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
  194. package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
  195. package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
  196. package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
  197. package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
  198. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
  199. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
  200. package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
  201. package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
  202. package/lib/commonjs/ui-components/loader/index.js +2 -2
  203. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  204. package/lib/commonjs/ui-components/loader/loader.js +17 -17
  205. package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
  206. package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
  207. package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
  208. package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
  209. package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
  210. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
  211. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  212. package/lib/commonjs/ui-components/pin/index.js +2 -2
  213. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  214. package/lib/commonjs/ui-components/pin/keypad.js +19 -23
  215. package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
  216. package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
  217. package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
  218. package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
  219. package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
  220. package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
  221. package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
  222. package/lib/commonjs/ui-components/pin/pins.js +8 -9
  223. package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
  224. package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
  225. package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
  226. package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
  227. package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
  228. package/lib/commonjs/ui-components/screens/index.js +8 -49
  229. package/lib/commonjs/ui-components/screens/index.js.map +1 -1
  230. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +34 -41
  231. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  232. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
  233. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  234. package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
  235. package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
  236. package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
  237. package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
  238. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
  239. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
  240. package/lib/commonjs/ui-components/searchbar/index.js +2 -2
  241. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  242. package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
  243. package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
  244. package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
  245. package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
  246. package/lib/commonjs/ui-components/settings/index.js +2 -2
  247. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  248. package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
  249. package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
  250. package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
  251. package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
  252. package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
  253. package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
  254. package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
  255. package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
  256. package/lib/commonjs/ui-components/state/error-screen.js +10 -12
  257. package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
  258. package/lib/commonjs/ui-components/state/index.js +2 -2
  259. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  260. package/lib/commonjs/ui-components/text/base.js +14 -16
  261. package/lib/commonjs/ui-components/text/base.js.map +1 -1
  262. package/lib/commonjs/ui-components/text/font.js +11 -13
  263. package/lib/commonjs/ui-components/text/font.js.map +1 -1
  264. package/lib/commonjs/ui-components/text/index.js +2 -9
  265. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  266. package/lib/commonjs/ui-components/text/typography.js +10 -13
  267. package/lib/commonjs/ui-components/text/typography.js.map +1 -1
  268. package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
  269. package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
  270. package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
  271. package/lib/commonjs/ui-components/theme/index.js.map +1 -1
  272. package/lib/commonjs/utils/array.js.map +1 -1
  273. package/lib/commonjs/utils/backup.js.map +1 -1
  274. package/lib/commonjs/utils/color.js +1 -1
  275. package/lib/commonjs/utils/color.js.map +1 -1
  276. package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
  277. package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
  278. package/lib/commonjs/utils/date.js +3 -3
  279. package/lib/commonjs/utils/date.js.map +1 -1
  280. package/lib/commonjs/utils/filtering.js +11 -0
  281. package/lib/commonjs/utils/filtering.js.map +1 -0
  282. package/lib/commonjs/utils/history.js +76 -0
  283. package/lib/commonjs/utils/history.js.map +1 -0
  284. package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
  285. package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
  286. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
  287. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  288. package/lib/commonjs/utils/hooks/core/backup.js +31 -31
  289. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  290. package/lib/commonjs/utils/hooks/core/cache.js +44 -0
  291. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
  292. package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
  293. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  294. package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
  295. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  296. package/lib/commonjs/utils/hooks/core/core-init.js +18 -12
  297. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  298. package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
  299. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  300. package/lib/commonjs/utils/hooks/core/credentials.js +27 -37
  301. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  302. package/lib/commonjs/utils/hooks/core/dids.js +4 -6
  303. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  304. package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
  305. package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
  306. package/lib/commonjs/utils/hooks/core/history.js +5 -37
  307. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  308. package/lib/commonjs/utils/hooks/core/index.js +11 -0
  309. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  310. package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
  311. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  312. package/lib/commonjs/utils/hooks/core/proofs.js +107 -76
  313. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  314. package/lib/commonjs/utils/hooks/core/query.js +1 -2
  315. package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
  316. package/lib/commonjs/utils/hooks/core/trust-entity.js +8 -4
  317. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  318. package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  319. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
  320. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  321. package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
  322. package/lib/commonjs/utils/hooks/index.js.map +1 -1
  323. package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
  324. package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
  325. package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
  326. package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  327. package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
  328. package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
  329. package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
  330. package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
  331. package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
  332. package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
  333. package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
  334. package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
  335. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  336. package/lib/commonjs/utils/index.js +37 -1
  337. package/lib/commonjs/utils/index.js.map +1 -1
  338. package/lib/commonjs/utils/navigation.js +5 -5
  339. package/lib/commonjs/utils/navigation.js.map +1 -1
  340. package/lib/commonjs/utils/parsers/credential-images.js +1 -1
  341. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  342. package/lib/commonjs/utils/parsers/credential-sharing.js +16 -20
  343. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  344. package/lib/commonjs/utils/parsers/credential.js +16 -26
  345. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  346. package/lib/commonjs/utils/parsers/index.js +11 -0
  347. package/lib/commonjs/utils/parsers/index.js.map +1 -1
  348. package/lib/commonjs/utils/parsers/query.js +3 -2
  349. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  350. package/lib/commonjs/utils/parsers/universal-links.js +33 -0
  351. package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
  352. package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
  353. package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
  354. package/lib/commonjs/utils/ref.js.map +1 -1
  355. package/lib/commonjs/utils/reporting.js +4 -2
  356. package/lib/commonjs/utils/reporting.js.map +1 -1
  357. package/lib/commonjs/utils/string.js.map +1 -1
  358. package/lib/commonjs/utils/testID.js +1 -4
  359. package/lib/commonjs/utils/testID.js.map +1 -1
  360. package/lib/commonjs/utils/testID.test.js.map +1 -1
  361. package/lib/commonjs/utils/useMemoAsync.js +9 -0
  362. package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
  363. package/lib/commonjs/utils/uuid.js +1 -1
  364. package/lib/commonjs/utils/uuid.js.map +1 -1
  365. package/lib/module/components/backup/index.js.map +1 -1
  366. package/lib/module/components/backup/preview-credentials.js +17 -21
  367. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  368. package/lib/module/components/credential/credential.js +10 -11
  369. package/lib/module/components/credential/credential.js.map +1 -1
  370. package/lib/module/components/credential/index.js.map +1 -1
  371. package/lib/module/components/entity/EntityButtons.js +17 -21
  372. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  373. package/lib/module/components/entity/entity-attributes.js +12 -13
  374. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  375. package/lib/module/components/entity/entity-details-with-buttons.js +15 -15
  376. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  377. package/lib/module/components/entity/entity-details.js +8 -9
  378. package/lib/module/components/entity/entity-details.js.map +1 -1
  379. package/lib/module/components/entity/index.js.map +1 -1
  380. package/lib/module/components/history/history-details-screen.js +59 -0
  381. package/lib/module/components/history/history-details-screen.js.map +1 -0
  382. package/lib/module/components/history/history-list-item-icon.js +84 -0
  383. package/lib/module/components/history/history-list-item-icon.js.map +1 -0
  384. package/lib/module/components/history/history-list-item.js +36 -0
  385. package/lib/module/components/history/history-list-item.js.map +1 -0
  386. package/lib/module/components/history/history-list-screen.js +112 -0
  387. package/lib/module/components/history/history-list-screen.js.map +1 -0
  388. package/lib/module/components/history/history-list-section-header.js +29 -0
  389. package/lib/module/components/history/history-list-section-header.js.map +1 -0
  390. package/lib/module/components/history/history-list.js +90 -0
  391. package/lib/module/components/history/history-list.js.map +1 -0
  392. package/lib/module/components/history/index.js +7 -0
  393. package/lib/module/components/history/index.js.map +1 -0
  394. package/lib/module/components/index.js +1 -0
  395. package/lib/module/components/index.js.map +1 -1
  396. package/lib/module/components/navigation/header-buttons.js +19 -23
  397. package/lib/module/components/navigation/header-buttons.js.map +1 -1
  398. package/lib/module/components/navigation/index.js.map +1 -1
  399. package/lib/module/components/proof-request/group.js +3 -4
  400. package/lib/module/components/proof-request/group.js.map +1 -1
  401. package/lib/module/components/proof-request/index.js.map +1 -1
  402. package/lib/module/components/proof-request/select-credential.js +10 -11
  403. package/lib/module/components/proof-request/select-credential.js.map +1 -1
  404. package/lib/module/components/proof-request/share-credential.js +21 -25
  405. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  406. package/lib/module/index.js.map +1 -1
  407. package/lib/module/normalize-color.d.js.map +1 -1
  408. package/lib/module/ui-components/accessibility/accessibility.js +5 -7
  409. package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
  410. package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
  411. package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  412. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
  413. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  414. package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
  415. package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  416. package/lib/module/ui-components/accessibility/index.js +4 -4
  417. package/lib/module/ui-components/accessibility/index.js.map +1 -1
  418. package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
  419. package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
  420. package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
  421. package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
  422. package/lib/module/ui-components/action-modal/index.js.map +1 -1
  423. package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
  424. package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  425. package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
  426. package/lib/module/ui-components/blur/blur-view.js +10 -11
  427. package/lib/module/ui-components/blur/blur-view.js.map +1 -1
  428. package/lib/module/ui-components/blur/index.js.map +1 -1
  429. package/lib/module/ui-components/buttons/back-button.js +10 -11
  430. package/lib/module/ui-components/buttons/back-button.js.map +1 -1
  431. package/lib/module/ui-components/buttons/button.js +17 -18
  432. package/lib/module/ui-components/buttons/button.js.map +1 -1
  433. package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
  434. package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
  435. package/lib/module/ui-components/buttons/filter-button.js +6 -7
  436. package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
  437. package/lib/module/ui-components/buttons/ghost-button.js +9 -10
  438. package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
  439. package/lib/module/ui-components/buttons/hold-button.js +236 -0
  440. package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
  441. package/lib/module/ui-components/buttons/index.js +8 -7
  442. package/lib/module/ui-components/buttons/index.js.map +1 -1
  443. package/lib/module/ui-components/buttons/scan-button.js +5 -6
  444. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  445. package/lib/module/ui-components/camera/camera-overlay.js +7 -9
  446. package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
  447. package/lib/module/ui-components/camera/index.js.map +1 -1
  448. package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
  449. package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
  450. package/lib/module/ui-components/control/checkbox.js +9 -10
  451. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  452. package/lib/module/ui-components/control/index.js.map +1 -1
  453. package/lib/module/ui-components/control/switch.js +8 -9
  454. package/lib/module/ui-components/control/switch.js.map +1 -1
  455. package/lib/module/ui-components/credential/card/credential-card.js +16 -17
  456. package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
  457. package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
  458. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  459. package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
  460. package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  461. package/lib/module/ui-components/credential/card/credential-header.js +21 -19
  462. package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
  463. package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
  464. package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  465. package/lib/module/ui-components/credential/card/index.js +10 -10
  466. package/lib/module/ui-components/credential/card/index.js.map +1 -1
  467. package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
  468. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  469. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
  470. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  471. package/lib/module/ui-components/credential/index.js +2 -2
  472. package/lib/module/ui-components/credential/index.js.map +1 -1
  473. package/lib/module/ui-components/credential/selector-status.js +3 -3
  474. package/lib/module/ui-components/credential/selector-status.js.map +1 -1
  475. package/lib/module/ui-components/credential/selector.js +5 -6
  476. package/lib/module/ui-components/credential/selector.js.map +1 -1
  477. package/lib/module/ui-components/detail/detail.js +9 -10
  478. package/lib/module/ui-components/detail/detail.js.map +1 -1
  479. package/lib/module/ui-components/detail/index.js.map +1 -1
  480. package/lib/module/ui-components/entity/avatar.js +10 -11
  481. package/lib/module/ui-components/entity/avatar.js.map +1 -1
  482. package/lib/module/ui-components/entity/entity-cluster.js +11 -13
  483. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  484. package/lib/module/ui-components/entity/index.js.map +1 -1
  485. package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
  486. package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
  487. package/lib/module/ui-components/header/foldable-header.js +10 -12
  488. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  489. package/lib/module/ui-components/header/header.js +10 -11
  490. package/lib/module/ui-components/header/header.js.map +1 -1
  491. package/lib/module/ui-components/header/index.js +6 -6
  492. package/lib/module/ui-components/header/index.js.map +1 -1
  493. package/lib/module/ui-components/header/navigation-header.js +23 -28
  494. package/lib/module/ui-components/header/navigation-header.js.map +1 -1
  495. package/lib/module/ui-components/history/data-item.js +23 -15
  496. package/lib/module/ui-components/history/data-item.js.map +1 -1
  497. package/lib/module/ui-components/history/history-details.js +171 -0
  498. package/lib/module/ui-components/history/history-details.js.map +1 -0
  499. package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
  500. package/lib/module/ui-components/history/history-item.js.map +1 -0
  501. package/lib/module/ui-components/history/history-section-header.js +6 -7
  502. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  503. package/lib/module/ui-components/history/history-section-list-item.js +8 -9
  504. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  505. package/lib/module/ui-components/history/index.js +5 -4
  506. package/lib/module/ui-components/history/index.js.map +1 -1
  507. package/lib/module/ui-components/icons/connectivity.js +16 -21
  508. package/lib/module/ui-components/icons/connectivity.js.map +1 -1
  509. package/lib/module/ui-components/icons/credential.js +57 -68
  510. package/lib/module/ui-components/icons/credential.js.map +1 -1
  511. package/lib/module/ui-components/icons/entity.js +4 -5
  512. package/lib/module/ui-components/icons/entity.js.map +1 -1
  513. package/lib/module/ui-components/icons/history.js +101 -128
  514. package/lib/module/ui-components/icons/history.js.map +1 -1
  515. package/lib/module/ui-components/icons/icons.js +70 -87
  516. package/lib/module/ui-components/icons/icons.js.map +1 -1
  517. package/lib/module/ui-components/icons/index.js.map +1 -1
  518. package/lib/module/ui-components/icons/input.js.map +1 -1
  519. package/lib/module/ui-components/icons/keypad.js +66 -78
  520. package/lib/module/ui-components/icons/keypad.js.map +1 -1
  521. package/lib/module/ui-components/icons/loader.js +1 -1
  522. package/lib/module/ui-components/icons/loader.js.map +1 -1
  523. package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
  524. package/lib/module/ui-components/icons/selector.js +5 -6
  525. package/lib/module/ui-components/icons/selector.js.map +1 -1
  526. package/lib/module/ui-components/icons/wallet.js +13 -16
  527. package/lib/module/ui-components/icons/wallet.js.map +1 -1
  528. package/lib/module/ui-components/image/image-or-component.js +12 -14
  529. package/lib/module/ui-components/image/image-or-component.js.map +1 -1
  530. package/lib/module/ui-components/image/index.js +2 -2
  531. package/lib/module/ui-components/image/index.js.map +1 -1
  532. package/lib/module/ui-components/index.js.map +1 -1
  533. package/lib/module/ui-components/input/index.js.map +1 -1
  534. package/lib/module/ui-components/input/radio-group.js +26 -22
  535. package/lib/module/ui-components/input/radio-group.js.map +1 -1
  536. package/lib/module/ui-components/input/selection-input.js +21 -31
  537. package/lib/module/ui-components/input/selection-input.js.map +1 -1
  538. package/lib/module/ui-components/input/text-input.js +21 -22
  539. package/lib/module/ui-components/input/text-input.js.map +1 -1
  540. package/lib/module/ui-components/list/index.js +1 -0
  541. package/lib/module/ui-components/list/index.js.map +1 -1
  542. package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
  543. package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
  544. package/lib/module/ui-components/list/list-section-header.js +8 -9
  545. package/lib/module/ui-components/list/list-section-header.js.map +1 -1
  546. package/lib/module/ui-components/list/list-title-header.js +4 -5
  547. package/lib/module/ui-components/list/list-title-header.js.map +1 -1
  548. package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
  549. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
  550. package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
  551. package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
  552. package/lib/module/ui-components/list/wallet/index.js +4 -0
  553. package/lib/module/ui-components/list/wallet/index.js.map +1 -0
  554. package/lib/module/ui-components/loader/index.js.map +1 -1
  555. package/lib/module/ui-components/loader/loader.js +14 -12
  556. package/lib/module/ui-components/loader/loader.js.map +1 -1
  557. package/lib/module/ui-components/loader/loading-result.js +21 -19
  558. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  559. package/lib/module/ui-components/nerd-view/index.js +2 -2
  560. package/lib/module/ui-components/nerd-view/index.js.map +1 -1
  561. package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
  562. package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  563. package/lib/module/ui-components/pin/index.js.map +1 -1
  564. package/lib/module/ui-components/pin/keypad.js +17 -19
  565. package/lib/module/ui-components/pin/keypad.js.map +1 -1
  566. package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
  567. package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
  568. package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
  569. package/lib/module/ui-components/pin/pin-lock.js +6 -7
  570. package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
  571. package/lib/module/ui-components/pin/pins.js +7 -8
  572. package/lib/module/ui-components/pin/pins.js.map +1 -1
  573. package/lib/module/ui-components/screens/backup-screen.js +13 -14
  574. package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
  575. package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
  576. package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
  577. package/lib/module/ui-components/screens/index.js +12 -12
  578. package/lib/module/ui-components/screens/index.js.map +1 -1
  579. package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -34
  580. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  581. package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
  582. package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  583. package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
  584. package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
  585. package/lib/module/ui-components/screens/section-list-screen.js +11 -12
  586. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  587. package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
  588. package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
  589. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  590. package/lib/module/ui-components/searchbar/search-bar.js +11 -12
  591. package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
  592. package/lib/module/ui-components/settings/button-setting.js +10 -11
  593. package/lib/module/ui-components/settings/button-setting.js.map +1 -1
  594. package/lib/module/ui-components/settings/index.js.map +1 -1
  595. package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
  596. package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
  597. package/lib/module/ui-components/settings/setting-item.js +7 -8
  598. package/lib/module/ui-components/settings/setting-item.js.map +1 -1
  599. package/lib/module/ui-components/settings/settings-button.js +5 -6
  600. package/lib/module/ui-components/settings/settings-button.js.map +1 -1
  601. package/lib/module/ui-components/settings/switch-setting.js +9 -10
  602. package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
  603. package/lib/module/ui-components/state/error-screen.js +7 -8
  604. package/lib/module/ui-components/state/error-screen.js.map +1 -1
  605. package/lib/module/ui-components/state/index.js.map +1 -1
  606. package/lib/module/ui-components/text/base.js +12 -13
  607. package/lib/module/ui-components/text/base.js.map +1 -1
  608. package/lib/module/ui-components/text/font.js +10 -11
  609. package/lib/module/ui-components/text/font.js.map +1 -1
  610. package/lib/module/ui-components/text/index.js +2 -2
  611. package/lib/module/ui-components/text/index.js.map +1 -1
  612. package/lib/module/ui-components/text/typography.js +8 -10
  613. package/lib/module/ui-components/text/typography.js.map +1 -1
  614. package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
  615. package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
  616. package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
  617. package/lib/module/ui-components/theme/index.js.map +1 -1
  618. package/lib/module/utils/array.js.map +1 -1
  619. package/lib/module/utils/backup.js.map +1 -1
  620. package/lib/module/utils/color.js.map +1 -1
  621. package/lib/module/utils/contrasting-status-bar.js +5 -6
  622. package/lib/module/utils/contrasting-status-bar.js.map +1 -1
  623. package/lib/module/utils/date.js +4 -4
  624. package/lib/module/utils/date.js.map +1 -1
  625. package/lib/module/utils/filtering.js +4 -0
  626. package/lib/module/utils/filtering.js.map +1 -0
  627. package/lib/module/utils/history.js +66 -0
  628. package/lib/module/utils/history.js.map +1 -0
  629. package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
  630. package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
  631. package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
  632. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  633. package/lib/module/utils/hooks/core/backup.js +31 -31
  634. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  635. package/lib/module/utils/hooks/core/cache.js +37 -0
  636. package/lib/module/utils/hooks/core/cache.js.map +1 -0
  637. package/lib/module/utils/hooks/core/core-config.js +11 -0
  638. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  639. package/lib/module/utils/hooks/core/core-context.js +14 -9
  640. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  641. package/lib/module/utils/hooks/core/core-init.js +16 -8
  642. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  643. package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
  644. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  645. package/lib/module/utils/hooks/core/credentials.js +26 -36
  646. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  647. package/lib/module/utils/hooks/core/dids.js +3 -4
  648. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  649. package/lib/module/utils/hooks/core/error-code.js +3 -3
  650. package/lib/module/utils/hooks/core/error-code.js.map +1 -1
  651. package/lib/module/utils/hooks/core/history.js +4 -35
  652. package/lib/module/utils/hooks/core/history.js.map +1 -1
  653. package/lib/module/utils/hooks/core/index.js +1 -0
  654. package/lib/module/utils/hooks/core/index.js.map +1 -1
  655. package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
  656. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  657. package/lib/module/utils/hooks/core/proofs.js +101 -67
  658. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  659. package/lib/module/utils/hooks/core/query.js.map +1 -1
  660. package/lib/module/utils/hooks/core/trust-entity.js +7 -3
  661. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  662. package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  663. package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
  664. package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  665. package/lib/module/utils/hooks/http/client.js.map +1 -1
  666. package/lib/module/utils/hooks/index.js.map +1 -1
  667. package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
  668. package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
  669. package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
  670. package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  671. package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
  672. package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
  673. package/lib/module/utils/hooks/navigation/index.js.map +1 -1
  674. package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
  675. package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
  676. package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
  677. package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
  678. package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
  679. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  680. package/lib/module/utils/index.js +3 -0
  681. package/lib/module/utils/index.js.map +1 -1
  682. package/lib/module/utils/navigation.js +5 -5
  683. package/lib/module/utils/navigation.js.map +1 -1
  684. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  685. package/lib/module/utils/parsers/credential-sharing.js +15 -19
  686. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  687. package/lib/module/utils/parsers/credential.js +16 -25
  688. package/lib/module/utils/parsers/credential.js.map +1 -1
  689. package/lib/module/utils/parsers/index.js +1 -0
  690. package/lib/module/utils/parsers/index.js.map +1 -1
  691. package/lib/module/utils/parsers/query.js +3 -2
  692. package/lib/module/utils/parsers/query.js.map +1 -1
  693. package/lib/module/utils/parsers/universal-links.js +25 -0
  694. package/lib/module/utils/parsers/universal-links.js.map +1 -0
  695. package/lib/module/utils/parsers/universal-links.test.js +38 -0
  696. package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
  697. package/lib/module/utils/ref.js.map +1 -1
  698. package/lib/module/utils/reporting.js +1 -0
  699. package/lib/module/utils/reporting.js.map +1 -1
  700. package/lib/module/utils/string.js.map +1 -1
  701. package/lib/module/utils/testID.js +1 -4
  702. package/lib/module/utils/testID.js.map +1 -1
  703. package/lib/module/utils/testID.test.js.map +1 -1
  704. package/lib/module/utils/useMemoAsync.js +10 -0
  705. package/lib/module/utils/useMemoAsync.js.map +1 -1
  706. package/lib/module/utils/uuid.js.map +1 -1
  707. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  708. package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
  709. package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
  710. package/lib/typescript/components/history/history-list-item.d.ts +20 -0
  711. package/lib/typescript/components/history/history-list-screen.d.ts +22 -0
  712. package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
  713. package/lib/typescript/components/history/history-list.d.ts +19 -0
  714. package/lib/typescript/components/history/index.d.ts +6 -0
  715. package/lib/typescript/components/index.d.ts +1 -0
  716. package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
  717. package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
  718. package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
  719. package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
  720. package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
  721. package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
  722. package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
  723. package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
  724. package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
  725. package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
  726. package/lib/typescript/ui-components/credential/index.d.ts +2 -1
  727. package/lib/typescript/ui-components/header/index.d.ts +6 -3
  728. package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
  729. package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
  730. package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
  731. package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
  732. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  733. package/lib/typescript/ui-components/history/index.d.ts +5 -4
  734. package/lib/typescript/ui-components/icons/history.d.ts +20 -35
  735. package/lib/typescript/ui-components/image/index.d.ts +2 -1
  736. package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
  737. package/lib/typescript/ui-components/list/index.d.ts +1 -0
  738. package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
  739. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
  740. package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
  741. package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
  742. package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
  743. package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
  744. package/lib/typescript/ui-components/screens/index.d.ts +12 -6
  745. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  746. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  747. package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
  748. package/lib/typescript/utils/filtering.d.ts +1 -0
  749. package/lib/typescript/utils/history.d.ts +10 -0
  750. package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
  751. package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
  752. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
  753. package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
  754. package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
  755. package/lib/typescript/utils/hooks/core/credentials.d.ts +7 -3
  756. package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
  757. package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
  758. package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -8
  759. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -0
  760. package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
  761. package/lib/typescript/utils/index.d.ts +3 -0
  762. package/lib/typescript/utils/parsers/index.d.ts +1 -0
  763. package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
  764. package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
  765. package/lib/typescript/utils/ref.d.ts +1 -1
  766. package/package.json +60 -46
  767. package/src/components/entity/entity-attributes.tsx +4 -3
  768. package/src/components/entity/entity-details-with-buttons.tsx +4 -3
  769. package/src/components/history/history-details-screen.tsx +89 -0
  770. package/src/components/history/history-list-item-icon.tsx +108 -0
  771. package/src/components/history/history-list-item.tsx +53 -0
  772. package/src/components/history/history-list-screen.tsx +154 -0
  773. package/src/components/history/history-list-section-header.tsx +42 -0
  774. package/src/components/history/history-list.tsx +116 -0
  775. package/src/components/history/index.tsx +6 -0
  776. package/src/components/index.ts +1 -0
  777. package/src/ui-components/accessibility/accessibility.ts +2 -2
  778. package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
  779. package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
  780. package/src/ui-components/accessibility/index.ts +4 -3
  781. package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
  782. package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
  783. package/src/ui-components/buttons/back-button.stories.tsx +7 -8
  784. package/src/ui-components/buttons/button.stories.tsx +9 -10
  785. package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
  786. package/src/ui-components/buttons/connectivity-button.tsx +1 -1
  787. package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
  788. package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
  789. package/src/ui-components/buttons/hold-button.tsx +276 -0
  790. package/src/ui-components/buttons/index.ts +16 -6
  791. package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
  792. package/src/ui-components/control/checkbox.stories.tsx +8 -8
  793. package/src/ui-components/control/switch.stories.tsx +11 -8
  794. package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
  795. package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
  796. package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
  797. package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
  798. package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
  799. package/src/ui-components/credential/card/credential-header.tsx +4 -1
  800. package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
  801. package/src/ui-components/credential/card/index.ts +11 -5
  802. package/src/ui-components/credential/index.ts +2 -1
  803. package/src/ui-components/credential/selector.stories.tsx +7 -7
  804. package/src/ui-components/detail/detail.stories.tsx +11 -8
  805. package/src/ui-components/entity/avatar.stories.tsx +10 -7
  806. package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
  807. package/src/ui-components/header/header.stories.tsx +10 -7
  808. package/src/ui-components/header/index.ts +6 -3
  809. package/src/ui-components/header/navigation-header.stories.tsx +11 -8
  810. package/src/ui-components/history/data-item.tsx +13 -4
  811. package/src/ui-components/history/history-details.tsx +247 -0
  812. package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
  813. package/src/ui-components/history/history-section-header.tsx +2 -2
  814. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  815. package/src/ui-components/history/index.ts +5 -4
  816. package/src/ui-components/icons/history.tsx +82 -131
  817. package/src/ui-components/image/index.tsx +2 -1
  818. package/src/ui-components/input/radio-group.stories.tsx +34 -0
  819. package/src/ui-components/input/radio-group.tsx +8 -2
  820. package/src/ui-components/input/selection-input.stories.tsx +20 -17
  821. package/src/ui-components/list/index.ts +1 -0
  822. package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
  823. package/src/ui-components/list/wallet/empty-list.tsx +75 -0
  824. package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
  825. package/src/ui-components/list/wallet/index.tsx +4 -0
  826. package/src/ui-components/loader/loader.stories.tsx +6 -9
  827. package/src/ui-components/loader/loader.tsx +6 -3
  828. package/src/ui-components/loader/loading-result.stories.tsx +13 -10
  829. package/src/ui-components/loader/loading-result.tsx +8 -4
  830. package/src/ui-components/nerd-view/index.ts +2 -1
  831. package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
  832. package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
  833. package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
  834. package/src/ui-components/screens/index.ts +12 -6
  835. package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
  836. package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
  837. package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
  838. package/src/ui-components/searchbar/search-bar.tsx +2 -2
  839. package/src/ui-components/state/error-screen.stories.tsx +8 -9
  840. package/src/ui-components/state/error-screen.tsx +1 -1
  841. package/src/ui-components/text/index.ts +2 -1
  842. package/src/ui-components/text/typography.stories.tsx +19 -12
  843. package/src/ui-components/theme/color-scheme-context.tsx +1 -0
  844. package/src/ui-components/theme/color-scheme.ts +1 -0
  845. package/src/utils/date.ts +5 -5
  846. package/src/utils/filtering.ts +5 -0
  847. package/src/utils/history.ts +71 -0
  848. package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
  849. package/src/utils/hooks/connectivity/connectivity.ts +28 -4
  850. package/src/utils/hooks/core/backup.ts +25 -21
  851. package/src/utils/hooks/core/cache.ts +43 -0
  852. package/src/utils/hooks/core/core-config.ts +19 -0
  853. package/src/utils/hooks/core/core-context.tsx +15 -2
  854. package/src/utils/hooks/core/core-init.ts +21 -7
  855. package/src/utils/hooks/core/credential-schemas.ts +1 -1
  856. package/src/utils/hooks/core/credentials.ts +9 -14
  857. package/src/utils/hooks/core/history.ts +2 -57
  858. package/src/utils/hooks/core/index.ts +1 -0
  859. package/src/utils/hooks/core/proof-schemas.ts +1 -1
  860. package/src/utils/hooks/core/proofs.ts +107 -49
  861. package/src/utils/hooks/core/trust-entity.ts +7 -3
  862. package/src/utils/hooks/navigation/open-settings.ts +2 -3
  863. package/src/utils/hooks/revocation/credential-status.ts +3 -2
  864. package/src/utils/index.ts +3 -0
  865. package/src/utils/navigation.ts +4 -2
  866. package/src/utils/parsers/credential.ts +1 -1
  867. package/src/utils/parsers/index.ts +1 -0
  868. package/src/utils/parsers/query.tsx +2 -0
  869. package/src/utils/parsers/universal-links.test.ts +57 -0
  870. package/src/utils/parsers/universal-links.ts +26 -0
  871. package/src/utils/ref.ts +1 -1
  872. package/src/utils/reporting.ts +1 -0
  873. package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
  874. package/lib/module/ui-components/history/history-list-item.js.map +0 -1
@@ -13,26 +13,25 @@ var _credential = require("../../icons/credential");
13
13
  var _colorSchemeContext = require("../../theme/color-scheme-context");
14
14
  var _credentialAttributeItem = _interopRequireDefault(require("../credential-attribute-item"));
15
15
  var _credentialCard = _interopRequireDefault(require("./credential-card"));
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
20
20
  const PREVIEW_ATTRIBUTES_COUNT = 3;
21
- const CredentialDetailsCard = _ref => {
21
+ const CredentialDetailsCard = ({
22
+ animate = true,
23
+ attributes,
24
+ card,
25
+ expanded,
26
+ footer,
27
+ onImagePreview,
28
+ onAttributeSelected,
29
+ style,
30
+ showAllButtonLabel,
31
+ testID,
32
+ ...viewProps
33
+ }) => {
22
34
  var _header$accessory;
23
- let {
24
- animate = true,
25
- attributes,
26
- card,
27
- expanded,
28
- footer,
29
- onImagePreview,
30
- onAttributeSelected,
31
- style,
32
- showAllButtonLabel,
33
- testID,
34
- ...viewProps
35
- } = _ref;
36
35
  const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
37
36
  const [previewAttributesHeight, setPreviewAttributesHeight] = (0, _react.useState)();
38
37
  const [fullAttributesHeight, setFullAttributesHeight] = (0, _react.useState)();
@@ -63,7 +62,7 @@ const CredentialDetailsCard = _ref => {
63
62
  }
64
63
  const additionalAttributesHeight = fullAttributesHeight !== null && fullAttributesHeight !== void 0 ? fullAttributesHeight : 0;
65
64
  const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;
66
- const newHeight = expanded ? previewAttributesHeight + additionalHeight : 0;
65
+ const newHeight = expanded || !animate ? previewAttributesHeight + additionalHeight : 0;
67
66
  if (currentHeight.value === undefined || !animate) {
68
67
  currentHeight.value = newHeight;
69
68
  return;
@@ -85,7 +84,7 @@ const CredentialDetailsCard = _ref => {
85
84
  return {
86
85
  height: currentHeight.value
87
86
  };
88
- });
87
+ }, [expanded, currentHeight]);
89
88
  const onPreviewAttrContentLayout = (0, _react.useCallback)(event => {
90
89
  setPreviewAttributesHeight(event.nativeEvent.layout.height);
91
90
  }, []);
@@ -99,7 +98,7 @@ const CredentialDetailsCard = _ref => {
99
98
  if (!footer) {
100
99
  return undefined;
101
100
  }
102
- if ( /*#__PURE__*/_react.default.isValidElement(footer)) {
101
+ if (/*#__PURE__*/_react.default.isValidElement(footer)) {
103
102
  return footer;
104
103
  } else {
105
104
  const FooterComponent = footer;
@@ -147,18 +146,15 @@ const CredentialDetailsCard = _ref => {
147
146
  })), renderExtraAttributes && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
148
147
  style: [styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter],
149
148
  onLayout: onFullAttrContentLayout
150
- }, extraAttributes.map((attribute, index, _ref2) => {
151
- let {
152
- length
153
- } = _ref2;
154
- return /*#__PURE__*/_react.default.createElement(_credentialAttributeItem.default, _extends({
155
- key: attribute.id,
156
- last: !footerView && index === length - 1,
157
- testID: (0, _testID.concatTestID)(testID, 'attribute', index.toString()),
158
- onImagePreview: onImagePreview,
159
- onPress: onAttributeSelected
160
- }, attribute));
161
- })))), footerView ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
149
+ }, extraAttributes.map((attribute, index, {
150
+ length
151
+ }) => /*#__PURE__*/_react.default.createElement(_credentialAttributeItem.default, _extends({
152
+ key: attribute.id,
153
+ last: !footerView && index === length - 1,
154
+ testID: (0, _testID.concatTestID)(testID, 'attribute', index.toString()),
155
+ onImagePreview: onImagePreview,
156
+ onPress: onAttributeSelected
157
+ }, attribute)))))), footerView ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
162
158
  style: styles.footer
163
159
  }, footerView) : null);
164
160
  };
@@ -194,6 +190,5 @@ const styles = _reactNative.StyleSheet.create({
194
190
  width: '100%'
195
191
  }
196
192
  });
197
- var _default = CredentialDetailsCard;
198
- exports.default = _default;
193
+ var _default = exports.default = CredentialDetailsCard;
199
194
  //# sourceMappingURL=credential-details-card.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_testID","_buttons","_credential","_colorSchemeContext","_credentialAttributeItem","_interopRequireDefault","_credentialCard","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","PREVIEW_ATTRIBUTES_COUNT","CredentialDetailsCard","_ref","_header$accessory","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","showAllButtonLabel","testID","viewProps","colorScheme","useAppColorScheme","previewAttributesHeight","setPreviewAttributesHeight","useState","fullAttributesHeight","setFullAttributesHeight","buttonViewHeight","setButtonViewHeight","allAttributesRendered","setAllAttributesRendered","CaretIcon","UpIcon","DownIcon","currentHeight","useSharedValue","undefined","previewAttributes","slice","extraAttributes","useMemo","useEffect","viewStyle","StyleSheet","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","additionalAttributesHeight","additionalHeight","newHeight","value","duration","withTiming","credentialAttributesStyle","useAnimatedStyle","height","onPreviewAttrContentLayout","useCallback","event","nativeEvent","layout","onFullAttrContentLayout","onButtonViewLayout","footerView","React","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","View","detailsCard","backgroundColor","white","concatTestID","accessory","attributesAnimatedWrapper","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","id","last","toString","onPress","Button","type","ButtonType","Secondary","title","index","_ref2","create","paddingHorizontal","width","overflow","paddingTop","position","borderRadius","marginTop","_default","exports"],"sources":["credential-details-card.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ImageSourcePropType, LayoutChangeEvent, StyleSheet, View, ViewProps } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { concatTestID } from '../../../utils/testID';\nimport { Button, ButtonType } from '../../buttons';\nimport { DownIcon, UpIcon } from '../../icons/credential';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport CredentialAttributeItem, { CredentialAttribute } from '../credential-attribute-item';\nimport CredentialCard, { CredentialCardProps } from './credential-card';\n\nexport type CredentialDetailsCardProps = ViewProps & {\n animate?: boolean;\n attributes: CredentialAttribute[] | false;\n card: CredentialCardProps;\n expanded?: boolean;\n footer?: ComponentType<any> | ReactElement;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onAttributeSelected?: (id: string, selected: boolean) => void;\n showAllButtonLabel?: string;\n};\n\nconst PREVIEW_ATTRIBUTES_COUNT = 3;\n\nconst CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({\n animate = true,\n attributes,\n card,\n expanded,\n footer,\n onImagePreview,\n onAttributeSelected,\n style,\n showAllButtonLabel,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const [previewAttributesHeight, setPreviewAttributesHeight] = useState<number>();\n const [fullAttributesHeight, setFullAttributesHeight] = useState<number>();\n const [buttonViewHeight, setButtonViewHeight] = useState<number>();\n\n const [allAttributesRendered, setAllAttributesRendered] = useState<boolean>(\n (attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT) || !showAllButtonLabel,\n );\n\n const CaretIcon = expanded ? UpIcon : DownIcon;\n\n const currentHeight = useSharedValue<number | undefined>(undefined);\n\n const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];\n const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);\n\n useEffect(() => {\n if (!extraAttributes || allAttributesRendered) {\n setButtonViewHeight(0);\n }\n }, [extraAttributes, allAttributesRendered]);\n\n useEffect(() => {\n if (extraAttributes.length === 0) {\n const viewStyle = StyleSheet.flatten([\n styles.allAttributesWrapper,\n footer && styles.allAttributesWrapperWithFooter,\n ]);\n const padding = viewStyle.paddingBottom;\n setFullAttributesHeight(padding);\n }\n }, [extraAttributes, footer]);\n\n useEffect(() => {\n if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;\n const newHeight = expanded ? previewAttributesHeight + additionalHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = !expanded\n ? 250\n : allAttributesRendered\n ? previewAttributes.length * 50\n : extraAttributes.length * 50;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n buttonViewHeight,\n currentHeight,\n animate,\n expanded,\n extraAttributes.length,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n ]);\n\n const credentialAttributesStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: 0,\n };\n }\n return {\n height: currentHeight.value,\n };\n });\n\n const onPreviewAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setPreviewAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onFullAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setFullAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onButtonViewLayout = useCallback((event: LayoutChangeEvent) => {\n setButtonViewHeight(event.nativeEvent.layout.height);\n }, []);\n\n const footerView: ReactElement | undefined = useMemo(() => {\n if (!footer) {\n return undefined;\n }\n if (React.isValidElement(footer)) {\n return footer;\n } else {\n const FooterComponent = footer as React.ComponentType<any>;\n return <FooterComponent />;\n }\n }, [footer]);\n\n const { header, ...cardProps } = card;\n\n const renderExtraAttributes =\n allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);\n return (\n <View\n style={[styles.detailsCard, { backgroundColor: colorScheme.white }, style]}\n {...viewProps}\n testID={concatTestID(card.testID, expanded ? 'expanded' : 'collapsed')}>\n <CredentialCard\n {...cardProps}\n header={{ ...header, accessory: header.accessory ?? CaretIcon }}\n style={[styles.card, cardProps.style]}\n />\n {previewAttributes.length > 0 && (\n <Animated.View style={[styles.attributesAnimatedWrapper, credentialAttributesStyle]}>\n <View style={styles.attributesWrapper}>\n <View onLayout={onPreviewAttrContentLayout} style={styles.previewAttributesWrapper}>\n {previewAttributes.map((attribute, idx) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && !extraAttributes.length && idx === previewAttributes.length - 1}\n testID={concatTestID(testID, 'attribute', idx.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n {!allAttributesRendered && extraAttributes.length > 0 && (\n <View style={styles.allAttributesWrapper} onLayout={onButtonViewLayout}>\n <Button\n onPress={() => setAllAttributesRendered(true)}\n type={ButtonType.Secondary}\n testID={concatTestID(testID, 'showAllAttributesButton')}\n title={showAllButtonLabel!}\n />\n </View>\n )}\n {renderExtraAttributes && (\n <View\n style={[styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter]}\n onLayout={onFullAttrContentLayout}>\n {extraAttributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && index === length - 1}\n testID={concatTestID(testID, 'attribute', index.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n )}\n </View>\n </Animated.View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n allAttributesWrapper: {\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n allAttributesWrapperWithFooter: {\n paddingBottom: 0,\n },\n attributesAnimatedWrapper: {\n overflow: 'hidden',\n },\n attributesWrapper: {\n paddingTop: 7,\n position: 'absolute',\n width: '100%',\n },\n card: {\n borderRadius: 0,\n },\n detailsCard: {\n borderRadius: 10,\n overflow: 'hidden',\n },\n footer: {\n marginTop: 12,\n },\n previewAttributesWrapper: {\n paddingHorizontal: 4,\n width: '100%',\n },\n});\n\nexport default CredentialDetailsCard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,eAAA,GAAAD,sBAAA,CAAAR,OAAA;AAAwE,SAAAQ,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OA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;IACpBC,KAAK,EAAE;EACT,CAAC;EACDrD,8BAA8B,EAAE;IAC9BE,aAAa,EAAE;EACjB,CAAC;EACD+B,yBAAyB,EAAE;IACzBqB,QAAQ,EAAE;EACZ,CAAC;EACDpB,iBAAiB,EAAE;IACjBqB,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,UAAU;IACpBH,KAAK,EAAE;EACT,CAAC;EACDzF,IAAI,EAAE;IACJ6F,YAAY,EAAE;EAChB,CAAC;EACD7B,WAAW,EAAE;IACX6B,YAAY,EAAE,EAAE;IAChBH,QAAQ,EAAE;EACZ,CAAC;EACDxF,MAAM,EAAE;IACN4F,SAAS,EAAE;EACb,CAAC;EACDtB,wBAAwB,EAAE;IACxBgB,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAAM,QAAA,GAEYpG,qBAAqB;AAAAqG,OAAA,CAAAnI,OAAA,GAAAkI,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_testID","_buttons","_credential","_colorSchemeContext","_credentialAttributeItem","_interopRequireDefault","_credentialCard","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","PREVIEW_ATTRIBUTES_COUNT","CredentialDetailsCard","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","showAllButtonLabel","testID","viewProps","_header$accessory","colorScheme","useAppColorScheme","previewAttributesHeight","setPreviewAttributesHeight","useState","fullAttributesHeight","setFullAttributesHeight","buttonViewHeight","setButtonViewHeight","allAttributesRendered","setAllAttributesRendered","CaretIcon","UpIcon","DownIcon","currentHeight","useSharedValue","undefined","previewAttributes","slice","extraAttributes","useMemo","useEffect","viewStyle","StyleSheet","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","additionalAttributesHeight","additionalHeight","newHeight","value","duration","withTiming","credentialAttributesStyle","useAnimatedStyle","height","onPreviewAttrContentLayout","useCallback","event","nativeEvent","layout","onFullAttrContentLayout","onButtonViewLayout","footerView","React","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","View","detailsCard","backgroundColor","white","concatTestID","accessory","attributesAnimatedWrapper","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","key","id","last","toString","onPress","Button","type","ButtonType","Secondary","title","index","create","paddingHorizontal","width","overflow","paddingTop","position","borderRadius","marginTop","_default","exports"],"sources":["credential-details-card.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ImageSourcePropType, LayoutChangeEvent, StyleSheet, View, ViewProps } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { concatTestID } from '../../../utils/testID';\nimport { Button, ButtonType } from '../../buttons';\nimport { DownIcon, UpIcon } from '../../icons/credential';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport CredentialAttributeItem, { CredentialAttribute } from '../credential-attribute-item';\nimport CredentialCard, { CredentialCardProps } from './credential-card';\n\nexport type CredentialDetailsCardProps = ViewProps & {\n animate?: boolean;\n attributes: CredentialAttribute[] | false;\n card: CredentialCardProps;\n expanded?: boolean;\n footer?: ComponentType<any> | ReactElement;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onAttributeSelected?: (id: string, selected: boolean) => void;\n showAllButtonLabel?: string;\n};\n\nconst PREVIEW_ATTRIBUTES_COUNT = 3;\n\nconst CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({\n animate = true,\n attributes,\n card,\n expanded,\n footer,\n onImagePreview,\n onAttributeSelected,\n style,\n showAllButtonLabel,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const [previewAttributesHeight, setPreviewAttributesHeight] = useState<number>();\n const [fullAttributesHeight, setFullAttributesHeight] = useState<number>();\n const [buttonViewHeight, setButtonViewHeight] = useState<number>();\n\n const [allAttributesRendered, setAllAttributesRendered] = useState<boolean>(\n (attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT) || !showAllButtonLabel,\n );\n\n const CaretIcon = expanded ? UpIcon : DownIcon;\n\n const currentHeight = useSharedValue<number | undefined>(undefined);\n\n const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];\n const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);\n\n useEffect(() => {\n if (!extraAttributes || allAttributesRendered) {\n setButtonViewHeight(0);\n }\n }, [extraAttributes, allAttributesRendered]);\n\n useEffect(() => {\n if (extraAttributes.length === 0) {\n const viewStyle = StyleSheet.flatten([\n styles.allAttributesWrapper,\n footer && styles.allAttributesWrapperWithFooter,\n ]);\n const padding = viewStyle.paddingBottom;\n setFullAttributesHeight(padding);\n }\n }, [extraAttributes, footer]);\n\n useEffect(() => {\n if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;\n const newHeight = expanded || !animate ? previewAttributesHeight + additionalHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = !expanded\n ? 250\n : allAttributesRendered\n ? previewAttributes.length * 50\n : extraAttributes.length * 50;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n buttonViewHeight,\n currentHeight,\n animate,\n expanded,\n extraAttributes.length,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n ]);\n\n const credentialAttributesStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: 0,\n };\n }\n return {\n height: currentHeight.value,\n };\n }, [expanded, currentHeight]);\n\n const onPreviewAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setPreviewAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onFullAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setFullAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onButtonViewLayout = useCallback((event: LayoutChangeEvent) => {\n setButtonViewHeight(event.nativeEvent.layout.height);\n }, []);\n\n const footerView: ReactElement | undefined = useMemo(() => {\n if (!footer) {\n return undefined;\n }\n if (React.isValidElement(footer)) {\n return footer;\n } else {\n const FooterComponent = footer as React.ComponentType<any>;\n return <FooterComponent />;\n }\n }, [footer]);\n\n const { header, ...cardProps } = card;\n\n const renderExtraAttributes =\n allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);\n return (\n <View\n style={[styles.detailsCard, { backgroundColor: colorScheme.white }, style]}\n {...viewProps}\n testID={concatTestID(card.testID, expanded ? 'expanded' : 'collapsed')}>\n <CredentialCard\n {...cardProps}\n header={{ ...header, accessory: header.accessory ?? CaretIcon }}\n style={[styles.card, cardProps.style]}\n />\n {previewAttributes.length > 0 && (\n <Animated.View style={[styles.attributesAnimatedWrapper, credentialAttributesStyle]}>\n <View style={styles.attributesWrapper}>\n <View onLayout={onPreviewAttrContentLayout} style={styles.previewAttributesWrapper}>\n {previewAttributes.map((attribute, idx) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && !extraAttributes.length && idx === previewAttributes.length - 1}\n testID={concatTestID(testID, 'attribute', idx.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n {!allAttributesRendered && extraAttributes.length > 0 && (\n <View style={styles.allAttributesWrapper} onLayout={onButtonViewLayout}>\n <Button\n onPress={() => setAllAttributesRendered(true)}\n type={ButtonType.Secondary}\n testID={concatTestID(testID, 'showAllAttributesButton')}\n title={showAllButtonLabel!}\n />\n </View>\n )}\n {renderExtraAttributes && (\n <View\n style={[styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter]}\n onLayout={onFullAttrContentLayout}>\n {extraAttributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && index === length - 1}\n testID={concatTestID(testID, 'attribute', index.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n )}\n </View>\n </Animated.View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n allAttributesWrapper: {\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n allAttributesWrapperWithFooter: {\n paddingBottom: 0,\n },\n attributesAnimatedWrapper: {\n overflow: 'hidden',\n },\n attributesWrapper: {\n paddingTop: 7,\n position: 'absolute',\n width: '100%',\n },\n card: {\n borderRadius: 0,\n },\n detailsCard: {\n borderRadius: 10,\n overflow: 'hidden',\n },\n footer: {\n marginTop: 12,\n },\n previewAttributesWrapper: {\n paddingHorizontal: 4,\n width: '100%',\n },\n});\n\nexport default CredentialDetailsCard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,eAAA,GAAAD,sBAAA,CAAAR,OAAA;AAAwE,SAAAQ,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA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AA8B,EAAE;IAC9BE,aAAa,EAAE;EACjB,CAAC;EACD+B,yBAAyB,EAAE;IACzBqB,QAAQ,EAAE;EACZ,CAAC;EACDpB,iBAAiB,EAAE;IACjBqB,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,UAAU;IACpBH,KAAK,EAAE;EACT,CAAC;EACD1F,IAAI,EAAE;IACJ8F,YAAY,EAAE;EAChB,CAAC;EACD7B,WAAW,EAAE;IACX6B,YAAY,EAAE,EAAE;IAChBH,QAAQ,EAAE;EACZ,CAAC;EACDzF,MAAM,EAAE;IACN6F,SAAS,EAAE;EACb,CAAC;EACDtB,wBAAwB,EAAE;IACxBgB,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAA7H,OAAA,GAEYyB,qBAAqB","ignoreList":[]}
@@ -9,18 +9,18 @@ var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
10
  var _credentialCard = require("./credential-card");
11
11
  var _credentialDetailsCard = _interopRequireDefault(require("./credential-details-card"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
- const CredentialDetailsCardListItem = _ref => {
17
- let {
18
- detailsCardStyle,
19
- expanded,
20
- lastItem,
21
- style,
22
- ...props
23
- } = _ref;
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
16
+ const CredentialDetailsCardListItem = ({
17
+ detailsCardStyle,
18
+ expanded,
19
+ lastItem,
20
+ style,
21
+ ...props
22
+ }) => {
23
+ const [cardWidth, setCardWidth] = (0, _react.useState)();
24
24
  const [minHeight, setMinHeight] = (0, _react.useState)();
25
25
  const [detailsCardHeight, setDetailsCardHeight] = (0, _react.useState)();
26
26
  const cardListItemHeight = (0, _reactNativeReanimated.useSharedValue)(undefined);
@@ -37,7 +37,7 @@ const CredentialDetailsCardListItem = _ref => {
37
37
  duration: 250
38
38
  });
39
39
  }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);
40
- const cardWrapperStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
40
+ const animatedCardWrapperStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
41
41
  if (cardListItemHeight.value !== undefined) {
42
42
  return {
43
43
  height: cardListItemHeight.value
@@ -49,13 +49,17 @@ const CredentialDetailsCardListItem = _ref => {
49
49
  return {
50
50
  height: 60
51
51
  };
52
- });
52
+ }, [cardListItemHeight, lastItem, expanded]);
53
+ const cardWrapperStyle = {
54
+ minHeight: cardWidth ? cardWidth / _credentialCard.CredentialCardRatio : undefined
55
+ };
53
56
  const onContentLayout = (0, _react.useCallback)(event => {
54
57
  var _StyleSheet$flatten$b, _StyleSheet$flatten;
55
58
  const {
56
59
  width,
57
60
  height
58
61
  } = event.nativeEvent.layout;
62
+ setCardWidth(width);
59
63
  if (!minHeight) {
60
64
  setMinHeight(lastItem ? width / _credentialCard.CredentialCardRatio : 60);
61
65
  }
@@ -63,9 +67,9 @@ const CredentialDetailsCardListItem = _ref => {
63
67
  setDetailsCardHeight(height + 2 * borderWidth);
64
68
  }, [lastItem, minHeight, style]);
65
69
  return /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
66
- style: [cardWrapperStyle, style]
70
+ style: [styles.animatedWrapper, animatedCardWrapperStyle, style]
67
71
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
68
- style: styles.cardWrapper
72
+ style: [styles.cardWrapper, cardWrapperStyle]
69
73
  }, /*#__PURE__*/_react.default.createElement(_credentialDetailsCard.default, _extends({
70
74
  animate: false,
71
75
  expanded: expanded,
@@ -74,11 +78,14 @@ const CredentialDetailsCardListItem = _ref => {
74
78
  }, props))));
75
79
  };
76
80
  const styles = _reactNative.StyleSheet.create({
81
+ animatedWrapper: {
82
+ ..._credentialCard.CredentialCardShadow
83
+ },
77
84
  cardWrapper: {
78
- ..._credentialCard.CredentialCardShadow,
79
- overflow: 'visible'
85
+ borderRadius: 10,
86
+ height: '100%',
87
+ overflow: 'hidden'
80
88
  }
81
89
  });
82
- var _default = CredentialDetailsCardListItem;
83
- exports.default = _default;
90
+ var _default = exports.default = CredentialDetailsCardListItem;
84
91
  //# sourceMappingURL=credential-details-list-item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_credentialCard","_credentialDetailsCard","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","CredentialDetailsCardListItem","_ref","detailsCardStyle","expanded","lastItem","style","props","minHeight","setMinHeight","useState","detailsCardHeight","setDetailsCardHeight","cardListItemHeight","useSharedValue","undefined","useEffect","newValue","value","withTiming","duration","cardWrapperStyle","useAnimatedStyle","height","onContentLayout","useCallback","event","_StyleSheet$flatten$b","_StyleSheet$flatten","width","nativeEvent","layout","CredentialCardRatio","borderWidth","StyleSheet","flatten","createElement","View","styles","cardWrapper","animate","onLayout","create","CredentialCardShadow","overflow","_default","exports"],"sources":["credential-details-list-item.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useState } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { CredentialCardRatio, CredentialCardShadow } from './credential-card';\nimport CredentialDetailsCard, { CredentialDetailsCardProps } from './credential-details-card';\n\nexport type CredentialDetailsCardListItemProps = Omit<CredentialDetailsCardProps, 'animate'> & {\n detailsCardStyle?: StyleProp<ViewStyle>;\n lastItem?: boolean;\n};\n\nconst CredentialDetailsCardListItem: FC<CredentialDetailsCardListItemProps> = ({\n detailsCardStyle,\n expanded,\n lastItem,\n style,\n ...props\n}) => {\n const [minHeight, setMinHeight] = useState<number>();\n const [detailsCardHeight, setDetailsCardHeight] = useState<number>();\n\n const cardListItemHeight = useSharedValue<number | undefined>(undefined);\n\n useEffect(() => {\n if (!detailsCardHeight || !minHeight) {\n return;\n }\n const newValue = expanded ? detailsCardHeight : minHeight;\n if (cardListItemHeight.value === undefined) {\n cardListItemHeight.value = newValue;\n return;\n }\n cardListItemHeight.value = withTiming(newValue, {\n duration: 250,\n });\n }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);\n\n const cardWrapperStyle = useAnimatedStyle(() => {\n if (cardListItemHeight.value !== undefined) {\n return {\n height: cardListItemHeight.value,\n };\n }\n if (lastItem || expanded) {\n return {};\n }\n return {\n height: 60,\n };\n });\n\n const onContentLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n if (!minHeight) {\n setMinHeight(lastItem ? width / CredentialCardRatio : 60);\n }\n const borderWidth = StyleSheet.flatten(style)?.borderWidth ?? 0;\n setDetailsCardHeight(height + 2 * borderWidth);\n },\n [lastItem, minHeight, style],\n );\n\n return (\n <Animated.View style={[cardWrapperStyle, style]}>\n <View style={styles.cardWrapper}>\n <CredentialDetailsCard\n animate={false}\n expanded={expanded}\n onLayout={onContentLayout}\n style={detailsCardStyle}\n {...props}\n />\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n cardWrapper: {\n ...CredentialCardShadow,\n overflow: 'visible',\n },\n});\n\nexport default CredentialDetailsCardListItem;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAA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A,CAAAgE,aAAA,CAACpE,sBAAA,CAAAI,OAAqB,EAAAoB,QAAA;IACpBgD,OAAO,EAAE,KAAM;IACfpC,QAAQ,EAAEA,QAAS;IACnBqC,QAAQ,EAAEjB,eAAgB;IAC1BlB,KAAK,EAAEH;EAAiB,GACpBI,KAAK,EACT,CACG,CACO;AAEpB,CAAC;AAED,MAAM+B,MAAM,GAAGJ,uBAAU,CAACQ,MAAM,CAAC;EAC/BH,WAAW,EAAE;IACX,GAAGI,oCAAoB;IACvBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEY5C,6BAA6B;AAAA6C,OAAA,CAAA1E,OAAA,GAAAyE,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_credentialCard","_credentialDetailsCard","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","CredentialDetailsCardListItem","detailsCardStyle","expanded","lastItem","style","props","cardWidth","setCardWidth","useState","minHeight","setMinHeight","detailsCardHeight","setDetailsCardHeight","cardListItemHeight","useSharedValue","undefined","useEffect","newValue","value","withTiming","duration","animatedCardWrapperStyle","useAnimatedStyle","height","cardWrapperStyle","CredentialCardRatio","onContentLayout","useCallback","event","_StyleSheet$flatten$b","_StyleSheet$flatten","width","nativeEvent","layout","borderWidth","StyleSheet","flatten","createElement","View","styles","animatedWrapper","cardWrapper","animate","onLayout","create","CredentialCardShadow","borderRadius","overflow","_default","exports"],"sources":["credential-details-list-item.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useState } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { CredentialCardRatio, CredentialCardShadow } from './credential-card';\nimport CredentialDetailsCard, { CredentialDetailsCardProps } from './credential-details-card';\n\nexport type CredentialDetailsCardListItemProps = Omit<CredentialDetailsCardProps, 'animate'> & {\n detailsCardStyle?: StyleProp<ViewStyle>;\n lastItem?: boolean;\n};\n\nconst CredentialDetailsCardListItem: FC<CredentialDetailsCardListItemProps> = ({\n detailsCardStyle,\n expanded,\n lastItem,\n style,\n ...props\n}) => {\n const [cardWidth, setCardWidth] = useState<number>();\n const [minHeight, setMinHeight] = useState<number>();\n const [detailsCardHeight, setDetailsCardHeight] = useState<number>();\n\n const cardListItemHeight = useSharedValue<number | undefined>(undefined);\n\n useEffect(() => {\n if (!detailsCardHeight || !minHeight) {\n return;\n }\n const newValue = expanded ? detailsCardHeight : minHeight;\n if (cardListItemHeight.value === undefined) {\n cardListItemHeight.value = newValue;\n return;\n }\n cardListItemHeight.value = withTiming(newValue, {\n duration: 250,\n });\n }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);\n\n const animatedCardWrapperStyle = useAnimatedStyle(() => {\n if (cardListItemHeight.value !== undefined) {\n return {\n height: cardListItemHeight.value,\n };\n }\n if (lastItem || expanded) {\n return {};\n }\n return {\n height: 60,\n };\n }, [cardListItemHeight, lastItem, expanded]);\n\n const cardWrapperStyle: ViewStyle = {\n minHeight: cardWidth ? cardWidth / CredentialCardRatio : undefined,\n }\n\n const onContentLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setCardWidth(width);\n if (!minHeight) {\n setMinHeight(lastItem ? width / CredentialCardRatio : 60);\n }\n const borderWidth = StyleSheet.flatten(style)?.borderWidth ?? 0;\n setDetailsCardHeight(height + 2 * borderWidth);\n },\n [lastItem, minHeight, style],\n );\n\n return (\n <Animated.View style={[styles.animatedWrapper, animatedCardWrapperStyle, style]}>\n <View style={[styles.cardWrapper, cardWrapperStyle]}>\n <CredentialDetailsCard\n animate={false}\n expanded={expanded}\n onLayout={onContentLayout}\n style={detailsCardStyle}\n {...props}\n />\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n animatedWrapper: {\n ...CredentialCardShadow,\n },\n cardWrapper: {\n borderRadius: 10,\n height: '100%',\n overflow: 'hidden',\n },\n});\n\nexport default CredentialDetailsCardListItem;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAA8F,SAAAK,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EA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ChC,KAAK,CAAC,cAAA0B,mBAAA,uBAAzBA,mBAAA,CAA2BI,WAAW,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,CAAC;IAC/DjB,oBAAoB,CAACW,MAAM,GAAG,CAAC,GAAGW,WAAW,CAAC;EAChD,CAAC,EACD,CAAC/B,QAAQ,EAAEM,SAAS,EAAEL,KAAK,CAC7B,CAAC;EAED,oBACEtC,MAAA,CAAAU,OAAA,CAAA6D,aAAA,CAACnE,sBAAA,CAAAM,OAAQ,CAAC8D,IAAI;IAAClC,KAAK,EAAE,CAACmC,MAAM,CAACC,eAAe,EAAEnB,wBAAwB,EAAEjB,KAAK;EAAE,gBAC9EtC,MAAA,CAAAU,OAAA,CAAA6D,aAAA,CAACpE,YAAA,CAAAqE,IAAI;IAAClC,KAAK,EAAE,CAACmC,MAAM,CAACE,WAAW,EAAEjB,gBAAgB;EAAE,gBAClD1D,MAAA,CAAAU,OAAA,CAAA6D,aAAA,CAACjE,sBAAA,CAAAI,OAAqB,EAAAkB,QAAA;IACpBgD,OAAO,EAAE,KAAM;IACfxC,QAAQ,EAAEA,QAAS;IACnByC,QAAQ,EAAEjB,eAAgB;IAC1BtB,KAAK,EAAEH;EAAiB,GACpBI,KAAK,CACV,CACG,CACO,CAAC;AAEpB,CAAC;AAED,MAAMkC,MAAM,GAAGJ,uBAAU,CAACS,MAAM,CAAC;EAC/BJ,eAAe,EAAE;IACf,GAAGK;EACL,CAAC;EACDJ,WAAW,EAAE;IACXK,YAAY,EAAE,EAAE;IAChBvB,MAAM,EAAE,MAAM;IACdwB,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzE,OAAA,GAEYwB,6BAA6B","ignoreList":[]}
@@ -11,32 +11,31 @@ var _blurView = _interopRequireDefault(require("../../blur/blur-view"));
11
11
  var _imageOrComponent = _interopRequireDefault(require("../../image/image-or-component"));
12
12
  var _typography = _interopRequireDefault(require("../../text/typography"));
13
13
  var _colorSchemeContext = require("../../theme/color-scheme-context");
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
- const CredentialHeader = _ref => {
19
- let {
20
- accessory,
21
- blur = true,
22
- color = '#5A69F3',
23
- credentialDetailPrimary,
24
- credentialDetailSecondary,
25
- credentialDetailTestID,
26
- credentialDetailErrorColor,
27
- credentialName,
28
- icon,
29
- iconLabelColor = '#FFFFFF',
30
- statusIcon,
31
- style,
32
- testID
33
- } = _ref;
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
18
+ const CredentialHeader = ({
19
+ accessory,
20
+ blur = true,
21
+ color = '#5A69F3',
22
+ credentialDetailPrimary,
23
+ credentialDetailSecondary,
24
+ credentialDetailTestID,
25
+ credentialDetailErrorColor,
26
+ credentialName,
27
+ icon,
28
+ iconLabelColor = '#FFFFFF',
29
+ statusIcon,
30
+ style,
31
+ testID
32
+ }) => {
34
33
  const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
35
34
  const statusIconView = (0, _react.useMemo)(() => {
36
35
  if (!statusIcon) {
37
36
  return undefined;
38
37
  }
39
- if ( /*#__PURE__*/_react.default.isValidElement(statusIcon)) {
38
+ if (/*#__PURE__*/_react.default.isValidElement(statusIcon)) {
40
39
  return statusIcon;
41
40
  } else {
42
41
  const StatusIconComponent = statusIcon;
@@ -47,7 +46,7 @@ const CredentialHeader = _ref => {
47
46
  if (!accessory) {
48
47
  return undefined;
49
48
  }
50
- if ( /*#__PURE__*/_react.default.isValidElement(accessory)) {
49
+ if (/*#__PURE__*/_react.default.isValidElement(accessory)) {
51
50
  return accessory;
52
51
  } else {
53
52
  const AccessoryComponent = accessory;
@@ -55,6 +54,9 @@ const CredentialHeader = _ref => {
55
54
  }
56
55
  }, [accessory]);
57
56
  const DetailText = (0, _react.useMemo)(() => {
57
+ if (!credentialDetailPrimary) {
58
+ return undefined;
59
+ }
58
60
  const commonProps = {
59
61
  color: credentialDetailErrorColor ? colorScheme.error : colorScheme.text,
60
62
  ellipsizeMode: 'tail',
@@ -168,6 +170,5 @@ const styles = _reactNative.StyleSheet.create({
168
170
  justifyContent: 'center'
169
171
  }
170
172
  });
171
- var _default = CredentialHeader;
172
- exports.default = _default;
173
+ var _default = exports.default = CredentialHeader;
173
174
  //# sourceMappingURL=credential-header.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_testID","_blurView","_interopRequireDefault","_imageOrComponent","_typography","_colorSchemeContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","CredentialHeader","_ref","accessory","blur","color","credentialDetailPrimary","credentialDetailSecondary","credentialDetailTestID","credentialDetailErrorColor","credentialName","icon","iconLabelColor","statusIcon","style","testID","colorScheme","useAppColorScheme","statusIconView","useMemo","undefined","React","isValidElement","StatusIconComponent","createElement","accessoryView","AccessoryComponent","DetailText","commonProps","error","text","ellipsizeMode","numberOfLines","preset","styles","detailText","View","detailTextContainer","concatTestID","Fragment","interpunct","container","backgroundColor","white","blurStyle","StyleSheet","absoluteFill","imageContainer","image","String","imagePlaceholder","substring","statusIconWrapper","nameText","create","alignItems","height","justifyContent","width","flexDirection","padding","flex","opacity","marginTop","borderRadius","marginRight","overflow","paddingLeft","paddingTop","textTransform","marginHorizontal","bottom","left","position","_default","exports"],"sources":["credential-header.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { AccessibilityProps, ColorValue, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../../utils/testID';\nimport BlurView from '../../blur/blur-view';\nimport ImageOrComponent, { ImageOrComponentSource } from '../../image/image-or-component';\nimport Typography, { TypographyProps } from '../../text/typography';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\n\nexport interface CredentialHeaderProps extends AccessibilityProps {\n accessory?: React.ComponentType<any> | React.ReactElement;\n blur?: boolean;\n color?: ColorValue;\n credentialDetailPrimary: string;\n credentialDetailSecondary?: string;\n credentialDetailTestID?: string;\n credentialDetailErrorColor?: boolean;\n credentialName: string;\n icon?: ImageOrComponentSource;\n iconLabelColor?: ColorValue;\n statusIcon?: React.ComponentType<any> | React.ReactElement;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\nconst CredentialHeader: FC<CredentialHeaderProps> = ({\n accessory,\n blur = true,\n color = '#5A69F3',\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialDetailErrorColor,\n credentialName,\n icon,\n iconLabelColor = '#FFFFFF',\n statusIcon,\n style,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const statusIconView: React.ReactElement | undefined = useMemo(() => {\n if (!statusIcon) {\n return undefined;\n }\n if (React.isValidElement(statusIcon)) {\n return statusIcon;\n } else {\n const StatusIconComponent = statusIcon as React.ComponentType<any>;\n return <StatusIconComponent />;\n }\n }, [statusIcon]);\n\n const accessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!accessory) {\n return undefined;\n }\n if (React.isValidElement(accessory)) {\n return accessory;\n } else {\n const AccessoryComponent = accessory as React.ComponentType<any>;\n return <AccessoryComponent />;\n }\n }, [accessory]);\n\n const DetailText = useMemo(() => {\n const commonProps: TypographyProps = {\n color: credentialDetailErrorColor ? colorScheme.error : colorScheme.text,\n ellipsizeMode: 'tail',\n numberOfLines: 1,\n preset: 'xs',\n style: styles.detailText,\n };\n return (\n <View style={styles.detailTextContainer}>\n <Typography {...commonProps} testID={credentialDetailTestID ?? concatTestID(testID, 'primaryDetail')}>\n {credentialDetailPrimary}\n </Typography>\n {credentialDetailSecondary ? (\n <>\n <Typography {...commonProps} style={styles.interpunct}>\n {'·'}\n </Typography>\n <Typography {...commonProps} testID={concatTestID(testID, 'secondaryDetail')}>\n {credentialDetailSecondary}\n </Typography>\n </>\n ) : null}\n </View>\n );\n }, [\n credentialDetailPrimary,\n credentialDetailSecondary,\n colorScheme,\n testID,\n credentialDetailErrorColor,\n credentialDetailTestID,\n ]);\n\n return (\n <View style={[styles.container, { backgroundColor: blur ? undefined : colorScheme.white }, style]} testID={testID}>\n {blur && <BlurView blurStyle=\"strong\" style={StyleSheet.absoluteFill} />}\n <View style={[styles.imageContainer, { backgroundColor: color }]}>\n {icon ? (\n <ImageOrComponent testID={concatTestID(testID, 'logoIcon')} source={icon} style={styles.image} />\n ) : (\n <View testID={concatTestID(testID, 'logoBackgroundColor', String(color))}>\n <View testID={concatTestID(testID, 'logoTextColor', String(iconLabelColor))}>\n <Typography\n testID={concatTestID(testID, 'logoName')}\n color={iconLabelColor}\n preset=\"m\"\n style={styles.imagePlaceholder}>\n {credentialName.substring(0, 1)}\n </Typography>\n </View>\n </View>\n )}\n </View>\n {statusIconView && <View style={styles.statusIconWrapper}>{statusIconView}</View>}\n <View style={styles.text}>\n <Typography\n testID={concatTestID(testID, 'name')}\n color={colorScheme.text}\n ellipsizeMode={'tail'}\n numberOfLines={1}\n preset=\"regular\"\n style={styles.nameText}>\n {credentialName}\n </Typography>\n {DetailText}\n </View>\n {accessoryView && <View style={styles.accessory}>{accessoryView}</View>}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n accessory: {\n alignItems: 'center',\n height: 44,\n justifyContent: 'center',\n width: 44,\n },\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 60,\n padding: 8,\n },\n detailText: {\n flex: 1,\n opacity: 0.7,\n },\n detailTextContainer: {\n flexDirection: 'row',\n marginTop: -1,\n },\n image: {\n height: 44,\n width: 44,\n },\n imageContainer: {\n alignItems: 'center',\n borderRadius: 5,\n height: 44,\n justifyContent: 'center',\n marginRight: 8,\n overflow: 'hidden',\n width: 44,\n },\n imagePlaceholder: {\n paddingLeft: 1,\n paddingTop: 3,\n textTransform: 'uppercase',\n },\n interpunct: {\n marginHorizontal: 12,\n opacity: 0.5,\n },\n nameText: {\n marginTop: 2,\n },\n statusIconWrapper: {\n bottom: 3,\n left: 36,\n position: 'absolute',\n },\n text: {\n flex: 1,\n justifyContent: 'center',\n },\n});\n\nexport default CredentialHeader;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,WAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAAqE,SAAAI,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAb,wBAAAS,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CA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CAAC;EACDR,gBAAgB,EAAE;IAChBiB,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB,CAAC;EACD7B,UAAU,EAAE;IACV8B,gBAAgB,EAAE,EAAE;IACpBR,OAAO,EAAE;EACX,CAAC;EACDT,QAAQ,EAAE;IACRU,SAAS,EAAE;EACb,CAAC;EACDX,iBAAiB,EAAE;IACjBmB,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,EAAE;IACRC,QAAQ,EAAE;EACZ,CAAC;EACD3C,IAAI,EAAE;IACJ+B,IAAI,EAAE,CAAC;IACPJ,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAAC,IAAAiB,QAAA,GAEYzE,gBAAgB;AAAA0E,OAAA,CAAAvG,OAAA,GAAAsG,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_testID","_blurView","_interopRequireDefault","_imageOrComponent","_typography","_colorSchemeContext","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","CredentialHeader","accessory","blur","color","credentialDetailPrimary","credentialDetailSecondary","credentialDetailTestID","credentialDetailErrorColor","credentialName","icon","iconLabelColor","statusIcon","style","testID","colorScheme","useAppColorScheme","statusIconView","useMemo","undefined","React","isValidElement","StatusIconComponent","createElement","accessoryView","AccessoryComponent","DetailText","commonProps","error","text","ellipsizeMode","numberOfLines","preset","styles","detailText","View","detailTextContainer","concatTestID","Fragment","interpunct","container","backgroundColor","white","blurStyle","StyleSheet","absoluteFill","imageContainer","source","image","String","imagePlaceholder","substring","statusIconWrapper","nameText","create","alignItems","height","justifyContent","width","flexDirection","padding","flex","opacity","marginTop","borderRadius","marginRight","overflow","paddingLeft","paddingTop","textTransform","marginHorizontal","bottom","left","position","_default","exports"],"sources":["credential-header.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { AccessibilityProps, ColorValue, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../../utils/testID';\nimport BlurView from '../../blur/blur-view';\nimport ImageOrComponent, { ImageOrComponentSource } from '../../image/image-or-component';\nimport Typography, { TypographyProps } from '../../text/typography';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\n\nexport interface CredentialHeaderProps extends AccessibilityProps {\n accessory?: React.ComponentType<any> | React.ReactElement;\n blur?: boolean;\n color?: ColorValue;\n credentialDetailPrimary?: string;\n credentialDetailSecondary?: string;\n credentialDetailTestID?: string;\n credentialDetailErrorColor?: boolean;\n credentialName: string;\n icon?: ImageOrComponentSource;\n iconLabelColor?: ColorValue;\n statusIcon?: React.ComponentType<any> | React.ReactElement;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\nconst CredentialHeader: FC<CredentialHeaderProps> = ({\n accessory,\n blur = true,\n color = '#5A69F3',\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialDetailErrorColor,\n credentialName,\n icon,\n iconLabelColor = '#FFFFFF',\n statusIcon,\n style,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const statusIconView: React.ReactElement | undefined = useMemo(() => {\n if (!statusIcon) {\n return undefined;\n }\n if (React.isValidElement(statusIcon)) {\n return statusIcon;\n } else {\n const StatusIconComponent = statusIcon as React.ComponentType<any>;\n return <StatusIconComponent />;\n }\n }, [statusIcon]);\n\n const accessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!accessory) {\n return undefined;\n }\n if (React.isValidElement(accessory)) {\n return accessory;\n } else {\n const AccessoryComponent = accessory as React.ComponentType<any>;\n return <AccessoryComponent />;\n }\n }, [accessory]);\n\n const DetailText = useMemo(() => {\n if (!credentialDetailPrimary) {\n return undefined;\n }\n const commonProps: TypographyProps = {\n color: credentialDetailErrorColor ? colorScheme.error : colorScheme.text,\n ellipsizeMode: 'tail',\n numberOfLines: 1,\n preset: 'xs',\n style: styles.detailText,\n };\n return (\n <View style={styles.detailTextContainer}>\n <Typography {...commonProps} testID={credentialDetailTestID ?? concatTestID(testID, 'primaryDetail')}>\n {credentialDetailPrimary}\n </Typography>\n {credentialDetailSecondary ? (\n <>\n <Typography {...commonProps} style={styles.interpunct}>\n {'·'}\n </Typography>\n <Typography {...commonProps} testID={concatTestID(testID, 'secondaryDetail')}>\n {credentialDetailSecondary}\n </Typography>\n </>\n ) : null}\n </View>\n );\n }, [\n credentialDetailPrimary,\n credentialDetailSecondary,\n colorScheme,\n testID,\n credentialDetailErrorColor,\n credentialDetailTestID,\n ]);\n\n return (\n <View style={[styles.container, { backgroundColor: blur ? undefined : colorScheme.white }, style]} testID={testID}>\n {blur && <BlurView blurStyle=\"strong\" style={StyleSheet.absoluteFill} />}\n <View style={[styles.imageContainer, { backgroundColor: color }]}>\n {icon ? (\n <ImageOrComponent testID={concatTestID(testID, 'logoIcon')} source={icon} style={styles.image} />\n ) : (\n <View testID={concatTestID(testID, 'logoBackgroundColor', String(color))}>\n <View testID={concatTestID(testID, 'logoTextColor', String(iconLabelColor))}>\n <Typography\n testID={concatTestID(testID, 'logoName')}\n color={iconLabelColor}\n preset=\"m\"\n style={styles.imagePlaceholder}>\n {credentialName.substring(0, 1)}\n </Typography>\n </View>\n </View>\n )}\n </View>\n {statusIconView && <View style={styles.statusIconWrapper}>{statusIconView}</View>}\n <View style={styles.text}>\n <Typography\n testID={concatTestID(testID, 'name')}\n color={colorScheme.text}\n ellipsizeMode={'tail'}\n numberOfLines={1}\n preset=\"regular\"\n style={styles.nameText}>\n {credentialName}\n </Typography>\n {DetailText}\n </View>\n {accessoryView && <View style={styles.accessory}>{accessoryView}</View>}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n accessory: {\n alignItems: 'center',\n height: 44,\n justifyContent: 'center',\n width: 44,\n },\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 60,\n padding: 8,\n },\n detailText: {\n flex: 1,\n opacity: 0.7,\n },\n detailTextContainer: {\n flexDirection: 'row',\n marginTop: -1,\n },\n image: {\n height: 44,\n width: 44,\n },\n imageContainer: {\n alignItems: 'center',\n borderRadius: 5,\n height: 44,\n justifyContent: 'center',\n marginRight: 8,\n overflow: 'hidden',\n width: 44,\n },\n imagePlaceholder: {\n paddingLeft: 1,\n paddingTop: 3,\n textTransform: 'uppercase',\n },\n interpunct: {\n marginHorizontal: 12,\n opacity: 0.5,\n },\n nameText: {\n marginTop: 2,\n },\n statusIconWrapper: {\n bottom: 3,\n left: 36,\n position: 'absolute',\n },\n text: {\n flex: 1,\n justifyContent: 'center',\n },\n});\n\nexport default CredentialHeader;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,WAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAAqE,SAAAI,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAA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AY,EAAE,CAAC;IACfR,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBQ,WAAW,EAAE,CAAC;IACdC,QAAQ,EAAE,QAAQ;IAClBR,KAAK,EAAE;EACT,CAAC;EACDR,gBAAgB,EAAE;IAChBiB,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB,CAAC;EACD9B,UAAU,EAAE;IACV+B,gBAAgB,EAAE,EAAE;IACpBR,OAAO,EAAE;EACX,CAAC;EACDT,QAAQ,EAAE;IACRU,SAAS,EAAE;EACb,CAAC;EACDX,iBAAiB,EAAE;IACjBmB,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,EAAE;IACRC,QAAQ,EAAE;EACZ,CAAC;EACD5C,IAAI,EAAE;IACJgC,IAAI,EAAE,CAAC;IACPJ,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAAlG,OAAA,GAEYwB,gBAAgB","ignoreList":[]}
@@ -9,24 +9,22 @@ var _reactNative = require("react-native");
9
9
  var _reactNativeReanimatedCarousel = _interopRequireDefault(require("react-native-reanimated-carousel"));
10
10
  var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
11
11
  var _utils = require("../../../utils");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- let CarouselImageType;
16
- exports.CarouselImageType = CarouselImageType;
17
- (function (CarouselImageType) {
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ let CarouselImageType = exports.CarouselImageType = /*#__PURE__*/function (CarouselImageType) {
18
16
  CarouselImageType["Barcode"] = "Barcode";
19
17
  CarouselImageType["QrCode"] = "QrCode";
20
18
  CarouselImageType["MRZ"] = "MRZ";
21
19
  CarouselImageType["Photo"] = "Photo";
22
- })(CarouselImageType || (exports.CarouselImageType = CarouselImageType = {}));
23
- const CarouselComponent = _ref => {
24
- let {
25
- carouselSize,
26
- imagesToRender,
27
- style,
28
- testID
29
- } = _ref;
20
+ return CarouselImageType;
21
+ }({});
22
+ const CarouselComponent = ({
23
+ carouselSize,
24
+ imagesToRender,
25
+ style,
26
+ testID
27
+ }) => {
30
28
  const [selectedDot, setSelectedDot] = (0, _react.useState)(0);
31
29
  if (!carouselSize.width || !carouselSize.height) {
32
30
  return null;
@@ -44,19 +42,20 @@ const CarouselComponent = _ref => {
44
42
  enabled: numberOfSlides >= 2,
45
43
  data: imagesToRender,
46
44
  testID: testID,
47
- renderItem: _ref2 => {
48
- let {
49
- item: {
50
- type,
51
- element
52
- }
53
- } = _ref2;
54
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
55
- style: styles.carouselItem
56
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
57
- style: [styles[type]]
58
- }, element));
59
- }
45
+ panGestureHandlerProps: {
46
+ activeOffsetX: [-10, 10],
47
+ failOffsetY: [-10, 10]
48
+ },
49
+ renderItem: ({
50
+ item: {
51
+ type,
52
+ element
53
+ }
54
+ }) => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
55
+ style: styles.carouselItem
56
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
57
+ style: [styles[type]]
58
+ }, element))
60
59
  }), numberOfSlides >= 2 ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
61
60
  style: styles.pageDotContainer
62
61
  }, imagesToRender.map((_, index) => /*#__PURE__*/_react.default.createElement(_reactNativeSvg.default, {
@@ -119,6 +118,5 @@ const styles = _reactNative.StyleSheet.create({
119
118
  justifyContent: 'center'
120
119
  }
121
120
  });
122
- var _default = CarouselComponent;
123
- exports.default = _default;
121
+ var _default = exports.default = CarouselComponent;
124
122
  //# sourceMappingURL=credential-image-carousel.js.map