@procivis/one-react-native-components 0.3.102 → 0.3.112

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 (248) hide show
  1. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  2. package/lib/commonjs/components/credential/credential.js.map +1 -1
  3. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  4. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -2
  6. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  7. package/lib/commonjs/components/entity/entity-details.js +3 -3
  8. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  9. package/lib/commonjs/components/history/history-details-screen.js +10 -10
  10. package/lib/commonjs/components/history/history-details-screen.js.map +1 -1
  11. package/lib/commonjs/components/history/history-list-item-icon.js +15 -8
  12. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  13. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  14. package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
  15. package/lib/commonjs/components/history/history-list-section-header.js +1 -1
  16. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -1
  17. package/lib/commonjs/components/history/history-list.js.map +1 -1
  18. package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
  19. package/lib/commonjs/components/proof-request/v1/share-credential.js +3 -15
  20. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
  21. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
  22. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  23. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  24. package/lib/commonjs/ui-components/control/checkbox.js +1 -1
  25. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  26. package/lib/commonjs/ui-components/control/switch.js +2 -2
  27. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  28. package/lib/commonjs/ui-components/header/foldable-header.js +26 -16
  29. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  30. package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
  31. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  32. package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
  33. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  34. package/lib/commonjs/ui-components/index.js +11 -0
  35. package/lib/commonjs/ui-components/index.js.map +1 -1
  36. package/lib/commonjs/ui-components/notice/index.js +14 -0
  37. package/lib/commonjs/ui-components/notice/index.js.map +1 -0
  38. package/lib/commonjs/ui-components/notice/wallet-notice.js +80 -0
  39. package/lib/commonjs/ui-components/notice/wallet-notice.js.map +1 -0
  40. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  41. package/lib/commonjs/utils/history.js.map +1 -1
  42. package/lib/commonjs/utils/hooks/core/backup.js +2 -2
  43. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  44. package/lib/commonjs/utils/hooks/core/cache.js +10 -10
  45. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  46. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  47. package/lib/commonjs/utils/hooks/core/credential-schemas.js +1 -1
  48. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  49. package/lib/commonjs/utils/hooks/core/credentials.js +4 -4
  50. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  51. package/lib/commonjs/utils/hooks/core/dids.js +2 -2
  52. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  53. package/lib/commonjs/utils/hooks/core/history.js +1 -1
  54. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  55. package/lib/commonjs/utils/hooks/core/identifiers.js +2 -2
  56. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  57. package/lib/commonjs/utils/hooks/core/index.js +11 -0
  58. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  59. package/lib/commonjs/utils/hooks/core/proof-schemas.js +1 -1
  60. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  61. package/lib/commonjs/utils/hooks/core/proofs.js +23 -13
  62. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  63. package/lib/commonjs/utils/hooks/core/trust-entity.js +1 -1
  64. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  65. package/lib/commonjs/utils/hooks/core/trust-list.js +32 -0
  66. package/lib/commonjs/utils/hooks/core/trust-list.js.map +1 -0
  67. package/lib/commonjs/utils/hooks/core/wallet-unit.js +30 -2
  68. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  69. package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
  70. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  71. package/lib/commonjs/utils/parsers/credential-images.js +4 -4
  72. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  73. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +1 -1
  74. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  75. package/lib/commonjs/utils/parsers/credential-sharing.js +4 -10
  76. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  77. package/lib/commonjs/utils/parsers/credential.js +9 -9
  78. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  79. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  80. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  81. package/lib/module/components/credential/credential.js.map +1 -1
  82. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  83. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  84. package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
  85. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  86. package/lib/module/components/entity/entity-details.js +4 -4
  87. package/lib/module/components/entity/entity-details.js.map +1 -1
  88. package/lib/module/components/history/history-details-screen.js +11 -11
  89. package/lib/module/components/history/history-details-screen.js.map +1 -1
  90. package/lib/module/components/history/history-list-item-icon.js +16 -9
  91. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  92. package/lib/module/components/history/history-list-item.js.map +1 -1
  93. package/lib/module/components/history/history-list-screen.js.map +1 -1
  94. package/lib/module/components/history/history-list-section-header.js +1 -1
  95. package/lib/module/components/history/history-list-section-header.js.map +1 -1
  96. package/lib/module/components/history/history-list.js.map +1 -1
  97. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  98. package/lib/module/components/proof-request/v1/share-credential.js +4 -16
  99. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  100. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  101. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  102. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  103. package/lib/module/ui-components/control/checkbox.js +1 -1
  104. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  105. package/lib/module/ui-components/control/switch.js +3 -3
  106. package/lib/module/ui-components/control/switch.js.map +1 -1
  107. package/lib/module/ui-components/header/foldable-header.js +26 -16
  108. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  109. package/lib/module/ui-components/history/history-section-header.js +1 -1
  110. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  111. package/lib/module/ui-components/history/history-section-list-item.js +1 -1
  112. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  113. package/lib/module/ui-components/index.js +1 -0
  114. package/lib/module/ui-components/index.js.map +1 -1
  115. package/lib/module/ui-components/notice/index.js +3 -0
  116. package/lib/module/ui-components/notice/index.js.map +1 -0
  117. package/lib/module/ui-components/notice/wallet-notice.js +72 -0
  118. package/lib/module/ui-components/notice/wallet-notice.js.map +1 -0
  119. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  120. package/lib/module/utils/history.js.map +1 -1
  121. package/lib/module/utils/hooks/core/backup.js +3 -3
  122. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  123. package/lib/module/utils/hooks/core/cache.js +11 -11
  124. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  125. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  126. package/lib/module/utils/hooks/core/credential-schemas.js +1 -1
  127. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  128. package/lib/module/utils/hooks/core/credentials.js +5 -5
  129. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  130. package/lib/module/utils/hooks/core/dids.js +3 -3
  131. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  132. package/lib/module/utils/hooks/core/history.js +1 -1
  133. package/lib/module/utils/hooks/core/history.js.map +1 -1
  134. package/lib/module/utils/hooks/core/identifiers.js +3 -3
  135. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  136. package/lib/module/utils/hooks/core/index.js +1 -0
  137. package/lib/module/utils/hooks/core/index.js.map +1 -1
  138. package/lib/module/utils/hooks/core/proof-schemas.js +1 -1
  139. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  140. package/lib/module/utils/hooks/core/proofs.js +24 -14
  141. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  142. package/lib/module/utils/hooks/core/trust-entity.js +2 -2
  143. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  144. package/lib/module/utils/hooks/core/trust-list.js +24 -0
  145. package/lib/module/utils/hooks/core/trust-list.js.map +1 -0
  146. package/lib/module/utils/hooks/core/wallet-unit.js +28 -2
  147. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  148. package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
  149. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  150. package/lib/module/utils/parsers/credential-images.js +5 -5
  151. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  152. package/lib/module/utils/parsers/credential-sharing-v2.js +1 -1
  153. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  154. package/lib/module/utils/parsers/credential-sharing.js +4 -10
  155. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  156. package/lib/module/utils/parsers/credential.js +10 -10
  157. package/lib/module/utils/parsers/credential.js.map +1 -1
  158. package/lib/module/utils/parsers/query.js.map +1 -1
  159. package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
  160. package/lib/typescript/components/credential/credential.d.ts +2 -2
  161. package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
  162. package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
  163. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
  164. package/lib/typescript/components/entity/entity-details.d.ts +5 -5
  165. package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
  166. package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
  167. package/lib/typescript/components/history/history-list-item.d.ts +5 -5
  168. package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
  169. package/lib/typescript/components/history/history-list.d.ts +5 -5
  170. package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
  171. package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
  172. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
  173. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
  174. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
  175. package/lib/typescript/ui-components/control/checkbox.d.ts +1 -1
  176. package/lib/typescript/ui-components/index.d.ts +1 -0
  177. package/lib/typescript/ui-components/notice/index.d.ts +2 -0
  178. package/lib/typescript/ui-components/notice/wallet-notice.d.ts +11 -0
  179. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
  180. package/lib/typescript/utils/history.d.ts +3 -3
  181. package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
  182. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
  183. package/lib/typescript/utils/hooks/core/core-config.d.ts +4 -4
  184. package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
  185. package/lib/typescript/utils/hooks/core/credentials.d.ts +8 -8
  186. package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
  187. package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
  188. package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
  189. package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
  190. package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
  191. package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -12
  192. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -5
  193. package/lib/typescript/utils/hooks/core/trust-list.d.ts +5 -0
  194. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +11 -5
  195. package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
  196. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
  197. package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -8
  198. package/lib/typescript/utils/parsers/credential.d.ts +11 -11
  199. package/lib/typescript/utils/parsers/query.d.ts +8 -8
  200. package/package.json +3 -3
  201. package/src/components/backup/preview-credentials.tsx +2 -2
  202. package/src/components/credential/credential.tsx +2 -2
  203. package/src/components/entity/EntityButtons.tsx +2 -2
  204. package/src/components/entity/entity-attributes.tsx +2 -2
  205. package/src/components/entity/entity-details-with-buttons.tsx +6 -11
  206. package/src/components/entity/entity-details.tsx +16 -17
  207. package/src/components/history/history-details-screen.tsx +13 -13
  208. package/src/components/history/history-list-item-icon.tsx +18 -15
  209. package/src/components/history/history-list-item.tsx +5 -9
  210. package/src/components/history/history-list-screen.tsx +4 -4
  211. package/src/components/history/history-list-section-header.tsx +1 -1
  212. package/src/components/history/history-list.tsx +6 -6
  213. package/src/components/proof-request/v1/select-credential.tsx +2 -2
  214. package/src/components/proof-request/v1/share-credential.tsx +12 -31
  215. package/src/components/proof-request/v2/select-credential-v2.tsx +3 -6
  216. package/src/components/proof-request/v2/share-credential-v2-group.tsx +10 -10
  217. package/src/components/proof-request/v2/share-credential-v2.tsx +9 -9
  218. package/src/ui-components/control/checkbox.tsx +12 -10
  219. package/src/ui-components/control/switch.tsx +23 -21
  220. package/src/ui-components/detail/detail.stories.tsx +1 -1
  221. package/src/ui-components/header/foldable-header.tsx +27 -20
  222. package/src/ui-components/history/history-section-header.tsx +1 -1
  223. package/src/ui-components/history/history-section-list-item.tsx +1 -1
  224. package/src/ui-components/index.ts +1 -0
  225. package/src/ui-components/notice/index.ts +3 -0
  226. package/src/ui-components/notice/wallet-notice.tsx +82 -0
  227. package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
  228. package/src/utils/history.ts +4 -4
  229. package/src/utils/hooks/core/backup.ts +3 -3
  230. package/src/utils/hooks/core/cache.ts +13 -13
  231. package/src/utils/hooks/core/core-config.ts +3 -3
  232. package/src/utils/hooks/core/credential-schemas.ts +5 -8
  233. package/src/utils/hooks/core/credentials.ts +14 -22
  234. package/src/utils/hooks/core/dids.ts +4 -4
  235. package/src/utils/hooks/core/history.ts +3 -3
  236. package/src/utils/hooks/core/identifiers.ts +4 -8
  237. package/src/utils/hooks/core/index.ts +1 -0
  238. package/src/utils/hooks/core/proof-schemas.ts +16 -22
  239. package/src/utils/hooks/core/proofs.ts +43 -36
  240. package/src/utils/hooks/core/trust-entity.ts +8 -10
  241. package/src/utils/hooks/core/trust-list.ts +29 -0
  242. package/src/utils/hooks/core/wallet-unit.ts +38 -12
  243. package/src/utils/hooks/revocation/credential-status.ts +2 -2
  244. package/src/utils/parsers/credential-images.tsx +7 -11
  245. package/src/utils/parsers/credential-sharing-v2.tsx +20 -23
  246. package/src/utils/parsers/credential-sharing.tsx +29 -38
  247. package/src/utils/parsers/credential.ts +43 -43
  248. package/src/utils/parsers/query.ts +14 -16
@@ -1,9 +1,9 @@
1
1
  import {
2
- CredentialDetailBindingDto,
3
- CredentialListItemBindingDto,
4
- CredentialStateBindingEnum,
5
- PresentationDefinitionFieldBindingDto,
6
- PresentationDefinitionRequestedCredentialBindingDto,
2
+ CredentialDetail,
3
+ CredentialListItem,
4
+ CredentialState,
5
+ PresentationDefinitionField,
6
+ PresentationDefinitionRequestedCredential,
7
7
  } from '@procivis/react-native-one-core';
8
8
  import React, { FunctionComponent, useMemo } from 'react';
9
9
  import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
@@ -28,17 +28,17 @@ export type ShareCredentialLabels = ShareCredentialCardLabels & {
28
28
  };
29
29
 
30
30
  export const ShareCredential: FunctionComponent<{
31
- allCredentials: CredentialDetailBindingDto[];
31
+ allCredentials: CredentialDetail[];
32
32
  expanded?: boolean;
33
33
  labels: ShareCredentialLabels;
34
34
  lastItem?: boolean;
35
35
  onHeaderPress?: (_credentialId?: string) => void;
36
36
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
37
37
  onSelectCredential?: () => void;
38
- onSelectField: (_id: PresentationDefinitionFieldBindingDto['id'], _selected: boolean) => void;
39
- request: PresentationDefinitionRequestedCredentialBindingDto;
40
- selectedCredentialId?: CredentialListItemBindingDto['id'];
41
- selectedFields?: Array<PresentationDefinitionFieldBindingDto['id']>;
38
+ onSelectField: (_id: PresentationDefinitionField['id'], _selected: boolean) => void;
39
+ request: PresentationDefinitionRequestedCredential;
40
+ selectedCredentialId?: CredentialListItem['id'];
41
+ selectedFields?: Array<PresentationDefinitionField['id']>;
42
42
  style?: StyleProp<ViewStyle>;
43
43
  testID: string;
44
44
  }> = ({
@@ -64,9 +64,7 @@ export const ShareCredential: FunctionComponent<{
64
64
  const selectionOptions = useMemo(
65
65
  () =>
66
66
  request.applicableCredentials.filter((applicableCredentialId) =>
67
- allCredentials.some(
68
- ({ id, state }) => id === applicableCredentialId && state === CredentialStateBindingEnum.ACCEPTED,
69
- ),
67
+ allCredentials.some(({ id, state }) => id === applicableCredentialId && state === CredentialState.ACCEPTED),
70
68
  ),
71
69
  [allCredentials, request],
72
70
  );
@@ -81,13 +79,6 @@ export const ShareCredential: FunctionComponent<{
81
79
  : undefined,
82
80
  );
83
81
 
84
- const invalid = useMemo(() => {
85
- if (!credential?.lvvcIssuanceDate || !request.validityCredentialNbf) {
86
- return false;
87
- }
88
- return new Date(credential.lvvcIssuanceDate) < new Date(request.validityCredentialNbf);
89
- }, [credential, request]);
90
-
91
82
  const footer = useMemo(() => {
92
83
  if (!expanded) {
93
84
  return;
@@ -109,15 +100,6 @@ export const ShareCredential: FunctionComponent<{
109
100
  );
110
101
  }
111
102
 
112
- if (invalid) {
113
- return (
114
- <ShareCredentialCardNotice
115
- testID={concatTestID(testID, 'notice.invalid')}
116
- text={labels.invalidCredentialNotice}
117
- />
118
- );
119
- }
120
-
121
103
  if (multipleCredentialsAvailable) {
122
104
  return (
123
105
  <SelectShareCredentialCardNotice
@@ -128,7 +110,7 @@ export const ShareCredential: FunctionComponent<{
128
110
  />
129
111
  );
130
112
  }
131
- }, [expanded, invalid, labels, multipleCredentialsAvailable, onSelectCredential, testID, validityState]);
113
+ }, [expanded, labels, multipleCredentialsAvailable, onSelectCredential, testID, validityState]);
132
114
 
133
115
  if (!config) {
134
116
  return null;
@@ -136,7 +118,6 @@ export const ShareCredential: FunctionComponent<{
136
118
 
137
119
  const { card, attributes } = shareCredentialCardFromCredential(
138
120
  credential,
139
- invalid,
140
121
  Boolean(expanded),
141
122
  multipleCredentialsAvailable,
142
123
  request,
@@ -1,7 +1,4 @@
1
- import {
2
- CredentialListItemBindingDto,
3
- PresentationDefinitionV2CredentialDetailBindingDto,
4
- } from '@procivis/react-native-one-core';
1
+ import { CredentialListItem, PresentationDefinitionV2Credential } from '@procivis/react-native-one-core';
5
2
  import React, { FC, useCallback, useMemo } from 'react';
6
3
  import { Dimensions, ImageSourcePropType } from 'react-native';
7
4
 
@@ -10,12 +7,12 @@ import { ShareCredentialCardLabels, useCoreConfig } from '../../../utils';
10
7
  import { selectCredentialCardFromV2Credential } from '../../../utils/parsers/credential-sharing-v2';
11
8
 
12
9
  export const SelectCredentialV2: FC<{
13
- credential: PresentationDefinitionV2CredentialDetailBindingDto;
10
+ credential: PresentationDefinitionV2Credential;
14
11
  labels: ShareCredentialCardLabels;
15
12
  lastItem: boolean;
16
13
  multiple: boolean;
17
14
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
18
- onSelected?: (credentialId: CredentialListItemBindingDto['id'], selected: boolean) => void;
15
+ onSelected?: (credentialId: CredentialListItem['id'], selected: boolean) => void;
19
16
  selected: boolean;
20
17
  testID: string;
21
18
  }> = ({ credential, labels, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
@@ -1,8 +1,8 @@
1
1
  import {
2
- CredentialListItemBindingDto,
3
- PresentationDefinitionV2ClaimBindingDto,
4
- PresentationDefinitionV2ResponseBindingDto,
5
- PresentationSubmitV2CredentialRequestBindingDto,
2
+ CredentialListItem,
3
+ PresentationDefinitionV2,
4
+ PresentationDefinitionV2Claim,
5
+ PresentationSubmitV2CredentialRequest,
6
6
  } from '@procivis/react-native-one-core';
7
7
  import React, { FC, useCallback, useMemo } from 'react';
8
8
  import { ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
@@ -24,7 +24,7 @@ import { GroupedShareCredentialV2Padding, ShareCredentialV2 } from './share-cred
24
24
 
25
25
  export type CredentialQuerySelection = Record<
26
26
  string,
27
- PresentationSubmitV2CredentialRequestBindingDto | PresentationSubmitV2CredentialRequestBindingDto[]
27
+ PresentationSubmitV2CredentialRequest | PresentationSubmitV2CredentialRequest[]
28
28
  >;
29
29
 
30
30
  export type ShareCredentialGroupLabels = ShareCredentialLabels & {
@@ -40,11 +40,11 @@ export type ShareCredentialV2GroupProps = {
40
40
  onSelectField: (
41
41
  requestCredentialId: string,
42
42
  ) => (
43
- credentialId: CredentialListItemBindingDto['id'],
44
- fieldPath: PresentationDefinitionV2ClaimBindingDto['path'],
43
+ credentialId: CredentialListItem['id'],
44
+ fieldPath: PresentationDefinitionV2Claim['path'],
45
45
  selected: boolean,
46
46
  ) => void;
47
- presentationDefinition: PresentationDefinitionV2ResponseBindingDto;
47
+ presentationDefinition: PresentationDefinitionV2;
48
48
  requestGroup: string[];
49
49
  selected?: boolean;
50
50
  selectedCredentials?: CredentialQuerySelection;
@@ -61,7 +61,7 @@ const multipleCredentialsSelected = (
61
61
  selectedCredentials &&
62
62
  selectedCredentials[credentialRequestId] &&
63
63
  Array.isArray(selectedCredentials[credentialRequestId]) &&
64
- (selectedCredentials[credentialRequestId] as PresentationSubmitV2CredentialRequestBindingDto[]).length > 1
64
+ (selectedCredentials[credentialRequestId] as PresentationSubmitV2CredentialRequest[]).length > 1
65
65
  );
66
66
  };
67
67
 
@@ -123,7 +123,7 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
123
123
  const lastQuery = credentialRequestIndex === credentialRequestsLength - 1;
124
124
 
125
125
  const credentialQuery = presentationDefinition.credentialQueries[credentialRequestId].credentialOrFailureHint;
126
- let defaultSelection: PresentationSubmitV2CredentialRequestBindingDto;
126
+ let defaultSelection: PresentationSubmitV2CredentialRequest;
127
127
  if (credentialQuery.type_ === 'APPLICABLE_CREDENTIALS') {
128
128
  defaultSelection = credentialQuery.applicableCredentials?.[0]
129
129
  ? {
@@ -1,7 +1,7 @@
1
1
  import {
2
- ApplicableCredentialOrFailureHintBindingEnum,
3
- CredentialListItemBindingDto,
4
- PresentationDefinitionV2ClaimBindingDto,
2
+ ApplicableCredentialOrFailureHint,
3
+ CredentialListItem,
4
+ PresentationDefinitionV2Claim,
5
5
  } from '@procivis/react-native-one-core';
6
6
  import React, { FunctionComponent, useCallback, useMemo } from 'react';
7
7
  import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
@@ -14,7 +14,7 @@ import { ShareCredentialCardNotice } from '../share-credential-card-notice';
14
14
  import { ShareCredentialLabels } from '../v1';
15
15
 
16
16
  export type ShareCredentialV2Props = {
17
- credentialQuery: ApplicableCredentialOrFailureHintBindingEnum;
17
+ credentialQuery: ApplicableCredentialOrFailureHint;
18
18
  credentialRequestId: string;
19
19
  expanded?: boolean;
20
20
  grouped?: boolean;
@@ -25,12 +25,12 @@ export type ShareCredentialV2Props = {
25
25
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
26
26
  onSelectCredential?: () => void;
27
27
  onSelectField: (
28
- credentialId: CredentialListItemBindingDto['id'],
29
- fieldPath: PresentationDefinitionV2ClaimBindingDto['path'],
28
+ credentialId: CredentialListItem['id'],
29
+ fieldPath: PresentationDefinitionV2Claim['path'],
30
30
  selected: boolean,
31
31
  ) => void;
32
- selectedCredentialId?: CredentialListItemBindingDto['id'];
33
- selectedFields?: Array<PresentationDefinitionV2ClaimBindingDto['path']>;
32
+ selectedCredentialId?: CredentialListItem['id'];
33
+ selectedFields?: Array<PresentationDefinitionV2Claim['path']>;
34
34
  style?: StyleProp<ViewStyle>;
35
35
  testID: string;
36
36
  };
@@ -131,7 +131,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
131
131
  ]);
132
132
 
133
133
  const onAttributeSelected = useCallback(
134
- (fieldPath: PresentationDefinitionV2ClaimBindingDto['path'], selected: boolean) => {
134
+ (fieldPath: PresentationDefinitionV2Claim['path'], selected: boolean) => {
135
135
  if (!selectedCredentialId) {
136
136
  return;
137
137
  }
@@ -9,7 +9,7 @@ import { useAppColorScheme } from '../theme';
9
9
 
10
10
  export interface CheckboxProps extends TouchableOpacityProps {
11
11
  value: boolean;
12
- text: ReactNode;
12
+ text?: ReactNode;
13
13
  onValueChanged: (value: boolean) => void;
14
14
  disabled?: boolean;
15
15
  }
@@ -45,15 +45,17 @@ export const Checkbox: FC<CheckboxProps> = ({ style, text, value, disabled, onVa
45
45
  ]}
46
46
  />
47
47
  )}
48
- <View style={[styles.text, disabled && styles.disabled]}>
49
- {typeof text === 'string' ? (
50
- <Typography preset="xs/line-height-small" color={colorScheme.text}>
51
- {text}
52
- </Typography>
53
- ) : (
54
- text
55
- )}
56
- </View>
48
+ {text && (
49
+ <View style={[styles.text, disabled && styles.disabled]}>
50
+ {typeof text === 'string' ? (
51
+ <Typography preset="xs/line-height-small" color={colorScheme.text}>
52
+ {text}
53
+ </Typography>
54
+ ) : (
55
+ text
56
+ )}
57
+ </View>
58
+ )}
57
59
  </TouchableOpacity>
58
60
  );
59
61
  };
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { Insets, Platform, StyleSheet, Switch as RNSwitch, SwitchProps as RNSwitchProps } from 'react-native';
2
+ import { Insets, Platform, StyleSheet, Switch as RNSwitch, SwitchProps as RNSwitchProps, View } from 'react-native';
3
3
 
4
4
  import { useAppColorScheme } from '../theme';
5
5
 
@@ -15,26 +15,28 @@ const hitSlop: Insets = { top: 10, bottom: 10, left: 10, right: 10 };
15
15
  export const Switch = forwardRef<RNSwitch, SwitchProps>(({ value, disabled, style, onChange, ...props }, ref) => {
16
16
  const colorScheme = useAppColorScheme();
17
17
  return (
18
- <RNSwitch
19
- ref={ref}
20
- value={value}
21
- disabled={disabled}
22
- hitSlop={hitSlop}
23
- style={[disabled && styles.disabled, style]}
24
- onValueChange={onChange}
25
- trackColor={Platform.select({
26
- default: { true: colorScheme.grayDark, false: colorScheme.grayDark },
27
- ios: { true: colorScheme.accent, false: colorScheme.grayDark },
28
- })}
29
- thumbColor={Platform.select({
30
- default: value ? colorScheme.accent : disabled ? colorScheme.background : colorScheme.white,
31
- ios: colorScheme.white,
32
- })}
33
- ios_backgroundColor={colorScheme.grayDark}
34
- // @ts-ignore: web only prop
35
- activeThumbColor={colorScheme.accent}
36
- {...props}
37
- />
18
+ <View>
19
+ <RNSwitch
20
+ ref={ref}
21
+ value={value}
22
+ disabled={disabled}
23
+ hitSlop={hitSlop}
24
+ style={[disabled && styles.disabled, style]}
25
+ onValueChange={onChange}
26
+ trackColor={Platform.select({
27
+ default: { true: colorScheme.grayDark, false: colorScheme.grayDark },
28
+ ios: { true: colorScheme.accent, false: colorScheme.grayDark },
29
+ })}
30
+ thumbColor={Platform.select({
31
+ default: value ? colorScheme.accent : disabled ? colorScheme.background : colorScheme.white,
32
+ ios: colorScheme.white,
33
+ })}
34
+ ios_backgroundColor={colorScheme.grayDark}
35
+ // @ts-ignore: web only prop
36
+ activeThumbColor={colorScheme.accent}
37
+ {...props}
38
+ />
39
+ </View>
38
40
  );
39
41
  });
40
42
 
@@ -19,7 +19,7 @@ const Render = ({ onRightAction, contentHeight, headerProps }: Args) => {
19
19
  headerProps={{
20
20
  ...headerProps,
21
21
  rightButtons: [
22
- <TouchableOpacity onPress={onRightAction} hitSlop={hitSlop}>
22
+ <TouchableOpacity key="R" onPress={onRightAction} hitSlop={hitSlop}>
23
23
  <Placeholder id="R" style={styles.rightButton} />
24
24
  </TouchableOpacity>,
25
25
  ],
@@ -27,8 +27,9 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
27
27
  const [collapsed, setCollapsed] = useState(header ? false : true);
28
28
  const [headerHeight, setHeaderHeight] = useState<number>();
29
29
 
30
+ const containerPaddingTop = withNotice ? 15 : safeAreaInsets.top;
30
31
  const containerPaddingStyle = {
31
- paddingTop: withNotice ? 15 : safeAreaInsets.top,
32
+ paddingTop: containerPaddingTop,
32
33
  };
33
34
 
34
35
  useEffect(() => {
@@ -52,11 +53,13 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
52
53
 
53
54
  const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation
54
55
  ? {
55
- paddingTop: scrollOffset.interpolate({
56
- extrapolate: 'clamp',
57
- inputRange: [0, headerHeight],
58
- outputRange: [headerHeight, 0],
59
- }),
56
+ transform: [{
57
+ translateY: scrollOffset.interpolate({
58
+ extrapolate: 'clamp',
59
+ inputRange: [0, headerHeight],
60
+ outputRange: [0, -headerHeight],
61
+ }),
62
+ }],
60
63
  }
61
64
  : undefined;
62
65
 
@@ -80,32 +83,36 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
80
83
  return (
81
84
  <Animated.View
82
85
  style={[styles.headerContainer, containerPaddingStyle, withNotice ? styles.noticeBorderRadius : undefined]}>
83
- <View style={[styles.blurWrapper, StyleSheet.absoluteFill]}>
84
- <BlurView
85
- blurStyle={'header'}
86
- color={colorScheme.background}
87
- style={[StyleSheet.absoluteFill, withNotice ? styles.noticeBorderRadius : undefined]}
88
- />
89
- </View>
90
- <View>
91
- <Animated.View style={scrollHeaderAnimatedStyle}>
92
- {searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}
93
- </Animated.View>
86
+ <Animated.View style={scrollHeaderAnimatedStyle}>
87
+ <View
88
+ style={[styles.blurFill, { top: -containerPaddingTop }]}>
89
+ <BlurView
90
+ blurStyle={'header'}
91
+ color={colorScheme.background}
92
+ style={[StyleSheet.absoluteFill, withNotice ? styles.noticeBorderRadius : undefined]}
93
+ />
94
+ </View>
94
95
  {header && (
95
- <Animated.View onLayout={onHeaderLayout} style={[styles.headerContainer, fadeHeaderOutAnimatedStyle]}>
96
+ <Animated.View onLayout={onHeaderLayout} style={fadeHeaderOutAnimatedStyle}>
96
97
  {header}
97
98
  </Animated.View>
98
99
  )}
99
- </View>
100
+ {searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}
101
+ </Animated.View>
100
102
  </Animated.View>
101
103
  );
102
104
  };
103
105
 
104
106
  const styles = StyleSheet.create({
105
- blurWrapper: {
107
+ blurFill: {
108
+ bottom: 0,
109
+ left: 0,
106
110
  overflow: 'hidden',
111
+ position: 'absolute',
112
+ right: 0,
107
113
  },
108
114
  headerContainer: {
115
+ overflow: 'hidden',
109
116
  position: 'absolute',
110
117
  width: '100%',
111
118
  },
@@ -5,7 +5,7 @@ import { concatTestID } from '../../utils/testID';
5
5
  import Typography from '../text/typography';
6
6
  import { useAppColorScheme } from '../theme/color-scheme-context';
7
7
 
8
- // component used on the history section lists (Settings->History, CredentialDetailBindingDto->History)
8
+ // component used on the history section lists (Settings->History, CredentialDetail->History)
9
9
  // https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
10
10
 
11
11
  const HistorySectionHeaderView: FC<{
@@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native';
4
4
  import { useAppColorScheme } from '../theme/color-scheme-context';
5
5
  import HistoryItemView, { HistoryItemViewProps } from './history-item';
6
6
 
7
- // component used on the history section lists (Settings->History, CredentialDetailBindingDto->History)
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
10
  export interface HistorySectionListItemProps extends HistoryItemViewProps {
@@ -17,6 +17,7 @@ export * from './list';
17
17
  export * from './loader';
18
18
  export * from './nerd-view';
19
19
  export * from './nfc';
20
+ export * from './notice';
20
21
  export * from './pin';
21
22
  export * from './proof-request';
22
23
  export * from './screens';
@@ -0,0 +1,3 @@
1
+ import WalletNotice from './wallet-notice';
2
+
3
+ export { WalletNotice };
@@ -0,0 +1,82 @@
1
+ import React, { ComponentType, FunctionComponent, JSXElementConstructor, ReactElement, useMemo } from 'react';
2
+ import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
3
+
4
+ import { concatTestID } from '../../utils';
5
+ import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
6
+ import { CloseIcon } from '../icons';
7
+ import { Typography } from '../text';
8
+ import { useAppColorScheme } from '../theme';
9
+
10
+ export type WalletNoticeProps = {
11
+ accessory?: ComponentType<any> | ReactElement;
12
+ icon?: ComponentType<any> | ReactElement;
13
+ onClose?: () => void;
14
+ style?: StyleProp<ViewStyle>;
15
+ text: string;
16
+ };
17
+
18
+ const testID = 'WalletNotice';
19
+
20
+ const WalletNotice: FunctionComponent<WalletNoticeProps> = ({ accessory, icon, style, text, onClose }) => {
21
+ const colorScheme = useAppColorScheme();
22
+
23
+ const iconView: React.ReactElement | undefined = useMemo(() => {
24
+ if (!icon) {
25
+ return undefined;
26
+ }
27
+ if (React.isValidElement(icon)) {
28
+ return icon;
29
+ } else {
30
+ const IconComponent = icon as JSXElementConstructor<any>;
31
+ return <IconComponent />;
32
+ }
33
+ }, [icon]);
34
+
35
+ const accessoryView: React.ReactElement | undefined = useMemo(() => {
36
+ if (!accessory) {
37
+ return undefined;
38
+ }
39
+ if (React.isValidElement(accessory)) {
40
+ return accessory;
41
+ } else {
42
+ const AccessoryComponent = accessory as JSXElementConstructor<any>;
43
+ return <AccessoryComponent />;
44
+ }
45
+ }, [accessory]);
46
+
47
+ return (
48
+ <View style={[styles.noticeContainer, style]}>
49
+ <View style={styles.title}>
50
+ {iconView}
51
+ <Typography color={colorScheme.white}>{text}</Typography>
52
+ {accessoryView}
53
+ </View>
54
+ {onClose && (
55
+ <TouchableOpacity onPress={onClose} style={styles.closeIcon} testID={concatTestID(testID, 'close')}>
56
+ <CloseIcon color="white" />
57
+ </TouchableOpacity>
58
+ )}
59
+ </View>
60
+ );
61
+ };
62
+
63
+ const styles = StyleSheet.create({
64
+ closeIcon: {
65
+ position: 'absolute',
66
+ right: 20,
67
+ top: 5,
68
+ },
69
+ noticeContainer: {
70
+ flexDirection: 'row',
71
+ justifyContent: 'center',
72
+ position: 'relative',
73
+ },
74
+ title: {
75
+ alignItems: 'center',
76
+ flexDirection: 'row',
77
+ gap: 5,
78
+ justifyContent: 'center',
79
+ },
80
+ });
81
+
82
+ export default WalletNotice;
@@ -1,4 +1,4 @@
1
- import { GetIdentifierListItemBindingDto } from '@procivis/react-native-one-core';
1
+ import { IdentifierListItem } from '@procivis/react-native-one-core';
2
2
  import React, { FunctionComponent, useState } from 'react';
3
3
  import { SectionList, StyleSheet, View } from 'react-native';
4
4
  import Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';
@@ -34,7 +34,7 @@ export interface AttributesLabels {
34
34
  }
35
35
 
36
36
  interface SectionEntityCluster {
37
- identifier?: GetIdentifierListItemBindingDto;
37
+ identifier?: IdentifierListItem;
38
38
  subline?: string;
39
39
  entityLabels: EntityLabels;
40
40
  role: ContextRole;
@@ -1,14 +1,14 @@
1
- import { HistoryListItemBindingDto } from '@procivis/react-native-one-core';
1
+ import { HistoryListItem } from '@procivis/react-native-one-core';
2
2
  import moment, { Moment } from 'moment';
3
3
 
4
4
  export interface HistoryGroupByDaySection {
5
- data: HistoryListItemBindingDto[];
5
+ data: HistoryListItem[];
6
6
  date: Moment;
7
7
  firstYearEntry: boolean;
8
8
  }
9
9
 
10
- export const groupEntriesByDay = (entries: HistoryListItemBindingDto[]) => {
11
- const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItemBindingDto) => {
10
+ export const groupEntriesByDay = (entries: HistoryListItem[]) => {
11
+ const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItem) => {
12
12
  const entryDate = moment(entry.createdDate);
13
13
 
14
14
  const matchingEntry = result.find(({ date }) => date.isSame(entryDate, 'day'));
@@ -1,4 +1,4 @@
1
- import { IdentifierStateBindingEnum, IdentifierTypeBindingEnum } from '@procivis/react-native-one-core';
1
+ import { IdentifierState, IdentifierType } from '@procivis/react-native-one-core';
2
2
  import { useCallback } from 'react';
3
3
  import { useMutation, useQuery, useQueryClient } from 'react-query';
4
4
 
@@ -81,11 +81,11 @@ export const useBackupFinalizeImportProcedure = ({ generateHwKey, generateSwKey
81
81
  let swIdentifierId: string | undefined;
82
82
  if (generateSwKey) {
83
83
  const identifiers = await core.listIdentifiers({
84
- states: [IdentifierStateBindingEnum.ACTIVE],
84
+ states: [IdentifierState.ACTIVE],
85
85
  organisationId,
86
86
  page: 0,
87
87
  pageSize: 1,
88
- types: [IdentifierTypeBindingEnum.DID],
88
+ types: [IdentifierType.DID],
89
89
  isRemote: false,
90
90
  });
91
91
  swIdentifierId = identifiers.values.find((identifier) => identifier.name.startsWith(SW_DID_NAME_PREFIX))?.id;
@@ -1,4 +1,4 @@
1
- import { CacheTypeBindingDto } from '@procivis/react-native-one-core';
1
+ import { CacheType } from '@procivis/react-native-one-core';
2
2
  import { useMutation, useQueryClient } from 'react-query';
3
3
 
4
4
  import { useONECore } from './core-context';
@@ -8,17 +8,17 @@ import { REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY, TRUST_ENTITY_DETAIL_QUERY_KEY } f
8
8
  const CREDENTIAL_QUERY_KEYS = [CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, CREDENTIAL_DETAIL_QUERY_KEY];
9
9
  const TRUST_ENTITY_QUERY_KEYS = [TRUST_ENTITY_DETAIL_QUERY_KEY, REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY];
10
10
 
11
- // Map each CacheTypeBindingDto to the query keys that should be invalidated when that cache is cleared.
12
- const cacheTypeToQueryKeys: Record<CacheTypeBindingDto, string[]> = {
13
- [CacheTypeBindingDto.DID_DOCUMENT]: CREDENTIAL_QUERY_KEYS,
14
- [CacheTypeBindingDto.JSON_LD_CONTEXT]: CREDENTIAL_QUERY_KEYS,
15
- [CacheTypeBindingDto.STATUS_LIST_CREDENTIAL]: CREDENTIAL_QUERY_KEYS,
16
- [CacheTypeBindingDto.VCT_METADATA]: CREDENTIAL_QUERY_KEYS,
17
- [CacheTypeBindingDto.JSON_SCHEMA]: CREDENTIAL_QUERY_KEYS,
18
- [CacheTypeBindingDto.TRUST_LIST]: [...TRUST_ENTITY_QUERY_KEYS, ...CREDENTIAL_QUERY_KEYS],
19
- [CacheTypeBindingDto.X509_CRL]: CREDENTIAL_QUERY_KEYS,
20
- [CacheTypeBindingDto.ANDROID_ATTESTATION_CRL]: CREDENTIAL_QUERY_KEYS,
21
- [CacheTypeBindingDto.OPEN_ID_METADATA]: CREDENTIAL_QUERY_KEYS,
11
+ // Map each CacheType to the query keys that should be invalidated when that cache is cleared.
12
+ const cacheTypeToQueryKeys: Record<CacheType, string[]> = {
13
+ [CacheType.DID_DOCUMENT]: CREDENTIAL_QUERY_KEYS,
14
+ [CacheType.JSON_LD_CONTEXT]: CREDENTIAL_QUERY_KEYS,
15
+ [CacheType.STATUS_LIST_CREDENTIAL]: CREDENTIAL_QUERY_KEYS,
16
+ [CacheType.VCT_METADATA]: CREDENTIAL_QUERY_KEYS,
17
+ [CacheType.JSON_SCHEMA]: CREDENTIAL_QUERY_KEYS,
18
+ [CacheType.TRUST_LIST]: [...TRUST_ENTITY_QUERY_KEYS, ...CREDENTIAL_QUERY_KEYS],
19
+ [CacheType.X509_CRL]: CREDENTIAL_QUERY_KEYS,
20
+ [CacheType.ANDROID_ATTESTATION_CRL]: CREDENTIAL_QUERY_KEYS,
21
+ [CacheType.OPEN_ID_METADATA]: CREDENTIAL_QUERY_KEYS,
22
22
  };
23
23
 
24
24
  export const useCacheClear = () => {
@@ -26,7 +26,7 @@ export const useCacheClear = () => {
26
26
  const { core } = useONECore();
27
27
 
28
28
  return useMutation(
29
- async (cacheTypes: CacheTypeBindingDto[]) => {
29
+ async (cacheTypes: CacheType[]) => {
30
30
  await core.deleteCache(cacheTypes);
31
31
  return cacheTypes;
32
32
  },
@@ -1,4 +1,4 @@
1
- import { Config, ConfigEntities } from '@procivis/react-native-one-core';
1
+ import { ConfigEntities,CoreConfig } from '@procivis/react-native-one-core';
2
2
  import { useQuery } from 'react-query';
3
3
 
4
4
  import { useONECore } from './core-context';
@@ -13,7 +13,7 @@ export const useCoreConfig = () => {
13
13
  });
14
14
  };
15
15
 
16
- export const getEnabledTransports = (config: Config): string[] => {
16
+ export const getEnabledTransports = (config: CoreConfig): string[] => {
17
17
  return Object.values(config?.transport ?? {})
18
18
  .filter((t) => t.enabled !== false)
19
19
  .map((transport) => transport.type);
@@ -25,7 +25,7 @@ export const getEnabledExchangeProtocols = (exchangeProtocol: ConfigEntities<any
25
25
  .map((exchange) => exchange.type);
26
26
  };
27
27
 
28
- export const getEnabledTrustManagement = (config: Config): string[] => {
28
+ export const getEnabledTrustManagement = (config: CoreConfig): string[] => {
29
29
  return Object.values(config?.trustManagement ?? {})
30
30
  .filter((t) => t.enabled !== false)
31
31
  .map((trustManagement) => trustManagement.type);