@procivis/one-react-native-components 0.3.121 → 0.3.132

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 (246) 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 +5 -12
  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 +0 -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 +7 -3
  20. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  21. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
  22. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  23. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  24. package/lib/commonjs/ui-components/header/header.js.map +1 -1
  25. package/lib/commonjs/ui-components/history/history-details.js +2 -2
  26. package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
  27. package/lib/commonjs/ui-components/history/history-section-list-item.js +2 -2
  28. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  29. package/lib/commonjs/ui-components/history/index.js +0 -8
  30. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  31. package/lib/commonjs/ui-components/icons/contact.js.map +1 -1
  32. package/lib/commonjs/ui-components/icons/credential.js +3 -3
  33. package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
  34. package/lib/commonjs/ui-components/icons/icons.js +20 -1
  35. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  36. package/lib/commonjs/ui-components/list/index.js +8 -0
  37. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  38. package/lib/commonjs/ui-components/{history/history-item.js → list/list-item.js} +32 -22
  39. package/lib/commonjs/ui-components/list/list-item.js.map +1 -0
  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/nerd-mode-screen.js +7 -33
  43. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  44. package/lib/commonjs/utils/date.js +4 -5
  45. package/lib/commonjs/utils/date.js.map +1 -1
  46. package/lib/commonjs/utils/hooks/core/cache.js +7 -4
  47. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  48. package/lib/commonjs/utils/hooks/core/core-config.js +1 -6
  49. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  50. package/lib/commonjs/utils/hooks/core/core-context.js +0 -15
  51. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  52. package/lib/commonjs/utils/hooks/core/credentials.js +15 -1
  53. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  54. package/lib/commonjs/utils/hooks/core/index.js +0 -11
  55. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  56. package/lib/commonjs/utils/hooks/core/trust-list.js +19 -3
  57. package/lib/commonjs/utils/hooks/core/trust-list.js.map +1 -1
  58. package/lib/commonjs/utils/hooks/core/verifier-instance.js +22 -3
  59. package/lib/commonjs/utils/hooks/core/verifier-instance.js.map +1 -1
  60. package/lib/commonjs/utils/hooks/core/wallet-unit.js +2 -2
  61. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  62. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +23 -18
  63. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  64. package/lib/commonjs/utils/parsers/credential-sharing.js +20 -18
  65. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  66. package/lib/commonjs/utils/parsers/credential.js +36 -22
  67. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  68. package/lib/commonjs/utils/parsers/query.js +2 -2
  69. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  70. package/lib/commonjs/utils/translations.js +15 -0
  71. package/lib/commonjs/utils/translations.js.map +1 -0
  72. package/lib/module/components/credential/credential.js +2 -1
  73. package/lib/module/components/credential/credential.js.map +1 -1
  74. package/lib/module/components/history/history-list-item-icon.js +3 -3
  75. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  76. package/lib/module/components/history/history-list-item.js +7 -14
  77. package/lib/module/components/history/history-list-item.js.map +1 -1
  78. package/lib/module/components/history/history-list-screen.js +1 -1
  79. package/lib/module/components/history/history-list-screen.js.map +1 -1
  80. package/lib/module/components/index.js +0 -1
  81. package/lib/module/components/index.js.map +1 -1
  82. package/lib/module/components/proof-request/v1/select-credential.js +2 -1
  83. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  84. package/lib/module/components/proof-request/v1/share-credential.js +2 -1
  85. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  86. package/lib/module/components/proof-request/v2/select-credential-v2.js +2 -1
  87. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  88. package/lib/module/components/proof-request/v2/share-credential-v2-group.js +3 -1
  89. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  90. package/lib/module/components/proof-request/v2/share-credential-v2.js +7 -3
  91. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  92. package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
  93. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  94. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  95. package/lib/module/ui-components/header/header.js.map +1 -1
  96. package/lib/module/ui-components/history/history-details.js +3 -3
  97. package/lib/module/ui-components/history/history-details.js.map +1 -1
  98. package/lib/module/ui-components/history/history-section-list-item.js +2 -2
  99. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  100. package/lib/module/ui-components/history/index.js +0 -2
  101. package/lib/module/ui-components/history/index.js.map +1 -1
  102. package/lib/module/ui-components/icons/contact.js.map +1 -1
  103. package/lib/module/ui-components/icons/credential.js +1 -1
  104. package/lib/module/ui-components/icons/credential.js.map +1 -1
  105. package/lib/module/ui-components/icons/icons.js +18 -0
  106. package/lib/module/ui-components/icons/icons.js.map +1 -1
  107. package/lib/module/ui-components/list/index.js +2 -0
  108. package/lib/module/ui-components/list/index.js.map +1 -1
  109. package/lib/module/ui-components/{history/history-item.js → list/list-item.js} +32 -22
  110. package/lib/module/ui-components/list/list-item.js.map +1 -0
  111. package/lib/module/ui-components/loader/loading-result.js +2 -0
  112. package/lib/module/ui-components/loader/loading-result.js.map +1 -1
  113. package/lib/module/ui-components/screens/nerd-mode-screen.js +7 -33
  114. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  115. package/lib/module/utils/date.js +4 -5
  116. package/lib/module/utils/date.js.map +1 -1
  117. package/lib/module/utils/hooks/core/cache.js +7 -4
  118. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  119. package/lib/module/utils/hooks/core/core-config.js +0 -4
  120. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  121. package/lib/module/utils/hooks/core/core-context.js +0 -15
  122. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  123. package/lib/module/utils/hooks/core/credentials.js +13 -0
  124. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  125. package/lib/module/utils/hooks/core/index.js +0 -1
  126. package/lib/module/utils/hooks/core/index.js.map +1 -1
  127. package/lib/module/utils/hooks/core/trust-list.js +20 -4
  128. package/lib/module/utils/hooks/core/trust-list.js.map +1 -1
  129. package/lib/module/utils/hooks/core/verifier-instance.js +20 -2
  130. package/lib/module/utils/hooks/core/verifier-instance.js.map +1 -1
  131. package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
  132. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  133. package/lib/module/utils/parsers/credential-sharing-v2.js +24 -19
  134. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  135. package/lib/module/utils/parsers/credential-sharing.js +20 -18
  136. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  137. package/lib/module/utils/parsers/credential.js +37 -23
  138. package/lib/module/utils/parsers/credential.js.map +1 -1
  139. package/lib/module/utils/parsers/query.js +2 -2
  140. package/lib/module/utils/parsers/query.js.map +1 -1
  141. package/lib/module/utils/translations.js +8 -0
  142. package/lib/module/utils/translations.js.map +1 -0
  143. package/lib/typescript/components/credential/credential.d.ts +1 -0
  144. package/lib/typescript/components/history/history-list-item.d.ts +1 -1
  145. package/lib/typescript/components/index.d.ts +0 -1
  146. package/lib/typescript/components/proof-request/v1/select-credential.d.ts +1 -0
  147. package/lib/typescript/components/proof-request/v1/share-credential.d.ts +1 -0
  148. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +1 -0
  149. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +1 -0
  150. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +1 -0
  151. package/lib/typescript/ui-components/history/history-details.d.ts +2 -2
  152. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  153. package/lib/typescript/ui-components/history/index.d.ts +0 -3
  154. package/lib/typescript/ui-components/icons/credential.d.ts +1 -1
  155. package/lib/typescript/ui-components/icons/icons.d.ts +1 -0
  156. package/lib/typescript/ui-components/list/index.d.ts +3 -0
  157. package/lib/typescript/ui-components/{history/history-item.d.ts → list/list-item.d.ts} +4 -4
  158. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +0 -12
  159. package/lib/typescript/utils/hooks/core/core-config.d.ts +0 -1
  160. package/lib/typescript/utils/hooks/core/core-context.d.ts +0 -1
  161. package/lib/typescript/utils/hooks/core/credentials.d.ts +1 -0
  162. package/lib/typescript/utils/hooks/core/index.d.ts +0 -1
  163. package/lib/typescript/utils/hooks/core/trust-list.d.ts +1 -4
  164. package/lib/typescript/utils/hooks/core/verifier-instance.d.ts +2 -0
  165. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +2 -2
  166. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +3 -3
  167. package/lib/typescript/utils/parsers/credential-sharing.d.ts +6 -6
  168. package/lib/typescript/utils/parsers/credential.d.ts +5 -5
  169. package/lib/typescript/utils/parsers/query.d.ts +2 -2
  170. package/lib/typescript/utils/translations.d.ts +1 -0
  171. package/package.json +3 -3
  172. package/src/components/credential/credential.tsx +3 -0
  173. package/src/components/history/history-list-item-icon.tsx +2 -2
  174. package/src/components/history/history-list-item.tsx +7 -12
  175. package/src/components/history/history-list-screen.tsx +1 -1
  176. package/src/components/index.ts +0 -1
  177. package/src/components/proof-request/v1/select-credential.tsx +3 -1
  178. package/src/components/proof-request/v1/share-credential.tsx +3 -0
  179. package/src/components/proof-request/v2/select-credential-v2.tsx +3 -1
  180. package/src/components/proof-request/v2/share-credential-v2-group.tsx +4 -0
  181. package/src/components/proof-request/v2/share-credential-v2.tsx +7 -0
  182. package/src/ui-components/credential/card/credential-details-card.tsx +3 -2
  183. package/src/ui-components/header/foldable-header.tsx +10 -9
  184. package/src/ui-components/header/header.tsx +10 -1
  185. package/src/ui-components/history/history-details.tsx +4 -4
  186. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  187. package/src/ui-components/history/index.ts +0 -3
  188. package/src/ui-components/icons/contact.tsx +1 -1
  189. package/src/ui-components/icons/credential.tsx +1 -1
  190. package/src/ui-components/icons/icons.tsx +18 -0
  191. package/src/ui-components/list/index.ts +3 -0
  192. package/src/ui-components/{history/history-item.tsx → list/list-item.tsx} +36 -33
  193. package/src/ui-components/loader/loading-result.tsx +7 -1
  194. package/src/ui-components/screens/nerd-mode-screen.tsx +2 -52
  195. package/src/utils/date.ts +7 -14
  196. package/src/utils/hooks/core/cache.ts +10 -3
  197. package/src/utils/hooks/core/core-config.ts +1 -6
  198. package/src/utils/hooks/core/core-context.tsx +0 -24
  199. package/src/utils/hooks/core/credentials.ts +13 -0
  200. package/src/utils/hooks/core/index.ts +0 -1
  201. package/src/utils/hooks/core/trust-list.ts +22 -11
  202. package/src/utils/hooks/core/verifier-instance.ts +23 -2
  203. package/src/utils/hooks/core/wallet-unit.ts +3 -3
  204. package/src/utils/parsers/credential-sharing-v2.tsx +34 -14
  205. package/src/utils/parsers/credential-sharing.tsx +33 -16
  206. package/src/utils/parsers/credential.ts +45 -14
  207. package/src/utils/parsers/query.ts +5 -0
  208. package/src/utils/translations.ts +10 -0
  209. package/lib/commonjs/components/entity/EntityButtons.js +0 -64
  210. package/lib/commonjs/components/entity/EntityButtons.js.map +0 -1
  211. package/lib/commonjs/components/entity/entity-attributes.js +0 -65
  212. package/lib/commonjs/components/entity/entity-attributes.js.map +0 -1
  213. package/lib/commonjs/components/entity/entity-details-with-buttons.js +0 -67
  214. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +0 -1
  215. package/lib/commonjs/components/entity/entity-details.js +0 -101
  216. package/lib/commonjs/components/entity/entity-details.js.map +0 -1
  217. package/lib/commonjs/components/entity/index.js +0 -14
  218. package/lib/commonjs/components/entity/index.js.map +0 -1
  219. package/lib/commonjs/ui-components/history/history-item.js.map +0 -1
  220. package/lib/commonjs/utils/hooks/core/trust-entity.js +0 -147
  221. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +0 -1
  222. package/lib/module/components/entity/EntityButtons.js +0 -56
  223. package/lib/module/components/entity/EntityButtons.js.map +0 -1
  224. package/lib/module/components/entity/entity-attributes.js +0 -57
  225. package/lib/module/components/entity/entity-attributes.js.map +0 -1
  226. package/lib/module/components/entity/entity-details-with-buttons.js +0 -58
  227. package/lib/module/components/entity/entity-details-with-buttons.js.map +0 -1
  228. package/lib/module/components/entity/entity-details.js +0 -92
  229. package/lib/module/components/entity/entity-details.js.map +0 -1
  230. package/lib/module/components/entity/index.js +0 -3
  231. package/lib/module/components/entity/index.js.map +0 -1
  232. package/lib/module/ui-components/history/history-item.js.map +0 -1
  233. package/lib/module/utils/hooks/core/trust-entity.js +0 -136
  234. package/lib/module/utils/hooks/core/trust-entity.js.map +0 -1
  235. package/lib/typescript/components/entity/EntityButtons.d.ts +0 -14
  236. package/lib/typescript/components/entity/entity-attributes.d.ts +0 -15
  237. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +0 -18
  238. package/lib/typescript/components/entity/entity-details.d.ts +0 -21
  239. package/lib/typescript/components/entity/index.d.ts +0 -3
  240. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +0 -17
  241. package/src/components/entity/EntityButtons.tsx +0 -79
  242. package/src/components/entity/entity-attributes.tsx +0 -80
  243. package/src/components/entity/entity-details-with-buttons.tsx +0 -75
  244. package/src/components/entity/entity-details.tsx +0 -145
  245. package/src/components/entity/index.ts +0 -4
  246. package/src/utils/hooks/core/trust-entity.ts +0 -172
@@ -11,7 +11,6 @@ export * from './identifiers';
11
11
  export * from './proof-schemas';
12
12
  export * from './proofs';
13
13
  export * from './query';
14
- export * from './trust-entity';
15
14
  export * from './trust-list';
16
15
  export * from './verifier-instance';
17
16
  export * from './wallet-unit';
@@ -1,5 +1,2 @@
1
- export declare const useTrustCollectionSync: () => import("react-query").UseMutationResult<string, unknown, {
2
- holderWalletUnitId?: string | undefined;
3
- verifierInstanceId?: string | undefined;
4
- }, unknown>;
1
+ export declare const useTrustCollectionSync: () => import("react-query").UseMutationResult<string, unknown, void, unknown>;
5
2
  export declare const useTrustListSubscriptionUpdate: () => import("react-query").UseMutationResult<string, unknown, void, unknown>;
@@ -1,5 +1,7 @@
1
1
  import { RegisterVerifierInstanceRequest, UpdateVerifierInstanceRequest } from '@procivis/react-native-one-core';
2
+ export declare const VERIFIER_INSTANCE_QUERY_KEY = "verifier-instance";
2
3
  export declare const VERIFIER_INSTANCE_TRUST_COLLECTIONS_QUERY_KEY = "verifier-instance-trust-collections";
4
+ export declare const useVerifierInstance: (active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").VerifierInstanceDetail | undefined, unknown>;
3
5
  export declare const useVerifierInstanceTrustCollections: (verifierInstanceId: string | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustCollections | undefined, unknown>;
4
6
  export declare const useRegisterVerifierInstance: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").RegisterVerifierInstanceResponse, unknown, Omit<RegisterVerifierInstanceRequest, "organisationId">, unknown>;
5
7
  export declare const useVerifierInstanceUpdate: () => import("react-query").UseMutationResult<void, unknown, {
@@ -1,9 +1,9 @@
1
- import { HolderWalletUnit, HolderWalletUnitUpdateRequest, WalletProvider } from '@procivis/react-native-one-core';
1
+ import { HolderRegisterWalletUnitRequest, HolderWalletUnit, HolderWalletUnitUpdateRequest } from '@procivis/react-native-one-core';
2
2
  export declare const WALLET_UNIT_QUERY_KEY = "wallet-unit";
3
3
  export declare const WALLET_UNIT_TRUST_COLLECTIONS_QUERY_KEY = "wallet-unit-trust-collections";
4
4
  export declare const useWalletUnitDetail: (walletUnitId: HolderWalletUnit['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<HolderWalletUnit | undefined, unknown>;
5
5
  export declare const useWalletUnitTrustCollections: (walletUnitId: HolderWalletUnit['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustCollections | undefined, unknown>;
6
- export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRegisterWalletUnitResponse, unknown, WalletProvider, unknown>;
6
+ export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRegisterWalletUnitResponse, unknown, Omit<HolderRegisterWalletUnitRequest, "organisationId" | "keyType">, unknown>;
7
7
  export declare const useWalletUnitStatus: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
8
8
  export declare const useWalletUnitUpdate: () => import("react-query").UseMutationResult<void, unknown, {
9
9
  walletUnitId: HolderWalletUnit['id'];
@@ -2,9 +2,9 @@ import { CoreConfig, CredentialQueryFailureHint, PresentationDefinitionV2Claim,
2
2
  import { CredentialAttribute, CredentialCardNotice, CredentialCardProps } from '../../ui-components';
3
3
  import { CredentialDetailsCardPropsWithoutWidth } from '.';
4
4
  import { ShareCredentialCardLabels } from './credential-sharing';
5
- export declare const shareCredentialCardAttributeFromV2Claim: (claim: PresentationDefinitionV2Claim, selection: string[] | undefined, parentShared: boolean, parentUserSelected: boolean, config: CoreConfig, testID: string, nested?: boolean, listValue?: boolean) => CredentialAttribute;
5
+ export declare const shareCredentialCardAttributeFromV2Claim: (claim: PresentationDefinitionV2Claim, selection: string[] | undefined, parentShared: boolean, parentUserSelected: boolean, config: CoreConfig, testID: string, language: string | undefined, nested?: boolean, listValue?: boolean) => CredentialAttribute;
6
6
  export declare const missingCredentialCardFromFailureHint: (failureHint: CredentialQueryFailureHint | undefined, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
7
- export declare const shareCredentialCardFromV2PresentationCredential: (credential: PresentationDefinitionV2Credential | undefined, failureHint: CredentialQueryFailureHint | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
8
- export declare const selectCredentialCardFromV2Credential: (credential: PresentationDefinitionV2Credential, selected: boolean, multiple: boolean, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
7
+ export declare const shareCredentialCardFromV2PresentationCredential: (credential: PresentationDefinitionV2Credential | undefined, failureHint: CredentialQueryFailureHint | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, purpose: string | undefined, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
8
+ export declare const selectCredentialCardFromV2Credential: (credential: PresentationDefinitionV2Credential, selected: boolean, multiple: boolean, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
9
9
  export declare const getV2CredentialClaimAllSubpaths: (claim: PresentationDefinitionV2Claim) => string[];
10
10
  export declare const getV2CredentialAvailablePaths: (credential: PresentationDefinitionV2Credential) => string[];
@@ -2,19 +2,19 @@ import { Claim, CoreConfig, CredentialDetail, PresentationDefinitionField, Prese
2
2
  import { CredentialAttribute, CredentialCardProps } from '../../ui-components/credential';
3
3
  import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
4
4
  import { CardLabels, CredentialDetailsCardPropsWithoutWidth } from './credential';
5
- export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, expanded: boolean, multipleCredentialsAvailable: boolean, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
5
+ export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, expanded: boolean, selectiveDisclosureSupported: boolean | undefined, multipleCredentialsAvailable: boolean, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
6
6
  export declare const missingCredentialCardFromRequest: (request: PresentationDefinitionRequestedCredential, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
7
7
  type FlatClaim = Claim & {
8
8
  isArrayElement?: boolean;
9
9
  };
10
- export declare const shareCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
10
+ export declare const shareCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
11
11
  export type ShareCredentialCardLabels = CardLabels & {
12
- selectiveDisclosureNotice: string;
12
+ selectiveDisclosure: string;
13
13
  missingAttribute: string;
14
14
  missingCredential: string;
15
15
  multipleCredentials: string;
16
16
  };
17
- export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
18
- export declare const selectCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
19
- export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
17
+ export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
18
+ export declare const selectCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
19
+ export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
20
20
  export {};
@@ -16,16 +16,16 @@ export type CardHeaderLabels = {
16
16
  suspended: string;
17
17
  suspendedUntil: (date: string) => string;
18
18
  };
19
- export declare const cardHeaderFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, testID: string, labels: CardHeaderLabels) => Omit<CredentialHeaderProps, 'style'>;
19
+ export declare const cardHeaderFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, testID: string, labels: CardHeaderLabels, language: string | undefined) => Omit<CredentialHeaderProps, 'style'>;
20
20
  export type CardLabels = CardHeaderLabels & {
21
21
  validityIssuesNotice: string;
22
22
  };
23
- export declare const getCredentialCardPropsFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: CardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
24
- export declare const detailsCardAttributeFromClaim: (claim: Claim, config: CoreConfig, testID: string) => CredentialAttribute;
23
+ export declare const getCredentialCardPropsFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: CardLabels, language: string | undefined) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
24
+ export declare const detailsCardAttributeFromClaim: (claim: Claim, config: CoreConfig, testID: string, language: string | undefined) => CredentialAttribute;
25
25
  export type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {
26
26
  card: Omit<CredentialCardProps, 'width'>;
27
27
  };
28
- export declare const detailsCardFromCredential: (credential: CredentialDetail, config: CoreConfig, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
29
- export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: CoreConfig, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
28
+ export declare const detailsCardFromCredential: (credential: CredentialDetail, config: CoreConfig, testID: string, labels: CardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
29
+ export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: CoreConfig, testID: string, labels: CardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
30
30
  export declare const nestAttributes: (attributes: CredentialAttribute[]) => CredentialAttribute[];
31
31
  export declare function getCredentialSchemaWithoutImages<T extends CredentialSchemaListItem>(credentialSchema: T): T;
@@ -1,7 +1,7 @@
1
1
  import { CredentialListQuery, CredentialSchemaListQuery, DidListQuery, HistoryListQuery, IdentifierListQuery, ProofListQuery, ProofSchemaListQuery } from '@procivis/react-native-one-core';
2
- export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialListQuerySearchType[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialRole[] | import("@procivis/react-native-one-core").CredentialState[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityType[] | undefined)[];
2
+ export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialListQuerySearchType[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialRole[] | import("@procivis/react-native-one-core").CredentialState[] | import("@procivis/react-native-one-core").CredentialType[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityType[] | undefined)[];
3
3
  export declare const getQueryKeyFromHistoryListQueryParams: (queryParams?: Partial<HistoryListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").HistorySearch | import("@procivis/react-native-one-core").HistoryEntityType[] | import("@procivis/react-native-one-core").HistoryAction[] | undefined)[];
4
- export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
4
+ export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQuery>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
5
5
  export declare const getQueryKeyFromProofSchemaListQueryParams: (queryParams?: Partial<ProofSchemaListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofSchemaListQueryExactColumn[] | undefined)[];
6
6
  export declare const getQueryKeyFromProofListQueryParams: (queryParams?: Partial<ProofListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofListQueryExactColumn[] | import("@procivis/react-native-one-core").ProofState[] | import("@procivis/react-native-one-core").ProofRole[] | undefined)[];
7
7
  export declare const getQueryKeyFromDidListQueryParams: (queryParams?: Partial<DidListQuery>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").DidListQueryExactColumn[] | import("@procivis/react-native-one-core").KeyRole[] | undefined)[];
@@ -0,0 +1 @@
1
+ export declare const getTranslatedLabel: (translations: Record<string, string> | undefined, language: string | undefined, defaultLanguage: string) => string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/one-react-native-components",
3
- "version": "0.3.121",
3
+ "version": "0.3.132",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Common Procivis ONE UI components for react-native",
@@ -53,7 +53,7 @@
53
53
  "@babel/runtime": "^7.25.0",
54
54
  "@commitlint/config-conventional": "^11.0.0",
55
55
  "@gorhom/bottom-sheet": "^5.1.2",
56
- "@procivis/react-native-one-core": "1.100642.0",
56
+ "@procivis/react-native-one-core": "1.108225.0",
57
57
  "@procivis/react-native-picker": "5.0.3",
58
58
  "@react-native-async-storage/async-storage": "^1.17.3",
59
59
  "@react-native-community/blur": "^4.4.0",
@@ -142,7 +142,7 @@
142
142
  "vite": "^6.4.2"
143
143
  },
144
144
  "peerDependencies": {
145
- "@procivis/react-native-one-core": "^1.100642.0",
145
+ "@procivis/react-native-one-core": "^1.108225.0",
146
146
  "@procivis/react-native-picker": "*",
147
147
  "@react-native-community/blur": "*",
148
148
  "@react-native-community/netinfo": "^11.4.1",
@@ -14,6 +14,7 @@ export interface CredentialDetailsProps {
14
14
  expanded?: boolean;
15
15
  headerAccessory?: CredentialHeaderProps['accessory'];
16
16
  labels: CardLabels;
17
+ language?: string;
17
18
  lastItem?: boolean;
18
19
  onHeaderPress?: (credentialId?: string) => void;
19
20
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
@@ -24,6 +25,7 @@ export const CredentialDetails: FC<CredentialDetailsProps> = ({
24
25
  credentialId,
25
26
  expanded = false,
26
27
  labels,
28
+ language,
27
29
  lastItem,
28
30
  onHeaderPress,
29
31
  onImagePreview,
@@ -44,6 +46,7 @@ export const CredentialDetails: FC<CredentialDetailsProps> = ({
44
46
  config,
45
47
  testID,
46
48
  labels,
49
+ language,
47
50
  );
48
51
  if (headerAccessory) {
49
52
  card.header.accessory = headerAccessory;
@@ -42,6 +42,7 @@ const defaultIcons: {
42
42
  OFFERED: HistoryStatusAcceptedIcon,
43
43
  PENDING: HistoryStatusAcceptedIcon,
44
44
  REJECTED: HistoryStatusErrorIcon,
45
+ REFRESHED: HistoryStatusAcceptedIcon,
45
46
  REMOVED: HistoryStatusDeleteIcon,
46
47
  REQUESTED: HistoryStatusAcceptedIcon,
47
48
  RESTORED: HistoryStatusAcceptedIcon,
@@ -61,6 +62,7 @@ const defaultIcons: {
61
62
  WRP_AC_RECEIVED: HistoryStatusAcceptedIcon,
62
63
  WRP_RC_RECEIVED: HistoryStatusAcceptedIcon,
63
64
  WRP_NR_RECEIVED: HistoryStatusAcceptedIcon,
65
+ TRUST_RESOLVED: HistoryStatusAcceptedIcon,
64
66
  },
65
67
  entityTypes: {
66
68
  BACKUP: HistoryRevokeIcon,
@@ -73,8 +75,6 @@ const defaultIcons: {
73
75
  ORGANISATION: HistoryOrganisationIcon,
74
76
  PROOF: HistoryProofRequestIcon,
75
77
  PROOF_SCHEMA: HistorySchemaIcon,
76
- TRUST_ANCHOR: HistoryTrustAnchorIcon,
77
- TRUST_ENTITY: HistoryTrustedEntityIcon,
78
78
  WALLET_UNIT: HistoryTrustedEntityIcon,
79
79
  WALLET_RELYING_PARTY: HistoryTrustedEntityIcon,
80
80
  USER: HistoryIdentifierIcon,
@@ -1,8 +1,8 @@
1
1
  import { HistoryAction, HistoryEntityType, HistoryListItem } from '@procivis/react-native-one-core';
2
2
  import React, { FC, useCallback, useMemo } from 'react';
3
3
 
4
- import { HistoryItemView } from '../../ui-components';
5
- import { formatTime, useTrustEntity } from '../../utils';
4
+ import { ListItemView } from '../../ui-components';
5
+ import { formatTime } from '../../utils';
6
6
  import { HistoryListItemIcon } from './history-list-item-icon';
7
7
 
8
8
  export type HistoryListItemLabels = {
@@ -13,7 +13,7 @@ export type HistoryListItemLabels = {
13
13
  export interface HistoryListItemViewProps {
14
14
  dateFormatter?: (date: Date) => string;
15
15
  first?: boolean;
16
- infoLabelMode?: 'entity' | 'associatedLabel' | 'none';
16
+ infoLabelMode?: 'associatedLabel' | 'none';
17
17
  item: HistoryListItem;
18
18
  labels: HistoryListItemLabels;
19
19
  last?: boolean;
@@ -24,28 +24,23 @@ export interface HistoryListItemViewProps {
24
24
  export const HistoryListItemView: FC<HistoryListItemViewProps> = ({
25
25
  dateFormatter = formatTime,
26
26
  first,
27
- infoLabelMode = 'entity',
27
+ infoLabelMode = 'associatedLabel',
28
28
  item,
29
29
  labels,
30
30
  last,
31
31
  onPress,
32
32
  testID,
33
33
  }) => {
34
- const identifierId = infoLabelMode === 'entity' ? item.target : undefined;
35
- const { data: trustEntity } = useTrustEntity(identifierId);
36
-
37
34
  const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;
38
35
 
39
36
  const info = useMemo(() => {
40
37
  switch (infoLabelMode) {
41
- case 'entity':
42
- return trustEntity?.name;
43
38
  case 'associatedLabel':
44
39
  return item.name;
45
40
  case 'none':
46
41
  return undefined;
47
42
  }
48
- }, [infoLabelMode, item, trustEntity]);
43
+ }, [infoLabelMode, item]);
49
44
 
50
45
  const icon = <HistoryListItemIcon item={item} />;
51
46
 
@@ -54,7 +49,8 @@ export const HistoryListItemView: FC<HistoryListItemViewProps> = ({
54
49
  }, [onPress, item]);
55
50
 
56
51
  return (
57
- <HistoryItemView
52
+ <ListItemView
53
+ accessory={dateFormatter(new Date(item.createdDate))}
58
54
  first={first}
59
55
  icon={icon}
60
56
  info={info}
@@ -62,7 +58,6 @@ export const HistoryListItemView: FC<HistoryListItemViewProps> = ({
62
58
  last={last}
63
59
  onPress={pressHandler}
64
60
  testID={testID}
65
- time={dateFormatter(new Date(item.createdDate)) ?? ''}
66
61
  />
67
62
  );
68
63
  };
@@ -38,7 +38,7 @@ export type HistoryListScreenProps = {
38
38
  export const HistoryListScreen: FC<PropsWithChildren<HistoryListScreenProps>> = ({
39
39
  children,
40
40
  groupItems = groupEntriesByDay,
41
- itemInfoLabelMode = 'entity',
41
+ itemInfoLabelMode = 'associatedLabel',
42
42
  labels,
43
43
  onBackPressed,
44
44
  onHistoryItemPressed,
@@ -1,6 +1,5 @@
1
1
  export * from './backup';
2
2
  export * from './credential';
3
- export * from './entity';
4
3
  export * from './history';
5
4
  export * from './navigation';
6
5
  export * from './proof-request';
@@ -13,13 +13,14 @@ import {
13
13
  export const SelectCredential: FC<{
14
14
  credentialId: string;
15
15
  labels: ShareCredentialCardLabels;
16
+ language?: string;
16
17
  lastItem: boolean;
17
18
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
18
19
  onPress?: () => void;
19
20
  request: PresentationDefinitionRequestedCredential;
20
21
  selected: boolean;
21
22
  testID: string;
22
- }> = ({ credentialId, labels, lastItem, onImagePreview, onPress, request, selected, testID }) => {
23
+ }> = ({ credentialId, labels, language, lastItem, onImagePreview, onPress, request, selected, testID }) => {
23
24
  const { data: credential } = useCredentialDetail(credentialId);
24
25
  const { data: config } = useCoreConfig();
25
26
  const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
@@ -35,6 +36,7 @@ export const SelectCredential: FC<{
35
36
  config,
36
37
  testID,
37
38
  labels,
39
+ language,
38
40
  );
39
41
 
40
42
  return (
@@ -31,6 +31,7 @@ export const ShareCredential: FunctionComponent<{
31
31
  allCredentials: CredentialDetail[];
32
32
  expanded?: boolean;
33
33
  labels: ShareCredentialLabels;
34
+ language?: string;
34
35
  lastItem?: boolean;
35
36
  onHeaderPress?: (_credentialId?: string) => void;
36
37
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
@@ -45,6 +46,7 @@ export const ShareCredential: FunctionComponent<{
45
46
  allCredentials,
46
47
  expanded,
47
48
  labels,
49
+ language,
48
50
  lastItem,
49
51
  onHeaderPress,
50
52
  onImagePreview,
@@ -125,6 +127,7 @@ export const ShareCredential: FunctionComponent<{
125
127
  config,
126
128
  testID,
127
129
  labels,
130
+ language,
128
131
  );
129
132
 
130
133
  return (
@@ -9,13 +9,14 @@ import { selectCredentialCardFromV2Credential } from '../../../utils/parsers/cre
9
9
  export const SelectCredentialV2: FC<{
10
10
  credential: PresentationDefinitionV2Credential;
11
11
  labels: ShareCredentialCardLabels;
12
+ language?: string;
12
13
  lastItem: boolean;
13
14
  multiple: boolean;
14
15
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
15
16
  onSelected?: (credentialId: CredentialListItem['id'], selected: boolean) => void;
16
17
  selected: boolean;
17
18
  testID: string;
18
- }> = ({ credential, labels, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
19
+ }> = ({ credential, labels, language, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
19
20
  const { data: config } = useCoreConfig();
20
21
  const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
21
22
 
@@ -34,6 +35,7 @@ export const SelectCredentialV2: FC<{
34
35
  config,
35
36
  testID,
36
37
  labels,
38
+ language,
37
39
  );
38
40
 
39
41
  return (
@@ -33,6 +33,7 @@ export type ShareCredentialGroupLabels = ShareCredentialLabels & {
33
33
 
34
34
  export type ShareCredentialV2GroupProps = {
35
35
  labels: ShareCredentialGroupLabels;
36
+ language: string;
36
37
  lastGroup: boolean;
37
38
  onGroupSelect?: (selected: boolean) => void;
38
39
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
@@ -83,6 +84,7 @@ const heightForNumberOfCards = (numberOfCards: number) => 60 * (numberOfCards +
83
84
 
84
85
  export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
85
86
  labels,
87
+ language,
86
88
  lastGroup,
87
89
  onGroupSelect,
88
90
  onImagePreview,
@@ -165,6 +167,7 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
165
167
  headerAccessory={headerAccessory}
166
168
  key={credentialRequestId}
167
169
  labels={labels}
170
+ language={language}
168
171
  lastItem={lastItem}
169
172
  onHeaderPress={singleCredentialGroup ? headerPressHandler : onNestedCardHeaderPress(cardId)}
170
173
  onImagePreview={onImagePreview}
@@ -181,6 +184,7 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
181
184
  }, [
182
185
  expandedCredential,
183
186
  labels,
187
+ language,
184
188
  lastGroup,
185
189
  headerPressHandler,
186
190
  onImagePreview,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  ApplicableCredentialOrFailureHint,
3
3
  CredentialListItem,
4
+ CredentialType,
4
5
  PresentationDefinitionV2Claim,
5
6
  } from '@procivis/react-native-one-core';
6
7
  import React, { FunctionComponent, useCallback, useMemo } from 'react';
@@ -20,6 +21,7 @@ export type ShareCredentialV2Props = {
20
21
  grouped?: boolean;
21
22
  headerAccessory?: React.ComponentType<any> | React.ReactElement;
22
23
  labels: ShareCredentialLabels;
24
+ language: string;
23
25
  lastItem?: boolean;
24
26
  onHeaderPress?: (_credentialId?: string) => void;
25
27
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
@@ -44,6 +46,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
44
46
  grouped,
45
47
  headerAccessory,
46
48
  labels,
49
+ language,
47
50
  lastItem,
48
51
  onHeaderPress,
49
52
  onImagePreview,
@@ -64,6 +67,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
64
67
  () => Dimensions.get('window').width - 32 - (grouped ? GroupedShareCredentialV2Padding * 2 : 0),
65
68
  [grouped],
66
69
  );
70
+ const purpose = credentialQuery.type_ === 'APPLICABLE_CREDENTIALS' ? credentialQuery.purpose?.[language] : undefined;
67
71
 
68
72
  const multipleCredentialsAvailable = Boolean(applicableCredentials?.length && applicableCredentials.length > 1);
69
73
 
@@ -72,6 +76,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
72
76
  ? {
73
77
  ...credential,
74
78
  issuer: credential?.issuer?.id,
79
+ type: CredentialType.SINGLE,
75
80
  }
76
81
  : undefined,
77
82
  );
@@ -152,10 +157,12 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
152
157
  failureHint,
153
158
  Boolean(expanded),
154
159
  multipleCredentialsAvailable,
160
+ purpose,
155
161
  selectedFields,
156
162
  config,
157
163
  testID,
158
164
  labels,
165
+ language,
159
166
  );
160
167
 
161
168
  if (headerAccessory) {
@@ -48,6 +48,7 @@ const CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({
48
48
 
49
49
  const cardHeight = Math.ceil(card.width / CredentialCardRatio);
50
50
  const currentHeight = useSharedValue<number | undefined>(undefined);
51
+ const [animatedHeightSet, setAnimatedHeightSet] = useState(false);
51
52
 
52
53
  const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];
53
54
  const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);
@@ -76,6 +77,7 @@ const CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({
76
77
  const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;
77
78
  const fullHeight = previewAttributesHeight + additionalHeight;
78
79
 
80
+ setAnimatedHeightSet(true);
79
81
  if (!animate) {
80
82
  currentHeight.value = fullHeight;
81
83
  return;
@@ -139,8 +141,7 @@ const CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({
139
141
 
140
142
  const { header, ...cardProps } = card;
141
143
 
142
- const renderExtraAttributes =
143
- allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);
144
+ const renderExtraAttributes = allAttributesRendered || (previewAttributesHeight !== undefined && animatedHeightSet);
144
145
 
145
146
  const ContainerComponent = animate ? Animated.View : View;
146
147
  return (
@@ -53,13 +53,15 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
53
53
 
54
54
  const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation
55
55
  ? {
56
- transform: [{
57
- translateY: scrollOffset.interpolate({
58
- extrapolate: 'clamp',
59
- inputRange: [0, headerHeight],
60
- outputRange: [0, -headerHeight],
61
- }),
62
- }],
56
+ transform: [
57
+ {
58
+ translateY: scrollOffset.interpolate({
59
+ extrapolate: 'clamp',
60
+ inputRange: [0, headerHeight],
61
+ outputRange: [0, -headerHeight],
62
+ }),
63
+ },
64
+ ],
63
65
  }
64
66
  : undefined;
65
67
 
@@ -84,8 +86,7 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
84
86
  <Animated.View
85
87
  style={[styles.headerContainer, containerPaddingStyle, withNotice ? styles.noticeBorderRadius : undefined]}>
86
88
  <Animated.View style={scrollHeaderAnimatedStyle}>
87
- <View
88
- style={[styles.blurFill, { top: -containerPaddingTop }]}>
89
+ <View style={[styles.blurFill, { top: -containerPaddingTop }]}>
89
90
  <BlurView
90
91
  blurStyle={'header'}
91
92
  color={colorScheme.background}
@@ -23,7 +23,16 @@ const backButtonHitSlop: Insets = { top: 12, bottom: 12, left: 20, right: 20 };
23
23
  * Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=425-18624
24
24
  * states (Default + Dashboard)
25
25
  */
26
- const Header: FC<HeaderProps> = ({ backIcon, onBack, rightButtons, style, titleRowStyle, testID, title, ...viewProps }) => {
26
+ const Header: FC<HeaderProps> = ({
27
+ backIcon,
28
+ onBack,
29
+ rightButtons,
30
+ style,
31
+ titleRowStyle,
32
+ testID,
33
+ title,
34
+ ...viewProps
35
+ }) => {
27
36
  const colorScheme = useAppColorScheme();
28
37
 
29
38
  return (
@@ -1,7 +1,7 @@
1
1
  import React, { ComponentType, FC, ReactElement, useEffect, useMemo } from 'react';
2
2
  import { ColorValue, Dimensions, ImageSourcePropType, StyleSheet, View } from 'react-native';
3
3
 
4
- import { CredentialDetails, CredentialDetailsProps, EntityDetails, EntityDetailsProps } from '../../components';
4
+ import { CredentialDetails, CredentialDetailsProps, TrustInfo, TrustInfoProps } from '../../components';
5
5
  import { HeaderInfoButton } from '../../components/navigation/header-buttons';
6
6
  import { CardLabels, concatTestID, useCredentialListExpandedCard } from '../../utils';
7
7
  import { TouchableOpacity } from '../accessibility';
@@ -59,7 +59,7 @@ export type HistoryDetailsViewProps = {
59
59
  data: {
60
60
  header?:
61
61
  | {
62
- entity: EntityDetailsProps;
62
+ entity: TrustInfoProps;
63
63
  }
64
64
  | {
65
65
  credentialHeader: CredentialHeaderProps;
@@ -141,9 +141,9 @@ export const HistoryDetailsView: FC<HistoryDetailsViewProps> = ({
141
141
  testID={testID}>
142
142
  <View style={[styles.section, { backgroundColor: colorScheme.white }]}>
143
143
  {data.header && 'entity' in data.header && (
144
- <EntityDetails
144
+ <TrustInfo
145
145
  {...data.header.entity}
146
- style={[styles.entity, { borderColor: colorScheme.background }, data.header.entity.style]}
146
+ style={[styles.entity, { borderBottomColor: colorScheme.background }, data.header.entity.style]}
147
147
  />
148
148
  )}
149
149
  {data.header && 'credentialHeader' in data.header && (
@@ -1,13 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
 
4
+ import ListItemView, { ListItemViewProps } from '../list/list-item';
4
5
  import { useAppColorScheme } from '../theme/color-scheme-context';
5
- import HistoryItemView, { HistoryItemViewProps } from './history-item';
6
6
 
7
7
  // component used on the history section lists (Settings->History, CredentialDetail->History)
8
8
  // https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
9
9
 
10
- export interface HistorySectionListItemProps extends HistoryItemViewProps {
10
+ export interface HistorySectionListItemProps extends ListItemViewProps {
11
11
  first?: boolean;
12
12
  }
13
13
 
@@ -15,7 +15,7 @@ const HistorySectionListItem: FC<HistorySectionListItemProps> = ({ first, last,
15
15
  const colorScheme = useAppColorScheme();
16
16
  return (
17
17
  <View style={[styles.item, first && styles.first, last && styles.last, { backgroundColor: colorScheme.white }]}>
18
- <HistoryItemView last={last} {...props} />
18
+ <ListItemView last={last} {...props} />
19
19
  </View>
20
20
  );
21
21
  };
@@ -1,13 +1,10 @@
1
1
  import type { DataItemProps } from './data-item';
2
2
  import DataItem from './data-item';
3
- import type { HistoryItemViewProps } from './history-item';
4
- import HistoryItemView from './history-item';
5
3
  import HistorySectionHeaderView from './history-section-header';
6
4
  import type { HistorySectionListItemProps } from './history-section-list-item';
7
5
  import HistorySectionListItem from './history-section-list-item';
8
6
 
9
7
  export * from './history-details';
10
8
  export { DataItem, DataItemProps };
11
- export { HistoryItemView, HistoryItemViewProps };
12
9
  export { HistorySectionHeaderView };
13
10
  export { HistorySectionListItem, HistorySectionListItemProps };
@@ -1,5 +1,5 @@
1
1
  import React, { FC } from 'react';
2
- import Svg, { Path,SvgProps } from 'react-native-svg';
2
+ import Svg, { Path, SvgProps } from 'react-native-svg';
3
3
 
4
4
  export const MailIcon: FC<SvgProps> = ({ color, ...props }) => {
5
5
  return (
@@ -44,7 +44,7 @@ export const CredentialWarningIcon: FC<SvgProps> = ({ ...props }) => (
44
44
  );
45
45
 
46
46
  // https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=542-90920&m=dev
47
- export const CredentialNoticInfoIcon: FC<SvgProps> = ({ ...props }) => {
47
+ export const CredentialNoticeInfoIcon: FC<SvgProps> = ({ ...props }) => {
48
48
  const colorScheme = useAppColorScheme();
49
49
  return (
50
50
  <Svg width={24} height={24} viewBox="0 0 24 24" fill="none" {...props}>