@ebrains/react 0.3.0-alpha.0 → 0.5.0-alpha.0
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/analytics-1cde8e4a.esm.js +47 -0
- package/color-2554aad6.esm.js +122 -0
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion.entry.esm.js +24 -30
- package/eds-alert_17.entry.esm.js +187 -0
- package/{eds-card-desc_3.entry.esm.js → eds-avatar_4.entry.esm.js} +71 -7
- package/eds-card-generic.entry.esm.js +6 -7
- package/eds-card-project.entry.esm.js +12 -11
- package/eds-card-section.entry.esm.js +4 -4
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +5 -6
- package/eds-card-wrapper.entry.esm.js +4 -4
- package/eds-code-block.entry.esm.js +56 -9
- package/eds-components-section.entry.esm.js +14 -2
- package/eds-docs-palettes.entry.esm.js +1 -1
- package/eds-docs-tokens.entry.esm.js +1 -1
- package/eds-dropdown_2.entry.esm.js +235 -0
- package/eds-form.entry.esm.js +59 -23
- package/eds-frame.entry.esm.js +4 -4
- package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
- package/eds-icon-arrow-right.entry.esm.js +1 -1
- package/eds-icon-bluesky.entry.esm.js +1 -1
- package/eds-icon-chevron-down.entry.esm.js +1 -1
- package/eds-icon-chevron-left.entry.esm.js +1 -1
- package/eds-icon-chevron-right.entry.esm.js +1 -1
- package/eds-icon-chevron-up.entry.esm.js +1 -1
- package/eds-icon-close.entry.esm.js +1 -1
- package/eds-icon-copy.entry.esm.js +1 -1
- package/eds-icon-eu.entry.esm.js +1 -1
- package/eds-icon-facebook.entry.esm.js +1 -1
- package/eds-icon-gitlab.entry.esm.js +1 -1
- package/eds-icon-linkedin.entry.esm.js +1 -1
- package/eds-icon-loader.entry.esm.js +1 -1
- package/eds-icon-mastodon.entry.esm.js +1 -1
- package/eds-icon-menu.entry.esm.js +1 -1
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-user.entry.esm.js +1 -1
- package/eds-icon-youtube.entry.esm.js +1 -1
- package/eds-input_7.entry.esm.js +39 -28
- package/eds-login.entry.esm.js +66 -45
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-matomo-notice.entry.esm.js +1 -2
- package/eds-modal.entry.esm.js +57 -42
- package/eds-navigator.entry.esm.js +5 -5
- package/eds-pagination_2.entry.esm.js +35 -19
- package/eds-progress-bar.entry.esm.js +7 -2
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-svg-repository.entry.esm.js +1 -1
- package/eds-tab.entry.esm.js +1 -1
- package/eds-tabs-content.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +4 -4
- package/eds-timeline.entry.esm.js +6 -5
- package/eds-tooltip.entry.esm.js +12 -3
- package/eds-trl.entry.esm.js +9 -10
- package/eds-user.entry.esm.js +118 -0
- package/eds-vertical-stepper.entry.esm.js +81 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +18 -13
- package/{keycloak-13893af6.esm.js → keycloak-d502ec16.esm.js} +219 -168
- package/logo-space.entry.esm.js +4 -4
- package/logo-variations-horizontal_2.entry.esm.js +26 -26
- package/logo-wrong-usage.entry.esm.js +37 -37
- package/package.json +1 -1
- package/src/components.d.ts +3 -1
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +26 -26
- package/token-typography.entry.esm.js +2 -2
- package/color-0ba8ed56.esm.js +0 -423
- package/eds-alert.entry.esm.js +0 -102
- package/eds-avatar_17.entry.esm.js +0 -209
- package/eds-rating.entry.esm.js +0 -71
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-dom';
|
|
@@ -29,14 +30,17 @@ const EdsPagination = class {
|
|
|
29
30
|
componentDidLoad() {
|
|
30
31
|
// Emit context for each eds-link element after the component is fully loaded
|
|
31
32
|
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
32
|
-
|
|
33
|
+
links.forEach(lnk => {
|
|
34
|
+
this.emitContext(lnk);
|
|
35
|
+
});
|
|
36
|
+
/*if (links.length > 0) {
|
|
33
37
|
// Emit context for the first link
|
|
34
38
|
this.emitContext(links[0]);
|
|
35
|
-
|
|
39
|
+
// Emit context for the last link, if it's different from the first
|
|
36
40
|
if (links.length > 1) {
|
|
37
41
|
this.emitContext(links[links.length - 1]);
|
|
38
42
|
}
|
|
39
|
-
}
|
|
43
|
+
}*/
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
42
46
|
* Emits a custom event called `parentContext` for a given link element.
|
|
@@ -167,12 +171,12 @@ const EdsPagination = class {
|
|
|
167
171
|
}
|
|
168
172
|
render() {
|
|
169
173
|
return h("div", {
|
|
170
|
-
key: '
|
|
174
|
+
key: '8c8418eec263acc153a928b752775458f897504f'
|
|
171
175
|
}, this.total > 0 && this.mode === 'default' && h("p", {
|
|
172
|
-
key: '
|
|
176
|
+
key: '02a5a69772a4812f10b29e8df117b72df210614d',
|
|
173
177
|
class: "f-ui-03 text-lightest mb-28 w-full text-center"
|
|
174
178
|
}, h("span", {
|
|
175
|
-
key: '
|
|
179
|
+
key: 'ef9804843100c722643c24e31a05f86f2d55efa0',
|
|
176
180
|
class: "sr-only"
|
|
177
181
|
}, "Results:"), this.pageResults()), this.mode === 'navigator' || this.lastPage && this.lastPage > 1 ? h("nav", {
|
|
178
182
|
"aria-label": "Pagination"
|
|
@@ -342,10 +346,24 @@ const EdsTable = class {
|
|
|
342
346
|
}
|
|
343
347
|
handlePageChange(newPage) {
|
|
344
348
|
this.currentPage = newPage;
|
|
349
|
+
sendAnalytics({
|
|
350
|
+
category: 'ui-component',
|
|
351
|
+
parentContext: null,
|
|
352
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
|
|
353
|
+
name: `${newPage}` || '',
|
|
354
|
+
action: 'page'
|
|
355
|
+
});
|
|
345
356
|
}
|
|
346
357
|
handleSearch(event) {
|
|
347
358
|
this.searchQuery = event.target.value;
|
|
348
359
|
this.currentPage = 1;
|
|
360
|
+
/*sendAnalytics({
|
|
361
|
+
category: 'ui-component',
|
|
362
|
+
parentContext: null,
|
|
363
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
|
|
364
|
+
name: `${this.searchQuery}` || '',
|
|
365
|
+
action: 'page'
|
|
366
|
+
});*/
|
|
349
367
|
}
|
|
350
368
|
renderCell(value, column) {
|
|
351
369
|
var _a;
|
|
@@ -383,13 +401,11 @@ const EdsTable = class {
|
|
|
383
401
|
const visibleColumnsCount = this.getVisibleColumnsCount();
|
|
384
402
|
/// Calculate container width based on the optional prop or parent's measured width.
|
|
385
403
|
const containerWidth = this.hostWidth && this.hostWidth.trim() !== '' ? Number(this.hostWidth) : this.hostEl.parentElement instanceof HTMLElement ? this.hostEl.parentElement.getBoundingClientRect().width : this.hostEl.getRootNode().host instanceof HTMLElement ? this.hostEl.getRootNode().host.getBoundingClientRect().width : 400;
|
|
386
|
-
//console.log('containerWidth:', containerWidth);
|
|
387
404
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor(containerWidth / visibleColumnsCount * this.divisionFactor()) : 100;
|
|
388
|
-
console.log('columnWidth:', columnWidth);
|
|
389
405
|
return h("div", {
|
|
390
|
-
key: '
|
|
406
|
+
key: '66ca59804bc8054655ed0d942104516fe4cd259b'
|
|
391
407
|
}, this.searchEnabled && h("div", {
|
|
392
|
-
key: '
|
|
408
|
+
key: 'df7267fc443da042e4b6ff81ded5800a2213bd73'
|
|
393
409
|
}, h("eds-input-field", {
|
|
394
410
|
key: 1,
|
|
395
411
|
name: "search",
|
|
@@ -399,26 +415,26 @@ const EdsTable = class {
|
|
|
399
415
|
// @ts-ignore
|
|
400
416
|
onInput: event => this.handleSearch(event)
|
|
401
417
|
})), h("div", {
|
|
402
|
-
key: '
|
|
418
|
+
key: '80ac1fcb3802f9f5d5eabe016fb7345b88908b36',
|
|
403
419
|
class: "mt-20"
|
|
404
420
|
}, h("table", {
|
|
405
|
-
key: '
|
|
421
|
+
key: '09acf39378b1a4c8bfe40b496ec6bf71a2d761ca',
|
|
406
422
|
class: "block overflow-x-auto mt-6 p-0"
|
|
407
423
|
}, h("thead", {
|
|
408
|
-
key: '
|
|
424
|
+
key: '8b844806cfef10d1a59da54a385ee8ed6c167050'
|
|
409
425
|
}, h("tr", {
|
|
410
|
-
key: '
|
|
426
|
+
key: '1b3cff91bdaf225e9f3b337e245cd80ad4772b6a',
|
|
411
427
|
class: "m-0 p-0 border border-softer even:bg-inverse-softer"
|
|
412
428
|
}, this.columns.map(column => {
|
|
413
429
|
var _a;
|
|
414
430
|
return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && h("th", {
|
|
415
431
|
class: "m-0 py-8 border border-softer f-ui-02 break-words",
|
|
416
432
|
style: {
|
|
417
|
-
minWidth: `${columnWidth}px`
|
|
433
|
+
minWidth: `${columnWidth - 5}px`
|
|
418
434
|
}
|
|
419
435
|
}, column);
|
|
420
436
|
}))), h("tbody", {
|
|
421
|
-
key: '
|
|
437
|
+
key: '93dfd3abd196779c288f85bb6a357ad3e9c01418'
|
|
422
438
|
}, paginatedRows.map(row => h("tr", {
|
|
423
439
|
class: "m-0 p-0 border border-softer even:bg-inverse-softer"
|
|
424
440
|
}, this.columns.map(column => {
|
|
@@ -426,14 +442,14 @@ const EdsTable = class {
|
|
|
426
442
|
return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && h("td", {
|
|
427
443
|
class: "text-center border border-softer m-0 py-8 f-ui-2 break-words",
|
|
428
444
|
style: {
|
|
429
|
-
minWidth: `${columnWidth}px`
|
|
445
|
+
minWidth: `${columnWidth - 5}px`
|
|
430
446
|
}
|
|
431
447
|
}, this.renderCell(row[column], column));
|
|
432
448
|
})))))), this.shouldEnablePagination() && h("div", {
|
|
433
|
-
key: '
|
|
449
|
+
key: '516b65d78a9ea91060c1dfcb3306bbd3ac2c6f58',
|
|
434
450
|
class: "mt-20"
|
|
435
451
|
}, h("eds-pagination", {
|
|
436
|
-
key: '
|
|
452
|
+
key: 'abe3a593827d99437a06e204ea9d8ef92f80aba7',
|
|
437
453
|
currentPage: this.currentPage,
|
|
438
454
|
lastPage: lastPage,
|
|
439
455
|
perPage: this.rowsPerPage,
|
|
@@ -20,10 +20,15 @@ const EdsProgressBar = class {
|
|
|
20
20
|
render() {
|
|
21
21
|
const progressValue = this.value;
|
|
22
22
|
return h("div", {
|
|
23
|
-
key: '
|
|
23
|
+
key: '0f47fedbf9d44887f65b399e184215f0937b1df1',
|
|
24
|
+
role: "progressbar",
|
|
25
|
+
"aria-valuemin": "0",
|
|
26
|
+
"aria-valuemax": "100",
|
|
27
|
+
"aria-valuenow": progressValue,
|
|
28
|
+
"aria-valuetext": `${progressValue}%`,
|
|
24
29
|
class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden"
|
|
25
30
|
}, h("div", {
|
|
26
|
-
key: '
|
|
31
|
+
key: 'a2d095d778842c969832ea6b1ba7f7ef917d1390',
|
|
27
32
|
class: `inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02`,
|
|
28
33
|
style: {
|
|
29
34
|
width: `${progressValue}%`
|
|
@@ -15,13 +15,13 @@ const EdsSectionCore = class {
|
|
|
15
15
|
render() {
|
|
16
16
|
const TagType = this.tag; // Set dynamic tag type (div or section)
|
|
17
17
|
return h(TagType, {
|
|
18
|
-
key: '
|
|
18
|
+
key: 'e7ef9e7a589d8cde8aa54d73dff8421d74a7d0ac'
|
|
19
19
|
}, h("eds-section-heading", {
|
|
20
|
-
key: '
|
|
20
|
+
key: '379c6bc644612d3e0865ce2acd8eacb4d67c7769',
|
|
21
21
|
headingLevel: this.headingLevel,
|
|
22
22
|
sectionTitle: this.sectionTitle
|
|
23
23
|
}), h("slot", {
|
|
24
|
-
key: '
|
|
24
|
+
key: '5828a28c2c8ac65fbc56652f733f148a0d0198b7'
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -52,7 +52,7 @@ const EdsSectionHeading = class {
|
|
|
52
52
|
const TagType = this.tag; // Dynamically set tag type for the container
|
|
53
53
|
const HeadingTag = this.headingLevel; // Dynamically set heading level
|
|
54
54
|
return h(TagType, {
|
|
55
|
-
key: '
|
|
55
|
+
key: 'c15f83f8aaa4fb01c884fb1390965fcf9dbd61fb',
|
|
56
56
|
class: {
|
|
57
57
|
'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8 pb-20': true,
|
|
58
58
|
container: this.withContainer,
|
|
@@ -60,7 +60,7 @@ const EdsSectionHeading = class {
|
|
|
60
60
|
'pt-28': !this.spacingLarge
|
|
61
61
|
}
|
|
62
62
|
}, h(HeadingTag, {
|
|
63
|
-
key: '
|
|
63
|
+
key: 'e65e13820553eefa5aec8bc9740e5e9da828ac92',
|
|
64
64
|
class: this.getHeadingClass()
|
|
65
65
|
}, this.sectionTitle));
|
|
66
66
|
}
|
|
@@ -308,7 +308,7 @@ const EdsSvgRepository = class {
|
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
return h("eds-table", {
|
|
311
|
-
key: '
|
|
311
|
+
key: 'a7d7fa426da72e174880a300202390c1016b74df',
|
|
312
312
|
data: JSON.stringify(svgData),
|
|
313
313
|
config: JSON.stringify(tableConfig),
|
|
314
314
|
"rows-per-page": 10,
|
package/eds-tab.entry.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './
|
|
2
|
+
import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
|
|
3
3
|
import { c as cva } from './index-39c58238.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
@@ -108,13 +108,13 @@ const EdsTabsContent = class {
|
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
110
|
return h("div", {
|
|
111
|
-
key: '
|
|
111
|
+
key: 'aa94a55d3ae658797df6ae75724238a17a80a169',
|
|
112
112
|
class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']"
|
|
113
113
|
}, h("div", {
|
|
114
|
-
key: '
|
|
114
|
+
key: '0e38c695467c272198a605efdb2705b14239756e',
|
|
115
115
|
class: "scroller-x max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28"
|
|
116
116
|
}, h("nav", {
|
|
117
|
-
key: '
|
|
117
|
+
key: '525f56d02b41e236d3b713fb972b6803e3f908d5',
|
|
118
118
|
ref: el => this.tabContainer = el,
|
|
119
119
|
class: "inline-flex",
|
|
120
120
|
"aria-label": this.navAriaLabel
|
|
@@ -129,7 +129,7 @@ const EdsTabsContent = class {
|
|
|
129
129
|
onClick: () => this.handleTabClick(index, tab.label)
|
|
130
130
|
}));
|
|
131
131
|
})), h("slot", {
|
|
132
|
-
key: '
|
|
132
|
+
key: 'e5da088cec99dd0e40560b70fbd9940ac5a7f56f'
|
|
133
133
|
})));
|
|
134
134
|
}
|
|
135
135
|
get el() {
|
package/eds-tabs.entry.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './
|
|
2
|
+
import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
|
|
3
3
|
import { c as cva } from './index-39c58238.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
@@ -119,14 +119,14 @@ const EdsTabs = class {
|
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
121
|
return h("div", {
|
|
122
|
-
key: '
|
|
122
|
+
key: 'f5c9e076fc1fb95b57e0148d85865ce62c14fbe7',
|
|
123
123
|
id: `${this.id}`,
|
|
124
124
|
class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']"
|
|
125
125
|
}, h("div", {
|
|
126
|
-
key: '
|
|
126
|
+
key: '7d382167fb62999e39b784ce8bfba24267c87a64',
|
|
127
127
|
class: "scroller-x overflow-x-auto max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28"
|
|
128
128
|
}, h("nav", {
|
|
129
|
-
key: '
|
|
129
|
+
key: '99bbfabd817bada1984ddf87a274bf9304a1e6a0',
|
|
130
130
|
ref: el => this.tabContainer = el,
|
|
131
131
|
class: "inline-flex",
|
|
132
132
|
"aria-label": this.navAriaLabel
|
|
@@ -17,7 +17,8 @@ const EdsTimeline = class {
|
|
|
17
17
|
try {
|
|
18
18
|
parsed = JSON.parse(newValue);
|
|
19
19
|
} catch (e) {
|
|
20
|
-
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
console.error('Error parsing timeline events JSON', e);
|
|
21
22
|
parsed = [];
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -60,16 +61,16 @@ const EdsTimeline = class {
|
|
|
60
61
|
}
|
|
61
62
|
render() {
|
|
62
63
|
return h("div", {
|
|
63
|
-
key: '
|
|
64
|
+
key: '1ba4a93ce518b52f5821af75ae0587c44db92c6d',
|
|
64
65
|
class: "max-w-sidebar mx-auto px-4 py-8"
|
|
65
66
|
}, h("div", {
|
|
66
|
-
key: '
|
|
67
|
+
key: '3e019420ddd4bfab7800567c7130299ea47205c6',
|
|
67
68
|
class: "relative"
|
|
68
69
|
}, h("div", {
|
|
69
|
-
key: '
|
|
70
|
+
key: 'df99ce8fb08232c46449d7485dd7cffcd04b64d6',
|
|
70
71
|
class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0"
|
|
71
72
|
}), h("div", {
|
|
72
|
-
key: '
|
|
73
|
+
key: '1b52694d2e8c3656910c02680aa8ce2e78b02997',
|
|
73
74
|
class: "space-y-16"
|
|
74
75
|
}, this.parsedEvents.map((event, index) => h("div", {
|
|
75
76
|
class: "relative flex"
|
package/eds-tooltip.entry.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-dom';
|
|
@@ -22,9 +23,17 @@ const EdsTooltip = class {
|
|
|
22
23
|
* Show the tooltip and update its position.
|
|
23
24
|
*/
|
|
24
25
|
async showTooltip() {
|
|
26
|
+
var _a;
|
|
25
27
|
await this.updateTooltipPosition();
|
|
26
28
|
this.isPositioned = true;
|
|
27
29
|
this.isVisible = true;
|
|
30
|
+
sendAnalytics({
|
|
31
|
+
category: 'ui-component',
|
|
32
|
+
parentContext: null,
|
|
33
|
+
tag: this.el.tagName.toLowerCase(),
|
|
34
|
+
name: ((_a = this.content) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
35
|
+
action: 'hover'
|
|
36
|
+
});
|
|
28
37
|
}
|
|
29
38
|
/**
|
|
30
39
|
* Hide the tooltip.
|
|
@@ -92,12 +101,12 @@ const EdsTooltip = class {
|
|
|
92
101
|
}
|
|
93
102
|
render() {
|
|
94
103
|
return h("div", {
|
|
95
|
-
key: '
|
|
104
|
+
key: '1635b034319df4827a62ed58267d81db277ad19d',
|
|
96
105
|
class: "relative"
|
|
97
106
|
}, h("slot", {
|
|
98
|
-
key: '
|
|
107
|
+
key: '6cdfd0f6d456b984464c5091a2829cdba69ba895'
|
|
99
108
|
}), this.isVisible && this.isPositioned && this.content && h("div", {
|
|
100
|
-
key: '
|
|
109
|
+
key: '7e736731dc700e0273fdfe15202426d2db086aef',
|
|
101
110
|
class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6",
|
|
102
111
|
role: "tooltip",
|
|
103
112
|
style: {
|
package/eds-trl.entry.esm.js
CHANGED
|
@@ -15,8 +15,8 @@ const EdsTrl = class {
|
|
|
15
15
|
try {
|
|
16
16
|
apps = JSON.parse(this.applications || '[]');
|
|
17
17
|
} catch (error) {
|
|
18
|
-
//
|
|
19
|
-
|
|
18
|
+
// eslint-disable-next-line
|
|
19
|
+
console.error('Invalid applications trl JSON', error);
|
|
20
20
|
apps = [];
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -32,11 +32,10 @@ const EdsTrl = class {
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const apps = this.getParsedApplications();
|
|
35
|
-
console.log('apps:', apps);
|
|
36
35
|
// Map applications into table-friendly data.
|
|
37
36
|
const tableData = apps.map(app => ({
|
|
38
37
|
Application: app.name,
|
|
39
|
-
|
|
38
|
+
'Current TRL Stage': `TRL ${app.currentTrl}`,
|
|
40
39
|
Progress: h("div", {
|
|
41
40
|
class: "w-[200px]"
|
|
42
41
|
}, h("eds-progress-bar", {
|
|
@@ -44,18 +43,18 @@ const EdsTrl = class {
|
|
|
44
43
|
}))
|
|
45
44
|
}));
|
|
46
45
|
const tableConfig = {
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
Application: {
|
|
47
|
+
format: 'code'
|
|
49
48
|
},
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
'Current TRL Stage': {
|
|
50
|
+
format: 'text'
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
53
|
return h("div", {
|
|
55
|
-
key: '
|
|
54
|
+
key: 'a329a001d6275fcfe7df9bddf83bd289effe4151',
|
|
56
55
|
class: "container mx-auto px-4 py-8"
|
|
57
56
|
}, h("eds-table", {
|
|
58
|
-
key: '
|
|
57
|
+
key: '93aebfd840b16416789b15eec0daa16d9126aa9f',
|
|
59
58
|
data: JSON.stringify(tableData),
|
|
60
59
|
config: JSON.stringify(tableConfig),
|
|
61
60
|
"rows-per-page": "2",
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { l as login, a as logout, c as checkServerAvailability, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak-d502ec16.esm.js';
|
|
3
|
+
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'react-dom';
|
|
7
|
+
|
|
8
|
+
const EdsUser = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
|
|
12
|
+
/**
|
|
13
|
+
* Handles user login by invoking the Keycloak `login` function.
|
|
14
|
+
* Only triggers login if the user is not already authenticated.
|
|
15
|
+
*/
|
|
16
|
+
this.handleLogin = () => {
|
|
17
|
+
if (!this.authenticated) {
|
|
18
|
+
try {
|
|
19
|
+
login();
|
|
20
|
+
} catch (error) {
|
|
21
|
+
toast.show(error.message, 'error');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Handles user logout by invoking the Keycloak `logout` function.
|
|
27
|
+
* Resets the `authenticated` state to `false` after logout.
|
|
28
|
+
*/
|
|
29
|
+
this.handleLogout = async () => {
|
|
30
|
+
try {
|
|
31
|
+
await logout();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
toast.show(error.message, 'error');
|
|
34
|
+
}
|
|
35
|
+
this.authenticated = false;
|
|
36
|
+
this.user = null;
|
|
37
|
+
};
|
|
38
|
+
this.keycloakUrl = undefined;
|
|
39
|
+
this.keycloakRealm = undefined;
|
|
40
|
+
this.keycloakClientId = undefined;
|
|
41
|
+
this.user = null;
|
|
42
|
+
this.authenticated = false;
|
|
43
|
+
this.username = '';
|
|
44
|
+
this.serverAvailable = false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Lifecycle method that runs when the component is about to load.
|
|
48
|
+
* It initializes authentication by calling the `initAuth` method.
|
|
49
|
+
*/
|
|
50
|
+
async componentWillLoad() {
|
|
51
|
+
// Check if required props are provided (optional check)
|
|
52
|
+
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
53
|
+
// eslint-disable-next-line
|
|
54
|
+
console.error('Keycloak configuration props are missing.');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.serverAvailable = await checkServerAvailability(`${this.keycloakUrl}/realms/${this.keycloakRealm}`);
|
|
58
|
+
if (!this.serverAvailable) {
|
|
59
|
+
toast.show('Keycloak server is unavailable.', 'error');
|
|
60
|
+
return; // Do not proceed further
|
|
61
|
+
}
|
|
62
|
+
await this.initAuth();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
66
|
+
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
67
|
+
* Emits `authStatusChanged` event with the authentication status.
|
|
68
|
+
*/
|
|
69
|
+
async initAuth() {
|
|
70
|
+
try {
|
|
71
|
+
await initKeycloak({
|
|
72
|
+
url: this.keycloakUrl,
|
|
73
|
+
realm: this.keycloakRealm,
|
|
74
|
+
clientId: this.keycloakClientId
|
|
75
|
+
}, true);
|
|
76
|
+
if (isAuthenticated()) {
|
|
77
|
+
this.user = getUser();
|
|
78
|
+
this.authenticated = true;
|
|
79
|
+
this.authStatusChanged.emit({
|
|
80
|
+
authenticated: this.authenticated,
|
|
81
|
+
user: this.user
|
|
82
|
+
}); // Emit auth status change
|
|
83
|
+
}
|
|
84
|
+
} catch (error) {
|
|
85
|
+
toast.show(error.message, 'error');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
var _a;
|
|
90
|
+
return h("div", {
|
|
91
|
+
key: '22ee744979511dd2f8a1e1a15bb99215eadd535b',
|
|
92
|
+
class: "block"
|
|
93
|
+
}, !this.authenticated ? h("eds-button", {
|
|
94
|
+
label: "Login",
|
|
95
|
+
intent: "primary",
|
|
96
|
+
onClick: this.handleLogin,
|
|
97
|
+
"extra-class": "text-default"
|
|
98
|
+
}) : h("div", {
|
|
99
|
+
class: "flex items-center"
|
|
100
|
+
}, h("eds-dropdown", {
|
|
101
|
+
label: `Welcome, ${(_a = this.user) === null || _a === void 0 ? void 0 : _a.username}`,
|
|
102
|
+
intent: "tertiary",
|
|
103
|
+
"aria-label": "User Menu",
|
|
104
|
+
"dropdown-pos": "right",
|
|
105
|
+
"dropdown-offset": "false",
|
|
106
|
+
icon: "chevron-down",
|
|
107
|
+
class: "text-default"
|
|
108
|
+
}, h("eds-user-modal", {
|
|
109
|
+
user: JSON.stringify(this.user),
|
|
110
|
+
onLogout: this.handleLogout.bind(this)
|
|
111
|
+
}))));
|
|
112
|
+
}
|
|
113
|
+
get hostEl() {
|
|
114
|
+
return getElement(this);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { EdsUser as eds_user };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const edsVerticalStepperCss = ":host{display:block}.stepper-container{margin:0 auto}.stepper{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.step{margin-bottom:24px}.step-label{counter-increment:step;font-size:1.25rem;font-weight:600;position:relative;margin-top:1em;margin-bottom:1em}.step-label::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.optional{font-size:0.8rem;color:#888;margin-left:8px}.step-content{margin-top:8px}.step-buttons{margin-top:12px}.step-buttons button{margin-right:8px;padding:6px 12px;font-size:0.875rem}.completed{padding:16px;border:1px solid #ddd;margin-top:16px;text-align:center}";
|
|
7
|
+
const EdsVerticalStepperStyle0 = edsVerticalStepperCss;
|
|
8
|
+
const EdsVerticalStepper = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.handleNext = () => {
|
|
12
|
+
if (this.activeStep < this.parsedSteps.length) {
|
|
13
|
+
this.activeStep = this.activeStep + 1;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
this.handleBack = () => {
|
|
17
|
+
if (this.activeStep > 0) {
|
|
18
|
+
this.activeStep = this.activeStep - 1;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
this.handleReset = () => {
|
|
22
|
+
this.activeStep = 0;
|
|
23
|
+
};
|
|
24
|
+
this.steps = '[]';
|
|
25
|
+
this.activeStep = 0;
|
|
26
|
+
}
|
|
27
|
+
get parsedSteps() {
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(this.steps);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
//console.error('Invalid steps JSON', error);
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
const steps = this.parsedSteps;
|
|
37
|
+
return h("div", {
|
|
38
|
+
key: '08fa2f85c49dbe217b2f9d068bee486e432f5315',
|
|
39
|
+
class: "stepper-container"
|
|
40
|
+
}, h("div", {
|
|
41
|
+
key: '6f7e0a0ccaa2882794a6be0216201d1bf924e2b2',
|
|
42
|
+
class: "stepper"
|
|
43
|
+
}, steps.map((step, index) => h("div", {
|
|
44
|
+
class: "step",
|
|
45
|
+
key: index
|
|
46
|
+
}, h("div", {
|
|
47
|
+
class: "step-label"
|
|
48
|
+
}, h("span", null, step.label), index === steps.length - 1 && h("span", {
|
|
49
|
+
class: "f-ui-03 text-lightest ml-4"
|
|
50
|
+
}, "(Last step)")), this.activeStep === index && h("div", {
|
|
51
|
+
class: "step-content"
|
|
52
|
+
}, h("p", null, step.description), h("div", {
|
|
53
|
+
class: "step-buttons"
|
|
54
|
+
}, h("eds-button", {
|
|
55
|
+
label: index === steps.length - 1 ? 'Finish' : 'Continue',
|
|
56
|
+
class: "next-btn",
|
|
57
|
+
onClick: this.handleNext
|
|
58
|
+
}), h("eds-button", {
|
|
59
|
+
label: "Back",
|
|
60
|
+
intent: "ghostInverse",
|
|
61
|
+
onClick: this.handleBack,
|
|
62
|
+
disabled: index === 0,
|
|
63
|
+
"extra-class": index === 0 ? 'hidden' : 'ml-8 block'
|
|
64
|
+
})))))), this.activeStep === steps.length && h("div", {
|
|
65
|
+
key: '8a5ebfed582b25d828758e1762a063df6c745093',
|
|
66
|
+
class: ""
|
|
67
|
+
}, h("eds-alert", {
|
|
68
|
+
key: 'a142fb50b8df533dd97f770aeaa453f2379ea7cb',
|
|
69
|
+
intent: "success",
|
|
70
|
+
message: "All steps completed - you're finished!"
|
|
71
|
+
}), h("eds-button", {
|
|
72
|
+
key: '5cfba059c9a152f179e7c31fa5d7a222c00defe2',
|
|
73
|
+
label: "Start again",
|
|
74
|
+
onClick: this.handleReset,
|
|
75
|
+
"extra-class": "mt-4"
|
|
76
|
+
})));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
EdsVerticalStepper.style = EdsVerticalStepperStyle0;
|
|
80
|
+
|
|
81
|
+
export { EdsVerticalStepper as eds_vertical_stepper };
|
|
@@ -29,20 +29,20 @@ const IncorrectUseOfColors = class {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
return h("div", {
|
|
32
|
-
key: '
|
|
32
|
+
key: 'cb22d37293f3b3b5fe3772cfe83234a5d81e1094',
|
|
33
33
|
class: "container"
|
|
34
34
|
}, h("eds-alert", {
|
|
35
|
-
key: '
|
|
35
|
+
key: '9aa7a510440c32f92242b3e09f9e818cd2509b06',
|
|
36
36
|
message: "Note that, each of the four colour tones cannot be mixed in the same composition.",
|
|
37
37
|
intent: "error"
|
|
38
38
|
}), h("div", {
|
|
39
|
-
key: '
|
|
39
|
+
key: '4d22cba75b7dd45a5a9a7d2b2eba5404875f1403',
|
|
40
40
|
class: "flex"
|
|
41
41
|
}, h("div", {
|
|
42
|
-
key: '
|
|
42
|
+
key: 'c7f08b3e4ef2692c545edd4185a005ddd6526a23',
|
|
43
43
|
class: "w-full"
|
|
44
44
|
}, h("ul", {
|
|
45
|
-
key: '
|
|
45
|
+
key: '28561abcdc93a4899a5d7481fdd47c439f734ff6',
|
|
46
46
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
47
47
|
}, primary.map(color => h("li", {
|
|
48
48
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -52,10 +52,10 @@ const IncorrectUseOfColors = class {
|
|
|
52
52
|
backgroundColor: color.background
|
|
53
53
|
}
|
|
54
54
|
}))))), h("div", {
|
|
55
|
-
key: '
|
|
55
|
+
key: 'f8836d4805fdd416ee75712f749d5cee3f612559',
|
|
56
56
|
class: "w-full"
|
|
57
57
|
}, h("ul", {
|
|
58
|
-
key: '
|
|
58
|
+
key: '5842acd55d3a827355f2814c709d057676fb5d0f',
|
|
59
59
|
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
60
60
|
}, incorrect.map(color => h("li", {
|
|
61
61
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EdsAccordion, a as EdsAlert, b as EdsAvatar, d as EdsBlockBreak, e as EdsBreadcrumb, f as EdsButton, i as EdsCardDesc, j as EdsCardGeneric, k as EdsCardSection, l as EdsCodeBlock, m as EdsDropdown, n as EdsFooter, o as EdsForm, p as EdsFrame, q as EdsFullscreenMenu, s as EdsHeader, t as EdsIconWrapper, u as EdsImg, v as EdsInputField, w as
|
|
1
|
+
export { E as EdsAccordion, a as EdsAlert, b as EdsAvatar, d as EdsBlockBreak, e as EdsBreadcrumb, f as EdsButton, i as EdsCardDesc, j as EdsCardGeneric, k as EdsCardSection, l as EdsCodeBlock, m as EdsDropdown, n as EdsFooter, o as EdsForm, p as EdsFrame, q as EdsFullscreenMenu, s as EdsHeader, t as EdsIconWrapper, u as EdsImg, v as EdsInputField, w as EdsLink, x as EdsLogin, y as EdsLogo, z as EdsMatomoNotice, A as EdsModal, B as EdsPagination, C as EdsProgressBar, D as EdsRating, F as EdsSectionCore, G as EdsSectionHeading, H as EdsSocialNetworks, I as EdsSteps, J as EdsSwitch, K as EdsTable, L as EdsTabs, M as EdsTag, N as EdsTimeline, O as EdsToast, P as EdsToastManager, Q as EdsTooltip, R as EdsUser, S as EdsVerticalStepper } from './index.esm2.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|