@sphereon/ui-components.core 0.1.3-unstable.151 → 0.1.3-unstable.153
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/index.js +2 -2
- package/dist/localization/Localization.js +11 -11
- package/dist/localization/translations/en.json +4 -1
- package/dist/localization/translations/nl.json +4 -1
- package/dist/regexes/index.js +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/ssi/colors.js +16 -16
- package/dist/styles/ssi/css/index.js +1 -1
- package/dist/styles/ssi/typography.js +4 -4
- package/dist/types/base64/index.js +1 -1
- package/dist/types/button/index.js +2 -2
- package/dist/types/credential/index.js +4 -4
- package/dist/types/image/index.d.ts +1 -0
- package/dist/types/image/index.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/label/index.js +2 -2
- package/dist/types/localization/index.js +2 -2
- package/dist/types/style/index.js +2 -2
- package/dist/types/tab/index.js +1 -1
- package/dist/types/toast/index.js +2 -2
- package/dist/utils/DateUtils.js +4 -4
- package/dist/utils/FileUtils.js +2 -2
- package/dist/utils/ImageUtils.d.ts +1 -0
- package/dist/utils/ImageUtils.js +9 -2
- package/dist/utils/TranslationUtils.js +14 -14
- package/dist/utils/TypeUtils.d.ts +2 -0
- package/dist/utils/TypeUtils.js +35 -0
- package/dist/utils/UserUtils.js +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -16,10 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
exports.__esModule = true;
|
|
20
20
|
exports.Localization = void 0;
|
|
21
21
|
var Localization_1 = __importDefault(require("./localization/Localization"));
|
|
22
|
-
exports.Localization = Localization_1
|
|
22
|
+
exports.Localization = Localization_1["default"];
|
|
23
23
|
__exportStar(require("./utils"), exports);
|
|
24
24
|
__exportStar(require("./types"), exports);
|
|
25
25
|
__exportStar(require("./styles"), exports);
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
var _a;
|
|
17
|
-
|
|
17
|
+
exports.__esModule = true;
|
|
18
18
|
exports.translate = void 0;
|
|
19
19
|
var i18n_js_1 = __importDefault(require("i18n-js"));
|
|
20
20
|
var lodash_memoize_1 = __importDefault(require("lodash.memoize"));
|
|
@@ -28,20 +28,20 @@ var Localization = (function () {
|
|
|
28
28
|
_a[types_1.SupportedLanguage.ENGLISH] = function () { return require('./translations/en.json'); },
|
|
29
29
|
_a[types_1.SupportedLanguage.DUTCH] = function () { return require('./translations/nl.json'); },
|
|
30
30
|
_a);
|
|
31
|
-
Localization.translate = (0, lodash_memoize_1
|
|
31
|
+
Localization.translate = (0, lodash_memoize_1["default"])(function (key, config) {
|
|
32
32
|
var _a, _c;
|
|
33
|
-
if (Object.keys(i18n_js_1
|
|
34
|
-
i18n_js_1
|
|
35
|
-
_a[types_1.SupportedLanguage.ENGLISH] =
|
|
33
|
+
if (Object.keys(i18n_js_1["default"].translations).length === 0) {
|
|
34
|
+
i18n_js_1["default"].translations = (_a = {},
|
|
35
|
+
_a[types_1.SupportedLanguage.ENGLISH] = Localization.translationGetters[types_1.SupportedLanguage.ENGLISH](),
|
|
36
36
|
_a);
|
|
37
|
-
i18n_js_1
|
|
37
|
+
i18n_js_1["default"].locale = types_1.SupportedLanguage.ENGLISH;
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
i18n_js_1
|
|
41
|
-
_c[i18n_js_1
|
|
40
|
+
i18n_js_1["default"].translations = (_c = {},
|
|
41
|
+
_c[i18n_js_1["default"].locale] = __assign(__assign({}, i18n_js_1["default"].translations[i18n_js_1["default"].locale]), Localization.translationGetters[_b.findSupportedLanguage(i18n_js_1["default"].locale) || types_1.SupportedLanguage.ENGLISH]()),
|
|
42
42
|
_c);
|
|
43
43
|
}
|
|
44
|
-
return i18n_js_1
|
|
44
|
+
return i18n_js_1["default"].t(key, config);
|
|
45
45
|
}, function (key, config) { return (config ? key + JSON.stringify(config) : key); });
|
|
46
46
|
Localization.findSupportedLanguage = function (locale) {
|
|
47
47
|
for (var _i = 0, _a = Object.values(types_1.SupportedLanguage); _i < _a.length; _i++) {
|
|
@@ -52,9 +52,9 @@ var Localization = (function () {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
Localization.getLocale = function () {
|
|
55
|
-
return i18n_js_1
|
|
55
|
+
return i18n_js_1["default"].locale || types_1.SupportedLanguage.ENGLISH;
|
|
56
56
|
};
|
|
57
57
|
return Localization;
|
|
58
58
|
}());
|
|
59
59
|
exports.translate = Localization.translate;
|
|
60
|
-
exports
|
|
60
|
+
exports["default"] = Localization;
|
|
@@ -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
|
}
|
package/dist/regexes/index.js
CHANGED
package/dist/styles/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
exports.__esModule = true;
|
|
17
17
|
__exportStar(require("./ssi/colors"), exports);
|
|
18
18
|
__exportStar(require("./ssi/typography"), exports);
|
|
19
19
|
__exportStar(require("./ssi/css"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.buttonColors = exports.elementColors = exports.selectionElementColors = exports.alertColors = exports.profileColors = exports.borderColors = exports.gradientsColors = exports.fontColors = exports.statusColors = exports.logoColors = exports.credentialCardColors = exports.backgroundColors = void 0;
|
|
4
4
|
exports.backgroundColors = {
|
|
5
5
|
primaryDark: '#202537',
|
|
@@ -7,13 +7,13 @@ exports.backgroundColors = {
|
|
|
7
7
|
primaryLight: '#FBFBFB',
|
|
8
8
|
secondaryLight: '#E3E3FF',
|
|
9
9
|
lightGrey: '#E3E3E3',
|
|
10
|
-
orange: '#D74500'
|
|
10
|
+
orange: '#D74500'
|
|
11
11
|
};
|
|
12
12
|
exports.credentialCardColors = {
|
|
13
|
-
default: '#5BDED2'
|
|
13
|
+
"default": '#5BDED2'
|
|
14
14
|
};
|
|
15
15
|
exports.logoColors = {
|
|
16
|
-
default: '#FBFBFB'
|
|
16
|
+
"default": '#FBFBFB'
|
|
17
17
|
};
|
|
18
18
|
exports.statusColors = {
|
|
19
19
|
valid: '#00C249',
|
|
@@ -22,52 +22,52 @@ exports.statusColors = {
|
|
|
22
22
|
verified: '#00C249',
|
|
23
23
|
unverified: '#FF9900',
|
|
24
24
|
error: '#D74500',
|
|
25
|
-
new: '#7276F7',
|
|
25
|
+
"new": '#7276F7',
|
|
26
26
|
approved: '#00C249',
|
|
27
27
|
pending: '#0B81FF',
|
|
28
28
|
archived: '#B3B3B3',
|
|
29
29
|
declined: '#D74500',
|
|
30
30
|
done: '#00C249',
|
|
31
|
-
draft: '#0B81FF'
|
|
31
|
+
draft: '#0B81FF'
|
|
32
32
|
};
|
|
33
33
|
exports.fontColors = {
|
|
34
34
|
dark: '#303030',
|
|
35
35
|
light: '#FBFBFB',
|
|
36
36
|
secondaryButton: '#7664F2',
|
|
37
37
|
greyedOut: '#8F8F8F',
|
|
38
|
-
lightGrey: '#8D9099'
|
|
38
|
+
lightGrey: '#8D9099'
|
|
39
39
|
};
|
|
40
40
|
exports.gradientsColors = {
|
|
41
41
|
100: {
|
|
42
42
|
primaryColor: '#7276F7',
|
|
43
|
-
secondaryColor: '#7C40E8'
|
|
43
|
+
secondaryColor: '#7C40E8'
|
|
44
44
|
},
|
|
45
45
|
200: {
|
|
46
46
|
primaryColor: '#FF9900',
|
|
47
|
-
secondaryColor: '#EE5309'
|
|
48
|
-
}
|
|
47
|
+
secondaryColor: '#EE5309'
|
|
48
|
+
}
|
|
49
49
|
};
|
|
50
50
|
exports.borderColors = {
|
|
51
51
|
dark: '#404D7A',
|
|
52
52
|
light: '#E3E3E3',
|
|
53
53
|
lightGrey: '#ACACAC',
|
|
54
|
-
darkGrey: '#303030'
|
|
54
|
+
darkGrey: '#303030'
|
|
55
55
|
};
|
|
56
56
|
exports.profileColors = {
|
|
57
57
|
100: '#EE5209',
|
|
58
58
|
200: '#FF9900',
|
|
59
59
|
300: '#5BDED3',
|
|
60
60
|
400: '#0B81FF',
|
|
61
|
-
500: '#BD2DFF'
|
|
61
|
+
500: '#BD2DFF'
|
|
62
62
|
};
|
|
63
63
|
exports.alertColors = {
|
|
64
64
|
primaryLight: '#FBFBFB',
|
|
65
|
-
secondaryLight: '#EBEBEB'
|
|
65
|
+
secondaryLight: '#EBEBEB'
|
|
66
66
|
};
|
|
67
67
|
exports.selectionElementColors = {
|
|
68
68
|
primaryDark: '#0B81FF',
|
|
69
69
|
primaryBorderDark: '#FBFBFB',
|
|
70
|
-
selectedRow: '#B7B8D9'
|
|
70
|
+
selectedRow: '#B7B8D9'
|
|
71
71
|
};
|
|
72
72
|
exports.elementColors = {
|
|
73
73
|
blue: '#0B81FF',
|
|
@@ -75,8 +75,8 @@ exports.elementColors = {
|
|
|
75
75
|
purple: '#7276F7',
|
|
76
76
|
100: '#F25409',
|
|
77
77
|
200: '#F78854',
|
|
78
|
-
300: '#8D9099'
|
|
78
|
+
300: '#8D9099'
|
|
79
79
|
};
|
|
80
80
|
exports.buttonColors = {
|
|
81
|
-
100: '#8B1900'
|
|
81
|
+
100: '#8B1900'
|
|
82
82
|
};
|
|
@@ -3,7 +3,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
exports.__esModule = true;
|
|
7
7
|
exports.SSIRoundedEdgesCss = void 0;
|
|
8
8
|
var styled_components_1 = require("styled-components");
|
|
9
9
|
exports.SSIRoundedEdgesCss = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 8px;\n"], ["\n border-radius: 8px;\n"])));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.fontWeight = exports.lineHeight = exports.fontSize = void 0;
|
|
4
4
|
exports.fontSize = {
|
|
5
5
|
100: 9,
|
|
@@ -10,7 +10,7 @@ exports.fontSize = {
|
|
|
10
10
|
600: 16,
|
|
11
11
|
700: 24,
|
|
12
12
|
800: 36,
|
|
13
|
-
64: 64
|
|
13
|
+
64: 64
|
|
14
14
|
};
|
|
15
15
|
exports.lineHeight = {
|
|
16
16
|
100: 13.5,
|
|
@@ -21,7 +21,7 @@ exports.lineHeight = {
|
|
|
21
21
|
600: 24,
|
|
22
22
|
700: 34,
|
|
23
23
|
800: 54,
|
|
24
|
-
64: 64
|
|
24
|
+
64: 64
|
|
25
25
|
};
|
|
26
26
|
exports.fontWeight = {
|
|
27
27
|
normal: 'normal',
|
|
@@ -34,5 +34,5 @@ exports.fontWeight = {
|
|
|
34
34
|
600: '600',
|
|
35
35
|
700: '700',
|
|
36
36
|
800: '800',
|
|
37
|
-
900: '900'
|
|
37
|
+
900: '900'
|
|
38
38
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.ButtonIcon = void 0;
|
|
4
4
|
var ButtonIcon;
|
|
5
5
|
(function (ButtonIcon) {
|
|
@@ -8,4 +8,4 @@ var ButtonIcon;
|
|
|
8
8
|
ButtonIcon["MEATBALLS"] = "meatballs";
|
|
9
9
|
ButtonIcon["DELETE"] = "delete";
|
|
10
10
|
ButtonIcon["FILTER"] = "filter";
|
|
11
|
-
})(ButtonIcon
|
|
11
|
+
})(ButtonIcon = exports.ButtonIcon || (exports.ButtonIcon = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.WorkflowStatus = exports.IssuerStatus = exports.CredentialStatus = void 0;
|
|
4
4
|
var CredentialStatus;
|
|
5
5
|
(function (CredentialStatus) {
|
|
@@ -7,12 +7,12 @@ var CredentialStatus;
|
|
|
7
7
|
CredentialStatus["EXPIRED"] = "expired";
|
|
8
8
|
CredentialStatus["REVOKED"] = "revoked";
|
|
9
9
|
CredentialStatus["DRAFT"] = "draft";
|
|
10
|
-
})(CredentialStatus
|
|
10
|
+
})(CredentialStatus = exports.CredentialStatus || (exports.CredentialStatus = {}));
|
|
11
11
|
var IssuerStatus;
|
|
12
12
|
(function (IssuerStatus) {
|
|
13
13
|
IssuerStatus["VERIFIED"] = "verified";
|
|
14
14
|
IssuerStatus["UNVERIFIED"] = "unverified";
|
|
15
|
-
})(IssuerStatus
|
|
15
|
+
})(IssuerStatus = exports.IssuerStatus || (exports.IssuerStatus = {}));
|
|
16
16
|
var WorkflowStatus;
|
|
17
17
|
(function (WorkflowStatus) {
|
|
18
18
|
WorkflowStatus["NEW"] = "new";
|
|
@@ -21,4 +21,4 @@ var WorkflowStatus;
|
|
|
21
21
|
WorkflowStatus["PENDING"] = "pending";
|
|
22
22
|
WorkflowStatus["DONE"] = "done";
|
|
23
23
|
WorkflowStatus["ARCHIVED"] = "archived";
|
|
24
|
-
})(WorkflowStatus
|
|
24
|
+
})(WorkflowStatus = exports.WorkflowStatus || (exports.WorkflowStatus = {}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
package/dist/types/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
exports.__esModule = true;
|
|
17
17
|
__exportStar(require("./button"), exports);
|
|
18
18
|
__exportStar(require("./credential"), exports);
|
|
19
19
|
__exportStar(require("./image"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.LabelType = void 0;
|
|
4
4
|
var LabelType;
|
|
5
5
|
(function (LabelType) {
|
|
6
6
|
LabelType["ISSUER"] = "Issuer";
|
|
7
7
|
LabelType["VERIFIER"] = "Verifier";
|
|
8
|
-
})(LabelType
|
|
8
|
+
})(LabelType = exports.LabelType || (exports.LabelType = {}));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.SupportedLanguage = void 0;
|
|
4
4
|
var SupportedLanguage;
|
|
5
5
|
(function (SupportedLanguage) {
|
|
6
6
|
SupportedLanguage["ENGLISH"] = "en";
|
|
7
7
|
SupportedLanguage["DUTCH"] = "nl";
|
|
8
|
-
})(SupportedLanguage
|
|
8
|
+
})(SupportedLanguage = exports.SupportedLanguage || (exports.SupportedLanguage = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.OpacityStyleEnum = void 0;
|
|
4
4
|
var OpacityStyleEnum;
|
|
5
5
|
(function (OpacityStyleEnum) {
|
|
6
6
|
OpacityStyleEnum[OpacityStyleEnum["DISABLED"] = 0.5] = "DISABLED";
|
|
7
|
-
})(OpacityStyleEnum
|
|
7
|
+
})(OpacityStyleEnum = exports.OpacityStyleEnum || (exports.OpacityStyleEnum = {}));
|
package/dist/types/tab/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.ToastType = void 0;
|
|
4
4
|
var ToastType;
|
|
5
5
|
(function (ToastType) {
|
|
6
6
|
ToastType["SUCCESS"] = "ssiToastSuccess";
|
|
7
7
|
ToastType["ERROR"] = "ssiToastError";
|
|
8
|
-
})(ToastType
|
|
8
|
+
})(ToastType = exports.ToastType || (exports.ToastType = {}));
|
package/dist/utils/DateUtils.js
CHANGED
|
@@ -13,21 +13,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
exports.__esModule = true;
|
|
17
17
|
exports.makeEpochMilli = exports.toLocalDateString = exports.toLocalDateTimeString = exports.DATE_FORMAT_OPTIONS = exports.EPOCH_MILLISECONDS = void 0;
|
|
18
18
|
var Localization_1 = __importDefault(require("../localization/Localization"));
|
|
19
19
|
exports.EPOCH_MILLISECONDS = 1000;
|
|
20
20
|
exports.DATE_FORMAT_OPTIONS = {
|
|
21
21
|
year: 'numeric',
|
|
22
22
|
month: 'numeric',
|
|
23
|
-
day: 'numeric'
|
|
23
|
+
day: 'numeric'
|
|
24
24
|
};
|
|
25
25
|
var toLocalDateTimeString = function (date) {
|
|
26
|
-
return new Date(formatDate(date)).toLocaleString(Localization_1
|
|
26
|
+
return new Date(formatDate(date)).toLocaleString(Localization_1["default"].getLocale(), __assign(__assign({}, exports.DATE_FORMAT_OPTIONS), { hour: 'numeric', minute: 'numeric', second: 'numeric' }));
|
|
27
27
|
};
|
|
28
28
|
exports.toLocalDateTimeString = toLocalDateTimeString;
|
|
29
29
|
var toLocalDateString = function (date) {
|
|
30
|
-
return new Date(formatDate(date)).toLocaleDateString(Localization_1
|
|
30
|
+
return new Date(formatDate(date)).toLocaleDateString(Localization_1["default"].getLocale(), exports.DATE_FORMAT_OPTIONS);
|
|
31
31
|
};
|
|
32
32
|
exports.toLocalDateString = toLocalDateString;
|
|
33
33
|
var formatDate = function (date) {
|
package/dist/utils/FileUtils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
exports.__esModule = true;
|
|
3
3
|
exports.parseBase64Uri = exports.getFileSizeDisplay = void 0;
|
|
4
4
|
var getFileSizeDisplay = function (bytes) {
|
|
5
5
|
if (bytes < 1024) {
|
|
@@ -22,7 +22,7 @@ var parseBase64Uri = function (base64Uri) {
|
|
|
22
22
|
return {
|
|
23
23
|
base64Uri: base64Uri,
|
|
24
24
|
base64: base64Parts[1],
|
|
25
|
-
mimeType: mimeType
|
|
25
|
+
mimeType: mimeType
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
exports.parseBase64Uri = parseBase64Uri;
|
package/dist/utils/ImageUtils.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.calculateAspectRatio = void 0;
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.isBase64ImageUri = exports.calculateAspectRatio = void 0;
|
|
4
4
|
var calculateAspectRatio = function (width, height) {
|
|
5
5
|
return width / height;
|
|
6
6
|
};
|
|
7
7
|
exports.calculateAspectRatio = calculateAspectRatio;
|
|
8
|
+
var isBase64ImageUri = function (value) {
|
|
9
|
+
if (typeof value === 'string') {
|
|
10
|
+
return /^data:image\//.test(value);
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
};
|
|
14
|
+
exports.isBase64ImageUri = isBase64ImageUri;
|
|
@@ -2,38 +2,38 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
exports.__esModule = true;
|
|
6
6
|
exports.getStatusTranslation = void 0;
|
|
7
7
|
var types_1 = require("../types");
|
|
8
8
|
var Localization_1 = __importDefault(require("../localization/Localization"));
|
|
9
9
|
var getStatusTranslation = function (status) {
|
|
10
10
|
switch (status) {
|
|
11
11
|
case types_1.IssuerStatus.VERIFIED:
|
|
12
|
-
return Localization_1
|
|
12
|
+
return Localization_1["default"].translate('issuer_status_verified');
|
|
13
13
|
case types_1.IssuerStatus.UNVERIFIED:
|
|
14
|
-
return Localization_1
|
|
14
|
+
return Localization_1["default"].translate('issuer_status_unverified');
|
|
15
15
|
case types_1.CredentialStatus.VALID:
|
|
16
|
-
return Localization_1
|
|
16
|
+
return Localization_1["default"].translate('credential_status_valid');
|
|
17
17
|
case types_1.CredentialStatus.EXPIRED:
|
|
18
|
-
return Localization_1
|
|
18
|
+
return Localization_1["default"].translate('credential_status_expired');
|
|
19
19
|
case types_1.CredentialStatus.REVOKED:
|
|
20
|
-
return Localization_1
|
|
20
|
+
return Localization_1["default"].translate('credential_status_revoked');
|
|
21
21
|
case types_1.CredentialStatus.DRAFT:
|
|
22
|
-
return Localization_1
|
|
22
|
+
return Localization_1["default"].translate('credential_status_draft');
|
|
23
23
|
case types_1.WorkflowStatus.APPROVED:
|
|
24
|
-
return Localization_1
|
|
24
|
+
return Localization_1["default"].translate('workflow_status_approved');
|
|
25
25
|
case types_1.WorkflowStatus.ARCHIVED:
|
|
26
|
-
return Localization_1
|
|
26
|
+
return Localization_1["default"].translate('workflow_status_archived');
|
|
27
27
|
case types_1.WorkflowStatus.DECLINED:
|
|
28
|
-
return Localization_1
|
|
28
|
+
return Localization_1["default"].translate('workflow_status_declined');
|
|
29
29
|
case types_1.WorkflowStatus.DONE:
|
|
30
|
-
return Localization_1
|
|
30
|
+
return Localization_1["default"].translate('workflow_status_done');
|
|
31
31
|
case types_1.WorkflowStatus.NEW:
|
|
32
|
-
return Localization_1
|
|
32
|
+
return Localization_1["default"].translate('workflow_status_new');
|
|
33
33
|
case types_1.WorkflowStatus.PENDING:
|
|
34
|
-
return Localization_1
|
|
34
|
+
return Localization_1["default"].translate('workflow_status_pending');
|
|
35
35
|
default:
|
|
36
|
-
return Localization_1
|
|
36
|
+
return Localization_1["default"].translate('status_missing');
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
exports.getStatusTranslation = getStatusTranslation;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
else {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
35
|
+
exports.parseToBoolean = parseToBoolean;
|
package/dist/utils/UserUtils.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -13,9 +13,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
exports.__esModule = true;
|
|
17
17
|
__exportStar(require("./ImageUtils"), exports);
|
|
18
18
|
__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-unstable.
|
|
4
|
+
"version": "0.1.3-unstable.153+9c84e89",
|
|
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>",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"i18n-js": "^3.8.0",
|
|
31
31
|
"lodash.memoize": "^4.1.2",
|
|
32
|
-
"styled-components": "^5.3.
|
|
32
|
+
"styled-components": "^5.3.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/i18n-js": "^3.8.4",
|
|
36
36
|
"@types/lodash.memoize": "^4.1.7",
|
|
37
37
|
"@types/node": "^20.4.0",
|
|
38
|
-
"@types/react": "~18.
|
|
39
|
-
"@types/styled-components": "^5.1.
|
|
38
|
+
"@types/react": "~18.0.14",
|
|
39
|
+
"@types/styled-components": "^5.1.15",
|
|
40
40
|
"react": "18.2.0",
|
|
41
|
-
"typescript": "
|
|
41
|
+
"typescript": "4.9.5"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"react": ">=
|
|
44
|
+
"react": ">= 16.8.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9c84e89a4f1bd5f506aa6ab21179d7bfe115cdb6"
|
|
47
47
|
}
|