@bifold/core 2.4.5 → 2.5.0

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 (416) hide show
  1. package/lib/commonjs/contexts/reducers/store.js +3 -2
  2. package/lib/commonjs/contexts/reducers/store.js.map +1 -1
  3. package/lib/commonjs/index.js +119 -104
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/screens/AttemptLockout.js +27 -35
  6. package/lib/commonjs/screens/AttemptLockout.js.map +1 -1
  7. package/lib/commonjs/screens/ContactDetails.js +1 -1
  8. package/lib/commonjs/screens/ContactDetails.js.map +1 -1
  9. package/lib/commonjs/screens/CredentialDetails.js +1 -1
  10. package/lib/commonjs/screens/CredentialDetails.js.map +1 -1
  11. package/lib/commonjs/screens/JSONDetails.js +6 -3
  12. package/lib/commonjs/screens/JSONDetails.js.map +1 -1
  13. package/lib/commonjs/screens/MobileVerifierLoading.js +4 -3
  14. package/lib/commonjs/screens/MobileVerifierLoading.js.map +1 -1
  15. package/lib/commonjs/screens/PINCreate.js +3 -10
  16. package/lib/commonjs/screens/PINCreate.js.map +1 -1
  17. package/lib/commonjs/screens/WhatAreContacts.js +3 -2
  18. package/lib/commonjs/screens/WhatAreContacts.js.map +1 -1
  19. package/lib/module/contexts/reducers/store.js +3 -2
  20. package/lib/module/contexts/reducers/store.js.map +1 -1
  21. package/lib/module/index.js +42 -45
  22. package/lib/module/index.js.map +1 -1
  23. package/lib/module/screens/AttemptLockout.js +28 -36
  24. package/lib/module/screens/AttemptLockout.js.map +1 -1
  25. package/lib/module/screens/ContactDetails.js +1 -1
  26. package/lib/module/screens/ContactDetails.js.map +1 -1
  27. package/lib/module/screens/CredentialDetails.js +1 -1
  28. package/lib/module/screens/CredentialDetails.js.map +1 -1
  29. package/lib/module/screens/JSONDetails.js +6 -3
  30. package/lib/module/screens/JSONDetails.js.map +1 -1
  31. package/lib/module/screens/MobileVerifierLoading.js +4 -3
  32. package/lib/module/screens/MobileVerifierLoading.js.map +1 -1
  33. package/lib/module/screens/PINCreate.js +3 -10
  34. package/lib/module/screens/PINCreate.js.map +1 -1
  35. package/lib/module/screens/WhatAreContacts.js +3 -2
  36. package/lib/module/screens/WhatAreContacts.js.map +1 -1
  37. package/lib/typescript/src/contexts/reducers/store.d.ts.map +1 -1
  38. package/lib/typescript/src/index.d.ts +57 -61
  39. package/lib/typescript/src/index.d.ts.map +1 -1
  40. package/lib/typescript/src/screens/AttemptLockout.d.ts.map +1 -1
  41. package/lib/typescript/src/screens/JSONDetails.d.ts.map +1 -1
  42. package/lib/typescript/src/screens/MobileVerifierLoading.d.ts.map +1 -1
  43. package/lib/typescript/src/screens/PINCreate.d.ts.map +1 -1
  44. package/lib/typescript/src/screens/WhatAreContacts.d.ts.map +1 -1
  45. package/lib/typescript/src/types/navigators.d.ts +1 -1
  46. package/lib/typescript/src/types/navigators.d.ts.map +1 -1
  47. package/package.json +3 -4
  48. package/src/App.tsx +0 -79
  49. package/src/animated-components.ts +0 -30
  50. package/src/assets/fonts/MaterialIcons.ttf +0 -0
  51. package/src/assets/icons/code.svg +0 -4
  52. package/src/assets/icons/large-arrow.svg +0 -5
  53. package/src/assets/icons/pencil.svg +0 -15
  54. package/src/assets/icons/trash.svg +0 -31
  55. package/src/assets/img/Artwork_1024x1024.png +0 -0
  56. package/src/assets/img/HistoryCardAcceptedIcon.svg +0 -4
  57. package/src/assets/img/HistoryCardExpiredIcon.svg +0 -4
  58. package/src/assets/img/HistoryCardRevokedIcon.svg +0 -4
  59. package/src/assets/img/HistoryInformationSentIcon.svg +0 -4
  60. package/src/assets/img/HistoryPinUpdatedIcon.svg +0 -4
  61. package/src/assets/img/IconChevronRight.svg +0 -5
  62. package/src/assets/img/activity-indicator-circle.svg +0 -90
  63. package/src/assets/img/app-lockout.svg +0 -1
  64. package/src/assets/img/biometrics.svg +0 -74
  65. package/src/assets/img/chat-loading.svg +0 -1
  66. package/src/assets/img/check-in-circle.svg +0 -18
  67. package/src/assets/img/connection-pending.svg +0 -112
  68. package/src/assets/img/contact-book.svg +0 -21
  69. package/src/assets/img/credential-card.svg +0 -18
  70. package/src/assets/img/credential-declined.svg +0 -28
  71. package/src/assets/img/credential-in-hand.svg +0 -48
  72. package/src/assets/img/credential-list.svg +0 -60
  73. package/src/assets/img/credential-pending.svg +0 -96
  74. package/src/assets/img/credential-success.svg +0 -48
  75. package/src/assets/img/delete-notification.svg +0 -1
  76. package/src/assets/img/empty-wallet.svg +0 -23
  77. package/src/assets/img/error-filled.svg +0 -12
  78. package/src/assets/img/exclamation-mark.svg +0 -17
  79. package/src/assets/img/home-center-img.svg +0 -71
  80. package/src/assets/img/icon-credential-offer-dark.svg +0 -7
  81. package/src/assets/img/icon-credential-offer-light.svg +0 -7
  82. package/src/assets/img/icon-info-recieved-dark.svg +0 -8
  83. package/src/assets/img/icon-info-recieved-light.svg +0 -8
  84. package/src/assets/img/icon-info-sent-dark.svg +0 -8
  85. package/src/assets/img/icon-info-sent-light.svg +0 -8
  86. package/src/assets/img/icon-proof-request-dark.svg +0 -11
  87. package/src/assets/img/icon-proof-request-light.svg +0 -11
  88. package/src/assets/img/information-received.svg +0 -1
  89. package/src/assets/img/logo-large.png +0 -0
  90. package/src/assets/img/logo-large@2x.png +0 -0
  91. package/src/assets/img/logo-large@3x.png +0 -0
  92. package/src/assets/img/logo.svg +0 -15
  93. package/src/assets/img/message-text-icon-outline.svg +0 -1
  94. package/src/assets/img/message-text-icon.svg +0 -1
  95. package/src/assets/img/no_information_shared.svg +0 -36
  96. package/src/assets/img/preface.svg +0 -15
  97. package/src/assets/img/proof-declined.svg +0 -66
  98. package/src/assets/img/proof-pending.svg +0 -61
  99. package/src/assets/img/proof-success.svg +0 -72
  100. package/src/assets/img/push-notifications.svg +0 -1
  101. package/src/assets/img/qrcode-scan-icon.svg +0 -1
  102. package/src/assets/img/scan-share.svg +0 -102
  103. package/src/assets/img/secure-check.svg +0 -4
  104. package/src/assets/img/secure-image.svg +0 -64
  105. package/src/assets/img/update-available.svg +0 -26
  106. package/src/assets/img/verifier-request-declined.svg +0 -34
  107. package/src/assets/img/wallet-back.svg +0 -20
  108. package/src/assets/img/wallet-front.svg +0 -32
  109. package/src/assets/img/wallet-icon-outline.svg +0 -1
  110. package/src/assets/img/wallet-icon.svg +0 -1
  111. package/src/assets/img/wallet.svg +0 -43
  112. package/src/assets/oca-bundles.json +0 -174
  113. package/src/components/animated/ButtonLoading.tsx +0 -32
  114. package/src/components/animated/ConnectionLoading.tsx +0 -53
  115. package/src/components/animated/CredentialAdded.tsx +0 -72
  116. package/src/components/animated/CredentialPending.tsx +0 -63
  117. package/src/components/animated/LoadingIndicator.tsx +0 -49
  118. package/src/components/animated/PresentationLoading.tsx +0 -52
  119. package/src/components/animated/RecordLoading.tsx +0 -75
  120. package/src/components/animated/SendingProof.tsx +0 -53
  121. package/src/components/animated/SentProof.tsx +0 -72
  122. package/src/components/buttons/Button-api.tsx +0 -46
  123. package/src/components/buttons/Button.tsx +0 -125
  124. package/src/components/buttons/HeaderHome.tsx +0 -25
  125. package/src/components/buttons/IconButton.tsx +0 -93
  126. package/src/components/buttons/InfoIcon.tsx +0 -35
  127. package/src/components/buttons/SettingsMenu.tsx +0 -26
  128. package/src/components/buttons/ToggleButton.tsx +0 -93
  129. package/src/components/buttons/index.ts +0 -4
  130. package/src/components/chat/ActionSlider.tsx +0 -104
  131. package/src/components/chat/ChatActions.tsx +0 -33
  132. package/src/components/chat/ChatBubble.tsx +0 -20
  133. package/src/components/chat/ChatEvent.tsx +0 -31
  134. package/src/components/chat/ChatMessage.tsx +0 -142
  135. package/src/components/chat/MessageInput.tsx +0 -46
  136. package/src/components/chat/index.ts +0 -4
  137. package/src/components/forms/WalletNameForm.tsx +0 -148
  138. package/src/components/index.ts +0 -4
  139. package/src/components/inputs/BiometryControl.tsx +0 -190
  140. package/src/components/inputs/BulletPoint.tsx +0 -32
  141. package/src/components/inputs/CheckBoxRow.tsx +0 -67
  142. package/src/components/inputs/InlineErrorText.tsx +0 -60
  143. package/src/components/inputs/LimitedTextInput.tsx +0 -71
  144. package/src/components/inputs/PINInput.tsx +0 -175
  145. package/src/components/inputs/SingleSelectBlock.tsx +0 -53
  146. package/src/components/listItems/ContactCredentialListItem.tsx +0 -79
  147. package/src/components/listItems/ContactListItem.tsx +0 -121
  148. package/src/components/listItems/NotificationListItem.tsx +0 -514
  149. package/src/components/misc/AvatarView.tsx +0 -33
  150. package/src/components/misc/CardWatermark.tsx +0 -52
  151. package/src/components/misc/ConnectionAlert.tsx +0 -123
  152. package/src/components/misc/ConnectionImage.tsx +0 -45
  153. package/src/components/misc/ContentGradient.tsx +0 -40
  154. package/src/components/misc/CredentialCard.tsx +0 -161
  155. package/src/components/misc/CredentialCard10.tsx +0 -329
  156. package/src/components/misc/CredentialCard11.tsx +0 -701
  157. package/src/components/misc/CredentialCard11ActionFooter.tsx +0 -55
  158. package/src/components/misc/CredentialCard11Issuer.tsx +0 -74
  159. package/src/components/misc/CredentialCard11Logo.tsx +0 -61
  160. package/src/components/misc/EmptyList.tsx +0 -27
  161. package/src/components/misc/EmptyListContacts.tsx +0 -55
  162. package/src/components/misc/ErrorBoundary.tsx +0 -200
  163. package/src/components/misc/FauxHeader.tsx +0 -75
  164. package/src/components/misc/InfoBox.tsx +0 -283
  165. package/src/components/misc/NoNewUpdates.tsx +0 -38
  166. package/src/components/misc/PINHeader.tsx +0 -25
  167. package/src/components/misc/PINValidationHelper.tsx +0 -48
  168. package/src/components/misc/Pagination.tsx +0 -114
  169. package/src/components/misc/QRRenderer.tsx +0 -53
  170. package/src/components/misc/QRScanner.tsx +0 -395
  171. package/src/components/misc/QRScannerTorch.tsx +0 -74
  172. package/src/components/misc/ScanCamera.tsx +0 -86
  173. package/src/components/misc/ScanTab.tsx +0 -45
  174. package/src/components/misc/SharedProofData.tsx +0 -98
  175. package/src/components/misc/UnorderedList.tsx +0 -28
  176. package/src/components/misc/VerifierCredentialCard.tsx +0 -378
  177. package/src/components/misc/index.ts +0 -2
  178. package/src/components/modals/AlertModal.tsx +0 -42
  179. package/src/components/modals/AppGuideModal.tsx +0 -142
  180. package/src/components/modals/CameraDisclosureModal.tsx +0 -126
  181. package/src/components/modals/CommonRemoveModal.tsx +0 -337
  182. package/src/components/modals/DeveloperModal.tsx +0 -32
  183. package/src/components/modals/DismissiblePopupModal.tsx +0 -169
  184. package/src/components/modals/ErrorModal.tsx +0 -107
  185. package/src/components/modals/ImageModal.tsx +0 -80
  186. package/src/components/modals/NetInfoModal.tsx +0 -35
  187. package/src/components/modals/PopupModal.tsx +0 -56
  188. package/src/components/modals/ProofCancelModal.tsx +0 -79
  189. package/src/components/modals/SafeAreaModal.tsx +0 -17
  190. package/src/components/record/Record.tsx +0 -100
  191. package/src/components/record/RecordBinaryField.tsx +0 -55
  192. package/src/components/record/RecordDateIntField.tsx +0 -63
  193. package/src/components/record/RecordField.tsx +0 -154
  194. package/src/components/record/RecordFooter.tsx +0 -17
  195. package/src/components/record/RecordHeader.tsx +0 -17
  196. package/src/components/record/RecordRemove.tsx +0 -66
  197. package/src/components/texts/HeaderTitle.tsx +0 -25
  198. package/src/components/texts/HighlightTextBox.tsx +0 -41
  199. package/src/components/texts/InfoTextBox.tsx +0 -129
  200. package/src/components/texts/Link.tsx +0 -41
  201. package/src/components/texts/Text.tsx +0 -21
  202. package/src/components/texts/ThemedText.tsx +0 -24
  203. package/src/components/toast/BaseToast.tsx +0 -128
  204. package/src/components/toast/ToastConfig.tsx +0 -21
  205. package/src/components/tour/AttachTourStep.tsx +0 -73
  206. package/src/components/tour/CredentialOfferTourSteps.tsx +0 -41
  207. package/src/components/tour/CredentialsTourSteps.tsx +0 -41
  208. package/src/components/tour/HomeTourSteps.tsx +0 -104
  209. package/src/components/tour/ProofRequestTourSteps.tsx +0 -41
  210. package/src/components/tour/SpotCutout.tsx +0 -65
  211. package/src/components/tour/TourBox.tsx +0 -255
  212. package/src/components/tour/TourOverlay.tsx +0 -134
  213. package/src/components/views/Banner.tsx +0 -181
  214. package/src/components/views/CredentialCardLogo.tsx +0 -77
  215. package/src/components/views/CredentialDetailPrimaryHeader.tsx +0 -107
  216. package/src/components/views/CredentialDetailSecondaryHeader.tsx +0 -60
  217. package/src/components/views/HeaderWithBanner.tsx +0 -17
  218. package/src/components/views/HomeFooterView.tsx +0 -110
  219. package/src/components/views/HomeHeaderView.tsx +0 -12
  220. package/src/components/views/KeyboardView.tsx +0 -41
  221. package/src/components/views/LoadingPlaceholder.tsx +0 -168
  222. package/src/components/views/LoadingView.tsx +0 -29
  223. package/src/components/views/ProgressBar.tsx +0 -53
  224. package/src/components/views/PushNotificationsContent.tsx +0 -51
  225. package/src/components/views/PushNotificationsDisabledContent.tsx +0 -47
  226. package/src/configs/ledgers/indy/index.ts +0 -8
  227. package/src/configs/ledgers/indy/ledgers.json +0 -51
  228. package/src/constants.ts +0 -107
  229. package/src/container-api.ts +0 -247
  230. package/src/container-impl.ts +0 -243
  231. package/src/contexts/activity.tsx +0 -145
  232. package/src/contexts/animated-components.ts +0 -9
  233. package/src/contexts/auth.tsx +0 -240
  234. package/src/contexts/index.ts +0 -3
  235. package/src/contexts/navigation.tsx +0 -19
  236. package/src/contexts/network.tsx +0 -125
  237. package/src/contexts/reducers/index.ts +0 -3
  238. package/src/contexts/reducers/store.ts +0 -754
  239. package/src/contexts/store.tsx +0 -103
  240. package/src/contexts/theme.tsx +0 -51
  241. package/src/contexts/tour/tour-context.tsx +0 -160
  242. package/src/contexts/tour/tour-provider.tsx +0 -160
  243. package/src/hooks/bundle-resolver.ts +0 -95
  244. package/src/hooks/chat-messages.tsx +0 -263
  245. package/src/hooks/connections.ts +0 -37
  246. package/src/hooks/credential-card-styles.ts +0 -144
  247. package/src/hooks/credentials.ts +0 -11
  248. package/src/hooks/deep-links.ts +0 -49
  249. package/src/hooks/developer-mode.ts +0 -25
  250. package/src/hooks/lockout.ts +0 -77
  251. package/src/hooks/notifications.ts +0 -108
  252. package/src/hooks/oob.ts +0 -17
  253. package/src/hooks/proof-request-templates.ts +0 -40
  254. package/src/hooks/proofs.ts +0 -32
  255. package/src/hooks/screen-capture.ts +0 -52
  256. package/src/hooks/useBifoldAgentSetup.ts +0 -169
  257. package/src/hooks/useOnboardingState.ts +0 -53
  258. package/src/hooks/usePINValidation.ts +0 -98
  259. package/src/index.ts +0 -239
  260. package/src/layout/ScreenLayout.tsx +0 -53
  261. package/src/localization/en/en.json +0 -951
  262. package/src/localization/en/index.ts +0 -3
  263. package/src/localization/fr/fr.json +0 -933
  264. package/src/localization/fr/index.ts +0 -3
  265. package/src/localization/index.ts +0 -66
  266. package/src/localization/pt-br/index.ts +0 -3
  267. package/src/localization/pt-br/pt-br.json +0 -911
  268. package/src/modules/history/context/historyManager.tsx +0 -247
  269. package/src/modules/history/index.ts +0 -2
  270. package/src/modules/history/navigation/HistoryStack.tsx +0 -29
  271. package/src/modules/history/services/queue.service.tsx +0 -31
  272. package/src/modules/history/types/index.ts +0 -92
  273. package/src/modules/history/ui/HistoryPage.tsx +0 -133
  274. package/src/modules/history/ui/HistorySettings.tsx +0 -183
  275. package/src/modules/history/ui/assets/img/HistoryCardAcceptedIcon.svg +0 -4
  276. package/src/modules/history/ui/assets/img/HistoryCardExpiredIcon.svg +0 -4
  277. package/src/modules/history/ui/assets/img/HistoryCardRevokedIcon.svg +0 -4
  278. package/src/modules/history/ui/assets/img/HistoryInformationSentIcon.svg +0 -4
  279. package/src/modules/history/ui/assets/img/HistoryPinUpdatedIcon.svg +0 -4
  280. package/src/modules/history/ui/assets/img/IconChevronRight.svg +0 -3
  281. package/src/modules/history/ui/components/BulletPoint.tsx +0 -49
  282. package/src/modules/history/ui/components/HistoryListItem.tsx +0 -251
  283. package/src/modules/history/ui/components/HistoryMenu.tsx +0 -25
  284. package/src/modules/history/ui/components/SingleSelectBlock.tsx +0 -72
  285. package/src/modules/openid/components/CredentialRowCard.tsx +0 -64
  286. package/src/modules/openid/components/OpenIDCredentialCard.tsx +0 -276
  287. package/src/modules/openid/context/OpenIDCredentialRecordProvider.tsx +0 -296
  288. package/src/modules/openid/display.tsx +0 -467
  289. package/src/modules/openid/displayProof.tsx +0 -86
  290. package/src/modules/openid/hooks/openid.tsx +0 -111
  291. package/src/modules/openid/metadata.tsx +0 -59
  292. package/src/modules/openid/offerResolve.tsx +0 -281
  293. package/src/modules/openid/resolverProof.tsx +0 -286
  294. package/src/modules/openid/screens/OpenIDCredentialDetails.tsx +0 -214
  295. package/src/modules/openid/screens/OpenIDCredentialOffer.tsx +0 -192
  296. package/src/modules/openid/screens/OpenIDProofChangeCredential.tsx +0 -133
  297. package/src/modules/openid/screens/OpenIDProofPresentation.tsx +0 -423
  298. package/src/modules/openid/types.tsx +0 -111
  299. package/src/modules/openid/utils/utils.tsx +0 -119
  300. package/src/navigators/ConnectStack.tsx +0 -68
  301. package/src/navigators/ContactStack.tsx +0 -91
  302. package/src/navigators/CredentialStack.tsx +0 -48
  303. package/src/navigators/DeliveryStack.tsx +0 -76
  304. package/src/navigators/HomeStack.tsx +0 -37
  305. package/src/navigators/MainStack.tsx +0 -146
  306. package/src/navigators/NotificationStack.tsx +0 -56
  307. package/src/navigators/OnboardingScreens.ts +0 -142
  308. package/src/navigators/OnboardingStack.tsx +0 -205
  309. package/src/navigators/ProofRequestStack.tsx +0 -113
  310. package/src/navigators/RootStack.tsx +0 -71
  311. package/src/navigators/SettingStack.tsx +0 -174
  312. package/src/navigators/TabStack.tsx +0 -304
  313. package/src/navigators/defaultLayoutOptions.tsx +0 -17
  314. package/src/navigators/defaultStackOptions.tsx +0 -102
  315. package/src/navigators/index.ts +0 -27
  316. package/src/onboarding.ts +0 -90
  317. package/src/screens/AttemptLockout.tsx +0 -153
  318. package/src/screens/AutoLock.tsx +0 -140
  319. package/src/screens/Biometry.tsx +0 -54
  320. package/src/screens/Chat.tsx +0 -141
  321. package/src/screens/ConfigureMediator.tsx +0 -160
  322. package/src/screens/Connection.tsx +0 -394
  323. package/src/screens/ContactDetails.tsx +0 -350
  324. package/src/screens/CredentialDetails.tsx +0 -473
  325. package/src/screens/CredentialOffer.tsx +0 -334
  326. package/src/screens/CredentialOfferAccept.tsx +0 -189
  327. package/src/screens/DataRetention.tsx +0 -91
  328. package/src/screens/Developer.tsx +0 -289
  329. package/src/screens/Home.tsx +0 -173
  330. package/src/screens/JSONDetails.tsx +0 -102
  331. package/src/screens/Language.tsx +0 -97
  332. package/src/screens/ListContacts.tsx +0 -112
  333. package/src/screens/ListCredentials.tsx +0 -135
  334. package/src/screens/ListProofRequests.tsx +0 -148
  335. package/src/screens/MobileVerifierLoading.tsx +0 -106
  336. package/src/screens/NameWallet.tsx +0 -9
  337. package/src/screens/Onboarding.tsx +0 -162
  338. package/src/screens/OnboardingPages.tsx +0 -160
  339. package/src/screens/PINChange.tsx +0 -249
  340. package/src/screens/PINCreate.tsx +0 -185
  341. package/src/screens/PINEnter.tsx +0 -432
  342. package/src/screens/PINExplainer.tsx +0 -85
  343. package/src/screens/PINVerify.tsx +0 -195
  344. package/src/screens/PasteUrl.tsx +0 -140
  345. package/src/screens/Preface.tsx +0 -78
  346. package/src/screens/ProofChangeCredential.tsx +0 -179
  347. package/src/screens/ProofDetails.tsx +0 -348
  348. package/src/screens/ProofRequest.tsx +0 -999
  349. package/src/screens/ProofRequestAccept.tsx +0 -133
  350. package/src/screens/ProofRequestDetails.tsx +0 -270
  351. package/src/screens/ProofRequestUsageHistory.tsx +0 -152
  352. package/src/screens/ProofRequesting.tsx +0 -245
  353. package/src/screens/PushNotifications.tsx +0 -59
  354. package/src/screens/RenameContact.tsx +0 -155
  355. package/src/screens/RenameWallet.tsx +0 -26
  356. package/src/screens/Scan.tsx +0 -145
  357. package/src/screens/ScanHelp.tsx +0 -48
  358. package/src/screens/Settings.tsx +0 -415
  359. package/src/screens/Splash.tsx +0 -80
  360. package/src/screens/Terms.tsx +0 -127
  361. package/src/screens/ToggleBiometry.tsx +0 -153
  362. package/src/screens/TogglePushNotifications.tsx +0 -118
  363. package/src/screens/Tours.tsx +0 -93
  364. package/src/screens/UpdateAvailable.tsx +0 -119
  365. package/src/screens/WhatAreContacts.tsx +0 -71
  366. package/src/services/bifoldLogger.ts +0 -3
  367. package/src/services/keychain.ts +0 -184
  368. package/src/services/logger.ts +0 -89
  369. package/src/services/storage.ts +0 -136
  370. package/src/theme-builder.ts +0 -157
  371. package/src/theme.interface.ts +0 -580
  372. package/src/theme.ts +0 -1346
  373. package/src/types/attempt-lockout-config.ts +0 -8
  374. package/src/types/attestation.ts +0 -17
  375. package/src/types/chat.ts +0 -4
  376. package/src/types/config.ts +0 -64
  377. package/src/types/contact-details.ts +0 -5
  378. package/src/types/credential-list-footer.ts +0 -3
  379. package/src/types/credential-status.ts +0 -3
  380. package/src/types/credentials.ts +0 -7
  381. package/src/types/decline.ts +0 -5
  382. package/src/types/error.ts +0 -40
  383. package/src/types/fn.ts +0 -2
  384. package/src/types/genesis.ts +0 -35
  385. package/src/types/index.ts +0 -2
  386. package/src/types/metadata.ts +0 -16
  387. package/src/types/navigators.ts +0 -239
  388. package/src/types/notification.ts +0 -24
  389. package/src/types/permissions.ts +0 -2
  390. package/src/types/proof-items.ts +0 -32
  391. package/src/types/react-i18next.d.ts +0 -10
  392. package/src/types/remove.ts +0 -8
  393. package/src/types/security.ts +0 -32
  394. package/src/types/settings.ts +0 -28
  395. package/src/types/state.ts +0 -97
  396. package/src/types/tour.ts +0 -20
  397. package/src/types/version-check.ts +0 -18
  398. package/src/utils/PINValidation.ts +0 -98
  399. package/src/utils/agent.ts +0 -128
  400. package/src/utils/anonCredsProofRequestMapper.ts +0 -205
  401. package/src/utils/contacts.ts +0 -59
  402. package/src/utils/cred-def.ts +0 -33
  403. package/src/utils/credential.ts +0 -37
  404. package/src/utils/crypto.ts +0 -12
  405. package/src/utils/fileCache.ts +0 -152
  406. package/src/utils/helpers.ts +0 -1292
  407. package/src/utils/ledger.ts +0 -212
  408. package/src/utils/luminance.ts +0 -40
  409. package/src/utils/mediatorhelpers.ts +0 -71
  410. package/src/utils/migration.ts +0 -40
  411. package/src/utils/network.tsx +0 -55
  412. package/src/utils/oca.ts +0 -173
  413. package/src/utils/parsers.tsx +0 -111
  414. package/src/utils/proofBundle.ts +0 -220
  415. package/src/utils/schema.ts +0 -28
  416. package/src/utils/testable.ts +0 -17
@@ -1,183 +0,0 @@
1
- import { useAgent } from '@credo-ts/react-hooks'
2
- import { StackScreenProps } from '@react-navigation/stack'
3
- import React, { useCallback, useEffect, useState } from 'react'
4
- import { useTranslation } from 'react-i18next'
5
- import { StyleSheet, View } from 'react-native'
6
-
7
- // eslint-disable-next-line import/no-named-as-default
8
- import { ButtonType } from '../../../components/buttons/Button-api'
9
- import KeyboardView from '../../../components/views/KeyboardView'
10
- import { TOKENS, useServices } from '../../../container-api'
11
- import { useAnimatedComponents } from '../../../contexts/animated-components'
12
- import { useTheme } from '../../../contexts/theme'
13
- import { Screens, SettingStackParams } from '../../../types/navigators'
14
- import { testIdWithKey } from '../../../utils/testable'
15
- import { HistoryBlockSelection, IHistoryManager } from '../types'
16
-
17
- import SingleSelectBlock from './components/SingleSelectBlock'
18
- import { ThemedText } from '../../../components/texts/ThemedText'
19
-
20
- interface HistorySettingsProps extends StackScreenProps<SettingStackParams, Screens.HistorySettings> {}
21
-
22
- const HistorySettings: React.FC<HistorySettingsProps> = () => {
23
- const [continueEnabled] = useState(true)
24
- const [isLoading] = useState(false)
25
- const { t } = useTranslation()
26
-
27
- const { ColorPalette } = useTheme()
28
- const { ButtonLoading } = useAnimatedComponents()
29
- const actionButtonLabel = t('Global.SaveSettings')
30
- const actionButtonTestId = testIdWithKey('Save')
31
- const [Button, logger, loadHistory] = useServices([TOKENS.COMP_BUTTON, TOKENS.UTIL_LOGGER, TOKENS.FN_LOAD_HISTORY])
32
- const { agent } = useAgent()
33
- const historyManager: IHistoryManager | undefined = agent ? loadHistory(agent) : undefined
34
-
35
- //State
36
- const [initialHistory, setInitialHistory] = useState<HistoryBlockSelection | undefined>() // Initial history settings option
37
- const [historyOptionSelected, setHistoryOptionSelected] = useState<HistoryBlockSelection | undefined>(initialHistory) // Selected history settings option
38
-
39
- const style = StyleSheet.create({
40
- screenContainer: {
41
- height: '100%',
42
- backgroundColor: ColorPalette.brand.primaryBackground,
43
- padding: 20,
44
- justifyContent: 'space-between',
45
- },
46
- title: {
47
- marginTop: 16,
48
- },
49
- deleteButtonText: {
50
- alignSelf: 'flex-start',
51
- color: '#CD0000', //TODO: Use Bifold alert color
52
- },
53
- deleteButton: {
54
- marginBottom: 16,
55
- },
56
- gap: {
57
- marginTop: 10,
58
- marginBottom: 10,
59
- },
60
-
61
- // below used as helpful labels for views, no properties needed atp
62
- contentContainer: {},
63
- controlsContainer: {},
64
- })
65
-
66
- const onSelectHistory = (newHistoryOption: HistoryBlockSelection) => {
67
- // console.log('on select history:', JSON.stringify(newHistoryOption))
68
- //TODO: Impliment warning of old history clearing on the below condition
69
- // if (newHistoryOption && newHistoryOption.key) {
70
- // if ((initialHistory?.key as number) > newHistoryOption.key) {
71
- // setShowWarningDisclaimer(true)
72
- // } else {
73
- // setShowWarningDisclaimer(false)
74
- // }
75
- // }
76
- setHistoryOptionSelected(newHistoryOption)
77
- //TODO: Impliment success alert
78
- // setIsSuccess(false)
79
- }
80
-
81
- const handleSaveHistorySettings = useCallback(async () => {
82
- if (!historyManager) {
83
- logger.error(`[${HistorySettings.name}]: historyManager undefined!`)
84
- return
85
- }
86
- try {
87
- if (!historyOptionSelected && initialHistory) {
88
- await historyManager.handleStoreHistorySettings(initialHistory)
89
- } else {
90
- await historyManager.handleStoreHistorySettings(historyOptionSelected)
91
- }
92
- //TODO: Impliment Alert
93
- // setShowWarningDisclaimer(false)
94
- // setIsSuccess(true)
95
- // scrollViewRef.current?.scrollTo({
96
- // y: 0,
97
- // animated: true,
98
- // })
99
- // console.log('History option saved')
100
- } catch (e: unknown) {
101
- //TODO: Impliment Alert
102
- // console.log('Error:', e)
103
- // log(`[${SettingsActivityHistory.name}]: Handle history save: ${e}`, LogLevel.error)
104
- // Toast.show({
105
- // type: 'error',
106
- // text1: (e as Error)?.message || t('Global.Failure'),
107
- // })
108
- }
109
- }, [historyManager, logger, historyOptionSelected, initialHistory])
110
-
111
- /**
112
- * Find current set history
113
- */
114
- useEffect(() => {
115
- const getSavedHistorySettingsOption = async () => {
116
- if (!historyManager) {
117
- logger.error(`[${HistorySettings.name}]:[getSavedHistorySettingsOption] historyManager undefined!`)
118
- return
119
- }
120
- const storedHistorySettingsOption = await historyManager.getStoredHistorySettingsOption()
121
- if (storedHistorySettingsOption === 'Never') {
122
- //TODO: Impliment "Never" option
123
- // setIsActivityHistoryDisabled(true)
124
- } else {
125
- setInitialHistory(
126
- storedHistorySettingsOption
127
- ? historyManager.getHistorySettingsOptionList().find((l) => l.id === storedHistorySettingsOption)
128
- : undefined
129
- )
130
- }
131
- }
132
-
133
- getSavedHistorySettingsOption().catch((e) => {
134
- logger.error(`[${HistorySettings.name}]:[getSavedHistorySettingsOption] Error: ${e}`)
135
- })
136
- }, [historyManager, logger])
137
-
138
- return (
139
- <KeyboardView>
140
- <View style={style.screenContainer}>
141
- <View style={style.contentContainer}>
142
- <View>
143
- <ThemedText variant="headerTitle" style={style.title}>
144
- {t('ActivityHistory.Title')}
145
- </ThemedText>
146
- <ThemedText style={style.title}>{t('ActivityHistory.Description')}</ThemedText>
147
- <View style={style.gap} />
148
- <SingleSelectBlock
149
- initialSelect={initialHistory}
150
- selection={historyManager?.getHistorySettingsOptionList()}
151
- onSelect={onSelectHistory}
152
- />
153
- </View>
154
- </View>
155
- <View style={style.controlsContainer}>
156
- <Button
157
- title={actionButtonLabel}
158
- testID={actionButtonTestId}
159
- accessibilityLabel={actionButtonLabel}
160
- buttonType={ButtonType.Primary}
161
- onPress={handleSaveHistorySettings}
162
- >
163
- {!continueEnabled && isLoading ? <ButtonLoading /> : null}
164
- </Button>
165
- <View style={{ marginBottom: 10 }} />
166
- <Button
167
- title={t('ActivityHistory.StopKeepingHistory')}
168
- testID={actionButtonTestId}
169
- accessibilityLabel={actionButtonLabel}
170
- buttonType={ButtonType.Secondary}
171
- onPress={async () => {
172
- // console.log('save history')
173
- }}
174
- >
175
- {!continueEnabled && isLoading ? <ButtonLoading /> : null}
176
- </Button>
177
- </View>
178
- </View>
179
- </KeyboardView>
180
- )
181
- }
182
-
183
- export default HistorySettings
@@ -1,4 +0,0 @@
1
- <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="49.5157" height="50" rx="5" fill="#917952"/>
3
- <path d="M26.2578 29.6H29.2578V23H35.8578V20H29.2578V13.4H26.2578V20H19.6578V23H26.2578V29.6ZM13.7578 38.5C12.9578 38.5 12.2578 38.2 11.6578 37.6C11.0578 37 10.7578 36.3 10.7578 35.5V7.5C10.7578 6.7 11.0578 6 11.6578 5.4C12.2578 4.8 12.9578 4.5 13.7578 4.5H41.7578C42.5578 4.5 43.2578 4.8 43.8578 5.4C44.4578 6 44.7578 6.7 44.7578 7.5V35.5C44.7578 36.3 44.4578 37 43.8578 37.6C43.2578 38.2 42.5578 38.5 41.7578 38.5H13.7578ZM13.7578 35.5H41.7578V7.5H13.7578V35.5ZM7.75781 44.5C6.95781 44.5 6.25781 44.2 5.65781 43.6C5.05781 43 4.75781 42.3 4.75781 41.5V10.5H7.75781V41.5H38.7578V44.5H7.75781ZM13.7578 7.5V35.5V7.5Z" fill="black"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="49.5157" height="50" rx="5" fill="#917952"/>
3
- <path d="M19.8078 37.6L17.6578 35.45L22.6578 30.5L17.6578 25.55L19.8078 23.4L24.7578 28.4L29.7078 23.4L31.8578 25.55L26.8578 30.5L31.8578 35.45L29.7078 37.6L24.7578 32.6L19.8078 37.6ZM9.75781 44.5C8.95781 44.5 8.25781 44.2 7.65781 43.6C7.05781 43 6.75781 42.3 6.75781 41.5V10.5C6.75781 9.7 7.05781 9 7.65781 8.4C8.25781 7.8 8.95781 7.5 9.75781 7.5H13.0078V4.5H16.2578V7.5H33.2578V4.5H36.5078V7.5H39.7578C40.5578 7.5 41.2578 7.8 41.8578 8.4C42.4578 9 42.7578 9.7 42.7578 10.5V41.5C42.7578 42.3 42.4578 43 41.8578 43.6C41.2578 44.2 40.5578 44.5 39.7578 44.5H9.75781ZM9.75781 41.5H39.7578V20H9.75781V41.5ZM9.75781 17H39.7578V10.5H9.75781V17ZM9.75781 17V10.5V17Z" fill="black"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect y="-0.000244141" width="49.5157" height="50" rx="5" fill="#917952"/>
3
- <path d="M10.7578 25.9998V22.9998H38.7578V25.9998H10.7578Z" fill="black"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect y="-0.00012207" width="49.5157" height="50" rx="5" fill="#917952"/>
3
- <path d="M23.3078 32.0999H26.2578V22.3999L30.2078 26.4499L32.3578 24.2999L24.7078 16.6999L17.1078 24.2999L19.2578 26.4499L23.3078 22.3999V32.0999ZM7.75781 40.4999C6.95781 40.4999 6.25781 40.1999 5.65781 39.5999C5.05781 38.9999 4.75781 38.2999 4.75781 37.4999V11.4999C4.75781 10.6999 5.05781 9.99988 5.65781 9.39988C6.25781 8.79988 6.95781 8.49988 7.75781 8.49988H41.7578C42.5578 8.49988 43.2578 8.79988 43.8578 9.39988C44.4578 9.99988 44.7578 10.6999 44.7578 11.4999V37.4999C44.7578 38.2999 44.4578 38.9999 43.8578 39.5999C43.2578 40.1999 42.5578 40.4999 41.7578 40.4999H7.75781ZM7.75781 37.4999H41.7578V11.4999H7.75781V37.4999ZM7.75781 37.4999V11.4999V37.4999Z" fill="black"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="49.5157" height="50" rx="5" fill="#917952"/>
3
- <path d="M4.75781 38.5V35.45H44.7578V38.5H4.75781ZM6.65781 25.8L4.65781 24.7L6.65781 21.3H2.75781V19.05H6.65781L4.65781 15.65L6.65781 14.55L8.55781 17.9L10.4578 14.55L12.4578 15.65L10.4578 19.05H14.3578V21.3H10.4578L12.4578 24.7L10.4578 25.8L8.55781 22.45L6.65781 25.8ZM22.8578 25.8L20.8578 24.6L22.8578 21.2H18.9578V18.95H22.8578L20.8578 15.55L22.8578 14.45L24.7578 17.8L26.6578 14.45L28.6578 15.55L26.6578 18.95H30.5578V21.2H26.6578L28.6578 24.6L26.6578 25.8L24.7578 22.45L22.8578 25.8ZM39.0578 25.8L37.0578 24.6L39.0578 21.2H35.1578V18.95H39.0578L37.0578 15.55L39.0578 14.45L40.9578 17.8L42.8578 14.45L44.8578 15.55L42.8578 18.95H46.7578V21.2H42.8578L44.8578 24.6L42.8578 25.8L40.9578 22.45L39.0578 25.8Z" fill="black"/>
4
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M10.9784 6.23413L9.56836 7.64413L14.1484 12.2341L9.56836 16.8241L10.9784 18.2341L16.9784 12.2341L10.9784 6.23413Z" fill="#666666"/>
3
- </svg>
@@ -1,49 +0,0 @@
1
- import React from 'react'
2
- import { useTranslation, Trans } from 'react-i18next'
3
- import { StyleSheet, View } from 'react-native'
4
-
5
- import { ThemedText } from '../../../../components/texts/ThemedText'
6
-
7
- interface Props {
8
- pointsText?: string
9
- pointsTextAxsLabel?: string
10
- pointsTextAxsKey?: any
11
- }
12
-
13
- const styles = StyleSheet.create({
14
- pointsView: {
15
- flexDirection: 'row',
16
- },
17
- pointsBullet: {
18
- paddingLeft: 8,
19
- },
20
- pointsText: {
21
- flex: 1,
22
- paddingLeft: 8,
23
- },
24
- })
25
-
26
- const BulletPoint: React.FC<Props> = ({ pointsText, pointsTextAxsLabel, pointsTextAxsKey }) => {
27
- const { t } = useTranslation()
28
-
29
- return (
30
- <View style={styles.pointsView} accessible={true}>
31
- <ThemedText style={styles.pointsBullet}>{'\u2022'}</ThemedText>
32
- {pointsTextAxsLabel ? (
33
- <ThemedText style={styles.pointsText} accessibilityLabel={pointsTextAxsLabel}>
34
- <Trans
35
- i18nKey={pointsTextAxsKey}
36
- components={{
37
- b: <ThemedText variant="bold" />,
38
- }}
39
- t={t}
40
- />
41
- </ThemedText>
42
- ) : (
43
- <ThemedText style={styles.pointsText}>{pointsText}</ThemedText>
44
- )}
45
- </View>
46
- )
47
- }
48
-
49
- export default BulletPoint
@@ -1,251 +0,0 @@
1
- import React from 'react'
2
- import { useTranslation } from 'react-i18next'
3
- import { StyleSheet, TouchableOpacity, View } from 'react-native'
4
-
5
- import { useTheme } from '../../../../contexts/theme'
6
- import { CustomRecord, HistoryCardType } from '../../types'
7
- import { ThemedText } from '../../../../components/texts/ThemedText'
8
-
9
- interface Props {
10
- item: CustomRecord
11
- }
12
-
13
- const styles = StyleSheet.create({
14
- card: {
15
- padding: 16,
16
- flexDirection: 'row',
17
- },
18
- cardContent: {
19
- flexDirection: 'column',
20
- marginHorizontal: 12,
21
- maxWidth: 200,
22
- },
23
- cardDescriptionContent: {
24
- marginTop: 5,
25
- marginBottom: 10,
26
- },
27
- cardDate: {
28
- color: '#666666',
29
- },
30
- arrowContainer: {
31
- flex: 1,
32
- justifyContent: 'center',
33
- alignItems: 'flex-end',
34
- },
35
- cardBottomBorder: {
36
- borderBottomWidth: 0.5,
37
- borderBottomColor: '#A0A4AB',
38
- },
39
- historyCardRevoked: {
40
- color: '#D81A21',
41
- },
42
- successColor: {
43
- color: '#118847',
44
- },
45
- infoBox: {
46
- color: '#1080A6',
47
- },
48
- })
49
-
50
- const HistoryListItem: React.FC<Props> = ({ item }) => {
51
- const { t } = useTranslation()
52
- const { Assets, ColorPalette } = useTheme()
53
- //TODO: navigate to history details
54
- // const navigation = useNavigation<StackNavigationProp<RootStackParams, 'HistoryDetails'>>()
55
-
56
- const renderCardSections = (item: CustomRecord) => {
57
- switch (item.content.type) {
58
- case HistoryCardType.CardAccepted: {
59
- return {
60
- icon: <Assets.svg.historyCardAcceptedIcon />,
61
- title: <ThemedText variant="headingThree">{t('History.CardTitle.CardAccepted')}</ThemedText>,
62
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
63
- }
64
- }
65
- case HistoryCardType.CardDeclined: {
66
- return {
67
- icon: <Assets.svg.historyCardDeclinedIcon />,
68
- title: (
69
- <ThemedText variant="headerTitle" style={{ color: styles.historyCardRevoked.color }}>
70
- {t('History.CardTitle.CardDeclined')}
71
- </ThemedText>
72
- ),
73
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
74
- }
75
- }
76
- case HistoryCardType.CardExpired: {
77
- return {
78
- icon: <Assets.svg.historyCardExpiredIcon />,
79
- title: <ThemedText variant="headerTitle">{t('History.CardTitle.CardExpired')}</ThemedText>,
80
- description: (
81
- <ThemedText>
82
- {t('History.CardDescription.CardExpired', { cardName: item.content.correspondenceName })}
83
- </ThemedText>
84
- ),
85
- }
86
- }
87
- case HistoryCardType.CardRemoved: {
88
- return {
89
- icon: <Assets.svg.historyCardRemovedIcon />,
90
- title: (
91
- <ThemedText variant="headerTitle" style={{ color: styles.historyCardRevoked.color }}>
92
- {t('History.CardTitle.CardRemoved')}
93
- </ThemedText>
94
- ),
95
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
96
- }
97
- }
98
- case HistoryCardType.CardRevoked: {
99
- return {
100
- icon: <Assets.svg.historyCardRevokedIcon />,
101
- title: (
102
- <ThemedText variant="headerTitle" style={{ color: styles.historyCardRevoked.color }}>
103
- {t('History.CardTitle.CardRevoked')}
104
- </ThemedText>
105
- ),
106
- description: (
107
- <ThemedText>
108
- {t('History.CardDescription.CardRevoked', { cardName: item.content.correspondenceName })}
109
- </ThemedText>
110
- ),
111
- }
112
- }
113
- case HistoryCardType.CardUpdates: {
114
- return {
115
- icon: <Assets.svg.historyCardUpdatesIcon />,
116
- title: <ThemedText variant="headingThree">{t('History.CardTitle.CardUpdates')}</ThemedText>,
117
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
118
- }
119
- }
120
- case HistoryCardType.PinChanged: {
121
- return {
122
- icon: <Assets.svg.historyPinUpdatedIcon />,
123
- title: (
124
- <ThemedText variant="headerTitle" style={{ color: styles.infoBox.color }}>
125
- {t('History.CardTitle.WalletPinUpdated')}
126
- </ThemedText>
127
- ),
128
- description: <ThemedText>{t('History.CardDescription.WalletPinUpdated')}</ThemedText>,
129
- }
130
- }
131
- case HistoryCardType.InformationSent: {
132
- return {
133
- icon: <Assets.svg.historyInformationSentIcon />,
134
- title: (
135
- <ThemedText variant="headingThree" style={{ color: styles.successColor.color }}>
136
- {t('History.CardTitle.InformationSent')}
137
- </ThemedText>
138
- ),
139
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
140
- }
141
- }
142
- case HistoryCardType.InformationNotSent: {
143
- return {
144
- icon: <Assets.svg.historyInformationNotSentIcon />,
145
- title: (
146
- <ThemedText variant="headerTitle" style={{ color: styles.historyCardRevoked.color }}>
147
- {t('History.CardTitle.InformationNotSent')}
148
- </ThemedText>
149
- ),
150
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
151
- }
152
- }
153
- case HistoryCardType.Connection: {
154
- return {
155
- icon: <Assets.svg.historyConnectionIcon />,
156
- title: <ThemedText variant="headingThree">{t('History.CardTitle.Connection')}</ThemedText>,
157
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
158
- }
159
- }
160
- case HistoryCardType.ConnectionRemoved: {
161
- return {
162
- icon: <Assets.svg.historyConnectionRemovedIcon />,
163
- title: (
164
- <ThemedText variant="headingThree" style={{ color: styles.historyCardRevoked.color }}>
165
- {t('History.CardTitle.ConnectionRemoved')}
166
- </ThemedText>
167
- ),
168
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
169
- }
170
- }
171
- case HistoryCardType.ActivateBiometry: {
172
- return {
173
- icon: <Assets.svg.historyActivateBiometryIcon />,
174
- title: <ThemedText variant="headingThree">{t('History.CardTitle.ActivateBiometry')}</ThemedText>,
175
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
176
- }
177
- }
178
- case HistoryCardType.DeactivateBiometry: {
179
- return {
180
- icon: <Assets.svg.historyDeactivateBiometryIcon />,
181
- title: (
182
- <ThemedText variant="headingThree" style={{ color: styles.historyCardRevoked.color }}>
183
- {t('History.CardTitle.DeactivateBiometry')}
184
- </ThemedText>
185
- ),
186
- description: <ThemedText>{item.content.correspondenceName}</ThemedText>,
187
- }
188
- }
189
- default:
190
- return {
191
- icon: null,
192
- title: null,
193
- description: null,
194
- }
195
- }
196
- }
197
-
198
- //TODO: move to helpers
199
- function isToday(date: Date): boolean {
200
- const today = new Date()
201
- return (
202
- date.getDate() === today.getDate() &&
203
- date.getMonth() === today.getMonth() &&
204
- date.getFullYear() === today.getFullYear()
205
- )
206
- }
207
-
208
- const renderCardDate = (date?: Date) => {
209
- if (!date) return null
210
-
211
- const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'short', day: 'numeric' }
212
- const isDateToday = isToday(date)
213
- return (
214
- <ThemedText style={styles.cardDate}>
215
- {isDateToday ? t('History.Today') : date.toLocaleDateString('en-US', options)}
216
- </ThemedText>
217
- )
218
- }
219
-
220
- const renderCard = (item: CustomRecord) => {
221
- const { icon, title, description } = renderCardSections(item)
222
- return (
223
- <View>
224
- <View style={styles.card}>
225
- {icon}
226
- <View style={styles.cardContent}>
227
- {title}
228
- <View style={styles.cardDescriptionContent}>{description}</View>
229
- {renderCardDate(item.content.createdAt)}
230
- </View>
231
- <View style={styles.arrowContainer}>
232
- <Assets.svg.iconChevronRight color={ColorPalette.brand.primary} />
233
- </View>
234
- </View>
235
- <View style={styles.cardBottomBorder} />
236
- </View>
237
- )
238
- }
239
-
240
- return (
241
- <TouchableOpacity
242
- onPress={() => {
243
- //TODO: navigate to history details
244
- }}
245
- >
246
- {renderCard(item)}
247
- </TouchableOpacity>
248
- )
249
- }
250
-
251
- export default HistoryListItem
@@ -1,25 +0,0 @@
1
- import { useNavigation } from '@react-navigation/core'
2
- import { StackNavigationProp } from '@react-navigation/stack'
3
- import React from 'react'
4
- import { useTranslation } from 'react-i18next'
5
-
6
- import IconButton, { ButtonLocation } from '../../../../components/buttons/IconButton'
7
- import { RootStackParams, Screens, Stacks } from '../../../../types/navigators'
8
- import { testIdWithKey } from '../../../../utils/testable'
9
-
10
- const HistoryMenu: React.FC = () => {
11
- const navigation = useNavigation<StackNavigationProp<RootStackParams>>()
12
- const { t } = useTranslation()
13
-
14
- return (
15
- <IconButton
16
- buttonLocation={ButtonLocation.Right}
17
- accessibilityLabel={t('Screens.Settings')}
18
- testID={testIdWithKey('Settings')}
19
- onPress={() => navigation.navigate(Stacks.HistoryStack, { screen: Screens.HistoryPage })}
20
- icon="history"
21
- />
22
- )
23
- }
24
-
25
- export default HistoryMenu
@@ -1,72 +0,0 @@
1
- import React, { useEffect, useState } from 'react'
2
- import { useTranslation } from 'react-i18next'
3
- import { StyleSheet, TouchableOpacity } from 'react-native'
4
- import Icon from 'react-native-vector-icons/MaterialIcons'
5
-
6
- import { TextTheme } from '../../../../theme'
7
- import { HistoryBlockSelection } from '../../types'
8
- import { ThemedText } from '../../../../components/texts/ThemedText'
9
-
10
- const styles = StyleSheet.create({
11
- flexView: {
12
- flexDirection: 'row',
13
- justifyContent: 'flex-start',
14
- alignItems: 'center',
15
- minWidth: 24,
16
- minHeight: 48,
17
- },
18
- languageText: {
19
- marginLeft: 8,
20
- },
21
- })
22
-
23
- interface Props {
24
- selection: HistoryBlockSelection[] | undefined
25
- onSelect: (selected: HistoryBlockSelection) => void
26
- initialSelect?: HistoryBlockSelection
27
- color?: string
28
- }
29
-
30
- const SingleSelectBlock: React.FC<Props> = ({ selection, onSelect, initialSelect, color = TextTheme.normal.color }) => {
31
- const { t } = useTranslation()
32
-
33
- const [selected, setSelected] = useState<HistoryBlockSelection>()
34
-
35
- const handleSelect = (selected: HistoryBlockSelection) => {
36
- setSelected(selected)
37
- onSelect(selected)
38
- }
39
-
40
- useEffect(() => {
41
- if (initialSelect) {
42
- setSelected(initialSelect)
43
- }
44
- }, [initialSelect])
45
-
46
- return (
47
- <>
48
- {selection?.map((item) => (
49
- <TouchableOpacity
50
- accessible={true}
51
- accessibilityLabel={
52
- (item.id === selected?.id ? t('SelectionAxs.RadioChecked') : t('SelectionAxs.RadioUnchecked')) + item.value
53
- }
54
- accessibilityRole="radio"
55
- accessibilityState={{ selected: item.id === selected?.id }}
56
- key={item.id}
57
- style={styles.flexView}
58
- onPress={() => handleSelect(item)}
59
- >
60
- <Icon
61
- name={item.id === selected?.id ? 'radio-button-checked' : 'radio-button-unchecked'}
62
- size={36}
63
- color={color}
64
- />
65
- <ThemedText style={styles.languageText}>{item.value}</ThemedText>
66
- </TouchableOpacity>
67
- ))}
68
- </>
69
- )
70
- }
71
-
72
- export default SingleSelectBlock
@@ -1,64 +0,0 @@
1
- import { Image, StyleSheet, Text, useWindowDimensions, View, TouchableOpacity } from 'react-native'
2
- import { useTheme } from '../../../contexts/theme'
3
-
4
- interface CredentialRowCardProps {
5
- name: string
6
- issuer?: string
7
- onPress?(): void
8
- bgColor?: string
9
- bgImage?: string
10
- txtColor?: string
11
- hideBorder?: boolean
12
- showFullText?: boolean
13
- }
14
-
15
- export function OpenIDCredentialRowCard({ name, issuer, bgColor, bgImage, txtColor, onPress }: CredentialRowCardProps) {
16
- const { TextTheme } = useTheme()
17
- const { width } = useWindowDimensions()
18
-
19
- const badgeWidth = 0.25 * width
20
- const badgeHeight = 0.6 * badgeWidth
21
-
22
- const style = StyleSheet.create({
23
- container: {},
24
- rowContainer: {
25
- flexDirection: 'row',
26
- borderRadius: 8,
27
- backgroundColor: '#202020',
28
- padding: 5,
29
- minHeight: 0.2 * width,
30
- },
31
- issuerBadge: {
32
- borderRadius: 8,
33
- width: badgeHeight,
34
- height: badgeHeight,
35
- backgroundColor: 'red',
36
- marginRight: 10,
37
- overflow: 'hidden',
38
- },
39
- infoContainer: {
40
- flex: 1,
41
- justifyContent: 'space-between',
42
- },
43
- imageStyle: { width: badgeWidth, height: badgeHeight, borderRadius: 8 },
44
- })
45
- //
46
- return (
47
- <View style={style.container}>
48
- <TouchableOpacity
49
- onPress={onPress}
50
- style={style.rowContainer}
51
- accessibilityLabel={name}
52
- accessibilityRole="button"
53
- >
54
- <View style={[style.issuerBadge, bgColor ? { backgroundColor: bgColor } : {}]}>
55
- {bgImage ? <Image style={style.imageStyle} source={{ uri: bgImage }} resizeMode="cover" /> : null}
56
- </View>
57
- <View style={[style.infoContainer, issuer ? { justifyContent: 'center' } : {}]}>
58
- <Text style={[TextTheme.title, txtColor ? { color: txtColor } : {}]}>{name}</Text>
59
- {issuer && <Text style={[TextTheme.labelSubtitle, txtColor ? { color: txtColor } : {}]}>{issuer}</Text>}
60
- </View>
61
- </TouchableOpacity>
62
- </View>
63
- )
64
- }