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

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 (196) hide show
  1. package/lib/commonjs/components/entity/entity-attributes.js +14 -1
  2. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  3. package/lib/commonjs/components/entity/entity-details-with-buttons.js +9 -42
  4. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details.js +60 -32
  6. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  7. package/lib/commonjs/components/entity/index.js +2 -15
  8. package/lib/commonjs/components/entity/index.js.map +1 -1
  9. package/lib/commonjs/components/history/history-list-item.js +14 -12
  10. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  11. package/lib/commonjs/components/proof-request/share-credential.js +1 -2
  12. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  13. package/lib/commonjs/ui-components/blur/index.js +2 -9
  14. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  15. package/lib/commonjs/ui-components/buttons/hold-button.js +3 -2
  16. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
  17. package/lib/commonjs/ui-components/camera/index.js +2 -9
  18. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  19. package/lib/commonjs/ui-components/control/index.js +0 -12
  20. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  21. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +1 -1
  22. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  23. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +15 -8
  24. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  25. package/lib/commonjs/ui-components/entity/entity-cluster.js +50 -2
  26. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  27. package/lib/commonjs/ui-components/entity/index.js +3 -16
  28. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  29. package/lib/commonjs/ui-components/history/history-details.js +1 -1
  30. package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
  31. package/lib/commonjs/ui-components/history/index.js +4 -27
  32. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  33. package/lib/commonjs/ui-components/icons/entity.js +10 -13
  34. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  35. package/lib/commonjs/ui-components/input/index.js +3 -32
  36. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  37. package/lib/commonjs/ui-components/list/index.js +4 -19
  38. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  39. package/lib/commonjs/ui-components/loader/index.js +2 -13
  40. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  41. package/lib/commonjs/ui-components/pin/index.js +2 -21
  42. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  43. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  44. package/lib/commonjs/ui-components/searchbar/index.js +3 -16
  45. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  46. package/lib/commonjs/ui-components/settings/index.js +6 -37
  47. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  48. package/lib/commonjs/ui-components/state/index.js +2 -15
  49. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  50. package/lib/commonjs/utils/date.js +1 -1
  51. package/lib/commonjs/utils/date.js.map +1 -1
  52. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +4 -0
  53. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  54. package/lib/commonjs/utils/hooks/core/backup.js +22 -66
  55. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  56. package/lib/commonjs/utils/hooks/core/core-init.js +6 -2
  57. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  58. package/lib/commonjs/utils/hooks/core/identifiers.js +23 -1
  59. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  60. package/lib/commonjs/utils/hooks/core/proofs.js +24 -14
  61. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  62. package/lib/commonjs/utils/hooks/core/trust-entity.js +55 -14
  63. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  64. package/lib/commonjs/utils/parsers/credential-sharing.js +6 -15
  65. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  66. package/lib/commonjs/utils/parsers/query.js +21 -3
  67. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  68. package/lib/module/components/entity/entity-attributes.js +15 -2
  69. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  70. package/lib/module/components/entity/entity-details-with-buttons.js +11 -44
  71. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  72. package/lib/module/components/entity/entity-details.js +60 -32
  73. package/lib/module/components/entity/entity-details.js.map +1 -1
  74. package/lib/module/components/entity/index.js +2 -2
  75. package/lib/module/components/entity/index.js.map +1 -1
  76. package/lib/module/components/history/history-list-item.js +15 -13
  77. package/lib/module/components/history/history-list-item.js.map +1 -1
  78. package/lib/module/components/proof-request/share-credential.js +1 -2
  79. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  80. package/lib/module/ui-components/blur/index.js +2 -2
  81. package/lib/module/ui-components/blur/index.js.map +1 -1
  82. package/lib/module/ui-components/buttons/hold-button.js +4 -3
  83. package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
  84. package/lib/module/ui-components/camera/index.js +2 -2
  85. package/lib/module/ui-components/camera/index.js.map +1 -1
  86. package/lib/module/ui-components/control/index.js +3 -3
  87. package/lib/module/ui-components/control/index.js.map +1 -1
  88. package/lib/module/ui-components/credential/card/credential-details-card.js +1 -1
  89. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  90. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -8
  91. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  92. package/lib/module/ui-components/entity/entity-cluster.js +51 -3
  93. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  94. package/lib/module/ui-components/entity/index.js +4 -4
  95. package/lib/module/ui-components/entity/index.js.map +1 -1
  96. package/lib/module/ui-components/history/history-details.js +1 -1
  97. package/lib/module/ui-components/history/history-details.js.map +1 -1
  98. package/lib/module/ui-components/history/index.js +6 -6
  99. package/lib/module/ui-components/history/index.js.map +1 -1
  100. package/lib/module/ui-components/icons/entity.js +10 -13
  101. package/lib/module/ui-components/icons/entity.js.map +1 -1
  102. package/lib/module/ui-components/input/index.js +6 -6
  103. package/lib/module/ui-components/input/index.js.map +1 -1
  104. package/lib/module/ui-components/list/index.js +4 -4
  105. package/lib/module/ui-components/list/index.js.map +1 -1
  106. package/lib/module/ui-components/loader/index.js +4 -4
  107. package/lib/module/ui-components/loader/index.js.map +1 -1
  108. package/lib/module/ui-components/pin/index.js +3 -3
  109. package/lib/module/ui-components/pin/index.js.map +1 -1
  110. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  111. package/lib/module/ui-components/searchbar/index.js +4 -4
  112. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  113. package/lib/module/ui-components/settings/index.js +10 -10
  114. package/lib/module/ui-components/settings/index.js.map +1 -1
  115. package/lib/module/ui-components/state/index.js +2 -2
  116. package/lib/module/ui-components/state/index.js.map +1 -1
  117. package/lib/module/utils/date.js +1 -1
  118. package/lib/module/utils/date.js.map +1 -1
  119. package/lib/module/utils/hooks/connectivity/connectivity.test.js +4 -0
  120. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  121. package/lib/module/utils/hooks/core/backup.js +24 -68
  122. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  123. package/lib/module/utils/hooks/core/core-init.js +5 -3
  124. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  125. package/lib/module/utils/hooks/core/identifiers.js +21 -0
  126. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  127. package/lib/module/utils/hooks/core/proofs.js +24 -14
  128. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  129. package/lib/module/utils/hooks/core/trust-entity.js +55 -14
  130. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  131. package/lib/module/utils/parsers/credential-sharing.js +6 -15
  132. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  133. package/lib/module/utils/parsers/query.js +19 -2
  134. package/lib/module/utils/parsers/query.js.map +1 -1
  135. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  136. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +1 -2
  137. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  138. package/lib/typescript/components/entity/index.d.ts +2 -1
  139. package/lib/typescript/ui-components/blur/index.d.ts +2 -1
  140. package/lib/typescript/ui-components/buttons/hold-button.d.ts +2 -2
  141. package/lib/typescript/ui-components/camera/index.d.ts +2 -1
  142. package/lib/typescript/ui-components/control/index.d.ts +4 -2
  143. package/lib/typescript/ui-components/credential/credential-carousel-images.d.ts +1 -0
  144. package/lib/typescript/ui-components/entity/entity-cluster.d.ts +1 -0
  145. package/lib/typescript/ui-components/entity/index.d.ts +4 -2
  146. package/lib/typescript/ui-components/history/history-details.d.ts +4 -1
  147. package/lib/typescript/ui-components/history/index.d.ts +6 -3
  148. package/lib/typescript/ui-components/input/index.d.ts +6 -3
  149. package/lib/typescript/ui-components/list/index.d.ts +4 -2
  150. package/lib/typescript/ui-components/loader/index.d.ts +4 -2
  151. package/lib/typescript/ui-components/pin/index.d.ts +4 -2
  152. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +1 -1
  153. package/lib/typescript/ui-components/searchbar/index.d.ts +4 -2
  154. package/lib/typescript/ui-components/settings/index.d.ts +10 -5
  155. package/lib/typescript/ui-components/state/index.d.ts +2 -1
  156. package/lib/typescript/utils/hooks/core/backup.d.ts +5 -0
  157. package/lib/typescript/utils/hooks/core/core-init.d.ts +4 -1
  158. package/lib/typescript/utils/hooks/core/identifiers.d.ts +4 -1
  159. package/lib/typescript/utils/hooks/core/proofs.d.ts +1 -0
  160. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +9 -3
  161. package/lib/typescript/utils/parsers/query.d.ts +3 -2
  162. package/package.json +10 -5
  163. package/src/components/entity/entity-attributes.tsx +16 -2
  164. package/src/components/entity/entity-details-with-buttons.tsx +11 -42
  165. package/src/components/entity/entity-details.tsx +60 -30
  166. package/src/components/entity/index.ts +2 -1
  167. package/src/components/history/history-list-item.tsx +17 -13
  168. package/src/components/proof-request/share-credential.tsx +0 -1
  169. package/src/ui-components/blur/index.ts +2 -1
  170. package/src/ui-components/buttons/hold-button.tsx +6 -5
  171. package/src/ui-components/camera/index.tsx +2 -1
  172. package/src/ui-components/control/index.ts +4 -2
  173. package/src/ui-components/credential/card/credential-details-card.tsx +1 -1
  174. package/src/ui-components/credential/credential-carousel-images.tsx +15 -8
  175. package/src/ui-components/entity/entity-cluster.tsx +63 -10
  176. package/src/ui-components/entity/index.ts +4 -2
  177. package/src/ui-components/history/history-details.tsx +5 -2
  178. package/src/ui-components/history/index.ts +6 -3
  179. package/src/ui-components/icons/entity.tsx +8 -12
  180. package/src/ui-components/input/index.ts +6 -3
  181. package/src/ui-components/list/index.ts +4 -2
  182. package/src/ui-components/loader/index.ts +4 -2
  183. package/src/ui-components/pin/index.ts +4 -2
  184. package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
  185. package/src/ui-components/searchbar/index.ts +4 -2
  186. package/src/ui-components/settings/index.ts +10 -5
  187. package/src/ui-components/state/index.ts +2 -1
  188. package/src/utils/date.ts +1 -1
  189. package/src/utils/hooks/connectivity/connectivity.test.ts +7 -2
  190. package/src/utils/hooks/core/backup.ts +30 -72
  191. package/src/utils/hooks/core/core-init.ts +5 -3
  192. package/src/utils/hooks/core/identifiers.ts +22 -1
  193. package/src/utils/hooks/core/proofs.ts +27 -16
  194. package/src/utils/hooks/core/trust-entity.ts +45 -11
  195. package/src/utils/parsers/credential-sharing.tsx +8 -14
  196. package/src/utils/parsers/query.tsx +12 -2
@@ -1 +1 @@
1
- {"version":3,"names":["getQueryKeyFromCredentialListQueryParams","queryParams","name","sort","sortDirection","exact","role","ids","status","include","exports","getQueryKeyFromHistoryListQueryParams","entityId","action","entityTypes","createdDateFrom","createdDateTo","identifierId","credentialId","credentialSchemaId","searchText","searchType","proofSchemaId","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","proofStates","proofSchemaIds","getQueryKeyFromDidListQueryParams","did","type","deactivated","keyAlgorithms","keyRoles"],"sources":["query.tsx"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams?: Partial<CredentialListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, role, ids, status, include } = queryParams;\n return [name, sort, sortDirection, exact, role, ids, status, include];\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams?: Partial<HistoryListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const {\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n identifierId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n } = queryParams;\n return [\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n identifierId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n ];\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, include } = queryParams;\n return [name, sort, sortDirection, exact, ids, include];\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams?: Partial<ProofSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids } = queryParams;\n return [name, sort, sortDirection, exact, ids];\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams?: Partial<ProofListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds } = queryParams;\n return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams?: Partial<DidListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { name, did, type, deactivated, keyAlgorithms, keyRoles } = queryParams;\n return [name, did, type, deactivated, keyAlgorithms, keyRoles];\n};\n"],"mappings":";;;;;;AASO,MAAMA,wCAAwC,GAAIC,WAA0C,IAAK;EACtG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEC,IAAI;IAAEC,GAAG;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGR,WAAW;EACpF,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEC,IAAI,EAAEC,GAAG,EAAEC,MAAM,EAAEC,OAAO,CAAC;AACvE,CAAC;AAACC,OAAA,CAAAV,wCAAA,GAAAA,wCAAA;AAEK,MAAMW,qCAAqC,GAAIV,WAAuC,IAAK;EAChG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAM;IACJW,QAAQ;IACRC,MAAM;IACNC,WAAW;IACXC,eAAe;IACfC,aAAa;IACbC,YAAY;IACZC,YAAY;IACZC,kBAAkB;IAClBC,UAAU;IACVC,UAAU;IACVC;EACF,CAAC,GAAGrB,WAAW;EACf,OAAO,CACLW,QAAQ,EACRC,MAAM,EACNC,WAAW,EACXC,eAAe,EACfC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,kBAAkB,EAClBC,UAAU,EACVC,UAAU,EACVC,aAAa,CACd;AACH,CAAC;AAACZ,OAAA,CAAAC,qCAAA,G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AAI;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAGhC,WAAW;EAC7E,OAAO,CAACC,IAAI,EAAE2B,GAAG,EAAEC,IAAI,EAAEC,WAAW,EAAEC,aAAa,EAAEC,QAAQ,CAAC;AAChE,CAAC;AAACvB,OAAA,CAAAkB,iCAAA,GAAAA,iCAAA","ignoreList":[]}
1
+ {"version":3,"names":["getQueryKeyFromCredentialListQueryParams","queryParams","name","sort","sortDirection","exact","role","ids","status","include","exports","getQueryKeyFromHistoryListQueryParams","entityId","actions","entityTypes","createdDateFrom","createdDateTo","identifierId","credentialId","credentialSchemaId","searchText","searchType","proofSchemaId","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","proofStates","proofSchemaIds","getQueryKeyFromDidListQueryParams","did","type","deactivated","keyAlgorithms","keyRoles","getQueryKeyFromIdentifierListQueryParams","isRemote","didMethods","state","keyStorages","types"],"sources":["query.tsx"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n IdentifierListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams?: Partial<CredentialListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, role, ids, status, include } = queryParams;\n return [name, sort, sortDirection, exact, role, ids, status, include];\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams?: Partial<HistoryListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const {\n entityId,\n actions,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n identifierId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n } = queryParams;\n return [\n entityId,\n actions,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n identifierId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n ];\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, include } = queryParams;\n return [name, sort, sortDirection, exact, ids, include];\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams?: Partial<ProofSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids } = queryParams;\n return [name, sort, sortDirection, exact, ids];\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams?: Partial<ProofListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds } = queryParams;\n return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams?: Partial<DidListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { name, did, type, deactivated, keyAlgorithms, keyRoles } = queryParams;\n return [name, did, type, deactivated, keyAlgorithms, keyRoles];\n};\n\nexport const getQueryKeyFromIdentifierListQueryParams = (queryParams?: Partial<IdentifierListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { isRemote, didMethods, state, keyStorages, keyAlgorithms, exact, keyRoles, types, name } = queryParams;\n return [name, types, state, isRemote, didMethods, keyStorages, keyAlgorithms, exact, keyRoles];\n};\n"],"mappings":";;;;;;AAUO,MAAMA,wCAAwC,GAAIC,WAA0C,IAAK;EACtG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEC,IAAI;IAAEC,GAAG;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGR,WAAW;EACpF,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEC,IAAI,EAAEC,GAAG,EAAEC,MAAM,EAAEC,OAAO,CAAC;AACvE,CA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object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { memo } from 'react';
3
- import { View } from 'react-native';
3
+ import { StyleSheet, View } from 'react-native';
4
4
  import { NerdModeItem } from '../../ui-components/nerd-view';
5
5
  import { EntityType } from '../../ui-components/screens/nerd-mode-screen';
6
6
  import { addElementIf } from '../../utils/array';
7
7
  const EntityAttributes = ({
8
+ certificate,
8
9
  did,
9
10
  trustEntity,
10
11
  trusted,
@@ -26,17 +27,29 @@ const EntityAttributes = ({
26
27
  canBeCopied: true,
27
28
  highlightedText: didMethod,
28
29
  testID: 'issuerDID'
30
+ }), ...addElementIf(Boolean(certificate), {
31
+ attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,
32
+ attributeText: certificate,
33
+ canBeCopied: true,
34
+ testID: 'issuerCertificate'
29
35
  }), ...addElementIf(trusted && Boolean(trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.role), {
30
36
  attributeKey: labels.role,
31
37
  highlightedText: trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.role,
32
38
  testID: 'role'
33
39
  })];
34
- return /*#__PURE__*/React.createElement(View, null, attributes.map(attribute => /*#__PURE__*/React.createElement(NerdModeItem, _extends({
40
+ return /*#__PURE__*/React.createElement(View, {
41
+ style: styles.wrapper
42
+ }, attributes.map(attribute => /*#__PURE__*/React.createElement(NerdModeItem, _extends({
35
43
  key: attribute.attributeKey
36
44
  }, attribute, {
37
45
  labels: labels,
38
46
  onCopyToClipboard: onCopyToClipboard
39
47
  }))));
40
48
  };
49
+ const styles = StyleSheet.create({
50
+ wrapper: {
51
+ marginBottom: 20
52
+ }
53
+ });
41
54
  export default /*#__PURE__*/memo(EntityAttributes);
42
55
  //# sourceMappingURL=entity-attributes.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","memo","View","NerdModeItem","EntityType","addElementIf","EntityAttributes","did","trustEntity","trusted","labels","entityType","onCopyToClipboard","_did$split","didSections","split","identifier","pop","didMethod","length","join","attributes","attributeKey","trustRegistry","highlightedText","trustAnchor","name","testID","Boolean","CredentialEntity","issuerIdentifier","entityIdentifier","attributeText","canBeCopied","role","createElement","map","attribute","_extends","key"],"sources":["entity-attributes.tsx"],"sourcesContent":["import { TrustEntity } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { View } from 'react-native';\n\nimport { NerdModeItem } from '../../ui-components/nerd-view';\nimport { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { addElementIf } from '../../utils/array';\n\ninterface EntityAttributesProps {\n did?: string;\n trustEntity?: TrustEntity;\n trusted: boolean;\n labels: AttributesLabels;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityAttributes: FC<EntityAttributesProps> = ({\n did,\n trustEntity,\n trusted,\n labels,\n entityType,\n onCopyToClipboard,\n}) => {\n const didSections = did?.split(':') ?? [];\n const identifier = didSections.pop();\n const didMethod = didSections.length ? didSections.join(':') + ':' : '';\n\n const attributes = [\n ...addElementIf(trusted, {\n attributeKey: labels.trustRegistry,\n highlightedText: trustEntity?.trustAnchor.name,\n testID: 'trustRegistry',\n }),\n ...addElementIf(Boolean(did), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: identifier,\n canBeCopied: true,\n highlightedText: didMethod,\n testID: 'issuerDID',\n }),\n ...addElementIf(trusted && Boolean(trustEntity?.role), {\n attributeKey: labels.role,\n highlightedText: trustEntity?.role,\n testID: 'role',\n }),\n ];\n return (\n <View>\n {attributes.map((attribute) => (\n <NerdModeItem\n key={attribute.attributeKey}\n {...attribute}\n labels={labels}\n onCopyToClipboard={onCopyToClipboard}\n />\n ))}\n </View>\n );\n};\n\nexport default memo(EntityAttributes);\n"],"mappings":";AACA,OAAOA,KAAK,IAAQC,IAAI,QAA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ACrDZ,YAAY,EAAEZ,MAAM,CAACwB,IAAI;IACzBV,eAAe,EAAEhB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAE0B,IAAI;IAClCP,MAAM,EAAE;EACV,CAAC,CAAC,CACH;EACD,oBACE3B,KAAA,CAAAmC,aAAA,CAACjC,IAAI,QACFmB,UAAU,CAACe,GAAG,CAAEC,SAAS,iBACxBrC,KAAA,CAAAmC,aAAA,CAAChC,YAAY,EAAAmC,QAAA;IACXC,GAAG,EAAEF,SAAS,CAACf;EAAa,GACxBe,SAAS;IACb3B,MAAM,EAAEA,MAAO;IACfE,iBAAiB,EAAEA;EAAkB,EACtC,CACF,CACG,CAAC;AAEX,CAAC;AAED,4BAAeX,IAAI,CAACK,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","memo","StyleSheet","View","NerdModeItem","EntityType","addElementIf","EntityAttributes","certificate","did","trustEntity","trusted","labels","entityType","onCopyToClipboard","_did$split","didSections","split","identifier","pop","didMethod","length","join","attributes","attributeKey","trustRegistry","highlightedText","trustAnchor","name","testID","Boolean","CredentialEntity","issuerIdentifier","entityIdentifier","attributeText","canBeCopied","role","createElement","style","styles","wrapper","map","attribute","_extends","key","create","marginBottom"],"sources":["entity-attributes.tsx"],"sourcesContent":["import { TrustEntity } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { NerdModeItem } from '../../ui-components/nerd-view';\nimport { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { addElementIf } from '../../utils/array';\n\ninterface EntityAttributesProps {\n certificate?: string;\n did?: string;\n trustEntity?: TrustEntity;\n trusted: boolean;\n labels: AttributesLabels;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityAttributes: FC<EntityAttributesProps> = ({\n certificate,\n did,\n trustEntity,\n trusted,\n labels,\n entityType,\n onCopyToClipboard,\n}) => {\n const didSections = did?.split(':') ?? [];\n const identifier = didSections.pop();\n const didMethod = didSections.length ? didSections.join(':') + ':' : '';\n\n const attributes = [\n ...addElementIf(trusted, {\n attributeKey: labels.trustRegistry,\n highlightedText: trustEntity?.trustAnchor.name,\n testID: 'trustRegistry',\n }),\n ...addElementIf(Boolean(did), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: identifier,\n canBeCopied: true,\n highlightedText: didMethod,\n testID: 'issuerDID',\n }),\n ...addElementIf(Boolean(certificate), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: certificate,\n canBeCopied: true,\n testID: 'issuerCertificate',\n }),\n ...addElementIf(trusted && Boolean(trustEntity?.role), {\n attributeKey: labels.role,\n highlightedText: trustEntity?.role,\n testID: 'role',\n }),\n ];\n return (\n <View style={styles.wrapper}>\n {attributes.map((attribute) => (\n <NerdModeItem\n key={attribute.attributeKey}\n {...attribute}\n labels={labels}\n onCopyToClipboard={onCopyToClipboard}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n marginBottom: 20,\n }\n})\n\nexport default memo(EntityAttributes);\n"],"mappings":";AACA,OAAOA,KAAK,IAAQC,IAAI,QAAQ,OAAO;AACvC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAA2BC,UAAU,QAAQ,8CAA8C;AAC3F,SAASC,YAAY,QAAQ,mBAAmB;AAYhD,MAAMC,gBAA2C,GAAGA,CAAC;EACnDC,WAAW;EACXC,GAAG;EACHC,WAAW;EACXC,OAAO;EACPC,MAAM;EACNC,UAAU;EACVC;AACF,CAAC,KAAK;EAAA,IAAAC,UAAA;EACJ,MAAMC,WAAW,IAAAD,UAAA,GAAGN,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEQ,KAAK,CAAC,GAAG,CAAC,cAAAF,UAAA,cAAAA,UAAA,GAAI,EAAE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7B,KAAA,CAAAqC,aAAA,CAAClC,IAAI;IAACmC,KAAK,EAAEC,MAAM,CAACC;EAAQ,GACzBjB,UAAU,CAACkB,GAAG,CAAEC,SAAS,iBACxB1C,KAAA,CAAAqC,aAAA,CAACjC,YAAY,EAAAuC,QAAA;IACXC,GAAG,EAAEF,SAAS,CAAClB;EAAa,GACxBkB,SAAS;IACb9B,MAAM,EAAEA,MAAO;IACfE,iBAAiB,EAAEA;EAAkB,EACtC,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAMyB,MAAM,GAAGrC,UAAU,CAAC2C,MAAM,CAAC;EAC/BL,OAAO,EAAE;IACPM,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,4BAAe7C,IAAI,CAACM,gBAAgB,CAAC","ignoreList":[]}
@@ -1,13 +1,12 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import { TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';
3
- import React, { memo, useMemo } from 'react';
3
+ import React, { memo } from 'react';
4
4
  import { View } from 'react-native';
5
- import EntityCluster from '../../ui-components/entity/entity-cluster';
6
- import { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';
7
5
  import { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';
8
- import { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';
6
+ import { concatTestID, useIdentifierDetails } from '../../utils';
9
7
  import { useTrustEntity } from '../../utils/hooks/core/trust-entity';
10
8
  import EntityAttributes from './entity-attributes';
9
+ import EntityDetails from './entity-details';
11
10
  import EntityButtons from './EntityButtons';
12
11
  const EntityDetailsWithButtons = ({
13
12
  identifier,
@@ -19,7 +18,7 @@ const EntityDetailsWithButtons = ({
19
18
  testID,
20
19
  ...props
21
20
  }) => {
22
- var _trustEntity$did;
21
+ var _identifierDetail$cer, _identifierDetail$did;
23
22
  let {
24
23
  data
25
24
  } = useTrustEntity(identifier === null || identifier === void 0 ? void 0 : identifier.id);
@@ -29,56 +28,24 @@ const EntityDetailsWithButtons = ({
29
28
  const trustEntity = data !== null && data !== void 0 ? data : undefined;
30
29
  const colorScheme = useAppColorScheme();
31
30
  const trusted = Boolean(trustEntity && trustEntity.state === TrustEntityStateEnum.ACTIVE && (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role));
32
- const trustEntityName = useMemo(() => {
33
- if (!trustEntity || !trusted) {
34
- if (identifierDetail !== null && identifierDetail !== void 0 && identifierDetail.did) {
35
- return replaceBreakingHyphens(identifierDetail.did.did);
36
- }
37
- return role === TrustEntityRoleEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier;
38
- }
39
- return trustEntity.name;
40
- }, [entityLabels, role, trustEntity, trusted, identifierDetail]);
41
- const trustEntitySubline = useMemo(() => {
42
- if (!trusted) {
43
- return undefined;
44
- }
45
- return `${entityLabels.trusted} • ${trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.trustAnchor.name}`;
46
- }, [trustEntity, trusted, entityLabels.trusted]);
47
- const trustEntityStatusIcon = useMemo(() => {
48
- if (!trusted) {
49
- return /*#__PURE__*/React.createElement(EntityNotTrustedIcon, {
50
- testID: concatTestID(testID, 'statusIcon', 'notTrusted')
51
- });
52
- }
53
- return /*#__PURE__*/React.createElement(EntityTrustedIcon, {
54
- testID: concatTestID(testID, 'statusIcon', 'trusted')
55
- });
56
- }, [testID, trusted]);
57
31
  return /*#__PURE__*/React.createElement(View, {
58
32
  style: {
59
33
  backgroundColor: colorScheme.nerdView.background
60
34
  }
61
- }, /*#__PURE__*/React.createElement(EntityCluster, _extends({
62
- avatar: {
63
- avatar: trusted && trustEntity !== null && trustEntity !== void 0 && trustEntity.logo ? {
64
- imageSource: {
65
- uri: trustEntity.logo
66
- }
67
- } : undefined,
68
- placeholderText: trusted ? trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.name.substring(0, 1) : "U",
69
- statusIcon: trustEntityStatusIcon,
70
- testID: concatTestID(testID, 'avatar')
35
+ }, /*#__PURE__*/React.createElement(EntityDetails, _extends({
36
+ identifier: identifier,
37
+ labels: {
38
+ unknown: role === TrustEntityRoleEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier
71
39
  },
72
- entityName: trustEntityName,
73
- subline: trustEntitySubline,
74
- sublineColor: trusted ? colorScheme.success : colorScheme.white,
40
+ role: role,
75
41
  testID: testID
76
42
  }, props)), trusted && /*#__PURE__*/React.createElement(EntityButtons, {
77
43
  entity: trustEntity,
78
44
  labels: entityLabels,
79
45
  testID: concatTestID(testID, 'links')
80
46
  }), /*#__PURE__*/React.createElement(EntityAttributes, {
81
- did: trustEntity === null || trustEntity === void 0 || (_trustEntity$did = trustEntity.did) === null || _trustEntity$did === void 0 ? void 0 : _trustEntity$did.did,
47
+ certificate: identifierDetail === null || identifierDetail === void 0 || (_identifierDetail$cer = identifierDetail.certificates) === null || _identifierDetail$cer === void 0 || (_identifierDetail$cer = _identifierDetail$cer[0]) === null || _identifierDetail$cer === void 0 ? void 0 : _identifierDetail$cer.chain,
48
+ did: identifierDetail === null || identifierDetail === void 0 || (_identifierDetail$did = identifierDetail.did) === null || _identifierDetail$did === void 0 ? void 0 : _identifierDetail$did.did,
82
49
  trustEntity: trustEntity,
83
50
  trusted: trusted,
84
51
  labels: attributesLabels,
@@ -1 +1 @@
1
- {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","memo","useMemo","View","EntityCluster","EntityNotTrustedIcon","EntityTrustedIcon","useAppColorScheme","concatTestID","replaceBreakingHyphens","useIdentifierDetails","useTrustEntity","EntityAttributes","EntityButtons","EntityDetailsWithButtons","identifier","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","_trustEntity$did","data","id","identifierDetail","trustEntity","undefined","colorScheme","trusted","Boolean","state","ACTIVE","BOTH","trustEntityName","did","ISSUER","unknownIssuer","unknownVerifier","name","trustEntitySubline","trustAnchor","trustEntityStatusIcon","createElement","style","backgroundColor","nerdView","background","_extends","avatar","logo","imageSource","uri","placeholderText","substring","statusIcon","entityName","subline","sublineColor","success","white","entity","labels"],"sources":["entity-details-with-buttons.tsx"],"sourcesContent":["import { TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport { IdentifierListItem } from '@procivis/react-native-one-core/dist/src/identifier';\nimport React, { FC, memo, useMemo } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';\nimport { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';\nimport { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\nimport EntityAttributes from './entity-attributes';\nimport EntityButtons from './EntityButtons';\n\nexport type ContextRole = Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n\ninterface EntityDetailsWithButtonsProps {\n identifier?: IdentifierListItem;\n entityLabels: EntityLabels;\n attributesLabels: AttributesLabels;\n style?: StyleProp<ViewStyle>;\n textColor?: string;\n testID?: string;\n role: ContextRole;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({\n identifier,\n entityLabels,\n attributesLabels,\n onCopyToClipboard,\n role,\n entityType,\n testID,\n ...props\n}) => {\n let { data } = useTrustEntity(identifier?.id);\n let { data: identifierDetail } = useIdentifierDetails(identifier?.id);\n const trustEntity = data ?? undefined;\n\n const colorScheme = useAppColorScheme();\n\n const trusted = Boolean(\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role),\n );\n\n const trustEntityName = useMemo(() => {\n if (!trustEntity || !trusted) {\n if (identifierDetail?.did) {\n return replaceBreakingHyphens(identifierDetail.did.did);\n }\n\n return role === TrustEntityRoleEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier;\n }\n return trustEntity.name;\n }, [entityLabels, role, trustEntity, trusted, identifierDetail]);\n\n const trustEntitySubline = useMemo(() => {\n if (!trusted) {\n return undefined;\n }\n\n return `${entityLabels.trusted} • ${trustEntity?.trustAnchor.name}`;\n }, [trustEntity, trusted, entityLabels.trusted]);\n\n const trustEntityStatusIcon = useMemo(() => {\n if (!trusted) {\n return <EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />;\n }\n return <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />;\n }, [testID, trusted]);\n\n return (\n <View style={{ backgroundColor: colorScheme.nerdView.background }}>\n <EntityCluster\n avatar={{\n avatar: trusted && trustEntity?.logo ? { imageSource: { uri: trustEntity.logo } } : undefined,\n placeholderText: trusted ? trustEntity?.name.substring(0, 1) : \"U\",\n statusIcon: trustEntityStatusIcon,\n testID: concatTestID(testID, 'avatar'),\n }}\n entityName={trustEntityName}\n subline={trustEntitySubline}\n sublineColor={trusted ? colorScheme.success : colorScheme.white}\n testID={testID}\n {...props}\n />\n {trusted && <EntityButtons entity={trustEntity} labels={entityLabels} testID={concatTestID(testID, 'links')} />}\n <EntityAttributes\n did={trustEntity?.did?.did}\n trustEntity={trustEntity}\n trusted={trusted}\n labels={attributesLabels}\n onCopyToClipboard={onCopyToClipboard}\n entityType={entityType}\n />\n </View>\n );\n};\n\nexport default memo(EntityDetailsWithButtons);\n"],"mappings":";AAAA,SAASA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AAE3F,OAAOC,KAAK,IAAQC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAChD,SAAoBC,IAAI,QAAmB,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AAW,aAAXA,WAAW,eAAXA,WAAW,CAAEwB,IAAI,GAAG;QAAEC,WAAW,EAAE;UAAEC,GAAG,EAAE1B,WAAW,CAACwB;QAAK;MAAE,CAAC,GAAGvB,SAAS;MAC7F0B,eAAe,EAAExB,OAAO,GAAGH,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEa,IAAI,CAACe,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG;MAClEC,UAAU,EAAEb,qBAAqB;MACjCtB,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,QAAQ;IACvC,CAAE;IACFoC,UAAU,EAAEtB,eAAgB;IAC5BuB,OAAO,EAAEjB,kBAAmB;IAC5BkB,YAAY,EAAE7B,OAAO,GAAGD,WAAW,CAAC+B,OAAO,GAAG/B,WAAW,CAACgC,KAAM;IAChExC,MAAM,EAAEA;EAAO,GACXC,KAAK,CACV,CAAC,EACDQ,OAAO,iBAAI9B,KAAA,CAAA4C,aAAA,CAAC/B,aAAa;IAACiD,MAAM,EAAEnC,WAAY;IAACoC,MAAM,EAAE/C,YAAa;IAACK,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,OAAO;EAAE,CAAE,CAAC,eAC/GrB,KAAA,CAAA4C,aAAA,CAAChC,gBAAgB;IACfwB,GAAG,EAAET,WAAW,aAAXA,WAAW,gBAAAJ,gBAAA,GAAXI,WAAW,CAAES,GAAG,cAAAb,gBAAA,uBAAhBA,gBAAA,CAAkBa,GAAI;IAC3BT,WAAW,EAAEA,WAAY;IACzBG,OAAO,EAAEA,OAAQ;IACjBiC,MAAM,EAAE9C,gBAAiB;IACzBC,iBAAiB,EAAEA,iBAAkB;IACrCE,UAAU,EAAEA;EAAW,CACxB,CACG,CAAC;AAEX,CAAC;AAED,4BAAenB,IAAI,CAACa,wBAAwB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","memo","View","useAppColorScheme","concatTestID","useIdentifierDetails","useTrustEntity","EntityAttributes","EntityDetails","EntityButtons","EntityDetailsWithButtons","identifier","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","_identifierDetail$cer","_identifierDetail$did","data","id","identifierDetail","trustEntity","undefined","colorScheme","trusted","Boolean","state","ACTIVE","BOTH","createElement","style","backgroundColor","nerdView","background","_extends","labels","unknown","ISSUER","unknownIssuer","unknownVerifier","entity","certificate","certificates","chain","did"],"sources":["entity-details-with-buttons.tsx"],"sourcesContent":["import { IdentifierListItem, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';\nimport { concatTestID, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\nimport EntityAttributes from './entity-attributes';\nimport EntityDetails from './entity-details';\nimport EntityButtons from './EntityButtons';\n\nexport type ContextRole = Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n\ninterface EntityDetailsWithButtonsProps {\n identifier?: IdentifierListItem;\n entityLabels: EntityLabels;\n attributesLabels: AttributesLabels;\n style?: StyleProp<ViewStyle>;\n textColor?: string;\n testID?: string;\n role: ContextRole;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({\n identifier,\n entityLabels,\n attributesLabels,\n onCopyToClipboard,\n role,\n entityType,\n testID,\n ...props\n}) => {\n let { data } = useTrustEntity(identifier?.id);\n let { data: identifierDetail } = useIdentifierDetails(identifier?.id);\n const trustEntity = data ?? undefined;\n\n const colorScheme = useAppColorScheme();\n\n const trusted = Boolean(\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role),\n );\n\n return (\n <View style={{ backgroundColor: colorScheme.nerdView.background }}>\n <EntityDetails\n identifier={identifier}\n labels={{\n unknown: role === TrustEntityRoleEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier,\n }}\n role={role}\n testID={testID}\n {...props}\n />\n {trusted && <EntityButtons entity={trustEntity} labels={entityLabels} testID={concatTestID(testID, 'links')} />}\n <EntityAttributes\n certificate={identifierDetail?.certificates?.[0]?.chain}\n did={identifierDetail?.did?.did}\n trustEntity={trustEntity}\n trusted={trusted}\n labels={attributesLabels}\n onCopyToClipboard={onCopyToClipboard}\n entityType={entityType}\n />\n </View>\n );\n};\n\nexport default memo(EntityDetailsWithButtons);\n"],"mappings":";AAAA,SAA6BA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AAC/G,OAAOC,KAAK,IAAQC,IAAI,QAAQ,OAAO;AACvC,SAAoBC,IAAI,QAAmB,cAAc;AAGzD,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,SAASC,YAAY,EAAEC,oBAAoB,QAAQ,aAAa;AAChE,SAASC,cAAc,QAAQ,qCAAqC;AACpE,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,aAAa,MAAM,iBAAiB;AAgB3C,MAAMC,wBAA2D,GAAGA,CAAC;EACnEC,UAAU;EACVC,YAAY;EACZC,gBAAgB;EAChBC,iBAAiB;EACjBC,IAAI;EACJC,UAAU;EACVC,MAAM;EACN,GAAGC;AACL,CAAC,KAAK;EAAA,IAAAC,qBAAA,EAAAC,qBAAA;EACJ,IAAI;IAAEC;EAAK,CAAC,GAAGf,cAAc,CAACK,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEW,EAAE,CAAC;EAC7C,IAAI;IAAED,IAAI,EAAEE;EAAiB,CAAC,GAAGlB,oBAAoB,CAACM,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEW,EAAE,CAAC;EACrE,MA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BAAA,GAAhBG,gBAAgB,CAAEwB,GAAG,cAAA3B,qBAAA,uBAArBA,qBAAA,CAAuB2B,GAAI;IAChCvB,WAAW,EAAEA,WAAY;IACzBG,OAAO,EAAEA,OAAQ;IACjBW,MAAM,EAAEzB,gBAAiB;IACzBC,iBAAiB,EAAEA,iBAAkB;IACrCE,UAAU,EAAEA;EAAW,CACxB,CACG,CAAC;AAEX,CAAC;AAED,4BAAef,IAAI,CAACS,wBAAwB,CAAC","ignoreList":[]}
@@ -4,60 +4,88 @@ import EntityCluster from '../../ui-components/entity/entity-cluster';
4
4
  import { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';
5
5
  import { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';
6
6
  import { useTrustEntity } from '../../utils/hooks/core/trust-entity';
7
+ const getCertificateCommonName = certificate => {
8
+ var _certificate$x509Attr;
9
+ return (_certificate$x509Attr = certificate.x509Attributes.subject.split(', ').find(s => s.startsWith('CN'))) === null || _certificate$x509Attr === void 0 || (_certificate$x509Attr = _certificate$x509Attr.split('=')) === null || _certificate$x509Attr === void 0 ? void 0 : _certificate$x509Attr.pop();
10
+ };
7
11
  const EntityDetails = ({
8
12
  labels,
9
13
  renderMore,
10
14
  role,
11
15
  style,
12
16
  testID,
17
+ sublineColor,
18
+ textColor,
13
19
  ...props
14
20
  }) => {
15
21
  var _props$identifier, _props$identifier2;
16
22
  const {
17
- data
23
+ data,
24
+ isLoading: isLoadingTrustEntity
18
25
  } = useTrustEntity('identifier' in props ? (_props$identifier = props.identifier) === null || _props$identifier === void 0 ? void 0 : _props$identifier.id : undefined);
19
26
  const trustEntity = 'entity' in props ? props.entity : data !== null && data !== void 0 ? data : undefined;
20
27
  const {
21
- data: identifierDetail
28
+ data: identifierDetail,
29
+ isLoading: isLoadingIdentifier
22
30
  } = useIdentifierDetails('identifier' in props ? (_props$identifier2 = props.identifier) === null || _props$identifier2 === void 0 ? void 0 : _props$identifier2.id : undefined);
23
31
  const trusted = trustEntity && trustEntity.state === TrustEntityStateEnum.ACTIVE && (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role);
32
+ const isLoading = isLoadingIdentifier || isLoadingTrustEntity;
33
+ const avatarProps = useMemo(() => {
34
+ var _identifierDetail$cer, _getCertificateCommon;
35
+ if (isLoading) {
36
+ return undefined;
37
+ }
38
+ const avatar = trusted && (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === 'DID' && trustEntity.logo ? {
39
+ imageSource: {
40
+ uri: trustEntity.logo
41
+ }
42
+ } : undefined;
43
+ const placeholderText = (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === 'CERTIFICATE' && (_identifierDetail$cer = identifierDetail.certificates) !== null && _identifierDetail$cer !== void 0 && _identifierDetail$cer[0] ? (_getCertificateCommon = getCertificateCommonName(identifierDetail.certificates[0])) === null || _getCertificateCommon === void 0 ? void 0 : _getCertificateCommon.substring(0, 1) : 'D';
44
+ const statusIcon = trusted ? /*#__PURE__*/React.createElement(EntityTrustedIcon, {
45
+ testID: concatTestID(testID, 'statusIcon', 'trusted')
46
+ }) : /*#__PURE__*/React.createElement(EntityNotTrustedIcon, {
47
+ testID: concatTestID(testID, 'statusIcon', 'notTrusted')
48
+ });
49
+ if (trustEntity) {
50
+ return {
51
+ avatar,
52
+ placeholderText: trusted && (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === 'DID' ? trustEntity.name.substring(0, 1) : placeholderText,
53
+ statusIcon,
54
+ testID: concatTestID(testID, 'avatar')
55
+ };
56
+ }
57
+ return {
58
+ placeholderText,
59
+ statusIcon
60
+ };
61
+ }, [trustEntity, trusted, identifierDetail, isLoading, testID]);
24
62
  const trustEntityName = useMemo(() => {
25
- if (!trusted) {
26
- var _identifierDetail$did;
27
- if (identifierDetail !== null && identifierDetail !== void 0 && (_identifierDetail$did = identifierDetail.did) !== null && _identifierDetail$did !== void 0 && _identifierDetail$did.did) {
28
- return replaceBreakingHyphens(identifierDetail.did.did);
63
+ var _identifierDetail$cer2, _identifierDetail$did;
64
+ if (isLoading) {
65
+ return '';
66
+ }
67
+ if ((identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === 'CERTIFICATE' && (_identifierDetail$cer2 = identifierDetail.certificates) !== null && _identifierDetail$cer2 !== void 0 && _identifierDetail$cer2[0]) {
68
+ const commonName = getCertificateCommonName(identifierDetail.certificates[0]);
69
+ if (commonName) {
70
+ return commonName;
29
71
  }
30
- return labels.unknown;
31
72
  }
32
- return trustEntity.name;
33
- }, [labels.unknown, trustEntity, trusted, identifierDetail]);
34
- const trustEntityStatusIcon = useMemo(() => {
35
- if (!trusted) {
36
- return /*#__PURE__*/React.createElement(EntityNotTrustedIcon, {
37
- testID: concatTestID(testID, 'statusIcon', 'notTrusted')
38
- });
73
+ if (trustEntity) {
74
+ return trustEntity.name;
39
75
  }
40
- return /*#__PURE__*/React.createElement(EntityTrustedIcon, {
41
- testID: concatTestID(testID, 'statusIcon', 'trusted')
42
- });
43
- }, [testID, trusted]);
76
+ if (identifierDetail !== null && identifierDetail !== void 0 && (_identifierDetail$did = identifierDetail.did) !== null && _identifierDetail$did !== void 0 && _identifierDetail$did.did) {
77
+ return replaceBreakingHyphens(identifierDetail.did.did);
78
+ }
79
+ return labels.unknown;
80
+ }, [labels.unknown, trustEntity, identifierDetail, isLoading]);
44
81
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EntityCluster, {
45
- avatar: trustEntity ? {
46
- avatar: trusted && trustEntity.logo ? {
47
- imageSource: {
48
- uri: trustEntity.logo
49
- }
50
- } : undefined,
51
- placeholderText: trusted ? trustEntity.name.substring(0, 1) : "U",
52
- statusIcon: trustEntityStatusIcon,
53
- testID: concatTestID(testID, 'avatar')
54
- } : {
55
- statusIcon: trustEntityStatusIcon,
56
- placeholderText: "U"
57
- },
82
+ avatar: avatarProps,
58
83
  entityName: trustEntityName,
59
84
  style: style,
60
- testID: testID
85
+ testID: testID,
86
+ textColor: textColor,
87
+ sublineColor: sublineColor,
88
+ isLoading: isLoading
61
89
  }), trustEntity && renderMore && renderMore(trustEntity));
62
90
  };
63
91
  export default EntityDetails;
@@ -1 +1 @@
1
- {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","useMemo","EntityCluster","EntityNotTrustedIcon","EntityTrustedIcon","concatTestID","replaceBreakingHyphens","useIdentifierDetails","useTrustEntity","EntityDetails","labels","renderMore","role","style","testID","props","_props$identifier","_props$identifier2","data","identifier","id","undefined","trustEntity","entity","identifierDetail","trusted","state","ACTIVE","BOTH","trustEntityName","_identifierDetail$did","did","unknown","name","trustEntityStatusIcon","createElement","Fragment","avatar","logo","imageSource","uri","placeholderText","substring","statusIcon","entityName"],"sources":["entity-details.tsx"],"sourcesContent":["import { TrustEntity, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport { IdentifierListItem } from '@procivis/react-native-one-core/dist/src/identifier';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: TrustEntity) => ReactNode;\n role: Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n} & (\n | {\n identifier?: IdentifierListItem;\n }\n | {\n entity: TrustEntity;\n }\n );\n\nconst EntityDetails: FC<EntityDetailsProps> = ({ labels, renderMore, role, style, testID, ...props }) => {\n const { data } = useTrustEntity('identifier' in props ? props.identifier?.id : undefined);\n const trustEntity: TrustEntity | undefined = 'entity' in props ? props.entity : data ?? undefined;\n const { data: identifierDetail } = useIdentifierDetails('identifier' in props ? props.identifier?.id : undefined);\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role);\n\n const trustEntityName = useMemo(() => {\n if (!trusted) {\n if (identifierDetail?.did?.did) {\n return replaceBreakingHyphens(identifierDetail.did.did);\n }\n return labels.unknown;\n }\n return trustEntity.name;\n }, [labels.unknown, trustEntity, trusted, identifierDetail]);\n\n const trustEntityStatusIcon = useMemo(() => {\n if (!trusted) {\n return <EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />;\n }\n return <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />;\n }, [testID, trusted]);\n\n return (\n <>\n <EntityCluster\n avatar={\n trustEntity\n ? {\n avatar: trusted && trustEntity.logo ? { imageSource: { uri: trustEntity.logo } } : undefined,\n placeholderText: trusted ? trustEntity.name.substring(0, 1) : \"U\",\n statusIcon: trustEntityStatusIcon,\n testID: concatTestID(testID, 'avatar'),\n }\n : {\n statusIcon: trustEntityStatusIcon,\n placeholderText: \"U\",\n }\n }\n entityName={trustEntityName}\n style={style}\n testID={testID}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mappings":"AAAA,SAAsBA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AAExG,OAAOC,KAAK,IAAmBC,OAAO,QAAQ,OAAO;AAGrD,OAAOC,aAAa,MAAM,2CAA2C;AACrE,SAASC,oBAAoB,EAAEC,iBAAiB,QAAQ,2BAA2B;AACnF,SAASC,YAAY,EAAEC,sBAAsB,EAAEC,oBAAoB,QAAQ,aAAa;AACxF,SAASC,cAAc,QAAQ,qCAAqC;AAqBpE,MAAMC,aAAqC,GAAGA,CAAC;EAAEC,MAAM;EAAEC,UAAU;EAAEC,IAAI;EAAEC,KA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C,CAAC;EAE5D,MAAMU,qBAAqB,GAAGjC,OAAO,CAAC,MAAM;IAC1C,IAAI,CAACwB,OAAO,EAAE;MACZ,oBAAOzB,KAAA,CAAAmC,aAAA,CAAChC,oBAAoB;QAACW,MAAM,EAAET,YAAY,CAACS,MAAM,EAAE,YAAY,EAAE,YAAY;MAAE,CAAE,CAAC;IAC3F;IACA,oBAAOd,KAAA,CAAAmC,aAAA,CAAC/B,iBAAiB;MAACU,MAAM,EAAET,YAAY,CAACS,MAAM,EAAE,YAAY,EAAE,SAAS;IAAE,CAAE,CAAC;EACrF,CAAC,EAAE,CAACA,MAAM,EAAEW,OAAO,CAAC,CAAC;EAErB,oBACEzB,KAAA,CAAAmC,aAAA,CAAAnC,KAAA,CAAAoC,QAAA,qBACEpC,KAAA,CAAAmC,aAAA,CAACjC,aAAa;IACZmC,MAAM,EACJf,WAAW,GACP;MACAe,MAAM,EAAEZ,OAAO,IAAIH,WAAW,CAACgB,IAAI,GAAG;QAAEC,WAAW,EAAE;UAAEC,GAAG,EAAElB,WAAW,CAACgB;QAAK;MAAE,CAAC,GAAGjB,SAAS;MAC5FoB,eAAe,EAAEhB,OAAO,GAAGH,WAAW,CAACW,IAAI,CAACS,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG;MACjEC,UAAU,EAAET,qBAAqB;MACjCpB,MAAM,EAAET,YAAY,CAACS,MAAM,EAAE,QAAQ;IACvC,CAAC,GACC;MACA6B,UAAU,EAAET,qBAAqB;MACjCO,eAAe,EAAE;IACnB,CACH;IACDG,UAAU,EAAEf,eAAgB;IAC5BhB,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA;EAAO,CAChB,CAAC,EACDQ,WAAW,IAAIX,UAAU,IAAIA,UAAU,CAACW,WAAW,CACpD,CAAC;AAEP,CAAC;AAED,eAAeb,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["TrustEntityRoleEnum","TrustEntityStateEnum","React","useMemo","EntityCluster","EntityNotTrustedIcon","EntityTrustedIcon","concatTestID","replaceBreakingHyphens","useIdentifierDetails","useTrustEntity","getCertificateCommonName","certificate","_certificate$x509Attr","x509Attributes","subject","split","find","s","startsWith","pop","EntityDetails","labels","renderMore","role","style","testID","sublineColor","textColor","props","_props$identifier","_props$identifier2","data","isLoading","isLoadingTrustEntity","identifier","id","undefined","trustEntity","entity","identifierDetail","isLoadingIdentifier","trusted","state","ACTIVE","BOTH","avatarProps","_identifierDetail$cer","_getCertificateCommon","avatar","type","logo","imageSource","uri","placeholderText","certificates","substring","statusIcon","createElement","name","trustEntityName","_identifierDetail$cer2","_identifierDetail$did","commonName","did","unknown","Fragment","entityName"],"sources":["entity-details.tsx"],"sourcesContent":["import { IdentifierCertificateDetail, IdentifierListItem,TrustEntity, TrustEntityRoleEnum, TrustEntityStateEnum } from '@procivis/react-native-one-core';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { AvatarProps } from '../../ui-components';\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: TrustEntity) => ReactNode;\n role: Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n style?: StyleProp<ViewStyle>;\n sublineColor?: string;\n textColor?: string;\n testID?: string;\n} & (\n | {\n identifier?: IdentifierListItem;\n }\n | {\n entity: TrustEntity;\n }\n );\n\nconst getCertificateCommonName = (certificate: IdentifierCertificateDetail): string | undefined => {\n return certificate.x509Attributes.subject.split(', ').find((s) => s.startsWith('CN'))?.split('=')?.pop();\n}\n\nconst EntityDetails: FC<EntityDetailsProps> = ({ labels, renderMore, role, style, testID, sublineColor, textColor, ...props }) => {\n const { data, isLoading: isLoadingTrustEntity } = useTrustEntity('identifier' in props ? props.identifier?.id : undefined);\n const trustEntity: TrustEntity | undefined = 'entity' in props ? props.entity : data ?? undefined;\n const { data: identifierDetail, isLoading: isLoadingIdentifier } = useIdentifierDetails('identifier' in props ? props.identifier?.id : undefined);\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role);\n\n const isLoading = isLoadingIdentifier || isLoadingTrustEntity;\n\n const avatarProps: AvatarProps | undefined = useMemo(() => {\n if (isLoading) {\n return undefined;\n }\n\n const avatar = trusted && identifierDetail?.type === 'DID' && trustEntity.logo ? { imageSource: { uri: trustEntity.logo } } : undefined;\n\n const placeholderText = identifierDetail?.type === 'CERTIFICATE' && identifierDetail.certificates?.[0] ? getCertificateCommonName(identifierDetail.certificates[0])?.substring(0, 1) : 'D';\n\n const statusIcon = trusted ? \n <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} /> :\n <EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />;\n\n if (trustEntity) {\n return {\n avatar,\n placeholderText: trusted && identifierDetail?.type === 'DID' ? trustEntity.name.substring(0, 1) : placeholderText,\n statusIcon,\n testID: concatTestID(testID, 'avatar'),\n };\n }\n\n return {\n placeholderText,\n statusIcon,\n }\n }, [trustEntity, trusted, identifierDetail, isLoading, testID]);\n\n const trustEntityName = useMemo(() => {\n if (isLoading) {\n return '';\n }\n if (identifierDetail?.type === 'CERTIFICATE' && identifierDetail.certificates?.[0]) {\n const commonName = getCertificateCommonName(identifierDetail.certificates[0]);\n if (commonName) {\n return commonName;\n }\n }\n if (trustEntity) {\n return trustEntity.name;\n }\n if (identifierDetail?.did?.did) {\n return replaceBreakingHyphens(identifierDetail.did.did);\n }\n\n return labels.unknown;\n }, [labels.unknown, trustEntity, identifierDetail, isLoading]);\n\n return (\n <>\n <EntityCluster\n avatar={avatarProps}\n entityName={trustEntityName}\n style={style}\n testID={testID}\n textColor={textColor}\n sublineColor={sublineColor}\n isLoading={isLoading}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mappings":"AAAA,SAAsEA,mBAAmB,EAAEC,oBAAoB,QAAQ,iCAAiC;AACxJ,OAAOC,KAAK,IAAmBC,OAAO,QAAQ,OAAO;AAIrD,OAAOC,aAAa,MAAM,2CAA2C;AACrE,SAASC,oBAAoB,EAAEC,iBAAiB,QAAQ,2BAA2B;AACnF,SAASC,YAAY,EAAEC,sBAAsB,EAAEC,oBAAoB,QAAQ,aAAa;AACxF,SAASC,cAAc,QAAQ,qCAAqC;AAuBpE,MAAMC,wBAAwB,GAAIC,WAAwC,IAAyB;EAAA,IAAAC,qBAAA;EACjG,QAAAA,qBAAA,GAAOD,WAAW,CAACE,cAAc,CAACC,OAAO,CAACC,KAAK,CAAC,IAAI,CAAC,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,UAAU,CAAC,IAAI,CAAC,CAAC,cAAAN,qBAAA,gBAAAA,qBAAA,GAA9EA,qBAAA,CAAgFG,KAAK,CAAC,GAAG,CAAC,cAAAH,qBAAA,uBAA1FA,qBAAA,CAA4FO,GAAG,CAAC,CAAC;AAC1G,CAAC;AAED,MAAMC,aAAqC,GAAGA,CAAC;EAAEC,MAAM;EAAEC,UAAU;EAAEC,IAAI;EAAEC,KAAK;EAAEC,MAAM;EAAEC,YAAY;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,KAAK;EAAA,IAAAC,iBAAA,EAAAC,kBAAA;EAChI,MAAM;IAAEC,IAAI;IAAEC,SAAS,EAAEC;EAAqB,CAAC,GAAGxB,cAAc,CAAC,YAAY,IAAImB,KAAK,IAAAC,iBAAA,GAAGD,KAAK,CAACM,UAAU,cAAAL,iBAAA,uBAAhBA,iBAAA,CAAkBM,EAAE,GAAGC,SAAS,CAAC;EAC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AAC,CAAC,CAAC,CAAC;MAC7E,IAAIQ,UAAU,EAAE;QACd,OAAOA,UAAU;MACnB;IACF;IACA,IAAIzB,WAAW,EAAE;MACf,OAAOA,WAAW,CAACqB,IAAI;IACzB;IACA,IAAInB,gBAAgB,aAAhBA,gBAAgB,gBAAAsB,qBAAA,GAAhBtB,gBAAgB,CAAEwB,GAAG,cAAAF,qBAAA,eAArBA,qBAAA,CAAuBE,GAAG,EAAE;MAC9B,OAAOxD,sBAAsB,CAACgC,gBAAgB,CAACwB,GAAG,CAACA,GAAG,CAAC;IACzD;IAEA,OAAO1C,MAAM,CAAC2C,OAAO;EACvB,CAAC,EAAE,CAAC3C,MAAM,CAAC2C,OAAO,EAAE3B,WAAW,EAAEE,gBAAgB,EAAEP,SAAS,CAAC,CAAC;EAE9D,oBACE/B,KAAA,CAAAwD,aAAA,CAAAxD,KAAA,CAAAgE,QAAA,qBACEhE,KAAA,CAAAwD,aAAA,CAACtD,aAAa;IACZ6C,MAAM,EAAEH,WAAY;IACpBqB,UAAU,EAAEP,eAAgB;IAC5BnC,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfE,SAAS,EAAEA,SAAU;IACrBD,YAAY,EAAEA,YAAa;IAC3BM,SAAS,EAAEA;EAAU,CACtB,CAAC,EACDK,WAAW,IAAIf,UAAU,IAAIA,UAAU,CAACe,WAAW,CACpD,CAAC;AAEP,CAAC;AAED,eAAejB,aAAa","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import EntityDetails, { EntityDetailsLabels, EntityDetailsProps } from './entity-details';
2
- export { EntityDetails, EntityDetailsLabels, EntityDetailsProps };
1
+ import EntityDetails from './entity-details';
2
+ export { EntityDetails };
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["EntityDetails","EntityDetailsLabels","EntityDetailsProps"],"sources":["index.ts"],"sourcesContent":["import EntityDetails, { EntityDetailsLabels, EntityDetailsProps } from './entity-details';\n\nexport { EntityDetails, EntityDetailsLabels, EntityDetailsProps };\n"],"mappings":"AAAA,OAAOA,aAAa,IAAIC,mBAAmB,EAAEC,kBAAkB,QAAQ,kBAAkB;AAEzF,SAASF,aAAa,EAAEC,mBAAmB,EAAEC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["EntityDetails"],"sources":["index.ts"],"sourcesContent":["import type { EntityDetailsLabels, EntityDetailsProps } from './entity-details';\nimport EntityDetails from './entity-details';\n\nexport { EntityDetails, EntityDetailsLabels, EntityDetailsProps };\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,kBAAkB;AAE5C,SAASA,aAAa","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import React, { useCallback } from 'react';
1
+ import React, { useCallback, useMemo } from 'react';
2
2
  import { HistoryItemView } from '../../ui-components';
3
3
  import { formatTime, useTrustEntity } from '../../utils';
4
4
  import { HistoryListItemIcon } from './history-list-item-icon';
@@ -13,19 +13,21 @@ export const HistoryListItemView = ({
13
13
  testID
14
14
  }) => {
15
15
  var _dateFormatter;
16
+ const identifierId = infoLabelMode === 'entity' ? item.target : undefined;
16
17
  const {
17
- data: entity
18
- } = useTrustEntity(infoLabelMode === 'entity' ? item.target : undefined);
18
+ data: trustEntity
19
+ } = useTrustEntity(identifierId);
19
20
  const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;
20
- let infoLabel;
21
- switch (infoLabelMode) {
22
- case 'entity':
23
- infoLabel = entity === null || entity === void 0 ? void 0 : entity.name;
24
- break;
25
- case 'associatedLabel':
26
- infoLabel = item.name;
27
- break;
28
- }
21
+ const info = useMemo(() => {
22
+ switch (infoLabelMode) {
23
+ case 'entity':
24
+ return trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.name;
25
+ case 'associatedLabel':
26
+ return item.name;
27
+ case 'none':
28
+ return undefined;
29
+ }
30
+ }, [infoLabelMode, item, trustEntity]);
29
31
  const icon = /*#__PURE__*/React.createElement(HistoryListItemIcon, {
30
32
  item: item
31
33
  });
@@ -35,7 +37,7 @@ export const HistoryListItemView = ({
35
37
  return /*#__PURE__*/React.createElement(HistoryItemView, {
36
38
  first: first,
37
39
  icon: icon,
38
- info: infoLabel,
40
+ info: info,
39
41
  label: label,
40
42
  last: last,
41
43
  onPress: pressHandler,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","HistoryItemView","formatTime","useTrustEntity","HistoryListItemIcon","HistoryListItemView","dateFormatter","first","infoLabelMode","item","labels","last","onPress","testID","_dateFormatter","data","entity","target","undefined","label","entityTypes","entityType","actions","action","infoLabel","name","icon","createElement","pressHandler","info","time","Date","createdDate"],"sources":["history-list-item.tsx"],"sourcesContent":["import { HistoryActionEnum, HistoryEntityTypeEnum, HistoryListItem } from '@procivis/react-native-one-core';\nimport React, { FC, useCallback } from 'react';\n\nimport { HistoryItemView } from '../../ui-components';\nimport { formatTime, useTrustEntity } from '../../utils';\nimport { HistoryListItemIcon } from './history-list-item-icon';\n\nexport type HistoryListItemLabels = {\n actions: { [key in keyof typeof HistoryActionEnum]: string };\n entityTypes: { [key in keyof typeof HistoryEntityTypeEnum]: string };\n};\n\nexport interface HistoryListItemViewProps {\n dateFormatter?: (date: Date) => string;\n first?: boolean;\n infoLabelMode?: 'entity' | 'associatedLabel' | 'none';\n item: HistoryListItem;\n labels: HistoryListItemLabels;\n last?: boolean;\n onPress?: (item: HistoryListItem) => void;\n testID?: string;\n}\n\nexport const HistoryListItemView: FC<HistoryListItemViewProps> = ({\n dateFormatter = formatTime,\n first,\n infoLabelMode = 'entity',\n item,\n labels,\n last,\n onPress,\n testID\n}) => {\n const { data: entity } = useTrustEntity(infoLabelMode === 'entity' ? item.target : undefined);\n\n const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;\n let infoLabel;\n switch (infoLabelMode) {\n case 'entity':\n infoLabel = entity?.name;\n break;\n case 'associatedLabel':\n infoLabel = item.name;\n break;\n }\n const icon = <HistoryListItemIcon item={item} />;\n\n const pressHandler = useCallback(() => {\n onPress?.(item);\n }, [onPress, item]);\n\n return (\n <HistoryItemView\n first={first}\n icon={icon}\n info={infoLabel}\n label={label}\n last={last}\n onPress={pressHandler}\n testID={testID}\n time={dateFormatter(new Date(item.createdDate)) ?? ''}\n />\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAQC,WAAW,QAAQ,OAAO;AAE9C,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,UAAU,EAAEC,cAAc,QAAQ,aAAa;AACxD,SAASC,mBAAmB,QAAQ,0BAA0B;AAkB9D,OAAO,MAAMC,mBAAiD,GAAGA,CAAC;EAChEC,aAAa,GAAGJ,UAAU;EAC1BK,KAAK;EACLC,aAAa,GAAG,QAAQ;EACxBC,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC,OAAO;EACPC;AACF,CAAC,KAAK;EAAA,IAAAC,cAAA;EACJ,MAAM;IAAEC,IAAI,EAAEC;EAAO,CAAC,GAAGb,cAAc,CAACK,aAAa,KAAK,QAAQ,GAAGC,IAAI,CAACQ,MAAM,GAAGC,SAAS,CAAC;EAE7F,MAAMC,KAAK,GAAG,GAAGT,MAAM,CAACU,WAAW,CAACX,IAAI,CAACY,UAAU,CAAC,IAAIX,MAAM,CAACY,OAAO,CAACb,IAAI,CAACc,MAAM,CAAC,EAAE;EACrF,IAAIC,SAAS;EACb,QAAQhB,aAAa;IACnB,KAAK,QAAQ;MACXgB,SAAS,GAAGR,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAES,IAAI;MACxB;IACF,KAAK,iBAAiB;MACpBD,SAAS,GAAGf,IAAI,CAACgB,IAAI;MACrB;EACJ;EACA,MAAMC,IAAI,gBAAG3B,KAAA,CAAA4B,aAAA,CAACvB,mBAAmB;IAACK,IAAI,EAAEA;EAAK,CAAE,CAAC;EAEhD,MAAMmB,YAAY,GAAG5B,WAAW,CAAC,MAAM;IACrCY,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAGH,IAAI,CAAC;EACjB,CAAC,EAAE,CAACG,OAAO,EAAEH,IAAI,CAAC,CAAC;EAEnB,oBACEV,KAAA,CAAA4B,aAAA,CAAC1B,eAAe;IACdM,KAAK,EAAEA,KAAM;IACbmB,IAAI,EAAEA,IAAK;IACXG,IAAI,EAAEL,SAAU;IAChBL,KAAK,EAAEA,KAAM;IACbR,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEgB,YAAa;IACtBf,MAAM,EAAEA,MAAO;IACfiB,IAAI,GAAAhB,cAAA,GAAER,aAAa,CAAC,IAAIyB,IAAI,CAACtB,IAAI,CAACuB,WAAW,CAAC,CAAC,cAAAlB,cAAA,cAAAA,cAAA,GAAI;EAAG,CACvD,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","HistoryItemView","formatTime","useTrustEntity","HistoryListItemIcon","HistoryListItemView","dateFormatter","first","infoLabelMode","item","labels","last","onPress","testID","_dateFormatter","identifierId","target","undefined","data","trustEntity","label","entityTypes","entityType","actions","action","info","name","icon","createElement","pressHandler","time","Date","createdDate"],"sources":["history-list-item.tsx"],"sourcesContent":["import { HistoryActionEnum, HistoryEntityTypeEnum, HistoryListItem } from '@procivis/react-native-one-core';\nimport React, { FC, useCallback, useMemo } from 'react';\n\nimport { HistoryItemView } from '../../ui-components';\nimport { formatTime, useTrustEntity } from '../../utils';\nimport { HistoryListItemIcon } from './history-list-item-icon';\n\nexport type HistoryListItemLabels = {\n actions: { [key in keyof typeof HistoryActionEnum]: string };\n entityTypes: { [key in keyof typeof HistoryEntityTypeEnum]: string };\n};\n\nexport interface HistoryListItemViewProps {\n dateFormatter?: (date: Date) => string;\n first?: boolean;\n infoLabelMode?: 'entity' | 'associatedLabel' | 'none';\n item: HistoryListItem;\n labels: HistoryListItemLabels;\n last?: boolean;\n onPress?: (item: HistoryListItem) => void;\n testID?: string;\n}\n\nexport const HistoryListItemView: FC<HistoryListItemViewProps> = ({\n dateFormatter = formatTime,\n first,\n infoLabelMode = 'entity',\n item,\n labels,\n last,\n onPress,\n testID,\n}) => {\n const identifierId = infoLabelMode === 'entity' ? item.target : undefined;\n const { data: trustEntity } = useTrustEntity(identifierId);\n\n const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;\n\n const info = useMemo(() => {\n switch (infoLabelMode) {\n case 'entity':\n return trustEntity?.name;\n case 'associatedLabel':\n return item.name;\n case 'none':\n return undefined;\n }\n }, [infoLabelMode, item, trustEntity]);\n\n const icon = <HistoryListItemIcon item={item} />;\n\n const pressHandler = useCallback(() => {\n onPress?.(item);\n }, [onPress, item]);\n\n return (\n <HistoryItemView\n first={first}\n icon={icon}\n info={info}\n label={label}\n last={last}\n onPress={pressHandler}\n testID={testID}\n time={dateFormatter(new Date(item.createdDate)) ?? ''}\n />\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAEvD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,UAAU,EAAEC,cAAc,QAAQ,aAAa;AACxD,SAASC,mBAAmB,QAAQ,0BAA0B;AAkB9D,OAAO,MAAMC,mBAAiD,GAAGA,CAAC;EAChEC,aAAa,GAAGJ,UAAU;EAC1BK,KAAK;EACLC,aAAa,GAAG,QAAQ;EACxBC,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC,OAAO;EACPC;AACF,CAAC,KAAK;EAAA,IAAAC,cAAA;EACJ,MAAMC,YAAY,GAAGP,aAAa,KAAK,QAAQ,GAAGC,IAAI,CAACO,MAAM,GAAGC,SAAS;EACzE,MAAM;IAAEC,IAAI,EAAEC;EAAY,CAAC,GAAGhB,cAAc,CAACY,YAAY,CAAC;EAE1D,MAAMK,KAAK,GAAG,GAAGV,MAAM,CAACW,WAAW,CAACZ,IAAI,CAACa,UAAU,CAAC,IAAIZ,MAAM,CAACa,OAAO,CAACd,IAAI,CAACe,MAAM,CAAC,EAAE;EAErF,MAAMC,IAAI,GAAGzB,OAAO,CAAC,MAAM;IACzB,QAAQQ,aAAa;MACnB,KAAK,QAAQ;QACX,OAAOW,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEO,IAAI;MAC1B,KAAK,iBAAiB;QACpB,OAAOjB,IAAI,CAACiB,IAAI;MAClB,KAAK,MAAM;QACT,OAAOT,SAAS;IACpB;EACF,CAAC,EAAE,CAACT,aAAa,EAAEC,IAAI,EAAEU,WAAW,CAAC,CAAC;EAEtC,MAAMQ,IAAI,gBAAG7B,KAAA,CAAA8B,aAAA,CAACxB,mBAAmB;IAACK,IAAI,EAAEA;EAAK,CAAE,CAAC;EAEhD,MAAMoB,YAAY,GAAG9B,WAAW,CAAC,MAAM;IACrCa,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAGH,IAAI,CAAC;EACjB,CAAC,EAAE,CAACG,OAAO,EAAEH,IAAI,CAAC,CAAC;EAEnB,oBACEX,KAAA,CAAA8B,aAAA,CAAC3B,eAAe;IACdM,KAAK,EAAEA,KAAM;IACboB,IAAI,EAAEA,IAAK;IACXF,IAAI,EAAEA,IAAK;IACXL,KAAK,EAAEA,KAAM;IACbT,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEiB,YAAa;IACtBhB,MAAM,EAAEA,MAAO;IACfiB,IAAI,GAAAhB,cAAA,GAAER,aAAa,CAAC,IAAIyB,IAAI,CAACtB,IAAI,CAACuB,WAAW,CAAC,CAAC,cAAAlB,cAAA,cAAAA,cAAA,GAAI;EAAG,CACvD,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -23,7 +23,7 @@ export const ShareCredential = ({
23
23
  style,
24
24
  testID
25
25
  }) => {
26
- var _credential$issuerDid, _credential$issuer;
26
+ var _credential$issuer;
27
27
  const colorScheme = useAppColorScheme();
28
28
  const {
29
29
  data: credential,
@@ -39,7 +39,6 @@ export const ShareCredential = ({
39
39
  const multipleCredentialsAvailable = selectionOptions.length > 1;
40
40
  const validityState = getValidityState(credential ? {
41
41
  ...credential,
42
- issuerDid: credential === null || credential === void 0 || (_credential$issuerDid = credential.issuerDid) === null || _credential$issuerDid === void 0 ? void 0 : _credential$issuerDid.id,
43
42
  issuer: credential === null || credential === void 0 || (_credential$issuer = credential.issuer) === null || _credential$issuer === void 0 ? void 0 : _credential$issuer.id
44
43
  } : undefined);
45
44
  const invalid = useMemo(() => {
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialStateEnum","React","useMemo","StyleSheet","View","Button","ButtonType","CredentialDetailsCardListItem","Typography","useAppColorScheme","concatTestID","useCoreConfig","useCredentialDetail","getValidityState","ValidityState","shareCredentialCardFromCredential","ShareCredential","allCredentials","credentialId","expanded","labels","lastItem","onHeaderPress","onImagePreview","onSelectCredential","onSelectField","request","selectedCredentialId","selectedFields","style","testID","_credential$issuerDid","_credential$issuer","colorScheme","data","credential","isLoading","config","selectionOptions","applicableCredentials","filter","applicableCredentialId","some","id","state","ACCEPTED","multipleCredentialsAvailable","length","validityState","issuerDid","issuer","undefined","invalid","lvvcIssuanceDate","validityCredentialNbf","Date","footer","Revoked","createElement","styles","notice","backgroundColor","background","align","color","text","preset","revokedCredentialNotice","Suspended","suspendedCredentialNotice","invalidCredentialNotice","multipleCredentialsNotice","onPress","noticeButton","title","multipleCredentialsSelect","type","Secondary","card","attributes","Boolean","onAttributeSelected","borderColor","create","borderRadius","borderWidth","marginBottom","marginHorizontal","padding","marginTop","paddingVertical"],"sources":["share-credential.tsx"],"sourcesContent":["import {\n CredentialListItem,\n CredentialStateEnum,\n PresentationDefinitionField,\n PresentationDefinitionRequestedCredential,\n} from '@procivis/react-native-one-core';\nimport React, { FunctionComponent, useMemo } from 'react';\nimport { ImageSourcePropType, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { Button, ButtonType, CredentialDetailsCardListItem, Typography, useAppColorScheme } from '../../ui-components';\nimport { concatTestID } from '../../utils';\nimport { useCoreConfig } from '../../utils/hooks/core/core-config';\nimport { useCredentialDetail } from '../../utils/hooks/core/credentials';\nimport { getValidityState, ValidityState } from '../../utils/parsers/credential';\nimport { shareCredentialCardFromCredential, ShareCredentialCardLabels } from '../../utils/parsers/credential-sharing';\n\nexport type ShareCredentialLabels = ShareCredentialCardLabels & {\n revokedCredentialNotice: string;\n suspendedCredentialNotice: string;\n invalidCredentialNotice: string;\n multipleCredentialsNotice: string;\n multipleCredentialsSelect: string;\n};\n\nexport const ShareCredential: FunctionComponent<{\n allCredentials: CredentialListItem[];\n credentialId: string;\n expanded?: boolean;\n labels: ShareCredentialLabels;\n lastItem?: boolean;\n onHeaderPress?: (_credentialId?: string) => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n onSelectCredential?: () => void;\n onSelectField: (_id: PresentationDefinitionField['id'], _selected: boolean) => void;\n request: PresentationDefinitionRequestedCredential;\n selectedCredentialId?: CredentialListItem['id'];\n selectedFields?: Array<PresentationDefinitionField['id']>;\n style?: StyleProp<ViewStyle>;\n testID: string;\n}> = ({\n allCredentials,\n credentialId,\n expanded,\n labels,\n lastItem,\n onHeaderPress,\n onImagePreview,\n onSelectCredential,\n onSelectField,\n request,\n selectedCredentialId,\n selectedFields,\n style,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const { data: credential, isLoading } = useCredentialDetail(selectedCredentialId);\n const { data: config } = useCoreConfig();\n\n const selectionOptions = useMemo(\n () =>\n request.applicableCredentials.filter((applicableCredentialId) =>\n allCredentials.some(({ id, state }) => id === applicableCredentialId && state === CredentialStateEnum.ACCEPTED),\n ),\n [allCredentials, request],\n );\n const multipleCredentialsAvailable = selectionOptions.length > 1;\n\n const validityState = getValidityState(\n credential\n ? {\n ...credential,\n issuerDid: credential?.issuerDid?.id,\n issuer: credential?.issuer?.id,\n }\n : undefined,\n );\n\n const invalid = useMemo(() => {\n if (!credential?.lvvcIssuanceDate || !request.validityCredentialNbf) {\n return false;\n }\n return new Date(credential.lvvcIssuanceDate) < new Date(request.validityCredentialNbf);\n }, [credential, request]);\n\n const footer = useMemo(() => {\n if (!expanded) {\n return;\n }\n if (validityState === ValidityState.Revoked) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.revoked')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.revokedCredentialNotice}\n </Typography>\n </View>\n );\n }\n if (validityState === ValidityState.Suspended) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.suspended')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.suspendedCredentialNotice}\n </Typography>\n </View>\n );\n }\n\n if (invalid) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.invalid')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.invalidCredentialNotice}\n </Typography>\n </View>\n );\n }\n\n if (multipleCredentialsAvailable) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.multiple')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.multipleCredentialsNotice}\n </Typography>\n <Button\n onPress={onSelectCredential}\n style={styles.noticeButton}\n testID={concatTestID(testID, 'notice.multiple.button')}\n title={labels.multipleCredentialsSelect}\n type={ButtonType.Secondary}\n />\n </View>\n );\n }\n }, [colorScheme, expanded, invalid, labels, multipleCredentialsAvailable, onSelectCredential, testID, validityState]);\n\n if (isLoading || !config) {\n return null;\n }\n\n const { card, attributes } = shareCredentialCardFromCredential(\n credential,\n invalid,\n Boolean(expanded),\n multipleCredentialsAvailable,\n request,\n selectedFields,\n config,\n testID,\n labels,\n );\n\n return (\n <CredentialDetailsCardListItem\n attributes={attributes}\n card={{\n ...card,\n credentialId,\n onHeaderPress,\n }}\n expanded={expanded}\n footer={footer}\n lastItem={lastItem}\n onAttributeSelected={onSelectField}\n onImagePreview={onImagePreview}\n style={[styles.credential, { borderColor: colorScheme.background }, style]}\n testID={testID}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n credential: {\n borderRadius: 10,\n borderWidth: 1,\n marginBottom: 8,\n },\n notice: {\n marginBottom: 22,\n marginHorizontal: 12,\n padding: 12,\n },\n noticeButton: {\n marginTop: 24,\n paddingVertical: 11,\n },\n});\n"],"mappings":"AAAA,SAEEA,mBAAmB,QAGd,iCAAiC;AACxC,OAAOC,KAAK,IAAuBC,OAAO,QAAQ,OAAO;AACzD,SAAyCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE1F,SAASC,MAAM,EAAEC,UAAU,EAAEC,6BAA6B,EAAEC,UAAU,EAAEC,iBAAiB,QAAQ,qBAAqB;AACtH,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,aAAa,QAAQ,oCAAoC;AAClE,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,gCAAgC;AAChF,SAASC,iCAAiC,QAAmC,wCAAwC;AAUrH,OAAO,MAAMC,eAeX,GAAGA,CAAC;EACJC,cAAc;EACdC,YAAY;EACZC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,aAAa;EACbC,cAAc;EACdC,kBAAkB;EAClBC,aAAa;EACbC,OAAO;EACPC,oBAAoB;EACpBC,cAAc;EACdC,KAAK;EACLC;AACF,CAAC,KAAK;EAAA,IAAAC,qBAAA,EAAAC,kBAAA;EACJ,MAAMC,WAAW,GAAGxB,iBAAiB,CAAC,CAAC;EACvC,MAAM;IAAEyB,IAAI,EAAEC,UAAU;IAAEC;EAAU,CAAC,GAAGxB,mBAAmB,CAACe,oBAAoB,CAAC;EACjF,MAAM;IAAEO,IAAI,EAAEG;EAAO,CAAC,GAAG1B,aAAa,CAAC,CAAC;EAExC,MAAM2B,gBAAgB,GAAGpC,OAAO,CAC9B,MACEwB,OAAO,CAACa,qBAAqB,CAACC,MAAM,CAAEC,sBAAsB,IAC1DxB,cAAc,CAACyB,IAAI,CAAC,CAAC;IAAEC,EAAE;IAAEC;EAAM,CAAC,KAAKD,EAAE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F,cAAc,EAAEA,cAAe;IAC/BM,KAAK,EAAE,CAAC8B,MAAM,CAACxB,UAAU,EAAE;MAAE+C,WAAW,EAAEjD,WAAW,CAAC6B;IAAW,CAAC,EAAEjC,KAAK,CAAE;IAC3EC,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC;AAED,MAAM6B,MAAM,GAAGxD,UAAU,CAACgF,MAAM,CAAC;EAC/BhD,UAAU,EAAE;IACViD,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE;EAChB,CAAC;EACD1B,MAAM,EAAE;IACN0B,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE,EAAE;IACpBC,OAAO,EAAE;EACX,CAAC;EACDf,YAAY,EAAE;IACZgB,SAAS,EAAE,EAAE;IACbC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["CredentialStateEnum","React","useMemo","StyleSheet","View","Button","ButtonType","CredentialDetailsCardListItem","Typography","useAppColorScheme","concatTestID","useCoreConfig","useCredentialDetail","getValidityState","ValidityState","shareCredentialCardFromCredential","ShareCredential","allCredentials","credentialId","expanded","labels","lastItem","onHeaderPress","onImagePreview","onSelectCredential","onSelectField","request","selectedCredentialId","selectedFields","style","testID","_credential$issuer","colorScheme","data","credential","isLoading","config","selectionOptions","applicableCredentials","filter","applicableCredentialId","some","id","state","ACCEPTED","multipleCredentialsAvailable","length","validityState","issuer","undefined","invalid","lvvcIssuanceDate","validityCredentialNbf","Date","footer","Revoked","createElement","styles","notice","backgroundColor","background","align","color","text","preset","revokedCredentialNotice","Suspended","suspendedCredentialNotice","invalidCredentialNotice","multipleCredentialsNotice","onPress","noticeButton","title","multipleCredentialsSelect","type","Secondary","card","attributes","Boolean","onAttributeSelected","borderColor","create","borderRadius","borderWidth","marginBottom","marginHorizontal","padding","marginTop","paddingVertical"],"sources":["share-credential.tsx"],"sourcesContent":["import {\n CredentialListItem,\n CredentialStateEnum,\n PresentationDefinitionField,\n PresentationDefinitionRequestedCredential,\n} from '@procivis/react-native-one-core';\nimport React, { FunctionComponent, useMemo } from 'react';\nimport { ImageSourcePropType, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { Button, ButtonType, CredentialDetailsCardListItem, Typography, useAppColorScheme } from '../../ui-components';\nimport { concatTestID } from '../../utils';\nimport { useCoreConfig } from '../../utils/hooks/core/core-config';\nimport { useCredentialDetail } from '../../utils/hooks/core/credentials';\nimport { getValidityState, ValidityState } from '../../utils/parsers/credential';\nimport { shareCredentialCardFromCredential, ShareCredentialCardLabels } from '../../utils/parsers/credential-sharing';\n\nexport type ShareCredentialLabels = ShareCredentialCardLabels & {\n revokedCredentialNotice: string;\n suspendedCredentialNotice: string;\n invalidCredentialNotice: string;\n multipleCredentialsNotice: string;\n multipleCredentialsSelect: string;\n};\n\nexport const ShareCredential: FunctionComponent<{\n allCredentials: CredentialListItem[];\n credentialId: string;\n expanded?: boolean;\n labels: ShareCredentialLabels;\n lastItem?: boolean;\n onHeaderPress?: (_credentialId?: string) => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n onSelectCredential?: () => void;\n onSelectField: (_id: PresentationDefinitionField['id'], _selected: boolean) => void;\n request: PresentationDefinitionRequestedCredential;\n selectedCredentialId?: CredentialListItem['id'];\n selectedFields?: Array<PresentationDefinitionField['id']>;\n style?: StyleProp<ViewStyle>;\n testID: string;\n}> = ({\n allCredentials,\n credentialId,\n expanded,\n labels,\n lastItem,\n onHeaderPress,\n onImagePreview,\n onSelectCredential,\n onSelectField,\n request,\n selectedCredentialId,\n selectedFields,\n style,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const { data: credential, isLoading } = useCredentialDetail(selectedCredentialId);\n const { data: config } = useCoreConfig();\n\n const selectionOptions = useMemo(\n () =>\n request.applicableCredentials.filter((applicableCredentialId) =>\n allCredentials.some(({ id, state }) => id === applicableCredentialId && state === CredentialStateEnum.ACCEPTED),\n ),\n [allCredentials, request],\n );\n const multipleCredentialsAvailable = selectionOptions.length > 1;\n\n const validityState = getValidityState(\n credential\n ? {\n ...credential,\n issuer: credential?.issuer?.id,\n }\n : undefined,\n );\n\n const invalid = useMemo(() => {\n if (!credential?.lvvcIssuanceDate || !request.validityCredentialNbf) {\n return false;\n }\n return new Date(credential.lvvcIssuanceDate) < new Date(request.validityCredentialNbf);\n }, [credential, request]);\n\n const footer = useMemo(() => {\n if (!expanded) {\n return;\n }\n if (validityState === ValidityState.Revoked) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.revoked')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.revokedCredentialNotice}\n </Typography>\n </View>\n );\n }\n if (validityState === ValidityState.Suspended) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.suspended')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.suspendedCredentialNotice}\n </Typography>\n </View>\n );\n }\n\n if (invalid) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.invalid')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.invalidCredentialNotice}\n </Typography>\n </View>\n );\n }\n\n if (multipleCredentialsAvailable) {\n return (\n <View\n style={[styles.notice, { backgroundColor: colorScheme.background }]}\n testID={concatTestID(testID, 'notice.multiple')}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-capped\">\n {labels.multipleCredentialsNotice}\n </Typography>\n <Button\n onPress={onSelectCredential}\n style={styles.noticeButton}\n testID={concatTestID(testID, 'notice.multiple.button')}\n title={labels.multipleCredentialsSelect}\n type={ButtonType.Secondary}\n />\n </View>\n );\n }\n }, [colorScheme, expanded, invalid, labels, multipleCredentialsAvailable, onSelectCredential, testID, validityState]);\n\n if (isLoading || !config) {\n return null;\n }\n\n const { card, attributes } = shareCredentialCardFromCredential(\n credential,\n invalid,\n Boolean(expanded),\n multipleCredentialsAvailable,\n request,\n selectedFields,\n config,\n testID,\n labels,\n );\n\n return (\n <CredentialDetailsCardListItem\n attributes={attributes}\n card={{\n ...card,\n credentialId,\n onHeaderPress,\n }}\n expanded={expanded}\n footer={footer}\n lastItem={lastItem}\n onAttributeSelected={onSelectField}\n onImagePreview={onImagePreview}\n style={[styles.credential, { borderColor: colorScheme.background }, style]}\n testID={testID}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n credential: {\n borderRadius: 10,\n borderWidth: 1,\n marginBottom: 8,\n },\n notice: {\n marginBottom: 22,\n marginHorizontal: 12,\n padding: 12,\n },\n noticeButton: {\n marginTop: 24,\n paddingVertical: 11,\n },\n});\n"],"mappings":"AAAA,SAEEA,mBAAmB,QAGd,iCAAiC;AACxC,OAAOC,KAAK,IAAuBC,OAAO,QAAQ,OAAO;AACzD,SAAyCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE1F,SAASC,MAAM,EAAEC,UAAU,EAAEC,6BAA6B,EAAEC,UAAU,EAAEC,iBAAiB,QAAQ,qBAAqB;AACtH,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,aAAa,QAAQ,oCAAoC;AAClE,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,gCAAgC;AAChF,SAASC,iCAAiC,QAAmC,wCAAwC;AAUrH,OAAO,MAAMC,eAeX,GAAGA,CAAC;EACJC,cAAc;EACdC,YAAY;EACZC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,aAAa;EACbC,cAAc;EACdC,kBAAkB;EAClBC,aAAa;EACbC,OAAO;EACPC,oBAAoB;EACpBC,cAAc;EACdC,KAAK;EACLC;AACF,CAAC,KAAK;EAAA,IAAAC,kBAAA;EACJ,MAAMC,WAAW,GAAGvB,iBAAiB,CAAC,CAAC;EACvC,MAAM;IAAEwB,IAAI,EAAEC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AAEA,UAAW;IACvBD,IAAI,EAAE;MACJ,GAAGA,IAAI;MACP1D,YAAY;MACZI;IACF,CAAE;IACFH,QAAQ,EAAEA,QAAS;IACnBmC,MAAM,EAAEA,MAAO;IACfjC,QAAQ,EAAEA,QAAS;IACnB0D,mBAAmB,EAAEtD,aAAc;IACnCF,cAAc,EAAEA,cAAe;IAC/BM,KAAK,EAAE,CAAC4B,MAAM,CAACvB,UAAU,EAAE;MAAE8C,WAAW,EAAEhD,WAAW,CAAC4B;IAAW,CAAC,EAAE/B,KAAK,CAAE;IAC3EC,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC;AAED,MAAM2B,MAAM,GAAGtD,UAAU,CAAC8E,MAAM,CAAC;EAC/B/C,UAAU,EAAE;IACVgD,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE;EAChB,CAAC;EACD1B,MAAM,EAAE;IACN0B,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE,EAAE;IACpBC,OAAO,EAAE;EACX,CAAC;EACDf,YAAY,EAAE;IACZgB,SAAS,EAAE,EAAE;IACbC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import BlurView, { BlurViewProps } from './blur-view';
2
- export { BlurView, BlurViewProps };
1
+ import BlurView from './blur-view';
2
+ export { BlurView };
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BlurView","BlurViewProps"],"sources":["index.ts"],"sourcesContent":["import BlurView, { BlurViewProps } from './blur-view';\n\nexport { BlurView, BlurViewProps };\n"],"mappings":"AAAA,OAAOA,QAAQ,IAAIC,aAAa,QAAQ,aAAa;AAErD,SAASD,QAAQ,EAAEC,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["BlurView"],"sources":["index.ts"],"sourcesContent":["import type { BlurViewProps } from './blur-view';\nimport BlurView from './blur-view';\n\nexport { BlurView, BlurViewProps };\n"],"mappings":"AACA,OAAOA,QAAQ,MAAM,aAAa;AAElC,SAASA,QAAQ","ignoreList":[]}