@procivis/one-react-native-components 0.3.115 → 0.3.130

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/credential/credential.js +2 -1
  2. package/lib/commonjs/components/credential/credential.js.map +1 -1
  3. package/lib/commonjs/components/history/history-list-item-icon.js +3 -3
  4. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  5. package/lib/commonjs/components/history/history-list-item.js +2 -8
  6. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  7. package/lib/commonjs/components/history/history-list-screen.js +1 -1
  8. package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
  9. package/lib/commonjs/components/index.js +11 -11
  10. package/lib/commonjs/components/index.js.map +1 -1
  11. package/lib/commonjs/components/proof-request/v1/select-credential.js +2 -1
  12. package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
  13. package/lib/commonjs/components/proof-request/v1/share-credential.js +2 -1
  14. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
  15. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js +2 -1
  16. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
  17. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +3 -1
  18. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  19. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +4 -2
  20. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  21. package/lib/commonjs/components/trust-info/index.js +29 -0
  22. package/lib/commonjs/components/trust-info/index.js.map +1 -0
  23. package/lib/commonjs/components/trust-info/trust-info.js +79 -0
  24. package/lib/commonjs/components/trust-info/trust-info.js.map +1 -0
  25. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
  26. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  27. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  28. package/lib/commonjs/ui-components/header/header.js +2 -0
  29. package/lib/commonjs/ui-components/header/header.js.map +1 -1
  30. package/lib/commonjs/ui-components/history/history-details.js +2 -2
  31. package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
  32. package/lib/commonjs/ui-components/icons/contact.js +45 -0
  33. package/lib/commonjs/ui-components/icons/contact.js.map +1 -0
  34. package/lib/commonjs/ui-components/icons/credential.js +3 -3
  35. package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
  36. package/lib/commonjs/ui-components/icons/icons.js +20 -1
  37. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  38. package/lib/commonjs/ui-components/icons/index.js +11 -0
  39. package/lib/commonjs/ui-components/icons/index.js.map +1 -1
  40. package/lib/commonjs/ui-components/loader/loading-result.js +2 -0
  41. package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
  42. package/lib/commonjs/ui-components/screens/index.js +7 -0
  43. package/lib/commonjs/ui-components/screens/index.js.map +1 -1
  44. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +28 -24
  45. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  46. package/lib/commonjs/ui-components/screens/trust-info-details-screen.js +384 -0
  47. package/lib/commonjs/ui-components/screens/trust-info-details-screen.js.map +1 -0
  48. package/lib/commonjs/utils/date.js +4 -5
  49. package/lib/commonjs/utils/date.js.map +1 -1
  50. package/lib/commonjs/utils/hooks/core/cache.js +8 -4
  51. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  52. package/lib/commonjs/utils/hooks/core/core-config.js +1 -6
  53. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  54. package/lib/commonjs/utils/hooks/core/core-context.js +0 -15
  55. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  56. package/lib/commonjs/utils/hooks/core/credentials.js +40 -1
  57. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  58. package/lib/commonjs/utils/hooks/core/index.js +0 -11
  59. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  60. package/lib/commonjs/utils/hooks/core/proofs.js +12 -1
  61. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  62. package/lib/commonjs/utils/hooks/core/trust-list.js +19 -3
  63. package/lib/commonjs/utils/hooks/core/trust-list.js.map +1 -1
  64. package/lib/commonjs/utils/hooks/core/verifier-instance.js +22 -3
  65. package/lib/commonjs/utils/hooks/core/verifier-instance.js.map +1 -1
  66. package/lib/commonjs/utils/hooks/core/wallet-unit.js +2 -2
  67. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  68. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +14 -14
  69. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  70. package/lib/commonjs/utils/parsers/credential-sharing.js +20 -18
  71. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  72. package/lib/commonjs/utils/parsers/credential.js +36 -22
  73. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  74. package/lib/commonjs/utils/parsers/query.js +1 -1
  75. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  76. package/lib/commonjs/utils/translations.js +15 -0
  77. package/lib/commonjs/utils/translations.js.map +1 -0
  78. package/lib/module/components/credential/credential.js +2 -1
  79. package/lib/module/components/credential/credential.js.map +1 -1
  80. package/lib/module/components/history/history-list-item-icon.js +3 -3
  81. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  82. package/lib/module/components/history/history-list-item.js +3 -9
  83. package/lib/module/components/history/history-list-item.js.map +1 -1
  84. package/lib/module/components/history/history-list-screen.js +1 -1
  85. package/lib/module/components/history/history-list-screen.js.map +1 -1
  86. package/lib/module/components/index.js +1 -1
  87. package/lib/module/components/index.js.map +1 -1
  88. package/lib/module/components/proof-request/v1/select-credential.js +2 -1
  89. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  90. package/lib/module/components/proof-request/v1/share-credential.js +2 -1
  91. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  92. package/lib/module/components/proof-request/v2/select-credential-v2.js +2 -1
  93. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  94. package/lib/module/components/proof-request/v2/share-credential-v2-group.js +3 -1
  95. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  96. package/lib/module/components/proof-request/v2/share-credential-v2.js +4 -2
  97. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  98. package/lib/module/components/trust-info/index.js +4 -0
  99. package/lib/module/components/trust-info/index.js.map +1 -0
  100. package/lib/module/components/trust-info/trust-info.js +70 -0
  101. package/lib/module/components/trust-info/trust-info.js.map +1 -0
  102. package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
  103. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  104. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  105. package/lib/module/ui-components/header/header.js +2 -0
  106. package/lib/module/ui-components/header/header.js.map +1 -1
  107. package/lib/module/ui-components/history/history-details.js +3 -3
  108. package/lib/module/ui-components/history/history-details.js.map +1 -1
  109. package/lib/module/ui-components/icons/contact.js +34 -0
  110. package/lib/module/ui-components/icons/contact.js.map +1 -0
  111. package/lib/module/ui-components/icons/credential.js +1 -1
  112. package/lib/module/ui-components/icons/credential.js.map +1 -1
  113. package/lib/module/ui-components/icons/icons.js +18 -0
  114. package/lib/module/ui-components/icons/icons.js.map +1 -1
  115. package/lib/module/ui-components/icons/index.js +1 -0
  116. package/lib/module/ui-components/icons/index.js.map +1 -1
  117. package/lib/module/ui-components/loader/loading-result.js +2 -0
  118. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  119. package/lib/module/ui-components/screens/index.js +2 -0
  120. package/lib/module/ui-components/screens/index.js.map +1 -1
  121. package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -25
  122. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  123. package/lib/module/ui-components/screens/trust-info-details-screen.js +375 -0
  124. package/lib/module/ui-components/screens/trust-info-details-screen.js.map +1 -0
  125. package/lib/module/utils/date.js +4 -5
  126. package/lib/module/utils/date.js.map +1 -1
  127. package/lib/module/utils/hooks/core/cache.js +8 -4
  128. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  129. package/lib/module/utils/hooks/core/core-config.js +0 -4
  130. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  131. package/lib/module/utils/hooks/core/core-context.js +0 -15
  132. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  133. package/lib/module/utils/hooks/core/credentials.js +37 -1
  134. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  135. package/lib/module/utils/hooks/core/index.js +0 -1
  136. package/lib/module/utils/hooks/core/index.js.map +1 -1
  137. package/lib/module/utils/hooks/core/proofs.js +10 -0
  138. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  139. package/lib/module/utils/hooks/core/trust-list.js +20 -4
  140. package/lib/module/utils/hooks/core/trust-list.js.map +1 -1
  141. package/lib/module/utils/hooks/core/verifier-instance.js +20 -2
  142. package/lib/module/utils/hooks/core/verifier-instance.js.map +1 -1
  143. package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
  144. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  145. package/lib/module/utils/parsers/credential-sharing-v2.js +15 -15
  146. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  147. package/lib/module/utils/parsers/credential-sharing.js +20 -18
  148. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  149. package/lib/module/utils/parsers/credential.js +37 -23
  150. package/lib/module/utils/parsers/credential.js.map +1 -1
  151. package/lib/module/utils/parsers/query.js +1 -1
  152. package/lib/module/utils/parsers/query.js.map +1 -1
  153. package/lib/module/utils/translations.js +8 -0
  154. package/lib/module/utils/translations.js.map +1 -0
  155. package/lib/typescript/components/credential/credential.d.ts +1 -0
  156. package/lib/typescript/components/history/history-list-item.d.ts +1 -1
  157. package/lib/typescript/components/index.d.ts +1 -1
  158. package/lib/typescript/components/proof-request/v1/select-credential.d.ts +1 -0
  159. package/lib/typescript/components/proof-request/v1/share-credential.d.ts +1 -0
  160. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +1 -0
  161. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +1 -0
  162. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +1 -0
  163. package/lib/typescript/components/trust-info/index.d.ts +3 -0
  164. package/lib/typescript/components/trust-info/trust-info.d.ts +19 -0
  165. package/lib/typescript/ui-components/header/header.d.ts +2 -0
  166. package/lib/typescript/ui-components/history/history-details.d.ts +2 -2
  167. package/lib/typescript/ui-components/icons/contact.d.ts +4 -0
  168. package/lib/typescript/ui-components/icons/credential.d.ts +1 -1
  169. package/lib/typescript/ui-components/icons/icons.d.ts +1 -0
  170. package/lib/typescript/ui-components/icons/index.d.ts +1 -0
  171. package/lib/typescript/ui-components/screens/index.d.ts +3 -0
  172. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +5 -12
  173. package/lib/typescript/ui-components/screens/trust-info-details-screen.d.ts +32 -0
  174. package/lib/typescript/utils/hooks/core/core-config.d.ts +0 -1
  175. package/lib/typescript/utils/hooks/core/core-context.d.ts +0 -1
  176. package/lib/typescript/utils/hooks/core/credentials.d.ts +5 -1
  177. package/lib/typescript/utils/hooks/core/index.d.ts +0 -1
  178. package/lib/typescript/utils/hooks/core/proofs.d.ts +2 -0
  179. package/lib/typescript/utils/hooks/core/trust-list.d.ts +1 -4
  180. package/lib/typescript/utils/hooks/core/verifier-instance.d.ts +2 -0
  181. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +2 -2
  182. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +3 -3
  183. package/lib/typescript/utils/parsers/credential-sharing.d.ts +6 -6
  184. package/lib/typescript/utils/parsers/credential.d.ts +5 -5
  185. package/lib/typescript/utils/parsers/query.d.ts +1 -1
  186. package/lib/typescript/utils/translations.d.ts +1 -0
  187. package/package.json +8 -8
  188. package/src/components/credential/credential.tsx +3 -0
  189. package/src/components/history/history-list-item-icon.tsx +2 -2
  190. package/src/components/history/history-list-item.tsx +4 -9
  191. package/src/components/history/history-list-screen.tsx +1 -1
  192. package/src/components/index.ts +1 -1
  193. package/src/components/proof-request/v1/select-credential.tsx +3 -1
  194. package/src/components/proof-request/v1/share-credential.tsx +3 -0
  195. package/src/components/proof-request/v2/select-credential-v2.tsx +3 -1
  196. package/src/components/proof-request/v2/share-credential-v2-group.tsx +4 -0
  197. package/src/components/proof-request/v2/share-credential-v2.tsx +5 -0
  198. package/src/components/trust-info/index.ts +4 -0
  199. package/src/components/trust-info/trust-info.tsx +90 -0
  200. package/src/ui-components/credential/card/credential-details-card.tsx +3 -2
  201. package/src/ui-components/header/foldable-header.tsx +10 -9
  202. package/src/ui-components/header/header.tsx +18 -3
  203. package/src/ui-components/history/history-details.tsx +4 -4
  204. package/src/ui-components/icons/contact.tsx +26 -0
  205. package/src/ui-components/icons/credential.tsx +1 -1
  206. package/src/ui-components/icons/icons.tsx +18 -0
  207. package/src/ui-components/icons/index.ts +1 -0
  208. package/src/ui-components/loader/loading-result.tsx +7 -1
  209. package/src/ui-components/screens/index.ts +3 -0
  210. package/src/ui-components/screens/nerd-mode-screen.tsx +49 -41
  211. package/src/ui-components/screens/trust-info-details-screen.tsx +472 -0
  212. package/src/utils/date.ts +7 -14
  213. package/src/utils/hooks/core/cache.ts +12 -4
  214. package/src/utils/hooks/core/core-config.ts +1 -6
  215. package/src/utils/hooks/core/core-context.tsx +0 -24
  216. package/src/utils/hooks/core/credentials.ts +43 -1
  217. package/src/utils/hooks/core/index.ts +0 -1
  218. package/src/utils/hooks/core/proofs.ts +14 -0
  219. package/src/utils/hooks/core/trust-list.ts +22 -11
  220. package/src/utils/hooks/core/verifier-instance.ts +23 -2
  221. package/src/utils/hooks/core/wallet-unit.ts +3 -3
  222. package/src/utils/parsers/credential-sharing-v2.tsx +29 -12
  223. package/src/utils/parsers/credential-sharing.tsx +33 -16
  224. package/src/utils/parsers/credential.ts +45 -14
  225. package/src/utils/parsers/query.ts +3 -0
  226. package/src/utils/translations.ts +10 -0
  227. package/lib/commonjs/components/entity/EntityButtons.js +0 -64
  228. package/lib/commonjs/components/entity/EntityButtons.js.map +0 -1
  229. package/lib/commonjs/components/entity/entity-attributes.js +0 -65
  230. package/lib/commonjs/components/entity/entity-attributes.js.map +0 -1
  231. package/lib/commonjs/components/entity/entity-details-with-buttons.js +0 -67
  232. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +0 -1
  233. package/lib/commonjs/components/entity/entity-details.js +0 -101
  234. package/lib/commonjs/components/entity/entity-details.js.map +0 -1
  235. package/lib/commonjs/components/entity/index.js +0 -14
  236. package/lib/commonjs/components/entity/index.js.map +0 -1
  237. package/lib/commonjs/utils/hooks/core/trust-entity.js +0 -147
  238. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +0 -1
  239. package/lib/module/components/entity/EntityButtons.js +0 -56
  240. package/lib/module/components/entity/EntityButtons.js.map +0 -1
  241. package/lib/module/components/entity/entity-attributes.js +0 -57
  242. package/lib/module/components/entity/entity-attributes.js.map +0 -1
  243. package/lib/module/components/entity/entity-details-with-buttons.js +0 -58
  244. package/lib/module/components/entity/entity-details-with-buttons.js.map +0 -1
  245. package/lib/module/components/entity/entity-details.js +0 -92
  246. package/lib/module/components/entity/entity-details.js.map +0 -1
  247. package/lib/module/components/entity/index.js +0 -3
  248. package/lib/module/components/entity/index.js.map +0 -1
  249. package/lib/module/utils/hooks/core/trust-entity.js +0 -136
  250. package/lib/module/utils/hooks/core/trust-entity.js.map +0 -1
  251. package/lib/typescript/components/entity/EntityButtons.d.ts +0 -14
  252. package/lib/typescript/components/entity/entity-attributes.d.ts +0 -15
  253. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +0 -18
  254. package/lib/typescript/components/entity/entity-details.d.ts +0 -21
  255. package/lib/typescript/components/entity/index.d.ts +0 -3
  256. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +0 -17
  257. package/src/components/entity/EntityButtons.tsx +0 -79
  258. package/src/components/entity/entity-attributes.tsx +0 -80
  259. package/src/components/entity/entity-details-with-buttons.tsx +0 -75
  260. package/src/components/entity/entity-details.tsx +0 -145
  261. package/src/components/entity/index.ts +0 -4
  262. package/src/utils/hooks/core/trust-entity.ts +0 -172
@@ -8,7 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
10
  var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
11
- var _entityDetailsWithButtons = _interopRequireDefault(require("../../components/entity/entity-details-with-buttons"));
11
+ var _components = require("../../components");
12
12
  var _contrastingStatusBar = _interopRequireDefault(require("../../utils/contrasting-status-bar"));
13
13
  var _testID = require("../../utils/testID");
14
14
  var _accessibilityHistoryWrappers = require("../accessibility/accessibilityHistoryWrappers");
@@ -36,11 +36,11 @@ const NerdModeScreen = ({
36
36
  labels,
37
37
  onClose,
38
38
  onCopyToClipboard,
39
+ onOpenTrustInfoDetails,
39
40
  entityCluster,
40
41
  testID,
41
42
  title
42
43
  }) => {
43
- var _entityCluster$testID;
44
44
  const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
45
45
  const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
46
46
  const scrollOffset = (0, _reactNativeReanimated.useSharedValue)(0);
@@ -68,6 +68,22 @@ const NerdModeScreen = ({
68
68
  [sectionTitle]: lastElement && !isSectionEntityCluster(lastElement) ? lastElement.attributeKey : ''
69
69
  };
70
70
  }, {});
71
+ const listHeader = (0, _react.useMemo)(() => {
72
+ var _entityCluster$testID, _entityCluster$trustI;
73
+ if (!entityCluster) {
74
+ return null;
75
+ }
76
+ return /*#__PURE__*/_react.default.createElement(_components.TrustInfo, {
77
+ labels: entityCluster.trustInfoLabels,
78
+ onPress: onOpenTrustInfoDetails && entityCluster.trustInformation ? () => onOpenTrustInfoDetails(entityCluster.trustInformation) : undefined,
79
+ style: [styles.entityCluster, {
80
+ backgroundColor: colorScheme.nerdView.background
81
+ }],
82
+ testID: (_entityCluster$testID = entityCluster.testID) !== null && _entityCluster$testID !== void 0 ? _entityCluster$testID : (0, _testID.concatTestID)(testID, 'trustInfo'),
83
+ textColor: colorScheme.white,
84
+ trustInformation: (_entityCluster$trustI = entityCluster.trustInformation) === null || _entityCluster$trustI === void 0 ? void 0 : _entityCluster$trustI.eudiEcosystem
85
+ });
86
+ }, [entityCluster, colorScheme.nerdView.background, colorScheme.white, onOpenTrustInfoDetails, testID]);
71
87
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_contrastingStatusBar.default, {
72
88
  backgroundColor: colorScheme.nerdView.background
73
89
  }), /*#__PURE__*/_react.default.createElement(_navigationHeader.default, {
@@ -84,36 +100,24 @@ const NerdModeScreen = ({
84
100
  title: title,
85
101
  titleColor: colorScheme.white
86
102
  }), /*#__PURE__*/_react.default.createElement(AnimatedSectionList, {
87
- ListHeaderComponent: entityCluster ? /*#__PURE__*/_react.default.createElement(_entityDetailsWithButtons.default, _extends({}, entityCluster, {
88
- entityType: EntityType.ProofEntity,
89
- entityLabels: entityCluster.entityLabels,
90
- attributesLabels: labels,
91
- style: [styles.entityCluster, {
92
- backgroundColor: colorScheme.nerdView.background
93
- }],
94
- onCopyToClipboard: onCopyToClipboard,
95
- testID: (_entityCluster$testID = entityCluster.testID) !== null && _entityCluster$testID !== void 0 ? _entityCluster$testID : (0, _testID.concatTestID)(testID, 'entityCluster'),
96
- textColor: colorScheme.white
97
- })) : null,
103
+ ListHeaderComponent: listHeader,
98
104
  onScroll: onScroll,
99
105
  renderItem: ({
100
106
  item,
101
- section,
102
- index
107
+ section
103
108
  }) => {
104
109
  if (isSectionEntityCluster(item)) {
105
- var _item$testID;
106
- return /*#__PURE__*/_react.default.createElement(_entityDetailsWithButtons.default, _extends({}, item, {
107
- entityType: EntityType.CredentialEntity,
108
- entityLabels: item.entityLabels,
109
- attributesLabels: labels,
110
+ var _item$testID, _item$trustInformatio;
111
+ return /*#__PURE__*/_react.default.createElement(_components.TrustInfo, {
112
+ labels: item.trustInfoLabels,
113
+ onPress: onOpenTrustInfoDetails && item.trustInformation ? () => onOpenTrustInfoDetails(item.trustInformation) : undefined,
110
114
  style: [styles.entityCluster, {
111
115
  backgroundColor: colorScheme.nerdView.background
112
116
  }],
113
- onCopyToClipboard: onCopyToClipboard,
114
- testID: (_item$testID = item.testID) !== null && _item$testID !== void 0 ? _item$testID : (0, _testID.concatTestID)(testID, 'sectionEntityCluster', index.toString()),
115
- textColor: colorScheme.white
116
- }));
117
+ testID: (_item$testID = item.testID) !== null && _item$testID !== void 0 ? _item$testID : (0, _testID.concatTestID)(testID, 'trustInfo'),
118
+ textColor: colorScheme.white,
119
+ trustInformation: (_item$trustInformatio = item.trustInformation) === null || _item$trustInformatio === void 0 ? void 0 : _item$trustInformatio.eudiEcosystem
120
+ });
117
121
  } else {
118
122
  return /*#__PURE__*/_react.default.createElement(_nerdModeItem.default, _extends({}, item, {
119
123
  expandedAttributes: expandedAttributes,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_reactNativeSafeAreaContext","_entityDetailsWithButtons","_interopRequireDefault","_contrastingStatusBar","_testID","_accessibilityHistoryWrappers","_entityCluster","_navigationHeader","_icons","_nerdModeItem","_typography","_colorSchemeContext","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityType","exports","isSectionEntityCluster","item","identifier","undefined","AnimatedSectionList","Animated","createAnimatedComponent","SectionList","NerdModeScreen","sections","labels","onClose","onCopyToClipboard","entityCluster","testID","title","_entityCluster$testID","insets","useSafeAreaInsets","colorScheme","useAppColorScheme","scrollOffset","useSharedValue","expandedAttributes","setExpandedAttributes","useState","onExpand","expanded","prev","onScroll","useAnimatedScrollHandler","contentOffset","value","y","lastElementsForSection","reduce","acc","sectionTitle","data","lastElement","attributeKey","createElement","Fragment","backgroundColor","nerdView","background","leftItem","TouchableOpacity","onPress","concatTestID","CloseIcon","color","white","style","paddingTop","top","titleColor","ListHeaderComponent","entityType","ProofEntity","entityLabels","attributesLabels","styles","textColor","renderItem","section","index","_item$testID","CredentialEntity","toString","last","renderSectionHeader","View","sectionHeaderContainer","sectionHeaderText","scrollEventThrottle","stickySectionHeadersEnabled","StyleSheet","create","paddingHorizontal","paddingVertical","justifyContent","marginTop","opacity","_default"],"sources":["nerd-mode-screen.tsx"],"sourcesContent":["import { IdentifierListItem } from '@procivis/react-native-one-core';\nimport React, { FunctionComponent, useState } from 'react';\nimport { SectionList, StyleSheet, View } from 'react-native';\nimport Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport EntityDetailsWithButtons, { ContextRole } from '../../components/entity/entity-details-with-buttons';\nimport ContrastingStatusBar from '../../utils/contrasting-status-bar';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport SectionEntityCluster from '../entity/entity-cluster';\nimport NavigationHeader from '../header/navigation-header';\nimport { CloseIcon } from '../icons/icons';\nimport NerdModeItem, { NerdModeItemProps } from '../nerd-view/nerd-mode-item';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport interface EntityLabels {\n trusted: string;\n unknownIssuer: string;\n unknownVerifier: string;\n visitWebsite: string;\n termsAndServices: string;\n privacyPolicy: string;\n}\n\nexport interface AttributesLabels {\n trustRegistry: string;\n issuerIdentifier: string;\n entityIdentifier: string;\n role: string;\n expand: string;\n collapse: string;\n}\n\ninterface SectionEntityCluster {\n identifier?: IdentifierListItem;\n subline?: string;\n entityLabels: EntityLabels;\n role: ContextRole;\n testID?: string;\n}\n\ntype SectionAttribute = Omit<NerdModeItemProps, 'labels' | 'onCopyToClipboard'>;\n\ntype NerdModeSectionItem = SectionAttribute | SectionEntityCluster;\n\nexport type NerdModeSection = {\n data: NerdModeSectionItem[];\n title?: string;\n};\n\nexport type NerdModeScreenProps = {\n entityCluster?: SectionEntityCluster;\n labels: AttributesLabels;\n onClose: () => void;\n onCopyToClipboard: (value: string) => void;\n sections: NerdModeSection[];\n testID: string;\n title: string;\n};\n\nexport enum EntityType {\n CredentialEntity,\n ProofEntity,\n}\n\nfunction isSectionEntityCluster(item: NerdModeSectionItem): item is SectionEntityCluster {\n return (item as SectionEntityCluster).identifier !== undefined;\n}\n\nconst AnimatedSectionList = Animated.createAnimatedComponent(SectionList<NerdModeSectionItem>);\n\nconst NerdModeScreen: FunctionComponent<NerdModeScreenProps> = ({\n sections,\n labels,\n onClose,\n onCopyToClipboard,\n entityCluster,\n testID,\n title,\n}) => {\n const insets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const scrollOffset = useSharedValue(0);\n const [expandedAttributes, setExpandedAttributes] = useState(0);\n\n // This is a bit of a hack. It's used to notify attributes that another attribute has been expanded\n // which will allow them to update their scroll offset accordingly.\n const onExpand = (expanded: boolean) => {\n setExpandedAttributes((prev) => (expanded ? prev + 1 : prev - 1));\n };\n\n const onScroll = useAnimatedScrollHandler({\n onScroll: ({ contentOffset }) => {\n scrollOffset.value = contentOffset.y;\n },\n });\n\n const lastElementsForSection = sections.reduce((acc, { title: sectionTitle = '', data }) => {\n const lastElement = data[data.length - 1];\n return {\n ...acc,\n [sectionTitle]: lastElement && !isSectionEntityCluster(lastElement) ? lastElement.attributeKey : '',\n };\n }, {} as Record<string, string>);\n\n return (\n <>\n <ContrastingStatusBar backgroundColor={colorScheme.nerdView.background} />\n <NavigationHeader\n leftItem={\n <TouchableOpacity onPress={onClose} testID={concatTestID(testID, 'closeIcon')}>\n <CloseIcon color={colorScheme.white} />\n </TouchableOpacity>\n }\n style={{\n backgroundColor: colorScheme.nerdView.background,\n paddingTop: insets.top,\n }}\n title={title}\n titleColor={colorScheme.white}\n />\n <AnimatedSectionList\n ListHeaderComponent={\n entityCluster ? (\n <EntityDetailsWithButtons\n {...entityCluster}\n entityType={EntityType.ProofEntity}\n entityLabels={entityCluster.entityLabels}\n attributesLabels={labels}\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n onCopyToClipboard={onCopyToClipboard}\n testID={entityCluster.testID ?? concatTestID(testID, 'entityCluster')}\n textColor={colorScheme.white}\n />\n ) : null\n }\n onScroll={onScroll}\n renderItem={({ item, section, index }) => {\n if (isSectionEntityCluster(item)) {\n return (\n <EntityDetailsWithButtons\n {...item}\n entityType={EntityType.CredentialEntity}\n entityLabels={item!.entityLabels}\n attributesLabels={labels}\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n onCopyToClipboard={onCopyToClipboard}\n testID={item.testID ?? concatTestID(testID, 'sectionEntityCluster', index.toString())}\n textColor={colorScheme.white}\n />\n );\n } else {\n return (\n <NerdModeItem\n {...item}\n expandedAttributes={expandedAttributes}\n labels={labels}\n last={lastElementsForSection[section.title] === item.attributeKey}\n onCopyToClipboard={onCopyToClipboard}\n onExpand={onExpand}\n scrollOffset={scrollOffset}\n testID={concatTestID(testID, item.testID)}\n />\n );\n }\n }}\n renderSectionHeader={({ section }) => {\n return section.title ? (\n <View style={styles.sectionHeaderContainer} testID={concatTestID(testID, section.title)}>\n <Typography color={colorScheme.white} style={styles.sectionHeaderText}>\n {section.title}\n </Typography>\n </View>\n ) : null;\n }}\n scrollEventThrottle={16}\n sections={sections}\n stickySectionHeadersEnabled={false}\n style={{ backgroundColor: colorScheme.nerdView.background }}\n testID={testID}\n />\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n entityCluster: {\n paddingHorizontal: 24,\n paddingVertical: 20,\n },\n sectionHeaderContainer: {\n justifyContent: 'center',\n marginTop: 20,\n paddingVertical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O,EAAE,GAAG;IACZJ,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAAC,IAAAK,QAAA,GAAArF,OAAA,CAAAzB,OAAA,GAEYkC,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_reactNativeSafeAreaContext","_components","_contrastingStatusBar","_interopRequireDefault","_testID","_accessibilityHistoryWrappers","_entityCluster","_navigationHeader","_icons","_nerdModeItem","_typography","_colorSchemeContext","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityType","exports","isSectionEntityCluster","item","identifier","undefined","AnimatedSectionList","Animated","createAnimatedComponent","SectionList","NerdModeScreen","sections","labels","onClose","onCopyToClipboard","onOpenTrustInfoDetails","entityCluster","testID","title","insets","useSafeAreaInsets","colorScheme","useAppColorScheme","scrollOffset","useSharedValue","expandedAttributes","setExpandedAttributes","useState","onExpand","expanded","prev","onScroll","useAnimatedScrollHandler","contentOffset","value","y","lastElementsForSection","reduce","acc","sectionTitle","data","lastElement","attributeKey","listHeader","useMemo","_entityCluster$testID","_entityCluster$trustI","createElement","TrustInfo","trustInfoLabels","onPress","trustInformation","style","styles","backgroundColor","nerdView","background","concatTestID","textColor","white","eudiEcosystem","Fragment","leftItem","TouchableOpacity","CloseIcon","color","paddingTop","top","titleColor","ListHeaderComponent","renderItem","section","_item$testID","_item$trustInformatio","last","renderSectionHeader","View","sectionHeaderContainer","sectionHeaderText","scrollEventThrottle","stickySectionHeadersEnabled","StyleSheet","create","paddingHorizontal","paddingVertical","justifyContent","marginTop","opacity","_default"],"sources":["nerd-mode-screen.tsx"],"sourcesContent":["import { IdentifierListItem, TrustInformationDetail } from '@procivis/react-native-one-core';\nimport React, { FunctionComponent, useMemo, useState } from 'react';\nimport { SectionList, StyleSheet, View } from 'react-native';\nimport Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { TrustInfo, TrustInfoLabels } from '../../components';\nimport ContrastingStatusBar from '../../utils/contrasting-status-bar';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport SectionEntityCluster from '../entity/entity-cluster';\nimport NavigationHeader from '../header/navigation-header';\nimport { CloseIcon } from '../icons/icons';\nimport NerdModeItem, { NerdModeItemProps } from '../nerd-view/nerd-mode-item';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport interface AttributesLabels {\n trustRegistry: string;\n issuerIdentifier: string;\n entityIdentifier: string;\n role: string;\n expand: string;\n collapse: string;\n}\n\ninterface SectionEntityCluster {\n identifier?: IdentifierListItem;\n subline?: string;\n testID?: string;\n trustInfoLabels: TrustInfoLabels;\n trustInformation?: TrustInformationDetail;\n}\n\ntype SectionAttribute = Omit<NerdModeItemProps, 'labels' | 'onCopyToClipboard'>;\n\ntype NerdModeSectionItem = SectionAttribute | SectionEntityCluster;\n\nexport type NerdModeSection = {\n data: NerdModeSectionItem[];\n title?: string;\n};\n\nexport type NerdModeScreenProps = {\n entityCluster?: SectionEntityCluster;\n labels: AttributesLabels;\n onClose: () => void;\n onCopyToClipboard: (value: string) => void;\n onOpenTrustInfoDetails?: (trustInformation: TrustInformationDetail) => void;\n sections: NerdModeSection[];\n testID: string;\n title: string;\n};\n\nexport enum EntityType {\n CredentialEntity,\n ProofEntity,\n}\n\nfunction isSectionEntityCluster(item: NerdModeSectionItem): item is SectionEntityCluster {\n return (item as SectionEntityCluster).identifier !== undefined;\n}\n\nconst AnimatedSectionList = Animated.createAnimatedComponent(SectionList<NerdModeSectionItem>);\n\nconst NerdModeScreen: FunctionComponent<NerdModeScreenProps> = ({\n sections,\n labels,\n onClose,\n onCopyToClipboard,\n onOpenTrustInfoDetails,\n entityCluster,\n testID,\n title,\n}) => {\n const insets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const scrollOffset = useSharedValue(0);\n const [expandedAttributes, setExpandedAttributes] = useState(0);\n\n // This is a bit of a hack. It's used to notify attributes that another attribute has been expanded\n // which will allow them to update their scroll offset accordingly.\n const onExpand = (expanded: boolean) => {\n setExpandedAttributes((prev) => (expanded ? prev + 1 : prev - 1));\n };\n\n const onScroll = useAnimatedScrollHandler({\n onScroll: ({ contentOffset }) => {\n scrollOffset.value = contentOffset.y;\n },\n });\n\n const lastElementsForSection = sections.reduce((acc, { title: sectionTitle = '', data }) => {\n const lastElement = data[data.length - 1];\n return {\n ...acc,\n [sectionTitle]: lastElement && !isSectionEntityCluster(lastElement) ? lastElement.attributeKey : '',\n };\n }, {} as Record<string, string>);\n\n const listHeader = useMemo(() => {\n if (!entityCluster) {\n return null;\n }\n return (\n <TrustInfo\n labels={entityCluster.trustInfoLabels}\n onPress={\n onOpenTrustInfoDetails && entityCluster.trustInformation\n ? () => onOpenTrustInfoDetails(entityCluster.trustInformation!)\n : undefined\n }\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n testID={entityCluster.testID ?? concatTestID(testID, 'trustInfo')}\n textColor={colorScheme.white}\n trustInformation={entityCluster.trustInformation?.eudiEcosystem}\n />\n );\n }, [\n entityCluster,\n colorScheme.nerdView.background,\n colorScheme.white,\n onOpenTrustInfoDetails,\n testID,\n ]);\n\n return (\n <>\n <ContrastingStatusBar backgroundColor={colorScheme.nerdView.background} />\n <NavigationHeader\n leftItem={\n <TouchableOpacity onPress={onClose} testID={concatTestID(testID, 'closeIcon')}>\n <CloseIcon color={colorScheme.white} />\n </TouchableOpacity>\n }\n style={{\n backgroundColor: colorScheme.nerdView.background,\n paddingTop: insets.top,\n }}\n title={title}\n titleColor={colorScheme.white}\n />\n <AnimatedSectionList\n ListHeaderComponent={listHeader}\n onScroll={onScroll}\n renderItem={({ item, section }) => {\n if (isSectionEntityCluster(item)) {\n return (\n <TrustInfo\n labels={item.trustInfoLabels}\n onPress={\n onOpenTrustInfoDetails && item.trustInformation\n ? () => onOpenTrustInfoDetails(item.trustInformation!)\n : undefined\n }\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n testID={item.testID ?? concatTestID(testID, 'trustInfo')}\n textColor={colorScheme.white}\n trustInformation={item.trustInformation?.eudiEcosystem}\n />\n );\n } else {\n return (\n <NerdModeItem\n {...item}\n expandedAttributes={expandedAttributes}\n labels={labels}\n last={lastElementsForSection[section.title] === item.attributeKey}\n onCopyToClipboard={onCopyToClipboard}\n onExpand={onExpand}\n scrollOffset={scrollOffset}\n testID={concatTestID(testID, item.testID)}\n />\n );\n }\n }}\n renderSectionHeader={({ section }) => {\n return section.title ? (\n <View style={styles.sectionHeaderContainer} testID={concatTestID(testID, section.title)}>\n <Typography color={colorScheme.white} style={styles.sectionHeaderText}>\n {section.title}\n </Typography>\n </View>\n ) : null;\n }}\n scrollEventThrottle={16}\n sections={sections}\n stickySectionHeadersEnabled={false}\n style={{ backgroundColor: colorScheme.nerdView.background }}\n testID={testID}\n />\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n entityCluster: {\n paddingHorizontal: 24,\n paddingVertical: 20,\n },\n sectionHeaderContainer: {\n justifyContent: 'center',\n marginTop: 20,\n paddingVertical: 16,\n },\n sectionHeaderText: {\n opacity: 0.7,\n paddingHorizontal: 20,\n },\n});\n\nexport default NerdModeScreen;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,6BAAA,GAAAR,OAAA;AAC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AAC;EACDN,iBAAiB,EAAE;IACjBS,OAAO,EAAE,GAAG;IACZJ,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAAC,IAAAK,QAAA,GAAAvF,OAAA,CAAAzB,OAAA,GAEYkC,cAAc","ignoreList":[]}
@@ -0,0 +1,384 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
+ var _trustInfo = _interopRequireDefault(require("../../components/trust-info/trust-info"));
11
+ var _utils = require("../../utils");
12
+ var _accessibility = require("../accessibility");
13
+ var _buttons = require("../buttons");
14
+ var _header = require("../header");
15
+ var _icons = require("../icons");
16
+ var _text = require("../text");
17
+ var _theme = require("../theme");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ 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); }
22
+ const Separator = ({
23
+ dark,
24
+ leadingItem
25
+ }) => {
26
+ const colorScheme = (0, _theme.useAppColorScheme)();
27
+ if ((leadingItem === null || leadingItem === void 0 ? void 0 : leadingItem.type) === 'subsection' || (leadingItem === null || leadingItem === void 0 ? void 0 : leadingItem.type) === 'item' && !(leadingItem !== null && leadingItem !== void 0 && leadingItem.value)) {
28
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
29
+ style: styles.emptyItem
30
+ });
31
+ }
32
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
33
+ style: {
34
+ backgroundColor: dark ? colorScheme.background : colorScheme.white
35
+ }
36
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
37
+ style: [styles.separator, {
38
+ backgroundColor: colorScheme.grayDark
39
+ }]
40
+ }));
41
+ };
42
+ const ListButton = ({
43
+ label,
44
+ onPress
45
+ }) => {
46
+ const colorScheme = (0, _theme.useAppColorScheme)();
47
+ return /*#__PURE__*/_react.default.createElement(_accessibility.TouchableOpacity, {
48
+ onPress: onPress,
49
+ style: [styles.button, styles.lastItem, {
50
+ backgroundColor: colorScheme.white
51
+ }]
52
+ }, /*#__PURE__*/_react.default.createElement(_text.Typography, {
53
+ align: "center",
54
+ color: colorScheme.text
55
+ }, label));
56
+ };
57
+ const ListItem = ({
58
+ action,
59
+ dark,
60
+ title,
61
+ value
62
+ }) => {
63
+ const colorScheme = (0, _theme.useAppColorScheme)();
64
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
65
+ style: [styles.item, {
66
+ backgroundColor: dark ? undefined : colorScheme.white
67
+ }]
68
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
69
+ style: styles.itemLabels
70
+ }, /*#__PURE__*/_react.default.createElement(_text.Typography, {
71
+ color: colorScheme.text,
72
+ numberOfLines: 1,
73
+ preset: "s/line-height-capped",
74
+ style: styles.itemTitleLabel
75
+ }, title), /*#__PURE__*/_react.default.createElement(_text.Typography, {
76
+ color: colorScheme.text,
77
+ numberOfLines: 1,
78
+ preset: "s/line-height-capped"
79
+ }, value)), action && /*#__PURE__*/_react.default.createElement(_accessibility.TouchableOpacity, {
80
+ onPress: action.onPress,
81
+ style: [styles.actionButton, {
82
+ backgroundColor: dark ? colorScheme.white : colorScheme.grayDark
83
+ }]
84
+ }, /*#__PURE__*/_react.default.createElement(action.icon, {
85
+ color: colorScheme.black
86
+ })));
87
+ };
88
+ const ContactItem = ({
89
+ email,
90
+ labels,
91
+ onPress,
92
+ phone,
93
+ website
94
+ }) => {
95
+ const colorScheme = (0, _theme.useAppColorScheme)();
96
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
97
+ style: [styles.contactItemWrapper, {
98
+ backgroundColor: colorScheme.white
99
+ }]
100
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
101
+ style: [styles.contactItem, {
102
+ backgroundColor: colorScheme.background
103
+ }]
104
+ }, website && /*#__PURE__*/_react.default.createElement(ListItem, {
105
+ action: {
106
+ icon: _icons.LinkIcon,
107
+ onPress: onPress(website)
108
+ },
109
+ dark: true,
110
+ title: labels.website,
111
+ value: website
112
+ }), website && (email || phone) && /*#__PURE__*/_react.default.createElement(Separator, {
113
+ dark: true
114
+ }), email && /*#__PURE__*/_react.default.createElement(ListItem, {
115
+ action: {
116
+ icon: _icons.MailIcon,
117
+ onPress: onPress(`mailto:${email}`)
118
+ },
119
+ dark: true,
120
+ title: labels.email,
121
+ value: email
122
+ }), email && phone && /*#__PURE__*/_react.default.createElement(Separator, {
123
+ dark: true
124
+ }), phone && /*#__PURE__*/_react.default.createElement(ListItem, {
125
+ action: {
126
+ icon: _icons.PhoneIcon,
127
+ onPress: onPress(`tel:${phone}`)
128
+ },
129
+ dark: true,
130
+ title: labels.phone,
131
+ value: phone
132
+ })));
133
+ };
134
+ const TrustInfoDetailsScreen = ({
135
+ countries,
136
+ labels,
137
+ language,
138
+ onClose,
139
+ testID,
140
+ trustInformation
141
+ }) => {
142
+ var _countries$find, _countryDisplay$langu, _trustDetails$service, _trustDetails$interme;
143
+ const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
144
+ const colorScheme = (0, _theme.useAppColorScheme)();
145
+ const [expanded, setExpanded] = (0, _react.useState)(false);
146
+ const linkHandler = (0, _react.useCallback)(url => () => {
147
+ _reactNative.Linking.openURL(url).catch(e => {
148
+ (0, _utils.reportException)(e, `Error opening contact link ${url}`);
149
+ });
150
+ }, []);
151
+ const trustDetails = trustInformation.eudiEcosystem;
152
+ if (!trustDetails) {
153
+ return null;
154
+ }
155
+ const countryDisplay = (_countries$find = countries.find(c => c.value === trustDetails.country)) === null || _countries$find === void 0 ? void 0 : _countries$find.display;
156
+ const country = (_countryDisplay$langu = countryDisplay === null || countryDisplay === void 0 ? void 0 : countryDisplay[language]) !== null && _countryDisplay$langu !== void 0 ? _countryDisplay$langu : countryDisplay === null || countryDisplay === void 0 ? void 0 : countryDisplay.en;
157
+ const baseInfo = [{
158
+ name: trustDetails.name,
159
+ type: 'trustInfo'
160
+ }, {
161
+ title: labels.isPublicSector,
162
+ type: 'item',
163
+ value: trustDetails.isPublicSector ? labels.true : undefined
164
+ }, {
165
+ title: labels.serviceDescription,
166
+ type: 'item',
167
+ value: (_trustDetails$service = trustDetails.serviceDescription[0]) === null || _trustDetails$service === void 0 ? void 0 : _trustDetails$service[language]
168
+ }];
169
+ const expandItem = !expanded ? [{
170
+ type: 'expand'
171
+ }] : [];
172
+ const supervisoryAuthority = trustDetails.supervisoryAuthority ? [{
173
+ title: labels.supervisoryAuthority,
174
+ type: 'subsection'
175
+ }, {
176
+ ...trustDetails.supervisoryAuthority,
177
+ type: 'contact',
178
+ website: trustDetails.supervisoryAuthority.uri
179
+ }] : [];
180
+ const extraInfo = expanded ? [{
181
+ title: labels.country,
182
+ type: 'item',
183
+ value: country
184
+ }, {
185
+ title: labels.identifier,
186
+ type: 'item',
187
+ value: trustDetails.identifier
188
+ }, {
189
+ title: labels.support,
190
+ type: 'subsection'
191
+ }, {
192
+ type: 'contact',
193
+ ...trustDetails
194
+ }, ...supervisoryAuthority, {
195
+ type: 'collapse'
196
+ }] : [];
197
+ const trustDetailsSection = baseInfo.concat(expandItem).concat(extraInfo);
198
+ const intermediaryName = (_trustDetails$interme = trustDetails.intermediary) !== null && _trustDetails$interme !== void 0 && _trustDetails$interme.name ? [{
199
+ name: trustDetails.intermediary.name,
200
+ type: 'trustInfo'
201
+ }] : [];
202
+ const intermediarySection = trustDetails.intermediary ? [...intermediaryName, {
203
+ title: labels.country,
204
+ type: 'item',
205
+ value: trustDetails.intermediary.country
206
+ }, {
207
+ title: labels.identifier,
208
+ type: 'item',
209
+ value: trustDetails.intermediary.identifier
210
+ }, {
211
+ title: labels.support,
212
+ type: 'subsection'
213
+ }, {
214
+ type: 'contact',
215
+ ...trustDetails.intermediary
216
+ }] : [];
217
+ const sections = [{
218
+ ItemSeparatorComponent: Separator,
219
+ data: trustDetailsSection
220
+ }, intermediarySection.length ? {
221
+ ItemSeparatorComponent: Separator,
222
+ data: intermediarySection,
223
+ title: 'Intermediary'
224
+ } : undefined].filter(_utils.nonEmptyFilter);
225
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
226
+ style: styles.container
227
+ }, /*#__PURE__*/_react.default.createElement(_header.NavigationHeader, {
228
+ leftItem: /*#__PURE__*/_react.default.createElement(_buttons.BackButton, {
229
+ onPress: onClose
230
+ }),
231
+ style: {
232
+ paddingTop: insets.top
233
+ },
234
+ title: labels.title
235
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.SectionList, {
236
+ contentInset: insets,
237
+ renderItem: ({
238
+ item,
239
+ section
240
+ }) => {
241
+ switch (item.type) {
242
+ case 'subsection':
243
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
244
+ style: [styles.subsection, {
245
+ backgroundColor: colorScheme.white
246
+ }],
247
+ testID: (0, _utils.concatTestID)(testID, section.title)
248
+ }, /*#__PURE__*/_react.default.createElement(_text.Typography, {
249
+ color: colorScheme.text,
250
+ preset: "m/heading"
251
+ }, item.title));
252
+ case 'trustInfo':
253
+ return /*#__PURE__*/_react.default.createElement(_trustInfo.default, {
254
+ labels: labels,
255
+ style: [styles.trustInfoItem, styles.firstItem, {
256
+ backgroundColor: colorScheme.white
257
+ }],
258
+ trustInformation: item
259
+ });
260
+ case 'item':
261
+ if (!item.value) {
262
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
263
+ style: styles.emptyItem
264
+ });
265
+ }
266
+ return /*#__PURE__*/_react.default.createElement(ListItem, _extends({}, item, {
267
+ value: item.value
268
+ }));
269
+ case 'contact':
270
+ if (!item.website && !item.phone && !item.email) {
271
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
272
+ style: styles.emptyItem
273
+ });
274
+ }
275
+ return /*#__PURE__*/_react.default.createElement(ContactItem, _extends({
276
+ labels: labels,
277
+ onPress: linkHandler
278
+ }, item));
279
+ case 'expand':
280
+ return /*#__PURE__*/_react.default.createElement(ListButton, {
281
+ label: labels.expand,
282
+ onPress: () => setExpanded(true)
283
+ });
284
+ case 'collapse':
285
+ return /*#__PURE__*/_react.default.createElement(ListButton, {
286
+ label: labels.collapse,
287
+ onPress: () => setExpanded(false)
288
+ });
289
+ }
290
+ },
291
+ renderSectionHeader: ({
292
+ section
293
+ }) => {
294
+ return section.title ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
295
+ style: styles.sectionHeaderContainer,
296
+ testID: (0, _utils.concatTestID)(testID, section.title)
297
+ }, /*#__PURE__*/_react.default.createElement(_text.Typography, {
298
+ color: colorScheme.text,
299
+ preset: "m/heading",
300
+ style: styles.sectionHeaderText
301
+ }, section.title)) : null;
302
+ },
303
+ scrollEventThrottle: 16,
304
+ sections: sections,
305
+ showsVerticalScrollIndicator: false,
306
+ stickySectionHeadersEnabled: false,
307
+ style: styles.list,
308
+ testID: testID
309
+ }));
310
+ };
311
+ const styles = _reactNative.StyleSheet.create({
312
+ actionButton: {
313
+ alignItems: 'center',
314
+ borderRadius: 19,
315
+ height: 38,
316
+ justifyContent: 'center',
317
+ width: 38
318
+ },
319
+ button: {
320
+ height: 64,
321
+ justifyContent: 'center',
322
+ paddingBottom: 8,
323
+ width: '100%'
324
+ },
325
+ contactItem: {
326
+ borderRadius: 8
327
+ },
328
+ contactItemWrapper: {
329
+ padding: 12
330
+ },
331
+ container: {
332
+ flex: 1
333
+ },
334
+ emptyItem: {
335
+ height: 0
336
+ },
337
+ firstItem: {
338
+ borderTopLeftRadius: 8,
339
+ borderTopRightRadius: 8
340
+ },
341
+ item: {
342
+ alignItems: 'center',
343
+ flexDirection: 'row',
344
+ justifyContent: 'space-between',
345
+ padding: 12
346
+ },
347
+ itemLabels: {
348
+ flexDirection: 'column'
349
+ },
350
+ itemTitleLabel: {
351
+ opacity: 0.5
352
+ },
353
+ lastItem: {
354
+ borderBottomLeftRadius: 8,
355
+ borderBottomRightRadius: 8
356
+ },
357
+ list: {
358
+ marginHorizontal: 16
359
+ },
360
+ sectionHeaderContainer: {
361
+ justifyContent: 'center',
362
+ marginTop: 20,
363
+ paddingVertical: 16
364
+ },
365
+ sectionHeaderText: {
366
+ opacity: 0.7,
367
+ paddingHorizontal: 20
368
+ },
369
+ separator: {
370
+ height: 1,
371
+ marginHorizontal: 12,
372
+ opacity: 0.4
373
+ },
374
+ subsection: {
375
+ paddingBottom: 8,
376
+ paddingHorizontal: 12,
377
+ paddingTop: 22
378
+ },
379
+ trustInfoItem: {
380
+ padding: 8
381
+ }
382
+ });
383
+ var _default = exports.default = TrustInfoDetailsScreen;
384
+ //# sourceMappingURL=trust-info-details-screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_trustInfo","_interopRequireDefault","_utils","_accessibility","_buttons","_header","_icons","_text","_theme","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","Separator","dark","leadingItem","colorScheme","useAppColorScheme","type","value","createElement","View","style","styles","emptyItem","backgroundColor","background","white","separator","grayDark","ListButton","label","onPress","TouchableOpacity","button","lastItem","Typography","align","color","text","ListItem","action","title","item","undefined","itemLabels","numberOfLines","preset","itemTitleLabel","actionButton","icon","black","ContactItem","email","labels","phone","website","contactItemWrapper","contactItem","LinkIcon","MailIcon","PhoneIcon","TrustInfoDetailsScreen","countries","language","onClose","testID","trustInformation","_countries$find","_countryDisplay$langu","_trustDetails$service","_trustDetails$interme","insets","useSafeAreaInsets","expanded","setExpanded","useState","linkHandler","useCallback","url","Linking","openURL","catch","reportException","trustDetails","eudiEcosystem","countryDisplay","find","c","country","display","en","baseInfo","name","isPublicSector","true","serviceDescription","expandItem","supervisoryAuthority","uri","extraInfo","identifier","support","trustDetailsSection","concat","intermediaryName","intermediary","intermediarySection","sections","ItemSeparatorComponent","data","filter","nonEmptyFilter","container","NavigationHeader","leftItem","BackButton","paddingTop","top","SectionList","contentInset","renderItem","section","subsection","concatTestID","trustInfoItem","firstItem","expand","collapse","renderSectionHeader","sectionHeaderContainer","sectionHeaderText","scrollEventThrottle","showsVerticalScrollIndicator","stickySectionHeadersEnabled","list","StyleSheet","create","alignItems","borderRadius","height","justifyContent","width","paddingBottom","padding","flex","borderTopLeftRadius","borderTopRightRadius","flexDirection","opacity","borderBottomLeftRadius","borderBottomRightRadius","marginHorizontal","marginTop","paddingVertical","paddingHorizontal","_default","exports"],"sources":["trust-info-details-screen.tsx"],"sourcesContent":["import { TrustInformationDetail } from '@procivis/react-native-one-core';\nimport React, { FC, useCallback, useState } from 'react';\nimport { Linking, SectionList, SectionListData, StyleSheet, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { SvgProps } from 'react-native-svg';\n\nimport TrustInfo, { TrustInfoLabels } from '../../components/trust-info/trust-info';\nimport { concatTestID, nonEmptyFilter, reportException } from '../../utils';\nimport { TouchableOpacity } from '../accessibility';\nimport { BackButton } from '../buttons';\nimport { NavigationHeader } from '../header';\nimport { LinkIcon, MailIcon, PhoneIcon } from '../icons';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\n\ntype TrustInfoDetailItem =\n | {\n name: string;\n type: 'trustInfo';\n }\n | {\n title: string;\n type: 'subsection';\n }\n | {\n action?: {\n icon: FC<SvgProps>;\n onPress: () => void;\n };\n title: string;\n type: 'item';\n value?: string;\n }\n | {\n email?: string;\n phone?: string;\n type: 'contact';\n website?: string;\n }\n | {\n type: 'expand';\n }\n | {\n type: 'collapse';\n };\n\ntype TrustInfoDetailSection = {\n title?: string;\n};\n\nexport type TrustInfoDetailsScreenLabels = TrustInfoLabels & {\n collapse: string;\n country: string;\n email: string;\n expand: string;\n identifier: string;\n isPublicSector: string;\n phone: string;\n privacyPolicy: string;\n serviceDescription: string;\n supervisoryAuthority: string;\n support: string;\n title: string;\n true: string;\n website: string;\n};\n\ntype SeparatorProps = {\n dark?: boolean;\n leadingItem?: TrustInfoDetailItem;\n};\n\nconst Separator: FC<SeparatorProps> = ({ dark, leadingItem }) => {\n const colorScheme = useAppColorScheme();\n if (leadingItem?.type === 'subsection' || (leadingItem?.type === 'item' && !leadingItem?.value)) {\n return <View style={styles.emptyItem} />;\n }\n return (\n <View style={{ backgroundColor: dark ? colorScheme.background : colorScheme.white }}>\n <View style={[styles.separator, { backgroundColor: colorScheme.grayDark }]} />\n </View>\n );\n};\n\ntype ListButtonProps = {\n label: string;\n onPress: () => void;\n};\n\nconst ListButton: FC<ListButtonProps> = ({ label, onPress }) => {\n const colorScheme = useAppColorScheme();\n return (\n <TouchableOpacity\n onPress={onPress}\n style={[styles.button, styles.lastItem, { backgroundColor: colorScheme.white }]}>\n <Typography align=\"center\" color={colorScheme.text}>\n {label}\n </Typography>\n </TouchableOpacity>\n );\n};\n\ntype ListItemProps = {\n action?: {\n icon: FC<SvgProps>;\n onPress: () => void;\n };\n dark?: boolean;\n title: string;\n value: string;\n};\n\nconst ListItem: FC<ListItemProps> = ({ action, dark, title, value }) => {\n const colorScheme = useAppColorScheme();\n return (\n <View style={[styles.item, { backgroundColor: dark ? undefined : colorScheme.white }]}>\n <View style={styles.itemLabels}>\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"s/line-height-capped\"\n style={styles.itemTitleLabel}>\n {title}\n </Typography>\n <Typography color={colorScheme.text} numberOfLines={1} preset=\"s/line-height-capped\">\n {value}\n </Typography>\n </View>\n {action && (\n <TouchableOpacity\n onPress={action.onPress}\n style={[styles.actionButton, { backgroundColor: dark ? colorScheme.white : colorScheme.grayDark }]}>\n <action.icon color={colorScheme.black} />\n </TouchableOpacity>\n )}\n </View>\n );\n};\n\ntype ContactItemProps = {\n email?: string;\n labels: TrustInfoDetailsScreenLabels;\n onPress: (url: string) => () => void;\n phone?: string;\n website?: string;\n};\n\nconst ContactItem: FC<ContactItemProps> = ({ email, labels, onPress, phone, website }) => {\n const colorScheme = useAppColorScheme();\n return (\n <View style={[styles.contactItemWrapper, { backgroundColor: colorScheme.white }]}>\n <View style={[styles.contactItem, { backgroundColor: colorScheme.background }]}>\n {website && (\n <ListItem\n action={{ icon: LinkIcon, onPress: onPress(website) }}\n dark\n title={labels.website}\n value={website}\n />\n )}\n {website && (email || phone) && <Separator dark />}\n {email && (\n <ListItem\n action={{ icon: MailIcon, onPress: onPress(`mailto:${email}`) }}\n dark\n title={labels.email}\n value={email}\n />\n )}\n {email && phone && <Separator dark />}\n {phone && (\n <ListItem\n action={{ icon: PhoneIcon, onPress: onPress(`tel:${phone}`) }}\n dark\n title={labels.phone}\n value={phone}\n />\n )}\n </View>\n </View>\n );\n};\n\nexport type TrustInfoDetailsScreenProps = {\n countries: {\n display: Record<string, string>;\n value: string;\n }[];\n labels: TrustInfoDetailsScreenLabels;\n language: string;\n onClose: () => void;\n testID: string;\n trustInformation: TrustInformationDetail;\n};\n\nconst TrustInfoDetailsScreen: FC<TrustInfoDetailsScreenProps> = ({\n countries,\n labels,\n language,\n onClose,\n testID,\n trustInformation,\n}) => {\n const insets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const [expanded, setExpanded] = useState(false);\n\n const linkHandler = useCallback(\n (url: string) => () => {\n Linking.openURL(url).catch((e) => {\n reportException(e, `Error opening contact link ${url}`);\n });\n },\n [],\n );\n\n const trustDetails = trustInformation.eudiEcosystem;\n if (!trustDetails) {\n return null;\n }\n\n const countryDisplay = countries.find((c) => c.value === trustDetails.country)?.display;\n const country = countryDisplay?.[language] ?? countryDisplay?.en;\n\n const baseInfo: TrustInfoDetailItem[] = [\n {\n name: trustDetails.name,\n type: 'trustInfo',\n },\n {\n title: labels.isPublicSector,\n type: 'item',\n value: trustDetails.isPublicSector ? labels.true : undefined,\n },\n {\n title: labels.serviceDescription,\n type: 'item',\n value: trustDetails.serviceDescription[0]?.[language],\n },\n ];\n\n const expandItem: TrustInfoDetailItem[] = !expanded ? [{ type: 'expand' }] : [];\n\n const supervisoryAuthority: TrustInfoDetailItem[] = trustDetails.supervisoryAuthority\n ? [\n {\n title: labels.supervisoryAuthority,\n type: 'subsection',\n },\n {\n ...trustDetails.supervisoryAuthority,\n type: 'contact',\n website: trustDetails.supervisoryAuthority.uri,\n },\n ]\n : [];\n\n const extraInfo: TrustInfoDetailItem[] = expanded\n ? [\n {\n title: labels.country,\n type: 'item',\n value: country,\n },\n {\n title: labels.identifier,\n type: 'item',\n value: trustDetails.identifier,\n },\n {\n title: labels.support,\n type: 'subsection',\n },\n {\n type: 'contact',\n ...trustDetails,\n },\n ...supervisoryAuthority,\n { type: 'collapse' },\n ]\n : [];\n\n const trustDetailsSection = baseInfo.concat(expandItem).concat(extraInfo);\n\n const intermediaryName: TrustInfoDetailItem[] = trustDetails.intermediary?.name\n ? [\n {\n name: trustDetails.intermediary.name,\n type: 'trustInfo',\n },\n ]\n : [];\n\n const intermediarySection: TrustInfoDetailItem[] = trustDetails.intermediary\n ? [\n ...intermediaryName,\n {\n title: labels.country,\n type: 'item',\n value: trustDetails.intermediary.country,\n },\n {\n title: labels.identifier,\n type: 'item',\n value: trustDetails.intermediary.identifier,\n },\n {\n title: labels.support,\n type: 'subsection',\n },\n {\n type: 'contact',\n ...trustDetails.intermediary,\n },\n ]\n : [];\n\n const sections: SectionListData<TrustInfoDetailItem, TrustInfoDetailSection>[] = [\n {\n ItemSeparatorComponent: Separator,\n data: trustDetailsSection,\n },\n intermediarySection.length\n ? {\n ItemSeparatorComponent: Separator,\n data: intermediarySection,\n title: 'Intermediary',\n }\n : undefined,\n ].filter(nonEmptyFilter);\n\n return (\n <View style={styles.container}>\n <NavigationHeader\n leftItem={<BackButton onPress={onClose} />}\n style={{\n paddingTop: insets.top,\n }}\n title={labels.title}\n />\n <SectionList<TrustInfoDetailItem, TrustInfoDetailSection>\n contentInset={insets}\n renderItem={({ item, section }) => {\n switch (item.type) {\n case 'subsection':\n return (\n <View\n style={[styles.subsection, { backgroundColor: colorScheme.white }]}\n testID={concatTestID(testID, section.title)}>\n <Typography color={colorScheme.text} preset=\"m/heading\">\n {item.title}\n </Typography>\n </View>\n );\n case 'trustInfo':\n return (\n <TrustInfo\n labels={labels}\n style={[styles.trustInfoItem, styles.firstItem, { backgroundColor: colorScheme.white }]}\n trustInformation={item}\n />\n );\n case 'item':\n if (!item.value) {\n return <View style={styles.emptyItem} />;\n }\n return <ListItem {...item} value={item.value} />;\n case 'contact':\n if (!item.website && !item.phone && !item.email) {\n return <View style={styles.emptyItem} />;\n }\n return <ContactItem labels={labels} onPress={linkHandler} {...item} />;\n case 'expand':\n return <ListButton label={labels.expand} onPress={() => setExpanded(true)} />;\n case 'collapse':\n return <ListButton label={labels.collapse} onPress={() => setExpanded(false)} />;\n }\n }}\n renderSectionHeader={({ section }) => {\n return section.title ? (\n <View style={styles.sectionHeaderContainer} testID={concatTestID(testID, section.title)}>\n <Typography color={colorScheme.text} preset=\"m/heading\" style={styles.sectionHeaderText}>\n {section.title}\n </Typography>\n </View>\n ) : null;\n }}\n scrollEventThrottle={16}\n sections={sections}\n showsVerticalScrollIndicator={false}\n stickySectionHeadersEnabled={false}\n style={styles.list}\n testID={testID}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n actionButton: {\n alignItems: 'center',\n borderRadius: 19,\n height: 38,\n justifyContent: 'center',\n width: 38,\n },\n button: {\n height: 64,\n justifyContent: 'center',\n paddingBottom: 8,\n width: '100%',\n },\n contactItem: {\n borderRadius: 8,\n },\n contactItemWrapper: {\n padding: 12,\n },\n container: {\n flex: 1,\n },\n emptyItem: {\n height: 0,\n },\n firstItem: {\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n },\n item: {\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 12,\n },\n itemLabels: {\n flexDirection: 'column',\n },\n itemTitleLabel: {\n opacity: 0.5,\n },\n lastItem: {\n borderBottomLeftRadius: 8,\n borderBottomRightRadius: 8,\n },\n list: {\n marginHorizontal: 16,\n },\n sectionHeaderContainer: {\n justifyContent: 'center',\n marginTop: 20,\n paddingVertical: 16,\n },\n sectionHeaderText: {\n opacity: 0.7,\n paddingHorizontal: 20,\n },\n separator: {\n height: 1,\n marginHorizontal: 12,\n opacity: 0.4,\n },\n subsection: {\n paddingBottom: 8,\n paddingHorizontal: 12,\n paddingTop: 22,\n },\n trustInfoItem: {\n padding: 8,\n },\n});\n\nexport default TrustInfoDetailsScreen;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAGA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAA6C,SAAAI,uBAAAQ,CAAA,WAAAA,CAAA,IA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