@sphereon/ui-components.core 0.1.3-unstable.154 → 0.1.3-unstable.156

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 +1,2 @@
1
1
  export declare const emailAddressValidationRegex: RegExp;
2
+ export declare const base64UriValidationRegex: RegExp;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.emailAddressValidationRegex = void 0;
3
+ exports.base64UriValidationRegex = exports.emailAddressValidationRegex = void 0;
4
4
  exports.emailAddressValidationRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
5
+ exports.base64UriValidationRegex = /^data:image\/[a-zA-Z]+;base64,[A-Za-z0-9+\/_-]*(={0,2})?$/;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
3
  exports.isBase64ImageUri = exports.calculateAspectRatio = void 0;
4
+ var regexes_1 = require("../regexes");
4
5
  var calculateAspectRatio = function (width, height) {
5
6
  return width / height;
6
7
  };
7
8
  exports.calculateAspectRatio = calculateAspectRatio;
8
9
  var isBase64ImageUri = function (value) {
9
10
  if (typeof value === 'string') {
10
- return /^data:image\//.test(value);
11
+ return regexes_1.base64UriValidationRegex.test(value);
11
12
  }
12
13
  return false;
13
14
  };
@@ -26,9 +26,6 @@ var parseToBoolean = function (value) {
26
26
  else if (lowercaseValue === 'false') {
27
27
  return false;
28
28
  }
29
- else {
30
- return null;
31
- }
32
29
  }
33
30
  return null;
34
31
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.core",
3
3
  "private": false,
4
- "version": "0.1.3-unstable.154+450ae63",
4
+ "version": "0.1.3-unstable.156+09743f3",
5
5
  "description": "SSI UI components Core",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -43,5 +43,5 @@
43
43
  "peerDependencies": {
44
44
  "react": ">= 16.8.0"
45
45
  },
46
- "gitHead": "450ae63fecd398014564f949e181684b6852be58"
46
+ "gitHead": "09743f357092048bf50622e69ab3845e44946a4c"
47
47
  }