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

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 (202) hide show
  1. package/lib/commonjs/components/entity/entity-attributes.js +14 -1
  2. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  3. package/lib/commonjs/components/entity/entity-details-with-buttons.js +9 -42
  4. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details.js +60 -32
  6. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  7. package/lib/commonjs/components/entity/index.js +2 -15
  8. package/lib/commonjs/components/entity/index.js.map +1 -1
  9. package/lib/commonjs/components/history/history-list-item.js +14 -12
  10. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  11. package/lib/commonjs/components/proof-request/share-credential.js +1 -2
  12. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  13. package/lib/commonjs/ui-components/blur/index.js +2 -9
  14. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  15. package/lib/commonjs/ui-components/buttons/hold-button.js +3 -2
  16. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
  17. package/lib/commonjs/ui-components/camera/index.js +2 -9
  18. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  19. package/lib/commonjs/ui-components/control/index.js +0 -12
  20. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  21. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +1 -1
  22. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  23. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +15 -8
  24. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  25. package/lib/commonjs/ui-components/entity/entity-cluster.js +50 -2
  26. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  27. package/lib/commonjs/ui-components/entity/index.js +3 -16
  28. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  29. package/lib/commonjs/ui-components/history/history-details.js +1 -1
  30. package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
  31. package/lib/commonjs/ui-components/history/index.js +4 -27
  32. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  33. package/lib/commonjs/ui-components/icons/entity.js +10 -13
  34. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  35. package/lib/commonjs/ui-components/input/index.js +3 -32
  36. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  37. package/lib/commonjs/ui-components/list/index.js +4 -19
  38. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  39. package/lib/commonjs/ui-components/loader/index.js +2 -13
  40. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  41. package/lib/commonjs/ui-components/pin/index.js +2 -21
  42. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  43. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  44. package/lib/commonjs/ui-components/searchbar/index.js +3 -16
  45. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  46. package/lib/commonjs/ui-components/settings/index.js +6 -37
  47. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  48. package/lib/commonjs/ui-components/state/index.js +2 -15
  49. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  50. package/lib/commonjs/utils/date.js +1 -1
  51. package/lib/commonjs/utils/date.js.map +1 -1
  52. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +4 -0
  53. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  54. package/lib/commonjs/utils/hooks/core/backup.js +22 -66
  55. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  56. package/lib/commonjs/utils/hooks/core/core-init.js +6 -2
  57. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  58. package/lib/commonjs/utils/hooks/core/identifiers.js +23 -1
  59. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  60. package/lib/commonjs/utils/hooks/core/proofs.js +24 -14
  61. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  62. package/lib/commonjs/utils/hooks/core/trust-entity.js +56 -14
  63. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  64. package/lib/commonjs/utils/parsers/credential-sharing.js +6 -15
  65. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  66. package/lib/commonjs/utils/parsers/credential.js +2 -2
  67. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  68. package/lib/commonjs/utils/parsers/query.js +23 -86
  69. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  70. package/lib/module/components/entity/entity-attributes.js +15 -2
  71. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  72. package/lib/module/components/entity/entity-details-with-buttons.js +11 -44
  73. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  74. package/lib/module/components/entity/entity-details.js +61 -33
  75. package/lib/module/components/entity/entity-details.js.map +1 -1
  76. package/lib/module/components/entity/index.js +2 -2
  77. package/lib/module/components/entity/index.js.map +1 -1
  78. package/lib/module/components/history/history-list-item.js +15 -13
  79. package/lib/module/components/history/history-list-item.js.map +1 -1
  80. package/lib/module/components/proof-request/share-credential.js +1 -2
  81. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  82. package/lib/module/ui-components/blur/index.js +2 -2
  83. package/lib/module/ui-components/blur/index.js.map +1 -1
  84. package/lib/module/ui-components/buttons/hold-button.js +4 -3
  85. package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
  86. package/lib/module/ui-components/camera/index.js +2 -2
  87. package/lib/module/ui-components/camera/index.js.map +1 -1
  88. package/lib/module/ui-components/control/index.js +3 -3
  89. package/lib/module/ui-components/control/index.js.map +1 -1
  90. package/lib/module/ui-components/credential/card/credential-details-card.js +1 -1
  91. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  92. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -8
  93. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  94. package/lib/module/ui-components/entity/entity-cluster.js +51 -3
  95. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  96. package/lib/module/ui-components/entity/index.js +4 -4
  97. package/lib/module/ui-components/entity/index.js.map +1 -1
  98. package/lib/module/ui-components/history/history-details.js +1 -1
  99. package/lib/module/ui-components/history/history-details.js.map +1 -1
  100. package/lib/module/ui-components/history/index.js +6 -6
  101. package/lib/module/ui-components/history/index.js.map +1 -1
  102. package/lib/module/ui-components/icons/entity.js +10 -13
  103. package/lib/module/ui-components/icons/entity.js.map +1 -1
  104. package/lib/module/ui-components/input/index.js +6 -6
  105. package/lib/module/ui-components/input/index.js.map +1 -1
  106. package/lib/module/ui-components/list/index.js +4 -4
  107. package/lib/module/ui-components/list/index.js.map +1 -1
  108. package/lib/module/ui-components/loader/index.js +4 -4
  109. package/lib/module/ui-components/loader/index.js.map +1 -1
  110. package/lib/module/ui-components/pin/index.js +3 -3
  111. package/lib/module/ui-components/pin/index.js.map +1 -1
  112. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  113. package/lib/module/ui-components/searchbar/index.js +4 -4
  114. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  115. package/lib/module/ui-components/settings/index.js +10 -10
  116. package/lib/module/ui-components/settings/index.js.map +1 -1
  117. package/lib/module/ui-components/state/index.js +2 -2
  118. package/lib/module/ui-components/state/index.js.map +1 -1
  119. package/lib/module/utils/date.js +1 -1
  120. package/lib/module/utils/date.js.map +1 -1
  121. package/lib/module/utils/hooks/connectivity/connectivity.test.js +4 -0
  122. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  123. package/lib/module/utils/hooks/core/backup.js +24 -68
  124. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  125. package/lib/module/utils/hooks/core/core-init.js +5 -3
  126. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  127. package/lib/module/utils/hooks/core/identifiers.js +21 -0
  128. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  129. package/lib/module/utils/hooks/core/proofs.js +24 -14
  130. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  131. package/lib/module/utils/hooks/core/trust-entity.js +57 -15
  132. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  133. package/lib/module/utils/parsers/credential-sharing.js +6 -15
  134. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  135. package/lib/module/utils/parsers/credential.js +2 -2
  136. package/lib/module/utils/parsers/credential.js.map +1 -1
  137. package/lib/module/utils/parsers/query.js +21 -85
  138. package/lib/module/utils/parsers/query.js.map +1 -1
  139. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  140. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +1 -2
  141. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  142. package/lib/typescript/components/entity/index.d.ts +2 -1
  143. package/lib/typescript/ui-components/blur/index.d.ts +2 -1
  144. package/lib/typescript/ui-components/buttons/hold-button.d.ts +2 -2
  145. package/lib/typescript/ui-components/camera/index.d.ts +2 -1
  146. package/lib/typescript/ui-components/control/index.d.ts +4 -2
  147. package/lib/typescript/ui-components/credential/credential-carousel-images.d.ts +1 -0
  148. package/lib/typescript/ui-components/entity/entity-cluster.d.ts +1 -0
  149. package/lib/typescript/ui-components/entity/index.d.ts +4 -2
  150. package/lib/typescript/ui-components/history/history-details.d.ts +4 -1
  151. package/lib/typescript/ui-components/history/index.d.ts +6 -3
  152. package/lib/typescript/ui-components/input/index.d.ts +6 -3
  153. package/lib/typescript/ui-components/list/index.d.ts +4 -2
  154. package/lib/typescript/ui-components/loader/index.d.ts +4 -2
  155. package/lib/typescript/ui-components/pin/index.d.ts +4 -2
  156. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +1 -1
  157. package/lib/typescript/ui-components/searchbar/index.d.ts +4 -2
  158. package/lib/typescript/ui-components/settings/index.d.ts +10 -5
  159. package/lib/typescript/ui-components/state/index.d.ts +2 -1
  160. package/lib/typescript/utils/hooks/core/backup.d.ts +5 -0
  161. package/lib/typescript/utils/hooks/core/core-init.d.ts +4 -1
  162. package/lib/typescript/utils/hooks/core/identifiers.d.ts +4 -1
  163. package/lib/typescript/utils/hooks/core/proofs.d.ts +1 -0
  164. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +9 -3
  165. package/lib/typescript/utils/parsers/query.d.ts +8 -7
  166. package/package.json +10 -5
  167. package/src/components/entity/entity-attributes.tsx +16 -2
  168. package/src/components/entity/entity-details-with-buttons.tsx +11 -42
  169. package/src/components/entity/entity-details.tsx +96 -33
  170. package/src/components/entity/index.ts +2 -1
  171. package/src/components/history/history-list-item.tsx +17 -13
  172. package/src/components/proof-request/share-credential.tsx +0 -1
  173. package/src/ui-components/blur/index.ts +2 -1
  174. package/src/ui-components/buttons/hold-button.tsx +6 -5
  175. package/src/ui-components/camera/index.tsx +2 -1
  176. package/src/ui-components/control/index.ts +4 -2
  177. package/src/ui-components/credential/card/credential-details-card.tsx +1 -1
  178. package/src/ui-components/credential/credential-carousel-images.tsx +15 -8
  179. package/src/ui-components/entity/entity-cluster.tsx +63 -10
  180. package/src/ui-components/entity/index.ts +4 -2
  181. package/src/ui-components/history/history-details.tsx +5 -2
  182. package/src/ui-components/history/index.ts +6 -3
  183. package/src/ui-components/icons/entity.tsx +8 -12
  184. package/src/ui-components/input/index.ts +6 -3
  185. package/src/ui-components/list/index.ts +4 -2
  186. package/src/ui-components/loader/index.ts +4 -2
  187. package/src/ui-components/pin/index.ts +4 -2
  188. package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
  189. package/src/ui-components/searchbar/index.ts +4 -2
  190. package/src/ui-components/settings/index.ts +10 -5
  191. package/src/ui-components/state/index.ts +2 -1
  192. package/src/utils/date.ts +1 -1
  193. package/src/utils/hooks/connectivity/connectivity.test.ts +7 -2
  194. package/src/utils/hooks/core/backup.ts +30 -72
  195. package/src/utils/hooks/core/core-init.ts +5 -3
  196. package/src/utils/hooks/core/identifiers.ts +22 -1
  197. package/src/utils/hooks/core/proofs.ts +27 -16
  198. package/src/utils/hooks/core/trust-entity.ts +73 -23
  199. package/src/utils/parsers/credential-sharing.tsx +8 -14
  200. package/src/utils/parsers/credential.ts +2 -1
  201. package/src/utils/parsers/query.ts +149 -0
  202. package/src/utils/parsers/query.tsx +0 -82
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","cardHeaderFromCredential","labels","_formatDateTimeLocali","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","credentialDetailPrimary","issuanceDate","credentialDetailSecondary","credentialDetailErrorColor","credentialDetailTestID","statusIcon","layoutProperties","suspendEndDate","suspendedUntil","suspended","revoked","validityIssues","primary","primaryAttribute","secondary","secondaryAttribute","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","String","date","File","_typeConfig$params","params","showAs","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInObject","join","nestAttributeInDummyObject","pathParts","disabled","object","_object$attributes","nextParent","_object$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n} from '@procivis/react-native-one-core';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n let credentialDetailPrimary = formatDateTimeLocalized(new Date(credential.issuanceDate)) ?? '';\n\n let credentialDetailSecondary: string | undefined;\n let credentialDetailErrorColor: boolean | undefined;\n let credentialDetailTestID: string | undefined;\n let statusIcon;\n\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n credentialDetailPrimary = credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended;\n credentialDetailTestID = concatTestID(testID, 'suspended');\n statusIcon = CredentialWarningIcon;\n break;\n case CredentialStateEnum.REVOKED:\n credentialDetailPrimary = labels.revoked;\n credentialDetailErrorColor = true;\n credentialDetailTestID = concatTestID(testID, 'revoked');\n statusIcon = CredentialErrorIcon;\n break;\n default: {\n if (hasMsoValidityIssues(credential)) {\n credentialDetailPrimary = labels.validityIssues;\n credentialDetailTestID = concatTestID(testID, 'validity-issue');\n statusIcon = CredentialWarningIcon;\n } else {\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n credentialDetailTestID = concatTestID(testID, 'detail');\n }\n break;\n }\n }\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: (claim.value || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n if (!claim.value) {\n // Don't try to parse empty values (which will return \"Invalid Date\")\n return { testID: testID, value: String(claim.value) };\n }\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.File: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyObject(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyObject = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n return {\n attributes: [nestAttributeInDummyObject({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: attribute.path,\n };\n};\n\n// Recursively insert an attribute into an object\n// Will create nested objects if necessary\nconst insertAttributeInObject = (attribute: CredentialAttribute, object: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = object.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n object.attributes?.push(nestAttributeInDummyObject(attribute));\n } else {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.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BAAgB,CAAC5E,gBAAgB,cAAA+E,sBAAA,uBAAjCA,sBAAA,CAAmCpE,IAAI;QAC1CK,KAAK,EAAE0D,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAAC5E,gBAAgB,cAAAgF,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCrE,IAAI,cAAAqE,sBAAA,uBAAvCA,sBAAA,CAAyChE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","cardHeaderFromCredential","labels","_formatDateTimeLocali","_credential$issuanceD","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","credentialDetailPrimary","issuanceDate","createdDate","credentialDetailSecondary","credentialDetailErrorColor","credentialDetailTestID","statusIcon","layoutProperties","suspendEndDate","suspendedUntil","suspended","revoked","validityIssues","primary","primaryAttribute","secondary","secondaryAttribute","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","String","date","File","_typeConfig$params","params","showAs","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInObject","join","nestAttributeInDummyObject","pathParts","disabled","object","_object$attributes","nextParent","_object$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n} from '@procivis/react-native-one-core';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n let credentialDetailPrimary =\n formatDateTimeLocalized(new Date(credential.issuanceDate ?? credential.createdDate)) ?? '';\n\n let credentialDetailSecondary: string | undefined;\n let credentialDetailErrorColor: boolean | undefined;\n let credentialDetailTestID: string | undefined;\n let statusIcon;\n\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n credentialDetailPrimary = credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended;\n credentialDetailTestID = concatTestID(testID, 'suspended');\n statusIcon = CredentialWarningIcon;\n break;\n case CredentialStateEnum.REVOKED:\n credentialDetailPrimary = labels.revoked;\n credentialDetailErrorColor = true;\n credentialDetailTestID = concatTestID(testID, 'revoked');\n statusIcon = CredentialErrorIcon;\n break;\n default: {\n if (hasMsoValidityIssues(credential)) {\n credentialDetailPrimary = labels.validityIssues;\n credentialDetailTestID = concatTestID(testID, 'validity-issue');\n statusIcon = CredentialWarningIcon;\n } else {\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n credentialDetailTestID = concatTestID(testID, 'detail');\n }\n break;\n }\n }\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: (claim.value || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n if (!claim.value) {\n // Don't try to parse empty values (which will return \"Invalid Date\")\n return { testID: testID, value: String(claim.value) };\n }\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.File: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyObject(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyObject = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n return {\n attributes: [nestAttributeInDummyObject({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: attribute.path,\n };\n};\n\n// Recursively insert an attribute into an object\n// Will create nested objects if necessary\nconst insertAttributeInObject = (attribute: CredentialAttribute, object: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = object.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n object.attributes?.push(nestAttributeInDummyObject(attribute));\n } else {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.image),\n },\n },\n };\n}\n"],"mappings":"AAAA,SAMEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,QACZ,iCAAiC;AAUxC,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,2BAA2B;AACnH,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,2BAA2B,QAAQ,qBAAqB;AAEjE,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAMzB,OAAO,MAAMC,gBAAgB,GAAIC,UAA0C,IAAK;EAC9E,IAAI,CAAAA,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACc,OAAO,EAAE;IACrD,OAAOJ,aAAa,CAACK,OAAO;EAC9B;EACA,IAAI,CAAAH,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACgB,SAAS,EAAE;IACvD,OAAON,aAAa,CAACO,SAAS;EAChC;EACA,OAAOP,aAAa,CAACQ,KAAK;AAC5B,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAGA,CAACP,UAA0C,EAAEQ,MAA0B,KAAK;EAAA,IAAAC,qBAAA;EACrH,MAAMC,YAAY,GAAGV,UAAU,KAAIQ,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEG,MAAM,CAACX,UAAU,CAACY,MAAM,CAACD,MAAM,CAAC;EAC3E,OAAOD,YAAY,GACfG,OAAO,EAAAJ,qBAAA,GAACC,YAAY,CAACI,YAAY,cAAAL,qBAAA,gBAAAA,qBAAA,GAAzBA,qBAAA,CAA2BM,QAAQ,cAAAN,q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GAACF,gBAAgB,CAAC5E,gBAAgB,cAAA8E,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmC/C,UAAU,cAAA+C,sBAAA,uBAA7CA,sBAAA,CAA+C9D,KAAK;MAC9E,CAAC;MACDL,IAAI,EAAE;QACJ,KAAAoE,sBAAA,GAAGH,gBAAgB,CAAC5E,gBAAgB,cAAA+E,sBAAA,uBAAjCA,sBAAA,CAAmCpE,IAAI;QAC1CK,KAAK,EAAE0D,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAAC5E,gBAAgB,cAAAgF,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCrE,IAAI,cAAAqE,sBAAA,uBAAvCA,sBAAA,CAAyChE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,92 +1,28 @@
1
- export const getQueryKeyFromCredentialListQueryParams = queryParams => {
2
- if (!queryParams) {
3
- return [];
4
- }
5
- const {
6
- name,
7
- sort,
8
- sortDirection,
9
- exact,
10
- role,
11
- ids,
12
- status,
13
- include
14
- } = queryParams;
15
- return [name, sort, sortDirection, exact, role, ids, status, include];
1
+ // otherwise produce a wrong return type which should trigger compilation error
2
+
3
+ /** Typecheck that all query params are included in the query key */
4
+ function getQueryKey(queryParams, params) {
5
+ return params.map(param => queryParams[param]);
6
+ }
7
+ export const getQueryKeyFromCredentialListQueryParams = (queryParams = {}) => {
8
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'searchText', 'searchType', 'sort', 'sortDirection', 'exact', 'role', 'ids', 'status', 'include', 'profile']);
16
9
  };
17
- export const getQueryKeyFromHistoryListQueryParams = queryParams => {
18
- if (!queryParams) {
19
- return [];
20
- }
21
- const {
22
- entityId,
23
- action,
24
- entityTypes,
25
- createdDateFrom,
26
- createdDateTo,
27
- identifierId,
28
- credentialId,
29
- credentialSchemaId,
30
- searchText,
31
- searchType,
32
- proofSchemaId
33
- } = queryParams;
34
- return [entityId, action, entityTypes, createdDateFrom, createdDateTo, identifierId, credentialId, credentialSchemaId, searchText, searchType, proofSchemaId];
10
+ export const getQueryKeyFromHistoryListQueryParams = (queryParams = {}) => {
11
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'entityId', 'actions', 'entityTypes', 'createdDateFrom', 'createdDateTo', 'identifierId', 'credentialId', 'credentialSchemaId', 'proofSchemaId', 'searchText', 'searchType']);
35
12
  };
36
- export const getQueryKeyFromCredentialSchemaListQueryParams = queryParams => {
37
- if (!queryParams) {
38
- return [];
39
- }
40
- const {
41
- name,
42
- sort,
43
- sortDirection,
44
- exact,
45
- ids,
46
- include
47
- } = queryParams;
48
- return [name, sort, sortDirection, exact, ids, include];
13
+ export const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams = {}) => {
14
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'sort', 'sortDirection', 'exact', 'ids', 'include', 'schemaId', 'formats']);
49
15
  };
50
- export const getQueryKeyFromProofSchemaListQueryParams = queryParams => {
51
- if (!queryParams) {
52
- return [];
53
- }
54
- const {
55
- name,
56
- sort,
57
- sortDirection,
58
- exact,
59
- ids
60
- } = queryParams;
61
- return [name, sort, sortDirection, exact, ids];
16
+ export const getQueryKeyFromProofSchemaListQueryParams = (queryParams = {}) => {
17
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'sort', 'sortDirection', 'exact', 'ids', 'formats']);
62
18
  };
63
- export const getQueryKeyFromProofListQueryParams = queryParams => {
64
- if (!queryParams) {
65
- return [];
66
- }
67
- const {
68
- name,
69
- sort,
70
- sortDirection,
71
- exact,
72
- ids,
73
- proofStates,
74
- proofSchemaIds
75
- } = queryParams;
76
- return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];
19
+ export const getQueryKeyFromProofListQueryParams = (queryParams = {}) => {
20
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'sort', 'sortDirection', 'name', 'ids', 'proofStates', 'proofRoles', 'proofSchemaIds', 'exact', 'profile']);
77
21
  };
78
- export const getQueryKeyFromDidListQueryParams = queryParams => {
79
- if (!queryParams) {
80
- return [];
81
- }
82
- const {
83
- name,
84
- did,
85
- type,
86
- deactivated,
87
- keyAlgorithms,
88
- keyRoles
89
- } = queryParams;
90
- return [name, did, type, deactivated, keyAlgorithms, keyRoles];
22
+ export const getQueryKeyFromDidListQueryParams = (queryParams = {}) => {
23
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'sort', 'sortDirection', 'name', 'did', 'type', 'deactivated', 'exact', 'keyAlgorithms', 'keyRoles', 'keyStorages', 'keyIds', 'didMethods']);
24
+ };
25
+ export const getQueryKeyFromIdentifierListQueryParams = (queryParams = {}) => {
26
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'sort', 'sortDirection', 'name', 'types', 'state', 'exact', 'didMethods', 'isRemote', 'keyAlgorithms', 'keyRoles', 'keyStorages']);
91
27
  };
92
28
  //# sourceMappingURL=query.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getQueryKeyFromCredentialListQueryParams","queryParams","name","sort","sortDirection","exact","role","ids","status","include","getQueryKeyFromHistoryListQueryParams","entityId","action","entityTypes","createdDateFrom","createdDateTo","identifierId","credentialId","credentialSchemaId","searchText","searchType","proofSchemaId","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","proofStates","proofSchemaIds","getQueryKeyFromDidListQueryParams","did","type","deactivated","keyAlgorithms","keyRoles"],"sources":["query.tsx"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams?: Partial<CredentialListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, role, ids, status, include } = queryParams;\n return [name, sort, sortDirection, exact, role, ids, status, include];\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams?: Partial<HistoryListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const {\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n identifierId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n } = queryParams;\n return [\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n identifierId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n proofSchemaId,\n ];\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, include } = queryParams;\n return [name, sort, sortDirection, exact, ids, include];\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams?: Partial<ProofSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids } = queryParams;\n return [name, sort, sortDirection, exact, ids];\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams?: Partial<ProofListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds } = queryParams;\n return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams?: Partial<DidListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { name, did, type, deactivated, keyAlgorithms, keyRoles } = queryParams;\n return [name, did, type, deactivated, keyAlgorithms, keyRoles];\n};\n"],"mappings":"AASA,OAAO,MAAMA,wCAAwC,GAAIC,WAA0C,IAAK;EACtG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEC,IAAI;IAAEC,GAAG;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGR,WAAW;EACpF,OAAO,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ACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEE,GAAG;IAAEkB,WAAW;IAAEC;EAAe,CAAC,GAAGzB,WAAW;EAC1F,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,EAAEkB,WAAW,EAAEC,cAAc,CAAC;AAC7E,CAAC;AAED,OAAO,MAAMC,iCAAiC,GAAI1B,WAAmC,IAAK;EACxF,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAM;IAAEC,IAAI;IAAE0B,GAAG;IAAEC,IAAI;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAG/B,WAAW;EAC7E,OAAO,CAACC,IAAI,EAAE0B,GAAG,EAAEC,IAAI,EAAEC,WAAW,EAAEC,aAAa,EAAEC,QAAQ,CAAC;AAChE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getQueryKey","queryParams","params","map","param","getQueryKeyFromCredentialListQueryParams","getQueryKeyFromHistoryListQueryParams","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","getQueryKeyFromDidListQueryParams","getQueryKeyFromIdentifierListQueryParams"],"sources":["query.ts"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n IdentifierListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\ntype QueryKey<ListQuery, ParamList> = ParamList extends ReadonlyArray<keyof ListQuery> // all params are inside the ListQuery\n ? keyof ListQuery extends ParamList[number] // all ListQuery fields are in the params\n ? Array<ListQuery[keyof ListQuery]>\n : void\n : void; // otherwise produce a wrong return type which should trigger compilation error\n\n/** Typecheck that all query params are included in the query key */\nfunction getQueryKey<ListQuery extends {}, ParamList extends ReadonlyArray<keyof ListQuery>>(\n queryParams: ListQuery,\n params: ParamList,\n): QueryKey<ListQuery, ParamList> {\n return params.map((param) => queryParams[param]) as QueryKey<ListQuery, ParamList>;\n}\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams: Partial<CredentialListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'searchText',\n 'searchType',\n 'sort',\n 'sortDirection',\n 'exact',\n 'role',\n 'ids',\n 'status',\n 'include',\n 'profile',\n ]);\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams: Partial<HistoryListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'entityId',\n 'actions',\n 'entityTypes',\n 'createdDateFrom',\n 'createdDateTo',\n 'identifierId',\n 'credentialId',\n 'credentialSchemaId',\n 'proofSchemaId',\n 'searchText',\n 'searchType',\n ]);\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (\n queryParams: Partial<CredentialSchemaListQuery> = {},\n) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'sort',\n 'sortDirection',\n 'exact',\n 'ids',\n 'include',\n 'schemaId',\n 'formats',\n ]);\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams: Partial<ProofSchemaListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'sort',\n 'sortDirection',\n 'exact',\n 'ids',\n 'formats',\n ]);\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams: Partial<ProofListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'ids',\n 'proofStates',\n 'proofRoles',\n 'proofSchemaIds',\n 'exact',\n 'profile',\n ]);\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams: Partial<DidListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'did',\n 'type',\n 'deactivated',\n 'exact',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'keyIds',\n 'didMethods',\n ]);\n};\n\nexport const getQueryKeyFromIdentifierListQueryParams = (queryParams: Partial<IdentifierListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'types',\n 'state',\n 'exact',\n 'didMethods',\n 'isRemote',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n ]);\n};\n"],"mappings":"AAcU;;AAEV;AACA,SAASA,WAAWA,CAClBC,WAAsB,EACtBC,MAAiB,EACe;EAChC,OAAOA,MAAM,CAACC,GAAG,CAAEC,KAAK,IAAKH,WAAW,CAACG,KAAK,CAAC,CAAC;AAClD;AAEA,OAAO,MAAMC,wCAAwC,GAAGA,CAACJ,WAAyC,GAAG,CAAC,CAAC,KAAK;EAC1G,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,eAAe,EACf,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAS,CACV,CAAC;AACJ,CAAC;AAED,OAAO,MAAMK,qCAAqC,GAAGA,CAACL,WAAsC,GAAG,CAAC,CAAC,KAAK;EACpG,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,YAAY,CACb,CAAC;AACJ,CAAC;AAED,OAAO,MAAMM,8CAA8C,GAAGA,CAC5DN,WAA+C,GAAG,CAAC,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ACZ,UAAU,EACV,eAAe,EACf,UAAU,EACV,aAAa,CACd,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@ import { TrustEntity } from '@procivis/react-native-one-core';
2
2
  import React from 'react';
3
3
  import { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';
4
4
  interface EntityAttributesProps {
5
+ certificate?: string;
5
6
  did?: string;
6
7
  trustEntity?: TrustEntity;
7
8
  trusted: boolean;
@@ -1,5 +1,4 @@
1
- import { TrustEntityRoleEnum } from '@procivis/react-native-one-core';
2
- import { IdentifierListItem } from '@procivis/react-native-one-core/dist/src/identifier';
1
+ import { IdentifierListItem, TrustEntityRoleEnum } from '@procivis/react-native-one-core';
3
2
  import React from 'react';
4
3
  import { StyleProp, ViewStyle } from 'react-native';
5
4
  import { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';
@@ -1,5 +1,4 @@
1
- import { TrustEntity, TrustEntityRoleEnum } from '@procivis/react-native-one-core';
2
- import { IdentifierListItem } from '@procivis/react-native-one-core/dist/src/identifier';
1
+ import { IdentifierListItem, TrustEntity, TrustEntityRoleEnum } from '@procivis/react-native-one-core';
3
2
  import { FC, ReactNode } from 'react';
4
3
  import { StyleProp, ViewStyle } from 'react-native';
5
4
  export type EntityDetailsLabels = {
@@ -10,6 +9,8 @@ export type EntityDetailsProps = {
10
9
  renderMore?: (trustEntity: TrustEntity) => ReactNode;
11
10
  role: Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;
12
11
  style?: StyleProp<ViewStyle>;
12
+ sublineColor?: string;
13
+ textColor?: string;
13
14
  testID?: string;
14
15
  } & ({
15
16
  identifier?: IdentifierListItem;
@@ -1,2 +1,3 @@
1
- import EntityDetails, { EntityDetailsLabels, EntityDetailsProps } from './entity-details';
1
+ import type { EntityDetailsLabels, EntityDetailsProps } from './entity-details';
2
+ import EntityDetails from './entity-details';
2
3
  export { EntityDetails, EntityDetailsLabels, EntityDetailsProps };
@@ -1,2 +1,3 @@
1
- import BlurView, { BlurViewProps } from './blur-view';
1
+ import type { BlurViewProps } from './blur-view';
2
+ import BlurView from './blur-view';
2
3
  export { BlurView, BlurViewProps };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TouchableWithoutFeedbackProps } from 'react-native';
2
+ import { TouchableWithoutFeedbackProps, View } from 'react-native';
3
3
  export interface HoldButtonProps extends Omit<TouchableWithoutFeedbackProps, 'children' | 'onLayout' | 'onPress' | 'onLongPress' | 'onPressIn' | 'onPressOut'> {
4
4
  title: string;
5
5
  subtitlePrefix: string;
@@ -12,5 +12,5 @@ export interface HoldButtonProps extends Omit<TouchableWithoutFeedbackProps, 'ch
12
12
  *
13
13
  * follows design: https://www.figma.com/design/cCmAyBQrQWCQZuDi85pJfe/Procivis-One-Wallet-Developments-2025?node-id=1-871
14
14
  */
15
- declare const HoldButton: React.ForwardRefExoticComponent<HoldButtonProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback>>;
15
+ declare const HoldButton: React.ForwardRefExoticComponent<HoldButtonProps & React.RefAttributes<React.ForwardRefExoticComponent<import("react-native").TouchableOpacityProps & React.RefAttributes<View>>>>;
16
16
  export default HoldButton;
@@ -1,2 +1,3 @@
1
- import QRCodeScanner, { QRCodeScannerProps } from './qr-code-scanner';
1
+ import type { QRCodeScannerProps } from './qr-code-scanner';
2
+ import QRCodeScanner from './qr-code-scanner';
2
3
  export { QRCodeScanner, QRCodeScannerProps };
@@ -1,3 +1,5 @@
1
- import { Checkbox, CheckboxProps } from './checkbox';
2
- import { Switch, SwitchProps } from './switch';
1
+ import type { CheckboxProps } from './checkbox';
2
+ import { Checkbox } from './checkbox';
3
+ import type { SwitchProps } from './switch';
4
+ import { Switch } from './switch';
3
5
  export { Checkbox, CheckboxProps, Switch, SwitchProps };
@@ -10,6 +10,7 @@ type QrCodeProps = {
10
10
  content: string;
11
11
  padding?: number;
12
12
  testID?: string;
13
+ onError?: (err: string) => void;
13
14
  };
14
15
  export declare const QrCode: FC<QrCodeProps>;
15
16
  export declare const Mrz: FC<{
@@ -8,6 +8,7 @@ export type EntityClusterProps = ViewProps & {
8
8
  textColor?: string;
9
9
  sublineColor?: string;
10
10
  testID?: string;
11
+ isLoading?: boolean;
11
12
  };
12
13
  declare const EntityCluster: FunctionComponent<EntityClusterProps>;
13
14
  export default EntityCluster;
@@ -1,4 +1,6 @@
1
- import Avatar, { AvatarProps } from './avatar';
2
- import EntityCluster, { EntityClusterProps } from './entity-cluster';
1
+ import type { AvatarProps } from './avatar';
2
+ import Avatar from './avatar';
3
+ import type { EntityClusterProps } from './entity-cluster';
4
+ import EntityCluster from './entity-cluster';
3
5
  export { Avatar, AvatarProps };
4
6
  export { EntityCluster, EntityClusterProps };
@@ -14,7 +14,10 @@ export type HistoryDetailsLabels = {
14
14
  title: string;
15
15
  };
16
16
  type CredentialDetails = Omit<CredentialDetailsProps, 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'>;
17
- type CredentialCard = Omit<CredentialDetailsCardListItemProps, 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'>;
17
+ type CredentialCard = Omit<CredentialDetailsCardListItemProps, 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'> & {
18
+ /** default: true */
19
+ headerPressable?: boolean;
20
+ };
18
21
  export type HistoryDetailsViewProps = {
19
22
  assets?: {
20
23
  header?: CredentialHeaderProps & {
@@ -1,7 +1,10 @@
1
- import DataItem, { DataItemProps } from './data-item';
2
- import HistoryItemView, { HistoryItemViewProps } from './history-item';
1
+ import type { DataItemProps } from './data-item';
2
+ import DataItem from './data-item';
3
+ import type { HistoryItemViewProps } from './history-item';
4
+ import HistoryItemView from './history-item';
3
5
  import HistorySectionHeaderView from './history-section-header';
4
- import HistorySectionListItem, { HistorySectionListItemProps } from './history-section-list-item';
6
+ import type { HistorySectionListItemProps } from './history-section-list-item';
7
+ import HistorySectionListItem from './history-section-list-item';
5
8
  export * from './history-details';
6
9
  export { DataItem, DataItemProps };
7
10
  export { HistoryItemView, HistoryItemViewProps };
@@ -1,6 +1,9 @@
1
- import RadioGroup, { RadioGroupItem, RadioGroupProps } from './radio-group';
2
- import SelectionInput, { SelectionInputChoice, SelectionInputProps } from './selection-input';
3
- import TextInput, { TextInputAccessory, TextInputProps } from './text-input';
1
+ import type { RadioGroupItem, RadioGroupProps } from './radio-group';
2
+ import RadioGroup from './radio-group';
3
+ import type { SelectionInputChoice, SelectionInputProps } from './selection-input';
4
+ import SelectionInput from './selection-input';
5
+ import type { TextInputProps } from './text-input';
6
+ import TextInput, { TextInputAccessory } from './text-input';
4
7
  export { RadioGroup, RadioGroupItem, RadioGroupProps };
5
8
  export { SelectionInput, SelectionInputChoice, SelectionInputProps };
6
9
  export { TextInput, TextInputAccessory, TextInputProps };
@@ -1,5 +1,7 @@
1
- import ListSectionHeader, { ListSectionHeaderProps } from './list-section-header';
2
- import ListTitleHeader, { ListTitleHeaderProps } from './list-title-header';
1
+ import type { ListSectionHeaderProps } from './list-section-header';
2
+ import ListSectionHeader from './list-section-header';
3
+ import type { ListTitleHeaderProps } from './list-title-header';
4
+ import ListTitleHeader from './list-title-header';
3
5
  export { ListSectionHeader, ListSectionHeaderProps };
4
6
  export { ListTitleHeader, ListTitleHeaderProps };
5
7
  export * from './wallet';
@@ -1,4 +1,6 @@
1
- import LoaderView, { LoaderViewProps, LoaderViewState } from './loader';
2
- import LoadingResultScreen, { LoadingResultScreenProps } from './loading-result';
1
+ import type { LoaderViewProps } from './loader';
2
+ import LoaderView, { LoaderViewState } from './loader';
3
+ import type { LoadingResultScreenProps } from './loading-result';
4
+ import LoadingResultScreen from './loading-result';
3
5
  export { LoaderView, LoaderViewProps, LoaderViewState };
4
6
  export { LoadingResultScreen, LoadingResultScreenProps };
@@ -1,4 +1,6 @@
1
1
  import { Biometry } from './keypad';
2
- import { PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';
3
- import PinLockModal, { PinLockModalLabels } from './pin-lock';
2
+ import type { PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';
3
+ import { PinCodeScreen } from './pin-code-screen';
4
+ import type { PinLockModalLabels } from './pin-lock';
5
+ import PinLockModal from './pin-lock';
4
6
  export { Biometry, PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps, PinLockModal, PinLockModalLabels };
@@ -1,4 +1,4 @@
1
- import { IdentifierListItem } from '@procivis/react-native-one-core/dist/src/identifier';
1
+ import { IdentifierListItem } from '@procivis/react-native-one-core';
2
2
  import { FunctionComponent } from 'react';
3
3
  import { ContextRole } from '../../components/entity/entity-details-with-buttons';
4
4
  import SectionEntityCluster from '../entity/entity-cluster';
@@ -1,4 +1,6 @@
1
- import AnimatedSearchBar, { AnimatedSearchBarProps } from './animated-search-bar';
2
- import SearchBar, { SearchBarProps } from './search-bar';
1
+ import type { AnimatedSearchBarProps } from './animated-search-bar';
2
+ import AnimatedSearchBar from './animated-search-bar';
3
+ import type { SearchBarProps } from './search-bar';
4
+ import SearchBar from './search-bar';
3
5
  export { AnimatedSearchBar, AnimatedSearchBarProps };
4
6
  export { SearchBar, SearchBarProps };
@@ -1,8 +1,13 @@
1
- import ButtonSetting, { ButtonSettingProps } from './button-setting';
2
- import SettingItem, { SettingItemProps } from './setting-item';
3
- import SettingItemSeparator, { SettingItemSeparatorProps } from './setting-item-separator';
4
- import SettingsButton, { SettingsButtonProps } from './settings-button';
5
- import SwitchSetting, { SwitchSettingProps } from './switch-setting';
1
+ import type { ButtonSettingProps } from './button-setting';
2
+ import ButtonSetting from './button-setting';
3
+ import type { SettingItemProps } from './setting-item';
4
+ import SettingItem from './setting-item';
5
+ import type { SettingItemSeparatorProps } from './setting-item-separator';
6
+ import SettingItemSeparator from './setting-item-separator';
7
+ import type { SettingsButtonProps } from './settings-button';
8
+ import SettingsButton from './settings-button';
9
+ import type { SwitchSettingProps } from './switch-setting';
10
+ import SwitchSetting from './switch-setting';
6
11
  export { ButtonSetting, ButtonSettingProps };
7
12
  export { SettingItem, SettingItemProps };
8
13
  export { SettingItemSeparator, SettingItemSeparatorProps };
@@ -1,2 +1,3 @@
1
- import ErrorScreen, { ErrorScreenButton, ErrorScreenProps } from './error-screen';
1
+ import type { ErrorScreenButton, ErrorScreenProps } from './error-screen';
2
+ import ErrorScreen from './error-screen';
2
3
  export { ErrorScreen, ErrorScreenButton, ErrorScreenProps };
@@ -10,4 +10,9 @@ export declare const useUnpackBackup: () => import("react-query").UseMutationRes
10
10
  }, unknown>;
11
11
  export declare const useFinalizeImport: () => import("react-query").UseMutationResult<void, unknown, void, unknown>;
12
12
  export declare const useRollbackImport: () => import("react-query").UseMutationResult<void, unknown, void, unknown>;
13
+ /**
14
+ * Finalize backup import and extract/prepare identifiers
15
+ * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be restored/created
16
+ * @returns [hwIdentifierId, swIdentifierId]
17
+ */
13
18
  export declare const useBackupFinalizeImportProcedure: ({ generateHwKey, generateSwKey }: IdentifiersInitializationConfig) => () => Promise<[string | null, string | undefined]>;
@@ -1,5 +1,8 @@
1
+ import { ONECore } from '@procivis/react-native-one-core';
1
2
  export declare const SW_DID_NAME_PREFIX = "holder-did-sw-key";
2
3
  export declare const HW_DID_NAME_PREFIX = "holder-did-hw-key";
4
+ export declare const generateHwIdentifier: (core: ONECore, organisationId: string) => Promise<string | null>;
5
+ export declare const generateSwIdentifier: (core: ONECore, organisationId: string) => Promise<string>;
3
6
  export interface IdentifiersInitializationConfig {
4
7
  generateHwKey: boolean;
5
8
  generateSwKey: boolean;
@@ -7,6 +10,6 @@ export interface IdentifiersInitializationConfig {
7
10
  /**
8
11
  * Create base local identifiers
9
12
  * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be created
10
- * @returns [hwDidId, swDidId]
13
+ * @returns [hwIdentifierId, swIdentifierId]
11
14
  */
12
15
  export declare const useInitializeONECoreIdentifiers: ({ generateHwKey, generateSwKey }: IdentifiersInitializationConfig) => () => Promise<[string | null, string | null]>;
@@ -1,2 +1,5 @@
1
+ import { IdentifierListQuery } from "@procivis/react-native-one-core";
1
2
  export declare const IDENTIFIER_DETAIL_QUERY_KEY = "identifier-detail";
2
- export declare const useIdentifierDetails: (identifierId: string | undefined) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core/dist/src/identifier").IdentifierDetail | undefined, unknown>;
3
+ export declare const IDENTIFIER_LIST_QUERY_KEY = "identifier-list";
4
+ export declare const useIdentifierDetails: (identifierId: string | undefined) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").IdentifierDetail | undefined, unknown>;
5
+ export declare const useIdentifiers: (identifierFilter?: Partial<IdentifierListQuery>) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").ItemList<import("@procivis/react-native-one-core").IdentifierListItem>, unknown>;
@@ -37,6 +37,7 @@ export declare const useCleanupUnusedProofs: () => void;
37
37
  export declare const useShareProof: (proofUrlProps: ProofUrlHookParams | undefined, enabled: boolean) => {
38
38
  bleAdapterDisabled: boolean;
39
39
  url?: string | undefined;
40
+ error?: unknown;
40
41
  } | undefined;
41
42
  export declare const useRetainProofCheck: (proofId?: string) => import("react-query").UseMutationResult<string, unknown, void, unknown>;
42
43
  export declare const useDeleteProofData: (proofId: string) => import("react-query").UseMutationResult<void, unknown, void, unknown>;
@@ -3,9 +3,15 @@ export declare const TRUST_ENTITY_DETAIL_QUERY_KEY = "trust-entity-detail";
3
3
  export declare const REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = "remote-trust-entity-detail";
4
4
  export declare const useCreateTrustAnchor: (publisherReference: string) => (core: ONECore) => Promise<void>;
5
5
  export declare const useTrustEntity: (identifierId: string | undefined) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustEntity | null | undefined, unknown>;
6
- export declare const useRemoteTrustEntity: (did: string | undefined) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustEntity | undefined, unknown>;
7
- export declare const useCreateRemoteTrustEntity: () => import("react-query").UseMutationResult<string, unknown, CreateRemoteTrustEntityRequest, unknown>;
8
- export declare const useUpdateRemoteTrustEntity: () => import("react-query").UseMutationResult<void, unknown, UpdateRemoteTrustEntityRequest, unknown>;
6
+ export declare const useRemoteTrustEntity: (identifierId: string | undefined) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").RemoteTrustEntity | undefined, unknown>;
7
+ export declare const useCreateRemoteTrustEntity: () => import("react-query").UseMutationResult<string, unknown, Omit<CreateRemoteTrustEntityRequest, "didId"> & {
8
+ identifierId?: string | undefined;
9
+ didId?: string | undefined;
10
+ }, unknown>;
11
+ export declare const useUpdateRemoteTrustEntity: () => import("react-query").UseMutationResult<void, unknown, Omit<UpdateRemoteTrustEntityRequest, "didId"> & {
12
+ identifierId?: string | undefined;
13
+ didId?: string | undefined;
14
+ }, unknown>;
9
15
  export declare enum TrustManagementEnum {
10
16
  SimpleTrustList = "SIMPLE_TRUST_LIST"
11
17
  }