@sphereon/ui-components.credential-branding 0.2.1-unstable.52 → 0.2.1-unstable.67

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.
@@ -188,10 +188,10 @@ exports.toNonPersistedCredentialSummary = toNonPersistedCredentialSummary;
188
188
  var toCredentialSummary = function (_a, branding, issuer, subject) {
189
189
  var hash = _a.hash, verifiableCredential = _a.verifiableCredential;
190
190
  return __awaiter(void 0, void 0, void 0, function () {
191
- var expirationDate, issueDate, credentialStatus, title, properties, localeBranding, logo, url, issuerName, issuerAlias;
192
- var _b, _c, _d;
193
- return __generator(this, function (_e) {
194
- switch (_e.label) {
191
+ var expirationDate, issueDate, credentialStatus, title, properties, localeBranding, logo, url, name, issuerAlias;
192
+ var _b, _c, _d, _e;
193
+ return __generator(this, function (_f) {
194
+ switch (_f.label) {
195
195
  case 0:
196
196
  expirationDate = verifiableCredential.expirationDate
197
197
  ? new Date(verifiableCredential.expirationDate).valueOf() / ui_components_core_1.EPOCH_MILLISECONDS
@@ -207,18 +207,18 @@ var toCredentialSummary = function (_a, branding, issuer, subject) {
207
207
  : verifiableCredential.type.filter(function (value) { return value !== 'VerifiableCredential'; })[0];
208
208
  return [4, toCredentialDetailsRow(verifiableCredential.credentialSubject, subject, issuer)];
209
209
  case 1:
210
- properties = _e.sent();
210
+ properties = _f.sent();
211
211
  return [4, (0, exports.selectAppLocaleBranding)({ localeBranding: branding })];
212
212
  case 2:
213
- localeBranding = _e.sent();
213
+ localeBranding = _f.sent();
214
214
  logo = (0, utils_2.getIssuerLogo)(verifiableCredential, localeBranding);
215
215
  url = typeof verifiableCredential.issuer !== 'string' ? verifiableCredential.issuer.url : undefined;
216
- issuerName = typeof verifiableCredential.issuer === 'string'
216
+ name = typeof verifiableCredential.issuer === 'string'
217
217
  ? verifiableCredential.issuer
218
218
  : (_c = (_b = verifiableCredential.issuer) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : (_d = verifiableCredential.issuer) === null || _d === void 0 ? void 0 : _d.id;
219
219
  issuerAlias = undefined;
220
- if (typeof (verifiableCredential === null || verifiableCredential === void 0 ? void 0 : verifiableCredential.issuer) === 'object' && issuerName) {
221
- issuerAlias = issuerName;
220
+ if (typeof (verifiableCredential === null || verifiableCredential === void 0 ? void 0 : verifiableCredential.issuer) === 'object' && ((_e = verifiableCredential.issuer) === null || _e === void 0 ? void 0 : _e.name)) {
221
+ issuerAlias = verifiableCredential.issuer.name;
222
222
  }
223
223
  if (!issuerAlias && issuer) {
224
224
  issuerAlias = issuer.contact.displayName;
@@ -236,7 +236,7 @@ var toCredentialSummary = function (_a, branding, issuer, subject) {
236
236
  properties: properties,
237
237
  branding: localeBranding,
238
238
  issuer: {
239
- name: issuerName,
239
+ name: name,
240
240
  alias: issuerAlias ? (issuerAlias.length > 50 ? "".concat(issuerAlias.substring(0, 50), "...") : issuerAlias) : '',
241
241
  image: logo,
242
242
  url: url
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.52+d8b6eef",
4
+ "version": "0.2.1-unstable.67+9cddb26",
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>",
@@ -32,7 +32,7 @@
32
32
  "@sphereon/ssi-sdk.core": "0.26.1-next.6",
33
33
  "@sphereon/ssi-sdk.data-store": "0.26.1-next.6",
34
34
  "@sphereon/ssi-types": "0.26.1-next.6",
35
- "@sphereon/ui-components.core": "0.2.1-unstable.52+d8b6eef",
35
+ "@sphereon/ui-components.core": "0.2.1-unstable.67+9cddb26",
36
36
  "@veramo/core": "4.2.0",
37
37
  "@veramo/utils": "4.2.0",
38
38
  "i18n-js": "^3.8.0",
@@ -49,5 +49,5 @@
49
49
  "peerDependencies": {
50
50
  "react": ">= 18"
51
51
  },
52
- "gitHead": "d8b6eef1718b727f7a6fb17fe98069e4899b5900"
52
+ "gitHead": "9cddb26b8a2dc52d5bdab44c05ae7b01863c23b1"
53
53
  }