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

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 (126) hide show
  1. package/lib/commonjs/components/history/history-list-item-icon.js +3 -0
  2. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  3. package/lib/commonjs/components/history/history-list-item.js +3 -4
  4. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  5. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +3 -1
  6. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  7. package/lib/commonjs/ui-components/buttons/scan-button.js +122 -27
  8. package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
  9. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +37 -18
  10. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  11. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +13 -4
  12. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  13. package/lib/commonjs/ui-components/history/history-section-list-item.js +2 -2
  14. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  15. package/lib/commonjs/ui-components/history/index.js +0 -8
  16. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  17. package/lib/commonjs/ui-components/icons/icons.js +36 -2
  18. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  19. package/lib/commonjs/ui-components/list/index.js +8 -0
  20. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  21. package/lib/commonjs/ui-components/{history/history-item.js → list/list-item.js} +32 -22
  22. package/lib/commonjs/ui-components/list/list-item.js.map +1 -0
  23. package/lib/commonjs/ui-components/list/wallet/empty-list.js +2 -1
  24. package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -1
  25. package/lib/commonjs/ui-components/notice/wallet-notice.js +4 -2
  26. package/lib/commonjs/ui-components/notice/wallet-notice.js.map +1 -1
  27. package/lib/commonjs/ui-components/text/expandableTypography.js +64 -0
  28. package/lib/commonjs/ui-components/text/expandableTypography.js.map +1 -0
  29. package/lib/commonjs/ui-components/text/index.js +15 -0
  30. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  31. package/lib/commonjs/utils/hooks/core/credential-schemas.js +24 -1
  32. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  33. package/lib/commonjs/utils/hooks/core/wallet-unit.js +20 -1
  34. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  35. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +8 -7
  36. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  37. package/lib/commonjs/utils/parsers/credential-sharing.js +17 -11
  38. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  39. package/lib/commonjs/utils/parsers/credential.js +12 -4
  40. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  41. package/lib/commonjs/utils/parsers/query.js +1 -1
  42. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  43. package/lib/module/components/history/history-list-item-icon.js +3 -0
  44. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  45. package/lib/module/components/history/history-list-item.js +4 -5
  46. package/lib/module/components/history/history-list-item.js.map +1 -1
  47. package/lib/module/components/proof-request/v2/share-credential-v2.js +3 -1
  48. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  49. package/lib/module/ui-components/buttons/scan-button.js +124 -29
  50. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  51. package/lib/module/ui-components/credential/card/credential-details-card.js +37 -18
  52. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  53. package/lib/module/ui-components/credential/credential-attribute-item.js +13 -4
  54. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  55. package/lib/module/ui-components/history/history-section-list-item.js +2 -2
  56. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  57. package/lib/module/ui-components/history/index.js +0 -2
  58. package/lib/module/ui-components/history/index.js.map +1 -1
  59. package/lib/module/ui-components/icons/icons.js +32 -0
  60. package/lib/module/ui-components/icons/icons.js.map +1 -1
  61. package/lib/module/ui-components/list/index.js +2 -0
  62. package/lib/module/ui-components/list/index.js.map +1 -1
  63. package/lib/module/ui-components/{history/history-item.js → list/list-item.js} +32 -22
  64. package/lib/module/ui-components/list/list-item.js.map +1 -0
  65. package/lib/module/ui-components/list/wallet/empty-list.js +2 -1
  66. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -1
  67. package/lib/module/ui-components/notice/wallet-notice.js +4 -2
  68. package/lib/module/ui-components/notice/wallet-notice.js.map +1 -1
  69. package/lib/module/ui-components/text/expandableTypography.js +55 -0
  70. package/lib/module/ui-components/text/expandableTypography.js.map +1 -0
  71. package/lib/module/ui-components/text/index.js +2 -1
  72. package/lib/module/ui-components/text/index.js.map +1 -1
  73. package/lib/module/utils/hooks/core/credential-schemas.js +24 -1
  74. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  75. package/lib/module/utils/hooks/core/wallet-unit.js +18 -0
  76. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  77. package/lib/module/utils/parsers/credential-sharing-v2.js +8 -7
  78. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  79. package/lib/module/utils/parsers/credential-sharing.js +18 -12
  80. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  81. package/lib/module/utils/parsers/credential.js +10 -4
  82. package/lib/module/utils/parsers/credential.js.map +1 -1
  83. package/lib/module/utils/parsers/query.js +1 -1
  84. package/lib/module/utils/parsers/query.js.map +1 -1
  85. package/lib/typescript/ui-components/buttons/scan-button.d.ts +9 -3
  86. package/lib/typescript/ui-components/credential/card/credential-details-card.d.ts +3 -0
  87. package/lib/typescript/ui-components/credential/credential-attribute-item.d.ts +3 -0
  88. package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
  89. package/lib/typescript/ui-components/history/index.d.ts +0 -3
  90. package/lib/typescript/ui-components/icons/icons.d.ts +2 -0
  91. package/lib/typescript/ui-components/list/index.d.ts +3 -0
  92. package/lib/typescript/ui-components/{history/history-item.d.ts → list/list-item.d.ts} +4 -4
  93. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +2 -2
  94. package/lib/typescript/ui-components/text/expandableTypography.d.ts +10 -0
  95. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  96. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  97. package/lib/typescript/utils/hooks/app-state.d.ts +1 -1
  98. package/lib/typescript/utils/hooks/core/credentials.d.ts +1 -1
  99. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -1
  100. package/lib/typescript/utils/parsers/credential-sharing.d.ts +4 -3
  101. package/lib/typescript/utils/parsers/credential.d.ts +2 -1
  102. package/lib/typescript/utils/parsers/query.d.ts +1 -1
  103. package/package.json +3 -3
  104. package/src/components/history/history-list-item-icon.tsx +3 -0
  105. package/src/components/history/history-list-item.tsx +3 -3
  106. package/src/components/proof-request/v2/share-credential-v2.tsx +2 -0
  107. package/src/ui-components/buttons/scan-button.tsx +130 -38
  108. package/src/ui-components/credential/card/credential-details-card.tsx +46 -19
  109. package/src/ui-components/credential/credential-attribute-item.tsx +15 -3
  110. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  111. package/src/ui-components/history/index.ts +0 -3
  112. package/src/ui-components/icons/icons.tsx +24 -0
  113. package/src/ui-components/list/index.ts +3 -0
  114. package/src/ui-components/{history/history-item.tsx → list/list-item.tsx} +36 -33
  115. package/src/ui-components/list/wallet/empty-list.tsx +11 -8
  116. package/src/ui-components/notice/wallet-notice.tsx +4 -2
  117. package/src/ui-components/text/expandableTypography.tsx +71 -0
  118. package/src/ui-components/text/index.ts +2 -1
  119. package/src/utils/hooks/core/credential-schemas.ts +23 -1
  120. package/src/utils/hooks/core/wallet-unit.ts +21 -0
  121. package/src/utils/parsers/credential-sharing-v2.tsx +5 -6
  122. package/src/utils/parsers/credential-sharing.tsx +20 -9
  123. package/src/utils/parsers/credential.ts +14 -3
  124. package/src/utils/parsers/query.ts +2 -0
  125. package/lib/commonjs/ui-components/history/history-item.js.map +0 -1
  126. package/lib/module/ui-components/history/history-item.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialState","DataType","FormatFeature","CredentialErrorIcon","CredentialNoticeInfoIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getTranslatedLabel","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPath","path","claims","exactClaim","find","claim","parentClaim","startsWith","value","type_","formatCredentialDetail","testID","language","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","_credential$mdocMsoVa","mdocMsoValidityIssue","mdocMsoValidity","nextUpdate","Date","credentialDetailFromCredential","labels","_formatDateTimeLocali","_credential$issuanceD","layoutProperties","credentialDetailPrimary","suspendEndDate","suspendedUntil","suspended","credentialDetailTestID","statusIcon","revoked","credentialDetailErrorColor","validityIssues","issuanceDate","createdDate","credentialDetailSecondary","primary","primaryAttribute","secondary","secondaryAttribute","cardHeaderFromCredential","_layoutProperties$log","_getTranslatedLabel","_credential$schema$tr","_layoutProperties$log2","_layoutProperties$log3","defaultLanguage","color","logo","backgroundColor","credentialName","translations","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","_credential$schema$tr2","description","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","_getTranslatedLabel2","id","split","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Object","attributes","nestedClaim","_formatDateLocalized","String","date","Picture","SwiyuPicture","_typeConfig$params","params","showAs","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","length","push","first","rest","parent","a","insertAttributeInParent","join","nestAttributeInDummyParent","pathParts","listValue","disabled","_parent$attributes","nextParent","_parent$values","_parent$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n CoreConfig,\n CredentialDetail,\n CredentialListItem,\n CredentialSchemaListItem,\n CredentialState,\n DataType,\n FormatFeature,\n} from '@procivis/react-native-one-core';\nimport { FC } from 'react';\nimport { SvgProps } from 'react-native-svg';\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 {\n CredentialErrorIcon,\n CredentialNoticeInfoIcon,\n CredentialNoticeWarningIcon,\n CredentialWarningIcon,\n} from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getTranslatedLabel } from '../translations';\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 === CredentialState.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialState.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (\n credential: CredentialListItem | undefined,\n config: CoreConfig | undefined,\n) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeature.SelectiveDisclosure))\n : undefined;\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[]): Claim | undefined => {\n if (!path) {\n return undefined;\n }\n\n const exactClaim = claims.find((claim) => claim.path === path);\n if (exactClaim) {\n return exactClaim;\n }\n\n const parentClaim = claims.find((claim) => path.startsWith(`${claim.path}/`));\n if (parentClaim && parentClaim.value.type_ === 'NESTED') {\n return findClaimByPath(path, parentClaim.value.value);\n }\n\n return undefined;\n};\n\nconst formatCredentialDetail = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n language: string | undefined,\n): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID, language);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidityIssue = Boolean(\n credential.mdocMsoValidity?.nextUpdate && new Date(credential.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\nconst credentialDetailFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: CoreConfig,\n testID: string,\n labels: CardHeaderLabels,\n language: string | undefined,\n): {\n credentialDetailPrimary?: string;\n credentialDetailSecondary?: string;\n credentialDetailErrorColor?: boolean;\n credentialDetailTestID?: string;\n statusIcon?: FC<SvgProps>;\n} => {\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialState.SUSPENDED:\n return {\n credentialDetailPrimary: credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended,\n credentialDetailTestID: concatTestID(testID, 'suspended'),\n statusIcon: CredentialWarningIcon,\n };\n case CredentialState.REVOKED:\n return {\n credentialDetailPrimary: labels.revoked,\n credentialDetailErrorColor: true,\n credentialDetailTestID: concatTestID(testID, 'revoked'),\n statusIcon: CredentialErrorIcon,\n };\n }\n\n if (hasMsoValidityIssues(credential)) {\n return {\n credentialDetailPrimary: labels.validityIssues,\n credentialDetailTestID: concatTestID(testID, 'validity-issue'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n let credentialDetailPrimary =\n formatDateTimeLocalized(new Date(credential.issuanceDate ?? credential.createdDate)) ?? '';\n let credentialDetailSecondary: string | undefined;\n\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'), language);\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'), language);\n }\n\n return {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID: concatTestID(testID, 'detail'),\n };\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: CoreConfig,\n testID: string,\n labels: CardHeaderLabels,\n language: string | undefined,\n): Omit<CredentialHeaderProps, 'style'> => {\n const {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailErrorColor,\n credentialDetailTestID,\n statusIcon,\n } = credentialDetailFromCredential(credential, claims, config, testID, labels, language);\n const { layoutProperties } = credential.schema;\n const defaultLanguage = config.defaultLanguage;\n\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName:\n getTranslatedLabel(credential.schema.translations?.name, language, defaultLanguage) ?? 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: CoreConfig,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n language: string | undefined,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> => {\n const { layoutProperties } = credential.schema;\n const defaultLanguage = config.defaultLanguage;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n } else if (!notice) {\n let description = getTranslatedLabel(credential.schema.translations?.description, language, defaultLanguage);\n if (description) {\n notice = {\n text: description,\n noticeIcon: CredentialNoticeInfoIcon,\n };\n }\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> = {\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, language),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n language: string | undefined,\n): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID, language);\n const defaultLanguage = config.defaultLanguage;\n return {\n id: claim.path,\n name: getTranslatedLabel(claim.schema.translations.name, language, defaultLanguage) ?? claim.path.split('/').pop(),\n path: claim.path,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n language: string | undefined,\n): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.schema.datatype];\n\n if (claim.schema.array) {\n return {\n values: ((claim.value.value as Claim[]) || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(arrayValue, config, concatTestID(testID, index.toString()), language);\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataType.Object: {\n if (claim.value.type_ !== 'NESTED') {\n return { attributes: [] };\n }\n return {\n attributes: claim.value.value.map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString()), language),\n ),\n };\n }\n case DataType.Date: {\n if (!claim.value.value) {\n // Don't try to parse empty values (which will return \"Invalid Date\")\n return { testID: testID, value: String(claim.value.value) };\n }\n const date = claim.value.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataType.Picture: // fallback\n case DataType.SwiyuPicture: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value.value) };\n }\n }\n};\n\nexport type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {\n card: Omit<CredentialCardProps, 'width'>;\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: CoreConfig,\n testID: string,\n labels: CardLabels,\n language: string | undefined,\n): CredentialDetailsCardPropsWithoutWidth => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels, language);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: CoreConfig,\n testID: string,\n labels: CardLabels,\n language: string | undefined,\n): CredentialDetailsCardPropsWithoutWidth => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString()), language),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n language,\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 insertAttributeInParent({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyParent(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 nestAttributeInDummyParent = (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 if (attribute.listValue) {\n return {\n values: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n } else {\n return {\n attributes: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n }\n};\n\n// Recursively insert an attribute into an parent\n// Will create nested parents if necessary\nconst insertAttributeInParent = (attribute: CredentialAttribute, parent: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = parent.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n if (attribute.listValue) {\n parent.values?.push(nestAttributeInDummyParent(attribute));\n } else {\n parent.attributes?.push(nestAttributeInDummyParent(attribute));\n }\n } else {\n insertAttributeInParent({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages<T extends CredentialSchemaListItem>(credentialSchema: T): T {\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,eAAe,EACfC,QAAQ,EACRC,aAAa,QACR,iCAA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AAuB,CAAC;MAAE,GAAGR,SAAS;MAAExG,IAAI,EAAE6G,IAAI,CAACI,IAAI,CAAC,GAAG;IAAE,CAAC,EAAEM,UAAU,CAAC;EAC7E;AACF,CAAC;AAED,SAASG,gBAAgBA,CAAClE,KAAyB,EAAE;EACnD,OAAOA,KAAK,GAAG,iBAAiB,GAAG,EAAE;AACvC;AAEA,OAAO,SAASmE,gCAAgCA,CAAqCC,gBAAmB,EAAK;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,sBAAA;EAC3G,OAAO;IACL,GAAGJ,gBAAgB;IACnBnG,gBAAgB,EAAE;MAChB,GAAGmG,gBAAgB,CAACnG,gBAAgB;MACpCgD,UAAU,EAAE;QACV,KAAAoD,qBAAA,GAAGD,gBAAgB,CAACnG,gBAAgB,cAAAoG,qBAAA,uBAAjCA,qBAAA,CAAmCpD,UAAU;QAChDjB,KAAK,EAAEkE,gBAAgB,EAAAI,sBAAA,GAACF,gBAAgB,CAACnG,gBAAgB,cAAAqG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCrD,UAAU,cAAAqD,sBAAA,uBAA7CA,sBAAA,CAA+CtE,KAAK;MAC9E,CAAC;MACDN,IAAI,EAAE;QACJ,KAAA6E,sBAAA,GAAGH,gBAAgB,CAACnG,gBAAgB,cAAAsG,sBAAA,uBAAjCA,sBAAA,CAAmC7E,IAAI;QAC1CM,KAAK,EAAEkE,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAACnG,gBAAgB,cAAAuG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmC9E,IAAI,cAAA8E,sBAAA,uBAAvCA,sBAAA,CAAyCxE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["CredentialState","CredentialType","DataType","FormatFeature","CredentialErrorIcon","CredentialNoticeInfoIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getTranslatedLabel","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPath","path","claims","exactClaim","find","claim","parentClaim","startsWith","value","type_","formatCredentialDetail","testID","language","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","_credential$mdocMsoVa","mdocMsoValidityIssue","mdocMsoValidity","nextUpdate","Date","credentialDetailFromCredential","labels","_formatDateTimeLocali","_credential$issuanceD","layoutProperties","credentialDetailPrimary","suspendEndDate","suspendedUntil","suspended","credentialDetailTestID","statusIcon","revoked","credentialDetailErrorColor","validityIssues","issuanceDate","createdDate","credentialDetailSecondary","primary","primaryAttribute","secondary","secondaryAttribute","cardHeaderFromCredential","_layoutProperties$log","_getTranslatedLabel","_credential$schema$tr","_layoutProperties$log2","_layoutProperties$log3","defaultLanguage","globalSettings","color","logo","backgroundColor","credentialName","translations","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","_credential$schema$tr2","description","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","_getTranslatedLabel2","id","split","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Object","attributes","nestedClaim","_formatDateLocalized","String","date","Picture","SwiyuPicture","_typeConfig$params","params","showAs","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","length","push","first","rest","parent","a","insertAttributeInParent","join","nestAttributeInDummyParent","pathParts","listValue","disabled","_parent$attributes","nextParent","_parent$values","_parent$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4","credentialDetailFromPresentationV2Credential","presentationCredential","SINGLE"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n CoreConfig,\n CredentialDetail,\n CredentialListItem,\n CredentialSchemaListItem,\n CredentialState,\n CredentialType,\n DataType,\n FormatFeature,\n PresentationDefinitionV2Credential,\n} from '@procivis/react-native-one-core';\nimport { FC } from 'react';\nimport { SvgProps } from 'react-native-svg';\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 {\n CredentialErrorIcon,\n CredentialNoticeInfoIcon,\n CredentialNoticeWarningIcon,\n CredentialWarningIcon,\n} from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getTranslatedLabel } from '../translations';\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 === CredentialState.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialState.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (\n credential: CredentialListItem | undefined,\n config: CoreConfig | undefined,\n) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeature.SelectiveDisclosure))\n : undefined;\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[]): Claim | undefined => {\n if (!path) {\n return undefined;\n }\n\n const exactClaim = claims.find((claim) => claim.path === path);\n if (exactClaim) {\n return exactClaim;\n }\n\n const parentClaim = claims.find((claim) => path.startsWith(`${claim.path}/`));\n if (parentClaim && parentClaim.value.type_ === 'NESTED') {\n return findClaimByPath(path, parentClaim.value.value);\n }\n\n return undefined;\n};\n\nconst formatCredentialDetail = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n language: string | undefined,\n): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID, language);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidityIssue = Boolean(\n credential.mdocMsoValidity?.nextUpdate && new Date(credential.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\nconst credentialDetailFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: CoreConfig,\n testID: string,\n labels: CardHeaderLabels,\n language: string | undefined,\n): {\n credentialDetailPrimary?: string;\n credentialDetailSecondary?: string;\n credentialDetailErrorColor?: boolean;\n credentialDetailTestID?: string;\n statusIcon?: FC<SvgProps>;\n} => {\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialState.SUSPENDED:\n return {\n credentialDetailPrimary: credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended,\n credentialDetailTestID: concatTestID(testID, 'suspended'),\n statusIcon: CredentialWarningIcon,\n };\n case CredentialState.REVOKED:\n return {\n credentialDetailPrimary: labels.revoked,\n credentialDetailErrorColor: true,\n credentialDetailTestID: concatTestID(testID, 'revoked'),\n statusIcon: CredentialErrorIcon,\n };\n }\n\n if (hasMsoValidityIssues(credential)) {\n return {\n credentialDetailPrimary: labels.validityIssues,\n credentialDetailTestID: concatTestID(testID, 'validity-issue'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n let credentialDetailPrimary =\n formatDateTimeLocalized(new Date(credential.issuanceDate ?? credential.createdDate)) ?? '';\n let credentialDetailSecondary: string | undefined;\n\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'), language);\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'), language);\n }\n\n return {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID: concatTestID(testID, 'detail'),\n };\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: CoreConfig,\n testID: string,\n labels: CardHeaderLabels,\n language: string | undefined,\n): Omit<CredentialHeaderProps, 'style'> => {\n const {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailErrorColor,\n credentialDetailTestID,\n statusIcon,\n } = credentialDetailFromCredential(credential, claims, config, testID, labels, language);\n const { layoutProperties } = credential.schema;\n const defaultLanguage = config.globalSettings.defaultLanguage;\n\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName:\n getTranslatedLabel(credential.schema.translations?.name, language, defaultLanguage) ?? 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: CoreConfig,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n language: string | undefined,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> => {\n const { layoutProperties } = credential.schema;\n const defaultLanguage = config.globalSettings.defaultLanguage;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n } else if (!notice) {\n let description = getTranslatedLabel(credential.schema.translations?.description, language, defaultLanguage);\n if (description) {\n notice = {\n text: description,\n noticeIcon: CredentialNoticeInfoIcon,\n };\n }\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> = {\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, language),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n language: string | undefined,\n): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID, language);\n const defaultLanguage = config.globalSettings.defaultLanguage;\n return {\n id: claim.path,\n name: getTranslatedLabel(claim.schema.translations.name, language, defaultLanguage) ?? claim.path.split('/').pop(),\n path: claim.path,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n language: string | undefined,\n): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.schema.datatype];\n\n if (claim.schema.array) {\n return {\n values: ((claim.value.value as Claim[]) || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(arrayValue, config, concatTestID(testID, index.toString()), language);\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataType.Object: {\n if (claim.value.type_ !== 'NESTED') {\n return { attributes: [] };\n }\n return {\n attributes: claim.value.value.map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString()), language),\n ),\n };\n }\n case DataType.Date: {\n if (!claim.value.value) {\n // Don't try to parse empty values (which will return \"Invalid Date\")\n return { testID: testID, value: String(claim.value.value) };\n }\n const date = claim.value.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataType.Picture: // fallback\n case DataType.SwiyuPicture: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value.value) };\n }\n }\n};\n\nexport type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {\n card: Omit<CredentialCardProps, 'width'>;\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: CoreConfig,\n testID: string,\n labels: CardLabels,\n language: string | undefined,\n): CredentialDetailsCardPropsWithoutWidth => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels, language);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: CoreConfig,\n testID: string,\n labels: CardLabels,\n language: string | undefined,\n): CredentialDetailsCardPropsWithoutWidth => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString()), language),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n language,\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 insertAttributeInParent({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyParent(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 nestAttributeInDummyParent = (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 if (attribute.listValue) {\n return {\n values: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n } else {\n return {\n attributes: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n }\n};\n\n// Recursively insert an attribute into an parent\n// Will create nested parents if necessary\nconst insertAttributeInParent = (attribute: CredentialAttribute, parent: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = parent.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n if (attribute.listValue) {\n parent.values?.push(nestAttributeInDummyParent(attribute));\n } else {\n parent.attributes?.push(nestAttributeInDummyParent(attribute));\n }\n } else {\n insertAttributeInParent({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages<T extends CredentialSchemaListItem>(credentialSchema: T): T {\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\nexport function credentialDetailFromPresentationV2Credential(\n presentationCredential: CredentialDetail | PresentationDefinitionV2Credential,\n): CredentialDetail {\n return {\n type: CredentialType.SINGLE,\n ...presentationCredential,\n };\n}\n"],"mappings":"AAAA,SAMEA,eAAe,EACfC,cAAc,EACdC,QAAQ,EACRC,aAAa,QAER,iCAAiC;AAYxC,SACEC,mBAAmB,EACnBC,wBAAwB,EACxBC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@ -5,7 +5,7 @@ function getQueryKey(queryParams, params) {
5
5
  return params.map(param => queryParams[param]);
6
6
  }
7
7
  export const getQueryKeyFromCredentialListQueryParams = (queryParams = {}) => {
8
- return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'searchText', 'searchType', 'sort', 'sortDirection', 'exact', 'roles', 'ids', 'states', 'include', 'profiles', 'credentialSchemaIds', 'createdDateAfter', 'createdDateBefore', 'lastModifiedAfter', 'lastModifiedBefore', 'issuanceDateAfter', 'issuanceDateBefore', 'revocationDateAfter', 'revocationDateBefore']);
8
+ return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'searchText', 'searchType', 'sort', 'sortDirection', 'exact', 'roles', 'ids', 'states', 'include', 'profiles', 'credentialSchemaIds', 'createdDateAfter', 'createdDateBefore', 'lastModifiedAfter', 'lastModifiedBefore', 'issuanceDateAfter', 'issuanceDateBefore', 'revocationDateAfter', 'revocationDateBefore', 'types', 'parentId']);
9
9
  };
10
10
  export const getQueryKeyFromHistoryListQueryParams = (queryParams = {}) => {
11
11
  return getQueryKey(queryParams, ['page', 'pageSize', 'sort', 'sortDirection', 'organisationId', 'entityIds', 'actions', 'entityTypes', 'createdDateAfter', 'createdDateBefore', 'identifierId', 'credentialId', 'credentialSchemaId', 'proofId', 'proofSchemaId', 'search', 'users']);
@@ -1 +1 @@
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 'roles',\n 'ids',\n 'states',\n 'include',\n 'profiles',\n 'credentialSchemaIds',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'issuanceDateAfter',\n 'issuanceDateBefore',\n 'revocationDateAfter',\n 'revocationDateBefore',\n ]);\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams: Partial<HistoryListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'sort',\n 'sortDirection',\n 'organisationId',\n 'entityIds',\n 'actions',\n 'entityTypes',\n 'createdDateAfter',\n 'createdDateBefore',\n 'identifierId',\n 'credentialId',\n 'credentialSchemaId',\n 'proofId',\n 'proofSchemaId',\n 'search',\n 'users',\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 'schemaIds',\n 'formats',\n 'usesBatchIssuance',\n 'isMultiformatSchema',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\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 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\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 'profiles',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'requestedDateAfter',\n 'requestedDateBefore',\n 'completedDateAfter',\n 'completedDateBefore',\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 'ids',\n 'sort',\n 'sortDirection',\n 'name',\n 'types',\n 'states',\n 'exact',\n 'didMethods',\n 'isRemote',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'certificateRoles',\n 'certificateRolesMatchMode',\n 'trustIssuanceSchemaId',\n 'trustVerificationSchemaId',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n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N,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,CACrB,CAAC;AACJ,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 'roles',\n 'ids',\n 'states',\n 'include',\n 'profiles',\n 'credentialSchemaIds',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'issuanceDateAfter',\n 'issuanceDateBefore',\n 'revocationDateAfter',\n 'revocationDateBefore',\n 'types',\n 'parentId',\n ]);\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams: Partial<HistoryListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'sort',\n 'sortDirection',\n 'organisationId',\n 'entityIds',\n 'actions',\n 'entityTypes',\n 'createdDateAfter',\n 'createdDateBefore',\n 'identifierId',\n 'credentialId',\n 'credentialSchemaId',\n 'proofId',\n 'proofSchemaId',\n 'search',\n 'users',\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 'schemaIds',\n 'formats',\n 'usesBatchIssuance',\n 'isMultiformatSchema',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\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 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\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 'profiles',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'requestedDateAfter',\n 'requestedDateBefore',\n 'completedDateAfter',\n 'completedDateBefore',\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 'ids',\n 'sort',\n 'sortDirection',\n 'name',\n 'types',\n 'states',\n 'exact',\n 'didMethods',\n 'isRemote',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'certificateRoles',\n 'certificateRolesMatchMode',\n 'trustIssuanceSchemaId',\n 'trustVerificationSchemaId',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\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,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,OAAO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Z,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,CACtB,CAAC;AACJ,CAAC;AAED,OAAO,MAAMS,iCAAiC,GAAGA,CAACT,WAAkC,GAAG,CAAC,CAAC,KAAK;EAC5F,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,eAAe,EACf,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,QAAQ,EACR,YAAY,CACb,CAAC;AACJ,CAAC;AAED,OAAO,MAAMU,wCAAwC,GAAGA,CAACV,WAAyC,GAAG,CAAC,CAAC,KAAK;EAC1G,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,eAAe,EACf,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,CACrB,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -1,5 +1,11 @@
1
1
  import React from 'react';
2
- import { TouchableOpacityProps, View } from 'react-native';
3
- export type ScanButtonProps = TouchableOpacityProps;
4
- declare const ScanButton: React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<View>>>>;
2
+ import { StyleProp, View, ViewStyle } from 'react-native';
3
+ export type ScanButtonProps = {
4
+ onSignPress?: () => void;
5
+ onIssuePress?: () => void;
6
+ onScanPress: () => void;
7
+ testID?: string;
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ declare const ScanButton: React.ForwardRefExoticComponent<ScanButtonProps & React.RefAttributes<React.ForwardRefExoticComponent<import("react-native").TouchableOpacityProps & React.RefAttributes<View>>>>;
5
11
  export default ScanButton;
@@ -11,6 +11,9 @@ export type CredentialDetailsCardProps = ViewProps & {
11
11
  onImagePreview?: (name: string, image: ImageSourcePropType) => void;
12
12
  onAttributeSelected?: (id: string, selected: boolean) => void;
13
13
  showAllButtonLabel?: string;
14
+ showLessButtonLabel?: string;
15
+ moreLabel?: string;
16
+ lessLabel?: string;
14
17
  };
15
18
  declare const CredentialDetailsCard: FC<CredentialDetailsCardProps>;
16
19
  export default CredentialDetailsCard;
@@ -44,6 +44,9 @@ export type CredentialAttributeItemProps = CredentialAttribute & {
44
44
  onImagePreview?: (name: string, image: ImageSourcePropType) => void;
45
45
  onPress?: (id: string, selected: boolean) => void;
46
46
  style?: StyleProp<ViewStyle>;
47
+ isExpanded?: boolean;
48
+ moreLabel?: string;
49
+ lessLabel?: string;
47
50
  };
48
51
  declare const CredentialAttributeItem: FC<CredentialAttributeItemProps>;
49
52
  export default CredentialAttributeItem;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { HistoryItemViewProps } from './history-item';
3
- export interface HistorySectionListItemProps extends HistoryItemViewProps {
2
+ import { ListItemViewProps } from '../list/list-item';
3
+ export interface HistorySectionListItemProps extends ListItemViewProps {
4
4
  first?: boolean;
5
5
  }
6
6
  declare const HistorySectionListItem: FC<HistorySectionListItemProps>;
@@ -1,12 +1,9 @@
1
1
  import type { DataItemProps } from './data-item';
2
2
  import DataItem from './data-item';
3
- import type { HistoryItemViewProps } from './history-item';
4
- import HistoryItemView from './history-item';
5
3
  import HistorySectionHeaderView from './history-section-header';
6
4
  import type { HistorySectionListItemProps } from './history-section-list-item';
7
5
  import HistorySectionListItem from './history-section-list-item';
8
6
  export * from './history-details';
9
7
  export { DataItem, DataItemProps };
10
- export { HistoryItemView, HistoryItemViewProps };
11
8
  export { HistorySectionHeaderView };
12
9
  export { HistorySectionListItem, HistorySectionListItemProps };
@@ -1,6 +1,8 @@
1
1
  import { FC } from 'react';
2
2
  import { SvgProps } from 'react-native-svg';
3
3
  export declare const ScanIcon: FC<SvgProps>;
4
+ export declare const IssueIcon: FC<SvgProps>;
5
+ export declare const SignIcon: FC<SvgProps>;
4
6
  export declare const HistoryIcon: FC<SvgProps>;
5
7
  export declare const OptionsIcon: FC<SvgProps>;
6
8
  export declare const BackIcon: FC<SvgProps>;
@@ -1,7 +1,10 @@
1
+ import type { ListItemViewProps } from './list-item';
2
+ import ListItemView from './list-item';
1
3
  import type { ListSectionHeaderProps } from './list-section-header';
2
4
  import ListSectionHeader from './list-section-header';
3
5
  import type { ListTitleHeaderProps } from './list-title-header';
4
6
  import ListTitleHeader from './list-title-header';
7
+ export { ListItemView, ListItemViewProps };
5
8
  export { ListSectionHeader, ListSectionHeaderProps };
6
9
  export { ListTitleHeader, ListTitleHeaderProps };
7
10
  export * from './wallet';
@@ -1,6 +1,7 @@
1
1
  import { ComponentType, FC, ReactElement } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- export type HistoryItemViewProps = {
3
+ export type ListItemViewProps = {
4
+ accessory?: string | ComponentType<any> | ReactElement;
4
5
  first?: boolean;
5
6
  icon: ComponentType<any> | ReactElement;
6
7
  info?: string;
@@ -9,7 +10,6 @@ export type HistoryItemViewProps = {
9
10
  onPress?: () => void;
10
11
  style?: StyleProp<ViewStyle>;
11
12
  testID?: string;
12
- time: string;
13
13
  };
14
- declare const HistoryItemView: FC<HistoryItemViewProps>;
15
- export default HistoryItemView;
14
+ declare const ListItemView: FC<ListItemViewProps>;
15
+ export default ListItemView;
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  type WalletEmptyListProps = {
3
- onScanPress: () => void;
4
- scanButtonTitle: string;
3
+ onScanPress?: () => void;
4
+ scanButtonTitle?: string;
5
5
  subtitle: string;
6
6
  testID: string;
7
7
  title: string;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { TypographyProps } from './typography';
3
+ export type ExpandableTypographyProps = TypographyProps & {
4
+ numberOfLines?: number;
5
+ hideExpandButton?: boolean;
6
+ moreLabel?: string;
7
+ lessLabel?: string;
8
+ };
9
+ declare const ExpandableTypography: React.FC<ExpandableTypographyProps>;
10
+ export default ExpandableTypography;
@@ -1,3 +1,4 @@
1
+ import ExpandableTypography, { ExpandableTypographyProps } from './expandableTypography';
1
2
  import type { TypographyProps } from './typography';
2
3
  import Typography from './typography';
3
- export { Typography, TypographyProps };
4
+ export { ExpandableTypography, ExpandableTypographyProps, Typography, TypographyProps };
@@ -7,87 +7,87 @@ declare const presets: {
7
7
  readonly lineHeight: 36;
8
8
  readonly letterSpacing: 0.2;
9
9
  readonly fontFamily?: string | undefined;
10
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
10
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
11
11
  };
12
12
  readonly l: {
13
13
  readonly fontSize: 24;
14
14
  readonly lineHeight: 33;
15
15
  readonly fontFamily?: string | undefined;
16
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
16
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
17
17
  };
18
18
  readonly 'l/line-height-large': {
19
19
  readonly fontSize: 24;
20
20
  readonly lineHeight: 28;
21
21
  readonly fontFamily?: string | undefined;
22
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
22
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
23
23
  };
24
24
  readonly regular: {
25
25
  readonly fontSize: 17;
26
26
  readonly lineHeight: 24;
27
27
  readonly fontFamily?: string | undefined;
28
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
28
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
29
29
  };
30
30
  readonly m: {
31
31
  readonly fontSize: 17;
32
32
  readonly lineHeight: 22;
33
33
  readonly letterSpacing: -0.2;
34
34
  readonly fontFamily?: string | undefined;
35
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
35
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
36
36
  };
37
37
  readonly 'm/heading': {
38
38
  readonly fontSize: 17;
39
39
  readonly lineHeight: 22;
40
40
  readonly letterSpacing: -0.2;
41
41
  readonly fontFamily?: string | undefined;
42
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
42
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
43
43
  };
44
44
  readonly s: {
45
45
  readonly fontSize: 14;
46
46
  readonly lineHeight: 22;
47
47
  readonly fontFamily?: string | undefined;
48
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
48
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
49
49
  };
50
50
  readonly 's/line-height-capped': {
51
51
  readonly fontSize: 14;
52
52
  readonly lineHeight: 22;
53
53
  readonly letterSpacing: -0.2;
54
54
  readonly fontFamily?: string | undefined;
55
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
55
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
56
56
  };
57
57
  readonly 's/line-height-small': {
58
58
  readonly fontSize: 14;
59
59
  readonly lineHeight: 18;
60
60
  readonly letterSpacing: 0.3;
61
61
  readonly fontFamily?: string | undefined;
62
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
62
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
63
63
  };
64
64
  readonly 's/code': {
65
65
  readonly fontSize: 14;
66
66
  readonly lineHeight: 22;
67
67
  readonly letterSpacing: 0.2;
68
68
  readonly fontFamily?: string | undefined;
69
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
69
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
70
70
  };
71
71
  readonly xs: {
72
72
  readonly fontSize: 12;
73
73
  readonly lineHeight: 22;
74
74
  readonly letterSpacing: -0.1;
75
75
  readonly fontFamily?: string | undefined;
76
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
76
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
77
77
  };
78
78
  readonly 'xs/line-height-small': {
79
79
  readonly fontSize: 12;
80
80
  readonly lineHeight: 18;
81
81
  readonly letterSpacing: 0.3;
82
82
  readonly fontFamily?: string | undefined;
83
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
83
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
84
84
  };
85
85
  readonly 'xs/code': {
86
86
  readonly fontSize: 12;
87
87
  readonly lineHeight: 18;
88
88
  readonly letterSpacing: 0.3;
89
89
  readonly fontFamily?: string | undefined;
90
- readonly fontWeight?: 500 | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
90
+ readonly fontWeight?: 500 | "bold" | "normal" | "100" | "black" | "light" | "regular" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
91
91
  };
92
92
  };
93
93
  export type TypographyProps = BaseTextProps & {
@@ -106,7 +106,7 @@ declare const Typography: React.ForwardRefExoticComponent<import("react-native")
106
106
  announcementCumulative?: boolean | undefined;
107
107
  onAnnouncementFinished?: ((finished: boolean) => void) | undefined;
108
108
  } & {
109
- preset?: "s" | "regular" | "xl" | "l" | "l/line-height-large" | "m" | "m/heading" | "s/line-height-capped" | "s/line-height-small" | "s/code" | "xs" | "xs/line-height-small" | "xs/code" | undefined;
109
+ preset?: "s" | "m" | "regular" | "xl" | "l" | "l/line-height-large" | "m/heading" | "s/line-height-capped" | "s/line-height-small" | "s/code" | "xs" | "xs/line-height-small" | "xs/code" | undefined;
110
110
  caps?: boolean | undefined;
111
111
  } & React.RefAttributes<Text>>;
112
112
  export default Typography;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Returns current app state
3
3
  */
4
- export declare function useAppState(): "background" | "active" | "inactive" | "unknown" | "extension";
4
+ export declare function useAppState(): "active" | "background" | "inactive" | "unknown" | "extension";
5
5
  export declare function useIsAppActive(): boolean | undefined;
@@ -7,7 +7,7 @@ export declare const useCredentials: (queryParams?: Partial<CredentialListQuery>
7
7
  export declare const usePagedCredentials: (queryParams?: Partial<CredentialListQuery>) => import("react-query").UseInfiniteQueryResult<import("@procivis/react-native-one-core").CredentialList, unknown>;
8
8
  export declare const useCredentialDetail: (credentialId: string | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").CredentialDetail | undefined, unknown>;
9
9
  export declare const useInvitationHandler: () => import("react-query").UseMutationResult<HandleInvitationResponse, unknown, Omit<HandleInvitationRequest, "organisationId">, unknown>;
10
- export declare const useCredentialAccept: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderAcceptCredentialResponse, unknown, HolderAcceptCredentialRequest, unknown>;
10
+ export declare const useCredentialAccept: () => import("react-query").UseMutationResult<string, unknown, HolderAcceptCredentialRequest, unknown>;
11
11
  export declare const useCredentialReject: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
12
12
  export declare const useCredentialRevocationCheck: (forceRefresh: boolean) => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").CredentialRevocationCheckResponse[], unknown, string[], unknown>;
13
13
  export declare const useCredentialDelete: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
@@ -1,9 +1,13 @@
1
- import { HolderRegisterWalletUnitRequest, HolderWalletUnit, HolderWalletUnitUpdateRequest } from '@procivis/react-native-one-core';
1
+ import { HolderActivateWalletUnitRequest, HolderRegisterWalletUnitRequest, HolderWalletUnit, HolderWalletUnitUpdateRequest } from '@procivis/react-native-one-core';
2
2
  export declare const WALLET_UNIT_QUERY_KEY = "wallet-unit";
3
3
  export declare const WALLET_UNIT_TRUST_COLLECTIONS_QUERY_KEY = "wallet-unit-trust-collections";
4
4
  export declare const useWalletUnitDetail: (walletUnitId: HolderWalletUnit['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<HolderWalletUnit | undefined, unknown>;
5
5
  export declare const useWalletUnitTrustCollections: (walletUnitId: HolderWalletUnit['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustCollections | undefined, unknown>;
6
6
  export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRegisterWalletUnitResponse, unknown, Omit<HolderRegisterWalletUnitRequest, "organisationId" | "keyType">, unknown>;
7
+ export declare const useActivateWalletUnit: () => import("react-query").UseMutationResult<void, unknown, {
8
+ id: string;
9
+ userIdToken: HolderActivateWalletUnitRequest['userIdToken'];
10
+ }, unknown>;
7
11
  export declare const useWalletUnitStatus: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
8
12
  export declare const useWalletUnitUpdate: () => import("react-query").UseMutationResult<void, unknown, {
9
13
  walletUnitId: HolderWalletUnit['id'];
@@ -1,8 +1,8 @@
1
- import { Claim, CoreConfig, CredentialDetail, PresentationDefinitionField, PresentationDefinitionRequestedCredential } from '@procivis/react-native-one-core';
1
+ import { Claim, CoreConfig, CredentialDetail, PresentationDefinitionField, PresentationDefinitionRequestedCredential, PresentationDefinitionV2Credential } from '@procivis/react-native-one-core';
2
2
  import { CredentialAttribute, CredentialCardProps } from '../../ui-components/credential';
3
3
  import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
4
4
  import { CardLabels, CredentialDetailsCardPropsWithoutWidth } from './credential';
5
- export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, expanded: boolean, selectiveDisclosureSupported: boolean | undefined, multipleCredentialsAvailable: boolean, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
5
+ export declare const validityCheckedCardFromCredential: (credential: CredentialDetail | PresentationDefinitionV2Credential, expanded: boolean, selectiveDisclosureSupported: boolean | undefined, multipleCredentialsAvailable: boolean, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
6
6
  export declare const missingCredentialCardFromRequest: (request: PresentationDefinitionRequestedCredential, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
7
7
  type FlatClaim = Claim & {
8
8
  isArrayElement?: boolean;
@@ -13,8 +13,9 @@ export type ShareCredentialCardLabels = CardLabels & {
13
13
  missingAttribute: string;
14
14
  missingCredential: string;
15
15
  multipleCredentials: string;
16
+ disclosurePolicyViolation: string;
16
17
  };
17
- export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
18
+ export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | PresentationDefinitionV2Credential | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
18
19
  export declare const selectCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
19
20
  export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
20
21
  export {};
@@ -1,4 +1,4 @@
1
- import { Claim, CoreConfig, CredentialDetail, CredentialListItem, CredentialSchemaListItem } from '@procivis/react-native-one-core';
1
+ import { Claim, CoreConfig, CredentialDetail, CredentialListItem, CredentialSchemaListItem, PresentationDefinitionV2Credential } from '@procivis/react-native-one-core';
2
2
  import { CredentialAttribute, CredentialCardProps, CredentialDetailsCardProps, CredentialHeaderProps } from '../../ui-components/credential';
3
3
  import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
4
4
  export declare enum ValidityState {
@@ -29,3 +29,4 @@ export declare const detailsCardFromCredential: (credential: CredentialDetail, c
29
29
  export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: CoreConfig, testID: string, labels: CardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
30
30
  export declare const nestAttributes: (attributes: CredentialAttribute[]) => CredentialAttribute[];
31
31
  export declare function getCredentialSchemaWithoutImages<T extends CredentialSchemaListItem>(credentialSchema: T): T;
32
+ export declare function credentialDetailFromPresentationV2Credential(presentationCredential: CredentialDetail | PresentationDefinitionV2Credential): CredentialDetail;
@@ -1,5 +1,5 @@
1
1
  import { CredentialListQuery, CredentialSchemaListQuery, DidListQuery, HistoryListQuery, IdentifierListQuery, ProofListQuery, ProofSchemaListQuery } from '@procivis/react-native-one-core';
2
- export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialListQuerySearchType[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialRole[] | import("@procivis/react-native-one-core").CredentialState[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityType[] | undefined)[];
2
+ export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialListQuerySearchType[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialRole[] | import("@procivis/react-native-one-core").CredentialState[] | import("@procivis/react-native-one-core").CredentialType[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityType[] | undefined)[];
3
3
  export declare const getQueryKeyFromHistoryListQueryParams: (queryParams?: Partial<HistoryListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").HistorySearch | import("@procivis/react-native-one-core").HistoryEntityType[] | import("@procivis/react-native-one-core").HistoryAction[] | undefined)[];
4
4
  export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQuery>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
5
5
  export declare const getQueryKeyFromProofSchemaListQueryParams: (queryParams?: Partial<ProofSchemaListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofSchemaListQueryExactColumn[] | undefined)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/one-react-native-components",
3
- "version": "0.3.130",
3
+ "version": "0.3.142",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Common Procivis ONE UI components for react-native",
@@ -53,7 +53,7 @@
53
53
  "@babel/runtime": "^7.25.0",
54
54
  "@commitlint/config-conventional": "^11.0.0",
55
55
  "@gorhom/bottom-sheet": "^5.1.2",
56
- "@procivis/react-native-one-core": "1.106597.0",
56
+ "@procivis/react-native-one-core": "1.112373.0",
57
57
  "@procivis/react-native-picker": "5.0.3",
58
58
  "@react-native-async-storage/async-storage": "^1.17.3",
59
59
  "@react-native-community/blur": "^4.4.0",
@@ -142,7 +142,7 @@
142
142
  "vite": "^6.4.2"
143
143
  },
144
144
  "peerDependencies": {
145
- "@procivis/react-native-one-core": "^1.106597.0",
145
+ "@procivis/react-native-one-core": "^1.112373.0",
146
146
  "@procivis/react-native-picker": "*",
147
147
  "@react-native-community/blur": "*",
148
148
  "@react-native-community/netinfo": "^11.4.1",