@sphereon/ui-components.credential-branding 0.3.1-next.17 → 0.3.1-next.21

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,7 +1,12 @@
1
1
  import { VerifiableCredential } from '@veramo/core';
2
2
  import { CredentialRole, IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding, Party } from '@sphereon/ssi-sdk.data-store';
3
- import { CredentialSummary, ISelectAppLocaleBrandingArgs } from '../types';
3
+ import { CredentialDetailsRow, CredentialSummary, ISelectAppLocaleBrandingArgs } from '../types';
4
4
  import { ICredential } from '@sphereon/ssi-types';
5
+ export declare const toCredentialDetailsRow: ({ object, subject, issuer, }: {
6
+ object: Record<string, any>;
7
+ subject?: Party | undefined;
8
+ issuer?: Party | undefined;
9
+ }) => Promise<CredentialDetailsRow[]>;
5
10
  export declare const toNonPersistedCredentialSummary: ({ verifiableCredential, credentialRole, branding, issuer, subject, }: {
6
11
  verifiableCredential: ICredential | VerifiableCredential;
7
12
  credentialRole: CredentialRole;
@@ -90,7 +90,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
90
90
  return to.concat(ar || Array.prototype.slice.call(from));
91
91
  };
92
92
  exports.__esModule = true;
93
- exports.selectAppLocaleBranding = exports.toCredentialSummary = exports.getCredentialIssuerNameAndAlias = exports.getCredentialDisplayName = exports.getDate = exports.toNonPersistedCredentialSummary = void 0;
93
+ exports.selectAppLocaleBranding = exports.toCredentialSummary = exports.getCredentialIssuerNameAndAlias = exports.getCredentialDisplayName = exports.getDate = exports.toNonPersistedCredentialSummary = exports.toCredentialDetailsRow = void 0;
94
94
  var uuid_1 = require("uuid");
95
95
  var utils_1 = require("@veramo/utils");
96
96
  var ui_components_core_1 = require("@sphereon/ui-components.core");
@@ -159,7 +159,7 @@ var toCredentialDetailsRow = function (_a) {
159
159
  }
160
160
  if (!(typeof value === 'object' && value !== null && value !== undefined)) return [3, 3];
161
161
  _e = (_d = rows).concat;
162
- return [4, toCredentialDetailsRow({ object: value, subject: subject, issuer: issuer })];
162
+ return [4, (0, exports.toCredentialDetailsRow)({ object: value, subject: subject, issuer: issuer })];
163
163
  case 2:
164
164
  rows = _e.apply(_d, [_g.sent()]);
165
165
  return [3, 8];
@@ -202,6 +202,7 @@ var toCredentialDetailsRow = function (_a) {
202
202
  });
203
203
  });
204
204
  };
205
+ exports.toCredentialDetailsRow = toCredentialDetailsRow;
205
206
  var toNonPersistedCredentialSummary = function (_a) {
206
207
  var verifiableCredential = _a.verifiableCredential, credentialRole = _a.credentialRole, branding = _a.branding, issuer = _a.issuer, subject = _a.subject;
207
208
  return (0, exports.toCredentialSummary)({
@@ -292,7 +293,7 @@ var toCredentialSummary = function (_a) {
292
293
  localeBranding = _e.sent();
293
294
  credentialStatus = (0, utils_2.getCredentialStatus)(verifiableCredential);
294
295
  title = (0, exports.getCredentialDisplayName)({ verifiableCredential: verifiableCredential, localeBranding: localeBranding });
295
- return [4, toCredentialDetailsRow({
296
+ return [4, (0, exports.toCredentialDetailsRow)({
296
297
  object: __assign(__assign({}, (_d = verifiableCredential.vc) === null || _d === void 0 ? void 0 : _d.credentialSubject), verifiableCredential.credentialSubject),
297
298
  subject: subject,
298
299
  issuer: issuer
@@ -28,6 +28,7 @@ export type CredentialDetailsRow = {
28
28
  isEditable?: boolean;
29
29
  status?: LabelStatus;
30
30
  imageSize?: ImageSize;
31
+ onPress?: () => Promise<void>;
31
32
  };
32
33
  export type LabelStatus = CredentialStatus | IssuerStatus;
33
34
  export interface ISelectAppLocaleBrandingArgs {
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.3.1-next.17+c1d559b",
4
+ "version": "0.3.1-next.21+2c28dd9",
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.29.0",
32
32
  "@sphereon/ssi-sdk.data-store": "0.29.0",
33
33
  "@sphereon/ssi-types": "0.29.0",
34
- "@sphereon/ui-components.core": "0.3.1-next.17+c1d559b",
34
+ "@sphereon/ui-components.core": "0.3.1-next.21+2c28dd9",
35
35
  "@veramo/core": "4.2.0",
36
36
  "@veramo/utils": "4.2.0",
37
37
  "i18n-js": "^3.8.0",
@@ -51,5 +51,5 @@
51
51
  "peerDependencies": {
52
52
  "react": ">= 18"
53
53
  },
54
- "gitHead": "c1d559b18d7d25a72266239807e5382113acac11"
54
+ "gitHead": "2c28dd9129b9c386bee8602b5f5e1ff523da8d16"
55
55
  }