@procivis/one-react-native-components 0.3.121 → 0.3.130
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.
- package/lib/commonjs/components/credential/credential.js +2 -1
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item-icon.js +2 -3
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item.js +2 -8
- package/lib/commonjs/components/history/history-list-item.js.map +1 -1
- package/lib/commonjs/components/history/history-list-screen.js +1 -1
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
- package/lib/commonjs/components/index.js +0 -11
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/select-credential.js +2 -1
- package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js +2 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/select-credential-v2.js +2 -1
- package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +3 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +4 -2
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +2 -2
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
- package/lib/commonjs/ui-components/icons/contact.js.map +1 -1
- package/lib/commonjs/ui-components/icons/credential.js +3 -3
- package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
- package/lib/commonjs/ui-components/icons/icons.js +20 -1
- package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loading-result.js +2 -0
- package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +7 -33
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/utils/date.js +4 -5
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +7 -4
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-config.js +1 -6
- package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +0 -15
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +15 -1
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/index.js +0 -11
- package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-list.js +19 -3
- package/lib/commonjs/utils/hooks/core/trust-list.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/verifier-instance.js +22 -3
- package/lib/commonjs/utils/hooks/core/verifier-instance.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js +2 -2
- package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js +14 -14
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +20 -18
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +36 -22
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js +1 -1
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/translations.js +15 -0
- package/lib/commonjs/utils/translations.js.map +1 -0
- package/lib/module/components/credential/credential.js +2 -1
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +2 -3
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-item.js +3 -9
- package/lib/module/components/history/history-list-item.js.map +1 -1
- package/lib/module/components/history/history-list-screen.js +1 -1
- package/lib/module/components/history/history-list-screen.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/proof-request/v1/select-credential.js +2 -1
- package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/v1/share-credential.js +2 -1
- package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/module/components/proof-request/v2/select-credential-v2.js +2 -1
- package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js +3 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js +4 -2
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/header.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +3 -3
- package/lib/module/ui-components/history/history-details.js.map +1 -1
- package/lib/module/ui-components/icons/contact.js.map +1 -1
- package/lib/module/ui-components/icons/credential.js +1 -1
- package/lib/module/ui-components/icons/credential.js.map +1 -1
- package/lib/module/ui-components/icons/icons.js +18 -0
- package/lib/module/ui-components/icons/icons.js.map +1 -1
- package/lib/module/ui-components/loader/loading-result.js +2 -0
- package/lib/module/ui-components/loader/loading-result.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js +7 -33
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/utils/date.js +4 -5
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +7 -4
- package/lib/module/utils/hooks/core/cache.js.map +1 -1
- package/lib/module/utils/hooks/core/core-config.js +0 -4
- package/lib/module/utils/hooks/core/core-config.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +0 -15
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +13 -0
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/index.js +0 -1
- package/lib/module/utils/hooks/core/index.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-list.js +20 -4
- package/lib/module/utils/hooks/core/trust-list.js.map +1 -1
- package/lib/module/utils/hooks/core/verifier-instance.js +20 -2
- package/lib/module/utils/hooks/core/verifier-instance.js.map +1 -1
- package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
- package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js +15 -15
- package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +20 -18
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +37 -23
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/query.js +1 -1
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/translations.js +8 -0
- package/lib/module/utils/translations.js.map +1 -0
- package/lib/typescript/components/credential/credential.d.ts +1 -0
- package/lib/typescript/components/history/history-list-item.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +0 -1
- package/lib/typescript/components/proof-request/v1/select-credential.d.ts +1 -0
- package/lib/typescript/components/proof-request/v1/share-credential.d.ts +1 -0
- package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +1 -0
- package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +1 -0
- package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +1 -0
- package/lib/typescript/ui-components/history/history-details.d.ts +2 -2
- package/lib/typescript/ui-components/icons/credential.d.ts +1 -1
- package/lib/typescript/ui-components/icons/icons.d.ts +1 -0
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +0 -12
- package/lib/typescript/utils/hooks/core/core-config.d.ts +0 -1
- package/lib/typescript/utils/hooks/core/core-context.d.ts +0 -1
- package/lib/typescript/utils/hooks/core/credentials.d.ts +2 -1
- package/lib/typescript/utils/hooks/core/index.d.ts +0 -1
- package/lib/typescript/utils/hooks/core/trust-list.d.ts +1 -4
- package/lib/typescript/utils/hooks/core/verifier-instance.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +2 -2
- package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +3 -3
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +6 -6
- package/lib/typescript/utils/parsers/credential.d.ts +5 -5
- package/lib/typescript/utils/parsers/query.d.ts +1 -1
- package/lib/typescript/utils/translations.d.ts +1 -0
- package/package.json +3 -3
- package/src/components/credential/credential.tsx +3 -0
- package/src/components/history/history-list-item-icon.tsx +1 -2
- package/src/components/history/history-list-item.tsx +4 -9
- package/src/components/history/history-list-screen.tsx +1 -1
- package/src/components/index.ts +0 -1
- package/src/components/proof-request/v1/select-credential.tsx +3 -1
- package/src/components/proof-request/v1/share-credential.tsx +3 -0
- package/src/components/proof-request/v2/select-credential-v2.tsx +3 -1
- package/src/components/proof-request/v2/share-credential-v2-group.tsx +4 -0
- package/src/components/proof-request/v2/share-credential-v2.tsx +5 -0
- package/src/ui-components/credential/card/credential-details-card.tsx +3 -2
- package/src/ui-components/header/foldable-header.tsx +10 -9
- package/src/ui-components/header/header.tsx +10 -1
- package/src/ui-components/history/history-details.tsx +4 -4
- package/src/ui-components/icons/contact.tsx +1 -1
- package/src/ui-components/icons/credential.tsx +1 -1
- package/src/ui-components/icons/icons.tsx +18 -0
- package/src/ui-components/loader/loading-result.tsx +7 -1
- package/src/ui-components/screens/nerd-mode-screen.tsx +2 -52
- package/src/utils/date.ts +7 -14
- package/src/utils/hooks/core/cache.ts +10 -3
- package/src/utils/hooks/core/core-config.ts +1 -6
- package/src/utils/hooks/core/core-context.tsx +0 -24
- package/src/utils/hooks/core/credentials.ts +13 -0
- package/src/utils/hooks/core/index.ts +0 -1
- package/src/utils/hooks/core/trust-list.ts +22 -11
- package/src/utils/hooks/core/verifier-instance.ts +23 -2
- package/src/utils/hooks/core/wallet-unit.ts +3 -3
- package/src/utils/parsers/credential-sharing-v2.tsx +29 -12
- package/src/utils/parsers/credential-sharing.tsx +33 -16
- package/src/utils/parsers/credential.ts +45 -14
- package/src/utils/parsers/query.ts +3 -0
- package/src/utils/translations.ts +10 -0
- package/lib/commonjs/components/entity/EntityButtons.js +0 -64
- package/lib/commonjs/components/entity/EntityButtons.js.map +0 -1
- package/lib/commonjs/components/entity/entity-attributes.js +0 -65
- package/lib/commonjs/components/entity/entity-attributes.js.map +0 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +0 -67
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +0 -1
- package/lib/commonjs/components/entity/entity-details.js +0 -101
- package/lib/commonjs/components/entity/entity-details.js.map +0 -1
- package/lib/commonjs/components/entity/index.js +0 -14
- package/lib/commonjs/components/entity/index.js.map +0 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +0 -147
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +0 -1
- package/lib/module/components/entity/EntityButtons.js +0 -56
- package/lib/module/components/entity/EntityButtons.js.map +0 -1
- package/lib/module/components/entity/entity-attributes.js +0 -57
- package/lib/module/components/entity/entity-attributes.js.map +0 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +0 -58
- package/lib/module/components/entity/entity-details-with-buttons.js.map +0 -1
- package/lib/module/components/entity/entity-details.js +0 -92
- package/lib/module/components/entity/entity-details.js.map +0 -1
- package/lib/module/components/entity/index.js +0 -3
- package/lib/module/components/entity/index.js.map +0 -1
- package/lib/module/utils/hooks/core/trust-entity.js +0 -136
- package/lib/module/utils/hooks/core/trust-entity.js.map +0 -1
- package/lib/typescript/components/entity/EntityButtons.d.ts +0 -14
- package/lib/typescript/components/entity/entity-attributes.d.ts +0 -15
- package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +0 -18
- package/lib/typescript/components/entity/entity-details.d.ts +0 -21
- package/lib/typescript/components/entity/index.d.ts +0 -3
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +0 -17
- package/src/components/entity/EntityButtons.tsx +0 -79
- package/src/components/entity/entity-attributes.tsx +0 -80
- package/src/components/entity/entity-details-with-buttons.tsx +0 -75
- package/src/components/entity/entity-details.tsx +0 -145
- package/src/components/entity/index.ts +0 -4
- package/src/utils/hooks/core/trust-entity.ts +0 -172
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CredentialState","DataType","FormatFeature","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPath","path","claims","exactClaim","find","claim","parentClaim","startsWith","value","type_","formatCredentialDetail","testID","_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","_layoutProperties$log2","_layoutProperties$log3","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","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 { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === 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 = (claim: Claim, config: CoreConfig, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\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): {\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'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\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): Omit<CredentialHeaderProps, 'style'> => {\n const {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailErrorColor,\n credentialDetailTestID,\n statusIcon,\n } = credentialDetailFromCredential(credential, claims, config, testID, labels);\n const { layoutProperties } = credential.schema;\n\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: CoreConfig,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style' | '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),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (\n claim: Claim,\n config: CoreConfig,\n testID: string,\n): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.path,\n name: 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): 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()));\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())),\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): CredentialDetailsCardPropsWithoutWidth => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: CoreConfig,\n testID: string,\n labels: CardLabels,\n): CredentialDetailsCardPropsWithoutWidth => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n 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,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,2BAA2B;AACnH,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,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AAC;AAED,SAASG,gBAAgBA,CAAC/D,KAAyB,EAAE;EACnD,OAAOA,KAAK,GAAG,iBAAiB,GAAG,EAAE;AACvC;AAEA,OAAO,SAASgE,gCAAgCA,CAAqCC,gBAAmB,EAAK;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,sBAAA;EAC3G,OAAO;IACL,GAAGJ,gBAAgB;IACnB5F,gBAAgB,EAAE;MAChB,GAAG4F,gBAAgB,CAAC5F,gBAAgB;MACpC0C,UAAU,EAAE;QACV,KAAAmD,qBAAA,GAAGD,gBAAgB,CAAC5F,gBAAgB,cAAA6F,qBAAA,uBAAjCA,qBAAA,CAAmCnD,UAAU;QAChDf,KAAK,EAAE+D,gBAAgB,EAAAI,sBAAA,GAACF,gBAAgB,CAAC5F,gBAAgB,cAAA8F,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCpD,UAAU,cAAAoD,sBAAA,uBAA7CA,sBAAA,CAA+CnE,KAAK;MAC9E,CAAC;MACDL,IAAI,EAAE;QACJ,KAAAyE,sBAAA,GAAGH,gBAAgB,CAAC5F,gBAAgB,cAAA+F,sBAAA,uBAAjCA,sBAAA,CAAmCzE,IAAI;QAC1CK,KAAK,EAAE+D,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAAC5F,gBAAgB,cAAAgG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmC1E,IAAI,cAAA0E,sBAAA,uBAAvCA,sBAAA,CAAyCrE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
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,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAMzB,OAAO,MAAMC,gBAAgB,GAAIC,UAA0C,IAAK;EAC9E,IAAI,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,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":[]}
|
|
@@ -11,7 +11,7 @@ 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']);
|
|
12
12
|
};
|
|
13
13
|
export const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams = {}) => {
|
|
14
|
-
return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'sort', 'sortDirection', 'exact', 'ids', 'include', 'schemaId', 'formats', 'createdDateAfter', 'createdDateBefore', 'lastModifiedAfter', 'lastModifiedBefore']);
|
|
14
|
+
return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'sort', 'sortDirection', 'exact', 'ids', 'include', 'schemaId', 'schemaIds', 'formats', 'usesBatchIssuance', 'isMultiformatSchema', 'createdDateAfter', 'createdDateBefore', 'lastModifiedAfter', 'lastModifiedBefore']);
|
|
15
15
|
};
|
|
16
16
|
export const getQueryKeyFromProofSchemaListQueryParams = (queryParams = {}) => {
|
|
17
17
|
return getQueryKey(queryParams, ['page', 'pageSize', 'organisationId', 'name', 'sort', 'sortDirection', 'exact', 'ids', 'formats', 'createdDateAfter', 'createdDateBefore', 'lastModifiedAfter', 'lastModifiedBefore']);
|
|
@@ -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 'formats',\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,oBAA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b,YAAY,EACZ,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
|
+
{"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 ]);\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,CACvB,CAAC;AACJ,CAAC;AAED,OAAO,MAAMK,qCAAqC,GAAGA,CAACL,WAAsC,GAAG,CAAC,CAAC,KAAK;EACpG,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,QAAQ,EACR,OAAO,CACR,CAAC;AACJ,CAAC;AAED,OAAO,MAAMM,8CAA8C,GAAGA,CAC5DN,WAA+C,GAAG,CAAC,CAAC,KACjD;EACH,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,eAAe,EACf,OAAO,EACP,KAAK,EACL,SAAS,EAC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,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":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const getTranslatedLabel = (translations, language, defaultLanguage) => {
|
|
2
|
+
var _translations$languag;
|
|
3
|
+
if (!language) {
|
|
4
|
+
return undefined;
|
|
5
|
+
}
|
|
6
|
+
return (_translations$languag = translations === null || translations === void 0 ? void 0 : translations[language]) !== null && _translations$languag !== void 0 ? _translations$languag : translations === null || translations === void 0 ? void 0 : translations[defaultLanguage];
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=translations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getTranslatedLabel","translations","language","defaultLanguage","_translations$languag","undefined"],"sources":["translations.ts"],"sourcesContent":["export const getTranslatedLabel = (\n translations: Record<string, string> | undefined,\n language: string | undefined,\n defaultLanguage: string,\n) => {\n if (!language) {\n return undefined;\n }\n return translations?.[language] ?? translations?.[defaultLanguage];\n};\n"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAGA,CAChCC,YAAgD,EAChDC,QAA4B,EAC5BC,eAAuB,KACpB;EAAA,IAAAC,qBAAA;EACH,IAAI,CAACF,QAAQ,EAAE;IACb,OAAOG,SAAS;EAClB;EACA,QAAAD,qBAAA,GAAOH,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGC,QAAQ,CAAC,cAAAE,qBAAA,cAAAA,qBAAA,GAAIH,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGE,eAAe,CAAC;AACpE,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ export interface CredentialDetailsProps {
|
|
|
9
9
|
expanded?: boolean;
|
|
10
10
|
headerAccessory?: CredentialHeaderProps['accessory'];
|
|
11
11
|
labels: CardLabels;
|
|
12
|
+
language?: string;
|
|
12
13
|
lastItem?: boolean;
|
|
13
14
|
onHeaderPress?: (credentialId?: string) => void;
|
|
14
15
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -11,7 +11,7 @@ export type HistoryListItemLabels = {
|
|
|
11
11
|
export interface HistoryListItemViewProps {
|
|
12
12
|
dateFormatter?: (date: Date) => string;
|
|
13
13
|
first?: boolean;
|
|
14
|
-
infoLabelMode?: '
|
|
14
|
+
infoLabelMode?: 'associatedLabel' | 'none';
|
|
15
15
|
item: HistoryListItem;
|
|
16
16
|
labels: HistoryListItemLabels;
|
|
17
17
|
last?: boolean;
|
|
@@ -5,6 +5,7 @@ import { ShareCredentialCardLabels } from '../../../utils/parsers/credential-sha
|
|
|
5
5
|
export declare const SelectCredential: FC<{
|
|
6
6
|
credentialId: string;
|
|
7
7
|
labels: ShareCredentialCardLabels;
|
|
8
|
+
language?: string;
|
|
8
9
|
lastItem: boolean;
|
|
9
10
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
10
11
|
onPress?: () => void;
|
|
@@ -13,6 +13,7 @@ export declare const ShareCredential: FunctionComponent<{
|
|
|
13
13
|
allCredentials: CredentialDetail[];
|
|
14
14
|
expanded?: boolean;
|
|
15
15
|
labels: ShareCredentialLabels;
|
|
16
|
+
language?: string;
|
|
16
17
|
lastItem?: boolean;
|
|
17
18
|
onHeaderPress?: (_credentialId?: string) => void;
|
|
18
19
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -5,6 +5,7 @@ import { ShareCredentialCardLabels } from '../../../utils';
|
|
|
5
5
|
export declare const SelectCredentialV2: FC<{
|
|
6
6
|
credential: PresentationDefinitionV2Credential;
|
|
7
7
|
labels: ShareCredentialCardLabels;
|
|
8
|
+
language?: string;
|
|
8
9
|
lastItem: boolean;
|
|
9
10
|
multiple: boolean;
|
|
10
11
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -8,6 +8,7 @@ export type ShareCredentialGroupLabels = ShareCredentialLabels & {
|
|
|
8
8
|
};
|
|
9
9
|
export type ShareCredentialV2GroupProps = {
|
|
10
10
|
labels: ShareCredentialGroupLabels;
|
|
11
|
+
language: string;
|
|
11
12
|
lastGroup: boolean;
|
|
12
13
|
onGroupSelect?: (selected: boolean) => void;
|
|
13
14
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -9,6 +9,7 @@ export type ShareCredentialV2Props = {
|
|
|
9
9
|
grouped?: boolean;
|
|
10
10
|
headerAccessory?: React.ComponentType<any> | React.ReactElement;
|
|
11
11
|
labels: ShareCredentialLabels;
|
|
12
|
+
language: string;
|
|
12
13
|
lastItem?: boolean;
|
|
13
14
|
onHeaderPress?: (_credentialId?: string) => void;
|
|
14
15
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, FC, ReactElement } from 'react';
|
|
2
2
|
import { ColorValue, ImageSourcePropType } from 'react-native';
|
|
3
|
-
import { CredentialDetails, CredentialDetailsProps,
|
|
3
|
+
import { CredentialDetails, CredentialDetailsProps, TrustInfoProps } from '../../components';
|
|
4
4
|
import { CardLabels } from '../../utils';
|
|
5
5
|
import { CredentialDetailsCardListItemProps, CredentialHeaderProps } from '../credential';
|
|
6
6
|
export type HistoryDetailsLabels = {
|
|
@@ -31,7 +31,7 @@ export type HistoryDetailsViewProps = {
|
|
|
31
31
|
};
|
|
32
32
|
data: {
|
|
33
33
|
header?: {
|
|
34
|
-
entity:
|
|
34
|
+
entity: TrustInfoProps;
|
|
35
35
|
} | {
|
|
36
36
|
credentialHeader: CredentialHeaderProps;
|
|
37
37
|
};
|
|
@@ -2,7 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { SvgProps } from 'react-native-svg';
|
|
3
3
|
export declare const CredentialErrorIcon: FC<SvgProps>;
|
|
4
4
|
export declare const CredentialWarningIcon: FC<SvgProps>;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const CredentialNoticeInfoIcon: FC<SvgProps>;
|
|
6
6
|
export declare const CredentialNoticeWarningIcon: FC<SvgProps>;
|
|
7
7
|
export declare const UpIcon: FC<SvgProps>;
|
|
8
8
|
export declare const DownIcon: FC<SvgProps>;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { IdentifierListItem, TrustInformationDetail } from '@procivis/react-native-one-core';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
3
|
import { TrustInfoLabels } from '../../components';
|
|
4
|
-
import { ContextRole } from '../../components/entity/entity-details-with-buttons';
|
|
5
4
|
import SectionEntityCluster from '../entity/entity-cluster';
|
|
6
5
|
import { NerdModeItemProps } from '../nerd-view/nerd-mode-item';
|
|
7
|
-
export interface EntityLabels {
|
|
8
|
-
trusted: string;
|
|
9
|
-
unknownIssuer: string;
|
|
10
|
-
unknownVerifier: string;
|
|
11
|
-
visitWebsite: string;
|
|
12
|
-
termsAndServices: string;
|
|
13
|
-
privacyPolicy: string;
|
|
14
|
-
}
|
|
15
6
|
export interface AttributesLabels {
|
|
16
7
|
trustRegistry: string;
|
|
17
8
|
issuerIdentifier: string;
|
|
@@ -23,9 +14,6 @@ export interface AttributesLabels {
|
|
|
23
14
|
interface SectionEntityCluster {
|
|
24
15
|
identifier?: IdentifierListItem;
|
|
25
16
|
subline?: string;
|
|
26
|
-
entityLabels: EntityLabels;
|
|
27
|
-
legacyTrustManagementEnabled: boolean;
|
|
28
|
-
role: ContextRole;
|
|
29
17
|
testID?: string;
|
|
30
18
|
trustInfoLabels: TrustInfoLabels;
|
|
31
19
|
trustInformation?: TrustInformationDetail;
|
|
@@ -2,4 +2,3 @@ import { ConfigEntities, CoreConfig } from '@procivis/react-native-one-core';
|
|
|
2
2
|
export declare const useCoreConfig: () => import("react-query").UseQueryResult<CoreConfig, unknown>;
|
|
3
3
|
export declare const getEnabledTransports: (config: CoreConfig) => string[];
|
|
4
4
|
export declare const getEnabledExchangeProtocols: (exchangeProtocol: ConfigEntities<any>) => string[];
|
|
5
|
-
export declare const getEnabledTrustManagement: (config: CoreConfig) => string[];
|
|
@@ -8,7 +8,6 @@ interface ContextValue {
|
|
|
8
8
|
export type ONECoreContextProviderProps = {
|
|
9
9
|
config?: Record<string, unknown>;
|
|
10
10
|
organisationId?: string;
|
|
11
|
-
publisherReference?: string;
|
|
12
11
|
};
|
|
13
12
|
export declare const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProviderProps>>;
|
|
14
13
|
export declare const useONECore: () => ContextValue;
|
|
@@ -7,10 +7,11 @@ 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<
|
|
10
|
+
export declare const useCredentialAccept: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderAcceptCredentialResponse, 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>;
|
|
14
|
+
export declare const useCredentialRefresh: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRefreshCredentialResponse, unknown, string, unknown>;
|
|
14
15
|
export declare const useInvalidateCredentialDetails: () => (credentialId: string | undefined) => Promise<void>;
|
|
15
16
|
export declare const useInitiateIssuance: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").InitiateIssuanceResponse, unknown, Omit<InitiateIssuanceRequest, "organisationId">, unknown>;
|
|
16
17
|
export declare const useContinueIssuance: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").ContinueIssuanceResponse, unknown, string, unknown>;
|
|
@@ -11,7 +11,6 @@ export * from './identifiers';
|
|
|
11
11
|
export * from './proof-schemas';
|
|
12
12
|
export * from './proofs';
|
|
13
13
|
export * from './query';
|
|
14
|
-
export * from './trust-entity';
|
|
15
14
|
export * from './trust-list';
|
|
16
15
|
export * from './verifier-instance';
|
|
17
16
|
export * from './wallet-unit';
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const useTrustCollectionSync: () => import("react-query").UseMutationResult<string, unknown,
|
|
2
|
-
holderWalletUnitId?: string | undefined;
|
|
3
|
-
verifierInstanceId?: string | undefined;
|
|
4
|
-
}, unknown>;
|
|
1
|
+
export declare const useTrustCollectionSync: () => import("react-query").UseMutationResult<string, unknown, void, unknown>;
|
|
5
2
|
export declare const useTrustListSubscriptionUpdate: () => import("react-query").UseMutationResult<string, unknown, void, unknown>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { RegisterVerifierInstanceRequest, UpdateVerifierInstanceRequest } from '@procivis/react-native-one-core';
|
|
2
|
+
export declare const VERIFIER_INSTANCE_QUERY_KEY = "verifier-instance";
|
|
2
3
|
export declare const VERIFIER_INSTANCE_TRUST_COLLECTIONS_QUERY_KEY = "verifier-instance-trust-collections";
|
|
4
|
+
export declare const useVerifierInstance: (active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").VerifierInstanceDetail | undefined, unknown>;
|
|
3
5
|
export declare const useVerifierInstanceTrustCollections: (verifierInstanceId: string | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustCollections | undefined, unknown>;
|
|
4
6
|
export declare const useRegisterVerifierInstance: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").RegisterVerifierInstanceResponse, unknown, Omit<RegisterVerifierInstanceRequest, "organisationId">, unknown>;
|
|
5
7
|
export declare const useVerifierInstanceUpdate: () => import("react-query").UseMutationResult<void, unknown, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HolderWalletUnit, HolderWalletUnitUpdateRequest
|
|
1
|
+
import { HolderRegisterWalletUnitRequest, HolderWalletUnit, HolderWalletUnitUpdateRequest } from '@procivis/react-native-one-core';
|
|
2
2
|
export declare const WALLET_UNIT_QUERY_KEY = "wallet-unit";
|
|
3
3
|
export declare const WALLET_UNIT_TRUST_COLLECTIONS_QUERY_KEY = "wallet-unit-trust-collections";
|
|
4
4
|
export declare const useWalletUnitDetail: (walletUnitId: HolderWalletUnit['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<HolderWalletUnit | undefined, unknown>;
|
|
5
5
|
export declare const useWalletUnitTrustCollections: (walletUnitId: HolderWalletUnit['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").TrustCollections | undefined, unknown>;
|
|
6
|
-
export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRegisterWalletUnitResponse, unknown,
|
|
6
|
+
export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRegisterWalletUnitResponse, unknown, Omit<HolderRegisterWalletUnitRequest, "organisationId" | "keyType">, unknown>;
|
|
7
7
|
export declare const useWalletUnitStatus: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
|
|
8
8
|
export declare const useWalletUnitUpdate: () => import("react-query").UseMutationResult<void, unknown, {
|
|
9
9
|
walletUnitId: HolderWalletUnit['id'];
|
|
@@ -2,9 +2,9 @@ import { CoreConfig, CredentialQueryFailureHint, PresentationDefinitionV2Claim,
|
|
|
2
2
|
import { CredentialAttribute, CredentialCardNotice, CredentialCardProps } from '../../ui-components';
|
|
3
3
|
import { CredentialDetailsCardPropsWithoutWidth } from '.';
|
|
4
4
|
import { ShareCredentialCardLabels } from './credential-sharing';
|
|
5
|
-
export declare const shareCredentialCardAttributeFromV2Claim: (claim: PresentationDefinitionV2Claim, selection: string[] | undefined, parentShared: boolean, parentUserSelected: boolean, config: CoreConfig, testID: string, nested?: boolean, listValue?: boolean) => CredentialAttribute;
|
|
5
|
+
export declare const shareCredentialCardAttributeFromV2Claim: (claim: PresentationDefinitionV2Claim, selection: string[] | undefined, parentShared: boolean, parentUserSelected: boolean, config: CoreConfig, testID: string, language: string | undefined, nested?: boolean, listValue?: boolean) => CredentialAttribute;
|
|
6
6
|
export declare const missingCredentialCardFromFailureHint: (failureHint: CredentialQueryFailureHint | undefined, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
|
|
7
|
-
export declare const shareCredentialCardFromV2PresentationCredential: (credential: PresentationDefinitionV2Credential | undefined, failureHint: CredentialQueryFailureHint | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
|
|
8
|
-
export declare const selectCredentialCardFromV2Credential: (credential: PresentationDefinitionV2Credential, selected: boolean, multiple: boolean, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
|
|
7
|
+
export declare const shareCredentialCardFromV2PresentationCredential: (credential: PresentationDefinitionV2Credential | undefined, failureHint: CredentialQueryFailureHint | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, purpose: string | undefined, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
|
|
8
|
+
export declare const selectCredentialCardFromV2Credential: (credential: PresentationDefinitionV2Credential, selected: boolean, multiple: boolean, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
|
|
9
9
|
export declare const getV2CredentialClaimAllSubpaths: (claim: PresentationDefinitionV2Claim) => string[];
|
|
10
10
|
export declare const getV2CredentialAvailablePaths: (credential: PresentationDefinitionV2Credential) => string[];
|
|
@@ -2,19 +2,19 @@ import { Claim, CoreConfig, CredentialDetail, PresentationDefinitionField, Prese
|
|
|
2
2
|
import { CredentialAttribute, CredentialCardProps } from '../../ui-components/credential';
|
|
3
3
|
import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
|
|
4
4
|
import { CardLabels, CredentialDetailsCardPropsWithoutWidth } from './credential';
|
|
5
|
-
export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, expanded: boolean, multipleCredentialsAvailable: boolean, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
|
|
5
|
+
export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, expanded: boolean, selectiveDisclosureSupported: boolean | undefined, multipleCredentialsAvailable: boolean, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
|
|
6
6
|
export declare const missingCredentialCardFromRequest: (request: PresentationDefinitionRequestedCredential, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
|
|
7
7
|
type FlatClaim = Claim & {
|
|
8
8
|
isArrayElement?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const shareCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
|
|
10
|
+
export declare const shareCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
|
|
11
11
|
export type ShareCredentialCardLabels = CardLabels & {
|
|
12
|
-
|
|
12
|
+
selectiveDisclosure: string;
|
|
13
13
|
missingAttribute: string;
|
|
14
14
|
missingCredential: string;
|
|
15
15
|
multipleCredentials: string;
|
|
16
16
|
};
|
|
17
|
-
export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
|
|
18
|
-
export declare const selectCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
|
|
19
|
-
export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
|
|
17
|
+
export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
|
|
18
|
+
export declare const selectCredentialCardAttributeFromClaim: (id: string, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
|
|
19
|
+
export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: CoreConfig, testID: string, labels: ShareCredentialCardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
|
|
20
20
|
export {};
|
|
@@ -16,16 +16,16 @@ export type CardHeaderLabels = {
|
|
|
16
16
|
suspended: string;
|
|
17
17
|
suspendedUntil: (date: string) => string;
|
|
18
18
|
};
|
|
19
|
-
export declare const cardHeaderFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, testID: string, labels: CardHeaderLabels) => Omit<CredentialHeaderProps, 'style'>;
|
|
19
|
+
export declare const cardHeaderFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, testID: string, labels: CardHeaderLabels, language: string | undefined) => Omit<CredentialHeaderProps, 'style'>;
|
|
20
20
|
export type CardLabels = CardHeaderLabels & {
|
|
21
21
|
validityIssuesNotice: string;
|
|
22
22
|
};
|
|
23
|
-
export declare const getCredentialCardPropsFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: CardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
|
|
24
|
-
export declare const detailsCardAttributeFromClaim: (claim: Claim, config: CoreConfig, testID: string) => CredentialAttribute;
|
|
23
|
+
export declare const getCredentialCardPropsFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: CoreConfig, notice: CredentialCardNotice | undefined, testID: string, labels: CardLabels, language: string | undefined) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
|
|
24
|
+
export declare const detailsCardAttributeFromClaim: (claim: Claim, config: CoreConfig, testID: string, language: string | undefined) => CredentialAttribute;
|
|
25
25
|
export type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {
|
|
26
26
|
card: Omit<CredentialCardProps, 'width'>;
|
|
27
27
|
};
|
|
28
|
-
export declare const detailsCardFromCredential: (credential: CredentialDetail, config: CoreConfig, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
|
|
29
|
-
export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: CoreConfig, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
|
|
28
|
+
export declare const detailsCardFromCredential: (credential: CredentialDetail, config: CoreConfig, testID: string, labels: CardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
|
|
29
|
+
export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: CoreConfig, testID: string, labels: CardLabels, language: string | undefined) => CredentialDetailsCardPropsWithoutWidth;
|
|
30
30
|
export declare const nestAttributes: (attributes: CredentialAttribute[]) => CredentialAttribute[];
|
|
31
31
|
export declare function getCredentialSchemaWithoutImages<T extends CredentialSchemaListItem>(credentialSchema: T): T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CredentialListQuery, CredentialSchemaListQuery, DidListQuery, HistoryListQuery, IdentifierListQuery, ProofListQuery, ProofSchemaListQuery } from '@procivis/react-native-one-core';
|
|
2
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)[];
|
|
3
3
|
export declare const getQueryKeyFromHistoryListQueryParams: (queryParams?: Partial<HistoryListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").HistorySearch | import("@procivis/react-native-one-core").HistoryEntityType[] | import("@procivis/react-native-one-core").HistoryAction[] | undefined)[];
|
|
4
|
-
export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
|
|
4
|
+
export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQuery>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
|
|
5
5
|
export declare const getQueryKeyFromProofSchemaListQueryParams: (queryParams?: Partial<ProofSchemaListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofSchemaListQueryExactColumn[] | undefined)[];
|
|
6
6
|
export declare const getQueryKeyFromProofListQueryParams: (queryParams?: Partial<ProofListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofListQueryExactColumn[] | import("@procivis/react-native-one-core").ProofState[] | import("@procivis/react-native-one-core").ProofRole[] | undefined)[];
|
|
7
7
|
export declare const getQueryKeyFromDidListQueryParams: (queryParams?: Partial<DidListQuery>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").DidListQueryExactColumn[] | import("@procivis/react-native-one-core").KeyRole[] | undefined)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTranslatedLabel: (translations: Record<string, string> | undefined, language: string | undefined, defaultLanguage: string) => string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procivis/one-react-native-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.130",
|
|
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.
|
|
56
|
+
"@procivis/react-native-one-core": "1.106597.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.
|
|
145
|
+
"@procivis/react-native-one-core": "^1.106597.0",
|
|
146
146
|
"@procivis/react-native-picker": "*",
|
|
147
147
|
"@react-native-community/blur": "*",
|
|
148
148
|
"@react-native-community/netinfo": "^11.4.1",
|
|
@@ -14,6 +14,7 @@ export interface CredentialDetailsProps {
|
|
|
14
14
|
expanded?: boolean;
|
|
15
15
|
headerAccessory?: CredentialHeaderProps['accessory'];
|
|
16
16
|
labels: CardLabels;
|
|
17
|
+
language?: string;
|
|
17
18
|
lastItem?: boolean;
|
|
18
19
|
onHeaderPress?: (credentialId?: string) => void;
|
|
19
20
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -24,6 +25,7 @@ export const CredentialDetails: FC<CredentialDetailsProps> = ({
|
|
|
24
25
|
credentialId,
|
|
25
26
|
expanded = false,
|
|
26
27
|
labels,
|
|
28
|
+
language,
|
|
27
29
|
lastItem,
|
|
28
30
|
onHeaderPress,
|
|
29
31
|
onImagePreview,
|
|
@@ -44,6 +46,7 @@ export const CredentialDetails: FC<CredentialDetailsProps> = ({
|
|
|
44
46
|
config,
|
|
45
47
|
testID,
|
|
46
48
|
labels,
|
|
49
|
+
language,
|
|
47
50
|
);
|
|
48
51
|
if (headerAccessory) {
|
|
49
52
|
card.header.accessory = headerAccessory;
|
|
@@ -61,6 +61,7 @@ const defaultIcons: {
|
|
|
61
61
|
WRP_AC_RECEIVED: HistoryStatusAcceptedIcon,
|
|
62
62
|
WRP_RC_RECEIVED: HistoryStatusAcceptedIcon,
|
|
63
63
|
WRP_NR_RECEIVED: HistoryStatusAcceptedIcon,
|
|
64
|
+
TRUST_RESOLVED: HistoryStatusAcceptedIcon,
|
|
64
65
|
},
|
|
65
66
|
entityTypes: {
|
|
66
67
|
BACKUP: HistoryRevokeIcon,
|
|
@@ -73,8 +74,6 @@ const defaultIcons: {
|
|
|
73
74
|
ORGANISATION: HistoryOrganisationIcon,
|
|
74
75
|
PROOF: HistoryProofRequestIcon,
|
|
75
76
|
PROOF_SCHEMA: HistorySchemaIcon,
|
|
76
|
-
TRUST_ANCHOR: HistoryTrustAnchorIcon,
|
|
77
|
-
TRUST_ENTITY: HistoryTrustedEntityIcon,
|
|
78
77
|
WALLET_UNIT: HistoryTrustedEntityIcon,
|
|
79
78
|
WALLET_RELYING_PARTY: HistoryTrustedEntityIcon,
|
|
80
79
|
USER: HistoryIdentifierIcon,
|