@sphereon/ui-components.core 0.1.3-next.149 → 0.1.3-next.157

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.
@@ -31,5 +31,8 @@
31
31
  "credential_issuance_wizard_evidence_optional_title": "(optional)",
32
32
  "credential_issuance_wizard_evidence_description": "Optionally, you can upload one or more documents or files that you want to attach to this credential.",
33
33
  "file_permission_public_label": "Public",
34
- "file_permission_private_label": "Private"
34
+ "file_permission_private_label": "Private",
35
+ "credentials_view_item_expires_on": "Expires on",
36
+ "json_data_view_attribute_column_label": "Attribute",
37
+ "json_data_view_value_column_label": "Value"
35
38
  }
@@ -31,5 +31,8 @@
31
31
  "credential_issuance_wizard_evidence_optional_title": "(optioneel)",
32
32
  "credential_issuance_wizard_evidence_description": "Optioneel kunt u een of meer documenten of bestanden uploaden die u aan deze credential wilt toevoegen.",
33
33
  "file_permission_public_label": "Openbaar",
34
- "file_permission_private_label": "Privaat"
34
+ "file_permission_private_label": "Privaat",
35
+ "credentials_view_item_expires_on": "Vervalt op",
36
+ "json_data_view_attribute_column_label": "Attribuut",
37
+ "json_data_view_value_column_label": "Waarde"
35
38
  }
@@ -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,6 +1,7 @@
1
1
  export type ImageSize = {
2
2
  height: number;
3
3
  width: number;
4
+ aspectRatio?: number;
4
5
  };
5
6
  export type ImageAttributes = {
6
7
  uri?: string;
@@ -1 +1,2 @@
1
1
  export declare const calculateAspectRatio: (width: number, height: number) => number;
2
+ export declare const isBase64ImageUri: (value: unknown) => boolean;
@@ -1,7 +1,15 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.calculateAspectRatio = void 0;
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;
9
+ var isBase64ImageUri = function (value) {
10
+ if (typeof value === 'string') {
11
+ return regexes_1.base64UriValidationRegex.test(value);
12
+ }
13
+ return false;
14
+ };
15
+ exports.isBase64ImageUri = isBase64ImageUri;
@@ -0,0 +1,2 @@
1
+ export declare const isBoolean: (value: unknown) => boolean;
2
+ export declare const parseToBoolean: (value: unknown) => boolean | null;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.parseToBoolean = exports.isBoolean = void 0;
4
+ var isBoolean = function (value) {
5
+ if (typeof value === 'boolean') {
6
+ return true;
7
+ }
8
+ else if (typeof value === 'string') {
9
+ var lowercaseValue = value.toLowerCase();
10
+ return lowercaseValue === 'true' || lowercaseValue === 'false';
11
+ }
12
+ else {
13
+ return false;
14
+ }
15
+ };
16
+ exports.isBoolean = isBoolean;
17
+ var parseToBoolean = function (value) {
18
+ if (typeof value === 'boolean') {
19
+ return value;
20
+ }
21
+ else if (typeof value === 'string') {
22
+ var lowercaseValue = value.toLowerCase();
23
+ if (lowercaseValue === 'true') {
24
+ return true;
25
+ }
26
+ else if (lowercaseValue === 'false') {
27
+ return false;
28
+ }
29
+ }
30
+ return null;
31
+ };
32
+ exports.parseToBoolean = parseToBoolean;
@@ -3,3 +3,4 @@ export * from './DateUtils';
3
3
  export * from './TranslationUtils';
4
4
  export * from './UserUtils';
5
5
  export * from './FileUtils';
6
+ export * from './TypeUtils';
@@ -19,3 +19,4 @@ __exportStar(require("./DateUtils"), exports);
19
19
  __exportStar(require("./TranslationUtils"), exports);
20
20
  __exportStar(require("./UserUtils"), exports);
21
21
  __exportStar(require("./FileUtils"), exports);
22
+ __exportStar(require("./TypeUtils"), exports);
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-next.149+b8b840c",
4
+ "version": "0.1.3-next.157+cd7d4db",
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": "b8b840c0e9384f8386a29f0fbd58e272e77d264d"
46
+ "gitHead": "cd7d4dbd82651ce16d04d08b2aa309258455d1bc"
47
47
  }