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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (889) hide show
  1. package/README.md +3 -8
  2. package/lib/commonjs/components/backup/index.js.map +1 -1
  3. package/lib/commonjs/components/backup/preview-credentials.js +18 -22
  4. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  5. package/lib/commonjs/components/credential/credential.js +11 -12
  6. package/lib/commonjs/components/credential/credential.js.map +1 -1
  7. package/lib/commonjs/components/credential/index.js.map +1 -1
  8. package/lib/commonjs/components/entity/EntityButtons.js +20 -25
  9. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  10. package/lib/commonjs/components/entity/entity-attributes.js +16 -18
  11. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  12. package/lib/commonjs/components/entity/entity-details-with-buttons.js +31 -23
  13. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  14. package/lib/commonjs/components/entity/entity-details.js +30 -31
  15. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  16. package/lib/commonjs/components/entity/index.js +2 -2
  17. package/lib/commonjs/components/entity/index.js.map +1 -1
  18. package/lib/commonjs/components/history/history-details-screen.js +67 -0
  19. package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
  20. package/lib/commonjs/components/history/history-list-item-icon.js +97 -0
  21. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
  22. package/lib/commonjs/components/history/history-list-item.js +55 -0
  23. package/lib/commonjs/components/history/history-list-item.js.map +1 -0
  24. package/lib/commonjs/components/history/history-list-screen.js +123 -0
  25. package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
  26. package/lib/commonjs/components/history/history-list-section-header.js +39 -0
  27. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
  28. package/lib/commonjs/components/history/history-list.js +100 -0
  29. package/lib/commonjs/components/history/history-list.js.map +1 -0
  30. package/lib/commonjs/components/history/index.js +72 -0
  31. package/lib/commonjs/components/history/index.js.map +1 -0
  32. package/lib/commonjs/components/index.js +11 -0
  33. package/lib/commonjs/components/index.js.map +1 -1
  34. package/lib/commonjs/components/navigation/header-buttons.js +21 -25
  35. package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
  36. package/lib/commonjs/components/navigation/index.js.map +1 -1
  37. package/lib/commonjs/components/proof-request/group.js +4 -5
  38. package/lib/commonjs/components/proof-request/group.js.map +1 -1
  39. package/lib/commonjs/components/proof-request/index.js.map +1 -1
  40. package/lib/commonjs/components/proof-request/select-credential.js +11 -12
  41. package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
  42. package/lib/commonjs/components/proof-request/share-credential.js +25 -28
  43. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/commonjs/normalize-color.d.js.map +1 -1
  46. package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
  47. package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
  48. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
  49. package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  50. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
  51. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  52. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
  53. package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  54. package/lib/commonjs/ui-components/accessibility/index.js +1 -30
  55. package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
  56. package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
  57. package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
  58. package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
  59. package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
  60. package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
  61. package/lib/commonjs/ui-components/action-modal/index.js +1 -1
  62. package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
  63. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
  64. package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  65. package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
  66. package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
  67. package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
  68. package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
  69. package/lib/commonjs/ui-components/blur/index.js +2 -2
  70. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  71. package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
  72. package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
  73. package/lib/commonjs/ui-components/buttons/button.js +19 -22
  74. package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
  75. package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
  76. package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
  77. package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
  78. package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
  79. package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
  80. package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
  81. package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
  82. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
  83. package/lib/commonjs/ui-components/buttons/index.js +9 -37
  84. package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
  85. package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
  86. package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
  87. package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
  88. package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
  89. package/lib/commonjs/ui-components/camera/index.js +2 -2
  90. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  91. package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
  92. package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
  93. package/lib/commonjs/ui-components/control/checkbox.js +11 -12
  94. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  95. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  96. package/lib/commonjs/ui-components/control/switch.js +10 -12
  97. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  98. package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
  99. package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
  100. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
  101. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  102. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
  103. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  104. package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
  105. package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
  106. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
  107. package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  108. package/lib/commonjs/ui-components/credential/card/index.js +6 -41
  109. package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
  110. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
  111. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  112. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
  113. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  114. package/lib/commonjs/ui-components/credential/index.js +2 -25
  115. package/lib/commonjs/ui-components/credential/index.js.map +1 -1
  116. package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
  117. package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
  118. package/lib/commonjs/ui-components/credential/selector.js +8 -10
  119. package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
  120. package/lib/commonjs/ui-components/detail/detail.js +12 -14
  121. package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
  122. package/lib/commonjs/ui-components/detail/index.js +1 -1
  123. package/lib/commonjs/ui-components/detail/index.js.map +1 -1
  124. package/lib/commonjs/ui-components/entity/avatar.js +14 -16
  125. package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
  126. package/lib/commonjs/ui-components/entity/entity-cluster.js +16 -19
  127. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  128. package/lib/commonjs/ui-components/entity/index.js +2 -2
  129. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  130. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
  131. package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
  132. package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
  133. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  134. package/lib/commonjs/ui-components/header/header.js +12 -14
  135. package/lib/commonjs/ui-components/header/header.js.map +1 -1
  136. package/lib/commonjs/ui-components/header/index.js +4 -24
  137. package/lib/commonjs/ui-components/header/index.js.map +1 -1
  138. package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
  139. package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
  140. package/lib/commonjs/ui-components/history/data-item.js +30 -23
  141. package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
  142. package/lib/commonjs/ui-components/history/history-details.js +181 -0
  143. package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
  144. package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
  145. package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
  146. package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
  147. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  148. package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
  149. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  150. package/lib/commonjs/ui-components/history/index.js +30 -9
  151. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  152. package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
  153. package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
  154. package/lib/commonjs/ui-components/icons/credential.js +60 -71
  155. package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
  156. package/lib/commonjs/ui-components/icons/entity.js +36 -9
  157. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  158. package/lib/commonjs/ui-components/icons/history.js +115 -133
  159. package/lib/commonjs/ui-components/icons/history.js.map +1 -1
  160. package/lib/commonjs/ui-components/icons/icons.js +73 -90
  161. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  162. package/lib/commonjs/ui-components/icons/index.js.map +1 -1
  163. package/lib/commonjs/ui-components/icons/input.js +3 -3
  164. package/lib/commonjs/ui-components/icons/input.js.map +1 -1
  165. package/lib/commonjs/ui-components/icons/keypad.js +69 -81
  166. package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
  167. package/lib/commonjs/ui-components/icons/loader.js +4 -4
  168. package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
  169. package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
  170. package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
  171. package/lib/commonjs/ui-components/icons/selector.js +8 -9
  172. package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
  173. package/lib/commonjs/ui-components/icons/wallet.js +16 -19
  174. package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
  175. package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
  176. package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
  177. package/lib/commonjs/ui-components/image/index.js +2 -9
  178. package/lib/commonjs/ui-components/image/index.js.map +1 -1
  179. package/lib/commonjs/ui-components/index.js.map +1 -1
  180. package/lib/commonjs/ui-components/input/index.js +2 -2
  181. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  182. package/lib/commonjs/ui-components/input/radio-group.js +28 -25
  183. package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
  184. package/lib/commonjs/ui-components/input/selection-input.js +27 -38
  185. package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
  186. package/lib/commonjs/ui-components/input/text-input.js +25 -28
  187. package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
  188. package/lib/commonjs/ui-components/list/index.js +20 -2
  189. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  190. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
  191. package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
  192. package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
  193. package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
  194. package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
  195. package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
  196. package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
  197. package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
  198. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
  199. package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
  200. package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
  201. package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
  202. package/lib/commonjs/ui-components/loader/index.js +2 -2
  203. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  204. package/lib/commonjs/ui-components/loader/loader.js +17 -17
  205. package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
  206. package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
  207. package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
  208. package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
  209. package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
  210. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
  211. package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  212. package/lib/commonjs/ui-components/pin/index.js +2 -2
  213. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  214. package/lib/commonjs/ui-components/pin/keypad.js +19 -23
  215. package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
  216. package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
  217. package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
  218. package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
  219. package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
  220. package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
  221. package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
  222. package/lib/commonjs/ui-components/pin/pins.js +8 -9
  223. package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
  224. package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
  225. package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
  226. package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
  227. package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
  228. package/lib/commonjs/ui-components/screens/index.js +8 -49
  229. package/lib/commonjs/ui-components/screens/index.js.map +1 -1
  230. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +35 -42
  231. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  232. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
  233. package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  234. package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
  235. package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
  236. package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
  237. package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
  238. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
  239. package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
  240. package/lib/commonjs/ui-components/searchbar/index.js +2 -2
  241. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  242. package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
  243. package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
  244. package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
  245. package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
  246. package/lib/commonjs/ui-components/settings/index.js +2 -2
  247. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  248. package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
  249. package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
  250. package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
  251. package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
  252. package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
  253. package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
  254. package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
  255. package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
  256. package/lib/commonjs/ui-components/state/error-screen.js +10 -12
  257. package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
  258. package/lib/commonjs/ui-components/state/index.js +2 -2
  259. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  260. package/lib/commonjs/ui-components/text/base.js +14 -16
  261. package/lib/commonjs/ui-components/text/base.js.map +1 -1
  262. package/lib/commonjs/ui-components/text/font.js +11 -13
  263. package/lib/commonjs/ui-components/text/font.js.map +1 -1
  264. package/lib/commonjs/ui-components/text/index.js +2 -9
  265. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  266. package/lib/commonjs/ui-components/text/typography.js +10 -13
  267. package/lib/commonjs/ui-components/text/typography.js.map +1 -1
  268. package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
  269. package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
  270. package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
  271. package/lib/commonjs/ui-components/theme/index.js.map +1 -1
  272. package/lib/commonjs/utils/array.js.map +1 -1
  273. package/lib/commonjs/utils/backup.js.map +1 -1
  274. package/lib/commonjs/utils/color.js +1 -1
  275. package/lib/commonjs/utils/color.js.map +1 -1
  276. package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
  277. package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
  278. package/lib/commonjs/utils/date.js +3 -3
  279. package/lib/commonjs/utils/date.js.map +1 -1
  280. package/lib/commonjs/utils/filtering.js +11 -0
  281. package/lib/commonjs/utils/filtering.js.map +1 -0
  282. package/lib/commonjs/utils/history.js +76 -0
  283. package/lib/commonjs/utils/history.js.map +1 -0
  284. package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
  285. package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
  286. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
  287. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  288. package/lib/commonjs/utils/hooks/core/backup.js +31 -31
  289. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  290. package/lib/commonjs/utils/hooks/core/cache.js +44 -0
  291. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
  292. package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
  293. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  294. package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
  295. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  296. package/lib/commonjs/utils/hooks/core/core-init.js +44 -34
  297. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  298. package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
  299. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  300. package/lib/commonjs/utils/hooks/core/credentials.js +28 -37
  301. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  302. package/lib/commonjs/utils/hooks/core/dids.js +4 -6
  303. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  304. package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
  305. package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
  306. package/lib/commonjs/utils/hooks/core/history.js +5 -37
  307. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  308. package/lib/commonjs/utils/hooks/core/identifiers.js +20 -0
  309. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -0
  310. package/lib/commonjs/utils/hooks/core/index.js +22 -0
  311. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  312. package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
  313. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  314. package/lib/commonjs/utils/hooks/core/proofs.js +108 -76
  315. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  316. package/lib/commonjs/utils/hooks/core/query.js +1 -2
  317. package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
  318. package/lib/commonjs/utils/hooks/core/trust-entity.js +17 -7
  319. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  320. package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  321. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
  322. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  323. package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
  324. package/lib/commonjs/utils/hooks/index.js.map +1 -1
  325. package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
  326. package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
  327. package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
  328. package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  329. package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
  330. package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
  331. package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
  332. package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
  333. package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
  334. package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
  335. package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
  336. package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
  337. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  338. package/lib/commonjs/utils/index.js +37 -1
  339. package/lib/commonjs/utils/index.js.map +1 -1
  340. package/lib/commonjs/utils/navigation.js +5 -5
  341. package/lib/commonjs/utils/navigation.js.map +1 -1
  342. package/lib/commonjs/utils/parsers/credential-images.js +1 -1
  343. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  344. package/lib/commonjs/utils/parsers/credential-sharing.js +24 -25
  345. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  346. package/lib/commonjs/utils/parsers/credential.js +23 -26
  347. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  348. package/lib/commonjs/utils/parsers/index.js +11 -0
  349. package/lib/commonjs/utils/parsers/index.js.map +1 -1
  350. package/lib/commonjs/utils/parsers/query.js +4 -3
  351. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  352. package/lib/commonjs/utils/parsers/universal-links.js +33 -0
  353. package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
  354. package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
  355. package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
  356. package/lib/commonjs/utils/ref.js.map +1 -1
  357. package/lib/commonjs/utils/reporting.js +4 -2
  358. package/lib/commonjs/utils/reporting.js.map +1 -1
  359. package/lib/commonjs/utils/string.js.map +1 -1
  360. package/lib/commonjs/utils/testID.js +1 -4
  361. package/lib/commonjs/utils/testID.js.map +1 -1
  362. package/lib/commonjs/utils/testID.test.js.map +1 -1
  363. package/lib/commonjs/utils/useMemoAsync.js +9 -0
  364. package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
  365. package/lib/commonjs/utils/uuid.js +1 -1
  366. package/lib/commonjs/utils/uuid.js.map +1 -1
  367. package/lib/module/components/backup/index.js.map +1 -1
  368. package/lib/module/components/backup/preview-credentials.js +17 -21
  369. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  370. package/lib/module/components/credential/credential.js +10 -11
  371. package/lib/module/components/credential/credential.js.map +1 -1
  372. package/lib/module/components/credential/index.js.map +1 -1
  373. package/lib/module/components/entity/EntityButtons.js +17 -21
  374. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  375. package/lib/module/components/entity/entity-attributes.js +13 -14
  376. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  377. package/lib/module/components/entity/entity-details-with-buttons.js +29 -20
  378. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  379. package/lib/module/components/entity/entity-details.js +28 -28
  380. package/lib/module/components/entity/entity-details.js.map +1 -1
  381. package/lib/module/components/entity/index.js.map +1 -1
  382. package/lib/module/components/history/history-details-screen.js +59 -0
  383. package/lib/module/components/history/history-details-screen.js.map +1 -0
  384. package/lib/module/components/history/history-list-item-icon.js +87 -0
  385. package/lib/module/components/history/history-list-item-icon.js.map +1 -0
  386. package/lib/module/components/history/history-list-item.js +46 -0
  387. package/lib/module/components/history/history-list-item.js.map +1 -0
  388. package/lib/module/components/history/history-list-screen.js +114 -0
  389. package/lib/module/components/history/history-list-screen.js.map +1 -0
  390. package/lib/module/components/history/history-list-section-header.js +29 -0
  391. package/lib/module/components/history/history-list-section-header.js.map +1 -0
  392. package/lib/module/components/history/history-list.js +90 -0
  393. package/lib/module/components/history/history-list.js.map +1 -0
  394. package/lib/module/components/history/index.js +7 -0
  395. package/lib/module/components/history/index.js.map +1 -0
  396. package/lib/module/components/index.js +1 -0
  397. package/lib/module/components/index.js.map +1 -1
  398. package/lib/module/components/navigation/header-buttons.js +19 -23
  399. package/lib/module/components/navigation/header-buttons.js.map +1 -1
  400. package/lib/module/components/navigation/index.js.map +1 -1
  401. package/lib/module/components/proof-request/group.js +3 -4
  402. package/lib/module/components/proof-request/group.js.map +1 -1
  403. package/lib/module/components/proof-request/index.js.map +1 -1
  404. package/lib/module/components/proof-request/select-credential.js +10 -11
  405. package/lib/module/components/proof-request/select-credential.js.map +1 -1
  406. package/lib/module/components/proof-request/share-credential.js +23 -26
  407. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  408. package/lib/module/index.js.map +1 -1
  409. package/lib/module/normalize-color.d.js.map +1 -1
  410. package/lib/module/ui-components/accessibility/accessibility.js +5 -7
  411. package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
  412. package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
  413. package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
  414. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
  415. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  416. package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
  417. package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
  418. package/lib/module/ui-components/accessibility/index.js +4 -4
  419. package/lib/module/ui-components/accessibility/index.js.map +1 -1
  420. package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
  421. package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
  422. package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
  423. package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
  424. package/lib/module/ui-components/action-modal/index.js.map +1 -1
  425. package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
  426. package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
  427. package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
  428. package/lib/module/ui-components/blur/blur-view.js +10 -11
  429. package/lib/module/ui-components/blur/blur-view.js.map +1 -1
  430. package/lib/module/ui-components/blur/index.js.map +1 -1
  431. package/lib/module/ui-components/buttons/back-button.js +10 -11
  432. package/lib/module/ui-components/buttons/back-button.js.map +1 -1
  433. package/lib/module/ui-components/buttons/button.js +17 -18
  434. package/lib/module/ui-components/buttons/button.js.map +1 -1
  435. package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
  436. package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
  437. package/lib/module/ui-components/buttons/filter-button.js +6 -7
  438. package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
  439. package/lib/module/ui-components/buttons/ghost-button.js +9 -10
  440. package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
  441. package/lib/module/ui-components/buttons/hold-button.js +236 -0
  442. package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
  443. package/lib/module/ui-components/buttons/index.js +8 -7
  444. package/lib/module/ui-components/buttons/index.js.map +1 -1
  445. package/lib/module/ui-components/buttons/scan-button.js +5 -6
  446. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  447. package/lib/module/ui-components/camera/camera-overlay.js +7 -9
  448. package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
  449. package/lib/module/ui-components/camera/index.js.map +1 -1
  450. package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
  451. package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
  452. package/lib/module/ui-components/control/checkbox.js +9 -10
  453. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  454. package/lib/module/ui-components/control/index.js.map +1 -1
  455. package/lib/module/ui-components/control/switch.js +8 -9
  456. package/lib/module/ui-components/control/switch.js.map +1 -1
  457. package/lib/module/ui-components/credential/card/credential-card.js +16 -17
  458. package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
  459. package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
  460. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  461. package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
  462. package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  463. package/lib/module/ui-components/credential/card/credential-header.js +21 -19
  464. package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
  465. package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
  466. package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
  467. package/lib/module/ui-components/credential/card/index.js +10 -10
  468. package/lib/module/ui-components/credential/card/index.js.map +1 -1
  469. package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
  470. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  471. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
  472. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  473. package/lib/module/ui-components/credential/index.js +2 -2
  474. package/lib/module/ui-components/credential/index.js.map +1 -1
  475. package/lib/module/ui-components/credential/selector-status.js +3 -3
  476. package/lib/module/ui-components/credential/selector-status.js.map +1 -1
  477. package/lib/module/ui-components/credential/selector.js +5 -6
  478. package/lib/module/ui-components/credential/selector.js.map +1 -1
  479. package/lib/module/ui-components/detail/detail.js +9 -10
  480. package/lib/module/ui-components/detail/detail.js.map +1 -1
  481. package/lib/module/ui-components/detail/index.js.map +1 -1
  482. package/lib/module/ui-components/entity/avatar.js +10 -11
  483. package/lib/module/ui-components/entity/avatar.js.map +1 -1
  484. package/lib/module/ui-components/entity/entity-cluster.js +12 -14
  485. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  486. package/lib/module/ui-components/entity/index.js.map +1 -1
  487. package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
  488. package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
  489. package/lib/module/ui-components/header/foldable-header.js +10 -12
  490. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  491. package/lib/module/ui-components/header/header.js +10 -11
  492. package/lib/module/ui-components/header/header.js.map +1 -1
  493. package/lib/module/ui-components/header/index.js +6 -6
  494. package/lib/module/ui-components/header/index.js.map +1 -1
  495. package/lib/module/ui-components/header/navigation-header.js +23 -28
  496. package/lib/module/ui-components/header/navigation-header.js.map +1 -1
  497. package/lib/module/ui-components/history/data-item.js +23 -15
  498. package/lib/module/ui-components/history/data-item.js.map +1 -1
  499. package/lib/module/ui-components/history/history-details.js +171 -0
  500. package/lib/module/ui-components/history/history-details.js.map +1 -0
  501. package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
  502. package/lib/module/ui-components/history/history-item.js.map +1 -0
  503. package/lib/module/ui-components/history/history-section-header.js +6 -7
  504. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  505. package/lib/module/ui-components/history/history-section-list-item.js +8 -9
  506. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  507. package/lib/module/ui-components/history/index.js +5 -4
  508. package/lib/module/ui-components/history/index.js.map +1 -1
  509. package/lib/module/ui-components/icons/connectivity.js +16 -21
  510. package/lib/module/ui-components/icons/connectivity.js.map +1 -1
  511. package/lib/module/ui-components/icons/credential.js +57 -68
  512. package/lib/module/ui-components/icons/credential.js.map +1 -1
  513. package/lib/module/ui-components/icons/entity.js +31 -5
  514. package/lib/module/ui-components/icons/entity.js.map +1 -1
  515. package/lib/module/ui-components/icons/history.js +103 -128
  516. package/lib/module/ui-components/icons/history.js.map +1 -1
  517. package/lib/module/ui-components/icons/icons.js +70 -87
  518. package/lib/module/ui-components/icons/icons.js.map +1 -1
  519. package/lib/module/ui-components/icons/index.js.map +1 -1
  520. package/lib/module/ui-components/icons/input.js.map +1 -1
  521. package/lib/module/ui-components/icons/keypad.js +66 -78
  522. package/lib/module/ui-components/icons/keypad.js.map +1 -1
  523. package/lib/module/ui-components/icons/loader.js +1 -1
  524. package/lib/module/ui-components/icons/loader.js.map +1 -1
  525. package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
  526. package/lib/module/ui-components/icons/selector.js +5 -6
  527. package/lib/module/ui-components/icons/selector.js.map +1 -1
  528. package/lib/module/ui-components/icons/wallet.js +13 -16
  529. package/lib/module/ui-components/icons/wallet.js.map +1 -1
  530. package/lib/module/ui-components/image/image-or-component.js +12 -14
  531. package/lib/module/ui-components/image/image-or-component.js.map +1 -1
  532. package/lib/module/ui-components/image/index.js +2 -2
  533. package/lib/module/ui-components/image/index.js.map +1 -1
  534. package/lib/module/ui-components/index.js.map +1 -1
  535. package/lib/module/ui-components/input/index.js.map +1 -1
  536. package/lib/module/ui-components/input/radio-group.js +26 -22
  537. package/lib/module/ui-components/input/radio-group.js.map +1 -1
  538. package/lib/module/ui-components/input/selection-input.js +21 -31
  539. package/lib/module/ui-components/input/selection-input.js.map +1 -1
  540. package/lib/module/ui-components/input/text-input.js +21 -22
  541. package/lib/module/ui-components/input/text-input.js.map +1 -1
  542. package/lib/module/ui-components/list/index.js +1 -0
  543. package/lib/module/ui-components/list/index.js.map +1 -1
  544. package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
  545. package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
  546. package/lib/module/ui-components/list/list-section-header.js +8 -9
  547. package/lib/module/ui-components/list/list-section-header.js.map +1 -1
  548. package/lib/module/ui-components/list/list-title-header.js +4 -5
  549. package/lib/module/ui-components/list/list-title-header.js.map +1 -1
  550. package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
  551. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
  552. package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
  553. package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
  554. package/lib/module/ui-components/list/wallet/index.js +4 -0
  555. package/lib/module/ui-components/list/wallet/index.js.map +1 -0
  556. package/lib/module/ui-components/loader/index.js.map +1 -1
  557. package/lib/module/ui-components/loader/loader.js +14 -12
  558. package/lib/module/ui-components/loader/loader.js.map +1 -1
  559. package/lib/module/ui-components/loader/loading-result.js +21 -19
  560. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  561. package/lib/module/ui-components/nerd-view/index.js +2 -2
  562. package/lib/module/ui-components/nerd-view/index.js.map +1 -1
  563. package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
  564. package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
  565. package/lib/module/ui-components/pin/index.js.map +1 -1
  566. package/lib/module/ui-components/pin/keypad.js +17 -19
  567. package/lib/module/ui-components/pin/keypad.js.map +1 -1
  568. package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
  569. package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
  570. package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
  571. package/lib/module/ui-components/pin/pin-lock.js +6 -7
  572. package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
  573. package/lib/module/ui-components/pin/pins.js +7 -8
  574. package/lib/module/ui-components/pin/pins.js.map +1 -1
  575. package/lib/module/ui-components/screens/backup-screen.js +13 -14
  576. package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
  577. package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
  578. package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
  579. package/lib/module/ui-components/screens/index.js +12 -12
  580. package/lib/module/ui-components/screens/index.js.map +1 -1
  581. package/lib/module/ui-components/screens/nerd-mode-screen.js +30 -35
  582. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  583. package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
  584. package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
  585. package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
  586. package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
  587. package/lib/module/ui-components/screens/section-list-screen.js +11 -12
  588. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  589. package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
  590. package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
  591. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  592. package/lib/module/ui-components/searchbar/search-bar.js +11 -12
  593. package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
  594. package/lib/module/ui-components/settings/button-setting.js +10 -11
  595. package/lib/module/ui-components/settings/button-setting.js.map +1 -1
  596. package/lib/module/ui-components/settings/index.js.map +1 -1
  597. package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
  598. package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
  599. package/lib/module/ui-components/settings/setting-item.js +7 -8
  600. package/lib/module/ui-components/settings/setting-item.js.map +1 -1
  601. package/lib/module/ui-components/settings/settings-button.js +5 -6
  602. package/lib/module/ui-components/settings/settings-button.js.map +1 -1
  603. package/lib/module/ui-components/settings/switch-setting.js +9 -10
  604. package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
  605. package/lib/module/ui-components/state/error-screen.js +7 -8
  606. package/lib/module/ui-components/state/error-screen.js.map +1 -1
  607. package/lib/module/ui-components/state/index.js.map +1 -1
  608. package/lib/module/ui-components/text/base.js +12 -13
  609. package/lib/module/ui-components/text/base.js.map +1 -1
  610. package/lib/module/ui-components/text/font.js +10 -11
  611. package/lib/module/ui-components/text/font.js.map +1 -1
  612. package/lib/module/ui-components/text/index.js +2 -2
  613. package/lib/module/ui-components/text/index.js.map +1 -1
  614. package/lib/module/ui-components/text/typography.js +8 -10
  615. package/lib/module/ui-components/text/typography.js.map +1 -1
  616. package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
  617. package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
  618. package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
  619. package/lib/module/ui-components/theme/index.js.map +1 -1
  620. package/lib/module/utils/array.js.map +1 -1
  621. package/lib/module/utils/backup.js.map +1 -1
  622. package/lib/module/utils/color.js.map +1 -1
  623. package/lib/module/utils/contrasting-status-bar.js +5 -6
  624. package/lib/module/utils/contrasting-status-bar.js.map +1 -1
  625. package/lib/module/utils/date.js +4 -4
  626. package/lib/module/utils/date.js.map +1 -1
  627. package/lib/module/utils/filtering.js +4 -0
  628. package/lib/module/utils/filtering.js.map +1 -0
  629. package/lib/module/utils/history.js +66 -0
  630. package/lib/module/utils/history.js.map +1 -0
  631. package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
  632. package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
  633. package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
  634. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  635. package/lib/module/utils/hooks/core/backup.js +31 -31
  636. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  637. package/lib/module/utils/hooks/core/cache.js +37 -0
  638. package/lib/module/utils/hooks/core/cache.js.map +1 -0
  639. package/lib/module/utils/hooks/core/core-config.js +11 -0
  640. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  641. package/lib/module/utils/hooks/core/core-context.js +14 -9
  642. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  643. package/lib/module/utils/hooks/core/core-init.js +42 -30
  644. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  645. package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
  646. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  647. package/lib/module/utils/hooks/core/credentials.js +27 -36
  648. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  649. package/lib/module/utils/hooks/core/dids.js +3 -4
  650. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  651. package/lib/module/utils/hooks/core/error-code.js +3 -3
  652. package/lib/module/utils/hooks/core/error-code.js.map +1 -1
  653. package/lib/module/utils/hooks/core/history.js +4 -35
  654. package/lib/module/utils/hooks/core/history.js.map +1 -1
  655. package/lib/module/utils/hooks/core/identifiers.js +13 -0
  656. package/lib/module/utils/hooks/core/identifiers.js.map +1 -0
  657. package/lib/module/utils/hooks/core/index.js +2 -0
  658. package/lib/module/utils/hooks/core/index.js.map +1 -1
  659. package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
  660. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  661. package/lib/module/utils/hooks/core/proofs.js +102 -67
  662. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  663. package/lib/module/utils/hooks/core/query.js.map +1 -1
  664. package/lib/module/utils/hooks/core/trust-entity.js +16 -6
  665. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  666. package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
  667. package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
  668. package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
  669. package/lib/module/utils/hooks/http/client.js.map +1 -1
  670. package/lib/module/utils/hooks/index.js.map +1 -1
  671. package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
  672. package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
  673. package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
  674. package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
  675. package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
  676. package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
  677. package/lib/module/utils/hooks/navigation/index.js.map +1 -1
  678. package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
  679. package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
  680. package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
  681. package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
  682. package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
  683. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  684. package/lib/module/utils/index.js +3 -0
  685. package/lib/module/utils/index.js.map +1 -1
  686. package/lib/module/utils/navigation.js +5 -5
  687. package/lib/module/utils/navigation.js.map +1 -1
  688. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  689. package/lib/module/utils/parsers/credential-sharing.js +23 -24
  690. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  691. package/lib/module/utils/parsers/credential.js +23 -25
  692. package/lib/module/utils/parsers/credential.js.map +1 -1
  693. package/lib/module/utils/parsers/index.js +1 -0
  694. package/lib/module/utils/parsers/index.js.map +1 -1
  695. package/lib/module/utils/parsers/query.js +4 -3
  696. package/lib/module/utils/parsers/query.js.map +1 -1
  697. package/lib/module/utils/parsers/universal-links.js +25 -0
  698. package/lib/module/utils/parsers/universal-links.js.map +1 -0
  699. package/lib/module/utils/parsers/universal-links.test.js +38 -0
  700. package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
  701. package/lib/module/utils/ref.js.map +1 -1
  702. package/lib/module/utils/reporting.js +1 -0
  703. package/lib/module/utils/reporting.js.map +1 -1
  704. package/lib/module/utils/string.js.map +1 -1
  705. package/lib/module/utils/testID.js +1 -4
  706. package/lib/module/utils/testID.js.map +1 -1
  707. package/lib/module/utils/testID.test.js.map +1 -1
  708. package/lib/module/utils/useMemoAsync.js +10 -0
  709. package/lib/module/utils/useMemoAsync.js.map +1 -1
  710. package/lib/module/utils/uuid.js.map +1 -1
  711. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  712. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -2
  713. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  714. package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
  715. package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
  716. package/lib/typescript/components/history/history-list-item.d.ts +21 -0
  717. package/lib/typescript/components/history/history-list-screen.d.ts +24 -0
  718. package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
  719. package/lib/typescript/components/history/history-list.d.ts +19 -0
  720. package/lib/typescript/components/history/index.d.ts +6 -0
  721. package/lib/typescript/components/index.d.ts +1 -0
  722. package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
  723. package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
  724. package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
  725. package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
  726. package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
  727. package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
  728. package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
  729. package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
  730. package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
  731. package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
  732. package/lib/typescript/ui-components/credential/index.d.ts +2 -1
  733. package/lib/typescript/ui-components/header/index.d.ts +6 -3
  734. package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
  735. package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
  736. package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
  737. package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
  738. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  739. package/lib/typescript/ui-components/history/index.d.ts +5 -4
  740. package/lib/typescript/ui-components/icons/entity.d.ts +1 -0
  741. package/lib/typescript/ui-components/icons/history.d.ts +22 -35
  742. package/lib/typescript/ui-components/image/index.d.ts +2 -1
  743. package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
  744. package/lib/typescript/ui-components/list/index.d.ts +1 -0
  745. package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
  746. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
  747. package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
  748. package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
  749. package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
  750. package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
  751. package/lib/typescript/ui-components/screens/index.d.ts +12 -6
  752. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +4 -4
  753. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  754. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  755. package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
  756. package/lib/typescript/utils/filtering.d.ts +1 -0
  757. package/lib/typescript/utils/history.d.ts +10 -0
  758. package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
  759. package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
  760. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
  761. package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
  762. package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
  763. package/lib/typescript/utils/hooks/core/credentials.d.ts +9 -4
  764. package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
  765. package/lib/typescript/utils/hooks/core/identifiers.d.ts +2 -0
  766. package/lib/typescript/utils/hooks/core/index.d.ts +2 -0
  767. package/lib/typescript/utils/hooks/core/proofs.d.ts +16 -9
  768. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -1
  769. package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
  770. package/lib/typescript/utils/index.d.ts +3 -0
  771. package/lib/typescript/utils/parsers/index.d.ts +1 -0
  772. package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
  773. package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
  774. package/lib/typescript/utils/ref.d.ts +1 -1
  775. package/package.json +61 -47
  776. package/src/components/entity/entity-attributes.tsx +5 -4
  777. package/src/components/entity/entity-details-with-buttons.tsx +20 -13
  778. package/src/components/entity/entity-details.tsx +24 -27
  779. package/src/components/history/history-details-screen.tsx +89 -0
  780. package/src/components/history/history-list-item-icon.tsx +113 -0
  781. package/src/components/history/history-list-item.tsx +64 -0
  782. package/src/components/history/history-list-screen.tsx +157 -0
  783. package/src/components/history/history-list-section-header.tsx +42 -0
  784. package/src/components/history/history-list.tsx +116 -0
  785. package/src/components/history/index.tsx +6 -0
  786. package/src/components/index.ts +1 -0
  787. package/src/components/proof-request/share-credential.tsx +2 -1
  788. package/src/ui-components/accessibility/accessibility.ts +2 -2
  789. package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
  790. package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
  791. package/src/ui-components/accessibility/index.ts +4 -3
  792. package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
  793. package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
  794. package/src/ui-components/buttons/back-button.stories.tsx +7 -8
  795. package/src/ui-components/buttons/button.stories.tsx +9 -10
  796. package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
  797. package/src/ui-components/buttons/connectivity-button.tsx +1 -1
  798. package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
  799. package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
  800. package/src/ui-components/buttons/hold-button.tsx +276 -0
  801. package/src/ui-components/buttons/index.ts +16 -6
  802. package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
  803. package/src/ui-components/control/checkbox.stories.tsx +8 -8
  804. package/src/ui-components/control/switch.stories.tsx +11 -8
  805. package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
  806. package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
  807. package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
  808. package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
  809. package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
  810. package/src/ui-components/credential/card/credential-header.tsx +4 -1
  811. package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
  812. package/src/ui-components/credential/card/index.ts +11 -5
  813. package/src/ui-components/credential/index.ts +2 -1
  814. package/src/ui-components/credential/selector.stories.tsx +7 -7
  815. package/src/ui-components/detail/detail.stories.tsx +11 -8
  816. package/src/ui-components/entity/avatar.stories.tsx +10 -7
  817. package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
  818. package/src/ui-components/entity/entity-cluster.tsx +1 -1
  819. package/src/ui-components/header/header.stories.tsx +10 -7
  820. package/src/ui-components/header/index.ts +6 -3
  821. package/src/ui-components/header/navigation-header.stories.tsx +11 -8
  822. package/src/ui-components/history/data-item.tsx +13 -4
  823. package/src/ui-components/history/history-details.tsx +247 -0
  824. package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
  825. package/src/ui-components/history/history-section-header.tsx +2 -2
  826. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  827. package/src/ui-components/history/index.ts +5 -4
  828. package/src/ui-components/icons/entity.tsx +27 -0
  829. package/src/ui-components/icons/history.tsx +84 -131
  830. package/src/ui-components/image/index.tsx +2 -1
  831. package/src/ui-components/input/radio-group.stories.tsx +34 -0
  832. package/src/ui-components/input/radio-group.tsx +8 -2
  833. package/src/ui-components/input/selection-input.stories.tsx +20 -17
  834. package/src/ui-components/list/index.ts +1 -0
  835. package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
  836. package/src/ui-components/list/wallet/empty-list.tsx +75 -0
  837. package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
  838. package/src/ui-components/list/wallet/index.tsx +4 -0
  839. package/src/ui-components/loader/loader.stories.tsx +6 -9
  840. package/src/ui-components/loader/loader.tsx +6 -3
  841. package/src/ui-components/loader/loading-result.stories.tsx +13 -10
  842. package/src/ui-components/loader/loading-result.tsx +8 -4
  843. package/src/ui-components/nerd-view/index.ts +2 -1
  844. package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
  845. package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
  846. package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
  847. package/src/ui-components/screens/index.ts +12 -6
  848. package/src/ui-components/screens/nerd-mode-screen.tsx +6 -6
  849. package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
  850. package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
  851. package/src/ui-components/searchbar/search-bar.tsx +2 -2
  852. package/src/ui-components/state/error-screen.stories.tsx +8 -9
  853. package/src/ui-components/state/error-screen.tsx +1 -1
  854. package/src/ui-components/text/index.ts +2 -1
  855. package/src/ui-components/text/typography.stories.tsx +19 -12
  856. package/src/ui-components/theme/color-scheme-context.tsx +1 -0
  857. package/src/ui-components/theme/color-scheme.ts +1 -0
  858. package/src/utils/date.ts +5 -5
  859. package/src/utils/filtering.ts +5 -0
  860. package/src/utils/history.ts +71 -0
  861. package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
  862. package/src/utils/hooks/connectivity/connectivity.ts +28 -4
  863. package/src/utils/hooks/core/backup.ts +25 -21
  864. package/src/utils/hooks/core/cache.ts +43 -0
  865. package/src/utils/hooks/core/core-config.ts +19 -0
  866. package/src/utils/hooks/core/core-context.tsx +15 -2
  867. package/src/utils/hooks/core/core-init.ts +45 -27
  868. package/src/utils/hooks/core/credential-schemas.ts +1 -1
  869. package/src/utils/hooks/core/credentials.ts +18 -17
  870. package/src/utils/hooks/core/history.ts +2 -57
  871. package/src/utils/hooks/core/identifiers.ts +18 -0
  872. package/src/utils/hooks/core/index.ts +3 -1
  873. package/src/utils/hooks/core/proof-schemas.ts +1 -1
  874. package/src/utils/hooks/core/proofs.ts +111 -51
  875. package/src/utils/hooks/core/trust-entity.ts +21 -13
  876. package/src/utils/hooks/navigation/open-settings.ts +2 -3
  877. package/src/utils/hooks/revocation/credential-status.ts +3 -2
  878. package/src/utils/index.ts +3 -0
  879. package/src/utils/navigation.ts +4 -2
  880. package/src/utils/parsers/credential-sharing.tsx +25 -25
  881. package/src/utils/parsers/credential.ts +5 -1
  882. package/src/utils/parsers/index.ts +1 -0
  883. package/src/utils/parsers/query.tsx +4 -2
  884. package/src/utils/parsers/universal-links.test.ts +57 -0
  885. package/src/utils/parsers/universal-links.ts +26 -0
  886. package/src/utils/ref.ts +1 -1
  887. package/src/utils/reporting.ts +1 -0
  888. package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
  889. package/lib/module/ui-components/history/history-list-item.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './ui-components';\nexport * from './utils';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,iBAAiB;AAC/B,cAAc,SAAS"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './ui-components';\nexport * from './utils';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,iBAAiB;AAC/B,cAAc,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["normalize-color.d.ts"],"sourcesContent":["declare module '@react-native/normalize-color';\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["normalize-color.d.ts"],"sourcesContent":["declare module '@react-native/normalize-color';\n"],"mappings":"","ignoreList":[]}
@@ -95,8 +95,7 @@ export const focusAccessibility = component => {
95
95
  * @param {boolean} focused Focusing happens when this changes to `true`
96
96
  * @returns reference to be used with the target element
97
97
  */
98
- export const useAccessibilityFocus = function () {
99
- let focused = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
98
+ export const useAccessibilityFocus = (focused = true) => {
100
99
  const ref = useRef(null);
101
100
  useEffect(() => {
102
101
  if (focused) {
@@ -131,11 +130,10 @@ export const useAccessibilityAnnouncement = message => {
131
130
  };
132
131
  if (Platform.OS === 'ios') {
133
132
  let retries = 0;
134
- subscription = AccessibilityInfo.addEventListener('announcementFinished', _ref => {
135
- let {
136
- announcement: finished,
137
- success
138
- } = _ref;
133
+ subscription = AccessibilityInfo.addEventListener('announcementFinished', ({
134
+ announcement: finished,
135
+ success
136
+ }) => {
139
137
  if (finished === announcement) {
140
138
  if (success) {
141
139
  setAnnouncementFinished(announcement);
@@ -1 +1 @@
1
- {"version":3,"names":["useIsFocused","useNavigation","useEffect","useRef","useState","AccessibilityInfo","findNodeHandle","Platform","textTransformer","setAccessibilityTextTransformer","transformer","transformAccessibilityText","text","useAccessibleAfterTransition","navigation","accessible","setAccessible","isFocused","undefined","unsubscribe","addListener","timeout","setTimeout","clearTimeout","useIsOutsideTransition","inTransition","setInTransition","focused","current","unsubscribeStart","unsubscribeEnd","focusAccessibility","component","OS","nodeHandle","setAccessibilityFocus","useAccessibilityFocus","arguments","length","ref","useAccessibilityAnnouncement","message","announcement","announcementFinished","setAnnouncementFinished","subscription","_subscription","remove","retries","addEventListener","_ref","finished","success","announceForAccessibility","Boolean","useAccessibilityAnnouncementCumulative","waitForPreviousAnnouncement","wait","announcements","setAnnouncements","prev","nextAnnouncement","filter","m"],"sources":["accessibility.ts"],"sourcesContent":["import { NavigationProp, NavigationState, useIsFocused, useNavigation } from '@react-navigation/native';\nimport { useEffect, useRef, useState } from 'react';\nimport { AccessibilityInfo, EmitterSubscription, findNodeHandle, Platform } from 'react-native';\n\n/**\n * Global transformer of text for Voice-Over\n * @param {string} text (Visible) text to be announced\n * @returns {string} Text to be read-out by Voice-Over\n */\nexport type AccessibilityTextTransformer = (text: string) => string;\nlet textTransformer: AccessibilityTextTransformer | null = null;\nexport function setAccessibilityTextTransformer(transformer: AccessibilityTextTransformer | null) {\n textTransformer = transformer;\n}\nexport function transformAccessibilityText(text: string) {\n return textTransformer && text ? textTransformer(text) : text;\n}\n\n/**\n * Make element accessible after navigation transition is done\n * @returns {boolean} flag to be used as `accessible` prop on the target component(s)\n */\nexport function useAccessibleAfterTransition<\n TNavigationProp extends NavigationProp<\n Record<string, any>,\n string,\n NavigationState<Record<string, any>>,\n {},\n { transitionEnd: {} }\n >,\n>() {\n const navigation = useNavigation<TNavigationProp>();\n const [accessible, setAccessible] = useState(false);\n\n const isFocused = useIsFocused();\n useEffect(() => {\n if (!isFocused) {\n setAccessible(false);\n return undefined;\n }\n const unsubscribe = navigation.addListener('transitionEnd', () => setAccessible(true));\n // fallback for cases when transition doesn't happen (e.g. forceful screen re-render)\n const timeout = setTimeout(() => setAccessible(true), 500);\n return () => {\n unsubscribe();\n clearTimeout(timeout);\n };\n }, [navigation, isFocused]);\n\n return isFocused && accessible;\n}\n\n/**\n * Query whether the current screen is NOT transitioning\n * @returns {boolean} flag signifying whether the current screen is NOT in a transition (either entering or leaving)\n */\nexport function useIsOutsideTransition<\n TNavigationProp extends NavigationProp<\n Record<string, any>,\n string,\n NavigationState<Record<string, any>>,\n {},\n { transitionStart: {}; transitionEnd: {} }\n >,\n>() {\n const navigation = useNavigation<TNavigationProp>();\n const [inTransition, setInTransition] = useState<boolean>(true);\n\n const isFocused = useIsFocused();\n const focused = useRef(isFocused);\n focused.current = isFocused;\n\n useEffect(() => {\n const unsubscribeStart = navigation.addListener('transitionStart', () => setInTransition(true));\n const unsubscribeEnd = navigation.addListener('transitionEnd', () => {\n if (focused.current) {\n setInTransition(false);\n }\n });\n return () => {\n unsubscribeStart();\n unsubscribeEnd();\n };\n }, [navigation]);\n\n useEffect(() => {\n if (!isFocused) {\n return undefined;\n }\n\n setInTransition(true);\n // fallback for cases when transition callback doesn't happen (e.g. forceful screen re-render)\n const timeout = setTimeout(() => setInTransition(false), 500);\n return () => {\n clearTimeout(timeout);\n };\n }, [isFocused]);\n\n return isFocused && !inTransition;\n}\n\n/**\n * Focuses an element for accessibility\n * @param component component ref\n * @note Disabled on android as it is not reliable\n */\nexport const focusAccessibility = (component?: React.Component | React.ComponentClass | null) => {\n if (Platform.OS === 'ios' && component) {\n const nodeHandle = findNodeHandle(component);\n if (nodeHandle) {\n AccessibilityInfo.setAccessibilityFocus(nodeHandle);\n }\n }\n};\n\n/**\n * Focuses an element for accessibility\n * @param {boolean} focused Focusing happens when this changes to `true`\n * @returns reference to be used with the target element\n */\nexport const useAccessibilityFocus = <T extends React.Component | React.ComponentClass>(focused: boolean = true) => {\n const ref = useRef<T>(null);\n\n useEffect(() => {\n if (focused) {\n focusAccessibility(ref.current);\n }\n }, [focused]);\n\n return ref;\n};\n\n/**\n * Posts a screen-reader/voice-over announcement\n * @param {string} message Announcement message\n * * if `null` passed, it resets the cached announcement and the same message can be re-announced again\n * @returns {boolean} When the announcement is successfully finished (only supported on iOS), false otherwise\n * @note Use {@link setAccessibilityTextTransformer} to apply text transformation for the read-out text\n */\nexport const useAccessibilityAnnouncement = (message?: string | null): boolean => {\n const announcement = message ? transformAccessibilityText(message) : message;\n const [announcementFinished, setAnnouncementFinished] = useState<string>();\n useEffect(() => {\n if (announcement === null) {\n // explicitly clearing cached state\n setAnnouncementFinished(undefined);\n }\n\n if (!announcement) {\n return undefined;\n }\n\n let subscription: EmitterSubscription;\n const unsubscribe = () => subscription?.remove();\n if (Platform.OS === 'ios') {\n let retries = 0;\n subscription = AccessibilityInfo.addEventListener(\n 'announcementFinished',\n ({ announcement: finished, success }) => {\n if (finished === announcement) {\n if (success) {\n setAnnouncementFinished(announcement);\n unsubscribe();\n } else if (retries++ < 2) {\n // when the automatic voice-over cancels the first try (e.g. after screen transition), let's attempt again one more time\n AccessibilityInfo.announceForAccessibility(announcement);\n } else {\n unsubscribe();\n }\n }\n },\n );\n }\n\n AccessibilityInfo.announceForAccessibility(announcement);\n return unsubscribe;\n }, [announcement]);\n\n return Boolean(announcement && announcementFinished === announcement);\n};\n\n/**\n * Posts a screen-reader/voice-over announcement\n * @param {string} message Announcement message\n * @param {boolean} waitForPreviousAnnouncement When a new message appears before the previous announcement if finished:\n * - `true`: postpone the new message to be announced after the previous message(s)\n * - `false` (default): cancel the previous announcement and start the new message\n * @returns {boolean} When all announcements are finished (only supported on iOS), false otherwise\n * @see {@link useAccessibilityAnnouncement} for further info\n */\nexport const useAccessibilityAnnouncementCumulative = (\n message?: string,\n waitForPreviousAnnouncement?: boolean,\n): boolean => {\n // waiting only possible on iOS\n const wait = Platform.OS === 'ios' && waitForPreviousAnnouncement;\n\n const [announcements, setAnnouncements] = useState<string[]>([]);\n useEffect(() => {\n if (message) {\n setAnnouncements((prev) => [...prev, message]);\n }\n }, [message]);\n\n const nextAnnouncement = wait ? announcements[0] : message;\n const finished = useAccessibilityAnnouncement(nextAnnouncement);\n\n useEffect(() => {\n if (finished) {\n setAnnouncements((prev) => prev.filter((m) => m !== nextAnnouncement));\n }\n }, [nextAnnouncement, finished]);\n\n return wait ? !announcements.length : finished;\n};\n"],"mappings":"AAAA,SAA0CA,YAAY,EAAEC,aAAa,QAAQ,0BAA0B;AACvG,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,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G,CAACC,aAAa,CAACpB,MAAM,GAAGa,QAAQ;AAChD,CAAC"}
1
+ {"version":3,"names":["useIsFocused","useNavigation","useEffect","useRef","useState","AccessibilityInfo","findNodeHandle","Platform","textTransformer","setAccessibilityTextTransformer","transformer","transformAccessibilityText","text","useAccessibleAfterTransition","navigation","accessible","setAccessible","isFocused","undefined","unsubscribe","addListener","timeout","setTimeout","clearTimeout","useIsOutsideTransition","inTransition","setInTransition","focused","current","unsubscribeStart","unsubscribeEnd","focusAccessibility","component","OS","nodeHandle","setAccessibilityFocus","useAccessibilityFocus","ref","useAccessibilityAnnouncement","message","announcement","announcementFinished","setAnnouncementFinished","subscription","_subscription","remove","retries","addEventListener","finished","success","announceForAccessibility","Boolean","useAccessibilityAnnouncementCumulative","waitForPreviousAnnouncement","wait","announcements","setAnnouncements","prev","nextAnnouncement","filter","m","length"],"sources":["accessibility.ts"],"sourcesContent":["import { NavigationProp, NavigationState, useIsFocused, useNavigation } from '@react-navigation/native';\nimport { useEffect, useRef, useState } from 'react';\nimport { AccessibilityInfo, EmitterSubscription, findNodeHandle, Platform } from 'react-native';\n\n/**\n * Global transformer of text for Voice-Over\n * @param {string} text (Visible) text to be announced\n * @returns {string} Text to be read-out by Voice-Over\n */\nexport type AccessibilityTextTransformer = (text: string) => string;\nlet textTransformer: AccessibilityTextTransformer | null = null;\nexport function setAccessibilityTextTransformer(transformer: AccessibilityTextTransformer | null) {\n textTransformer = transformer;\n}\nexport function transformAccessibilityText(text: string) {\n return textTransformer && text ? textTransformer(text) : text;\n}\n\n/**\n * Make element accessible after navigation transition is done\n * @returns {boolean} flag to be used as `accessible` prop on the target component(s)\n */\nexport function useAccessibleAfterTransition<\n TNavigationProp extends NavigationProp<\n Record<string, any>,\n string,\n NavigationState<Record<string, any>>,\n {},\n { transitionEnd: {} }\n >,\n>() {\n const navigation = useNavigation<TNavigationProp>();\n const [accessible, setAccessible] = useState(false);\n\n const isFocused = useIsFocused();\n useEffect(() => {\n if (!isFocused) {\n setAccessible(false);\n return undefined;\n }\n const unsubscribe = navigation.addListener('transitionEnd', () => setAccessible(true));\n // fallback for cases when transition doesn't happen (e.g. forceful screen re-render)\n const timeout = setTimeout(() => setAccessible(true), 500);\n return () => {\n unsubscribe();\n clearTimeout(timeout);\n };\n }, [navigation, isFocused]);\n\n return isFocused && accessible;\n}\n\n/**\n * Query whether the current screen is NOT transitioning\n * @returns {boolean} flag signifying whether the current screen is NOT in a transition (either entering or leaving)\n */\nexport function useIsOutsideTransition<\n TNavigationProp extends NavigationProp<\n Record<string, any>,\n string,\n NavigationState<Record<string, any>>,\n {},\n { transitionStart: {}; transitionEnd: {} }\n >,\n>() {\n const navigation = useNavigation<TNavigationProp>();\n const [inTransition, setInTransition] = useState<boolean>(true);\n\n const isFocused = useIsFocused();\n const focused = useRef(isFocused);\n focused.current = isFocused;\n\n useEffect(() => {\n const unsubscribeStart = navigation.addListener('transitionStart', () => setInTransition(true));\n const unsubscribeEnd = navigation.addListener('transitionEnd', () => {\n if (focused.current) {\n setInTransition(false);\n }\n });\n return () => {\n unsubscribeStart();\n unsubscribeEnd();\n };\n }, [navigation]);\n\n useEffect(() => {\n if (!isFocused) {\n return undefined;\n }\n\n setInTransition(true);\n // fallback for cases when transition callback doesn't happen (e.g. forceful screen re-render)\n const timeout = setTimeout(() => setInTransition(false), 500);\n return () => {\n clearTimeout(timeout);\n };\n }, [isFocused]);\n\n return isFocused && !inTransition;\n}\n\n/**\n * Focuses an element for accessibility\n * @param component component ref\n * @note Disabled on android as it is not reliable\n */\nexport const focusAccessibility = (component?: React.ElementType<any, any> | null) => {\n if (Platform.OS === 'ios' && component) {\n const nodeHandle = findNodeHandle(component);\n if (nodeHandle) {\n AccessibilityInfo.setAccessibilityFocus(nodeHandle);\n }\n }\n};\n\n/**\n * Focuses an element for accessibility\n * @param {boolean} focused Focusing happens when this changes to `true`\n * @returns reference to be used with the target element\n */\nexport const useAccessibilityFocus = <T extends React.ElementType<any, any>>(focused: boolean = true) => {\n const ref = useRef<T>(null);\n\n useEffect(() => {\n if (focused) {\n focusAccessibility(ref.current);\n }\n }, [focused]);\n\n return ref;\n};\n\n/**\n * Posts a screen-reader/voice-over announcement\n * @param {string} message Announcement message\n * * if `null` passed, it resets the cached announcement and the same message can be re-announced again\n * @returns {boolean} When the announcement is successfully finished (only supported on iOS), false otherwise\n * @note Use {@link setAccessibilityTextTransformer} to apply text transformation for the read-out text\n */\nexport const useAccessibilityAnnouncement = (message?: string | null): boolean => {\n const announcement = message ? transformAccessibilityText(message) : message;\n const [announcementFinished, setAnnouncementFinished] = useState<string>();\n useEffect(() => {\n if (announcement === null) {\n // explicitly clearing cached state\n setAnnouncementFinished(undefined);\n }\n\n if (!announcement) {\n return undefined;\n }\n\n let subscription: EmitterSubscription;\n const unsubscribe = () => subscription?.remove();\n if (Platform.OS === 'ios') {\n let retries = 0;\n subscription = AccessibilityInfo.addEventListener(\n 'announcementFinished',\n ({ announcement: finished, success }) => {\n if (finished === announcement) {\n if (success) {\n setAnnouncementFinished(announcement);\n unsubscribe();\n } else if (retries++ < 2) {\n // when the automatic voice-over cancels the first try (e.g. after screen transition), let's attempt again one more time\n AccessibilityInfo.announceForAccessibility(announcement);\n } else {\n unsubscribe();\n }\n }\n },\n );\n }\n\n AccessibilityInfo.announceForAccessibility(announcement);\n return unsubscribe;\n }, [announcement]);\n\n return Boolean(announcement && announcementFinished === announcement);\n};\n\n/**\n * Posts a screen-reader/voice-over announcement\n * @param {string} message Announcement message\n * @param {boolean} waitForPreviousAnnouncement When a new message appears before the previous announcement if finished:\n * - `true`: postpone the new message to be announced after the previous message(s)\n * - `false` (default): cancel the previous announcement and start the new message\n * @returns {boolean} When all announcements are finished (only supported on iOS), false otherwise\n * @see {@link useAccessibilityAnnouncement} for further info\n */\nexport const useAccessibilityAnnouncementCumulative = (\n message?: string,\n waitForPreviousAnnouncement?: boolean,\n): boolean => {\n // waiting only possible on iOS\n const wait = Platform.OS === 'ios' && waitForPreviousAnnouncement;\n\n const [announcements, setAnnouncements] = useState<string[]>([]);\n useEffect(() => {\n if (message) {\n setAnnouncements((prev) => [...prev, message]);\n }\n }, [message]);\n\n const nextAnnouncement = wait ? announcements[0] : message;\n const finished = useAccessibilityAnnouncement(nextAnnouncement);\n\n useEffect(() => {\n if (finished) {\n setAnnouncements((prev) => prev.filter((m) => m !== nextAnnouncement));\n }\n }, [nextAnnouncement, finished]);\n\n return wait ? !announcements.length : finished;\n};\n"],"mappings":"AAAA,SAA0CA,YAAY,EAAEC,aAAa,QAAQ,0BAA0B;AACvG,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,iBAAiB,EAAuBC,cAAc,EAAEC,QAAQ,QAAQ,cAAc;;AAE/F;AACA;AACA;AACA;AACA;;AAEA,IAAIC,eAAoD,GAAG,IAAI;AAC/D,OAAO,SAASC,+BAA+BA,CAACC,WAAgD,EAAE;EAChGF,eAAe,GAAGE,WAAW;AAC/B;AACA,OAAO,SAASC,0BAA0BA,CAACC,IAAY,EAAE;EACvD,OAAOJ,eAAe,IAAII,IAAI,GAAGJ,eAAe,CAACI,IAAI,CAAC,GAAGA,IAAI;AAC/D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAAA,EAQxC;EACF,MAAMC,UAAU,GAAGb,aAAa,CAAkB,CAAC;EACnD,MAAM,CAACc,UAAU,EAAEC,aAAa,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EAEnD,MAAMa,SAAS,GAAGjB,YAAY,CAAC,CAAC;EAChCE,SAAS,CAAC,MAAM;IACd,IAAI,CAACe,SAAS,EAAE;MACdD,aAAa,CAAC,KAAK,CAAC;MACpB,OAAOE,SAAS;IAClB;IACA,MAAMC,WAAW,GAAGL,UAAU,CAACM,WAAW,CAAC,eAAe,EAAE,MAAMJ,aAAa,CAAC,IAAI,CAAC,CAAC;IACtF;IACA,MAAMK,OAAO,GAAGC,UAAU,CAAC,MAAMN,aAAa,CAAC,IAAI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,aAAa,CAAC,CAAC,CAAC,GAAGhB,OAAO;EAC1D,MAAMS,QAAQ,GAAGV,4BAA4B,CAACoB,gBAAgB,CAAC;EAE/DxD,SAAS,CAAC,MAAM;IACd,IAAI8C,QAAQ,EAAE;MACZQ,gBAAgB,CAAEC,IAAI,IAAKA,IAAI,CAACE,MAAM,CAAEC,CAAC,IAAKA,CAAC,KAAKF,gBAAgB,CAAC,CAAC;IACxE;EACF,CAAC,EAAE,CAACA,gBAAgB,EAAEV,QAAQ,CAAC,CAAC;EAEhC,OAAOM,IAAI,GAAG,CAACC,aAAa,CAACM,MAAM,GAAGb,QAAQ;AAChD,CAAC","ignoreList":[]}
@@ -10,10 +10,9 @@ const accessibilityFocusHistoryContext = /*#__PURE__*/React.createContext({
10
10
  /**
11
11
  * Adds app support for accessibility focus history
12
12
  */
13
- export const AccessibilityFocusHistoryProvider = _ref => {
14
- let {
15
- children
16
- } = _ref;
13
+ export const AccessibilityFocusHistoryProvider = ({
14
+ children
15
+ }) => {
17
16
  const Provider = accessibilityFocusHistoryContext.Provider;
18
17
  const refs = useRef({});
19
18
  const setRef = useCallback((route, ref) => {
@@ -55,12 +54,9 @@ export const useAccessibilityFocusHistory = (pressHandler, passedRef) => {
55
54
  }, [outsideTransition]);
56
55
 
57
56
  // eslint-disable-next-line react-hooks/exhaustive-deps
58
- const onPress = useCallback(function () {
57
+ const onPress = useCallback((...args) => {
59
58
  previouslyPressed.current = true;
60
59
  historyContext.setRef(routeKey, refObject.current);
61
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
62
- args[_key] = arguments[_key];
63
- }
64
60
  return pressHandler === null || pressHandler === void 0 ? void 0 : pressHandler(...args);
65
61
  }, [historyContext, routeKey, refObject, pressHandler]);
66
62
  return {
@@ -1 +1 @@
1
- {"version":3,"names":["useRoute","React","useCallback","useContext","useEffect","useMemo","useRef","useForwardedRef","focusAccessibility","useAccessibleAfterTransition","accessibilityFocusHistoryContext","createContext","setRef","getRef","AccessibilityFocusHistoryProvider","_ref","children","Provider","refs","route","ref","current","_refs$current$route","value","createElement","useAccessibilityFocusHistory","pressHandler","passedRef","forwardedRef","refObject","historyContext","routeKey","key","previouslyPressed","outsideTransition","isStoredInHistory","onPress","_len","arguments","length","args","Array","_key"],"sources":["accessibilityHistory.tsx"],"sourcesContent":["import { useRoute } from '@react-navigation/native';\nimport React, { FC, PropsWithChildren, useCallback, useContext, useEffect, useMemo, useRef } from 'react';\n\nimport { useForwardedRef } from '../../utils/ref';\nimport { focusAccessibility, useAccessibleAfterTransition } from './accessibility';\n\ntype AccessibilityRefComponent = React.Component | React.ComponentClass | null;\ninterface AccessibilityRefContextValue {\n setRef: (route: string, ref: AccessibilityRefComponent) => void;\n getRef: (route: string) => AccessibilityRefComponent;\n}\n\nconst accessibilityFocusHistoryContext = React.createContext<AccessibilityRefContextValue>({\n setRef: () => {},\n getRef: () => null,\n});\n\n/**\n * Adds app support for accessibility focus history\n */\nexport const AccessibilityFocusHistoryProvider: FC<PropsWithChildren<{}>> = ({ children }) => {\n const Provider = accessibilityFocusHistoryContext.Provider;\n const refs = useRef<Record<string, AccessibilityRefComponent>>({});\n const setRef = useCallback((route: string, ref: AccessibilityRefComponent) => {\n refs.current[route] = ref;\n }, []);\n const getRef = useCallback((route: string) => {\n return refs.current[route] ?? null;\n }, []);\n const value = useMemo(() => ({ setRef, getRef }), [getRef, setRef]);\n return <Provider value={value}>{children}</Provider>;\n};\n\n/**\n * Wraps `onPress` handler and `ref` to support automatic accessibility focus on back navigation\n * @note This needs to be used inside {@link AccessibilityFocusHistoryProvider} and navigation context\n */\nexport const useAccessibilityFocusHistory = <\n Component extends React.Component<any> | React.ComponentClass<any>,\n OnPress extends (...args: never[]) => void = () => void,\n>(\n pressHandler: OnPress | undefined,\n passedRef?: React.Ref<Component>,\n) => {\n const [forwardedRef, refObject] = useForwardedRef<Component>(passedRef);\n\n const historyContext = useContext(accessibilityFocusHistoryContext);\n const routeKey = useRoute().key;\n\n const previouslyPressed = useRef(false);\n const outsideTransition = useAccessibleAfterTransition();\n\n useEffect(() => {\n const isStoredInHistory = historyContext.getRef(routeKey) === refObject.current;\n if (outsideTransition && isStoredInHistory && previouslyPressed.current) {\n focusAccessibility(refObject.current);\n }\n }, [historyContext, outsideTransition, refObject, routeKey]);\n\n useEffect(() => {\n if (outsideTransition) {\n previouslyPressed.current = false;\n }\n }, [outsideTransition]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const onPress = useCallback(\n ((...args) => {\n previouslyPressed.current = true;\n historyContext.setRef(routeKey, refObject.current);\n return pressHandler?.(...args);\n }) as OnPress,\n [historyContext, routeKey, refObject, pressHandler],\n );\n\n return { onPress, ref: forwardedRef };\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,KAAK,IAA2BC,WAAW,EAAEC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAEzG,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,kBAAkB,EAAEC,4BAA4B,QAAQ,iBAAiB;AAQlF,MAAMC,gCAAgC,gBAAGT,KAAK,CAACU,aAAa,CAA+B;EACzFC,MAAM,EAAEA,CAAA,KAAM,CAAC,CAAC;EAChBC,MAAM,EAAEA,CAAA,KAAM;AAChB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,iCAA4D,GAAGC,IAAA,IAAkB;EAAA,IAAjB;IAAEC;EAAS,CAAC,GAAAD,IAAA;EACvF,MAAME,QAAQ,GAAGP,gCAAgC,CAACO,QAAQ;EAC1D,MAAMC,IAAI,GAAGZ,MAAM,CAA4C,CAAC,CAAC,CAAC;EAClE,MAAMM,MAAM,GAAGV,WAAW,CAAC,CAACiB,KAAa,EAAEC,GAA8B,KAAK;IAC5EF,IAAI,CAACG,OAAO,CAACF,KAAK,CAAC,GAAGC,GAAG;EAC3B,CAAC,EAAE,EAAE,CAAC;EACN,MAAMP,MAAM,GAAGX,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,CAAC,EAAE,CAACa,iBAAiB,CAAC,CAAC;;EAEvB;EACA,MAAME,OAAO,GAAGlC,WAAW,CACxB,YAAa;IACZ+B,iBAAiB,CAACZ,OAAO,GAAG,IAAI;IAChCS,cAAc,CAAClB,MAAM,CAACmB,QAAQ,EAAEF,SAAS,CAACR,OAAO,CAAC;IAAC,SAAAgB,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAFhDC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAGP,OAAOhB,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAG,GAAGc,IAAI,CAAC;EAChC,CAAC,EACD,CAACV,cAAc,EAAEC,QAAQ,EAAEF,SAAS,EAAEH,YAAY,CAAC,CACpD;EAED,OAAO;IAAEU,OAAO;IAAEhB,GAAG,EAAEQ;EAAa,CAAC;AACvC,CAAC"}
1
+ {"version":3,"names":["useRoute","React","useCallback","useContext","useEffect","useMemo","useRef","useForwardedRef","focusAccessibility","useAccessibleAfterTransition","accessibilityFocusHistoryContext","createContext","setRef","getRef","AccessibilityFocusHistoryProvider","children","Provider","refs","route","ref","current","_refs$current$route","value","createElement","useAccessibilityFocusHistory","pressHandler","passedRef","forwardedRef","refObject","historyContext","routeKey","key","previouslyPressed","outsideTransition","isStoredInHistory","onPress","args"],"sources":["accessibilityHistory.tsx"],"sourcesContent":["import { useRoute } from '@react-navigation/native';\nimport React, { FC, PropsWithChildren, useCallback, useContext, useEffect, useMemo, useRef } from 'react';\n\nimport { useForwardedRef } from '../../utils/ref';\nimport { focusAccessibility, useAccessibleAfterTransition } from './accessibility';\n\ntype AccessibilityRefComponent = React.ElementType<any, any> | null;\ninterface AccessibilityRefContextValue {\n setRef: (route: string, ref: AccessibilityRefComponent) => void;\n getRef: (route: string) => AccessibilityRefComponent;\n}\n\nconst accessibilityFocusHistoryContext = React.createContext<AccessibilityRefContextValue>({\n setRef: () => {},\n getRef: () => null,\n});\n\n/**\n * Adds app support for accessibility focus history\n */\nexport const AccessibilityFocusHistoryProvider: FC<PropsWithChildren<{}>> = ({ children }) => {\n const Provider = accessibilityFocusHistoryContext.Provider;\n const refs = useRef<Record<string, AccessibilityRefComponent>>({});\n const setRef = useCallback((route: string, ref: AccessibilityRefComponent) => {\n refs.current[route] = ref;\n }, []);\n const getRef = useCallback((route: string) => {\n return refs.current[route] ?? null;\n }, []);\n const value = useMemo(() => ({ setRef, getRef }), [getRef, setRef]);\n return <Provider value={value}>{children}</Provider>;\n};\n\n/**\n * Wraps `onPress` handler and `ref` to support automatic accessibility focus on back navigation\n * @note This needs to be used inside {@link AccessibilityFocusHistoryProvider} and navigation context\n */\nexport const useAccessibilityFocusHistory = <\n Component extends React.ElementType<any, any>,\n OnPress extends (...args: never[]) => void = () => void,\n>(\n pressHandler: OnPress | undefined,\n passedRef?: React.Ref<Component>,\n) => {\n const [forwardedRef, refObject] = useForwardedRef<Component>(passedRef);\n\n const historyContext = useContext(accessibilityFocusHistoryContext);\n const routeKey = useRoute().key;\n\n const previouslyPressed = useRef(false);\n const outsideTransition = useAccessibleAfterTransition();\n\n useEffect(() => {\n const isStoredInHistory = historyContext.getRef(routeKey) === refObject.current;\n if (outsideTransition && isStoredInHistory && previouslyPressed.current) {\n focusAccessibility(refObject.current);\n }\n }, [historyContext, outsideTransition, refObject, routeKey]);\n\n useEffect(() => {\n if (outsideTransition) {\n previouslyPressed.current = false;\n }\n }, [outsideTransition]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const onPress = useCallback(\n ((...args) => {\n previouslyPressed.current = true;\n historyContext.setRef(routeKey, refObject.current);\n return pressHandler?.(...args);\n }) as OnPress,\n [historyContext, routeKey, refObject, pressHandler],\n );\n\n return { onPress, ref: forwardedRef };\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,KAAK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target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  /* eslint-disable no-restricted-imports */
3
3
  import React, { forwardRef } from 'react';
4
4
  import { Pressable as RNPressable, TouchableHighlight as RNTouchableHighlight, TouchableOpacity as RNTouchableOpacity, TouchableWithoutFeedback as RNTouchableWithoutFeedback } from 'react-native';
5
5
  import { useAccessibilityFocusHistory } from './accessibilityHistory';
6
6
  const WithAccessibilityFocusHistory = (C, displayName) => {
7
- const ComponentWithAccessibilityFocusHistory = _ref => {
8
- let {
9
- forwardedRef,
10
- onPress: originalOnPress,
11
- ...props
12
- } = _ref;
7
+ const ComponentWithAccessibilityFocusHistory = ({
8
+ forwardedRef,
9
+ onPress: originalOnPress,
10
+ ...props
11
+ }) => {
13
12
  const {
14
13
  ref,
15
14
  onPress
@@ -30,9 +29,12 @@ const WithAccessibilityFocusHistory = (C, displayName) => {
30
29
  /**
31
30
  * Wrappers of RN touchable components with accessibilty focus history support
32
31
  */
33
-
34
32
  export const TouchableOpacity = WithAccessibilityFocusHistory(RNTouchableOpacity, 'TouchableOpacity');
35
33
  export const TouchableWithoutFeedback = WithAccessibilityFocusHistory(RNTouchableWithoutFeedback, 'TouchableWithoutFeedback');
36
34
  export const TouchableHighlight = WithAccessibilityFocusHistory(RNTouchableHighlight, 'TouchableHighlight');
37
35
  export const Pressable = WithAccessibilityFocusHistory(RNPressable, 'Pressable');
36
+
37
+ /**
38
+ * Ref types to be used in forwardRef for the wrappers
39
+ */
38
40
  //# sourceMappingURL=accessibilityHistoryWrappers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","forwardRef","Pressable","RNPressable","TouchableHighlight","RNTouchableHighlight","TouchableOpacity","RNTouchableOpacity","TouchableWithoutFeedback","RNTouchableWithoutFeedback","useAccessibilityFocusHistory","WithAccessibilityFocusHistory","C","displayName","ComponentWithAccessibilityFocusHistory","_ref","forwardedRef","onPress","originalOnPress","props","ref","undefined","createElement","_extends","Forwarded"],"sources":["accessibilityHistoryWrappers.tsx"],"sourcesContent":["/* eslint-disable no-restricted-imports */\nimport React, { FC, ForwardedRef, forwardRef } from 'react';\nimport {\n GestureResponderEvent,\n Pressable as RNPressable,\n PressableProps,\n TouchableHighlight as RNTouchableHighlight,\n TouchableHighlightProps,\n TouchableOpacity as RNTouchableOpacity,\n TouchableOpacityProps,\n TouchableWithoutFeedback as RNTouchableWithoutFeedback,\n TouchableWithoutFeedbackProps,\n View,\n} from 'react-native';\n\nimport { useAccessibilityFocusHistory } from './accessibilityHistory';\n\ntype RNOnPress = (event: GestureResponderEvent) => void;\ninterface OnPressProps {\n onPress?: RNOnPress | null;\n}\n\nconst WithAccessibilityFocusHistory = <ComponentProps extends OnPressProps, RefType extends React.Component>(\n C: React.ComponentType<ComponentProps>,\n displayName: string,\n) => {\n type ForwardedProps = ComponentProps & {\n forwardedRef: ForwardedRef<RefType>;\n };\n\n const ComponentWithAccessibilityFocusHistory: FC<ForwardedProps> = ({\n forwardedRef,\n onPress: originalOnPress,\n ...props\n }) => {\n const { ref, onPress } = useAccessibilityFocusHistory<RefType, RNOnPress>(\n originalOnPress ?? undefined,\n forwardedRef,\n );\n // @ts-ignore\n return <C ref={ref} onPress={onPress} {...props} />;\n };\n\n const Forwarded = forwardRef<RefType, ComponentProps>((props, ref) => (\n <ComponentWithAccessibilityFocusHistory {...props} forwardedRef={ref} />\n ));\n Forwarded.displayName = displayName;\n\n return Forwarded;\n};\n\n/**\n * Wrappers of RN touchable components with accessibilty focus history support\n */\n\nexport const TouchableOpacity = WithAccessibilityFocusHistory<TouchableOpacityProps, RNTouchableOpacity>(\n RNTouchableOpacity,\n 'TouchableOpacity',\n);\nexport const TouchableWithoutFeedback = WithAccessibilityFocusHistory<\n TouchableWithoutFeedbackProps,\n RNTouchableWithoutFeedback\n>(RNTouchableWithoutFeedback, 'TouchableWithoutFeedback');\nexport const TouchableHighlight = WithAccessibilityFocusHistory<TouchableHighlightProps, RNTouchableHighlight>(\n RNTouchableHighlight,\n 'TouchableHighlight',\n);\nexport const Pressable = WithAccessibilityFocusHistory<PressableProps, View>(RNPressable, 'Pressable');\n\ntype WrapperRefType<C extends React.ForwardRefExoticComponent<React.RefAttributes<any>>> =\n C extends React.ForwardRefExoticComponent<React.RefAttributes<infer Ref>> ? Ref : never;\n\n/**\n * Ref types to be used in forwardRef for the wrappers\n */\n\nexport type TouchableOpacityRef = WrapperRefType<typeof TouchableOpacity>;\nexport type TouchableWithoutFeedbackRef = WrapperRefType<typeof TouchableWithoutFeedback>;\nexport type TouchableHighlightRef = WrapperRefType<typeof TouchableHighlight>;\nexport type PressableRef = WrapperRefType<typeof Pressable>;\n"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAsBC,UAAU,QAAQ,OAAO;AAC3D,SAEEC,SAAS,IAAIC,WAAW,EAExBC,kBAAkB,IAAIC,oBAAoB,EAE1CC,gBAAgB,IAAIC,kBAAkB,EAEtCC,wBAAwB,IAAIC,0BAA0B,QAGjD,cAAc;AAErB,SAASC,4BAA4B,QAAQ,wBAAwB;AAOrE,MAAMC,6BAA6B,GAAGA,CACpCC,CAAsC,EACtCC,WAAmB,KAChB;EAKH,MAAMC,sCAA0D,GAAGC,IAAA,IAI7D;IAAA,IAJ8D;MAClEC,YAAY;MACZC,OAAO,EAAEC,eAAe;MACxB,GAAGC;IACL,CAAC,GAAAJ,IAAA;IACC,MAAM;MAAEK,GAAG;MAAEH;IAAQ,CAAC,GAAGP,4BAA4B,CACnDQ,eAAe,aAAfA,eAAe,cAAfA,eAAe,GAAIG,SAAS,EAC5BL,YAAY,CACb;IACD;IACA,oBAAOhB,KAAA,CAAAsB,aAAA,CAACV,CAAC,EAAAW,QAAA;MAACH,GAAG,EAAEA,GAAI;MAACH,OAAO,EAAEA;IAAQ,GAAKE,KAAK,EAAI;EACrD,CAAC;EAED,MAAMK,SAAS,gBAAGvB,UAAU,CAA0B,CAACkB,KAAK,EAAEC,GAAG,kBAC/DpB,KAAA,CAAAsB,aAAA,CAACR,sCAAsC,EAAAS,QAAA,KAAKJ,KAAK;IAAEH,YAAY,EAAEI;EAAI,GACtE,CAAC;EACFI,SAAS,CAACX,WAAW,GAAGA,WAAW;EAEnC,OAAOW,SAAS;AAClB,CAAC;;AAED;AACA;AACA;;AAEA,OAAO,MAAMlB,gBAAgB,GAAGK,6BAA6B,CAC3DJ,kBAAkB,EAClB,kBAAkB,CACnB;AACD,OAAO,MAAMC,wBAAwB,GAAGG,6BAA6B,CAGnEF,0BAA0B,EAAE,0BAA0B,CAAC;AACzD,OAAO,MAAML,kBAAkB,GAAGO,6BAA6B,CAC7DN,oBAAoB,EACpB,oBAAoB,CACrB;AACD,OAAO,MAAMH,SAAS,GAAGS,6BAA6B,CAAuBR,WAAW,EAAE,WAAW,CAAC"}
1
+ {"version":3,"names":["React","forwardRef","Pressable","RNPressable","TouchableHighlight","RNTouchableHighlight","TouchableOpacity","RNTouchableOpacity","TouchableWithoutFeedback","RNTouchableWithoutFeedback","useAccessibilityFocusHistory","WithAccessibilityFocusHistory","C","displayName","ComponentWithAccessibilityFocusHistory","forwardedRef","onPress","originalOnPress","props","ref","undefined","createElement","_extends","Forwarded"],"sources":["accessibilityHistoryWrappers.tsx"],"sourcesContent":["/* eslint-disable no-restricted-imports */\nimport React, { FC, ForwardedRef, forwardRef } from 'react';\nimport {\n GestureResponderEvent,\n Pressable as RNPressable,\n PressableProps,\n TouchableHighlight as RNTouchableHighlight,\n TouchableHighlightProps,\n TouchableOpacity as RNTouchableOpacity,\n TouchableOpacityProps,\n TouchableWithoutFeedback as RNTouchableWithoutFeedback,\n TouchableWithoutFeedbackProps,\n View,\n} from 'react-native';\n\nimport { useAccessibilityFocusHistory } from './accessibilityHistory';\n\ntype RNOnPress = (event: GestureResponderEvent) => void;\ninterface OnPressProps {\n onPress?: RNOnPress | null;\n}\n\nconst WithAccessibilityFocusHistory = <ComponentProps extends OnPressProps, RefType extends React.ElementType<any, any>>(\n C: React.ComponentType<ComponentProps>,\n displayName: string,\n) => {\n type ForwardedProps = ComponentProps & {\n forwardedRef: ForwardedRef<RefType>;\n };\n\n const ComponentWithAccessibilityFocusHistory: FC<ForwardedProps> = ({\n forwardedRef,\n onPress: originalOnPress,\n ...props\n }) => {\n const { ref, onPress } = useAccessibilityFocusHistory<RefType, RNOnPress>(\n originalOnPress ?? undefined,\n forwardedRef,\n );\n // @ts-ignore\n return <C ref={ref} onPress={onPress} {...props} />;\n };\n\n const Forwarded = forwardRef<RefType, ComponentProps>((props, ref) => (\n <ComponentWithAccessibilityFocusHistory {...props} forwardedRef={ref} />\n ));\n Forwarded.displayName = displayName;\n\n return Forwarded;\n};\n\n/**\n * Wrappers of RN touchable components with accessibilty focus history support\n */\nexport const TouchableOpacity = WithAccessibilityFocusHistory<TouchableOpacityProps, typeof RNTouchableOpacity>(\n RNTouchableOpacity,\n 'TouchableOpacity',\n);\nexport const TouchableWithoutFeedback = WithAccessibilityFocusHistory<\n TouchableWithoutFeedbackProps,\n RNTouchableWithoutFeedback\n>(RNTouchableWithoutFeedback, 'TouchableWithoutFeedback');\nexport const TouchableHighlight = WithAccessibilityFocusHistory<TouchableHighlightProps, typeof RNTouchableHighlight>(\n RNTouchableHighlight,\n 'TouchableHighlight',\n);\nexport const Pressable = WithAccessibilityFocusHistory<PressableProps, View>(RNPressable, 'Pressable');\n\ntype WrapperRefType<C extends React.ForwardRefExoticComponent<React.RefAttributes<any>>> =\n C extends React.ForwardRefExoticComponent<React.RefAttributes<infer Ref>> ? Ref : never;\n\n/**\n * Ref types to be used in forwardRef for the wrappers\n */\nexport type TouchableOpacityRef = WrapperRefType<typeof TouchableOpacity>;\nexport type TouchableWithoutFeedbackRef = WrapperRefType<typeof TouchableWithoutFeedback>;\nexport type TouchableHighlightRef = WrapperRefType<typeof TouchableHighlight>;\nexport type PressableRef = WrapperRefType<typeof Pressable>;\n"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAsBC,UAAU,QAAQ,OAAO;AAC3D,SAEEC,SAAS,IAAIC,WAAW,EAExBC,kBAAkB,IAAIC,oBAAoB,EAE1CC,gBAAgB,IAAIC,kBAAkB,EAEtCC,wBAAwB,IAAIC,0BAA0B,QAGjD,cAAc;AAErB,SAASC,4BAA4B,QAAQ,wBAAwB;AAOrE,MAAMC,6BAA6B,GAAGA,CACpCC,CAAsC,EACtCC,WAAmB,KAChB;EAKH,MAAMC,sCAA0D,GAAGA,CAAC;IAClEC,YAAY;IACZC,OAAO,EAAEC,eAAe;IACxB,GAAGC;EACL,CAAC,KAAK;IACJ,MAAM;MAAEC,GAAG;MAAEH;IAAQ,CAAC,GAAGN,4BAA4B,CACnDO,eAAe,aAAfA,eAAe,cAAfA,eAAe,GAAIG,SAAS,EAC5BL,YACF,CAAC;IACD;IACA,oBAAOf,KAAA,CAAAqB,aAAA,CAACT,CAAC,EAAAU,QAAA;MAACH,GAAG,EAAEA,GAAI;MAACH,OAAO,EAAEA;IAAQ,GAAKE,KAAK,CAAG,CAAC;EACrD,CAAC;EAED,MAAMK,SAAS,gBAAGtB,UAAU,CAA0B,CAACiB,KAAK,EAAEC,GAAG,kBAC/DnB,KAAA,CAAAqB,aAAA,CAACP,sCAAsC,EAAAQ,QAAA,KAAKJ,KAAK;IAAEH,YAAY,EAAEI;EAAI,EAAE,CACxE,CAAC;EACFI,SAAS,CAACV,WAAW,GAAGA,WAAW;EAEnC,OAAOU,SAAS;AAClB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMjB,gBAAgB,GAAGK,6BAA6B,CAC3DJ,kBAAkB,EAClB,kBACF,CAAC;AACD,OAAO,MAAMC,wBAAwB,GAAGG,6BAA6B,CAGnEF,0BAA0B,EAAE,0BAA0B,CAAC;AACzD,OAAO,MAAML,kBAAkB,GAAGO,6BAA6B,CAC7DN,oBAAoB,EACpB,oBACF,CAAC;AACD,OAAO,MAAMH,SAAS,GAAGS,6BAA6B,CAAuBR,WAAW,EAAE,WAAW,CAAC;;AAKtG;AACA;AACA","ignoreList":[]}
@@ -8,12 +8,11 @@ const Provider = AccessibilityLanguageContext.Provider;
8
8
  * @param {SupportedAccessibilityLanguage} language Currenty selected language of the app
9
9
  * @param {Object} overrides _(optional)_ Custom overrides for specific entries
10
10
  */
11
- export const AccessibilityLanguageProvider = _ref => {
12
- let {
13
- language,
14
- overrides,
15
- children
16
- } = _ref;
11
+ export const AccessibilityLanguageProvider = ({
12
+ language,
13
+ overrides,
14
+ children
15
+ }) => {
17
16
  const translate = useMemo(() => {
18
17
  if (typeof overrides === 'function') {
19
18
  return overrides;
@@ -24,8 +23,7 @@ export const AccessibilityLanguageProvider = _ref => {
24
23
 
25
24
  // replace params
26
25
  if (translation && params) {
27
- Object.entries(params).forEach(_ref2 => {
28
- let [key, value] = _ref2;
26
+ Object.entries(params).forEach(([key, value]) => {
29
27
  translation = translation.replace(new RegExp(`{${key}}`, 'g'), String(value));
30
28
  });
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","useContext","useMemo","getAccessibilityLanguageFile","AccessibilityLanguageContext","createContext","undefined","Provider","AccessibilityLanguageProvider","_ref","language","overrides","children","translate","accessibilityFile","entryKey","params","translation","Object","entries","forEach","_ref2","key","value","replace","RegExp","String","createElement","useAccessibilityTranslation","Error"],"sources":["accessibilityLanguage.tsx"],"sourcesContent":["import React, { FC, PropsWithChildren, useContext, useMemo } from 'react';\n\nimport { AccessibilityLanguageFile, getAccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';\n\nexport type AccessibilityLanguageFileEntryKey = keyof AccessibilityLanguageFile;\ntype AccessibilityLanguageTranslate = (\n entryKey: AccessibilityLanguageFileEntryKey,\n params?: Record<string, string | number>,\n) => string;\n\nconst AccessibilityLanguageContext = React.createContext<AccessibilityLanguageTranslate | undefined>(undefined);\n\nexport interface AccessibilityLanguageProviderProps {\n language: SupportedAccessibilityLanguage;\n overrides?: Partial<AccessibilityLanguageFile> | AccessibilityLanguageTranslate;\n}\n\nconst Provider = AccessibilityLanguageContext.Provider;\n\n/**\n * Adds app support for accessibility language\n * @param {SupportedAccessibilityLanguage} language Currenty selected language of the app\n * @param {Object} overrides _(optional)_ Custom overrides for specific entries\n */\nexport const AccessibilityLanguageProvider: FC<PropsWithChildren<AccessibilityLanguageProviderProps>> = ({\n language,\n overrides,\n children,\n}) => {\n const translate = useMemo<AccessibilityLanguageTranslate>(() => {\n if (typeof overrides === 'function') {\n return overrides;\n }\n\n const accessibilityFile = getAccessibilityLanguageFile(language, overrides);\n return (entryKey, params) => {\n let translation = accessibilityFile[entryKey];\n\n // replace params\n if (translation && params) {\n Object.entries(params).forEach(([key, value]) => {\n translation = translation.replace(new RegExp(`{${key}}`, 'g'), String(value));\n });\n }\n\n return translation;\n };\n }, [language, overrides]);\n\n return <Provider value={translate}>{children}</Provider>;\n};\n\n/**\n * Access accessibility language translations\n * @note This needs to be used inside {@link AccessibilityLanguageProvider} context\n */\nexport const useAccessibilityTranslation = () => {\n const translate = useContext(AccessibilityLanguageContext);\n\n // check context provided\n if (!translate) {\n throw new Error('Accessibility Language not provided!, wrap your components in the AccessibilityLanguageProvider');\n }\n\n return translate;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAA2BC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAEzE,SAAoCC,4BAA4B,QAAwC,UAAU;AAQlH,MAAMC,4BAA4B,gBAAGJ,KAAK,CAACK,aAAa,CAA6CC,SAAS,CAAC;AAO/G,MAAMC,QAAQ,GAAGH,4BAA4B,CAACG,QAAQ;;AAEtD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAAwF,GAAGC,IAAA,IAIlG;EAAA,IAJmG;IACvGC,QAAQ;IACRC,SAAS;IACTC;EACF,CAAC,GAAAH,IAAA;EACC,MAAMI,SAAS,GAAGX,OAAO,CAAiC,MAAM;IAC9D,IAAI,OAAOS,SAAS,KAAK,UAAU,EAAE;MACnC,OAAOA,SAAS;IAClB;IAEA,MAAMG,iBAAiB,GAAGX,4BAA4B,CAACO,QAAQ,EAAEC,SAAS,CAAC;IAC3E,OAAO,CAACI,QAAQ,EAAEC,MAAM,KAAK;MAC3B,IAAIC,WAAW,GAAGH,iBAAiB,CAACC,QAAQ,CAAC;;MAE7C;MACA,IAAIE,WAAW,IAAID,MAAM,EAAE;QACzBE,MAAM,CAACC,OAAO,CAACH,MAAM,CAAC,CAACI,OAAO,CAACC,KAAA,IAAkB;UAAA,IAAjB,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAAF,KAAA;UAC1CJ,WAAW,GAAGA,WAAW,CAACO,OAAO,CAAC,IAAIC,MAAM,CAAE,IAAGH,GAAI,GAAE,EAAE,GAAG,CAAC,EAAEI,MAAM,CAACH,KAAK,CAAC,CAAC;QAC/E,CAAC,CAAC;MACJ;MAEA,OAAON,WAAW;IACpB,CAAC;EACH,CAAC,EAAE,CAACP,QAAQ,EAAEC,SAAS,CAAC,CAAC;EAEzB,oBAAOX,KAAA,CAAA2B,aAAA,CAACpB,QAAQ;IAACgB,KAAK,EAAEV;EAAU,GAAED,QAAQ,CAAY;AAC1D,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMgB,2BAA2B,GAAGA,CAAA,KAAM;EAC/C,MAAMf,SAAS,GAAGZ,UAAU,CAACG,4BAA4B,CAAC;;EAE1D;EACA,IAAI,CAACS,SAAS,EAAE;IACd,MAAM,IAAIgB,KAAK,CAAC,iGAAiG,CAAC;EACpH;EAEA,OAAOhB,SAAS;AAClB,CAAC"}
1
+ {"version":3,"names":["React","useContext","useMemo","getAccessibilityLanguageFile","AccessibilityLanguageContext","createContext","undefined","Provider","AccessibilityLanguageProvider","language","overrides","children","translate","accessibilityFile","entryKey","params","translation","Object","entries","forEach","key","value","replace","RegExp","String","createElement","useAccessibilityTranslation","Error"],"sources":["accessibilityLanguage.tsx"],"sourcesContent":["import React, { FC, PropsWithChildren, useContext, useMemo } from 'react';\n\nimport { AccessibilityLanguageFile, getAccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';\n\nexport type AccessibilityLanguageFileEntryKey = keyof AccessibilityLanguageFile;\ntype AccessibilityLanguageTranslate = (\n entryKey: AccessibilityLanguageFileEntryKey,\n params?: Record<string, string | number>,\n) => string;\n\nconst AccessibilityLanguageContext = React.createContext<AccessibilityLanguageTranslate | undefined>(undefined);\n\nexport interface AccessibilityLanguageProviderProps {\n language: SupportedAccessibilityLanguage;\n overrides?: Partial<AccessibilityLanguageFile> | AccessibilityLanguageTranslate;\n}\n\nconst Provider = AccessibilityLanguageContext.Provider;\n\n/**\n * Adds app support for accessibility language\n * @param {SupportedAccessibilityLanguage} language Currenty selected language of the app\n * @param {Object} overrides _(optional)_ Custom overrides for specific entries\n */\nexport const AccessibilityLanguageProvider: FC<PropsWithChildren<AccessibilityLanguageProviderProps>> = ({\n language,\n overrides,\n children,\n}) => {\n const translate = useMemo<AccessibilityLanguageTranslate>(() => {\n if (typeof overrides === 'function') {\n return overrides;\n }\n\n const accessibilityFile = getAccessibilityLanguageFile(language, overrides);\n return (entryKey, params) => {\n let translation = accessibilityFile[entryKey];\n\n // replace params\n if (translation && params) {\n Object.entries(params).forEach(([key, value]) => {\n translation = translation.replace(new RegExp(`{${key}}`, 'g'), String(value));\n });\n }\n\n return translation;\n };\n }, [language, overrides]);\n\n return <Provider value={translate}>{children}</Provider>;\n};\n\n/**\n * Access accessibility language translations\n * @note This needs to be used inside {@link AccessibilityLanguageProvider} context\n */\nexport const useAccessibilityTranslation = () => {\n const translate = useContext(AccessibilityLanguageContext);\n\n // check context provided\n if (!translate) {\n throw new Error('Accessibility Language not provided!, wrap your components in the AccessibilityLanguageProvider');\n }\n\n return translate;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAA2BC,UAAU,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AAI,CAACQ,SAAS,EAAE;IACd,MAAM,IAAIe,KAAK,CAAC,iGAAiG,CAAC;EACpH;EAEA,OAAOf,SAAS;AAClB,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import { AccessibilityTextTransformer, focusAccessibility, setAccessibilityTextTransformer, transformAccessibilityText, useAccessibilityAnnouncement, useAccessibilityAnnouncementCumulative, useAccessibilityFocus, useAccessibleAfterTransition, useIsOutsideTransition } from './accessibility';
1
+ import { focusAccessibility, setAccessibilityTextTransformer, transformAccessibilityText, useAccessibilityAnnouncement, useAccessibilityAnnouncementCumulative, useAccessibilityFocus, useAccessibleAfterTransition, useIsOutsideTransition } from './accessibility';
2
2
  import { AccessibilityFocusHistoryProvider, useAccessibilityFocusHistory } from './accessibilityHistory';
3
- import { AccessibilityLanguageProvider, AccessibilityLanguageProviderProps } from './accessibilityLanguage';
3
+ import { AccessibilityLanguageProvider } from './accessibilityLanguage';
4
4
  // @ts-ignore
5
- import { AccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';
5
+
6
6
  export * from './accessibilityHistoryWrappers';
7
- export { AccessibilityFocusHistoryProvider, AccessibilityLanguageFile, AccessibilityLanguageProvider, AccessibilityLanguageProviderProps, AccessibilityTextTransformer, focusAccessibility, setAccessibilityTextTransformer, SupportedAccessibilityLanguage, transformAccessibilityText, useAccessibilityAnnouncement, useAccessibilityAnnouncementCumulative, useAccessibilityFocus, useAccessibilityFocusHistory, useAccessibleAfterTransition, useIsOutsideTransition };
7
+ export { AccessibilityFocusHistoryProvider, AccessibilityLanguageProvider, focusAccessibility, setAccessibilityTextTransformer, transformAccessibilityText, useAccessibilityAnnouncement, useAccessibilityAnnouncementCumulative, useAccessibilityFocus, useAccessibilityFocusHistory, useAccessibleAfterTransition, useIsOutsideTransition };
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AccessibilityTextTransformer","focusAccessibility","setAccessibilityTextTransformer","transformAccessibilityText","useAccessibilityAnnouncement","useAccessibilityAnnouncementCumulative","useAccessibilityFocus","useAccessibleAfterTransition","useIsOutsideTransition","AccessibilityFocusHistoryProvider","useAccessibilityFocusHistory","AccessibilityLanguageProvider","AccessibilityLanguageProviderProps","AccessibilityLanguageFile","SupportedAccessibilityLanguage"],"sources":["index.ts"],"sourcesContent":["import {\n AccessibilityTextTransformer,\n focusAccessibility,\n setAccessibilityTextTransformer,\n transformAccessibilityText,\n useAccessibilityAnnouncement,\n useAccessibilityAnnouncementCumulative,\n useAccessibilityFocus,\n useAccessibleAfterTransition,\n useIsOutsideTransition,\n} from './accessibility';\nimport { AccessibilityFocusHistoryProvider, useAccessibilityFocusHistory } from './accessibilityHistory';\nimport { AccessibilityLanguageProvider, AccessibilityLanguageProviderProps } from './accessibilityLanguage';\n// @ts-ignore\nimport { AccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';\n\nexport * from './accessibilityHistoryWrappers';\n\nexport {\n AccessibilityFocusHistoryProvider,\n AccessibilityLanguageFile,\n AccessibilityLanguageProvider,\n AccessibilityLanguageProviderProps,\n AccessibilityTextTransformer,\n focusAccessibility,\n setAccessibilityTextTransformer,\n SupportedAccessibilityLanguage,\n transformAccessibilityText,\n useAccessibilityAnnouncement,\n useAccessibilityAnnouncementCumulative,\n useAccessibilityFocus,\n useAccessibilityFocusHistory,\n useAccessibleAfterTransition,\n useIsOutsideTransition,\n};\n"],"mappings":"AAAA,SACEA,4BAA4B,EAC5BC,kBAAkB,EAClBC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,sCAAsC,EACtCC,qBAAqB,EACrBC,4BAA4B,EAC5BC,sBAAsB,QACjB,iBAAiB;AACxB,SAASC,iCAAiC,EAAEC,4BAA4B,QAAQ,wBAAwB;AACxG,SAASC,6BAA6B,EAAEC,kCAAkC,QAAQ,yBAAyB;AAC3G;AACA,SAASC,yBAAyB,EAAEC,8BAA8B,QAAQ,UAAU;AAEpF,cAAc,gCAAgC;AAE9C,SACEL,iCAAiC,EACjCI,yBAAyB,EACzBF,6BAA6B,EAC7BC,kCAAkC,EAClCZ,4BAA4B,EAC5BC,kBAAkB,EAClBC,+BAA+B,EAC/BY,8BAA8B,EAC9BX,0BAA0B,EAC1BC,4BAA4B,EAC5BC,sCAAsC,EACtCC,qBAAqB,EACrBI,4BAA4B,EAC5BH,4BAA4B,EAC5BC,sBAAsB"}
1
+ {"version":3,"names":["focusAccessibility","setAccessibilityTextTransformer","transformAccessibilityText","useAccessibilityAnnouncement","useAccessibilityAnnouncementCumulative","useAccessibilityFocus","useAccessibleAfterTransition","useIsOutsideTransition","AccessibilityFocusHistoryProvider","useAccessibilityFocusHistory","AccessibilityLanguageProvider"],"sources":["index.ts"],"sourcesContent":["import type { AccessibilityTextTransformer } from './accessibility';\nimport {\n focusAccessibility,\n setAccessibilityTextTransformer,\n transformAccessibilityText,\n useAccessibilityAnnouncement,\n useAccessibilityAnnouncementCumulative,\n useAccessibilityFocus,\n useAccessibleAfterTransition,\n useIsOutsideTransition,\n} from './accessibility';\nimport { AccessibilityFocusHistoryProvider, useAccessibilityFocusHistory } from './accessibilityHistory';\nimport type { AccessibilityLanguageProviderProps } from './accessibilityLanguage';\nimport { AccessibilityLanguageProvider } from './accessibilityLanguage';\n// @ts-ignore\nimport type { AccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';\n\nexport * from './accessibilityHistoryWrappers';\n\nexport {\n AccessibilityFocusHistoryProvider,\n AccessibilityLanguageFile,\n AccessibilityLanguageProvider,\n AccessibilityLanguageProviderProps,\n AccessibilityTextTransformer,\n focusAccessibility,\n setAccessibilityTextTransformer,\n SupportedAccessibilityLanguage,\n transformAccessibilityText,\n useAccessibilityAnnouncement,\n useAccessibilityAnnouncementCumulative,\n useAccessibilityFocus,\n useAccessibilityFocusHistory,\n useAccessibleAfterTransition,\n useIsOutsideTransition,\n};\n"],"mappings":"AACA,SACEA,kBAAkB,EAClBC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,sCAAsC,EACtCC,qBAAqB,EACrBC,4BAA4B,EAC5BC,sBAAsB,QACjB,iBAAiB;AACxB,SAASC,iCAAiC,EAAEC,4BAA4B,QAAQ,wBAAwB;AAExG,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE;;AAGA,cAAc,gCAAgC;AAE9C,SACEF,iCAAiC,EAEjCE,6BAA6B,EAG7BV,kBAAkB,EAClBC,+BAA+B,EAE/BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,sCAAsC,EACtCC,qBAAqB,EACrBI,4BAA4B,EAC5BH,4BAA4B,EAC5BC,sBAAsB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["de","en","fr","it","defaultLanguageFiles","getAccessibilityLanguageFile","language","overrides","Object","assign"],"sources":["index.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport fr from './fr.json';\nimport it from './it.json';\n\nexport const defaultLanguageFiles = { en, de, fr, it };\n\nexport type SupportedAccessibilityLanguage = keyof typeof defaultLanguageFiles;\nexport type AccessibilityLanguageFile = typeof en;\n\nexport const getAccessibilityLanguageFile = (\n language: SupportedAccessibilityLanguage,\n overrides?: Partial<AccessibilityLanguageFile>,\n): AccessibilityLanguageFile =>\n Object.assign<{}, AccessibilityLanguageFile, Partial<AccessibilityLanguageFile> | undefined>(\n {},\n defaultLanguageFiles[language],\n overrides,\n );\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,MAAMC,oBAAoB,GAAG;EAAEH,EAAE;EAAED,EAAE;EAAEE,EAAE;EAAEC;AAAG,CAAC;AAKtD,OAAO,MAAME,4BAA4B,GAAGA,CAC1CC,QAAwC,EACxCC,SAA8C,KAE9CC,MAAM,CAACC,MAAM,CACX,CAAC,CAAC,EACFL,oBAAoB,CAACE,QAAQ,CAAC,EAC9BC,SAAS,CACV"}
1
+ {"version":3,"names":["de","en","fr","it","defaultLanguageFiles","getAccessibilityLanguageFile","language","overrides","Object","assign"],"sources":["index.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport fr from './fr.json';\nimport it from './it.json';\n\nexport const defaultLanguageFiles = { en, de, fr, it };\n\nexport type SupportedAccessibilityLanguage = keyof typeof defaultLanguageFiles;\nexport type AccessibilityLanguageFile = typeof en;\n\nexport const getAccessibilityLanguageFile = (\n language: SupportedAccessibilityLanguage,\n overrides?: Partial<AccessibilityLanguageFile>,\n): AccessibilityLanguageFile =>\n Object.assign<{}, AccessibilityLanguageFile, Partial<AccessibilityLanguageFile> | undefined>(\n {},\n defaultLanguageFiles[language],\n overrides,\n );\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,MAAMC,oBAAoB,GAAG;EAAEH,EAAE;EAAED,EAAE;EAAEE,EAAE;EAAEC;AAAG,CAAC;AAKtD,OAAO,MAAME,4BAA4B,GAAGA,CAC1CC,QAAwC,EACxCC,SAA8C,KAE9CC,MAAM,CAACC,MAAM,CACX,CAAC,CAAC,EACFL,oBAAoB,CAACE,QAAQ,CAAC,EAC9BC,SACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["defaultLanguageFiles","it","mainFile","en","getNumberOfEntries","file","Object","keys","length","forEach","lang","checkedFile","expect","toBe","entryKey","toContain"],"sources":["locale.test.ts"],"sourcesContent":["import { AccessibilityLanguageFile, defaultLanguageFiles, SupportedAccessibilityLanguage } from './locale';\n\nit('language files consistency', () => {\n const mainFile: AccessibilityLanguageFile = defaultLanguageFiles.en;\n const getNumberOfEntries = (file: AccessibilityLanguageFile) => Object.keys(file).length;\n\n Object.keys(defaultLanguageFiles).forEach((lang) => {\n const checkedFile: AccessibilityLanguageFile = defaultLanguageFiles[lang as SupportedAccessibilityLanguage];\n\n expect(getNumberOfEntries(checkedFile)).toBe(getNumberOfEntries(mainFile));\n\n Object.keys(checkedFile).forEach((entryKey) => {\n expect(Object.keys(mainFile)).toContain(entryKey);\n });\n });\n});\n"],"mappings":"AAAA,SAAoCA,oBAAoB,QAAwC,UAAU;AAE1GC,EAAE,CAAC,4BAA4B,EAAE,MAAM;EACrC,MAAMC,QAAmC,GAAGF,oBAAoB,CAACG,EAAE;EACnE,MAAMC,kBAAkB,GAAIC,IAA+B,IAAKC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM;EAExFF,MAAM,CAACC,IAAI,CAACP,oBAAoB,CAAC,CAACS,OAAO,CAAEC,IAAI,IAAK;IAClD,MAAMC,WAAsC,GAAGX,oBAAoB,CAACU,IAAI,CAAmC;IAE3GE,MAAM,CAACR,kBAAkB,CAACO,WAAW,CAAC,CAAC,CAACE,IAAI,CAACT,kBAAkB,CAACF,QAAQ,CAAC,CAAC;IAE1EI,MAAM,CAACC,IAAI,CAACI,WAAW,CAAC,CAACF,OAAO,CAAEK,QAAQ,IAAK;MAC7CF,MAAM,CAACN,MAAM,CAACC,IAAI,CAACL,QAAQ,CAAC,CAAC,CAACa,SAAS,CAACD,QAAQ,CAAC;IACnD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["defaultLanguageFiles","it","mainFile","en","getNumberOfEntries","file","Object","keys","length","forEach","lang","checkedFile","expect","toBe","entryKey","toContain"],"sources":["locale.test.ts"],"sourcesContent":["import { AccessibilityLanguageFile, defaultLanguageFiles, SupportedAccessibilityLanguage } from './locale';\n\nit('language files consistency', () => {\n const mainFile: AccessibilityLanguageFile = defaultLanguageFiles.en;\n const getNumberOfEntries = (file: AccessibilityLanguageFile) => Object.keys(file).length;\n\n Object.keys(defaultLanguageFiles).forEach((lang) => {\n const checkedFile: AccessibilityLanguageFile = defaultLanguageFiles[lang as SupportedAccessibilityLanguage];\n\n expect(getNumberOfEntries(checkedFile)).toBe(getNumberOfEntries(mainFile));\n\n Object.keys(checkedFile).forEach((entryKey) => {\n expect(Object.keys(mainFile)).toContain(entryKey);\n });\n });\n});\n"],"mappings":"AAAA,SAAoCA,oBAAoB,QAAwC,UAAU;AAE1GC,EAAE,CAAC,4BAA4B,EAAE,MAAM;EACrC,MAAMC,QAAmC,GAAGF,oBAAoB,CAACG,EAAE;EACnE,MAAMC,kBAAkB,GAAIC,IAA+B,IAAKC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM;EAExFF,MAAM,CAACC,IAAI,CAACP,oBAAoB,CAAC,CAACS,OAAO,CAAEC,IAAI,IAAK;IAClD,MAAMC,WAAsC,GAAGX,oBAAoB,CAACU,IAAI,CAAmC;IAE3GE,MAAM,CAACR,kBAAkB,CAACO,WAAW,CAAC,CAAC,CAACE,IAAI,CAACT,kBAAkB,CAACF,QAAQ,CAAC,CAAC;IAE1EI,MAAM,CAACC,IAAI,CAACI,WAAW,CAAC,CAACF,OAAO,CAAEK,QAAQ,IAAK;MAC7CF,MAAM,CAACN,MAAM,CAACC,IAAI,CAACL,QAAQ,CAAC,CAAC,CAACa,SAAS,CAACD,QAAQ,CAAC;IACnD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -13,14 +13,13 @@ const styles = StyleSheet.create({
13
13
  width: '100%'
14
14
  }
15
15
  });
16
- const ActionModal = _ref => {
17
- let {
18
- children,
19
- contentStyle,
20
- style,
21
- visible,
22
- testID
23
- } = _ref;
16
+ const ActionModal = ({
17
+ children,
18
+ contentStyle,
19
+ style,
20
+ visible,
21
+ testID
22
+ }) => {
24
23
  const colorScheme = useAppColorScheme();
25
24
  const overlay = 'rgba(0, 0, 0, 0.5)';
26
25
  return /*#__PURE__*/React.createElement(Modal, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Modal","StyleSheet","View","useAppColorScheme","styles","create","background","height","width","contentContainer","borderTopLeftRadius","borderTopRightRadius","marginTop","ActionModal","_ref","children","contentStyle","style","visible","testID","colorScheme","overlay","createElement","animationType","statusBarTranslucent","transparent","backgroundColor","white"],"sources":["ActionModal.tsx"],"sourcesContent":["import React, { FunctionComponent, PropsWithChildren } from 'react';\nimport { Modal, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { useAppColorScheme } from '../theme';\n\ninterface Props {\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n visible: boolean;\n testID?: string;\n}\n\nconst styles = StyleSheet.create({\n background: {\n height: '100%',\n width: '100%',\n },\n contentContainer: {\n borderTopLeftRadius: 20,\n borderTopRightRadius: 20,\n marginTop: 'auto',\n width: '100%',\n },\n});\n\nconst ActionModal: FunctionComponent<PropsWithChildren<Props>> = ({\n children,\n contentStyle,\n style,\n visible,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const overlay = 'rgba(0, 0, 0, 0.5)';\n\n return (\n <Modal animationType=\"fade\" statusBarTranslucent style={style} transparent visible={visible}>\n <View testID={testID} style={[styles.background, { backgroundColor: overlay }]}>\n <View style={[styles.contentContainer, { backgroundColor: colorScheme.white }, contentStyle]}>{children}</View>\n </View>\n </Modal>\n );\n};\n\nexport default ActionModal;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAgD,OAAO;AACnE,SAASC,KAAK,EAAaC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE5E,SAASC,iBAAiB,QAAQ,UAAU;AAS5C,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,UAAU,EAAE;IACVC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDC,gBAAgB,EAAE;IAChBC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,SAAS,EAAE,MAAM;IACjBJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,MAAMK,WAAwD,GAAGC,IAAA,IAM3D;EAAA,IAN4D;IAChEC,QAAQ;IACRC,YAAY;IACZC,KAAK;IACLC,OAAO;IACPC;EACF,CAAC,GAAAL,IAAA;EACC,MAAMM,WAAW,GAAGjB,iBAAiB,EAAE;EACvC,MAAMkB,OAAO,GAAG,oBAAoB;EAEpC,oBACEtB,KAAA,CAAAuB,aAAA,CAACtB,KAAK;IAACuB,aAAa,EAAC,MAAM;IAACC,oBAAoB;IAACP,KAAK,EAAEA,KAAM;IAACQ,WAAW;IAACP,OAAO,EAAEA;EAAQ,gBAC1FnB,KAAA,CAAAuB,aAAA,CAACpB,IAAI;IAACiB,MAAM,EAAEA,MAAO;IAACF,KAAK,EAAE,CAACb,MAAM,CAACE,UAAU,EAAE;MAAEoB,eAAe,EAAEL;IAAQ,CAAC;EAAE,gBAC7EtB,KAAA,CAAAuB,aAAA,CAACpB,IAAI;IAACe,KAAK,EAAE,CAACb,MAAM,CAACK,gBAAgB,EAAE;MAAEiB,eAAe,EAAEN,WAAW,CAACO;IAAM,CAAC,EAAEX,YAAY;EAAE,GAAED,QAAQ,CAAQ,CAC1G,CACD;AAEZ,CAAC;AAED,eAAeF,WAAW"}
1
+ {"version":3,"names":["React","Modal","StyleSheet","View","useAppColorScheme","styles","create","background","height","width","contentContainer","borderTopLeftRadius","borderTopRightRadius","marginTop","ActionModal","children","contentStyle","style","visible","testID","colorScheme","overlay","createElement","animationType","statusBarTranslucent","transparent","backgroundColor","white"],"sources":["ActionModal.tsx"],"sourcesContent":["import React, { FunctionComponent, PropsWithChildren } from 'react';\nimport { Modal, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { useAppColorScheme } from '../theme';\n\ninterface Props {\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n visible: boolean;\n testID?: string;\n}\n\nconst styles = StyleSheet.create({\n background: {\n height: '100%',\n width: '100%',\n },\n contentContainer: {\n borderTopLeftRadius: 20,\n borderTopRightRadius: 20,\n marginTop: 'auto',\n width: '100%',\n },\n});\n\nconst ActionModal: FunctionComponent<PropsWithChildren<Props>> = ({\n children,\n contentStyle,\n style,\n visible,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const overlay = 'rgba(0, 0, 0, 0.5)';\n\n return (\n <Modal animationType=\"fade\" statusBarTranslucent style={style} transparent visible={visible}>\n <View testID={testID} style={[styles.background, { backgroundColor: overlay }]}>\n <View style={[styles.contentContainer, { backgroundColor: colorScheme.white }, contentStyle]}>{children}</View>\n </View>\n </Modal>\n );\n};\n\nexport default ActionModal;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAgD,OAAO;AACnE,SAASC,KAAK,EAAaC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE5E,SAASC,iBAAiB,QAAQ,UAAU;AAS5C,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,UAAU,EAAE;IACVC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDC,gBAAgB,EAAE;IAChBC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,SAAS,EAAE,MAAM;IACjBJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,MAAMK,WAAwD,GAAGA,CAAC;EAChEC,QAAQ;EACRC,YAAY;EACZC,KAAK;EACLC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGhB,iBAAiB,CAAC,CAAC;EACvC,MAAMiB,OAAO,GAAG,oBAAoB;EAEpC,oBACErB,KAAA,CAAAsB,aAAA,CAACrB,KAAK;IAACsB,aAAa,EAAC,MAAM;IAACC,oBAAoB;IAACP,KAAK,EAAEA,KAAM;IAACQ,WAAW;IAACP,OAAO,EAAEA;EAAQ,gBAC1FlB,KAAA,CAAAsB,aAAA,CAACnB,IAAI;IAACgB,MAAM,EAAEA,MAAO;IAACF,KAAK,EAAE,CAACZ,MAAM,CAACE,UAAU,EAAE;MAAEmB,eAAe,EAAEL;IAAQ,CAAC;EAAE,gBAC7ErB,KAAA,CAAAsB,aAAA,CAACnB,IAAI;IAACc,KAAK,EAAE,CAACZ,MAAM,CAACK,gBAAgB,EAAE;MAAEgB,eAAe,EAAEN,WAAW,CAACO;IAAM,CAAC,EAAEX,YAAY;EAAE,GAAED,QAAe,CAC1G,CACD,CAAC;AAEZ,CAAC;AAED,eAAeD,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["ActionModal"],"sources":["index.ts"],"sourcesContent":["import ActionModal from './ActionModal';\n\nexport { ActionModal };\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAEvC,SAASA,WAAW"}
1
+ {"version":3,"names":["ActionModal"],"sources":["index.ts"],"sourcesContent":["import ActionModal from './ActionModal';\n\nexport { ActionModal };\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAEvC,SAASA,WAAW","ignoreList":[]}
@@ -1,13 +1,12 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
3
  import { StyleSheet, View } from 'react-native';
4
4
  import LoaderView, { LoaderViewState } from '../loader/loader';
5
- const ActivityIndicator = _ref => {
6
- let {
7
- animate = true,
8
- style,
9
- ...props
10
- } = _ref;
5
+ const ActivityIndicator = ({
6
+ animate = true,
7
+ style,
8
+ ...props
9
+ }) => {
11
10
  return /*#__PURE__*/React.createElement(View, _extends({}, props, {
12
11
  style: [styles.wrapper, style]
13
12
  }), /*#__PURE__*/React.createElement(LoaderView, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","View","LoaderView","LoaderViewState","ActivityIndicator","_ref","animate","style","props","createElement","_extends","styles","wrapper","state","InProgress","create","alignItems"],"sources":["activity-indicator.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';\n\nimport LoaderView, { LoaderViewState } from '../loader/loader';\n\ntype ActivityIndicatorProps = ViewProps & {\n animate?: boolean;\n};\n\nconst ActivityIndicator: FC<ActivityIndicatorProps> = ({ animate = true, style, ...props }) => {\n return (\n <View {...props} style={[styles.wrapper, style]}>\n <LoaderView animate={animate} state={LoaderViewState.InProgress} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n alignItems: 'center',\n },\n});\n\nexport default ActivityIndicator;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAG/C,OAAOC,UAAU,IAAIC,eAAe,QAAQ,kBAAkB;AAM9D,MAAMC,iBAA6C,GAAGC,IAAA,IAAyC;EAAA,IAAxC;IAAEC,OAAO,GAAG,IAAI;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,GAAAH,IAAA;EACxF,oBACEN,KAAA,CAAAU,aAAA,CAACR,IAAI,EAAAS,QAAA,KAAKF,KAAK;IAAED,KAAK,EAAE,CAACI,MAAM,CAACC,OAAO,EAAEL,KAAK;EAAE,iBAC9CR,KAAA,CAAAU,aAAA,CAACP,UAAU;IAACI,OAAO,EAAEA,OAAQ;IAACO,KAAK,EAAEV,eAAe,CAACW;EAAW,EAAG,CAC9D;AAEX,CAAC;AAED,MAAMH,MAAM,GAAGX,UAAU,CAACe,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAeZ,iBAAiB"}
1
+ {"version":3,"names":["React","StyleSheet","View","LoaderView","LoaderViewState","ActivityIndicator","animate","style","props","createElement","_extends","styles","wrapper","state","InProgress","create","alignItems"],"sources":["activity-indicator.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';\n\nimport LoaderView, { LoaderViewState } from '../loader/loader';\n\ntype ActivityIndicatorProps = ViewProps & {\n animate?: boolean;\n};\n\nconst ActivityIndicator: FC<ActivityIndicatorProps> = ({ animate = true, style, ...props }) => {\n return (\n <View {...props} style={[styles.wrapper, style]}>\n <LoaderView animate={animate} state={LoaderViewState.InProgress} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n alignItems: 'center',\n },\n});\n\nexport default ActivityIndicator;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAG/C,OAAOC,UAAU,IAAIC,eAAe,QAAQ,kBAAkB;AAM9D,MAAMC,iBAA6C,GAAGA,CAAC;EAAEC,OAAO,GAAG,IAAI;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,KAAK;EAC7F,oBACER,KAAA,CAAAS,aAAA,CAACP,IAAI,EAAAQ,QAAA,KAAKF,KAAK;IAAED,KAAK,EAAE,CAACI,MAAM,CAACC,OAAO,EAAEL,KAAK;EAAE,iBAC9CP,KAAA,CAAAS,aAAA,CAACN,UAAU;IAACG,OAAO,EAAEA,OAAQ;IAACO,KAAK,EAAET,eAAe,CAACU;EAAW,CAAE,CAC9D,CAAC;AAEX,CAAC;AAED,MAAMH,MAAM,GAAGV,UAAU,CAACc,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAeX,iBAAiB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["ActivityIndicator"],"sources":["index.ts"],"sourcesContent":["import ActivityIndicator from './activity-indicator';\n\nexport { ActivityIndicator };\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,sBAAsB;AAEpD,SAASA,iBAAiB"}
1
+ {"version":3,"names":["ActivityIndicator"],"sources":["index.ts"],"sourcesContent":["import ActivityIndicator from './activity-indicator';\n\nexport { ActivityIndicator };\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,sBAAsB;AAEpD,SAASA,iBAAiB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import { BlurView as RNBlurView } from '@react-native-community/blur';
3
3
  import React, { useMemo } from 'react';
4
4
  import { Platform, StyleSheet, View } from 'react-native';
@@ -12,16 +12,15 @@ const BACKGROUND_COLOR = {
12
12
  thinMaterialLight: 'rgba(255, 255, 255, 0.8)',
13
13
  thinMaterialDark: 'rgba(16, 12, 12, 0.8)'
14
14
  };
15
- const BlurView = _ref => {
16
- let {
17
- blurAmount = 50,
18
- blurStyle,
19
- color,
20
- darkMode,
21
- children,
22
- style,
23
- ...props
24
- } = _ref;
15
+ const BlurView = ({
16
+ blurAmount = 50,
17
+ blurStyle,
18
+ color,
19
+ darkMode,
20
+ children,
21
+ style,
22
+ ...props
23
+ }) => {
25
24
  const colorScheme = useAppColorScheme();
26
25
  const themeDarkMode = colorScheme.darkMode;
27
26
  const dark = darkMode !== null && darkMode !== void 0 ? darkMode : themeDarkMode;
@@ -1 +1 @@
1
- {"version":3,"names":["BlurView","RNBlurView","React","useMemo","Platform","StyleSheet","View","colorWithAlphaComponent","useAppColorScheme","BACKGROUND_COLOR","light","dark","thickMaterialLight","thickMaterialDark","thinMaterialLight","thinMaterialDark","_ref","blurAmount","blurStyle","color","darkMode","children","style","props","colorScheme","themeDarkMode","blurType","backgroundStyle","background","backgroundColor","OS","createElement","_extends","styles","wrapper","reducedTransparencyFallbackColor","absoluteFill","create","overflow"],"sources":["blur-view.tsx"],"sourcesContent":["import { BlurView as RNBlurView, BlurViewProps as RNBlurViewProps } from '@react-native-community/blur';\nimport React, { FC, PropsWithChildren, useMemo } from 'react';\nimport { ColorValue, Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { colorWithAlphaComponent } from '../../utils/color';\nimport { useAppColorScheme } from '../theme';\n\nexport interface BlurViewProps extends ViewProps {\n blurAmount?: number;\n color?: ColorValue;\n darkMode?: boolean;\n blurStyle: 'soft' | 'strong' | 'header';\n}\n\nconst BACKGROUND_COLOR = {\n light: 'rgba(255, 255, 255, 0.8)',\n dark: 'rgba(16, 12, 12, 0.8)',\n thickMaterialLight: 'rgba(255, 255, 255, 0.95)',\n thickMaterialDark: 'rgba(16, 12, 12, 0.95)',\n thinMaterialLight: 'rgba(255, 255, 255, 0.8)',\n thinMaterialDark: 'rgba(16, 12, 12, 0.8)',\n};\n\nconst BlurView: FC<PropsWithChildren<BlurViewProps>> = ({\n blurAmount = 50,\n blurStyle,\n color,\n darkMode,\n children,\n style,\n ...props\n}) => {\n const colorScheme = useAppColorScheme();\n const themeDarkMode = colorScheme.darkMode;\n const dark = darkMode ?? themeDarkMode;\n\n const blurType: RNBlurViewProps['blurType'] = useMemo(() => {\n if (blurStyle === 'header') {\n return dark ? 'dark' : 'light';\n } else if (blurStyle === 'soft') {\n return dark ? 'thinMaterialDark' : 'thinMaterialLight';\n } else {\n return dark ? 'thickMaterialDark' : 'thickMaterialLight';\n }\n }, [blurStyle, dark]);\n\n const backgroundStyle: ViewStyle | undefined = useMemo(() => {\n if (blurStyle === 'header' && color === colorScheme.background) {\n return { backgroundColor: '#00000005' };\n }\n }, [blurStyle, color, colorScheme.background]);\n\n if (Platform.OS === 'ios') {\n return (\n <View style={[styles.wrapper, backgroundStyle, style]} {...props}>\n <RNBlurView\n blurAmount={blurAmount}\n blurType={blurType}\n reducedTransparencyFallbackColor={color as string}\n style={StyleSheet.absoluteFill}\n />\n {children}\n </View>\n );\n }\n\n const backgroundColor = color ? colorWithAlphaComponent(color, 0.9) : BACKGROUND_COLOR[blurType];\n\n return (\n <View style={[{ backgroundColor }, style]} {...props}>\n {children}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n overflow: 'hidden',\n },\n});\n\nexport default BlurView;\n"],"mappings":";AAAA,SAASA,QAAQ,IAAIC,UAAU,QAA0C,8BAA8B;AACvG,OAAOC,KAAK,IAA2BC,OAAO,QAAQ,OAAO;AAC7D,SAAqBC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAE3F,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,iBAAiB,QAAQ,UAAU;AAS5C,MAAMC,gBAAgB,GAAG;EACvBC,KAAK,EAAE,0BAA0B;EACjCC,IAAI,EAAE,uBAAuB;EAC7BC,kBAAkB,EAAE,2BAA2B;EAC/CC,iBAAiB,EAAE,wBAAwB;EAC3CC,iBAAiB,EAAE,0BAA0B;EAC7CC,gBAAgB,EAAE;AACpB,CAAC;AAED,MAAMf,QAA8C,GAAGgB,IAAA,IAQjD;EAAA,IARkD;IACtDC,UAAU,GAAG,EAAE;IACfC,SAAS;IACTC,KAAK;IACLC,QAAQ;IACRC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACL,CAAC,GAAAP,IAAA;EACC,MAAMQ,WAAW,GAAGhB,iBAAiB,EAAE;EACvC,MAAMiB,aAAa,GAAGD,WAAW,CAACJ,QAAQ;EAC1C,MAAMT,IAAI,GAAGS,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIK,aAAa;EAEtC,MAAMC,QAAqC,GAAGvB,OAAO,CAAC,MAAM;IAC1D,IAAIe,SAAS,KAA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EX,CAAC;AAED,MAAMY,MAAM,GAAG5B,UAAU,CAACgC,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAetC,QAAQ"}
1
+ {"version":3,"names":["BlurView","RNBlurView","React","useMemo","Platform","StyleSheet","View","colorWithAlphaComponent","useAppColorScheme","BACKGROUND_COLOR","light","dark","thickMaterialLight","thickMaterialDark","thinMaterialLight","thinMaterialDark","blurAmount","blurStyle","color","darkMode","children","style","props","colorScheme","themeDarkMode","blurType","backgroundStyle","background","backgroundColor","OS","createElement","_extends","styles","wrapper","reducedTransparencyFallbackColor","absoluteFill","create","overflow"],"sources":["blur-view.tsx"],"sourcesContent":["import { BlurView as RNBlurView, BlurViewProps as RNBlurViewProps } from '@react-native-community/blur';\nimport React, { FC, PropsWithChildren, useMemo } from 'react';\nimport { ColorValue, Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { colorWithAlphaComponent } from '../../utils/color';\nimport { useAppColorScheme } from '../theme';\n\nexport interface BlurViewProps extends ViewProps {\n blurAmount?: number;\n color?: ColorValue;\n darkMode?: boolean;\n blurStyle: 'soft' | 'strong' | 'header';\n}\n\nconst BACKGROUND_COLOR = {\n light: 'rgba(255, 255, 255, 0.8)',\n dark: 'rgba(16, 12, 12, 0.8)',\n thickMaterialLight: 'rgba(255, 255, 255, 0.95)',\n thickMaterialDark: 'rgba(16, 12, 12, 0.95)',\n thinMaterialLight: 'rgba(255, 255, 255, 0.8)',\n thinMaterialDark: 'rgba(16, 12, 12, 0.8)',\n};\n\nconst BlurView: FC<PropsWithChildren<BlurViewProps>> = ({\n blurAmount = 50,\n blurStyle,\n color,\n darkMode,\n children,\n style,\n ...props\n}) => {\n const colorScheme = useAppColorScheme();\n const themeDarkMode = colorScheme.darkMode;\n const dark = darkMode ?? themeDarkMode;\n\n const blurType: RNBlurViewProps['blurType'] = useMemo(() => {\n if (blurStyle === 'header') {\n return dark ? 'dark' : 'light';\n } else if (blurStyle === 'soft') {\n return dark ? 'thinMaterialDark' : 'thinMaterialLight';\n } else {\n return dark ? 'thickMaterialDark' : 'thickMaterialLight';\n }\n }, [blurStyle, dark]);\n\n const backgroundStyle: ViewStyle | undefined = useMemo(() => {\n if (blurStyle === 'header' && color === colorScheme.background) {\n return { backgroundColor: '#00000005' };\n }\n }, [blurStyle, color, colorScheme.background]);\n\n if (Platform.OS === 'ios') {\n return (\n <View style={[styles.wrapper, backgroundStyle, style]} {...props}>\n <RNBlurView\n blurAmount={blurAmount}\n blurType={blurType}\n reducedTransparencyFallbackColor={color as string}\n style={StyleSheet.absoluteFill}\n />\n {children}\n </View>\n );\n }\n\n const backgroundColor = color ? colorWithAlphaComponent(color, 0.9) : BACKGROUND_COLOR[blurType];\n\n return (\n <View style={[{ backgroundColor }, style]} {...props}>\n {children}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n overflow: 'hidden',\n },\n});\n\nexport default BlurView;\n"],"mappings":";AAAA,SAASA,QAAQ,IAAIC,UAAU,QAA0C,8BAA8B;AACvG,OAAOC,KAAK,IAA2BC,OAAO,QAAQ,OAAO;AAC7D,SAAqBC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAE3F,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,iBAAiB,QAAQ,UAAU;AAS5C,MAAMC,gBAAgB,GAAG;EACvBC,KAAK,EAAE,0BAA0B;EACjCC,IAAI,EAAE,uBAAuB;EAC7BC,kBAAkB,EAAE,2BAA2B;EAC/CC,iBAAiB,EAAE,wBAAwB;EAC3CC,iBAAiB,EAAE,0BAA0B;EAC7CC,gBAAgB,EAAE;AACpB,CAAC;AAED,MAAMf,QAA8C,GAAGA,CAAC;EACtDgB,UAAU,GAAG,EAAE;EACfC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,WA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KAAK,EAAE,GAAG,CAAC,GAAGT,gBAAgB,CAACgB,QAAQ,CAAC;EAEhG,oBACEvB,KAAA,CAAA4B,aAAA,CAACxB,IAAI,EAAAyB,QAAA;IAACV,KAAK,EAAE,CAAC;MAAEO;IAAgB,CAAC,EAAEP,KAAK;EAAE,GAAKC,KAAK,GACjDF,QACG,CAAC;AAEX,CAAC;AAED,MAAMY,MAAM,GAAG3B,UAAU,CAAC+B,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAerC,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BlurView","BlurViewProps"],"sources":["index.ts"],"sourcesContent":["import BlurView, { BlurViewProps } from './blur-view';\n\nexport { BlurView, BlurViewProps };\n"],"mappings":"AAAA,OAAOA,QAAQ,IAAIC,aAAa,QAAQ,aAAa;AAErD,SAASD,QAAQ,EAAEC,aAAa"}
1
+ {"version":3,"names":["BlurView","BlurViewProps"],"sources":["index.ts"],"sourcesContent":["import BlurView, { BlurViewProps } from './blur-view';\n\nexport { BlurView, BlurViewProps };\n"],"mappings":"AAAA,OAAOA,QAAQ,IAAIC,aAAa,QAAQ,aAAa;AAErD,SAASD,QAAQ,EAAEC,aAAa","ignoreList":[]}
@@ -1,20 +1,19 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
3
  import { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
4
4
  import { BackIcon, CloseIcon } from '../icons';
5
5
  import GhostButton from './ghost-button';
6
- export let BackButtonIcon;
7
- (function (BackButtonIcon) {
6
+ export let BackButtonIcon = /*#__PURE__*/function (BackButtonIcon) {
8
7
  BackButtonIcon["Back"] = "back";
9
8
  BackButtonIcon["Close"] = "close";
10
- })(BackButtonIcon || (BackButtonIcon = {}));
11
- const BackButton = _ref => {
12
- let {
13
- style,
14
- icon = BackButtonIcon.Back,
15
- onPress,
16
- ...props
17
- } = _ref;
9
+ return BackButtonIcon;
10
+ }({});
11
+ const BackButton = ({
12
+ style,
13
+ icon = BackButtonIcon.Back,
14
+ onPress,
15
+ ...props
16
+ }) => {
18
17
  const t = useAccessibilityTranslation();
19
18
  const Icon = icon === BackButtonIcon.Close ? CloseIcon : BackIcon;
20
19
  return /*#__PURE__*/React.createElement(GhostButton, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","useAccessibilityTranslation","BackIcon","CloseIcon","GhostButton","BackButtonIcon","BackButton","_ref","style","icon","Back","onPress","props","t","Icon","Close","createElement","_extends","accessibilityLabel"],"sources":["back-button.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';\nimport { BackIcon, CloseIcon } from '../icons';\nimport GhostButton, { GhostButtonProps } from './ghost-button';\n\nexport enum BackButtonIcon {\n Back = 'back',\n Close = 'close',\n}\n\nexport type BackButtonProps = Omit<GhostButtonProps, 'accessibilityLabel'>;\n\nconst BackButton: FC<BackButtonProps> = ({ style, icon = BackButtonIcon.Back, onPress, ...props }) => {\n const t = useAccessibilityTranslation();\n\n const Icon = icon === BackButtonIcon.Close ? CloseIcon : BackIcon;\n\n return (\n <GhostButton\n accessibilityLabel={t(icon === BackButtonIcon.Close ? 'accessibility.nav.close' : 'accessibility.nav.back')}\n icon={Icon}\n onPress={onPress}\n style={style}\n {...props}\n />\n );\n};\n\nexport default BackButton;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AAEjC,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,QAAQ,EAAEC,SAAS,QAAQ,UAAU;AAC9C,OAAOC,WAAW,MAA4B,gBAAgB;AAE9D,WAAYC,cAAc;AAGzB,WAHWA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc;AAO1B,MAAMC,UAA+B,GAAGC,IAAA,IAA8D;EAAA,IAA7D;IAAEC,KAAK;IAAEC,IAAI,GAAGJ,cAAc,CAACK,IAAI;IAAEC,OAAO;IAAE,GAAGC;EAAM,CAAC,GAAAL,IAAA;EAC/F,MAAMM,CAAC,GAAGZ,2BAA2B,EAAE;EAEvC,MAAMa,IAAI,GAAGL,IAAI,KAAKJ,cAAc,CAACU,KAAK,GAAGZ,SAAS,GAAGD,QAAQ;EAEjE,oBACEF,KAAA,CAAAgB,aAAA,CAACZ,WAAW,EAAAa,QAAA;IACVC,kBAAkB,EAAEL,CAAC,CAACJ,IAAI,KAAKJ,cAAc,CAACU,KAAK,GAAG,yBAAyB,GAAG,wBAAwB,CAAE;IAC5GN,IAAI,EAAEK,IAAK;IACXH,OAAO,EAAEA,OAAQ;IACjBH,KAAK,EAAEA;EAAM,GACTI,KAAK,EACT;AAEN,CAAC;AAED,eAAeN,UAAU"}
1
+ {"version":3,"names":["React","useAccessibilityTranslation","BackIcon","CloseIcon","GhostButton","BackButtonIcon","BackButton","style","icon","Back","onPress","props","t","Icon","Close","createElement","_extends","accessibilityLabel"],"sources":["back-button.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';\nimport { BackIcon, CloseIcon } from '../icons';\nimport GhostButton, { GhostButtonProps } from './ghost-button';\n\nexport enum BackButtonIcon {\n Back = 'back',\n Close = 'close',\n}\n\nexport type BackButtonProps = Omit<GhostButtonProps, 'accessibilityLabel'>;\n\nconst BackButton: FC<BackButtonProps> = ({ style, icon = BackButtonIcon.Back, onPress, ...props }) => {\n const t = useAccessibilityTranslation();\n\n const Icon = icon === BackButtonIcon.Close ? CloseIcon : BackIcon;\n\n return (\n <GhostButton\n accessibilityLabel={t(icon === BackButtonIcon.Close ? 'accessibility.nav.close' : 'accessibility.nav.back')}\n icon={Icon}\n onPress={onPress}\n style={style}\n {...props}\n />\n );\n};\n\nexport default BackButton;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AAEjC,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,QAAQ,EAAEC,SAAS,QAAQ,UAAU;AAC9C,OAAOC,WAAW,MAA4B,gBAAgB;AAE9D,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAO1B,MAAMC,UAA+B,GAAGA,CAAC;EAAEC,KAAK;EAAEC,IAAI,GAAGH,cAAc,CAACI,IAAI;EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,KAAK;EACpG,MAAMC,CAAC,GAAGX,2BAA2B,CAAC,CAAC;EAEvC,MAAMY,IAAI,GAAGL,IAAI,KAAKH,cAAc,CAACS,KAAK,GAAGX,SAAS,GAAGD,QAAQ;EAEjE,oBACEF,KAAA,CAAAe,aAAA,CAACX,WAAW,EAAAY,QAAA;IACVC,kBAAkB,EAAEL,CAAC,CAACJ,IAAI,KAAKH,cAAc,CAACS,KAAK,GAAG,yBAAyB,GAAG,wBAAwB,CAAE;IAC5GN,IAAI,EAAEK,IAAK;IACXH,OAAO,EAAEA,OAAQ;IACjBH,KAAK,EAAEA;EAAM,GACTI,KAAK,CACV,CAAC;AAEN,CAAC;AAED,eAAeL,UAAU","ignoreList":[]}