@sphereon/ui-components.credential-branding 0.2.1-unstable.93 → 0.2.1-unstable.97
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VerifiableCredential } from '@veramo/core';
|
|
2
|
-
import { IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding, Party } from '@sphereon/ssi-sdk.data-store';
|
|
2
|
+
import { CredentialRole, IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding, Party } from '@sphereon/ssi-sdk.data-store';
|
|
3
3
|
import { CredentialSummary, ISelectAppLocaleBrandingArgs } from '../types';
|
|
4
4
|
import { ICredential } from '@sphereon/ssi-types';
|
|
5
|
-
export declare const toNonPersistedCredentialSummary: (verifiableCredential: ICredential | VerifiableCredential, branding?: Array<IBasicCredentialLocaleBranding>, issuer?: Party, subject?: Party) => Promise<CredentialSummary>;
|
|
5
|
+
export declare const toNonPersistedCredentialSummary: (verifiableCredential: ICredential | VerifiableCredential, credentialRole: CredentialRole, branding?: Array<IBasicCredentialLocaleBranding>, issuer?: Party, subject?: Party) => Promise<CredentialSummary>;
|
|
6
6
|
export declare const getDate: (...dates: (number | string | undefined)[]) => number | undefined;
|
|
7
7
|
export declare const getCredentialDisplayName: ({ verifiableCredential, localeBranding, }: {
|
|
8
8
|
verifiableCredential: VerifiableCredential;
|
|
@@ -15,5 +15,5 @@ export declare const getCredentialIssuerNameAndAlias: ({ verifiableCredential, i
|
|
|
15
15
|
issuerAlias: string;
|
|
16
16
|
issuerName: string;
|
|
17
17
|
};
|
|
18
|
-
export declare const toCredentialSummary: (verifiableCredential: VerifiableCredential, hash: string, branding?: Array<IBasicCredentialLocaleBranding>, issuer?: Party, subject?: Party) => Promise<CredentialSummary>;
|
|
18
|
+
export declare const toCredentialSummary: (verifiableCredential: VerifiableCredential, hash: string, credentialRole: CredentialRole, branding?: Array<IBasicCredentialLocaleBranding>, issuer?: Party, subject?: Party) => Promise<CredentialSummary>;
|
|
19
19
|
export declare const selectAppLocaleBranding: (args: ISelectAppLocaleBrandingArgs) => Promise<IBasicCredentialLocaleBranding | IBasicIssuerLocaleBranding | undefined>;
|
|
@@ -102,7 +102,7 @@ function findCorrelationIdName(correlationId, parties, activeUser) {
|
|
|
102
102
|
if (activeUser) {
|
|
103
103
|
parties.push(activeUser);
|
|
104
104
|
}
|
|
105
|
-
return ((_b = (_a = allParties.find(function (contact) { return contact.identities.some(function (identity) { return identity.identifier.correlationId === correlationId; }); })) === null || _a === void 0 ? void 0 : _a.contact.displayName) !== null && _b !== void 0 ? _b : correlationId);
|
|
105
|
+
return ((_b = (_a = allParties === null || allParties === void 0 ? void 0 : allParties.find(function (contact) { return contact.identities.some(function (identity) { return identity.identifier.correlationId === correlationId; }); })) === null || _a === void 0 ? void 0 : _a.contact.displayName) !== null && _b !== void 0 ? _b : correlationId);
|
|
106
106
|
}
|
|
107
107
|
var getImageSize = function (image) { return __awaiter(void 0, void 0, void 0, function () {
|
|
108
108
|
var downloadedImage, imageSize;
|
|
@@ -195,8 +195,8 @@ var toCredentialDetailsRow = function (object, subject, issuer) { return __await
|
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}); };
|
|
198
|
-
var toNonPersistedCredentialSummary = function (verifiableCredential, branding, issuer, subject) {
|
|
199
|
-
return (0, exports.toCredentialSummary)(verifiableCredential, (0, utils_1.computeEntryHash)(verifiableCredential), branding, issuer, subject);
|
|
198
|
+
var toNonPersistedCredentialSummary = function (verifiableCredential, credentialRole, branding, issuer, subject) {
|
|
199
|
+
return (0, exports.toCredentialSummary)(verifiableCredential, (0, utils_1.computeEntryHash)(verifiableCredential), credentialRole, branding, issuer, subject);
|
|
200
200
|
};
|
|
201
201
|
exports.toNonPersistedCredentialSummary = toNonPersistedCredentialSummary;
|
|
202
202
|
var getDate = function () {
|
|
@@ -204,7 +204,7 @@ var getDate = function () {
|
|
|
204
204
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
205
205
|
dates[_i] = arguments[_i];
|
|
206
206
|
}
|
|
207
|
-
var date = dates.find(function (date) { return date !== null && date !== undefined; });
|
|
207
|
+
var date = dates === null || dates === void 0 ? void 0 : dates.find(function (date) { return date !== null && date !== undefined; });
|
|
208
208
|
if (!date) {
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
@@ -264,7 +264,7 @@ var getTermsOfUse = function (_a) {
|
|
|
264
264
|
return __assign((_a = {}, _a[type] = id, _a), rest);
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
|
-
var toCredentialSummary = function (verifiableCredential, hash, branding, issuer, subject) { return __awaiter(void 0, void 0, void 0, function () {
|
|
267
|
+
var toCredentialSummary = function (verifiableCredential, hash, credentialRole, branding, issuer, subject) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
268
|
var expirationDate, issueDate, localeBranding, credentialStatus, title, properties, logo, url, _a, issuerName, issuerAlias, termsOfUse;
|
|
269
269
|
var _b, _c;
|
|
270
270
|
return __generator(this, function (_d) {
|
|
@@ -289,6 +289,7 @@ var toCredentialSummary = function (verifiableCredential, hash, branding, issuer
|
|
|
289
289
|
id: verifiableCredential.id,
|
|
290
290
|
title: title,
|
|
291
291
|
credentialStatus: credentialStatus,
|
|
292
|
+
credentialRole: credentialRole,
|
|
292
293
|
issueDate: issueDate,
|
|
293
294
|
expirationDate: expirationDate,
|
|
294
295
|
properties: properties,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CredentialStatus, ImageSize, IssuerStatus } from '@sphereon/ui-components.core';
|
|
2
|
-
import { IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store';
|
|
2
|
+
import { CredentialRole, IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store';
|
|
3
3
|
export type CredentialSummary = {
|
|
4
4
|
hash: string;
|
|
5
5
|
id?: string;
|
|
6
6
|
title: string;
|
|
7
7
|
issuer: IssuerSummary;
|
|
8
8
|
credentialStatus: CredentialStatus;
|
|
9
|
+
credentialRole: CredentialRole;
|
|
9
10
|
issueDate: number;
|
|
10
11
|
expirationDate: number;
|
|
11
12
|
properties: CredentialDetailsRow[];
|
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.97+d6159f8",
|
|
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,7 +31,7 @@
|
|
|
31
31
|
"@sphereon/ssi-sdk.core": "0.28.1-next.39",
|
|
32
32
|
"@sphereon/ssi-sdk.data-store": "0.28.1-next.39",
|
|
33
33
|
"@sphereon/ssi-types": "0.28.1-next.39",
|
|
34
|
-
"@sphereon/ui-components.core": "0.2.1-unstable.
|
|
34
|
+
"@sphereon/ui-components.core": "0.2.1-unstable.97+d6159f8",
|
|
35
35
|
"@veramo/core": "4.2.0",
|
|
36
36
|
"@veramo/utils": "4.2.0",
|
|
37
37
|
"i18n-js": "^3.8.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">= 18"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d6159f8321e6f081a83d11c895e607100e6e08bd"
|
|
52
52
|
}
|