@sphereon/ui-components.core 0.1.3-unstable.15 → 0.1.3-unstable.151
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.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/localization/Localization.js +11 -11
- package/dist/localization/translations/en.json +23 -1
- package/dist/localization/translations/nl.json +23 -1
- package/dist/regexes/index.d.ts +1 -0
- package/dist/regexes/index.js +4 -0
- package/dist/styles/index.js +1 -1
- package/dist/styles/ssi/colors.d.ts +13 -5
- package/dist/styles/ssi/colors.js +47 -12
- package/dist/styles/ssi/css/index.js +1 -1
- package/dist/styles/ssi/typography.d.ts +3 -3
- package/dist/styles/ssi/typography.js +6 -4
- package/dist/types/base64/index.d.ts +5 -0
- package/dist/types/base64/index.js +2 -0
- package/dist/types/button/index.d.ts +7 -0
- package/dist/types/button/index.js +11 -0
- package/dist/types/credential/index.d.ts +11 -2
- package/dist/types/credential/index.js +14 -4
- package/dist/types/image/index.js +1 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +7 -1
- package/dist/types/label/index.d.ts +4 -0
- package/dist/types/label/index.js +8 -0
- package/dist/types/localization/index.js +2 -2
- package/dist/types/style/index.d.ts +7 -0
- package/dist/types/style/index.js +7 -0
- package/dist/types/tab/index.d.ts +12 -0
- package/dist/types/tab/index.js +2 -0
- package/dist/types/toast/index.d.ts +7 -0
- package/dist/types/toast/index.js +8 -0
- package/dist/utils/DateUtils.js +4 -4
- package/dist/utils/FileUtils.d.ts +3 -0
- package/dist/utils/FileUtils.js +28 -0
- package/dist/utils/ImageUtils.js +1 -1
- package/dist/utils/TranslationUtils.js +21 -7
- 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.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,10 +16,11 @@ 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
|
-
exports
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: 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);
|
|
26
|
+
__exportStar(require("./regexes"), 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
|
-
exports
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: 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] = _b.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]), _b.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;
|
|
@@ -6,8 +6,30 @@
|
|
|
6
6
|
"credential_status_valid": "Valid",
|
|
7
7
|
"credential_status_expired": "Expired",
|
|
8
8
|
"credential_status_revoked": "Revoked",
|
|
9
|
+
"credential_status_draft": "Draft",
|
|
10
|
+
"workflow_status_approved": "Approved",
|
|
11
|
+
"workflow_status_archived": "Archived",
|
|
12
|
+
"workflow_status_declined": "Declined",
|
|
13
|
+
"workflow_status_done": "Done",
|
|
14
|
+
"workflow_status_new": "New",
|
|
15
|
+
"workflow_status_pending": "Pending",
|
|
9
16
|
"status_missing": "Unknown",
|
|
10
17
|
"action_filter_caption": "Filter",
|
|
11
18
|
"action_show_caption": "Show:",
|
|
12
|
-
"result_count_label": "Showing {{count}} from {{maxCount}} results"
|
|
19
|
+
"result_count_label": "Showing {{count}} from {{maxCount}} results",
|
|
20
|
+
"action_delete_label": "Delete",
|
|
21
|
+
"table_pagination_input_caption_go_to": "Go to",
|
|
22
|
+
"table_pagination_input_caption_page": "page",
|
|
23
|
+
"drag_and_drop_upload_image_caption": "Click or drag to upload an image",
|
|
24
|
+
"drag_and_drop_upload_evidence_caption": "Click or drag to upload an evidence document",
|
|
25
|
+
"credential_attach_image_description": "This image will be attached to the credential.",
|
|
26
|
+
"credential_attach_evidence_description": "This document will be refer to the credential.",
|
|
27
|
+
"passport_photo_alt": "Passport Photo",
|
|
28
|
+
"credential_issuance_wizard_title": "Issue credential",
|
|
29
|
+
"credential_issuance_wizard_credential_type_label": "Credential type",
|
|
30
|
+
"credential_issuance_wizard_evidence_title": "Evidence",
|
|
31
|
+
"credential_issuance_wizard_evidence_optional_title": "(optional)",
|
|
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"
|
|
13
35
|
}
|
|
@@ -6,8 +6,30 @@
|
|
|
6
6
|
"credential_status_valid": "Geldig",
|
|
7
7
|
"credential_status_expired": "Verlopen",
|
|
8
8
|
"credential_status_revoked": "Ingetrokken",
|
|
9
|
+
"credential_status_draft": "Ontwerp",
|
|
10
|
+
"workflow_status_approved": "Goedgekeurd",
|
|
11
|
+
"workflow_status_archived": "Gearchiveerd",
|
|
12
|
+
"workflow_status_declined": "Afgewezen",
|
|
13
|
+
"workflow_status_done": "Klaar",
|
|
14
|
+
"workflow_status_new": "Nieuw",
|
|
15
|
+
"workflow_status_pending": "In behandeling",
|
|
9
16
|
"status_missing": "Onbekent",
|
|
10
17
|
"action_filter_caption": "Filter",
|
|
11
18
|
"action_show_caption": "Toon:",
|
|
12
|
-
"result_count_label": "Toon {{count}} van {{maxCount}} resultaten"
|
|
19
|
+
"result_count_label": "Toon {{count}} van {{maxCount}} resultaten",
|
|
20
|
+
"action_delete_label": "Verwijder",
|
|
21
|
+
"table_pagination_input_caption_go_to": "Ga naar",
|
|
22
|
+
"table_pagination_input_caption_page": "pagina",
|
|
23
|
+
"drag_and_drop_upload_image_caption": "Klik of sleep om een afbeelding te uploaden",
|
|
24
|
+
"drag_and_drop_upload_evidence_caption": "Klik of sleep om een bewijsdocument te uploaden",
|
|
25
|
+
"credential_attach_image_description": "Deze afbeelding wordt aan de credential toegevoegd.",
|
|
26
|
+
"credential_attach_evidence_description": "Dit document verwijst naar de credential.",
|
|
27
|
+
"passport_photo_alt": "Pasfoto",
|
|
28
|
+
"credential_issuance_wizard_title": "Credential uitgeven",
|
|
29
|
+
"credential_issuance_wizard_credential_type_label": "Credential type",
|
|
30
|
+
"credential_issuance_wizard_evidence_title": "Bewijs",
|
|
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.",
|
|
33
|
+
"file_permission_public_label": "Openbaar",
|
|
34
|
+
"file_permission_private_label": "Privaat"
|
|
13
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const emailAddressValidationRegex: RegExp;
|
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
|
-
exports
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: 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
|
-
import { LabelStatus } from '../../types';
|
|
2
|
-
type BackgroundColor = 'primaryDark' | 'secondaryDark' | 'primaryLight' | 'secondaryLight' | 'lightGrey';
|
|
1
|
+
import { GradientProperties, LabelStatus } from '../../types';
|
|
2
|
+
type BackgroundColor = 'primaryDark' | 'secondaryDark' | 'primaryLight' | 'secondaryLight' | 'lightGrey' | 'orange';
|
|
3
3
|
export declare const backgroundColors: Record<BackgroundColor, string>;
|
|
4
4
|
type CredentialCardColor = 'default';
|
|
5
5
|
export declare const credentialCardColors: Record<CredentialCardColor, string>;
|
|
@@ -8,10 +8,18 @@ export declare const logoColors: Record<LogoColor, string>;
|
|
|
8
8
|
export declare const statusColors: Record<LabelStatus | 'error', string>;
|
|
9
9
|
type FontColor = 'dark' | 'light' | 'secondaryButton' | 'greyedOut' | 'lightGrey';
|
|
10
10
|
export declare const fontColors: Record<FontColor, string>;
|
|
11
|
-
type
|
|
12
|
-
export declare const
|
|
13
|
-
type Border = 'dark' | 'light' | 'lightGrey';
|
|
11
|
+
type HighLightGradient = 100 | 200;
|
|
12
|
+
export declare const gradientsColors: Record<HighLightGradient, GradientProperties>;
|
|
13
|
+
type Border = 'dark' | 'light' | 'lightGrey' | 'darkGrey';
|
|
14
14
|
export declare const borderColors: Record<Border, string>;
|
|
15
15
|
type Profile = 100 | 200 | 300 | 400 | 500;
|
|
16
16
|
export declare const profileColors: Record<Profile, string>;
|
|
17
|
+
type Alerts = 'primaryLight' | 'secondaryLight';
|
|
18
|
+
export declare const alertColors: Record<Alerts, string>;
|
|
19
|
+
type SelectionElement = 'primaryDark' | 'primaryBorderDark' | 'selectedRow';
|
|
20
|
+
export declare const selectionElementColors: Record<SelectionElement, string>;
|
|
21
|
+
type Element = 'blue' | 'lightGrey' | 'purple' | 100 | 200 | 300;
|
|
22
|
+
export declare const elementColors: Record<Element, string>;
|
|
23
|
+
type Button = 100;
|
|
24
|
+
export declare const buttonColors: Record<Button, string>;
|
|
17
25
|
export {};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
3
|
-
exports.profileColors = exports.borderColors = exports.
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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',
|
|
6
6
|
secondaryDark: '#2C334B',
|
|
7
7
|
primaryLight: '#FBFBFB',
|
|
8
8
|
secondaryLight: '#E3E3FF',
|
|
9
|
-
lightGrey: '#E3E3E3'
|
|
9
|
+
lightGrey: '#E3E3E3',
|
|
10
|
+
orange: '#D74500',
|
|
10
11
|
};
|
|
11
12
|
exports.credentialCardColors = {
|
|
12
|
-
|
|
13
|
+
default: '#5BDED2',
|
|
13
14
|
};
|
|
14
15
|
exports.logoColors = {
|
|
15
|
-
|
|
16
|
+
default: '#FBFBFB',
|
|
16
17
|
};
|
|
17
18
|
exports.statusColors = {
|
|
18
19
|
valid: '#00C249',
|
|
@@ -20,28 +21,62 @@ exports.statusColors = {
|
|
|
20
21
|
revoked: '#EE5309',
|
|
21
22
|
verified: '#00C249',
|
|
22
23
|
unverified: '#FF9900',
|
|
23
|
-
error: '#D74500'
|
|
24
|
+
error: '#D74500',
|
|
25
|
+
new: '#7276F7',
|
|
26
|
+
approved: '#00C249',
|
|
27
|
+
pending: '#0B81FF',
|
|
28
|
+
archived: '#B3B3B3',
|
|
29
|
+
declined: '#D74500',
|
|
30
|
+
done: '#00C249',
|
|
31
|
+
draft: '#0B81FF',
|
|
24
32
|
};
|
|
25
33
|
exports.fontColors = {
|
|
26
34
|
dark: '#303030',
|
|
27
35
|
light: '#FBFBFB',
|
|
28
36
|
secondaryButton: '#7664F2',
|
|
29
37
|
greyedOut: '#8F8F8F',
|
|
30
|
-
lightGrey: '#8D9099'
|
|
38
|
+
lightGrey: '#8D9099',
|
|
31
39
|
};
|
|
32
|
-
exports.
|
|
33
|
-
100:
|
|
34
|
-
|
|
40
|
+
exports.gradientsColors = {
|
|
41
|
+
100: {
|
|
42
|
+
primaryColor: '#7276F7',
|
|
43
|
+
secondaryColor: '#7C40E8',
|
|
44
|
+
},
|
|
45
|
+
200: {
|
|
46
|
+
primaryColor: '#FF9900',
|
|
47
|
+
secondaryColor: '#EE5309',
|
|
48
|
+
},
|
|
35
49
|
};
|
|
36
50
|
exports.borderColors = {
|
|
37
51
|
dark: '#404D7A',
|
|
38
52
|
light: '#E3E3E3',
|
|
39
|
-
lightGrey: '#ACACAC'
|
|
53
|
+
lightGrey: '#ACACAC',
|
|
54
|
+
darkGrey: '#303030',
|
|
40
55
|
};
|
|
41
56
|
exports.profileColors = {
|
|
42
57
|
100: '#EE5209',
|
|
43
58
|
200: '#FF9900',
|
|
44
59
|
300: '#5BDED3',
|
|
45
60
|
400: '#0B81FF',
|
|
46
|
-
500: '#BD2DFF'
|
|
61
|
+
500: '#BD2DFF',
|
|
62
|
+
};
|
|
63
|
+
exports.alertColors = {
|
|
64
|
+
primaryLight: '#FBFBFB',
|
|
65
|
+
secondaryLight: '#EBEBEB',
|
|
66
|
+
};
|
|
67
|
+
exports.selectionElementColors = {
|
|
68
|
+
primaryDark: '#0B81FF',
|
|
69
|
+
primaryBorderDark: '#FBFBFB',
|
|
70
|
+
selectedRow: '#B7B8D9',
|
|
71
|
+
};
|
|
72
|
+
exports.elementColors = {
|
|
73
|
+
blue: '#0B81FF',
|
|
74
|
+
lightGrey: '#C4C4C4',
|
|
75
|
+
purple: '#7276F7',
|
|
76
|
+
100: '#F25409',
|
|
77
|
+
200: '#F78854',
|
|
78
|
+
300: '#8D9099',
|
|
79
|
+
};
|
|
80
|
+
exports.buttonColors = {
|
|
81
|
+
100: '#8B1900',
|
|
47
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
|
-
exports
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: 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,7 +1,7 @@
|
|
|
1
|
-
export type FontSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|
|
1
|
+
export type FontSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 64;
|
|
2
2
|
export declare const fontSize: Record<FontSize, number>;
|
|
3
|
-
export type LineHeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|
|
3
|
+
export type LineHeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 64;
|
|
4
4
|
export declare const lineHeight: Record<LineHeight, number>;
|
|
5
5
|
export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
6
6
|
export declare const fontWeight: Record<FontWeight, FontWeight>;
|
|
7
|
-
export type FontStyle = 'h0SemiBold' | 'h1Regular' | 'h1SemiBold' | 'h2Regular' | 'h2SemiBold' | 'h3Regular' | 'h3SemiBold' | 'h4Regular' | 'h4SemiBold' | 'h5Regular' | 'h5SemiBold' | 'h6' | 'h7SemiBold';
|
|
7
|
+
export type FontStyle = 'h0SemiBold' | 'h1Regular' | 'h1SemiBold' | 'h2Regular' | 'h2SemiBold' | 'h3Regular' | 'h3SemiBold' | 'h4Regular' | 'h4SemiBold' | 'h5Regular' | 'h5SemiBold' | 'h6' | 'h7Regular' | 'h7SemiBold' | 'Regular64';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fontWeight = exports.lineHeight = exports.fontSize = void 0;
|
|
4
4
|
exports.fontSize = {
|
|
5
5
|
100: 9,
|
|
@@ -9,7 +9,8 @@ exports.fontSize = {
|
|
|
9
9
|
500: 14,
|
|
10
10
|
600: 16,
|
|
11
11
|
700: 24,
|
|
12
|
-
800: 36
|
|
12
|
+
800: 36,
|
|
13
|
+
64: 64,
|
|
13
14
|
};
|
|
14
15
|
exports.lineHeight = {
|
|
15
16
|
100: 13.5,
|
|
@@ -19,7 +20,8 @@ exports.lineHeight = {
|
|
|
19
20
|
500: 21,
|
|
20
21
|
600: 24,
|
|
21
22
|
700: 34,
|
|
22
|
-
800: 54
|
|
23
|
+
800: 54,
|
|
24
|
+
64: 64,
|
|
23
25
|
};
|
|
24
26
|
exports.fontWeight = {
|
|
25
27
|
normal: 'normal',
|
|
@@ -32,5 +34,5 @@ exports.fontWeight = {
|
|
|
32
34
|
600: '600',
|
|
33
35
|
700: '700',
|
|
34
36
|
800: '800',
|
|
35
|
-
900: '900'
|
|
37
|
+
900: '900',
|
|
36
38
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonIcon = void 0;
|
|
4
|
+
var ButtonIcon;
|
|
5
|
+
(function (ButtonIcon) {
|
|
6
|
+
ButtonIcon["ADD"] = "add";
|
|
7
|
+
ButtonIcon["ARROW_DOWN"] = "arrowDown";
|
|
8
|
+
ButtonIcon["MEATBALLS"] = "meatballs";
|
|
9
|
+
ButtonIcon["DELETE"] = "delete";
|
|
10
|
+
ButtonIcon["FILTER"] = "filter";
|
|
11
|
+
})(ButtonIcon || (exports.ButtonIcon = ButtonIcon = {}));
|
|
@@ -1,10 +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
|
-
export
|
|
11
|
+
export declare enum WorkflowStatus {
|
|
12
|
+
NEW = "new",
|
|
13
|
+
APPROVED = "approved",
|
|
14
|
+
DECLINED = "declined",
|
|
15
|
+
PENDING = "pending",
|
|
16
|
+
DONE = "done",
|
|
17
|
+
ARCHIVED = "archived"
|
|
18
|
+
}
|
|
19
|
+
export type LabelStatus = CredentialStatus | IssuerStatus | WorkflowStatus;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
3
|
-
exports.IssuerStatus = exports.CredentialStatus = void 0;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowStatus = exports.IssuerStatus = exports.CredentialStatus = void 0;
|
|
4
4
|
var CredentialStatus;
|
|
5
5
|
(function (CredentialStatus) {
|
|
6
6
|
CredentialStatus["VALID"] = "valid";
|
|
7
7
|
CredentialStatus["EXPIRED"] = "expired";
|
|
8
8
|
CredentialStatus["REVOKED"] = "revoked";
|
|
9
|
-
|
|
9
|
+
CredentialStatus["DRAFT"] = "draft";
|
|
10
|
+
})(CredentialStatus || (exports.CredentialStatus = CredentialStatus = {}));
|
|
10
11
|
var IssuerStatus;
|
|
11
12
|
(function (IssuerStatus) {
|
|
12
13
|
IssuerStatus["VERIFIED"] = "verified";
|
|
13
14
|
IssuerStatus["UNVERIFIED"] = "unverified";
|
|
14
|
-
})(IssuerStatus
|
|
15
|
+
})(IssuerStatus || (exports.IssuerStatus = IssuerStatus = {}));
|
|
16
|
+
var WorkflowStatus;
|
|
17
|
+
(function (WorkflowStatus) {
|
|
18
|
+
WorkflowStatus["NEW"] = "new";
|
|
19
|
+
WorkflowStatus["APPROVED"] = "approved";
|
|
20
|
+
WorkflowStatus["DECLINED"] = "declined";
|
|
21
|
+
WorkflowStatus["PENDING"] = "pending";
|
|
22
|
+
WorkflowStatus["DONE"] = "done";
|
|
23
|
+
WorkflowStatus["ARCHIVED"] = "archived";
|
|
24
|
+
})(WorkflowStatus || (exports.WorkflowStatus = WorkflowStatus = {}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -13,7 +13,13 @@ 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
|
-
exports
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./button"), exports);
|
|
17
18
|
__exportStar(require("./credential"), exports);
|
|
18
19
|
__exportStar(require("./image"), exports);
|
|
20
|
+
__exportStar(require("./label"), exports);
|
|
19
21
|
__exportStar(require("./localization"), exports);
|
|
22
|
+
__exportStar(require("./tab"), exports);
|
|
23
|
+
__exportStar(require("./toast"), exports);
|
|
24
|
+
__exportStar(require("./style"), exports);
|
|
25
|
+
__exportStar(require("./base64"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LabelType = void 0;
|
|
4
|
+
var LabelType;
|
|
5
|
+
(function (LabelType) {
|
|
6
|
+
LabelType["ISSUER"] = "Issuer";
|
|
7
|
+
LabelType["VERIFIER"] = "Verifier";
|
|
8
|
+
})(LabelType || (exports.LabelType = LabelType = {}));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: 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 = SupportedLanguage = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpacityStyleEnum = void 0;
|
|
4
|
+
var OpacityStyleEnum;
|
|
5
|
+
(function (OpacityStyleEnum) {
|
|
6
|
+
OpacityStyleEnum[OpacityStyleEnum["DISABLED"] = 0.5] = "DISABLED";
|
|
7
|
+
})(OpacityStyleEnum || (exports.OpacityStyleEnum = OpacityStyleEnum = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
export type TabRoute = {
|
|
3
|
+
key: string;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
export type TabViewRoute = TabRoute & {
|
|
7
|
+
content: ComponentType<unknown>;
|
|
8
|
+
};
|
|
9
|
+
export type TabNavigationState = {
|
|
10
|
+
index: number;
|
|
11
|
+
routes: Array<TabViewRoute>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToastType = void 0;
|
|
4
|
+
var ToastType;
|
|
5
|
+
(function (ToastType) {
|
|
6
|
+
ToastType["SUCCESS"] = "ssiToastSuccess";
|
|
7
|
+
ToastType["ERROR"] = "ssiToastError";
|
|
8
|
+
})(ToastType || (exports.ToastType = 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
|
-
exports
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: 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) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
+
}
|
|
17
|
+
};
|
|
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/dist/utils/ImageUtils.js
CHANGED
|
@@ -2,24 +2,38 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: 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
|
+
case types_1.CredentialStatus.DRAFT:
|
|
22
|
+
return Localization_1.default.translate('credential_status_draft');
|
|
23
|
+
case types_1.WorkflowStatus.APPROVED:
|
|
24
|
+
return Localization_1.default.translate('workflow_status_approved');
|
|
25
|
+
case types_1.WorkflowStatus.ARCHIVED:
|
|
26
|
+
return Localization_1.default.translate('workflow_status_archived');
|
|
27
|
+
case types_1.WorkflowStatus.DECLINED:
|
|
28
|
+
return Localization_1.default.translate('workflow_status_declined');
|
|
29
|
+
case types_1.WorkflowStatus.DONE:
|
|
30
|
+
return Localization_1.default.translate('workflow_status_done');
|
|
31
|
+
case types_1.WorkflowStatus.NEW:
|
|
32
|
+
return Localization_1.default.translate('workflow_status_new');
|
|
33
|
+
case types_1.WorkflowStatus.PENDING:
|
|
34
|
+
return Localization_1.default.translate('workflow_status_pending');
|
|
21
35
|
default:
|
|
22
|
-
return Localization_1
|
|
36
|
+
return Localization_1.default.translate('status_missing');
|
|
23
37
|
}
|
|
24
38
|
};
|
|
25
39
|
exports.getStatusTranslation = getStatusTranslation;
|
package/dist/utils/UserUtils.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -13,8 +13,9 @@ 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
|
-
exports
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: 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
|
+
__exportStar(require("./FileUtils"), 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.151+a801742",
|
|
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.11"
|
|
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.2.67",
|
|
39
|
+
"@types/styled-components": "^5.1.34",
|
|
40
40
|
"react": "18.2.0",
|
|
41
|
-
"typescript": "4.
|
|
41
|
+
"typescript": "5.4.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"react": ">=
|
|
44
|
+
"react": ">= 18"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "a801742816ac3a0f7e48790ec60984ec22d466d0"
|
|
47
47
|
}
|