@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
|
@@ -19,9 +19,15 @@ import {
|
|
|
19
19
|
CredentialHeaderProps,
|
|
20
20
|
} from '../../ui-components/credential';
|
|
21
21
|
import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
CredentialErrorIcon,
|
|
24
|
+
CredentialNoticeInfoIcon,
|
|
25
|
+
CredentialNoticeWarningIcon,
|
|
26
|
+
CredentialWarningIcon,
|
|
27
|
+
} from '../../ui-components/icons';
|
|
23
28
|
import { formatDateLocalized, formatDateTimeLocalized } from '../date';
|
|
24
29
|
import { concatTestID } from '../testID';
|
|
30
|
+
import { getTranslatedLabel } from '../translations';
|
|
25
31
|
import { getCarouselImagesFromClaims } from './credential-images';
|
|
26
32
|
|
|
27
33
|
export enum ValidityState {
|
|
@@ -68,8 +74,13 @@ export const findClaimByPath = (path: string | undefined, claims: Claim[]): Clai
|
|
|
68
74
|
return undefined;
|
|
69
75
|
};
|
|
70
76
|
|
|
71
|
-
const formatCredentialDetail = (
|
|
72
|
-
|
|
77
|
+
const formatCredentialDetail = (
|
|
78
|
+
claim: Claim,
|
|
79
|
+
config: CoreConfig,
|
|
80
|
+
testID: string,
|
|
81
|
+
language: string | undefined,
|
|
82
|
+
): string => {
|
|
83
|
+
const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID, language);
|
|
73
84
|
return attributeValue.value ?? '';
|
|
74
85
|
};
|
|
75
86
|
|
|
@@ -94,6 +105,7 @@ const credentialDetailFromCredential = (
|
|
|
94
105
|
config: CoreConfig,
|
|
95
106
|
testID: string,
|
|
96
107
|
labels: CardHeaderLabels,
|
|
108
|
+
language: string | undefined,
|
|
97
109
|
): {
|
|
98
110
|
credentialDetailPrimary?: string;
|
|
99
111
|
credentialDetailSecondary?: string;
|
|
@@ -136,13 +148,13 @@ const credentialDetailFromCredential = (
|
|
|
136
148
|
const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);
|
|
137
149
|
|
|
138
150
|
if (primary) {
|
|
139
|
-
credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));
|
|
151
|
+
credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'), language);
|
|
140
152
|
}
|
|
141
153
|
|
|
142
154
|
const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);
|
|
143
155
|
|
|
144
156
|
if (secondary) {
|
|
145
|
-
credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));
|
|
157
|
+
credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'), language);
|
|
146
158
|
}
|
|
147
159
|
|
|
148
160
|
return {
|
|
@@ -158,6 +170,7 @@ export const cardHeaderFromCredential = (
|
|
|
158
170
|
config: CoreConfig,
|
|
159
171
|
testID: string,
|
|
160
172
|
labels: CardHeaderLabels,
|
|
173
|
+
language: string | undefined,
|
|
161
174
|
): Omit<CredentialHeaderProps, 'style'> => {
|
|
162
175
|
const {
|
|
163
176
|
credentialDetailPrimary,
|
|
@@ -165,8 +178,9 @@ export const cardHeaderFromCredential = (
|
|
|
165
178
|
credentialDetailErrorColor,
|
|
166
179
|
credentialDetailTestID,
|
|
167
180
|
statusIcon,
|
|
168
|
-
} = credentialDetailFromCredential(credential, claims, config, testID, labels);
|
|
181
|
+
} = credentialDetailFromCredential(credential, claims, config, testID, labels, language);
|
|
169
182
|
const { layoutProperties } = credential.schema;
|
|
183
|
+
const defaultLanguage = config.defaultLanguage;
|
|
170
184
|
|
|
171
185
|
return {
|
|
172
186
|
color: layoutProperties?.logo?.backgroundColor,
|
|
@@ -174,7 +188,8 @@ export const cardHeaderFromCredential = (
|
|
|
174
188
|
credentialDetailPrimary,
|
|
175
189
|
credentialDetailSecondary,
|
|
176
190
|
credentialDetailTestID,
|
|
177
|
-
credentialName:
|
|
191
|
+
credentialName:
|
|
192
|
+
getTranslatedLabel(credential.schema.translations?.name, language, defaultLanguage) ?? credential.schema.name,
|
|
178
193
|
icon: layoutProperties?.logo?.image
|
|
179
194
|
? {
|
|
180
195
|
imageSource: {
|
|
@@ -199,14 +214,24 @@ export const getCredentialCardPropsFromCredential = (
|
|
|
199
214
|
notice: CredentialCardNotice | undefined,
|
|
200
215
|
testID: string,
|
|
201
216
|
labels: CardLabels,
|
|
217
|
+
language: string | undefined,
|
|
202
218
|
): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> => {
|
|
203
219
|
const { layoutProperties } = credential.schema;
|
|
220
|
+
const defaultLanguage = config.defaultLanguage;
|
|
204
221
|
|
|
205
222
|
if (hasMsoValidityIssues(credential)) {
|
|
206
223
|
notice = {
|
|
207
224
|
text: labels.validityIssuesNotice,
|
|
208
225
|
noticeIcon: CredentialNoticeWarningIcon,
|
|
209
226
|
};
|
|
227
|
+
} else if (!notice) {
|
|
228
|
+
let description = getTranslatedLabel(credential.schema.translations?.description, language, defaultLanguage);
|
|
229
|
+
if (description) {
|
|
230
|
+
notice = {
|
|
231
|
+
text: description,
|
|
232
|
+
noticeIcon: CredentialNoticeInfoIcon,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
210
235
|
}
|
|
211
236
|
|
|
212
237
|
const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> = {
|
|
@@ -215,7 +240,7 @@ export const getCredentialCardPropsFromCredential = (
|
|
|
215
240
|
? { imageSource: { uri: layoutProperties.background.image } }
|
|
216
241
|
: undefined,
|
|
217
242
|
color: layoutProperties?.background?.color,
|
|
218
|
-
header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),
|
|
243
|
+
header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels, language),
|
|
219
244
|
testID,
|
|
220
245
|
notice,
|
|
221
246
|
};
|
|
@@ -227,11 +252,13 @@ export const detailsCardAttributeFromClaim = (
|
|
|
227
252
|
claim: Claim,
|
|
228
253
|
config: CoreConfig,
|
|
229
254
|
testID: string,
|
|
255
|
+
language: string | undefined,
|
|
230
256
|
): CredentialAttribute => {
|
|
231
|
-
const value = detailsCardAttributeValueFromClaim(claim, config, testID);
|
|
257
|
+
const value = detailsCardAttributeValueFromClaim(claim, config, testID, language);
|
|
258
|
+
const defaultLanguage = config.defaultLanguage;
|
|
232
259
|
return {
|
|
233
260
|
id: claim.path,
|
|
234
|
-
name: claim.path.split('/').pop(),
|
|
261
|
+
name: getTranslatedLabel(claim.schema.translations.name, language, defaultLanguage) ?? claim.path.split('/').pop(),
|
|
235
262
|
path: claim.path,
|
|
236
263
|
...value,
|
|
237
264
|
};
|
|
@@ -241,13 +268,14 @@ const detailsCardAttributeValueFromClaim = (
|
|
|
241
268
|
claim: Claim,
|
|
242
269
|
config: CoreConfig,
|
|
243
270
|
testID: string,
|
|
271
|
+
language: string | undefined,
|
|
244
272
|
): CredentialAttributeValue => {
|
|
245
273
|
const typeConfig = config?.datatype[claim.schema.datatype];
|
|
246
274
|
|
|
247
275
|
if (claim.schema.array) {
|
|
248
276
|
return {
|
|
249
277
|
values: ((claim.value.value as Claim[]) || []).map((arrayValue, index) => {
|
|
250
|
-
return detailsCardAttributeFromClaim(arrayValue, config, concatTestID(testID, index.toString()));
|
|
278
|
+
return detailsCardAttributeFromClaim(arrayValue, config, concatTestID(testID, index.toString()), language);
|
|
251
279
|
}),
|
|
252
280
|
};
|
|
253
281
|
} else {
|
|
@@ -258,7 +286,7 @@ const detailsCardAttributeValueFromClaim = (
|
|
|
258
286
|
}
|
|
259
287
|
return {
|
|
260
288
|
attributes: claim.value.value.map((nestedClaim, index) =>
|
|
261
|
-
detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),
|
|
289
|
+
detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString()), language),
|
|
262
290
|
),
|
|
263
291
|
};
|
|
264
292
|
}
|
|
@@ -296,8 +324,9 @@ export const detailsCardFromCredential = (
|
|
|
296
324
|
config: CoreConfig,
|
|
297
325
|
testID: string,
|
|
298
326
|
labels: CardLabels,
|
|
327
|
+
language: string | undefined,
|
|
299
328
|
): CredentialDetailsCardPropsWithoutWidth => {
|
|
300
|
-
return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);
|
|
329
|
+
return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels, language);
|
|
301
330
|
};
|
|
302
331
|
|
|
303
332
|
export const detailsCardFromCredentialWithClaims = (
|
|
@@ -306,9 +335,10 @@ export const detailsCardFromCredentialWithClaims = (
|
|
|
306
335
|
config: CoreConfig,
|
|
307
336
|
testID: string,
|
|
308
337
|
labels: CardLabels,
|
|
338
|
+
language: string | undefined,
|
|
309
339
|
): CredentialDetailsCardPropsWithoutWidth => {
|
|
310
340
|
const attributes: CredentialAttribute[] = claims.map((claim, index) =>
|
|
311
|
-
detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),
|
|
341
|
+
detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString()), language),
|
|
312
342
|
);
|
|
313
343
|
|
|
314
344
|
const card = getCredentialCardPropsFromCredential(
|
|
@@ -318,6 +348,7 @@ export const detailsCardFromCredentialWithClaims = (
|
|
|
318
348
|
undefined,
|
|
319
349
|
concatTestID(testID, 'card'),
|
|
320
350
|
labels,
|
|
351
|
+
language,
|
|
321
352
|
);
|
|
322
353
|
|
|
323
354
|
return {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const getTranslatedLabel = (
|
|
2
|
+
translations: Record<string, string> | undefined,
|
|
3
|
+
language: string | undefined,
|
|
4
|
+
defaultLanguage: string,
|
|
5
|
+
) => {
|
|
6
|
+
if (!language) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
return translations?.[language] ?? translations?.[defaultLanguage];
|
|
10
|
+
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _buttons = require("../../ui-components/buttons");
|
|
10
|
-
var _utils = require("../../utils");
|
|
11
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
const EntityButtons = ({
|
|
14
|
-
entity,
|
|
15
|
-
labels,
|
|
16
|
-
testID
|
|
17
|
-
}) => {
|
|
18
|
-
const buttons = (0, _react.useMemo)(() => [{
|
|
19
|
-
label: labels.visitWebsite,
|
|
20
|
-
url: (entity === null || entity === void 0 ? void 0 : entity.website) || '',
|
|
21
|
-
testID: 'website'
|
|
22
|
-
}, {
|
|
23
|
-
label: labels.termsAndServices,
|
|
24
|
-
url: (entity === null || entity === void 0 ? void 0 : entity.termsUrl) || '',
|
|
25
|
-
testID: 'termsOfService'
|
|
26
|
-
}, {
|
|
27
|
-
label: labels.privacyPolicy,
|
|
28
|
-
url: (entity === null || entity === void 0 ? void 0 : entity.privacyUrl) || '',
|
|
29
|
-
testID: 'privacyPolicy'
|
|
30
|
-
}].filter(btn => Boolean(btn.url)), [entity, labels]);
|
|
31
|
-
const openURL = (0, _react.useCallback)(url => () => {
|
|
32
|
-
_reactNative.Linking.openURL(url).catch(e => {
|
|
33
|
-
(0, _utils.reportException)(e, 'Error opening entity link');
|
|
34
|
-
});
|
|
35
|
-
}, []);
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
37
|
-
style: [styles.buttons],
|
|
38
|
-
testID: testID
|
|
39
|
-
}, buttons.map(({
|
|
40
|
-
label,
|
|
41
|
-
url,
|
|
42
|
-
testID: testIdSuffix
|
|
43
|
-
}) => /*#__PURE__*/_react.default.createElement(_buttons.Button, {
|
|
44
|
-
key: label,
|
|
45
|
-
title: label,
|
|
46
|
-
onPress: openURL(url),
|
|
47
|
-
style: styles.urlButton,
|
|
48
|
-
testID: (0, _utils.concatTestID)(testID, testIdSuffix),
|
|
49
|
-
type: _buttons.ButtonType.SmallTech
|
|
50
|
-
})));
|
|
51
|
-
};
|
|
52
|
-
const styles = _reactNative.StyleSheet.create({
|
|
53
|
-
buttons: {
|
|
54
|
-
paddingBottom: 10,
|
|
55
|
-
paddingHorizontal: 12
|
|
56
|
-
},
|
|
57
|
-
urlButton: {
|
|
58
|
-
borderRadius: 4,
|
|
59
|
-
borderWidth: 0,
|
|
60
|
-
marginTop: 4
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(EntityButtons);
|
|
64
|
-
//# sourceMappingURL=EntityButtons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_buttons","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EntityButtons","entity","labels","testID","buttons","useMemo","label","visitWebsite","url","website","termsAndServices","termsUrl","privacyPolicy","privacyUrl","filter","btn","Boolean","openURL","useCallback","Linking","catch","reportException","createElement","View","style","styles","map","testIdSuffix","Button","key","title","onPress","urlButton","concatTestID","type","ButtonType","SmallTech","StyleSheet","create","paddingBottom","paddingHorizontal","borderRadius","borderWidth","marginTop","_default","exports","memo"],"sources":["EntityButtons.tsx"],"sourcesContent":["import { TrustEntityDetail } from '@procivis/react-native-one-core';\nimport React, { FC, memo, useCallback, useMemo } from 'react';\nimport { Linking, StyleSheet, View } from 'react-native';\n\nimport { Button, ButtonType } from '../../ui-components/buttons';\nimport { EntityLabels } from '../../ui-components/screens/nerd-mode-screen';\nimport { concatTestID, reportException } from '../../utils';\n\nexport interface EntityButton {\n url: string;\n label: string;\n}\n\ninterface EntityButtonsProps {\n entity?: TrustEntityDetail;\n labels: EntityLabels;\n testID?: string;\n}\n\nconst EntityButtons: FC<EntityButtonsProps> = ({ entity, labels, testID }) => {\n const buttons = useMemo(\n () =>\n [\n {\n label: labels.visitWebsite,\n url: entity?.website || '',\n testID: 'website',\n },\n {\n label: labels.termsAndServices,\n url: entity?.termsUrl || '',\n testID: 'termsOfService',\n },\n {\n label: labels.privacyPolicy,\n url: entity?.privacyUrl || '',\n testID: 'privacyPolicy',\n },\n ].filter((btn) => Boolean(btn.url)),\n [entity, labels],\n );\n\n const openURL = useCallback(\n (url: string) => () => {\n Linking.openURL(url).catch((e) => {\n reportException(e, 'Error opening entity link');\n });\n },\n [],\n );\n return (\n <View style={[styles.buttons]} testID={testID}>\n {buttons.map(({ label, url, testID: testIdSuffix }) => (\n <Button\n key={label}\n title={label}\n onPress={openURL(url)}\n style={styles.urlButton}\n testID={concatTestID(testID, testIdSuffix)}\n type={ButtonType.SmallTech}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttons: {\n paddingBottom: 10,\n paddingHorizontal: 12,\n },\n urlButton: {\n borderRadius: 4,\n borderWidth: 0,\n marginTop: 4,\n },\n});\n\nexport default memo(EntityButtons);\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAA4D,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,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C,QAAA,GAAAC,OAAA,CAAA3D,OAAA,gBAEY,IAAA4D,WAAI,EAAC9C,aAAa,CAAC","ignoreList":[]}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _nerdView = require("../../ui-components/nerd-view");
|
|
10
|
-
var _nerdModeScreen = require("../../ui-components/screens/nerd-mode-screen");
|
|
11
|
-
var _array = require("../../utils/array");
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
-
const EntityAttributes = ({
|
|
16
|
-
certificate,
|
|
17
|
-
did,
|
|
18
|
-
trustEntity,
|
|
19
|
-
trusted,
|
|
20
|
-
labels,
|
|
21
|
-
entityType,
|
|
22
|
-
testID,
|
|
23
|
-
onCopyToClipboard
|
|
24
|
-
}) => {
|
|
25
|
-
var _did$split;
|
|
26
|
-
const didSections = (_did$split = did === null || did === void 0 ? void 0 : did.split(':')) !== null && _did$split !== void 0 ? _did$split : [];
|
|
27
|
-
const identifier = didSections.pop();
|
|
28
|
-
const didMethod = didSections.length ? didSections.join(':') + ':' : '';
|
|
29
|
-
const attributes = [...(0, _array.addElementIf)(trusted, {
|
|
30
|
-
attributeKey: labels.trustRegistry,
|
|
31
|
-
highlightedText: trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.trustAnchor.name,
|
|
32
|
-
testID: 'trustRegistry'
|
|
33
|
-
}), ...(0, _array.addElementIf)(Boolean(did), {
|
|
34
|
-
attributeKey: entityType === _nerdModeScreen.EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,
|
|
35
|
-
attributeText: identifier,
|
|
36
|
-
canBeCopied: true,
|
|
37
|
-
highlightedText: didMethod,
|
|
38
|
-
testID: 'issuerDID'
|
|
39
|
-
}), ...(0, _array.addElementIf)(Boolean(certificate), {
|
|
40
|
-
attributeKey: entityType === _nerdModeScreen.EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,
|
|
41
|
-
attributeText: certificate,
|
|
42
|
-
canBeCopied: true,
|
|
43
|
-
testID: 'issuerCertificate'
|
|
44
|
-
}), ...(0, _array.addElementIf)(trusted && Boolean(trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.role), {
|
|
45
|
-
attributeKey: labels.role,
|
|
46
|
-
highlightedText: trustEntity === null || trustEntity === void 0 ? void 0 : trustEntity.role,
|
|
47
|
-
testID: 'role'
|
|
48
|
-
})];
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
50
|
-
style: styles.wrapper
|
|
51
|
-
}, attributes.map(attribute => /*#__PURE__*/_react.default.createElement(_nerdView.NerdModeItem, _extends({
|
|
52
|
-
key: attribute.attributeKey
|
|
53
|
-
}, attribute, {
|
|
54
|
-
labels: labels,
|
|
55
|
-
onCopyToClipboard: onCopyToClipboard,
|
|
56
|
-
testID: testID
|
|
57
|
-
}))));
|
|
58
|
-
};
|
|
59
|
-
const styles = _reactNative.StyleSheet.create({
|
|
60
|
-
wrapper: {
|
|
61
|
-
marginBottom: 20
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(EntityAttributes);
|
|
65
|
-
//# sourceMappingURL=entity-attributes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nerdView","_nerdModeScreen","_array","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityAttributes","certificate","did","trustEntity","trusted","labels","entityType","testID","onCopyToClipboard","_did$split","didSections","split","identifier","pop","didMethod","join","attributes","addElementIf","attributeKey","trustRegistry","highlightedText","trustAnchor","name","Boolean","EntityType","CredentialEntity","issuerIdentifier","entityIdentifier","attributeText","canBeCopied","role","createElement","View","style","styles","wrapper","map","attribute","NerdModeItem","key","StyleSheet","create","marginBottom","_default","exports","memo"],"sources":["entity-attributes.tsx"],"sourcesContent":["import { TrustEntityDetail, TrustEntityListItem } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { NerdModeItem } from '../../ui-components/nerd-view';\nimport { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { addElementIf } from '../../utils/array';\n\ninterface EntityAttributesProps {\n certificate?: string;\n did?: string;\n trustEntity?: TrustEntityDetail | TrustEntityListItem;\n trusted: boolean;\n labels: AttributesLabels;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n testID?: string;\n}\n\nconst EntityAttributes: FC<EntityAttributesProps> = ({\n certificate,\n did,\n trustEntity,\n trusted,\n labels,\n entityType,\n testID,\n onCopyToClipboard,\n}) => {\n const didSections = did?.split(':') ?? [];\n const identifier = didSections.pop();\n const didMethod = didSections.length ? didSections.join(':') + ':' : '';\n\n const attributes = [\n ...addElementIf(trusted, {\n attributeKey: labels.trustRegistry,\n highlightedText: trustEntity?.trustAnchor.name,\n testID: 'trustRegistry',\n }),\n ...addElementIf(Boolean(did), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: identifier,\n canBeCopied: true,\n highlightedText: didMethod,\n testID: 'issuerDID',\n }),\n ...addElementIf(Boolean(certificate), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: certificate,\n canBeCopied: true,\n testID: 'issuerCertificate',\n }),\n ...addElementIf(trusted && Boolean(trustEntity?.role), {\n attributeKey: labels.role,\n highlightedText: trustEntity?.role,\n testID: 'role',\n }),\n ];\n return (\n <View style={styles.wrapper}>\n {attributes.map((attribute) => (\n <NerdModeItem\n key={attribute.attributeKey}\n {...attribute}\n labels={labels}\n onCopyToClipboard={onCopyToClipboard}\n testID={testID}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n marginBottom: 20,\n },\n});\n\nexport default memo(EntityAttributes);\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAiD,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA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,EAAE;EACV,CAAC,CAAC,EACF,GAAG,IAAAU,mBAAY,EAACb,OAAO,IAAImB,OAAO,CAACpB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAE2B,IAAI,CAAC,EAAE;IACrDZ,YAAY,EAAEb,MAAM,CAACyB,IAAI;IACzBV,eAAe,EAAEjB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAE2B,IAAI;IAClCvB,MAAM,EAAE;EACV,CAAC,CAAC,CACH;EACD,oBACExC,MAAA,CAAAa,OAAA,CAAAmD,aAAA,CAAC7D,YAAA,CAAA8D,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAQ,GACzBnB,UAAU,CAACoB,GAAG,CAAEC,SAAS,iBACxBtE,MAAA,CAAAa,OAAA,CAAAmD,aAAA,CAAC5D,SAAA,CAAAmE,YAAY,EAAA5C,QAAA;IACX6C,GAAG,EAAEF,SAAS,CAACnB;EAAa,GACxBmB,SAAS;IACbhC,MAAM,EAAEA,MAAO;IACfG,iBAAiB,EAAEA,iBAAkB;IACrCD,MAAM,EAAEA;EAAO,EAChB,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAM2B,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,OAAO,EAAE;IACPO,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhE,OAAA,gBAEY,IAAAiE,WAAI,EAAC7C,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _reactNativeOneCore = require("@procivis/react-native-one-core");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
|
-
var _colorSchemeContext = require("../../ui-components/theme/color-scheme-context");
|
|
11
|
-
var _utils = require("../../utils");
|
|
12
|
-
var _trustEntity = require("../../utils/hooks/core/trust-entity");
|
|
13
|
-
var _entityAttributes = _interopRequireDefault(require("./entity-attributes"));
|
|
14
|
-
var _entityDetails = _interopRequireDefault(require("./entity-details"));
|
|
15
|
-
var _EntityButtons = _interopRequireDefault(require("./EntityButtons"));
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
|
-
const EntityDetailsWithButtons = ({
|
|
21
|
-
identifier,
|
|
22
|
-
entityLabels,
|
|
23
|
-
attributesLabels,
|
|
24
|
-
onCopyToClipboard,
|
|
25
|
-
role,
|
|
26
|
-
entityType,
|
|
27
|
-
testID,
|
|
28
|
-
...props
|
|
29
|
-
}) => {
|
|
30
|
-
var _identifierDetail$cer, _identifierDetail$did;
|
|
31
|
-
let {
|
|
32
|
-
data
|
|
33
|
-
} = (0, _trustEntity.useTrustEntity)(identifier === null || identifier === void 0 ? void 0 : identifier.id);
|
|
34
|
-
let {
|
|
35
|
-
data: identifierDetail
|
|
36
|
-
} = (0, _utils.useIdentifierDetails)(identifier === null || identifier === void 0 ? void 0 : identifier.id);
|
|
37
|
-
const trustEntity = data !== null && data !== void 0 ? data : undefined;
|
|
38
|
-
const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
|
|
39
|
-
const trusted = Boolean(trustEntity && trustEntity.state === _reactNativeOneCore.TrustEntityState.ACTIVE && (trustEntity.role === _reactNativeOneCore.TrustEntityRole.BOTH || trustEntity.role === role));
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
41
|
-
style: {
|
|
42
|
-
backgroundColor: colorScheme.nerdView.background
|
|
43
|
-
}
|
|
44
|
-
}, /*#__PURE__*/_react.default.createElement(_entityDetails.default, _extends({
|
|
45
|
-
identifier: identifier,
|
|
46
|
-
labels: {
|
|
47
|
-
unknown: role === _reactNativeOneCore.TrustEntityRole.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier
|
|
48
|
-
},
|
|
49
|
-
role: role,
|
|
50
|
-
testID: testID
|
|
51
|
-
}, props)), trusted && /*#__PURE__*/_react.default.createElement(_EntityButtons.default, {
|
|
52
|
-
entity: trustEntity,
|
|
53
|
-
labels: entityLabels,
|
|
54
|
-
testID: (0, _utils.concatTestID)(testID, 'links')
|
|
55
|
-
}), /*#__PURE__*/_react.default.createElement(_entityAttributes.default, {
|
|
56
|
-
certificate: identifierDetail === null || identifierDetail === void 0 || (_identifierDetail$cer = identifierDetail.certificates) === null || _identifierDetail$cer === void 0 || (_identifierDetail$cer = _identifierDetail$cer[0]) === null || _identifierDetail$cer === void 0 ? void 0 : _identifierDetail$cer.chain,
|
|
57
|
-
did: identifierDetail === null || identifierDetail === void 0 || (_identifierDetail$did = identifierDetail.did) === null || _identifierDetail$did === void 0 ? void 0 : _identifierDetail$did.did,
|
|
58
|
-
trustEntity: trustEntity,
|
|
59
|
-
trusted: trusted,
|
|
60
|
-
labels: attributesLabels,
|
|
61
|
-
onCopyToClipboard: onCopyToClipboard,
|
|
62
|
-
entityType: entityType,
|
|
63
|
-
testID: testID
|
|
64
|
-
}));
|
|
65
|
-
};
|
|
66
|
-
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(EntityDetailsWithButtons);
|
|
67
|
-
//# sourceMappingURL=entity-details-with-buttons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_reactNative","_colorSchemeContext","_utils","_trustEntity","_entityAttributes","_interopRequireDefault","_entityDetails","_EntityButtons","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityDetailsWithButtons","identifier","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","_identifierDetail$cer","_identifierDetail$did","data","useTrustEntity","id","identifierDetail","useIdentifierDetails","trustEntity","undefined","colorScheme","useAppColorScheme","trusted","Boolean","state","TrustEntityState","ACTIVE","TrustEntityRole","BOTH","createElement","View","style","backgroundColor","nerdView","background","labels","unknown","ISSUER","unknownIssuer","unknownVerifier","entity","concatTestID","certificate","certificates","chain","did","_default","exports","memo"],"sources":["entity-details-with-buttons.tsx"],"sourcesContent":["import { IdentifierListItem, TrustEntityRole, TrustEntityState } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';\nimport { concatTestID, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\nimport EntityAttributes from './entity-attributes';\nimport EntityDetails from './entity-details';\nimport EntityButtons from './EntityButtons';\n\nexport type ContextRole = Exclude<TrustEntityRole, TrustEntityRole.BOTH>;\n\ninterface EntityDetailsWithButtonsProps {\n identifier?: IdentifierListItem;\n entityLabels: EntityLabels;\n attributesLabels: AttributesLabels;\n style?: StyleProp<ViewStyle>;\n textColor?: string;\n testID?: string;\n role: ContextRole;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({\n identifier,\n entityLabels,\n attributesLabels,\n onCopyToClipboard,\n role,\n entityType,\n testID,\n ...props\n}) => {\n let { data } = useTrustEntity(identifier?.id);\n let { data: identifierDetail } = useIdentifierDetails(identifier?.id);\n const trustEntity = data ?? undefined;\n\n const colorScheme = useAppColorScheme();\n\n const trusted = Boolean(\n trustEntity &&\n trustEntity.state === TrustEntityState.ACTIVE &&\n (trustEntity.role === TrustEntityRole.BOTH || trustEntity.role === role),\n );\n\n return (\n <View style={{ backgroundColor: colorScheme.nerdView.background }}>\n <EntityDetails\n identifier={identifier}\n labels={{\n unknown: role === TrustEntityRole.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier,\n }}\n role={role}\n testID={testID}\n {...props}\n />\n {trusted && <EntityButtons entity={trustEntity} labels={entityLabels} testID={concatTestID(testID, 'links')} />}\n <EntityAttributes\n certificate={identifierDetail?.certificates?.[0]?.chain}\n did={identifierDetail?.did?.did}\n trustEntity={trustEntity}\n trusted={trusted}\n labels={attributesLabels}\n onCopyToClipboard={onCopyToClipboard}\n entityType={entityType}\n testID={testID}\n />\n </View>\n );\n};\n\nexport default memo(EntityDetailsWithButtons);\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAGA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,cAAA,G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AAO,CAChB,CACG,CAAC;AAEX,CAAC;AAAC,IAAAqC,QAAA,GAAAC,OAAA,CAAArE,OAAA,gBAEa,IAAAsE,WAAI,EAAC9C,wBAAwB,CAAC","ignoreList":[]}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _reactNativeOneCore = require("@procivis/react-native-one-core");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _entityCluster = _interopRequireDefault(require("../../ui-components/entity/entity-cluster"));
|
|
10
|
-
var _icons = require("../../ui-components/icons");
|
|
11
|
-
var _utils = require("../../utils");
|
|
12
|
-
var _trustEntity = require("../../utils/hooks/core/trust-entity");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
const getCertificateCommonName = certificate => {
|
|
17
|
-
var _certificate$x509Attr;
|
|
18
|
-
return (_certificate$x509Attr = certificate.x509Attributes.subject.split(', ').find(s => s.startsWith('CN'))) === null || _certificate$x509Attr === void 0 || (_certificate$x509Attr = _certificate$x509Attr.split('=')) === null || _certificate$x509Attr === void 0 ? void 0 : _certificate$x509Attr.pop();
|
|
19
|
-
};
|
|
20
|
-
const EntityDetails = ({
|
|
21
|
-
labels,
|
|
22
|
-
renderMore,
|
|
23
|
-
role,
|
|
24
|
-
style,
|
|
25
|
-
testID,
|
|
26
|
-
sublineColor,
|
|
27
|
-
textColor,
|
|
28
|
-
...props
|
|
29
|
-
}) => {
|
|
30
|
-
var _props$identifier, _props$identifier2;
|
|
31
|
-
const {
|
|
32
|
-
data,
|
|
33
|
-
isLoading: isLoadingTrustEntity
|
|
34
|
-
} = (0, _trustEntity.useTrustEntity)('identifier' in props ? (_props$identifier = props.identifier) === null || _props$identifier === void 0 ? void 0 : _props$identifier.id : undefined);
|
|
35
|
-
const trustEntity = 'entity' in props ? props.entity : data !== null && data !== void 0 ? data : undefined;
|
|
36
|
-
const {
|
|
37
|
-
data: identifierDetail,
|
|
38
|
-
isLoading: isLoadingIdentifier
|
|
39
|
-
} = (0, _utils.useIdentifierDetails)('identifier' in props ? (_props$identifier2 = props.identifier) === null || _props$identifier2 === void 0 ? void 0 : _props$identifier2.id : undefined);
|
|
40
|
-
const trusted = trustEntity && trustEntity.state === _reactNativeOneCore.TrustEntityState.ACTIVE && (trustEntity.role === _reactNativeOneCore.TrustEntityRole.BOTH || trustEntity.role === role);
|
|
41
|
-
const isLoading = isLoadingIdentifier || isLoadingTrustEntity;
|
|
42
|
-
const avatarProps = (0, _react.useMemo)(() => {
|
|
43
|
-
var _identifierDetail$cer, _getCertificateCommon;
|
|
44
|
-
if (isLoading) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
const avatar = trusted && (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === 'DID' && trustEntity.logo ? {
|
|
48
|
-
imageSource: {
|
|
49
|
-
uri: trustEntity.logo
|
|
50
|
-
}
|
|
51
|
-
} : undefined;
|
|
52
|
-
const placeholderText = (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === _reactNativeOneCore.IdentifierType.CERTIFICATE && (_identifierDetail$cer = identifierDetail.certificates) !== null && _identifierDetail$cer !== void 0 && _identifierDetail$cer[0] ? (_getCertificateCommon = getCertificateCommonName(identifierDetail.certificates[0])) === null || _getCertificateCommon === void 0 ? void 0 : _getCertificateCommon.substring(0, 1) : 'D';
|
|
53
|
-
const statusIcon = trusted ? /*#__PURE__*/_react.default.createElement(_icons.EntityTrustedIcon, {
|
|
54
|
-
testID: (0, _utils.concatTestID)(testID, 'statusIcon', 'trusted')
|
|
55
|
-
}) : /*#__PURE__*/_react.default.createElement(_icons.EntityNotTrustedIcon, {
|
|
56
|
-
testID: (0, _utils.concatTestID)(testID, 'statusIcon', 'notTrusted')
|
|
57
|
-
});
|
|
58
|
-
if (trustEntity) {
|
|
59
|
-
return {
|
|
60
|
-
avatar,
|
|
61
|
-
placeholderText: trusted && (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === 'DID' ? trustEntity.name.substring(0, 1) : placeholderText,
|
|
62
|
-
statusIcon,
|
|
63
|
-
testID: (0, _utils.concatTestID)(testID, 'avatar')
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
placeholderText,
|
|
68
|
-
statusIcon
|
|
69
|
-
};
|
|
70
|
-
}, [trustEntity, trusted, identifierDetail, isLoading, testID]);
|
|
71
|
-
const trustEntityName = (0, _react.useMemo)(() => {
|
|
72
|
-
var _identifierDetail$cer2, _identifierDetail$did;
|
|
73
|
-
if (isLoading) {
|
|
74
|
-
return '';
|
|
75
|
-
}
|
|
76
|
-
if ((identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === _reactNativeOneCore.IdentifierType.CERTIFICATE && (_identifierDetail$cer2 = identifierDetail.certificates) !== null && _identifierDetail$cer2 !== void 0 && _identifierDetail$cer2[0]) {
|
|
77
|
-
const commonName = getCertificateCommonName(identifierDetail.certificates[0]);
|
|
78
|
-
if (commonName) {
|
|
79
|
-
return commonName;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (trustEntity) {
|
|
83
|
-
return trustEntity.name;
|
|
84
|
-
}
|
|
85
|
-
if (identifierDetail !== null && identifierDetail !== void 0 && (_identifierDetail$did = identifierDetail.did) !== null && _identifierDetail$did !== void 0 && _identifierDetail$did.did) {
|
|
86
|
-
return (0, _utils.replaceBreakingHyphens)(identifierDetail.did.did);
|
|
87
|
-
}
|
|
88
|
-
return labels.unknown;
|
|
89
|
-
}, [labels.unknown, trustEntity, identifierDetail, isLoading]);
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_entityCluster.default, {
|
|
91
|
-
avatar: avatarProps,
|
|
92
|
-
entityName: trustEntityName,
|
|
93
|
-
style: style,
|
|
94
|
-
testID: testID,
|
|
95
|
-
textColor: textColor,
|
|
96
|
-
sublineColor: sublineColor,
|
|
97
|
-
isLoading: isLoading
|
|
98
|
-
}), trustEntity && renderMore && renderMore(trustEntity));
|
|
99
|
-
};
|
|
100
|
-
var _default = exports.default = EntityDetails;
|
|
101
|
-
//# sourceMappingURL=entity-details.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_entityCluster","_interopRequireDefault","_icons","_utils","_trustEntity","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getCertificateCommonName","certificate","_certificate$x509Attr","x509Attributes","subject","split","find","s","startsWith","pop","EntityDetails","labels","renderMore","role","style","testID","sublineColor","textColor","props","_props$identifier","_props$identifier2","data","isLoading","isLoadingTrustEntity","useTrustEntity","identifier","id","undefined","trustEntity","entity","identifierDetail","isLoadingIdentifier","useIdentifierDetails","trusted","state","TrustEntityState","ACTIVE","TrustEntityRole","BOTH","avatarProps","useMemo","_identifierDetail$cer","_getCertificateCommon","avatar","type","logo","imageSource","uri","placeholderText","IdentifierType","CERTIFICATE","certificates","substring","statusIcon","createElement","EntityTrustedIcon","concatTestID","EntityNotTrustedIcon","name","trustEntityName","_identifierDetail$cer2","_identifierDetail$did","commonName","did","replaceBreakingHyphens","unknown","Fragment","entityName","_default","exports"],"sources":["entity-details.tsx"],"sourcesContent":["import {\n CertificateDetail,\n IdentifierListItem,\n IdentifierType,\n TrustEntityDetail,\n TrustEntityRole,\n TrustEntityState,\n} from '@procivis/react-native-one-core';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { AvatarProps } from '../../ui-components';\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: TrustEntityDetail) => ReactNode;\n role: Exclude<TrustEntityRole, TrustEntityRole.BOTH>;\n style?: StyleProp<ViewStyle>;\n sublineColor?: string;\n textColor?: string;\n testID?: string;\n} & (\n | {\n identifier?: IdentifierListItem;\n }\n | {\n entity: TrustEntityDetail;\n }\n);\n\nconst getCertificateCommonName = (certificate: CertificateDetail): string | undefined => {\n return certificate.x509Attributes.subject\n .split(', ')\n .find((s) => s.startsWith('CN'))\n ?.split('=')\n ?.pop();\n};\n\nconst EntityDetails: FC<EntityDetailsProps> = ({\n labels,\n renderMore,\n role,\n style,\n testID,\n sublineColor,\n textColor,\n ...props\n}) => {\n const { data, isLoading: isLoadingTrustEntity } = useTrustEntity(\n 'identifier' in props ? props.identifier?.id : undefined,\n );\n const trustEntity = 'entity' in props ? props.entity : data ?? undefined;\n const { data: identifierDetail, isLoading: isLoadingIdentifier } = useIdentifierDetails(\n 'identifier' in props ? props.identifier?.id : undefined,\n );\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityState.ACTIVE &&\n (trustEntity.role === TrustEntityRole.BOTH || trustEntity.role === role);\n\n const isLoading = isLoadingIdentifier || isLoadingTrustEntity;\n\n const avatarProps: AvatarProps | undefined = useMemo(() => {\n if (isLoading) {\n return undefined;\n }\n\n const avatar =\n trusted && identifierDetail?.type === 'DID' && trustEntity.logo\n ? { imageSource: { uri: trustEntity.logo } }\n : undefined;\n\n const placeholderText =\n identifierDetail?.type === IdentifierType.CERTIFICATE && identifierDetail.certificates?.[0]\n ? getCertificateCommonName(identifierDetail.certificates[0])?.substring(0, 1)\n : 'D';\n\n const statusIcon = trusted ? (\n <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />\n ) : (\n <EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />\n );\n\n if (trustEntity) {\n return {\n avatar,\n placeholderText:\n trusted && identifierDetail?.type === 'DID' ? trustEntity.name.substring(0, 1) : placeholderText,\n statusIcon,\n testID: concatTestID(testID, 'avatar'),\n };\n }\n\n return {\n placeholderText,\n statusIcon,\n };\n }, [trustEntity, trusted, identifierDetail, isLoading, testID]);\n\n const trustEntityName = useMemo(() => {\n if (isLoading) {\n return '';\n }\n if (identifierDetail?.type === IdentifierType.CERTIFICATE && identifierDetail.certificates?.[0]) {\n const commonName = getCertificateCommonName(identifierDetail.certificates[0]);\n if (commonName) {\n return commonName;\n }\n }\n if (trustEntity) {\n return trustEntity.name;\n }\n if (identifierDetail?.did?.did) {\n return replaceBreakingHyphens(identifierDetail.did.did);\n }\n\n return labels.unknown;\n }, [labels.unknown, trustEntity, identifierDetail, isLoading]);\n\n return (\n <>\n <EntityCluster\n avatar={avatarProps}\n entityName={trustEntityName}\n style={style}\n testID={testID}\n textColor={textColor}\n sublineColor={sublineColor}\n isLoading={isLoading}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mapp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BAAgB,gBAAA+B,qBAAA,GAAhB/B,gBAAgB,CAAEiC,GAAG,cAAAF,qBAAA,eAArBA,qBAAA,CAAuBE,GAAG,EAAE;MAC9B,OAAO,IAAAC,6BAAsB,EAAClC,gBAAgB,CAACiC,GAAG,CAACA,GAAG,CAAC;IACzD;IAEA,OAAOpD,MAAM,CAACsD,OAAO;EACvB,CAAC,EAAE,CAACtD,MAAM,CAACsD,OAAO,EAAErC,WAAW,EAAEE,gBAAgB,EAAER,SAAS,CAAC,CAAC;EAE9D,oBACEjD,MAAA,CAAAS,OAAA,CAAAwE,aAAA,CAAAjF,MAAA,CAAAS,OAAA,CAAAoF,QAAA,qBACE7F,MAAA,CAAAS,OAAA,CAAAwE,aAAA,CAAC/E,cAAA,CAAAO,OAAa;IACZ6D,MAAM,EAAEJ,WAAY;IACpB4B,UAAU,EAAER,eAAgB;IAC5B7C,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfE,SAAS,EAAEA,SAAU;IACrBD,YAAY,EAAEA,YAAa;IAC3BM,SAAS,EAAEA;EAAU,CACtB,CAAC,EACDM,WAAW,IAAIhB,UAAU,IAAIA,UAAU,CAACgB,WAAW,CACpD,CAAC;AAEP,CAAC;AAAC,IAAAwC,QAAA,GAAAC,OAAA,CAAAvF,OAAA,GAEa4B,aAAa","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "EntityDetails", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _entityDetails.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _entityDetails = _interopRequireDefault(require("./entity-details"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_entityDetails","_interopRequireDefault","require","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import type { EntityDetailsLabels, EntityDetailsProps } from './entity-details';\nimport EntityDetails from './entity-details';\n\nexport { EntityDetails, EntityDetailsLabels, EntityDetailsProps };\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|