@sphereon/ui-components.credential-branding 0.2.1-unstable.8 → 0.2.1-unstable.9
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.
|
@@ -50,9 +50,8 @@ var uuid_1 = require("uuid");
|
|
|
50
50
|
var utils_1 = require("@veramo/utils");
|
|
51
51
|
var ui_components_core_1 = require("@sphereon/ui-components.core");
|
|
52
52
|
var ssi_sdk_core_1 = require("@sphereon/ssi-sdk.core");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var MappingUtils_1 = require("../utils/MappingUtils");
|
|
53
|
+
var services_1 = require("../services");
|
|
54
|
+
var utils_2 = require("../utils");
|
|
56
55
|
function findCorrelationIdName(correlationId, contacts) {
|
|
57
56
|
var contact = contacts.find(function (contact) {
|
|
58
57
|
return contact.identities.some(function (identity) { return identity.identifier.correlationId === correlationId; });
|
|
@@ -82,7 +81,7 @@ var toCredentialDetailsRow = function (object, subject, issuer) { return __await
|
|
|
82
81
|
label: 'image',
|
|
83
82
|
value: image
|
|
84
83
|
};
|
|
85
|
-
return [4, (0,
|
|
84
|
+
return [4, (0, utils_2.isImageAddress)(image)];
|
|
86
85
|
case 2:
|
|
87
86
|
if (!(_q.sent())) return [3, 5];
|
|
88
87
|
_f = ssi_sdk_core_1.getImageDimensions;
|
|
@@ -135,7 +134,7 @@ var toCredentialDetailsRow = function (object, subject, issuer) { return __await
|
|
|
135
134
|
label: label,
|
|
136
135
|
value: value
|
|
137
136
|
};
|
|
138
|
-
return [4, (0,
|
|
137
|
+
return [4, (0, utils_2.isImageAddress)(value)];
|
|
139
138
|
case 11:
|
|
140
139
|
if (!(_q.sent())) return [3, 14];
|
|
141
140
|
_m = ssi_sdk_core_1.getImageDimensions;
|
|
@@ -178,7 +177,7 @@ var toCredentialSummary = function (_a, branding, issuer, subject) {
|
|
|
178
177
|
? new Date(verifiableCredential.expirationDate).valueOf() / ui_components_core_1.EPOCH_MILLISECONDS
|
|
179
178
|
: 0;
|
|
180
179
|
issueDate = new Date(verifiableCredential.issuanceDate).valueOf() / ui_components_core_1.EPOCH_MILLISECONDS;
|
|
181
|
-
credentialStatus = (0,
|
|
180
|
+
credentialStatus = (0, utils_2.getCredentialStatus)(verifiableCredential);
|
|
182
181
|
title = verifiableCredential.name
|
|
183
182
|
? verifiableCredential.name
|
|
184
183
|
: !verifiableCredential.type
|
|
@@ -192,7 +191,7 @@ var toCredentialSummary = function (_a, branding, issuer, subject) {
|
|
|
192
191
|
return [4, (0, exports.selectAppLocaleBranding)({ localeBranding: branding })];
|
|
193
192
|
case 2:
|
|
194
193
|
localeBranding = _f.sent();
|
|
195
|
-
logo = (0,
|
|
194
|
+
logo = (0, utils_2.getIssuerLogo)(verifiableCredential, localeBranding);
|
|
196
195
|
url = typeof verifiableCredential.issuer !== 'string' ? verifiableCredential.issuer.url : undefined;
|
|
197
196
|
name = typeof verifiableCredential.issuer === 'string'
|
|
198
197
|
? verifiableCredential.issuer
|
|
@@ -236,10 +235,10 @@ var selectAppLocaleBranding = function (args) { return __awaiter(void 0, void 0,
|
|
|
236
235
|
localeBranding = (_a = args.localeBranding) === null || _a === void 0 ? void 0 : _a.find(function (branding) { var _a; return ((_a = branding.locale) === null || _a === void 0 ? void 0 : _a.startsWith(appLocale)) || branding.locale === undefined; });
|
|
237
236
|
logo = ((_b = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.logo) === null || _b === void 0 ? void 0 : _b.dataUri) || ((_c = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.logo) === null || _c === void 0 ? void 0 : _c.uri);
|
|
238
237
|
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
|
239
|
-
|
|
238
|
+
imagePreloader = new services_1.ReactNativeImagePreloader();
|
|
240
239
|
}
|
|
241
240
|
else {
|
|
242
|
-
imagePreloader = new
|
|
241
|
+
imagePreloader = new services_1.WebImagePreloader();
|
|
243
242
|
}
|
|
244
243
|
if (logo) {
|
|
245
244
|
imagePreloader.preload([{ uri: logo }])["catch"](function () {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.credential-branding",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.1-unstable.
|
|
4
|
+
"version": "0.2.1-unstable.9+cd2c874",
|
|
5
5
|
"description": "SSI UI components credential Branding",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
"@sphereon/ssi-sdk.core": "0.23.5-unstable.74+9c3c2083",
|
|
32
32
|
"@sphereon/ssi-sdk.data-store": "0.23.5-unstable.74+9c3c2083",
|
|
33
33
|
"@sphereon/ssi-types": "0.23.5-unstable.74+9c3c2083",
|
|
34
|
-
"@sphereon/ui-components.core": "0.2.1-unstable.
|
|
34
|
+
"@sphereon/ui-components.core": "0.2.1-unstable.9+cd2c874",
|
|
35
35
|
"@veramo/core": "4.2.0",
|
|
36
36
|
"@veramo/utils": "4.2.0",
|
|
37
37
|
"i18n-js": "^3.8.0",
|
|
38
|
+
"react-native-fast-image": "^8.6.3",
|
|
38
39
|
"uuid": "^9.0.1"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"react": ">= 18"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "cd2c874a5683726874cd8744c256f8cc5ad8f2d7"
|
|
52
53
|
}
|