@procivis/one-react-native-components 0.3.132 → 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 (83) hide show
  1. package/lib/commonjs/components/history/history-list-item-icon.js +2 -0
  2. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  3. package/lib/commonjs/ui-components/buttons/scan-button.js +122 -27
  4. package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
  5. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +37 -18
  6. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  7. package/lib/commonjs/ui-components/credential/credential-attribute-item.js +13 -4
  8. package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
  9. package/lib/commonjs/ui-components/icons/icons.js +36 -2
  10. package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
  11. package/lib/commonjs/ui-components/list/wallet/empty-list.js +2 -1
  12. package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -1
  13. package/lib/commonjs/ui-components/notice/wallet-notice.js +4 -2
  14. package/lib/commonjs/ui-components/notice/wallet-notice.js.map +1 -1
  15. package/lib/commonjs/ui-components/text/expandableTypography.js +64 -0
  16. package/lib/commonjs/ui-components/text/expandableTypography.js.map +1 -0
  17. package/lib/commonjs/ui-components/text/index.js +15 -0
  18. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  19. package/lib/commonjs/utils/hooks/core/credential-schemas.js +24 -1
  20. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  21. package/lib/commonjs/utils/hooks/core/wallet-unit.js +20 -1
  22. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  23. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +1 -5
  24. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  25. package/lib/commonjs/utils/parsers/credential-sharing.js +17 -11
  26. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  27. package/lib/commonjs/utils/parsers/credential.js +12 -4
  28. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  29. package/lib/module/components/history/history-list-item-icon.js +2 -0
  30. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  31. package/lib/module/ui-components/buttons/scan-button.js +124 -29
  32. package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
  33. package/lib/module/ui-components/credential/card/credential-details-card.js +37 -18
  34. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  35. package/lib/module/ui-components/credential/credential-attribute-item.js +13 -4
  36. package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
  37. package/lib/module/ui-components/icons/icons.js +32 -0
  38. package/lib/module/ui-components/icons/icons.js.map +1 -1
  39. package/lib/module/ui-components/list/wallet/empty-list.js +2 -1
  40. package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -1
  41. package/lib/module/ui-components/notice/wallet-notice.js +4 -2
  42. package/lib/module/ui-components/notice/wallet-notice.js.map +1 -1
  43. package/lib/module/ui-components/text/expandableTypography.js +55 -0
  44. package/lib/module/ui-components/text/expandableTypography.js.map +1 -0
  45. package/lib/module/ui-components/text/index.js +2 -1
  46. package/lib/module/ui-components/text/index.js.map +1 -1
  47. package/lib/module/utils/hooks/core/credential-schemas.js +24 -1
  48. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  49. package/lib/module/utils/hooks/core/wallet-unit.js +18 -0
  50. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  51. package/lib/module/utils/parsers/credential-sharing-v2.js +1 -5
  52. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  53. package/lib/module/utils/parsers/credential-sharing.js +18 -12
  54. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  55. package/lib/module/utils/parsers/credential.js +10 -4
  56. package/lib/module/utils/parsers/credential.js.map +1 -1
  57. package/lib/typescript/ui-components/buttons/scan-button.d.ts +9 -3
  58. package/lib/typescript/ui-components/credential/card/credential-details-card.d.ts +3 -0
  59. package/lib/typescript/ui-components/credential/credential-attribute-item.d.ts +3 -0
  60. package/lib/typescript/ui-components/icons/icons.d.ts +2 -0
  61. package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +2 -2
  62. package/lib/typescript/ui-components/text/expandableTypography.d.ts +10 -0
  63. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  64. package/lib/typescript/ui-components/text/typography.d.ts +14 -14
  65. package/lib/typescript/utils/hooks/app-state.d.ts +1 -1
  66. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -1
  67. package/lib/typescript/utils/parsers/credential-sharing.d.ts +4 -3
  68. package/lib/typescript/utils/parsers/credential.d.ts +2 -1
  69. package/package.json +3 -3
  70. package/src/components/history/history-list-item-icon.tsx +2 -0
  71. package/src/ui-components/buttons/scan-button.tsx +130 -38
  72. package/src/ui-components/credential/card/credential-details-card.tsx +46 -19
  73. package/src/ui-components/credential/credential-attribute-item.tsx +15 -3
  74. package/src/ui-components/icons/icons.tsx +24 -0
  75. package/src/ui-components/list/wallet/empty-list.tsx +11 -8
  76. package/src/ui-components/notice/wallet-notice.tsx +4 -2
  77. package/src/ui-components/text/expandableTypography.tsx +71 -0
  78. package/src/ui-components/text/index.ts +2 -1
  79. package/src/utils/hooks/core/credential-schemas.ts +23 -1
  80. package/src/utils/hooks/core/wallet-unit.ts +21 -0
  81. package/src/utils/parsers/credential-sharing-v2.tsx +1 -5
  82. package/src/utils/parsers/credential-sharing.tsx +20 -9
  83. package/src/utils/parsers/credential.ts +14 -3
@@ -1,4 +1,4 @@
1
- import { CredentialState, DataType, FormatFeature } from '@procivis/react-native-one-core';
1
+ import { CredentialState, CredentialType, DataType, FormatFeature } from '@procivis/react-native-one-core';
2
2
  import { CredentialErrorIcon, CredentialNoticeInfoIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';
3
3
  import { formatDateLocalized, formatDateTimeLocalized } from '../date';
4
4
  import { concatTestID } from '../testID';
@@ -103,7 +103,7 @@ export const cardHeaderFromCredential = (credential, claims = [], config, testID
103
103
  const {
104
104
  layoutProperties
105
105
  } = credential.schema;
106
- const defaultLanguage = config.defaultLanguage;
106
+ const defaultLanguage = config.globalSettings.defaultLanguage;
107
107
  return {
108
108
  color: layoutProperties === null || layoutProperties === void 0 || (_layoutProperties$log = layoutProperties.logo) === null || _layoutProperties$log === void 0 ? void 0 : _layoutProperties$log.backgroundColor,
109
109
  credentialDetailErrorColor,
@@ -126,7 +126,7 @@ export const getCredentialCardPropsFromCredential = (credential, claims = [], co
126
126
  const {
127
127
  layoutProperties
128
128
  } = credential.schema;
129
- const defaultLanguage = config.defaultLanguage;
129
+ const defaultLanguage = config.globalSettings.defaultLanguage;
130
130
  if (hasMsoValidityIssues(credential)) {
131
131
  notice = {
132
132
  text: labels.validityIssuesNotice,
@@ -159,7 +159,7 @@ export const getCredentialCardPropsFromCredential = (credential, claims = [], co
159
159
  export const detailsCardAttributeFromClaim = (claim, config, testID, language) => {
160
160
  var _getTranslatedLabel2;
161
161
  const value = detailsCardAttributeValueFromClaim(claim, config, testID, language);
162
- const defaultLanguage = config.defaultLanguage;
162
+ const defaultLanguage = config.globalSettings.defaultLanguage;
163
163
  return {
164
164
  id: claim.path,
165
165
  name: (_getTranslatedLabel2 = getTranslatedLabel(claim.schema.translations.name, language, defaultLanguage)) !== null && _getTranslatedLabel2 !== void 0 ? _getTranslatedLabel2 : claim.path.split('/').pop(),
@@ -344,4 +344,10 @@ export function getCredentialSchemaWithoutImages(credentialSchema) {
344
344
  }
345
345
  };
346
346
  }
347
+ export function credentialDetailFromPresentationV2Credential(presentationCredential) {
348
+ return {
349
+ type: CredentialType.SINGLE,
350
+ ...presentationCredential
351
+ };
352
+ }
347
353
  //# sourceMappingURL=credential.js.map
@@ -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,iCAAiC;AAYxC,SACEC,mBAAmB,EACnBC,wBAAwB,EACxBC,2BAA2B,EAC3BC,qBAAqB,QAChB,2BAA2B;AAClC,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,2BAA2B,QAAQ,qBAAqB;AAEjE,WAAYC,aAAa,0BA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AAmB,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,2BAA2B,EAC3BC,qBAAqB,QAChB,2BAA2B;AAClC,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,2BAA2B,QAAQ,qBAAqB;AAEjE,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aA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AAK;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,sBAAA;EAC3G,OAAO;IACL,GAAGJ,gBAAgB;IACnBpG,gBAAgB,EAAE;MAChB,GAAGoG,gBAAgB,CAACpG,gBAAgB;MACpCiD,UAAU,EAAE;QACV,KAAAoD,qBAAA,GAAGD,gBAAgB,CAACpG,gBAAgB,cAAAqG,qBAAA,uBAAjCA,qBAAA,CAAmCpD,UAAU;QAChDjB,KAAK,EAAEkE,gBAAgB,EAAAI,sBAAA,GAACF,gBAAgB,CAACpG,gBAAgB,cAAAsG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCrD,UAAU,cAAAqD,sBAAA,uBAA7CA,sBAAA,CAA+CtE,KAAK;MAC9E,CAAC;MACDN,IAAI,EAAE;QACJ,KAAA6E,sBAAA,GAAGH,gBAAgB,CAACpG,gBAAgB,cAAAuG,sBAAA,uBAAjCA,sBAAA,CAAmC7E,IAAI;QAC1CM,KAAK,EAAEkE,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAACpG,gBAAgB,cAAAwG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmC9E,IAAI,cAAA8E,sBAAA,uBAAvCA,sBAAA,CAAyCxE,KAAK;MACxE;IACF;EACF,CAAC;AACH;AAEA,OAAO,SAASyE,4CAA4CA,CAC1DC,sBAA6E,EAC3D;EAClB,OAAO;IACL1C,IAAI,EAAE3H,cAAc,CAACsK,MAAM;IAC3B,GAAGD;EACL,CAAC;AACH","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,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,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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/one-react-native-components",
3
- "version": "0.3.132",
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.108225.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.108225.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",
@@ -38,6 +38,7 @@ const defaultIcons: {
38
38
  DELETED: HistoryStatusDeleteIcon,
39
39
  ERRORED: HistoryStatusErrorIcon,
40
40
  IMPORTED: HistoryStatusAcceptedIcon,
41
+ SIGNED: HistoryStatusAcceptedIcon,
41
42
  ISSUED: HistoryStatusAcceptedIcon,
42
43
  OFFERED: HistoryStatusAcceptedIcon,
43
44
  PENDING: HistoryStatusAcceptedIcon,
@@ -73,6 +74,7 @@ const defaultIcons: {
73
74
  IDENTIFIER: HistoryIdentifierIcon,
74
75
  KEY: HistoryKeyIcon,
75
76
  ORGANISATION: HistoryOrganisationIcon,
77
+ QES_DOCUMENT: HistoryCredentialIcon,
76
78
  PROOF: HistoryProofRequestIcon,
77
79
  PROOF_SCHEMA: HistorySchemaIcon,
78
80
  WALLET_UNIT: HistoryTrustedEntityIcon,