@sphereon/ui-components.core 0.1.3-unstable.144 → 0.1.3-unstable.145
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.
- package/dist/localization/translations/en.json +3 -1
- package/dist/localization/translations/nl.json +3 -1
- package/dist/types/base64/index.d.ts +5 -0
- package/dist/types/base64/index.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/FileUtils.d.ts +3 -1
- package/dist/utils/FileUtils.js +25 -10
- package/package.json +2 -2
|
@@ -28,5 +28,7 @@
|
|
|
28
28
|
"credential_issuance_wizard_credential_type_label": "Credential type",
|
|
29
29
|
"credential_issuance_wizard_evidence_title": "Evidence",
|
|
30
30
|
"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."
|
|
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
|
+
"file_permission_public_label": "Public",
|
|
33
|
+
"file_permission_private_label": "Private"
|
|
32
34
|
}
|
|
@@ -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
|
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { ParsedBase64Uri } from '../types';
|
|
2
|
+
export declare const getFileSizeDisplay: (bytes: number) => string;
|
|
3
|
+
export declare const parseBase64Uri: (base64Uri: string) => ParsedBase64Uri;
|
package/dist/utils/FileUtils.js
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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.
|
|
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;
|
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.
|
|
4
|
+
"version": "0.1.3-unstable.145+66bd1c4",
|
|
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": "
|
|
46
|
+
"gitHead": "66bd1c46e40b7a5930b8f02404d2924d36954110"
|
|
47
47
|
}
|