@sphereon/ui-components.core 0.1.3-unstable.144 → 0.1.3-unstable.146

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.
@@ -6,6 +6,7 @@
6
6
  "credential_status_valid": "Valid",
7
7
  "credential_status_expired": "Expired",
8
8
  "credential_status_revoked": "Revoked",
9
+ "credential_status_draft": "Draft",
9
10
  "workflow_status_approved": "Approved",
10
11
  "workflow_status_archived": "Archived",
11
12
  "workflow_status_declined": "Declined",
@@ -28,5 +29,7 @@
28
29
  "credential_issuance_wizard_credential_type_label": "Credential type",
29
30
  "credential_issuance_wizard_evidence_title": "Evidence",
30
31
  "credential_issuance_wizard_evidence_optional_title": "(optional)",
31
- "credential_issuance_wizard_evidence_description": "Optionally, you can upload one or more documents or files that you want to attach to this credential."
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
+ "file_permission_public_label": "Public",
34
+ "file_permission_private_label": "Private"
32
35
  }
@@ -6,6 +6,7 @@
6
6
  "credential_status_valid": "Geldig",
7
7
  "credential_status_expired": "Verlopen",
8
8
  "credential_status_revoked": "Ingetrokken",
9
+ "credential_status_draft": "Ontwerp",
9
10
  "workflow_status_approved": "Goedgekeurd",
10
11
  "workflow_status_archived": "Gearchiveerd",
11
12
  "workflow_status_declined": "Afgewezen",
@@ -19,7 +20,6 @@
19
20
  "action_delete_label": "Verwijder",
20
21
  "table_pagination_input_caption_go_to": "Ga naar",
21
22
  "table_pagination_input_caption_page": "pagina",
22
- "action_delete_label": "Verwijder",
23
23
  "drag_and_drop_upload_image_caption": "Klik of sleep om een afbeelding te uploaden",
24
24
  "drag_and_drop_upload_evidence_caption": "Klik of sleep om een bewijsdocument te uploaden",
25
25
  "credential_attach_image_description": "Deze afbeelding wordt aan de credential toegevoegd.",
@@ -29,5 +29,7 @@
29
29
  "credential_issuance_wizard_credential_type_label": "Credential type",
30
30
  "credential_issuance_wizard_evidence_title": "Bewijs",
31
31
  "credential_issuance_wizard_evidence_optional_title": "(optioneel)",
32
- "credential_issuance_wizard_evidence_description": "Optioneel kunt u een of meer documenten of bestanden uploaden die u aan deze credential wilt toevoegen."
32
+ "credential_issuance_wizard_evidence_description": "Optioneel kunt u een of meer documenten of bestanden uploaden die u aan deze credential wilt toevoegen.",
33
+ "file_permission_public_label": "Openbaar",
34
+ "file_permission_private_label": "Privaat"
33
35
  }
@@ -22,12 +22,13 @@ exports.statusColors = {
22
22
  verified: '#00C249',
23
23
  unverified: '#FF9900',
24
24
  error: '#D74500',
25
- New: '#7276F7',
26
- Approved: '#00C249',
27
- Pending: '#0B81FF',
28
- Archived: '#B3B3B3',
29
- Declined: '#D74500',
30
- Done: '#00C249'
25
+ "new": '#7276F7',
26
+ approved: '#00C249',
27
+ pending: '#0B81FF',
28
+ archived: '#B3B3B3',
29
+ declined: '#D74500',
30
+ done: '#00C249',
31
+ draft: '#0B81FF'
31
32
  };
32
33
  exports.fontColors = {
33
34
  dark: '#303030',
@@ -0,0 +1,5 @@
1
+ export type ParsedBase64Uri = {
2
+ base64Uri: string;
3
+ base64: string;
4
+ mimeType: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -1,18 +1,19 @@
1
1
  export declare enum CredentialStatus {
2
2
  VALID = "valid",
3
3
  EXPIRED = "expired",
4
- REVOKED = "revoked"
4
+ REVOKED = "revoked",
5
+ DRAFT = "draft"
5
6
  }
6
7
  export declare enum IssuerStatus {
7
8
  VERIFIED = "verified",
8
9
  UNVERIFIED = "unverified"
9
10
  }
10
11
  export declare enum WorkflowStatus {
11
- NEW = "New",
12
- APPROVED = "Approved",
13
- DECLINED = "Declined",
14
- PENDING = "Pending",
15
- DONE = "Done",
16
- ARCHIVED = "Archived"
12
+ NEW = "new",
13
+ APPROVED = "approved",
14
+ DECLINED = "declined",
15
+ PENDING = "pending",
16
+ DONE = "done",
17
+ ARCHIVED = "archived"
17
18
  }
18
19
  export type LabelStatus = CredentialStatus | IssuerStatus | WorkflowStatus;
@@ -6,6 +6,7 @@ var CredentialStatus;
6
6
  CredentialStatus["VALID"] = "valid";
7
7
  CredentialStatus["EXPIRED"] = "expired";
8
8
  CredentialStatus["REVOKED"] = "revoked";
9
+ CredentialStatus["DRAFT"] = "draft";
9
10
  })(CredentialStatus = exports.CredentialStatus || (exports.CredentialStatus = {}));
10
11
  var IssuerStatus;
11
12
  (function (IssuerStatus) {
@@ -14,10 +15,10 @@ var IssuerStatus;
14
15
  })(IssuerStatus = exports.IssuerStatus || (exports.IssuerStatus = {}));
15
16
  var WorkflowStatus;
16
17
  (function (WorkflowStatus) {
17
- WorkflowStatus["NEW"] = "New";
18
- WorkflowStatus["APPROVED"] = "Approved";
19
- WorkflowStatus["DECLINED"] = "Declined";
20
- WorkflowStatus["PENDING"] = "Pending";
21
- WorkflowStatus["DONE"] = "Done";
22
- WorkflowStatus["ARCHIVED"] = "Archived";
18
+ WorkflowStatus["NEW"] = "new";
19
+ WorkflowStatus["APPROVED"] = "approved";
20
+ WorkflowStatus["DECLINED"] = "declined";
21
+ WorkflowStatus["PENDING"] = "pending";
22
+ WorkflowStatus["DONE"] = "done";
23
+ WorkflowStatus["ARCHIVED"] = "archived";
23
24
  })(WorkflowStatus = exports.WorkflowStatus || (exports.WorkflowStatus = {}));
@@ -6,3 +6,4 @@ export * from './localization';
6
6
  export * from './tab';
7
7
  export * from './toast';
8
8
  export * from './style';
9
+ export * from './base64';
@@ -22,3 +22,4 @@ __exportStar(require("./localization"), exports);
22
22
  __exportStar(require("./tab"), exports);
23
23
  __exportStar(require("./toast"), exports);
24
24
  __exportStar(require("./style"), exports);
25
+ __exportStar(require("./base64"), exports);
@@ -1 +1,3 @@
1
- export declare const base64toFile: (base64: string, filename: string, mimeType: string) => File;
1
+ import { ParsedBase64Uri } from '../types';
2
+ export declare const getFileSizeDisplay: (bytes: number) => string;
3
+ export declare const parseBase64Uri: (base64Uri: string) => ParsedBase64Uri;
@@ -1,13 +1,28 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.base64toFile = void 0;
4
- var base64toFile = function (base64, filename, mimeType) {
5
- var base64Parts = base64.split(';base64,');
6
- var contentType = base64Parts[0].split(':')[1];
7
- var byteCharacters = atob(base64Parts[1]);
8
- var byteNumbers = Array.from(byteCharacters).map(function (char) { return char.charCodeAt(0); });
9
- var byteArray = new Uint8Array(byteNumbers);
10
- var blob = new Blob([byteArray], { type: contentType });
11
- return new File([blob], filename, { type: mimeType });
3
+ exports.parseBase64Uri = exports.getFileSizeDisplay = void 0;
4
+ var getFileSizeDisplay = function (bytes) {
5
+ if (bytes < 1024) {
6
+ return "".concat(bytes, " B");
7
+ }
8
+ else if (bytes <= 1024 * 1024) {
9
+ return "".concat((bytes / 1024).toFixed(1), " KB");
10
+ }
11
+ else if (bytes <= 1024 * 1024 * 1024) {
12
+ return "".concat((bytes / (1024 * 1024)).toFixed(1), " MB");
13
+ }
14
+ else {
15
+ return "".concat((bytes / (1024 * 1024 * 1024)).toFixed(1), " GB");
16
+ }
12
17
  };
13
- exports.base64toFile = base64toFile;
18
+ exports.getFileSizeDisplay = getFileSizeDisplay;
19
+ var parseBase64Uri = function (base64Uri) {
20
+ var base64Parts = base64Uri.split(';base64,');
21
+ var mimeType = base64Parts[0].replace('data:', '');
22
+ return {
23
+ base64Uri: base64Uri,
24
+ base64: base64Parts[1],
25
+ mimeType: mimeType
26
+ };
27
+ };
28
+ exports.parseBase64Uri = parseBase64Uri;
@@ -18,6 +18,8 @@ var getStatusTranslation = function (status) {
18
18
  return Localization_1["default"].translate('credential_status_expired');
19
19
  case types_1.CredentialStatus.REVOKED:
20
20
  return Localization_1["default"].translate('credential_status_revoked');
21
+ case types_1.CredentialStatus.DRAFT:
22
+ return Localization_1["default"].translate('credential_status_draft');
21
23
  case types_1.WorkflowStatus.APPROVED:
22
24
  return Localization_1["default"].translate('workflow_status_approved');
23
25
  case types_1.WorkflowStatus.ARCHIVED:
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.144+18cddf4",
4
+ "version": "0.1.3-unstable.146+0e18162",
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": "18cddf4c2d9265f91657a7c00d98674340ca5260"
46
+ "gitHead": "0e1816213efe60a370f36e37b32c80caf4112d30"
47
47
  }