@procivis/one-react-native-components 0.3.71 → 0.3.91

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 (262) hide show
  1. package/lib/commonjs/components/entity/entity-attributes.js +3 -1
  2. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  3. package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -1
  4. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  5. package/lib/commonjs/components/proof-request/index.js +23 -12
  6. package/lib/commonjs/components/proof-request/index.js.map +1 -1
  7. package/lib/commonjs/components/proof-request/select-share-credential-card-notice.js +37 -0
  8. package/lib/commonjs/components/proof-request/select-share-credential-card-notice.js.map +1 -0
  9. package/lib/commonjs/components/proof-request/share-credential-card-notice.js +36 -0
  10. package/lib/commonjs/components/proof-request/share-credential-card-notice.js.map +1 -0
  11. package/lib/commonjs/components/proof-request/{group.js → v1/group.js} +1 -1
  12. package/lib/commonjs/components/proof-request/v1/group.js.map +1 -0
  13. package/lib/commonjs/components/proof-request/v1/index.js +39 -0
  14. package/lib/commonjs/components/proof-request/v1/index.js.map +1 -0
  15. package/lib/commonjs/components/proof-request/{select-credential.js → v1/select-credential.js} +4 -4
  16. package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -0
  17. package/lib/commonjs/components/proof-request/{share-credential.js → v1/share-credential.js} +25 -60
  18. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -0
  19. package/lib/commonjs/components/proof-request/v2/index.js +39 -0
  20. package/lib/commonjs/components/proof-request/v2/index.js.map +1 -0
  21. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js +51 -0
  22. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -0
  23. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +164 -0
  24. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -0
  25. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +131 -0
  26. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -0
  27. package/lib/commonjs/ui-components/buttons/share-button.js +1 -1
  28. package/lib/commonjs/ui-components/buttons/share-button.js.map +1 -1
  29. package/lib/commonjs/ui-components/camera/qr-code-scanner.js +5 -1
  30. package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
  31. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +16 -42
  32. package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  33. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +3 -1
  34. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  35. package/lib/commonjs/ui-components/credential/group/credential-group-header.js +72 -0
  36. package/lib/commonjs/ui-components/credential/group/credential-group-header.js.map +1 -0
  37. package/lib/commonjs/ui-components/credential/group/index.js +14 -0
  38. package/lib/commonjs/ui-components/credential/group/index.js.map +1 -0
  39. package/lib/commonjs/ui-components/credential/index.js +12 -0
  40. package/lib/commonjs/ui-components/credential/index.js.map +1 -1
  41. package/lib/commonjs/ui-components/header/foldable-header.js +29 -17
  42. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  43. package/lib/commonjs/ui-components/index.js +11 -0
  44. package/lib/commonjs/ui-components/index.js.map +1 -1
  45. package/lib/commonjs/ui-components/loader/loading-result.js +1 -1
  46. package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
  47. package/lib/commonjs/ui-components/pin/pin-lock-animation.js +477 -475
  48. package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
  49. package/lib/commonjs/ui-components/proof-request/index.js +13 -0
  50. package/lib/commonjs/ui-components/proof-request/index.js.map +1 -0
  51. package/lib/commonjs/ui-components/proof-request/proof-request-set.js +47 -0
  52. package/lib/commonjs/ui-components/proof-request/proof-request-set.js.map +1 -0
  53. package/lib/commonjs/ui-components/screens/section-list-screen.js +17 -3
  54. package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
  55. package/lib/commonjs/utils/array.js.map +1 -1
  56. package/lib/commonjs/utils/hooks/app-state.js +33 -0
  57. package/lib/commonjs/utils/hooks/app-state.js.map +1 -0
  58. package/lib/commonjs/utils/hooks/core/backup.js +1 -1
  59. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  60. package/lib/commonjs/utils/hooks/core/cache.js +4 -1
  61. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  62. package/lib/commonjs/utils/hooks/core/credentials.js +11 -10
  63. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  64. package/lib/commonjs/utils/hooks/core/identifiers.js +1 -1
  65. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  66. package/lib/commonjs/utils/hooks/core/index.js +11 -0
  67. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  68. package/lib/commonjs/utils/hooks/core/proofs.js +41 -15
  69. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  70. package/lib/commonjs/utils/hooks/core/wallet-unit.js +76 -0
  71. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -0
  72. package/lib/commonjs/utils/hooks/index.js +11 -0
  73. package/lib/commonjs/utils/hooks/index.js.map +1 -1
  74. package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
  75. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  76. package/lib/commonjs/utils/index.js +12 -12
  77. package/lib/commonjs/utils/index.js.map +1 -1
  78. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +190 -0
  79. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -0
  80. package/lib/commonjs/utils/parsers/credential-sharing.js +25 -12
  81. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  82. package/lib/commonjs/utils/parsers/credential.js +89 -57
  83. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  84. package/lib/commonjs/utils/parsers/index.js +11 -0
  85. package/lib/commonjs/utils/parsers/index.js.map +1 -1
  86. package/lib/commonjs/utils/parsers/query.js +4 -4
  87. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  88. package/lib/module/components/entity/entity-attributes.js +3 -1
  89. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  90. package/lib/module/components/entity/entity-details-with-buttons.js +2 -1
  91. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  92. package/lib/module/components/proof-request/index.js +4 -3
  93. package/lib/module/components/proof-request/index.js.map +1 -1
  94. package/lib/module/components/proof-request/select-share-credential-card-notice.js +29 -0
  95. package/lib/module/components/proof-request/select-share-credential-card-notice.js.map +1 -0
  96. package/lib/module/components/proof-request/share-credential-card-notice.js +28 -0
  97. package/lib/module/components/proof-request/share-credential-card-notice.js.map +1 -0
  98. package/lib/module/components/proof-request/{group.js → v1/group.js} +1 -1
  99. package/lib/module/components/proof-request/v1/group.js.map +1 -0
  100. package/lib/module/components/proof-request/v1/index.js +4 -0
  101. package/lib/module/components/proof-request/v1/index.js.map +1 -0
  102. package/lib/module/components/proof-request/{select-credential.js → v1/select-credential.js} +4 -4
  103. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -0
  104. package/lib/module/components/proof-request/{share-credential.js → v1/share-credential.js} +26 -61
  105. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -0
  106. package/lib/module/components/proof-request/v2/index.js +4 -0
  107. package/lib/module/components/proof-request/v2/index.js.map +1 -0
  108. package/lib/module/components/proof-request/v2/select-credential-v2.js +42 -0
  109. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -0
  110. package/lib/module/components/proof-request/v2/share-credential-v2-group.js +154 -0
  111. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -0
  112. package/lib/module/components/proof-request/v2/share-credential-v2.js +122 -0
  113. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -0
  114. package/lib/module/ui-components/buttons/share-button.js +1 -1
  115. package/lib/module/ui-components/buttons/share-button.js.map +1 -1
  116. package/lib/module/ui-components/camera/qr-code-scanner.js +5 -1
  117. package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
  118. package/lib/module/ui-components/credential/card/credential-details-list-item.js +19 -45
  119. package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
  120. package/lib/module/ui-components/credential/credential-attribute-item.js +3 -1
  121. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  122. package/lib/module/ui-components/credential/group/credential-group-header.js +64 -0
  123. package/lib/module/ui-components/credential/group/credential-group-header.js.map +1 -0
  124. package/lib/module/ui-components/credential/group/index.js +3 -0
  125. package/lib/module/ui-components/credential/group/index.js.map +1 -0
  126. package/lib/module/ui-components/credential/index.js +1 -0
  127. package/lib/module/ui-components/credential/index.js.map +1 -1
  128. package/lib/module/ui-components/header/foldable-header.js +29 -17
  129. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  130. package/lib/module/ui-components/index.js +1 -0
  131. package/lib/module/ui-components/index.js.map +1 -1
  132. package/lib/module/ui-components/loader/loading-result.js +1 -1
  133. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  134. package/lib/module/ui-components/pin/pin-lock-animation.js +477 -475
  135. package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
  136. package/lib/module/ui-components/proof-request/index.js +3 -0
  137. package/lib/module/ui-components/proof-request/index.js.map +1 -0
  138. package/lib/module/ui-components/proof-request/proof-request-set.js +39 -0
  139. package/lib/module/ui-components/proof-request/proof-request-set.js.map +1 -0
  140. package/lib/module/ui-components/screens/section-list-screen.js +15 -3
  141. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  142. package/lib/module/utils/array.js.map +1 -1
  143. package/lib/module/utils/hooks/app-state.js +27 -0
  144. package/lib/module/utils/hooks/app-state.js.map +1 -0
  145. package/lib/module/utils/hooks/core/backup.js +1 -1
  146. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  147. package/lib/module/utils/hooks/core/cache.js +4 -1
  148. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  149. package/lib/module/utils/hooks/core/credentials.js +12 -11
  150. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  151. package/lib/module/utils/hooks/core/identifiers.js +5 -5
  152. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  153. package/lib/module/utils/hooks/core/index.js +1 -0
  154. package/lib/module/utils/hooks/core/index.js.map +1 -1
  155. package/lib/module/utils/hooks/core/proofs.js +42 -16
  156. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  157. package/lib/module/utils/hooks/core/wallet-unit.js +66 -0
  158. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -0
  159. package/lib/module/utils/hooks/index.js +1 -0
  160. package/lib/module/utils/hooks/index.js.map +1 -1
  161. package/lib/module/utils/hooks/revocation/credential-status.js +1 -1
  162. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  163. package/lib/module/utils/index.js +1 -1
  164. package/lib/module/utils/index.js.map +1 -1
  165. package/lib/module/utils/parsers/credential-sharing-v2.js +177 -0
  166. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -0
  167. package/lib/module/utils/parsers/credential-sharing.js +25 -12
  168. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  169. package/lib/module/utils/parsers/credential.js +89 -57
  170. package/lib/module/utils/parsers/credential.js.map +1 -1
  171. package/lib/module/utils/parsers/index.js +1 -0
  172. package/lib/module/utils/parsers/index.js.map +1 -1
  173. package/lib/module/utils/parsers/query.js +4 -4
  174. package/lib/module/utils/parsers/query.js.map +1 -1
  175. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  176. package/lib/typescript/components/proof-request/index.d.ts +4 -3
  177. package/lib/typescript/components/proof-request/select-share-credential-card-notice.d.ts +7 -0
  178. package/lib/typescript/components/proof-request/share-credential-card-notice.d.ts +6 -0
  179. package/lib/typescript/components/proof-request/v1/index.d.ts +3 -0
  180. package/lib/typescript/components/proof-request/{select-credential.d.ts → v1/select-credential.d.ts} +1 -1
  181. package/lib/typescript/components/proof-request/{share-credential.d.ts → v1/share-credential.d.ts} +1 -1
  182. package/lib/typescript/components/proof-request/v2/index.d.ts +3 -0
  183. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +14 -0
  184. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +24 -0
  185. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +23 -0
  186. package/lib/typescript/ui-components/credential/group/credential-group-header.d.ts +10 -0
  187. package/lib/typescript/ui-components/credential/group/index.d.ts +3 -0
  188. package/lib/typescript/ui-components/credential/index.d.ts +1 -0
  189. package/lib/typescript/ui-components/header/foldable-header.d.ts +1 -0
  190. package/lib/typescript/ui-components/index.d.ts +1 -0
  191. package/lib/typescript/ui-components/loader/loading-result.d.ts +1 -1
  192. package/lib/typescript/ui-components/pin/pin-lock-animation.d.ts +311 -311
  193. package/lib/typescript/ui-components/proof-request/index.d.ts +3 -0
  194. package/lib/typescript/ui-components/proof-request/proof-request-set.d.ts +7 -0
  195. package/lib/typescript/ui-components/screens/section-list-screen.d.ts +4 -2
  196. package/lib/typescript/utils/array.d.ts +1 -0
  197. package/lib/typescript/utils/hooks/app-state.d.ts +5 -0
  198. package/lib/typescript/utils/hooks/core/backup.d.ts +1 -1
  199. package/lib/typescript/utils/hooks/core/credentials.d.ts +2 -1
  200. package/lib/typescript/utils/hooks/core/identifiers.d.ts +1 -1
  201. package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
  202. package/lib/typescript/utils/hooks/core/proofs.d.ts +6 -10
  203. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +9 -0
  204. package/lib/typescript/utils/hooks/index.d.ts +1 -0
  205. package/lib/typescript/utils/index.d.ts +1 -1
  206. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +10 -0
  207. package/lib/typescript/utils/parsers/credential-sharing.d.ts +7 -2
  208. package/lib/typescript/utils/parsers/credential.d.ts +1 -2
  209. package/lib/typescript/utils/parsers/index.d.ts +1 -0
  210. package/lib/typescript/utils/parsers/query.d.ts +2 -2
  211. package/package.json +13 -7
  212. package/src/components/entity/entity-attributes.tsx +3 -0
  213. package/src/components/entity/entity-details-with-buttons.tsx +1 -0
  214. package/src/components/proof-request/index.ts +4 -3
  215. package/src/components/proof-request/select-share-credential-card-notice.tsx +37 -0
  216. package/src/components/proof-request/share-credential-card-notice.tsx +33 -0
  217. package/src/components/proof-request/{group.tsx → v1/group.tsx} +1 -1
  218. package/src/components/proof-request/v1/index.ts +3 -0
  219. package/src/components/proof-request/{select-credential.tsx → v1/select-credential.tsx} +7 -4
  220. package/src/components/proof-request/{share-credential.tsx → v1/share-credential.tsx} +30 -51
  221. package/src/components/proof-request/v2/index.ts +3 -0
  222. package/src/components/proof-request/v2/select-credential-v2.tsx +52 -0
  223. package/src/components/proof-request/v2/share-credential-v2-group.tsx +258 -0
  224. package/src/components/proof-request/v2/share-credential-v2.tsx +202 -0
  225. package/src/ui-components/buttons/share-button.tsx +1 -1
  226. package/src/ui-components/camera/qr-code-scanner.tsx +11 -2
  227. package/src/ui-components/credential/card/credential-details-list-item.tsx +27 -49
  228. package/src/ui-components/credential/credential-attribute-item.tsx +2 -0
  229. package/src/ui-components/credential/group/credential-group-header.tsx +70 -0
  230. package/src/ui-components/credential/group/index.ts +4 -0
  231. package/src/ui-components/credential/index.ts +1 -0
  232. package/src/ui-components/header/foldable-header.tsx +31 -16
  233. package/src/ui-components/index.ts +1 -0
  234. package/src/ui-components/loader/loading-result.tsx +1 -1
  235. package/src/ui-components/pin/pin-lock-animation.tsx +240 -278
  236. package/src/ui-components/proof-request/index.ts +4 -0
  237. package/src/ui-components/proof-request/proof-request-set.tsx +46 -0
  238. package/src/ui-components/screens/section-list-screen.tsx +18 -4
  239. package/src/utils/array.ts +4 -0
  240. package/src/utils/hooks/app-state.ts +29 -0
  241. package/src/utils/hooks/core/backup.ts +2 -5
  242. package/src/utils/hooks/core/cache.ts +3 -0
  243. package/src/utils/hooks/core/credentials.ts +14 -6
  244. package/src/utils/hooks/core/identifiers.ts +15 -14
  245. package/src/utils/hooks/core/index.ts +2 -1
  246. package/src/utils/hooks/core/proofs.ts +40 -22
  247. package/src/utils/hooks/core/wallet-unit.ts +71 -0
  248. package/src/utils/hooks/index.ts +1 -0
  249. package/src/utils/hooks/revocation/credential-status.ts +1 -1
  250. package/src/utils/index.ts +1 -1
  251. package/src/utils/parsers/credential-sharing-v2.tsx +278 -0
  252. package/src/utils/parsers/credential-sharing.tsx +63 -40
  253. package/src/utils/parsers/credential.ts +100 -57
  254. package/src/utils/parsers/index.ts +1 -0
  255. package/src/utils/parsers/query.ts +6 -5
  256. package/lib/commonjs/components/proof-request/group.js.map +0 -1
  257. package/lib/commonjs/components/proof-request/select-credential.js.map +0 -1
  258. package/lib/commonjs/components/proof-request/share-credential.js.map +0 -1
  259. package/lib/module/components/proof-request/group.js.map +0 -1
  260. package/lib/module/components/proof-request/select-credential.js.map +0 -1
  261. package/lib/module/components/proof-request/share-credential.js.map +0 -1
  262. /package/lib/typescript/components/proof-request/{group.d.ts → v1/group.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useState","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","withTiming","CredentialCardRatio","CredentialCardShadow","CredentialDetailsCard","CredentialDetailsCardListItem","detailsCardStyle","expanded","lastItem","style","props","cardWidth","setCardWidth","minHeight","setMinHeight","detailsCardHeight","setDetailsCardHeight","cardListItemHeight","undefined","newValue","value","duration","animatedCardWrapperStyle","height","cardWrapperStyle","Math","ceil","onContentLayout","event","_StyleSheet$flatten$b","_StyleSheet$flatten","width","nativeEvent","layout","borderWidth","flatten","cardHeight","round","createElement","styles","animatedWrapper","cardWrapper","_extends","animate","onLayout","create","borderRadius","overflow"],"sources":["credential-details-list-item.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useState } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { CredentialCardRatio, CredentialCardShadow } from './credential-card';\nimport CredentialDetailsCard, { CredentialDetailsCardProps } from './credential-details-card';\n\nexport type CredentialDetailsCardListItemProps = Omit<CredentialDetailsCardProps, 'animate'> & {\n detailsCardStyle?: StyleProp<ViewStyle>;\n lastItem?: boolean;\n};\n\nconst CredentialDetailsCardListItem: FC<CredentialDetailsCardListItemProps> = ({\n detailsCardStyle,\n expanded,\n lastItem,\n style,\n ...props\n}) => {\n const [cardWidth, setCardWidth] = useState<number>();\n const [minHeight, setMinHeight] = useState<number>();\n const [detailsCardHeight, setDetailsCardHeight] = useState<number>();\n\n const cardListItemHeight = useSharedValue<number | undefined>(undefined);\n\n useEffect(() => {\n if (!detailsCardHeight || !minHeight) {\n return;\n }\n const newValue = expanded ? detailsCardHeight : minHeight;\n if (cardListItemHeight.value === undefined) {\n cardListItemHeight.value = newValue;\n return;\n }\n cardListItemHeight.value = withTiming(newValue, {\n duration: 250,\n });\n }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);\n\n const animatedCardWrapperStyle = useAnimatedStyle(() => {\n if (cardListItemHeight.value !== undefined) {\n return {\n height: cardListItemHeight.value,\n };\n }\n if (lastItem || expanded) {\n return {};\n }\n return {\n height: 60,\n };\n }, [cardListItemHeight, lastItem, expanded]);\n\n const cardWrapperStyle: ViewStyle = {\n minHeight: cardWidth ? Math.ceil(cardWidth / CredentialCardRatio) : undefined,\n }\n\n const onContentLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n const borderWidth = StyleSheet.flatten(style)?.borderWidth ?? 0;\n const cardHeight = Math.round(height) + 2 * borderWidth;\n if (cardHeight === detailsCardHeight) {\n return;\n }\n setCardWidth(width);\n if (!minHeight) {\n setMinHeight(lastItem ? Math.ceil(width / CredentialCardRatio) : 60);\n }\n setDetailsCardHeight(cardHeight);\n },\n [lastItem, minHeight, style, detailsCardHeight],\n );\n\n return (\n <Animated.View style={[styles.animatedWrapper, animatedCardWrapperStyle, style]}>\n <View style={[styles.cardWrapper, cardWrapperStyle]}>\n <CredentialDetailsCard\n animate={false}\n expanded={true}\n onLayout={onContentLayout}\n style={detailsCardStyle}\n {...props}\n />\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n animatedWrapper: {\n ...CredentialCardShadow,\n },\n cardWrapper: {\n borderRadius: 10,\n height: '100%',\n overflow: 'hidden',\n },\n});\n\nexport default CredentialDetailsCardListItem;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACnE,SAAuCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACxF,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAEhG,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,mBAAmB;AAC7E,OAAOC,qBAAqB,MAAsC,2BAA2B;AAO7F,MAAMC,6BAAqE,GAAGA,CAAC;EAC7EC,gBAAgB;EAChBC,QAAQ;EACRC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACL,CAAC,KAAK;EACJ,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGjB,QAAQ,CAAS,CAAC;EACpD,MAAM,CAACkB,SAAS,EAAEC,YAAY,CAAC,GAAGnB,QAAQ,CAAS,CAAC;EACpD,MAAM,CAACoB,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGrB,QAAQ,CAAS,CAAC;EAEpE,MAAMsB,kBAAkB,GAAGjB,cAAc,CAAqBkB,SAAS,CAAC;EAExExB,SAAS,CAAC,MAAM;IACd,IAAI,CAACqB,iBAAiB,IAAI,CAACF,SAAS,EAAE;MACpC;IACF;IACA,MAAMM,QAAQ,GAAGZ,QAAQ,GAAGQ,iBAAiB,GAAGF,SAAS;IACzD,IAAII,kBAAkB,CAACG,KAAK,KAAKF,SAAS,EAAE;MAC1CD,kBAAkB,CAACG,K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C;IACnB,IAAI,CAAClB,SAAS,EAAE;MACdC,YAAY,CAACN,QAAQ,GAAGiB,IAAI,CAACC,IAAI,CAACK,KAAK,GAAG7B,mBAAmB,CAAC,GAAG,EAAE,CAAC;IACtE;IACAc,oBAAoB,CAACoB,UAAU,CAAC;EAClC,CAAC,EACD,CAAC5B,QAAQ,EAAEK,SAAS,EAAEJ,KAAK,EAAEM,iBAAiB,CAChD,CAAC;EAED,oBACEvB,KAAA,CAAA8C,aAAA,CAACxC,QAAQ,CAACD,IAAI;IAACY,KAAK,EAAE,CAAC8B,MAAM,CAACC,eAAe,EAAElB,wBAAwB,EAAEb,KAAK;EAAE,gBAC9EjB,KAAA,CAAA8C,aAAA,CAACzC,IAAI;IAACY,KAAK,EAAE,CAAC8B,MAAM,CAACE,WAAW,EAAEjB,gBAAgB;EAAE,gBAClDhC,KAAA,CAAA8C,aAAA,CAAClC,qBAAqB,EAAAsC,QAAA;IACpBC,OAAO,EAAE,KAAM;IACfpC,QAAQ,EAAE,IAAK;IACfqC,QAAQ,EAAEjB,eAAgB;IAC1BlB,KAAK,EAAEH;EAAiB,GACpBI,KAAK,CACV,CACG,CACO,CAAC;AAEpB,CAAC;AAED,MAAM6B,MAAM,GAAG3C,UAAU,CAACiD,MAAM,CAAC;EAC/BL,eAAe,EAAE;IACf,GAAGrC;EACL,CAAC;EACDsC,WAAW,EAAE;IACXK,YAAY,EAAE,EAAE;IAChBvB,MAAM,EAAE,MAAM;IACdwB,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAe1C,6BAA6B","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useState","StyleSheet","Animated","LinearTransition","CredentialCardRatio","CredentialCardShadow","CredentialDetailsCard","CredentialDetailsCardListItem","detailsCardStyle","expanded","lastItem","style","props","detailsCardHeight","setDetailsCardHeight","cardWidth","card","width","minHeight","Math","ceil","onContentLayout","event","_StyleSheet$flatten$b","_StyleSheet$flatten","height","nativeEvent","layout","borderWidth","flatten","cardHeight","round","createElement","View","styles","animatedWrapper","cardWrapper","_extends","animate","onLayout","create","borderRadius","overflow"],"sources":["credential-details-list-item.tsx"],"sourcesContent":["import React, { FC, useCallback, useState } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, ViewStyle } from 'react-native';\nimport Animated, { LinearTransition } from 'react-native-reanimated';\n\nimport { CredentialCardRatio, CredentialCardShadow } from './credential-card';\nimport CredentialDetailsCard, { CredentialDetailsCardProps } from './credential-details-card';\n\nexport type CredentialDetailsCardListItemProps = Omit<CredentialDetailsCardProps, 'animate'> & {\n detailsCardStyle?: StyleProp<ViewStyle>;\n lastItem?: boolean;\n};\n\nconst CredentialDetailsCardListItem: FC<CredentialDetailsCardListItemProps> = ({\n detailsCardStyle,\n expanded,\n lastItem,\n style,\n ...props\n}) => {\n const [detailsCardHeight, setDetailsCardHeight] = useState<number>();\n const cardWidth = props.card.width;\n const minHeight = lastItem ? Math.ceil(cardWidth / CredentialCardRatio) : 60;\n\n const onContentLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n const borderWidth = StyleSheet.flatten(style)?.borderWidth ?? 0;\n const cardHeight = Math.round(height) + 2 * borderWidth;\n if (cardHeight === detailsCardHeight) {\n return;\n }\n setDetailsCardHeight(cardHeight);\n },\n [style, detailsCardHeight],\n );\n\n return (\n <Animated.View\n layout={LinearTransition}\n style={[\n styles.animatedWrapper,\n // eslint-disable-next-line react-native/no-inline-styles\n {\n height: expanded ? 'auto' : minHeight,\n },\n style,\n ]}>\n <Animated.View\n layout={LinearTransition}\n style={[\n styles.cardWrapper,\n // eslint-disable-next-line react-native/no-inline-styles\n {\n height: expanded ? 'auto' : Math.ceil(cardWidth / CredentialCardRatio),\n },\n ]}>\n <CredentialDetailsCard\n animate={false}\n expanded={true}\n onLayout={onContentLayout}\n style={detailsCardStyle}\n {...props}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n animatedWrapper: {\n ...C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CAACnB,KAAK,EAAEE,iBAAiB,CAC3B,CAAC;EAED,oBACEf,KAAA,CAAAkC,aAAA,CAAC9B,QAAQ,CAAC+B,IAAI;IACZN,MAAM,EAAExB,gBAAiB;IACzBQ,KAAK,EAAE,CACLuB,MAAM,CAACC,eAAe;IACtB;IACA;MACEV,MAAM,EAAEhB,QAAQ,GAAG,MAAM,GAAGS;IAC9B,CAAC,EACDP,KAAK;EACL,gBACFb,KAAA,CAAAkC,aAAA,CAAC9B,QAAQ,CAAC+B,IAAI;IACZN,MAAM,EAAExB,gBAAiB;IACzBQ,KAAK,EAAE,CACLuB,MAAM,CAACE,WAAW;IAClB;IACA;MACEX,MAAM,EAAEhB,QAAQ,GAAG,MAAM,GAAGU,IAAI,CAACC,IAAI,CAACL,SAAS,GAAGX,mBAAmB;IACvE,CAAC;EACD,gBACFN,KAAA,CAAAkC,aAAA,CAAC1B,qBAAqB,EAAA+B,QAAA;IACpBC,OAAO,EAAE,KAAM;IACf7B,QAAQ,EAAE,IAAK;IACf8B,QAAQ,EAAElB,eAAgB;IAC1BV,KAAK,EAAEH;EAAiB,GACpBI,KAAK,CACV,CACY,CACF,CAAC;AAEpB,CAAC;AAED,MAAMsB,MAAM,GAAGjC,UAAU,CAACuC,MAAM,CAAC;EAC/BL,eAAe,EAAE;IACf,GAAG9B;EACL,CAAC;EACD+B,WAAW,EAAE;IACXK,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAenC,6BAA6B","ignoreList":[]}
@@ -254,7 +254,9 @@ const styles = StyleSheet.create({
254
254
  paddingLeft: 12
255
255
  },
256
256
  rightAccessory: {
257
- paddingHorizontal: 8
257
+ paddingHorizontal: 8,
258
+ position: 'absolute',
259
+ right: 0
258
260
  },
259
261
  separator: {
260
262
  height: 1,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","Image","StyleSheet","View","colorWithAlphaComponent","concatTestID","TouchableHighlight","TouchableOpacity","Typography","useAppColorScheme","CredentialAttributeItemButton","children","disabled","id","onPress","selected","colorScheme","pressHandler","createElement","style","styles","touchableAttribute","activeOpacity","backgroundColor","background","underlayColor","IMAGE_SIZE","CredentialAttributeItem","attributes","image","last","name","onImagePreview","rightAccessory","nested","listValue","testID","value","values","valueErrorColor","imagePreviewHandler","rightAccessoryView","undefined","isValidElement","RightAccessoryComponent","isObject","length","isArray","attributeItemContainer","attributeItemRow","dataItemButtonChildren","decorator","decoratorCircle","listDecoratorCircle","listImageDecoratorCircle","text","decoratorCircleInner","borderColor","decoratorLine","listDecoratorLine","listStringValueDecoratorLine","listImageDecoratorLine","objectAttributeItem","attributeItem","nestedAttributeItem","color","preset","nestedObjectLabel","dataItemLabel","dataItemImageWrapper","resizeMode","source","dataItemImage","error","numberOfLines","map","attribute","index","_extends","key","arrayValue","objectAccessory","separator","create","flex","paddingLeft","marginTop","flexDirection","alignItems","height","width","borderRadius","borderWidth","overflow","marginBottom","opacity","justifyContent","left","position","top","bottom","marginLeft","paddingVertical","alignSelf","paddingHorizontal","marginHorizontal"],"sources":["credential-attribute-item.tsx"],"sourcesContent":["import React, { ComponentType, FC, PropsWithChildren, ReactElement, useCallback, useMemo } from 'react';\nimport { Image, ImageSourcePropType, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { colorWithAlphaComponent } from '../../utils/color';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableHighlight, TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\ntype CredentialAttributeItemButtonProps = {\n disabled?: boolean;\n id: string;\n onPress?: (id: string, selected: boolean) => void;\n selected?: boolean;\n};\n\nconst CredentialAttributeItemButton: FC<PropsWithChildren<CredentialAttributeItemButtonProps>> = ({\n children,\n disabled,\n id,\n onPress,\n selected,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const pressHandler = useCallback(() => {\n if (!onPress) {\n return;\n }\n onPress(id, !selected);\n }, [onPress, id, selected]);\n\n if (!onPress) {\n return <View style={styles.touchableAttribute}>{children}</View>;\n }\n\n if (selected) {\n return (\n <TouchableOpacity\n activeOpacity={0.8}\n disabled={disabled}\n onPress={pressHandler}\n style={[styles.touchableAttribute, { backgroundColor: colorScheme.background }]}>\n {children}\n </TouchableOpacity>\n );\n }\n\n return (\n <TouchableHighlight\n disabled={disabled}\n onPress={pressHandler}\n underlayColor={colorWithAlphaComponent(colorScheme.background, 0.5)}\n style={styles.touchableAttribute}>\n {children}\n </TouchableHighlight>\n );\n};\n\nconst IMAGE_SIZE = 64;\n\nexport type CredentialAttributeValue =\n | {\n attributes: CredentialAttribute[];\n image?: never;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image: ImageSourcePropType;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value: string;\n values?: never;\n valueErrorColor?: boolean;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value?: never;\n values: CredentialAttribute[];\n valueErrorColor?: boolean;\n testID?: string;\n };\n\nexport type CredentialAttribute = CredentialAttributeValue & {\n disabled?: boolean;\n selected?: boolean;\n nested?: boolean;\n listValue?: boolean;\n id: string;\n name?: string;\n path: string;\n rightAccessory?: ComponentType<any> | ReactElement;\n};\n\nexport type CredentialAttributeItemProps = CredentialAttribute & {\n last: boolean | undefined;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onPress?: (id: string, selected: boolean) => void;\n style?: StyleProp<ViewStyle>;\n};\n\nconst CredentialAttributeItem: FC<CredentialAttributeItemProps> = ({\n attributes,\n disabled,\n id,\n image,\n last,\n name,\n onImagePreview,\n onPress,\n rightAccessory,\n nested = false,\n listValue = false,\n selected,\n style,\n testID,\n value,\n values,\n valueErrorColor,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const imagePreviewHandler = useCallback(() => {\n if (!onImagePreview || !image) {\n return;\n }\n onImagePreview(name ?? '', image);\n }, [image, name, onImagePreview]);\n\n const rightAccessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!rightAccessory) {\n return undefined;\n }\n if (React.isValidElement(rightAccessory)) {\n return rightAccessory;\n } else {\n const RightAccessoryComponent = rightAccessory as React.ComponentType<any>;\n return <RightAccessoryComponent />;\n }\n }, [rightAccessory]);\n\n const isObject = attributes && attributes.length > 0;\n const isArray = values && values.length > 0;\n\n return (\n <View style={[!nested && styles.attributeItemContainer, style]} testID={testID}>\n <View style={styles.attributeItemRow}>\n <CredentialAttributeItemButton disabled={disabled} id={id} onPress={onPress} selected={selected}>\n <View style={[styles.dataItemButtonChildren]}>\n {(isObject || isArray || listValue) && (\n <View style={styles.decorator}>\n <View\n style={[\n styles.decoratorCircle,\n listValue ? styles.listDecoratorCircle : undefined,\n listValue && image ? styles.listImageDecoratorCircle : undefined,\n { backgroundColor: colorScheme.text },\n ]}>\n <View\n style={[\n styles.decoratorCircleInner,\n { backgroundColor: colorScheme.text, borderColor: colorScheme.background },\n ]}\n />\n </View>\n <View\n style={[\n styles.decoratorLine,\n listValue ? styles.listDecoratorLine : undefined,\n listValue && value ? styles.listStringValueDecoratorLine : undefined,\n listValue && image ? styles.listImageDecoratorLine : undefined,\n { backgroundColor: colorScheme.text },\n ]}\n />\n </View>\n )}\n <View\n style={[\n isObject || isArray || listValue ? styles.objectAttributeItem : styles.attributeItem,\n nested && styles.nestedAttributeItem,\n ]}>\n {name && (\n <Typography\n color={colorScheme.text}\n preset={image ? 'xs' : 'xs/line-height-small'}\n style={isObject || isArray ? styles.nestedObjectLabel : styles.dataItemLabel}\n testID={concatTestID(testID, 'title')}>\n {name}\n </Typography>\n )}\n {image && (\n <TouchableOpacity\n disabled={!onImagePreview}\n onPress={imagePreviewHandler}\n style={[styles.dataItemImageWrapper, listValue ? styles.listValue : undefined]}>\n <Image\n resizeMode=\"cover\"\n testID={concatTestID(testID, 'image')}\n source={image}\n style={styles.dataItemImage}\n />\n </TouchableOpacity>\n )}\n {value && (\n <Typography\n color={valueErrorColor ? colorScheme.error : colorScheme.text}\n numberOfLines={10}\n preset=\"s\"\n style={listValue ? styles.listValue : undefined}\n testID={concatTestID(testID, 'value')}>\n {value}\n </Typography>\n )}\n {isObject &&\n attributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n nested={true}\n key={attribute.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n {...attribute}\n />\n ))}\n {isArray &&\n values.map((arrayValue, index, { length }) => (\n <CredentialAttributeItem\n key={arrayValue.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n listValue={true}\n {...arrayValue}\n name={undefined}\n />\n ))}\n <View />\n </View>\n {rightAccessoryView && (\n <View style={[styles.rightAccessory, isObject && styles.objectAccessory]}>{rightAccessoryView}</View>\n )}\n </View>\n </CredentialAttributeItemButton>\n </View>\n {!last && !nested && <View style={[styles.separator, { backgroundColor: colorScheme.background }]} />}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n attributeItem: {\n flex: 1,\n paddingLeft: 8,\n },\n attributeItemContainer: {\n marginTop: 2,\n },\n attributeItemRow: {\n flexDirection: 'row',\n },\n dataItemButtonChildren: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n dataItemImage: {\n height: IMAGE_SIZE,\n width: IMAGE_SIZE,\n },\n dataItemImageWrapper: {\n borderColor: '#0004',\n borderRadius: 4,\n borderWidth: 0.5,\n height: IMAGE_SIZE,\n marginTop: 4,\n overflow: 'hidden',\n width: IMAGE_SIZE,\n },\n dataItemLabel: {\n marginBottom: 4,\n opacity: 0.7,\n },\n decorator: {\n height: '100%',\n justifyContent: 'center',\n left: 8,\n position: 'absolute',\n },\n decoratorCircle: {\n alignItems: 'center',\n borderRadius: 3.5,\n borderWidth: 1,\n height: 7,\n justifyContent: 'center',\n position: 'absolute',\n top: 6,\n width: 7,\n },\n decoratorCircleInner: {\n borderRadius: 2,\n borderWidth: 1,\n height: 4,\n width: 4,\n },\n decoratorLine: {\n bottom: 12,\n left: 3,\n position: 'absolute',\n top: 13,\n width: 1,\n },\n listDecoratorCircle: {\n top: 18,\n },\n listDecoratorLine: {\n top: 25,\n },\n listImageDecoratorCircle: {\n top: 32,\n },\n listImageDecoratorLine: {\n bottom: 40,\n top: 39,\n },\n listStringValueDecoratorLine: {\n bottom: 24,\n },\n listValue: {\n marginLeft: 13,\n paddingVertical: 10,\n },\n nestedAttributeItem: {\n paddingLeft: 12,\n },\n nestedObjectLabel: {\n opacity: 0.7,\n paddingLeft: 13,\n },\n objectAccessory: {\n alignSelf: 'flex-start',\n },\n objectAttributeItem: {\n alignItems: 'stretch',\n flex: 1,\n paddingLeft: 12,\n },\n rightAccessory: {\n paddingHorizontal: 8,\n },\n separator: {\n height: 1,\n marginHorizontal: 8,\n marginTop: -1,\n },\n touchableAttribute: {\n borderRadius: 8,\n flex: 1,\n paddingVertical: 11,\n },\n});\n\nexport default CredentialAttributeItem;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAwDC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACvG,SAASC,KAAK,EAAkCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEjG,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,+CAA+C;AACpG,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AASjE,MAAMC,6BAAwF,GAAGA,CAAC;EAChGC,QAAQ;EACRC,QAAQ;EACRC,EAAE;EACFC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGP,iBAAiB,CAAC,CAAC;EAEvC,MAAMQ,YAAY,GAAGlB,WAAW,CAAC,MAAM;IACrC,IAAI,CAACe,OAAO,EAAE;MACZ;IACF;IACAA,OAAO,CAACD,EAAE,EAAE,CAACE,QAAQ,CAAC;EACxB,CA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E;EACP,CAAC;EACDvC,4BAA4B,EAAE;IAC5BwC,MAAM,EAAE;EACV,CAAC;EACDjE,SAAS,EAAE;IACTkE,UAAU,EAAE,EAAE;IACdC,eAAe,EAAE;EACnB,CAAC;EACDtC,mBAAmB,EAAE;IACnBqB,WAAW,EAAE;EACf,CAAC;EACDlB,iBAAiB,EAAE;IACjB4B,OAAO,EAAE,GAAG;IACZV,WAAW,EAAE;EACf,CAAC;EACDJ,eAAe,EAAE;IACfsB,SAAS,EAAE;EACb,CAAC;EACDzC,mBAAmB,EAAE;IACnB0B,UAAU,EAAE,SAAS;IACrBJ,IAAI,EAAE,CAAC;IACPC,WAAW,EAAE;EACf,CAAC;EACDpD,cAAc,EAAE;IACduE,iBAAiB,EAAE;EACrB,CAAC;EACDtB,SAAS,EAAE;IACTO,MAAM,EAAE,CAAC;IACTgB,gBAAgB,EAAE,CAAC;IACnBnB,SAAS,EAAE,CAAC;EACd,CAAC;EACDjE,kBAAkB,EAAE;IAClBsE,YAAY,EAAE,CAAC;IACfP,IAAI,EAAE,CAAC;IACPkB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAe3E,uBAAuB","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","Image","StyleSheet","View","colorWithAlphaComponent","concatTestID","TouchableHighlight","TouchableOpacity","Typography","useAppColorScheme","CredentialAttributeItemButton","children","disabled","id","onPress","selected","colorScheme","pressHandler","createElement","style","styles","touchableAttribute","activeOpacity","backgroundColor","background","underlayColor","IMAGE_SIZE","CredentialAttributeItem","attributes","image","last","name","onImagePreview","rightAccessory","nested","listValue","testID","value","values","valueErrorColor","imagePreviewHandler","rightAccessoryView","undefined","isValidElement","RightAccessoryComponent","isObject","length","isArray","attributeItemContainer","attributeItemRow","dataItemButtonChildren","decorator","decoratorCircle","listDecoratorCircle","listImageDecoratorCircle","text","decoratorCircleInner","borderColor","decoratorLine","listDecoratorLine","listStringValueDecoratorLine","listImageDecoratorLine","objectAttributeItem","attributeItem","nestedAttributeItem","color","preset","nestedObjectLabel","dataItemLabel","dataItemImageWrapper","resizeMode","source","dataItemImage","error","numberOfLines","map","attribute","index","_extends","key","arrayValue","objectAccessory","separator","create","flex","paddingLeft","marginTop","flexDirection","alignItems","height","width","borderRadius","borderWidth","overflow","marginBottom","opacity","justifyContent","left","position","top","bottom","marginLeft","paddingVertical","alignSelf","paddingHorizontal","right","marginHorizontal"],"sources":["credential-attribute-item.tsx"],"sourcesContent":["import React, { ComponentType, FC, PropsWithChildren, ReactElement, useCallback, useMemo } from 'react';\nimport { Image, ImageSourcePropType, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { colorWithAlphaComponent } from '../../utils/color';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableHighlight, TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\ntype CredentialAttributeItemButtonProps = {\n disabled?: boolean;\n id: string;\n onPress?: (id: string, selected: boolean) => void;\n selected?: boolean;\n};\n\nconst CredentialAttributeItemButton: FC<PropsWithChildren<CredentialAttributeItemButtonProps>> = ({\n children,\n disabled,\n id,\n onPress,\n selected,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const pressHandler = useCallback(() => {\n if (!onPress) {\n return;\n }\n onPress(id, !selected);\n }, [onPress, id, selected]);\n\n if (!onPress) {\n return <View style={styles.touchableAttribute}>{children}</View>;\n }\n\n if (selected) {\n return (\n <TouchableOpacity\n activeOpacity={0.8}\n disabled={disabled}\n onPress={pressHandler}\n style={[styles.touchableAttribute, { backgroundColor: colorScheme.background }]}>\n {children}\n </TouchableOpacity>\n );\n }\n\n return (\n <TouchableHighlight\n disabled={disabled}\n onPress={pressHandler}\n underlayColor={colorWithAlphaComponent(colorScheme.background, 0.5)}\n style={styles.touchableAttribute}>\n {children}\n </TouchableHighlight>\n );\n};\n\nconst IMAGE_SIZE = 64;\n\nexport type CredentialAttributeValue =\n | {\n attributes: CredentialAttribute[];\n image?: never;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image: ImageSourcePropType;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value: string;\n values?: never;\n valueErrorColor?: boolean;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value?: never;\n values: CredentialAttribute[];\n valueErrorColor?: boolean;\n testID?: string;\n };\n\nexport type CredentialAttribute = CredentialAttributeValue & {\n disabled?: boolean;\n selected?: boolean;\n nested?: boolean;\n listValue?: boolean;\n id: string;\n name?: string;\n path: string;\n rightAccessory?: ComponentType<any> | ReactElement;\n};\n\nexport type CredentialAttributeItemProps = CredentialAttribute & {\n last: boolean | undefined;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onPress?: (id: string, selected: boolean) => void;\n style?: StyleProp<ViewStyle>;\n};\n\nconst CredentialAttributeItem: FC<CredentialAttributeItemProps> = ({\n attributes,\n disabled,\n id,\n image,\n last,\n name,\n onImagePreview,\n onPress,\n rightAccessory,\n nested = false,\n listValue = false,\n selected,\n style,\n testID,\n value,\n values,\n valueErrorColor,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const imagePreviewHandler = useCallback(() => {\n if (!onImagePreview || !image) {\n return;\n }\n onImagePreview(name ?? '', image);\n }, [image, name, onImagePreview]);\n\n const rightAccessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!rightAccessory) {\n return undefined;\n }\n if (React.isValidElement(rightAccessory)) {\n return rightAccessory;\n } else {\n const RightAccessoryComponent = rightAccessory as React.ComponentType<any>;\n return <RightAccessoryComponent />;\n }\n }, [rightAccessory]);\n\n const isObject = attributes && attributes.length > 0;\n const isArray = values && values.length > 0;\n\n return (\n <View style={[!nested && styles.attributeItemContainer, style]} testID={testID}>\n <View style={styles.attributeItemRow}>\n <CredentialAttributeItemButton disabled={disabled} id={id} onPress={onPress} selected={selected}>\n <View style={[styles.dataItemButtonChildren]}>\n {(isObject || isArray || listValue) && (\n <View style={styles.decorator}>\n <View\n style={[\n styles.decoratorCircle,\n listValue ? styles.listDecoratorCircle : undefined,\n listValue && image ? styles.listImageDecoratorCircle : undefined,\n { backgroundColor: colorScheme.text },\n ]}>\n <View\n style={[\n styles.decoratorCircleInner,\n { backgroundColor: colorScheme.text, borderColor: colorScheme.background },\n ]}\n />\n </View>\n <View\n style={[\n styles.decoratorLine,\n listValue ? styles.listDecoratorLine : undefined,\n listValue && value ? styles.listStringValueDecoratorLine : undefined,\n listValue && image ? styles.listImageDecoratorLine : undefined,\n { backgroundColor: colorScheme.text },\n ]}\n />\n </View>\n )}\n <View\n style={[\n isObject || isArray || listValue ? styles.objectAttributeItem : styles.attributeItem,\n nested && styles.nestedAttributeItem,\n ]}>\n {name && (\n <Typography\n color={colorScheme.text}\n preset={image ? 'xs' : 'xs/line-height-small'}\n style={isObject || isArray ? styles.nestedObjectLabel : styles.dataItemLabel}\n testID={concatTestID(testID, 'title')}>\n {name}\n </Typography>\n )}\n {image && (\n <TouchableOpacity\n disabled={!onImagePreview}\n onPress={imagePreviewHandler}\n style={[styles.dataItemImageWrapper, listValue ? styles.listValue : undefined]}>\n <Image\n resizeMode=\"cover\"\n testID={concatTestID(testID, 'image')}\n source={image}\n style={styles.dataItemImage}\n />\n </TouchableOpacity>\n )}\n {value && (\n <Typography\n color={valueErrorColor ? colorScheme.error : colorScheme.text}\n numberOfLines={10}\n preset=\"s\"\n style={listValue ? styles.listValue : undefined}\n testID={concatTestID(testID, 'value')}>\n {value}\n </Typography>\n )}\n {isObject &&\n attributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n nested={true}\n key={attribute.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n {...attribute}\n />\n ))}\n {isArray &&\n values.map((arrayValue, index, { length }) => (\n <CredentialAttributeItem\n key={arrayValue.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n listValue={true}\n {...arrayValue}\n name={undefined}\n />\n ))}\n <View />\n </View>\n {rightAccessoryView && (\n <View style={[styles.rightAccessory, isObject && styles.objectAccessory]}>{rightAccessoryView}</View>\n )}\n </View>\n </CredentialAttributeItemButton>\n </View>\n {!last && !nested && <View style={[styles.separator, { backgroundColor: colorScheme.background }]} />}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n attributeItem: {\n flex: 1,\n paddingLeft: 8,\n },\n attributeItemContainer: {\n marginTop: 2,\n },\n attributeItemRow: {\n flexDirection: 'row',\n },\n dataItemButtonChildren: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n dataItemImage: {\n height: IMAGE_SIZE,\n width: IMAGE_SIZE,\n },\n dataItemImageWrapper: {\n borderColor: '#0004',\n borderRadius: 4,\n borderWidth: 0.5,\n height: IMAGE_SIZE,\n marginTop: 4,\n overflow: 'hidden',\n width: IMAGE_SIZE,\n },\n dataItemLabel: {\n marginBottom: 4,\n opacity: 0.7,\n },\n decorator: {\n height: '100%',\n justifyContent: 'center',\n left: 8,\n position: 'absolute',\n },\n decoratorCircle: {\n alignItems: 'center',\n borderRadius: 3.5,\n borderWidth: 1,\n height: 7,\n justifyContent: 'center',\n position: 'absolute',\n top: 6,\n width: 7,\n },\n decoratorCircleInner: {\n borderRadius: 2,\n borderWidth: 1,\n height: 4,\n width: 4,\n },\n decoratorLine: {\n bottom: 12,\n left: 3,\n position: 'absolute',\n top: 13,\n width: 1,\n },\n listDecoratorCircle: {\n top: 18,\n },\n listDecoratorLine: {\n top: 25,\n },\n listImageDecoratorCircle: {\n top: 32,\n },\n listImageDecoratorLine: {\n bottom: 40,\n top: 39,\n },\n listStringValueDecoratorLine: {\n bottom: 24,\n },\n listValue: {\n marginLeft: 13,\n paddingVertical: 10,\n },\n nestedAttributeItem: {\n paddingLeft: 12,\n },\n nestedObjectLabel: {\n opacity: 0.7,\n paddingLeft: 13,\n },\n objectAccessory: {\n alignSelf: 'flex-start',\n },\n objectAttributeItem: {\n alignItems: 'stretch',\n flex: 1,\n paddingLeft: 12,\n },\n rightAccessory: {\n paddingHorizontal: 8,\n position: 'absolute',\n right: 0,\n },\n separator: {\n height: 1,\n marginHorizontal: 8,\n marginTop: -1,\n },\n touchableAttribute: {\n borderRadius: 8,\n flex: 1,\n paddingVertical: 11,\n },\n});\n\nexport default CredentialAttributeItem;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAwDC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACvG,SAASC,KAAK,EAAkCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEjG,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,+CAA+C;AACpG,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AASjE,MAAMC,6BAAwF,GAAGA,CAAC;EAChGC,QAAQ;EACRC,QAAQ;EACRC,EAAE;EACFC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGP,iBAAiB,CAAC,CAAC;EAEvC,MAAMQ,YAAY,GAAGlB,WAAW,CAAC,MAAM;IACrC,IAAI,CAACe,OAAO,EAAE;MACZ;IACF;IACAA,OAAO,CAACD,EAAE,EAAE,CAACE,QAAQ,CAAC;EACxB,CAAC,EAAE,CAACD,OAAO,EAAED,EAAE,EAAEE,QAAQ,CAAC,CAAC;EAE3B,IAAI,CAACD,OAAO,EAAE;IACZ,oBAAOhB,KAAA,CAAAoB,aAAA,CAACf,IAAI;MAACgB,KAAK,EAAEC,MAAM,CAACC;IAAmB,GAAEV,QAAe,CAAC;EAClE;EAEA,IAAII,QAAQ,EAAE;IACZ,oBACEjB,KAAA,CAAAoB,aAAA,CAACX,gBAAgB;MACfe,aAAa,EAAE,GAAI;MACnBV,QAAQ,EAAEA,QAAS;MACnBE,OAAO,EAAEG,YAAa;MACtBE,KAAK,EAAE,CAACC,MA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AAE,CAAC;IACPC,WAAW,EAAE;EACf,CAAC;EACDpD,cAAc,EAAE;IACduE,iBAAiB,EAAE,CAAC;IACpBN,QAAQ,EAAE,UAAU;IACpBO,KAAK,EAAE;EACT,CAAC;EACDvB,SAAS,EAAE;IACTO,MAAM,EAAE,CAAC;IACTiB,gBAAgB,EAAE,CAAC;IACnBpB,SAAS,EAAE,CAAC;EACd,CAAC;EACDjE,kBAAkB,EAAE;IAClBsE,YAAY,EAAE,CAAC;IACfP,IAAI,EAAE,CAAC;IACPkB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAe3E,uBAAuB","ignoreList":[]}
@@ -0,0 +1,64 @@
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
+ import React, { useMemo } from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import { concatTestID } from '../../../utils';
5
+ import { Typography } from '../../text';
6
+ import { useAppColorScheme } from '../../theme';
7
+ const CredentialGroupHeader = ({
8
+ accessory,
9
+ name,
10
+ style,
11
+ testID,
12
+ ...props
13
+ }) => {
14
+ const colorScheme = useAppColorScheme();
15
+ const accessoryView = useMemo(() => {
16
+ if (!accessory) {
17
+ return undefined;
18
+ }
19
+ if (/*#__PURE__*/React.isValidElement(accessory)) {
20
+ return accessory;
21
+ } else {
22
+ const AccessoryComponent = accessory;
23
+ return /*#__PURE__*/React.createElement(AccessoryComponent, null);
24
+ }
25
+ }, [accessory]);
26
+ return /*#__PURE__*/React.createElement(View, _extends({}, props, {
27
+ style: [styles.container, style],
28
+ testID: testID
29
+ }), /*#__PURE__*/React.createElement(View, {
30
+ style: styles.text
31
+ }, /*#__PURE__*/React.createElement(Typography, {
32
+ color: colorScheme.white,
33
+ ellipsizeMode: 'tail',
34
+ numberOfLines: 1,
35
+ preset: "regular",
36
+ style: styles.nameText,
37
+ testID: concatTestID(testID, 'name')
38
+ }, name)), accessoryView && /*#__PURE__*/React.createElement(View, {
39
+ style: styles.accessory
40
+ }, accessoryView));
41
+ };
42
+ const styles = StyleSheet.create({
43
+ accessory: {
44
+ alignItems: 'center',
45
+ height: 44,
46
+ justifyContent: 'center',
47
+ width: 44
48
+ },
49
+ container: {
50
+ alignItems: 'center',
51
+ flexDirection: 'row',
52
+ height: 60,
53
+ padding: 8
54
+ },
55
+ nameText: {
56
+ marginTop: 2
57
+ },
58
+ text: {
59
+ flex: 1,
60
+ justifyContent: 'center'
61
+ }
62
+ });
63
+ export default CredentialGroupHeader;
64
+ //# sourceMappingURL=credential-group-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","StyleSheet","View","concatTestID","Typography","useAppColorScheme","CredentialGroupHeader","accessory","name","style","testID","props","colorScheme","accessoryView","undefined","isValidElement","AccessoryComponent","createElement","_extends","styles","container","text","color","white","ellipsizeMode","numberOfLines","preset","nameText","create","alignItems","height","justifyContent","width","flexDirection","padding","marginTop","flex"],"sources":["credential-group-header.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { AccessibilityProps, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../../utils';\nimport { Typography } from '../../text';\nimport { useAppColorScheme } from '../../theme';\n\nexport interface CredentialGroupHeaderProps extends AccessibilityProps {\n accessory?: React.ComponentType<any> | React.ReactElement;\n name: string;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\nconst CredentialGroupHeader: FC<CredentialGroupHeaderProps> = ({ accessory, name, style, testID, ...props }) => {\n const colorScheme = useAppColorScheme();\n\n const accessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!accessory) {\n return undefined;\n }\n if (React.isValidElement(accessory)) {\n return accessory;\n } else {\n const AccessoryComponent = accessory as React.ComponentType<any>;\n return <AccessoryComponent />;\n }\n }, [accessory]);\n\n return (\n <View {...props} style={[styles.container, style]} testID={testID}>\n <View style={styles.text}>\n <Typography\n color={colorScheme.white}\n ellipsizeMode={'tail'}\n numberOfLines={1}\n preset=\"regular\"\n style={styles.nameText}\n testID={concatTestID(testID, 'name')}>\n {name}\n </Typography>\n </View>\n {accessoryView && <View style={styles.accessory}>{accessoryView}</View>}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n accessory: {\n alignItems: 'center',\n height: 44,\n justifyContent: 'center',\n width: 44,\n },\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 60,\n padding: 8,\n },\n nameText: {\n marginTop: 2,\n },\n text: {\n flex: 1,\n justifyContent: 'center',\n },\n});\n\nexport default CredentialGroupHeader;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAAwCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEzF,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,UAAU,QAAQ,YAAY;AACvC,SAASC,iBAAiB,QAAQ,aAAa;AAS/C,MAAMC,qBAAqD,GAAGA,CAAC;EAAEC,SAAS;EAAEC,IAAI;EAAEC,KAAK;EAAEC,MAAM;EAAE,GAAGC;AAAM,CAAC,KAAK;EAC9G,MAAMC,WAAW,GAAGP,iBAAiB,CAAC,CAAC;EAEvC,MAAMQ,aAA6C,GAAGb,OAAO,CAAC,MAAM;IAClE,IAAI,CAACO,SAAS,EAAE;MACd,OAAOO,SAAS;IAClB;IACA,iBAAIf,KAAK,CAACgB,cAAc,CAACR,SAAS,CAAC,EAAE;MACnC,OAAOA,SAAS;IAClB,CAAC,MAAM;MACL,MAAMS,kBAAkB,GAAGT,SAAqC;MAChE,oBAAOR,KAAA,CAAAkB,aAAA,CAACD,kBAAkB,MAAE,CAAC;IAC/B;EACF,CAAC,EAAE,CAACT,SAAS,CAAC,CAAC;EAEf,oBACER,KAAA,CAAAkB,aAAA,CAACf,IAAI,EAAAgB,QAAA,KAAKP,KAAK;IAAEF,KAAK,EAAE,CAACU,MAAM,CAACC,SAAS,EAAEX,KAAK,CAAE;IAACC,MAAM,EAAEA;EAAO,iBAChEX,KAAA,CAAAkB,aAAA,CAACf,IAAI;IAACO,KAAK,EAAEU,MAAM,CAACE;EAAK,gBACvBtB,KAAA,CAAAkB,aAAA,CAACb,UAAU;IACTkB,KAAK,EAAEV,WAAW,CAACW,KAAM;IACzBC,aAAa,EAAE,MAAO;IACtBC,aAAa,EAAE,CAAE;IACjBC,MAAM,EAAC,SAAS;IAChBjB,KAAK,EAAEU,MAAM,CAACQ,QAAS;IACvBjB,MAAM,EAAEP,YAAY,CAACO,MAAM,EAAE,MAAM;EAAE,GACpCF,IACS,CACR,CAAC,EACNK,aAAa,iBAAId,KAAA,CAAAkB,aAAA,CAACf,IAAI;IAACO,KAAK,EAAEU,MAAM,CAACZ;EAAU,GAAEM,aAAoB,CAClE,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGlB,UAAU,CAAC2B,MAAM,CAAC;EAC/BrB,SAAS,EAAE;IACTsB,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT,CAAC;EACDZ,SAAS,EAAE;IACTS,UAAU,EAAE,QAAQ;IACpBI,aAAa,EAAE,KAAK;IACpBH,MAAM,EAAE,EAAE;IACVI,OAAO,EAAE;EACX,CAAC;EACDP,QAAQ,EAAE;IACRQ,SAAS,EAAE;EACb,CAAC;EACDd,IAAI,EAAE;IACJe,IAAI,EAAE,CAAC;IACPL,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAezB,qBAAqB","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import CredentialGroupHeader from './credential-group-header';
2
+ export { CredentialGroupHeader };
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CredentialGroupHeader"],"sources":["index.ts"],"sourcesContent":["import type { CredentialGroupHeaderProps } from './credential-group-header';\nimport CredentialGroupHeader from './credential-group-header';\n\nexport { CredentialGroupHeader, CredentialGroupHeaderProps };\n"],"mappings":"AACA,OAAOA,qBAAqB,MAAM,2BAA2B;AAE7D,SAASA,qBAAqB","ignoreList":[]}
@@ -6,4 +6,5 @@ export { CredentialAttributeItem };
6
6
  export { Barcode, Mrz, QrCode };
7
7
  export { Selector, SelectorStatus };
8
8
  export * from './card';
9
+ export * from './group';
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialAttributeItem","Barcode","Mrz","QrCode","Selector","SelectorStatus"],"sources":["index.ts"],"sourcesContent":["import type {\n CredentialAttribute,\n CredentialAttributeItemProps,\n CredentialAttributeValue,\n} from './credential-attribute-item';\nimport CredentialAttributeItem from './credential-attribute-item';\nimport { Barcode, Mrz, QrCode } from './credential-carousel-images';\nimport Selector from './selector';\nimport { SelectorStatus } from './selector-status';\n\nexport { CredentialAttribute, CredentialAttributeItem, CredentialAttributeItemProps, CredentialAttributeValue };\nexport { Barcode, Mrz, QrCode };\nexport { Selector, SelectorStatus };\nexport * from './card';\n"],"mappings":"AAKA,OAAOA,uBAAuB,MAAM,6BAA6B;AACjE,SAASC,OAAO,EAAEC,GAAG,EAAEC,MAAM,QAAQ,8BAA8B;AACnE,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAA8BL,uBAAuB;AACrD,SAASC,OAAO,EAAEC,GAAG,EAAEC,MAAM;AAC7B,SAASC,QAAQ,EAAEC,cAAc;AACjC,cAAc,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["CredentialAttributeItem","Barcode","Mrz","QrCode","Selector","SelectorStatus"],"sources":["index.ts"],"sourcesContent":["import type {\n CredentialAttribute,\n CredentialAttributeItemProps,\n CredentialAttributeValue,\n} from './credential-attribute-item';\nimport CredentialAttributeItem from './credential-attribute-item';\nimport { Barcode, Mrz, QrCode } from './credential-carousel-images';\nimport Selector from './selector';\nimport { SelectorStatus } from './selector-status';\n\nexport { CredentialAttribute, CredentialAttributeItem, CredentialAttributeItemProps, CredentialAttributeValue };\nexport { Barcode, Mrz, QrCode };\nexport { Selector, SelectorStatus };\nexport * from './card';\nexport * from './group';\n"],"mappings":"AAKA,OAAOA,uBAAuB,MAAM,6BAA6B;AACjE,SAASC,OAAO,EAAEC,GAAG,EAAEC,MAAM,QAAQ,8BAA8B;AACnE,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAA8BL,uBAAuB;AACrD,SAASC,OAAO,EAAEC,GAAG,EAAEC,MAAM;AAC7B,SAASC,QAAQ,EAAEC,cAAc;AACjC,cAAc,QAAQ;AACtB,cAAc,SAAS","ignoreList":[]}
@@ -9,12 +9,16 @@ const FoldableSearchHeader = ({
9
9
  staticHeader = false,
10
10
  scrollOffset,
11
11
  searchBar,
12
- header
12
+ header,
13
+ withNotice
13
14
  }) => {
14
15
  const safeAreaInsets = useSafeAreaInsets();
15
16
  const colorScheme = useAppColorScheme();
16
17
  const [collapsed, setCollapsed] = useState(header ? false : true);
17
18
  const [headerHeight, setHeaderHeight] = useState();
19
+ const containerPaddingStyle = {
20
+ paddingTop: withNotice ? 15 : safeAreaInsets.top
21
+ };
18
22
  useEffect(() => {
19
23
  const id = scrollOffset.addListener(({
20
24
  value
@@ -34,13 +38,11 @@ const FoldableSearchHeader = ({
34
38
  }, [scrollOffset, searchBar, headerHeight]);
35
39
  const playHeaderFoldAnimation = !staticHeader && headerHeight;
36
40
  const scrollHeaderAnimatedStyle = playHeaderFoldAnimation ? {
37
- transform: [{
38
- translateY: scrollOffset.interpolate({
39
- extrapolate: 'clamp',
40
- inputRange: [0, headerHeight],
41
- outputRange: [0, -headerHeight]
42
- })
43
- }]
41
+ paddingTop: scrollOffset.interpolate({
42
+ extrapolate: 'clamp',
43
+ inputRange: [0, headerHeight],
44
+ outputRange: [headerHeight, 0]
45
+ })
44
46
  } : undefined;
45
47
  const fadeHeaderOutAnimatedStyle = playHeaderFoldAnimation ? {
46
48
  opacity: scrollOffset.interpolate({
@@ -53,24 +55,34 @@ const FoldableSearchHeader = ({
53
55
  setHeaderHeight(event.nativeEvent.layout.height);
54
56
  }, [setHeaderHeight]);
55
57
  return /*#__PURE__*/React.createElement(Animated.View, {
56
- style: [styles.headerContainer, {
57
- paddingTop: safeAreaInsets.top
58
- }, scrollHeaderAnimatedStyle]
58
+ style: [styles.headerContainer, containerPaddingStyle, withNotice ? styles.noticeBorderRadius : undefined]
59
+ }, /*#__PURE__*/React.createElement(View, {
60
+ style: [styles.blurWrapper, StyleSheet.absoluteFill]
59
61
  }, /*#__PURE__*/React.createElement(BlurView, {
60
62
  blurStyle: 'header',
61
63
  color: colorScheme.background,
62
- style: StyleSheet.absoluteFill
63
- }), /*#__PURE__*/React.createElement(View, null, header && /*#__PURE__*/React.createElement(Animated.View, {
64
- onLayout: onHeaderLayout,
65
- style: fadeHeaderOutAnimatedStyle
66
- }, header), searchBar && /*#__PURE__*/React.createElement(AnimatedSearchBar, _extends({}, searchBar, {
64
+ style: [StyleSheet.absoluteFill, withNotice ? styles.noticeBorderRadius : undefined]
65
+ })), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Animated.View, {
66
+ style: scrollHeaderAnimatedStyle
67
+ }, searchBar && /*#__PURE__*/React.createElement(AnimatedSearchBar, _extends({}, searchBar, {
67
68
  collapsed: collapsed
68
- }))));
69
+ }))), header && /*#__PURE__*/React.createElement(Animated.View, {
70
+ onLayout: onHeaderLayout,
71
+ style: [styles.headerContainer, fadeHeaderOutAnimatedStyle]
72
+ }, header)));
69
73
  };
70
74
  const styles = StyleSheet.create({
75
+ blurWrapper: {
76
+ overflow: 'hidden'
77
+ },
71
78
  headerContainer: {
72
79
  position: 'absolute',
73
80
  width: '100%'
81
+ },
82
+ noticeBorderRadius: {
83
+ borderTopLeftRadius: 30,
84
+ borderTopRightRadius: 30,
85
+ overflow: 'hidden'
74
86
  }
75
87
  });
76
88
  export default FoldableSearchHeader;
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useState","Animated","StyleSheet","View","useSafeAreaInsets","BlurView","AnimatedSearchBar","useAppColorScheme","FoldableSearchHeader","staticHeader","scrollOffset","searchBar","header","safeAreaInsets","colorScheme","collapsed","setCollapsed","headerHeight","setHeaderHeight","id","addListener","value","removeListener","playHeaderFoldAnimation","scrollHeaderAnimatedStyle","transform","translateY","interpolate","extrapolate","inputRange","outputRange","undefined","fadeHeaderOutAnimatedStyle","opacity","onHeaderLayout","event","nativeEvent","layout","height","createElement","style","styles","headerContainer","paddingTop","top","blurStyle","color","background","absoluteFill","onLayout","_extends","create","position","width"],"sources":["foldable-header.tsx"],"sourcesContent":["import React, { FunctionComponent, ReactElement, useCallback, useEffect, useState } from 'react';\nimport { Animated, LayoutChangeEvent, StyleSheet, View, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport BlurView from '../blur/blur-view';\nimport AnimatedSearchBar, { AnimatedSearchBarProps } from '../searchbar/animated-search-bar';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type FoldableHeaderProps = {\n header: ReactElement;\n scrollOffset: Animated.Value;\n searchBar?: Omit<AnimatedSearchBarProps, 'collapsed'>;\n // if true, the header won't fold / fade out on scroll\n staticHeader?: boolean;\n};\n\nconst FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({\n staticHeader = false,\n scrollOffset,\n searchBar,\n header,\n}) => {\n const safeAreaInsets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const [collapsed, setCollapsed] = useState(header ? false : true);\n const [headerHeight, setHeaderHeight] = useState<number>();\n\n useEffect(() => {\n const id = scrollOffset.addListener(({ value }) => {\n if (!headerHeight) {\n return;\n }\n\n if (value > headerHeight) {\n setCollapsed(true);\n } else {\n setCollapsed(false);\n }\n });\n return () => {\n scrollOffset.removeListener(id);\n };\n }, [scrollOffset, searchBar, headerHeight]);\n\n const playHeaderFoldAnimation = !staticHeader && headerHeight;\n\n const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation\n ? {\n transform: [\n {\n translateY: scrollOffset.interpolate({\n extrapolate: 'clamp',\n inputRange: [0, headerHeight],\n outputRange: [0, -headerHeight],\n }),\n },\n ],\n }\n : undefined;\n\n const fadeHeaderOutAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation\n ? {\n opacity: scrollOffset.interpolate({\n extrapolate: 'clamp',\n inputRange: [0, headerHeight / 2],\n outputRange: [1, 0],\n }),\n }\n : undefined;\n\n const onHeaderLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setHeaderHeight(event.nativeEvent.layout.height);\n },\n [setHeaderHeight],\n );\n\n return (\n <Animated.View\n style={[\n styles.headerContainer,\n {\n paddingTop: safeAreaInsets.top,\n },\n scrollHeaderAnimatedStyle,\n ]}>\n <BlurView blurStyle={'header'} color={colorScheme.background} style={StyleSheet.absoluteFill} />\n <View>\n {header && (\n <Animated.View onLayout={onHeaderLayout} style={fadeHeaderOutAnimatedStyle}>\n {header}\n </Animated.View>\n )}\n {searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n headerContainer: {\n position: 'absolute',\n width: '100%',\n },\n});\n\nexport default FoldableSearchHeader;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAqCC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAChG,SAASC,QAAQ,EAAqBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACvF,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,iBAAiB,MAAkC,kCAAkC;AAC5F,SAASC,iBAAiB,QAAQ,+BAA+B;AAUjE,MAAMC,oBAA4D,GAAGA,CAAC;EACpEC,YAAY,GAAG,KAAK;EACpBC,YAAY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,YAAY,GAAG,CAAC,CAAC;MACjCa,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IACpB,CAAC;EACH,CAAC,GACDC,SAAS;EAEb,MAAMG,cAAc,GAAGpC,WAAW,CAC/BqC,KAAwB,IAAK;IAC5BjB,eAAe,CAACiB,KAAK,CAACC,WAAW,CAACC,MAAM,CAACC,MAAM,CAAC;EAClD,CAAC,EACD,CAACpB,eAAe,CAClB,CAAC;EAED,oBACErB,KAAA,CAAA0C,aAAA,CAACtC,QAAQ,CAACE,IAAI;IACZqC,KAAK,EAAE,CACLC,MAAM,CAACC,eAAe,EACtB;MACEC,UAAU,EAAE9B,cAAc,CAAC+B;IAC7B,CAAC,EACDpB,yBAAyB;EACzB,gBACF3B,KAAA,CAAA0C,aAAA,CAAClC,QAAQ;IAACwC,SAAS,EAAE,QAAS;IAACC,KAAK,EAAEhC,WAAW,CAACiC,UAAW;IAACP,KAAK,EAAEtC,UAAU,CAAC8C;EAAa,CAAE,CAAC,eAChGnD,KAAA,CAAA0C,aAAA,CAACpC,IAAI,QACFS,MAAM,iBACLf,KAAA,CAAA0C,aAAA,CAACtC,QAAQ,CAACE,IAAI;IAAC8C,QAAQ,EAAEf,cAAe;IAACM,KAAK,EAAER;EAA2B,GACxEpB,MACY,CAChB,EACAD,SAAS,iBAAId,KAAA,CAAA0C,aAAA,CAACjC,iBAAiB,EAAA4C,QAAA,KAAKvC,SAAS;IAAEI,SAAS,EAAEA;EAAU,EAAE,CACnE,CACO,CAAC;AAEpB,CAAC;AAED,MAAM0B,MAAM,GAAGvC,UAAU,CAACiD,MAAM,CAAC;EAC/BT,eAAe,EAAE;IACfU,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAe7C,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useState","Animated","StyleSheet","View","useSafeAreaInsets","BlurView","AnimatedSearchBar","useAppColorScheme","FoldableSearchHeader","staticHeader","scrollOffset","searchBar","header","withNotice","safeAreaInsets","colorScheme","collapsed","setCollapsed","headerHeight","setHeaderHeight","containerPaddingStyle","paddingTop","top","id","addListener","value","removeListener","playHeaderFoldAnimation","scrollHeaderAnimatedStyle","interpolate","extrapolate","inputRange","outputRange","undefined","fadeHeaderOutAnimatedStyle","opacity","onHeaderLayout","event","nativeEvent","layout","height","createElement","style","styles","headerContainer","noticeBorderRadius","blurWrapper","absoluteFill","blurStyle","color","background","_extends","onLayout","create","overflow","position","width","borderTopLeftRadius","borderTopRightRadius"],"sources":["foldable-header.tsx"],"sourcesContent":["import React, { FunctionComponent, ReactElement, useCallback, useEffect, useState } from 'react';\nimport { Animated, LayoutChangeEvent, StyleSheet, View, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport BlurView from '../blur/blur-view';\nimport AnimatedSearchBar, { AnimatedSearchBarProps } from '../searchbar/animated-search-bar';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type FoldableHeaderProps = {\n header: ReactElement;\n scrollOffset: Animated.Value;\n searchBar?: Omit<AnimatedSearchBarProps, 'collapsed'>;\n // if true, the header won't fold / fade out on scroll\n staticHeader?: boolean;\n withNotice?: boolean;\n};\n\nconst FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({\n staticHeader = false,\n scrollOffset,\n searchBar,\n header,\n withNotice,\n}) => {\n const safeAreaInsets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const [collapsed, setCollapsed] = useState(header ? false : true);\n const [headerHeight, setHeaderHeight] = useState<number>();\n\n const containerPaddingStyle = {\n paddingTop: withNotice ? 15 : safeAreaInsets.top,\n };\n\n useEffect(() => {\n const id = scrollOffset.addListener(({ value }) => {\n if (!headerHeight) {\n return;\n }\n\n if (value > headerHeight) {\n setCollapsed(true);\n } else {\n setCollapsed(false);\n }\n });\n return () => {\n scrollOffset.removeListener(id);\n };\n }, [scrollOffset, searchBar, headerHeight]);\n\n const playHeaderFoldAnimation = !staticHeader && headerHeight;\n\n const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation\n ? {\n paddingTop: scrollOffset.interpolate({\n extrapolate: 'clamp',\n inputRange: [0, headerHeight],\n outputRange: [headerHeight, 0]\n })\n }\n : undefined;\n\n const fadeHeaderOutAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation\n ? {\n opacity: scrollOffset.interpolate({\n extrapolate: 'clamp',\n inputRange: [0, headerHeight / 2],\n outputRange: [1, 0],\n }),\n }\n : undefined;\n\n const onHeaderLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setHeaderHeight(event.nativeEvent.layout.height);\n },\n [setHeaderHeight],\n );\n\n return (\n <Animated.View\n style={[\n styles.headerContainer,\n containerPaddingStyle,\n withNotice ? styles.noticeBorderRadius : undefined,\n ]}>\n <View style={[styles.blurWrapper, StyleSheet.absoluteFill]}>\n <BlurView blurStyle={'header'} color={colorScheme.background} style={[\n StyleSheet.absoluteFill,\n withNotice ? styles.noticeBorderRadius : undefined,\n ]} />\n </View>\n <View>\n <Animated.View style={scrollHeaderAnimatedStyle}>\n {searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}\n </Animated.View>\n {header && (\n <Animated.View onLayout={onHeaderLayout} style={[styles.headerContainer, fadeHeaderOutAnimatedStyle]}>\n {header}\n </Animated.View>\n )}\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n blurWrapper: {\n overflow: 'hidden',\n },\n headerContainer: {\n position: 'absolute',\n width: '100%',\n },\n noticeBorderRadius: {\n borderTopLeftRadius: 30,\n borderTopRightRadius: 30,\n overflow: 'hidden',\n },\n});\n\nexport default FoldableSearchHeader;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAqCC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAChG,SAASC,QAAQ,EAAqBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;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B,SAAS,iBAAId,KAAA,CAAA4C,aAAA,CAACnC,iBAAiB,EAAA6C,QAAA,KAAKxC,SAAS;IAAEK,SAAS,EAAEA;EAAU,EAAE,CAC1D,CAAC,EACfJ,MAAM,iBACLf,KAAA,CAAA4C,aAAA,CAACxC,QAAQ,CAACE,IAAI;IAACiD,QAAQ,EAAEhB,cAAe;IAACM,KAAK,EAAE,CAACC,MAAM,CAACC,eAAe,EAAEV,0BAA0B;EAAE,GAClGtB,MACY,CAEb,CACO,CAAC;AAEpB,CAAC;AAED,MAAM+B,MAAM,GAAGzC,UAAU,CAACmD,MAAM,CAAC;EAC/BP,WAAW,EAAE;IACXQ,QAAQ,EAAE;EACZ,CAAC;EACDV,eAAe,EAAE;IACfW,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT,CAAC;EACDX,kBAAkB,EAAE;IAClBY,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAe9C,oBAAoB","ignoreList":[]}
@@ -18,6 +18,7 @@ export * from './loader';
18
18
  export * from './nerd-view';
19
19
  export * from './nfc';
20
20
  export * from './pin';
21
+ export * from './proof-request';
21
22
  export * from './screens';
22
23
  export * from './searchbar';
23
24
  export * from './settings';
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './accessibility';\nexport * from './action-modal';\nexport * from './activity-indicator';\nexport * from './blur';\nexport * from './buttons';\nexport * from './camera';\nexport * from './control';\nexport * from './credential';\nexport * from './detail';\nexport * from './entity';\nexport * from './header';\nexport * from './history';\nexport * from './icons';\nexport * from './image';\nexport * from './input';\nexport * from './list';\nexport * from './loader';\nexport * from './nerd-view';\nexport * from './nfc';\nexport * from './pin';\nexport * from './screens';\nexport * from './searchbar';\nexport * from './settings';\nexport * from './state';\nexport * from './text';\nexport * from './theme';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,aAAa;AAC3B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './accessibility';\nexport * from './action-modal';\nexport * from './activity-indicator';\nexport * from './blur';\nexport * from './buttons';\nexport * from './camera';\nexport * from './control';\nexport * from './credential';\nexport * from './detail';\nexport * from './entity';\nexport * from './header';\nexport * from './history';\nexport * from './icons';\nexport * from './image';\nexport * from './input';\nexport * from './list';\nexport * from './loader';\nexport * from './nerd-view';\nexport * from './nfc';\nexport * from './pin';\nexport * from './proof-request';\nexport * from './screens';\nexport * from './searchbar';\nexport * from './settings';\nexport * from './state';\nexport * from './text';\nexport * from './theme';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,aAAa;AAC3B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,iBAAiB;AAC/B,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS","ignoreList":[]}
@@ -3,11 +3,11 @@ import React from 'react';
3
3
  import { Platform, StyleSheet, View } from 'react-native';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
  import { Button } from '../buttons/button';
6
+ import ShareButton from '../buttons/share-button';
6
7
  import NavigationHeader from '../header/navigation-header';
7
8
  import Typography from '../text/typography';
8
9
  import { useAppColorScheme } from '../theme/color-scheme-context';
9
10
  import LoaderView from './loader';
10
- import ShareButton from '../buttons/share-button';
11
11
  const LoadingResultScreen = ({
12
12
  button,
13
13
  header,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","StyleSheet","View","useSafeAreaInsets","Button","NavigationHeader","Typography","useAppColorScheme","LoaderView","ShareButton","LoadingResultScreen","button","header","loader","label","loaderProps","secondaryButton","button2","shareButton","style","tertiaryButton","button3","viewProps","colorScheme","top","bottom","headerPaddingStyle","OS","paddingTop","modalHandleVisible","styles","modalHeaderWithoutHandle","buttonsWrapperMarginStyle","marginBottom","createElement","_extends","container","backgroundColor","background","headerWrapper","loaderWrapper","align","color","text","preset","buttonWrapper","title","create","gap","height","justifyContent","padding","alignItems","flex","flexDirection","marginHorizontal","marginTop","alignSelf"],"sources":["loading-result.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Button, ButtonProps } from '../buttons/button';\nimport NavigationHeader, { NavigationHeaderProps } from '../header/navigation-header';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport LoaderView, { LoaderViewProps } from './loader';\nimport ShareButton, { ShareButtonProps } from '../buttons/share-button';\n\nexport type LoadingResultScreenProps = ViewProps & {\n button?: ButtonProps;\n header?: NavigationHeaderProps;\n loader: LoaderViewProps & {\n label?: string;\n };\n secondaryButton?: ButtonProps;\n shareButton?: ShareButtonProps;\n tertiaryButton?: ButtonProps;\n};\n\nconst LoadingResultScreen: FC<LoadingResultScreenProps> = ({\n button,\n header,\n loader: { label, ...loaderProps },\n secondaryButton: button2,\n shareButton,\n style,\n tertiaryButton: button3,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const { top, bottom } = useSafeAreaInsets();\n\n let headerPaddingStyle: ViewStyle | undefined;\n if (Platform.OS === 'android') {\n headerPaddingStyle = {\n paddingTop: top,\n };\n } else if (!header?.modalHandleVisible && Platform.OS === 'ios') {\n headerPaddingStyle = styles.modalHeaderWithoutHandle;\n }\n\n let buttonsWrapperMarginStyle: ViewStyle = {\n marginBottom: bottom,\n };\n\n return (\n <View style={[styles.container, { backgroundColor: colorScheme.background }, style]} {...viewProps}>\n <View style={[styles.headerWrapper, headerPaddingStyle]}>\n <NavigationHeader {...header} />\n </View>\n <View style={styles.loaderWrapper}>\n <LoaderView {...loaderProps} />\n <Typography align=\"center\" color={colorScheme.text} preset=\"regular\" style={styles.label}>\n {label}\n </Typography>\n </View>\n <View style={[styles.buttonWrapper, buttonsWrapperMarginStyle]}>\n {shareButton && <ShareButton {...shareButton} style={styles.shareButton} />}\n {button && <Button {...button}>{button.title}</Button>}\n {button2 && <Button {...button2}>{button2.title}</Button>}\n {button3 && <Button {...button3}>{button3.title}</Button>}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttonWrapper: {\n gap: 12,\n height: 274,\n justifyContent: 'flex-end',\n padding: 12,\n },\n container: {\n alignItems: 'stretch',\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n headerWrapper: {\n height: 215,\n },\n label: {\n marginHorizontal: 20,\n marginTop: 20,\n },\n loaderWrapper: {\n alignItems: 'center',\n flexDirection: 'column',\n height: 108,\n justifyContent: 'space-between',\n },\n modalHeaderWithoutHandle: {\n paddingTop: 15,\n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AC/BF,aAAa,EAAE;IACbG,GAAG,EAAE,EAAE;IACPC,MAAM,EAAE,GAAG;IACXC,cAAc,EAAE,UAAU;IAC1BC,OAAO,EAAE;EACX,CAAC;EACDf,SAAS,EAAE;IACTgB,UAAU,EAAE,SAAS;IACrBC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,QAAQ;IACvBJ,cAAc,EAAE;EAClB,CAAC;EACDX,aAAa,EAAE;IACbU,MAAM,EAAE;EACV,CAAC;EACDnC,KAAK,EAAE;IACLyC,gBAAgB,EAAE,EAAE;IACpBC,SAAS,EAAE;EACb,CAAC;EACDhB,aAAa,EAAE;IACbY,UAAU,EAAE,QAAQ;IACpBE,aAAa,EAAE,QAAQ;IACvBL,MAAM,EAAE,GAAG;IACXC,cAAc,EAAE;EAClB,CAAC;EACDnB,wBAAwB,EAAE;IACxBH,UAAU,EAAE;EACd,CAAC;EACDV,WAAW,EAAE;IACXuC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,eAAe/C,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","StyleSheet","View","useSafeAreaInsets","Button","ShareButton","NavigationHeader","Typography","useAppColorScheme","LoaderView","LoadingResultScreen","button","header","loader","label","loaderProps","secondaryButton","button2","shareButton","style","tertiaryButton","button3","viewProps","colorScheme","top","bottom","headerPaddingStyle","OS","paddingTop","modalHandleVisible","styles","modalHeaderWithoutHandle","buttonsWrapperMarginStyle","marginBottom","createElement","_extends","container","backgroundColor","background","headerWrapper","loaderWrapper","align","color","text","preset","buttonWrapper","title","create","gap","height","justifyContent","padding","alignItems","flex","flexDirection","marginHorizontal","marginTop","alignSelf"],"sources":["loading-result.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Button, ButtonProps } from '../buttons/button';\nimport ShareButton, { ShareButtonProps } from '../buttons/share-button';\nimport NavigationHeader, { NavigationHeaderProps } from '../header/navigation-header';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport LoaderView, { LoaderViewProps } from './loader';\n\nexport type LoadingResultScreenProps = ViewProps & {\n button?: ButtonProps;\n header?: NavigationHeaderProps;\n loader: LoaderViewProps & {\n label?: string;\n };\n secondaryButton?: ButtonProps;\n shareButton?: ShareButtonProps;\n tertiaryButton?: ButtonProps;\n};\n\nconst LoadingResultScreen: FC<LoadingResultScreenProps> = ({\n button,\n header,\n loader: { label, ...loaderProps },\n secondaryButton: button2,\n shareButton,\n style,\n tertiaryButton: button3,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const { top, bottom } = useSafeAreaInsets();\n\n let headerPaddingStyle: ViewStyle | undefined;\n if (Platform.OS === 'android') {\n headerPaddingStyle = {\n paddingTop: top,\n };\n } else if (!header?.modalHandleVisible && Platform.OS === 'ios') {\n headerPaddingStyle = styles.modalHeaderWithoutHandle;\n }\n\n let buttonsWrapperMarginStyle: ViewStyle = {\n marginBottom: bottom,\n };\n\n return (\n <View style={[styles.container, { backgroundColor: colorScheme.background }, style]} {...viewProps}>\n <View style={[styles.headerWrapper, headerPaddingStyle]}>\n <NavigationHeader {...header} />\n </View>\n <View style={styles.loaderWrapper}>\n <LoaderView {...loaderProps} />\n <Typography align=\"center\" color={colorScheme.text} preset=\"regular\" style={styles.label}>\n {label}\n </Typography>\n </View>\n <View style={[styles.buttonWrapper, buttonsWrapperMarginStyle]}>\n {shareButton && <ShareButton {...shareButton} style={styles.shareButton} />}\n {button && <Button {...button}>{button.title}</Button>}\n {button2 && <Button {...button2}>{button2.title}</Button>}\n {button3 && <Button {...button3}>{button3.title}</Button>}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttonWrapper: {\n gap: 12,\n height: 274,\n justifyContent: 'flex-end',\n padding: 12,\n },\n container: {\n alignItems: 'stretch',\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n headerWrapper: {\n height: 215,\n },\n label: {\n marginHorizontal: 20,\n marginTop: 20,\n },\n loaderWrapper: {\n alignItems: 'center',\n flexDirection: 'column',\n height: 108,\n justifyContent: 'space-between',\n },\n modalHeaderWithoutHandle: {\n paddingTop: 15,\n },\n shareButton: {\n alignSelf: 'center',\n },\n});\n\nexport default LoadingResultScreen;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAC/E,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM,QAAqB,mBAAmB;AACvD,OAAOC,WAAW,MAA4B,yBAAyB;AACvE,OAAOC,gBAAgB,MAAiC,6BAA6B;AACrF,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,OAAOC,UAAU,MAA2B,UAAU;AAatD,MAAMC,mBAAiD,GAAGA,CAAC;EACzDC,MAAM;EACNC,MAAM;EACNC,MAAM,EAAE;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EACjCC,eAAe,EAAEC,OAAO;EACxBC,WAAW;EACXC,KAAK;EACLC,cAAc,EAAEC,OAAO;EACvB,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGf,iBAAiB,CAAC,CAAC;EACvC,MAAM;IAAEgB,GAAG;IAAEC;EAAO,CAAC,GAAGtB,iBAAiB,CAAC,CAAC;EAE3C,IAAIuB,kBAAyC;EAC7C,IAAI1B,QAAQ,CAAC2B,EAAE,KAAK,SAAS,EAAE;IAC7BD,kBAAkB,GAAG;MACnBE,UAAU,EAAEJ;IACd,CAAC;EACH,CAAC,MAAM,IAAI,EAACZ,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEiB,kBAAkB,KAAI7B,QAAQ,CAAC2B,EAAE,KAAK,KAAK,EAAE;IAC/DD,kBAAkB,GAAGI,MAAM,CAACC,wBAAwB;EACtD;EAEA,IAAI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