@procivis/one-react-native-components 0.3.115 → 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 +3 -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 +11 -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/components/trust-info/index.js +29 -0
- package/lib/commonjs/components/trust-info/index.js.map +1 -0
- package/lib/commonjs/components/trust-info/trust-info.js +79 -0
- package/lib/commonjs/components/trust-info/trust-info.js.map +1 -0
- 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 +2 -0
- 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 +45 -0
- package/lib/commonjs/ui-components/icons/contact.js.map +1 -0
- 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/icons/index.js +11 -0
- package/lib/commonjs/ui-components/icons/index.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/index.js +7 -0
- package/lib/commonjs/ui-components/screens/index.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +28 -24
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/trust-info-details-screen.js +384 -0
- package/lib/commonjs/ui-components/screens/trust-info-details-screen.js.map +1 -0
- 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 +8 -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 +40 -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/proofs.js +12 -1
- package/lib/commonjs/utils/hooks/core/proofs.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 +3 -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 +1 -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/components/trust-info/index.js +4 -0
- package/lib/module/components/trust-info/index.js.map +1 -0
- package/lib/module/components/trust-info/trust-info.js +70 -0
- package/lib/module/components/trust-info/trust-info.js.map +1 -0
- 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 +2 -0
- 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 +34 -0
- package/lib/module/ui-components/icons/contact.js.map +1 -0
- 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/icons/index.js +1 -0
- package/lib/module/ui-components/icons/index.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/index.js +2 -0
- package/lib/module/ui-components/screens/index.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -25
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/trust-info-details-screen.js +375 -0
- package/lib/module/ui-components/screens/trust-info-details-screen.js.map +1 -0
- 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 +8 -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 +37 -1
- 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/proofs.js +10 -0
- package/lib/module/utils/hooks/core/proofs.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 +1 -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/components/trust-info/index.d.ts +3 -0
- package/lib/typescript/components/trust-info/trust-info.d.ts +19 -0
- package/lib/typescript/ui-components/header/header.d.ts +2 -0
- package/lib/typescript/ui-components/history/history-details.d.ts +2 -2
- package/lib/typescript/ui-components/icons/contact.d.ts +4 -0
- 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/icons/index.d.ts +1 -0
- package/lib/typescript/ui-components/screens/index.d.ts +3 -0
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +5 -12
- package/lib/typescript/ui-components/screens/trust-info-details-screen.d.ts +32 -0
- 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 +5 -1
- package/lib/typescript/utils/hooks/core/index.d.ts +0 -1
- package/lib/typescript/utils/hooks/core/proofs.d.ts +2 -0
- 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 +8 -8
- package/src/components/credential/credential.tsx +3 -0
- package/src/components/history/history-list-item-icon.tsx +2 -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 +1 -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/components/trust-info/index.ts +4 -0
- package/src/components/trust-info/trust-info.tsx +90 -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 +18 -3
- package/src/ui-components/history/history-details.tsx +4 -4
- package/src/ui-components/icons/contact.tsx +26 -0
- package/src/ui-components/icons/credential.tsx +1 -1
- package/src/ui-components/icons/icons.tsx +18 -0
- package/src/ui-components/icons/index.ts +1 -0
- package/src/ui-components/loader/loading-result.tsx +7 -1
- package/src/ui-components/screens/index.ts +3 -0
- package/src/ui-components/screens/nerd-mode-screen.tsx +49 -41
- package/src/ui-components/screens/trust-info-details-screen.tsx +472 -0
- package/src/utils/date.ts +7 -14
- package/src/utils/hooks/core/cache.ts +12 -4
- 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 +43 -1
- package/src/utils/hooks/core/index.ts +0 -1
- package/src/utils/hooks/core/proofs.ts +14 -0
- 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
|
@@ -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",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@types/react": "^18.2.6",
|
|
94
94
|
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
|
95
95
|
"@typescript-eslint/parser": "^5.17.0",
|
|
96
|
-
"apisauce": "3.2.
|
|
96
|
+
"apisauce": "3.2.2",
|
|
97
97
|
"babel-jest": "^29.6.3",
|
|
98
98
|
"babel-loader": "^8.2.4",
|
|
99
99
|
"babel-plugin-react-native-web": "^0.19.13",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
108
108
|
"husky": "^6.0.0",
|
|
109
109
|
"jest": "^29.6.3",
|
|
110
|
-
"lodash": "^4.
|
|
110
|
+
"lodash": "^4.18.0",
|
|
111
111
|
"lottie-react-native": "^7.2.2",
|
|
112
112
|
"metro-react-native-babel-preset": "0.73.10",
|
|
113
113
|
"moment": "^2.29.4",
|
|
@@ -139,18 +139,18 @@
|
|
|
139
139
|
"storybook": "^8.6.7",
|
|
140
140
|
"timeago.js": "^4.0.2",
|
|
141
141
|
"typescript": "5.0.4",
|
|
142
|
-
"vite": "^6.
|
|
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",
|
|
149
149
|
"@react-native/normalize-color": "*",
|
|
150
150
|
"@react-navigation/native": "*",
|
|
151
151
|
"@sentry/react-native": "^5.24.1",
|
|
152
|
-
"apisauce": "3.2.
|
|
153
|
-
"lodash": "^4.
|
|
152
|
+
"apisauce": "3.2.2",
|
|
153
|
+
"lodash": "^4.18.0",
|
|
154
154
|
"lottie-react-native": "^7.2.2",
|
|
155
155
|
"moment": "^2.29.4",
|
|
156
156
|
"parse-url": "^9.2.0",
|
|
@@ -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;
|
|
@@ -60,6 +60,8 @@ const defaultIcons: {
|
|
|
60
60
|
DELIVERED: HistoryStatusAcceptedIcon,
|
|
61
61
|
WRP_AC_RECEIVED: HistoryStatusAcceptedIcon,
|
|
62
62
|
WRP_RC_RECEIVED: HistoryStatusAcceptedIcon,
|
|
63
|
+
WRP_NR_RECEIVED: HistoryStatusAcceptedIcon,
|
|
64
|
+
TRUST_RESOLVED: HistoryStatusAcceptedIcon,
|
|
63
65
|
},
|
|
64
66
|
entityTypes: {
|
|
65
67
|
BACKUP: HistoryRevokeIcon,
|
|
@@ -72,8 +74,6 @@ const defaultIcons: {
|
|
|
72
74
|
ORGANISATION: HistoryOrganisationIcon,
|
|
73
75
|
PROOF: HistoryProofRequestIcon,
|
|
74
76
|
PROOF_SCHEMA: HistorySchemaIcon,
|
|
75
|
-
TRUST_ANCHOR: HistoryTrustAnchorIcon,
|
|
76
|
-
TRUST_ENTITY: HistoryTrustedEntityIcon,
|
|
77
77
|
WALLET_UNIT: HistoryTrustedEntityIcon,
|
|
78
78
|
WALLET_RELYING_PARTY: HistoryTrustedEntityIcon,
|
|
79
79
|
USER: HistoryIdentifierIcon,
|
|
@@ -2,7 +2,7 @@ import { HistoryAction, HistoryEntityType, HistoryListItem } from '@procivis/rea
|
|
|
2
2
|
import React, { FC, useCallback, useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
import { HistoryItemView } from '../../ui-components';
|
|
5
|
-
import { formatTime
|
|
5
|
+
import { formatTime } from '../../utils';
|
|
6
6
|
import { HistoryListItemIcon } from './history-list-item-icon';
|
|
7
7
|
|
|
8
8
|
export type HistoryListItemLabels = {
|
|
@@ -13,7 +13,7 @@ export type HistoryListItemLabels = {
|
|
|
13
13
|
export interface HistoryListItemViewProps {
|
|
14
14
|
dateFormatter?: (date: Date) => string;
|
|
15
15
|
first?: boolean;
|
|
16
|
-
infoLabelMode?: '
|
|
16
|
+
infoLabelMode?: 'associatedLabel' | 'none';
|
|
17
17
|
item: HistoryListItem;
|
|
18
18
|
labels: HistoryListItemLabels;
|
|
19
19
|
last?: boolean;
|
|
@@ -24,28 +24,23 @@ export interface HistoryListItemViewProps {
|
|
|
24
24
|
export const HistoryListItemView: FC<HistoryListItemViewProps> = ({
|
|
25
25
|
dateFormatter = formatTime,
|
|
26
26
|
first,
|
|
27
|
-
infoLabelMode = '
|
|
27
|
+
infoLabelMode = 'associatedLabel',
|
|
28
28
|
item,
|
|
29
29
|
labels,
|
|
30
30
|
last,
|
|
31
31
|
onPress,
|
|
32
32
|
testID,
|
|
33
33
|
}) => {
|
|
34
|
-
const identifierId = infoLabelMode === 'entity' ? item.target : undefined;
|
|
35
|
-
const { data: trustEntity } = useTrustEntity(identifierId);
|
|
36
|
-
|
|
37
34
|
const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;
|
|
38
35
|
|
|
39
36
|
const info = useMemo(() => {
|
|
40
37
|
switch (infoLabelMode) {
|
|
41
|
-
case 'entity':
|
|
42
|
-
return trustEntity?.name;
|
|
43
38
|
case 'associatedLabel':
|
|
44
39
|
return item.name;
|
|
45
40
|
case 'none':
|
|
46
41
|
return undefined;
|
|
47
42
|
}
|
|
48
|
-
}, [infoLabelMode, item
|
|
43
|
+
}, [infoLabelMode, item]);
|
|
49
44
|
|
|
50
45
|
const icon = <HistoryListItemIcon item={item} />;
|
|
51
46
|
|
|
@@ -38,7 +38,7 @@ export type HistoryListScreenProps = {
|
|
|
38
38
|
export const HistoryListScreen: FC<PropsWithChildren<HistoryListScreenProps>> = ({
|
|
39
39
|
children,
|
|
40
40
|
groupItems = groupEntriesByDay,
|
|
41
|
-
itemInfoLabelMode = '
|
|
41
|
+
itemInfoLabelMode = 'associatedLabel',
|
|
42
42
|
labels,
|
|
43
43
|
onBackPressed,
|
|
44
44
|
onHistoryItemPressed,
|
package/src/components/index.ts
CHANGED
|
@@ -13,13 +13,14 @@ import {
|
|
|
13
13
|
export const SelectCredential: FC<{
|
|
14
14
|
credentialId: string;
|
|
15
15
|
labels: ShareCredentialCardLabels;
|
|
16
|
+
language?: string;
|
|
16
17
|
lastItem: boolean;
|
|
17
18
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
18
19
|
onPress?: () => void;
|
|
19
20
|
request: PresentationDefinitionRequestedCredential;
|
|
20
21
|
selected: boolean;
|
|
21
22
|
testID: string;
|
|
22
|
-
}> = ({ credentialId, labels, lastItem, onImagePreview, onPress, request, selected, testID }) => {
|
|
23
|
+
}> = ({ credentialId, labels, language, lastItem, onImagePreview, onPress, request, selected, testID }) => {
|
|
23
24
|
const { data: credential } = useCredentialDetail(credentialId);
|
|
24
25
|
const { data: config } = useCoreConfig();
|
|
25
26
|
const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
|
|
@@ -35,6 +36,7 @@ export const SelectCredential: FC<{
|
|
|
35
36
|
config,
|
|
36
37
|
testID,
|
|
37
38
|
labels,
|
|
39
|
+
language,
|
|
38
40
|
);
|
|
39
41
|
|
|
40
42
|
return (
|
|
@@ -31,6 +31,7 @@ export const ShareCredential: FunctionComponent<{
|
|
|
31
31
|
allCredentials: CredentialDetail[];
|
|
32
32
|
expanded?: boolean;
|
|
33
33
|
labels: ShareCredentialLabels;
|
|
34
|
+
language?: string;
|
|
34
35
|
lastItem?: boolean;
|
|
35
36
|
onHeaderPress?: (_credentialId?: string) => void;
|
|
36
37
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -45,6 +46,7 @@ export const ShareCredential: FunctionComponent<{
|
|
|
45
46
|
allCredentials,
|
|
46
47
|
expanded,
|
|
47
48
|
labels,
|
|
49
|
+
language,
|
|
48
50
|
lastItem,
|
|
49
51
|
onHeaderPress,
|
|
50
52
|
onImagePreview,
|
|
@@ -125,6 +127,7 @@ export const ShareCredential: FunctionComponent<{
|
|
|
125
127
|
config,
|
|
126
128
|
testID,
|
|
127
129
|
labels,
|
|
130
|
+
language,
|
|
128
131
|
);
|
|
129
132
|
|
|
130
133
|
return (
|
|
@@ -9,13 +9,14 @@ import { selectCredentialCardFromV2Credential } from '../../../utils/parsers/cre
|
|
|
9
9
|
export const SelectCredentialV2: FC<{
|
|
10
10
|
credential: PresentationDefinitionV2Credential;
|
|
11
11
|
labels: ShareCredentialCardLabels;
|
|
12
|
+
language?: string;
|
|
12
13
|
lastItem: boolean;
|
|
13
14
|
multiple: boolean;
|
|
14
15
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
15
16
|
onSelected?: (credentialId: CredentialListItem['id'], selected: boolean) => void;
|
|
16
17
|
selected: boolean;
|
|
17
18
|
testID: string;
|
|
18
|
-
}> = ({ credential, labels, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
|
|
19
|
+
}> = ({ credential, labels, language, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
|
|
19
20
|
const { data: config } = useCoreConfig();
|
|
20
21
|
const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
|
|
21
22
|
|
|
@@ -34,6 +35,7 @@ export const SelectCredentialV2: FC<{
|
|
|
34
35
|
config,
|
|
35
36
|
testID,
|
|
36
37
|
labels,
|
|
38
|
+
language,
|
|
37
39
|
);
|
|
38
40
|
|
|
39
41
|
return (
|
|
@@ -33,6 +33,7 @@ export type ShareCredentialGroupLabels = ShareCredentialLabels & {
|
|
|
33
33
|
|
|
34
34
|
export type ShareCredentialV2GroupProps = {
|
|
35
35
|
labels: ShareCredentialGroupLabels;
|
|
36
|
+
language: string;
|
|
36
37
|
lastGroup: boolean;
|
|
37
38
|
onGroupSelect?: (selected: boolean) => void;
|
|
38
39
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -83,6 +84,7 @@ const heightForNumberOfCards = (numberOfCards: number) => 60 * (numberOfCards +
|
|
|
83
84
|
|
|
84
85
|
export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
|
|
85
86
|
labels,
|
|
87
|
+
language,
|
|
86
88
|
lastGroup,
|
|
87
89
|
onGroupSelect,
|
|
88
90
|
onImagePreview,
|
|
@@ -165,6 +167,7 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
|
|
|
165
167
|
headerAccessory={headerAccessory}
|
|
166
168
|
key={credentialRequestId}
|
|
167
169
|
labels={labels}
|
|
170
|
+
language={language}
|
|
168
171
|
lastItem={lastItem}
|
|
169
172
|
onHeaderPress={singleCredentialGroup ? headerPressHandler : onNestedCardHeaderPress(cardId)}
|
|
170
173
|
onImagePreview={onImagePreview}
|
|
@@ -181,6 +184,7 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
|
|
|
181
184
|
}, [
|
|
182
185
|
expandedCredential,
|
|
183
186
|
labels,
|
|
187
|
+
language,
|
|
184
188
|
lastGroup,
|
|
185
189
|
headerPressHandler,
|
|
186
190
|
onImagePreview,
|
|
@@ -20,6 +20,7 @@ export type ShareCredentialV2Props = {
|
|
|
20
20
|
grouped?: boolean;
|
|
21
21
|
headerAccessory?: React.ComponentType<any> | React.ReactElement;
|
|
22
22
|
labels: ShareCredentialLabels;
|
|
23
|
+
language: string;
|
|
23
24
|
lastItem?: boolean;
|
|
24
25
|
onHeaderPress?: (_credentialId?: string) => void;
|
|
25
26
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
@@ -44,6 +45,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
|
|
|
44
45
|
grouped,
|
|
45
46
|
headerAccessory,
|
|
46
47
|
labels,
|
|
48
|
+
language,
|
|
47
49
|
lastItem,
|
|
48
50
|
onHeaderPress,
|
|
49
51
|
onImagePreview,
|
|
@@ -64,6 +66,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
|
|
|
64
66
|
() => Dimensions.get('window').width - 32 - (grouped ? GroupedShareCredentialV2Padding * 2 : 0),
|
|
65
67
|
[grouped],
|
|
66
68
|
);
|
|
69
|
+
const purpose = credentialQuery.type_ === 'APPLICABLE_CREDENTIALS' ? credentialQuery.purpose?.[language] : undefined;
|
|
67
70
|
|
|
68
71
|
const multipleCredentialsAvailable = Boolean(applicableCredentials?.length && applicableCredentials.length > 1);
|
|
69
72
|
|
|
@@ -152,10 +155,12 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
|
|
|
152
155
|
failureHint,
|
|
153
156
|
Boolean(expanded),
|
|
154
157
|
multipleCredentialsAvailable,
|
|
158
|
+
purpose,
|
|
155
159
|
selectedFields,
|
|
156
160
|
config,
|
|
157
161
|
testID,
|
|
158
162
|
labels,
|
|
163
|
+
language,
|
|
159
164
|
);
|
|
160
165
|
|
|
161
166
|
if (headerAccessory) {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { FC, useMemo } from 'react';
|
|
2
|
+
import { StyleProp, StyleSheet, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { AvatarProps, TouchableOpacity } from '../../ui-components';
|
|
5
|
+
import EntityCluster from '../../ui-components/entity/entity-cluster';
|
|
6
|
+
import { EntityNotTrustedIcon, EntityTrustedIcon, UpIcon } from '../../ui-components/icons';
|
|
7
|
+
import { concatTestID } from '../../utils';
|
|
8
|
+
|
|
9
|
+
export type TrustInfoLabels = {
|
|
10
|
+
unknown: string;
|
|
11
|
+
unknownSubline: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type TrustInfoProps = {
|
|
15
|
+
labels: TrustInfoLabels;
|
|
16
|
+
onPress?: () => void;
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
sublineColor?: string;
|
|
19
|
+
testID?: string;
|
|
20
|
+
textColor?: string;
|
|
21
|
+
trustInformation?: {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const TrustInfo: FC<TrustInfoProps> = ({
|
|
27
|
+
labels,
|
|
28
|
+
onPress,
|
|
29
|
+
style,
|
|
30
|
+
sublineColor,
|
|
31
|
+
testID,
|
|
32
|
+
textColor,
|
|
33
|
+
trustInformation,
|
|
34
|
+
}) => {
|
|
35
|
+
const avatarProps: AvatarProps | undefined = useMemo(() => {
|
|
36
|
+
const placeholderText = trustInformation?.name.substring(0, 1) ?? labels.unknown.substring(0, 1);
|
|
37
|
+
|
|
38
|
+
const statusIcon = trustInformation ? (
|
|
39
|
+
<EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />
|
|
40
|
+
) : (
|
|
41
|
+
<EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
placeholderText,
|
|
46
|
+
statusIcon,
|
|
47
|
+
};
|
|
48
|
+
}, [labels, testID, trustInformation]);
|
|
49
|
+
|
|
50
|
+
const trustEntityName = useMemo(() => trustInformation?.name ?? labels.unknown, [labels.unknown, trustInformation]);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<TouchableOpacity disabled={!onPress || !trustInformation} onPress={onPress} style={[styles.button, style]}>
|
|
54
|
+
<EntityCluster
|
|
55
|
+
avatar={avatarProps}
|
|
56
|
+
entityName={trustEntityName}
|
|
57
|
+
style={styles.cluster}
|
|
58
|
+
subline={trustInformation ? undefined : labels.unknownSubline}
|
|
59
|
+
sublineColor={sublineColor}
|
|
60
|
+
testID={testID}
|
|
61
|
+
textColor={textColor}
|
|
62
|
+
/>
|
|
63
|
+
{onPress && trustInformation && <UpIcon color={textColor} style={styles.chevron} />}
|
|
64
|
+
</TouchableOpacity>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
button: {
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
flexWrap: 'nowrap',
|
|
73
|
+
width: '100%',
|
|
74
|
+
},
|
|
75
|
+
chevron: {
|
|
76
|
+
marginLeft: 10,
|
|
77
|
+
marginRight: 18,
|
|
78
|
+
transform: [
|
|
79
|
+
{
|
|
80
|
+
rotate: '90deg',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
cluster: {
|
|
85
|
+
flex: 1,
|
|
86
|
+
flexShrink: 1,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export default TrustInfo;
|
|
@@ -48,6 +48,7 @@ const CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({
|
|
|
48
48
|
|
|
49
49
|
const cardHeight = Math.ceil(card.width / CredentialCardRatio);
|
|
50
50
|
const currentHeight = useSharedValue<number | undefined>(undefined);
|
|
51
|
+
const [animatedHeightSet, setAnimatedHeightSet] = useState(false);
|
|
51
52
|
|
|
52
53
|
const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];
|
|
53
54
|
const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);
|
|
@@ -76,6 +77,7 @@ const CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({
|
|
|
76
77
|
const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;
|
|
77
78
|
const fullHeight = previewAttributesHeight + additionalHeight;
|
|
78
79
|
|
|
80
|
+
setAnimatedHeightSet(true);
|
|
79
81
|
if (!animate) {
|
|
80
82
|
currentHeight.value = fullHeight;
|
|
81
83
|
return;
|
|
@@ -139,8 +141,7 @@ const CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({
|
|
|
139
141
|
|
|
140
142
|
const { header, ...cardProps } = card;
|
|
141
143
|
|
|
142
|
-
const renderExtraAttributes =
|
|
143
|
-
allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);
|
|
144
|
+
const renderExtraAttributes = allAttributesRendered || (previewAttributesHeight !== undefined && animatedHeightSet);
|
|
144
145
|
|
|
145
146
|
const ContainerComponent = animate ? Animated.View : View;
|
|
146
147
|
return (
|
|
@@ -53,13 +53,15 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
|
|
|
53
53
|
|
|
54
54
|
const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation
|
|
55
55
|
? {
|
|
56
|
-
transform: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
transform: [
|
|
57
|
+
{
|
|
58
|
+
translateY: scrollOffset.interpolate({
|
|
59
|
+
extrapolate: 'clamp',
|
|
60
|
+
inputRange: [0, headerHeight],
|
|
61
|
+
outputRange: [0, -headerHeight],
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
],
|
|
63
65
|
}
|
|
64
66
|
: undefined;
|
|
65
67
|
|
|
@@ -84,8 +86,7 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
|
|
|
84
86
|
<Animated.View
|
|
85
87
|
style={[styles.headerContainer, containerPaddingStyle, withNotice ? styles.noticeBorderRadius : undefined]}>
|
|
86
88
|
<Animated.View style={scrollHeaderAnimatedStyle}>
|
|
87
|
-
<View
|
|
88
|
-
style={[styles.blurFill, { top: -containerPaddingTop }]}>
|
|
89
|
+
<View style={[styles.blurFill, { top: -containerPaddingTop }]}>
|
|
89
90
|
<BlurView
|
|
90
91
|
blurStyle={'header'}
|
|
91
92
|
color={colorScheme.background}
|
|
@@ -2,11 +2,12 @@ import React, { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { Insets, StyleProp, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { concatTestID } from '../../utils';
|
|
5
|
-
import { BackButton } from '../buttons';
|
|
5
|
+
import { BackButton, BackButtonIcon } from '../buttons';
|
|
6
6
|
import { Typography } from '../text';
|
|
7
7
|
import { useAppColorScheme } from '../theme';
|
|
8
8
|
|
|
9
9
|
export interface HeaderProps extends ViewProps {
|
|
10
|
+
backIcon?: BackButtonIcon;
|
|
10
11
|
onBack?: () => void;
|
|
11
12
|
rightButtons?: ReactNode[];
|
|
12
13
|
style?: StyleProp<ViewStyle>;
|
|
@@ -22,14 +23,28 @@ const backButtonHitSlop: Insets = { top: 12, bottom: 12, left: 20, right: 20 };
|
|
|
22
23
|
* Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=425-18624
|
|
23
24
|
* states (Default + Dashboard)
|
|
24
25
|
*/
|
|
25
|
-
const Header: FC<HeaderProps> = ({
|
|
26
|
+
const Header: FC<HeaderProps> = ({
|
|
27
|
+
backIcon,
|
|
28
|
+
onBack,
|
|
29
|
+
rightButtons,
|
|
30
|
+
style,
|
|
31
|
+
titleRowStyle,
|
|
32
|
+
testID,
|
|
33
|
+
title,
|
|
34
|
+
...viewProps
|
|
35
|
+
}) => {
|
|
26
36
|
const colorScheme = useAppColorScheme();
|
|
27
37
|
|
|
28
38
|
return (
|
|
29
39
|
<View style={[styles.container, style]} testID={testID} {...viewProps}>
|
|
30
40
|
{onBack && (
|
|
31
41
|
<View style={styles.backButtonRow}>
|
|
32
|
-
<BackButton
|
|
42
|
+
<BackButton
|
|
43
|
+
hitSlop={backButtonHitSlop}
|
|
44
|
+
icon={backIcon}
|
|
45
|
+
onPress={onBack}
|
|
46
|
+
testID={concatTestID(testID, 'back')}
|
|
47
|
+
/>
|
|
33
48
|
<View />
|
|
34
49
|
{rightButtons}
|
|
35
50
|
</View>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentType, FC, ReactElement, useEffect, useMemo } from 'react';
|
|
2
2
|
import { ColorValue, Dimensions, ImageSourcePropType, StyleSheet, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { CredentialDetails, CredentialDetailsProps,
|
|
4
|
+
import { CredentialDetails, CredentialDetailsProps, TrustInfo, TrustInfoProps } from '../../components';
|
|
5
5
|
import { HeaderInfoButton } from '../../components/navigation/header-buttons';
|
|
6
6
|
import { CardLabels, concatTestID, useCredentialListExpandedCard } from '../../utils';
|
|
7
7
|
import { TouchableOpacity } from '../accessibility';
|
|
@@ -59,7 +59,7 @@ export type HistoryDetailsViewProps = {
|
|
|
59
59
|
data: {
|
|
60
60
|
header?:
|
|
61
61
|
| {
|
|
62
|
-
entity:
|
|
62
|
+
entity: TrustInfoProps;
|
|
63
63
|
}
|
|
64
64
|
| {
|
|
65
65
|
credentialHeader: CredentialHeaderProps;
|
|
@@ -141,9 +141,9 @@ export const HistoryDetailsView: FC<HistoryDetailsViewProps> = ({
|
|
|
141
141
|
testID={testID}>
|
|
142
142
|
<View style={[styles.section, { backgroundColor: colorScheme.white }]}>
|
|
143
143
|
{data.header && 'entity' in data.header && (
|
|
144
|
-
<
|
|
144
|
+
<TrustInfo
|
|
145
145
|
{...data.header.entity}
|
|
146
|
-
style={[styles.entity, {
|
|
146
|
+
style={[styles.entity, { borderBottomColor: colorScheme.background }, data.header.entity.style]}
|
|
147
147
|
/>
|
|
148
148
|
)}
|
|
149
149
|
{data.header && 'credentialHeader' in data.header && (
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import Svg, { Path, SvgProps } from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
export const MailIcon: FC<SvgProps> = ({ color, ...props }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg fill="none" height={12} viewBox="0 0 17 12" width={17} {...props}>
|
|
7
|
+
<Path
|
|
8
|
+
d="M8.244 6.651c-.223 0-.442-.093-.656-.28L.758.355C1.124.118 1.587 0 2.147 0H14.35c.56 0 1.02.118 1.38.355L8.9 6.371c-.21.187-.428.28-.656.28zM.178 10.678a2.155 2.155 0 01-.13-.438A3.038 3.038 0 010 9.666V2.119c0-.237.016-.44.048-.608.036-.169.075-.287.116-.356l5.072 4.471-5.058 5.052zm1.763 1.107c-.25 0-.474-.027-.67-.082a1.553 1.553 0 01-.478-.219l5.202-5.202.998.889c.2.173.406.305.615.396.21.087.422.13.636.13.214 0 .426-.043.636-.13.214-.09.421-.223.622-.396l.998-.889 5.202 5.202c-.127.091-.29.164-.485.22a2.42 2.42 0 01-.663.081H1.94zm14.376-1.107L11.26 5.626l5.072-4.47c.037.068.073.186.11.355.036.168.054.371.054.608v7.547c0 .219-.018.41-.055.574-.032.164-.073.31-.123.438z"
|
|
9
|
+
fill={color}
|
|
10
|
+
opacity={0.9}
|
|
11
|
+
/>
|
|
12
|
+
</Svg>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const PhoneIcon: FC<SvgProps> = ({ color, ...props }) => {
|
|
17
|
+
return (
|
|
18
|
+
<Svg fill="none" height={13} viewBox="0 0 13 13" width={13} {...props}>
|
|
19
|
+
<Path
|
|
20
|
+
d="M3.5 9.208c-.67-.665-1.27-1.36-1.798-2.085A11.126 11.126 0 01.458 4.956C.153 4.236 0 3.552 0 2.906c0-.43.073-.83.219-1.204.15-.374.367-.697.65-.97.2-.192.425-.36.676-.506C1.8.076 2.044 0 2.276 0a.69.69 0 01.486.198c.141.132.294.312.458.54l1.148 1.6c.128.182.217.346.267.492a1.3 1.3 0 01.075.424c0 .114-.016.22-.048.321-.032.1-.091.226-.178.376l-.642 1.1a20.5 20.5 0 01-.075.137.3.3 0 00-.028.124c0 .054.007.107.02.157.019.05.037.093.055.13.274.547.746 1.155 1.415 1.825.324.323.657.62.999.888.341.265.642.456.902.575.064.027.12.05.17.068a.732.732 0 00.302.007.93.93 0 00.157-.075l1.094-.602c.177-.096.319-.157.423-.184.11-.032.217-.048.322-.048.123 0 .241.023.355.068.119.041.283.135.492.28l1.668 1.197c.224.16.383.307.479.444.1.137.15.278.15.424 0 .187-.05.387-.15.601-.096.215-.27.463-.52.745a2.76 2.76 0 01-.964.69 3.086 3.086 0 01-1.257.254c-.648 0-1.333-.155-2.058-.465a11.295 11.295 0 01-2.188-1.265A17.799 17.799 0 013.5 9.208z"
|
|
21
|
+
fill={color}
|
|
22
|
+
opacity={0.9}
|
|
23
|
+
/>
|
|
24
|
+
</Svg>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -44,7 +44,7 @@ export const CredentialWarningIcon: FC<SvgProps> = ({ ...props }) => (
|
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
// https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=542-90920&m=dev
|
|
47
|
-
export const
|
|
47
|
+
export const CredentialNoticeInfoIcon: FC<SvgProps> = ({ ...props }) => {
|
|
48
48
|
const colorScheme = useAppColorScheme();
|
|
49
49
|
return (
|
|
50
50
|
<Svg width={24} height={24} viewBox="0 0 24 24" fill="none" {...props}>
|