@sphereon/ui-components.credential-branding 0.2.1-unstable.7 → 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 ImageUtils_1 = require("../utils/ImageUtils");
54
- var WebImagePreloader_1 = require("../services/WebImagePreloader");
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, ImageUtils_1.isImageAddress)(image)];
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, ImageUtils_1.isImageAddress)(value)];
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, MappingUtils_1.getCredentialStatus)(verifiableCredential);
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, ImageUtils_1.getIssuerLogo)(verifiableCredential, localeBranding);
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
- throw new Error('Not implemented');
238
+ imagePreloader = new services_1.ReactNativeImagePreloader();
240
239
  }
241
240
  else {
242
- imagePreloader = new WebImagePreloader_1.WebImagePreloader();
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.7+aec40fd",
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>",
@@ -28,23 +28,20 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@sphereon/ssi-sdk.core": "^0.23.4",
32
- "@sphereon/ssi-sdk.data-store": "0.23.4",
33
- "@sphereon/ssi-types": "^0.23.4",
34
- "@sphereon/ui-components.core": "0.2.1-unstable.7+aec40fd",
31
+ "@sphereon/ssi-sdk.core": "0.23.5-unstable.74+9c3c2083",
32
+ "@sphereon/ssi-sdk.data-store": "0.23.5-unstable.74+9c3c2083",
33
+ "@sphereon/ssi-types": "0.23.5-unstable.74+9c3c2083",
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
- "lodash.memoize": "^4.1.2",
39
- "styled-components": "^5.3.3",
38
+ "react-native-fast-image": "^8.6.3",
40
39
  "uuid": "^9.0.1"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@types/i18n-js": "^3.8.4",
44
- "@types/lodash.memoize": "^4.1.7",
45
43
  "@types/node": "^20.4.0",
46
44
  "@types/react": "~18.2.67",
47
- "@types/styled-components": "^5.1.15",
48
45
  "@types/uuid": "^9.0.8",
49
46
  "react": "18.2.0",
50
47
  "typescript": "4.9.5"
@@ -52,5 +49,5 @@
52
49
  "peerDependencies": {
53
50
  "react": ">= 18"
54
51
  },
55
- "gitHead": "aec40fdcb7a471f93fa72e9b1fc626030b251d0a"
52
+ "gitHead": "cd2c874a5683726874cd8744c256f8cc5ad8f2d7"
56
53
  }