@sphereon/ui-components.credential-branding 0.4.1-unstable.168 → 0.4.1-unstable.170

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.
@@ -272,10 +272,12 @@ const toCredentialSummary = async (args) => {
272
272
  };
273
273
  exports.toCredentialSummary = toCredentialSummary;
274
274
  const selectAppLocaleBranding = async (args) => {
275
- var _a, _b, _c, _d, _e, _f, _g;
275
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
276
276
  const appLocale = ui_components_core_1.Localization.getLocale();
277
- const localeBranding = (_a = args.localeBranding) === null || _a === void 0 ? void 0 : _a.find((branding) => { var _a; return ((_a = branding.locale) === null || _a === void 0 ? void 0 : _a.startsWith(appLocale)) || branding.locale === undefined; });
278
- const 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);
277
+ const byLocalePrefix = (locale) => (b) => { var _a; return (_a = b.locale) === null || _a === void 0 ? void 0 : _a.startsWith(locale); };
278
+ const noLocale = (b) => b.locale === undefined || b.locale === '';
279
+ const localeBranding = (_f = (_d = (_b = (_a = args.localeBranding) === null || _a === void 0 ? void 0 : _a.find(byLocalePrefix(appLocale))) !== null && _b !== void 0 ? _b : (_c = args.localeBranding) === null || _c === void 0 ? void 0 : _c.find(noLocale)) !== null && _d !== void 0 ? _d : (appLocale !== 'en' ? (_e = args.localeBranding) === null || _e === void 0 ? void 0 : _e.find(byLocalePrefix('en')) : undefined)) !== null && _f !== void 0 ? _f : (_g = args.localeBranding) === null || _g === void 0 ? void 0 : _g[0];
280
+ const logo = ((_h = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.logo) === null || _h === void 0 ? void 0 : _h.dataUri) || ((_j = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.logo) === null || _j === void 0 ? void 0 : _j.uri);
279
281
  let imagePreloader;
280
282
  if (typeof window === 'undefined') {
281
283
  const { ReactNativeImagePreloader } = await Promise.resolve().then(() => __importStar(require('../services/ReactNativeImagePreloader')));
@@ -289,7 +291,7 @@ const selectAppLocaleBranding = async (args) => {
289
291
  imagePreloader.preload([{ uri: logo }]).catch(() => {
290
292
  });
291
293
  }
292
- const backgroundImage = ((_e = (_d = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.background) === null || _d === void 0 ? void 0 : _d.image) === null || _e === void 0 ? void 0 : _e.dataUri) || ((_g = (_f = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.background) === null || _f === void 0 ? void 0 : _f.image) === null || _g === void 0 ? void 0 : _g.uri);
294
+ const backgroundImage = ((_l = (_k = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.background) === null || _k === void 0 ? void 0 : _k.image) === null || _l === void 0 ? void 0 : _l.dataUri) || ((_o = (_m = localeBranding === null || localeBranding === void 0 ? void 0 : localeBranding.background) === null || _m === void 0 ? void 0 : _m.image) === null || _o === void 0 ? void 0 : _o.uri);
293
295
  if (backgroundImage) {
294
296
  imagePreloader.preload([{ uri: backgroundImage }]).catch(() => {
295
297
  });
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.4.1-unstable.168+baff244",
4
+ "version": "0.4.1-unstable.170+1b385bc",
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,10 +28,10 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@sphereon/ssi-sdk.core": "0.36.1-next.155",
32
- "@sphereon/ssi-sdk.data-store-types": "0.36.1-next.155",
33
- "@sphereon/ssi-types": "0.36.1-next.155",
34
- "@sphereon/ui-components.core": "0.4.1-unstable.168+baff244",
31
+ "@sphereon/ssi-sdk.core": "0.36.1-next.159",
32
+ "@sphereon/ssi-sdk.data-store-types": "0.36.1-next.159",
33
+ "@sphereon/ssi-types": "0.36.1-next.159",
34
+ "@sphereon/ui-components.core": "0.4.1-unstable.170+1b385bc",
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.2"
53
53
  },
54
- "gitHead": "baff244e484348d5f1a9aac488c52ce90880fd12"
54
+ "gitHead": "1b385bc56e0146969d6da5833e8f11e6a25bddb1"
55
55
  }