@ebrains/react 0.3.0-alpha.0 → 0.4.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/{color-0ba8ed56.esm.js → color-bb472c37.esm.js} +2 -2
- package/eds-accordion_33.entry.esm.js +369 -0
- package/eds-card-project.entry.esm.js +1 -1
- 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 +1 -1
- package/eds-card-wrapper.entry.esm.js +4 -4
- package/eds-code-block.entry.esm.js +55 -8
- package/eds-matomo-notice.entry.esm.js +1 -1
- package/eds-pagination_2.entry.esm.js +34 -17
- package/eds-rating.entry.esm.js +7 -9
- package/eds-tabs-content.entry.esm.js +1 -1
- package/eds-tabs.entry.esm.js +1 -1
- package/eds-timeline.entry.esm.js +6 -5
- package/eds-tooltip.entry.esm.js +13 -3
- package/eds-trl.entry.esm.js +9 -10
- package/index.esm.js +1 -1
- package/index.esm2.js +4 -29
- package/package.json +1 -1
- package/src/components.d.ts +0 -1
- package/eds-accordion.entry.esm.js +0 -132
- package/eds-alert.entry.esm.js +0 -102
- package/eds-avatar_17.entry.esm.js +0 -209
- package/eds-card-desc_3.entry.esm.js +0 -129
- package/eds-card-generic.entry.esm.js +0 -125
- package/eds-form.entry.esm.js +0 -374
- package/eds-frame.entry.esm.js +0 -117
- package/eds-input_7.entry.esm.js +0 -518
- package/eds-modal.entry.esm.js +0 -114
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics, g as gradientBGColorVariants } from './color-
|
|
2
|
+
import { s as sendAnalytics, g as gradientBGColorVariants } from './color-bb472c37.esm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom';
|
|
@@ -8,7 +8,7 @@ const EdsCardSectionStyle0 = edsCardSectionCss;
|
|
|
8
8
|
const EdsCardSection = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
|
-
this.cards =
|
|
11
|
+
this.cards = [];
|
|
12
12
|
this.cols = 4;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
@@ -29,7 +29,7 @@ const EdsCardSection = class {
|
|
|
29
29
|
return JSON.parse(this.cards);
|
|
30
30
|
} catch (e) {
|
|
31
31
|
// eslint-disable-next-line
|
|
32
|
-
console.error('Error parsing
|
|
32
|
+
console.error('Error parsing cards prop:', e);
|
|
33
33
|
return [];
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -44,10 +44,10 @@ const EdsCardSection = class {
|
|
|
44
44
|
*/
|
|
45
45
|
render() {
|
|
46
46
|
return h("section", {
|
|
47
|
-
key: '
|
|
47
|
+
key: 'da139da167230819e494a6426c2431f209a2e557',
|
|
48
48
|
class: "w-full"
|
|
49
49
|
}, h("ul", {
|
|
50
|
-
key: '
|
|
50
|
+
key: '3e8affe5c9aee91c4487480c72c437339265101a',
|
|
51
51
|
class: "grid-layout gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
52
52
|
}, this.parsedCards.map(card => h("li", {
|
|
53
53
|
class: `grid-col-span-12 md:grid-col-span-${this.cols} flex flex-col`
|
|
@@ -13,7 +13,7 @@ const EdsCardTags = class {
|
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
return h("div", {
|
|
16
|
-
key: '
|
|
16
|
+
key: '60a129de62d45736eba0884cc24c9738f3a0f55c',
|
|
17
17
|
class: "flex flex-wrap gap-y-4"
|
|
18
18
|
}, this.tags.map((tag, index) => h("eds-tag", {
|
|
19
19
|
key: index,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './color-
|
|
2
|
+
import { s as sendAnalytics } from './color-bb472c37.esm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom';
|
|
@@ -19,15 +19,15 @@ const EdsCardWrapper = class {
|
|
|
19
19
|
render() {
|
|
20
20
|
const articleClasses = [this.tiny ? 'min-h-120' : 'min-h-156', this.withBg ? 'bg-inverse' : 'bg-default', this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '', 'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'].join(' ');
|
|
21
21
|
return h("article", {
|
|
22
|
-
key: '
|
|
22
|
+
key: '7c12b1d147f061e189b5dda5d517ec4eae0c3691',
|
|
23
23
|
class: articleClasses
|
|
24
24
|
}, h("slot", {
|
|
25
|
-
key: '
|
|
25
|
+
key: 'f506bad73ed38ae36931f88f7d7c5f5d94705e4f'
|
|
26
26
|
}), this.hasSlot('footer') && h("div", {
|
|
27
|
-
key: '
|
|
27
|
+
key: '783f480be269e4a2f61aa8d4396e757fe41bfcc6',
|
|
28
28
|
class: "mt-auto"
|
|
29
29
|
}, h("slot", {
|
|
30
|
-
key: '
|
|
30
|
+
key: 'f07ddaa2d930518a5c8ac82efab3cb0dd6647bdd',
|
|
31
31
|
name: "footer"
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index.esm2.js';
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
@@ -2187,12 +2187,56 @@ const EdsCodeBlock = class {
|
|
|
2187
2187
|
this.language = undefined;
|
|
2188
2188
|
this.copied = false;
|
|
2189
2189
|
}
|
|
2190
|
+
/**
|
|
2191
|
+
* Copies the current code content to the clipboard and sets a temporary copied state.
|
|
2192
|
+
*
|
|
2193
|
+
* @private
|
|
2194
|
+
* @returns {void}
|
|
2195
|
+
*/
|
|
2190
2196
|
copyToClipboard() {
|
|
2191
2197
|
navigator.clipboard.writeText(this.code).then(() => {
|
|
2192
2198
|
this.copied = true;
|
|
2199
|
+
/*const analyticsName = this.createHumanFriendlyAnalyticsName(this.code, this.language);
|
|
2200
|
+
sendAnalytics({
|
|
2201
|
+
category: 'ui-component',
|
|
2202
|
+
parentContext: null,
|
|
2203
|
+
tag: this.el.tagName.toLowerCase(),
|
|
2204
|
+
name: analyticsName || '',
|
|
2205
|
+
action: 'copy'
|
|
2206
|
+
});*/
|
|
2193
2207
|
setTimeout(() => this.copied = false, 2000);
|
|
2194
2208
|
});
|
|
2195
2209
|
}
|
|
2210
|
+
/**
|
|
2211
|
+
* Utility function that creates a human-friendly analytics name based on the code and language.
|
|
2212
|
+
* It uses:
|
|
2213
|
+
* - The language (in uppercase)
|
|
2214
|
+
* - The number of non-empty lines in the code
|
|
2215
|
+
* - The first non-empty line of code (truncated to 30 characters, if needed)
|
|
2216
|
+
*
|
|
2217
|
+
* returns A descriptive analytics name.
|
|
2218
|
+
*/
|
|
2219
|
+
/*private createHumanFriendlyAnalyticsName(code: string, language: string): string {
|
|
2220
|
+
// Count non-empty lines
|
|
2221
|
+
const lines = code.split('\n').filter(line => line.trim() !== '').length;
|
|
2222
|
+
|
|
2223
|
+
// Find the first non-empty line and trim it
|
|
2224
|
+
let firstNonEmptyLine = code.split('\n').find(line => line.trim() !== '');
|
|
2225
|
+
firstNonEmptyLine = firstNonEmptyLine ? firstNonEmptyLine.trim() : '';
|
|
2226
|
+
// Truncate the snippet if it’s too long
|
|
2227
|
+
if (firstNonEmptyLine.length > 30) {
|
|
2228
|
+
firstNonEmptyLine = firstNonEmptyLine.substring(0, 30) + '...';
|
|
2229
|
+
}
|
|
2230
|
+
return `CodeBlock:${language.toLowerCase()}|${lines}-line(s)|${firstNonEmptyLine.toLowerCase()}`;
|
|
2231
|
+
}*/
|
|
2232
|
+
/**
|
|
2233
|
+
* Returns the syntax-highlighted HTML for the code.
|
|
2234
|
+
* If the provided language is supported by Prism, this method returns the highlighted code.
|
|
2235
|
+
* Otherwise, it logs a warning and returns the raw code.
|
|
2236
|
+
*
|
|
2237
|
+
* @private
|
|
2238
|
+
* @returns {string} The highlighted HTML string for the code block.
|
|
2239
|
+
*/
|
|
2196
2240
|
getHighlightedCode() {
|
|
2197
2241
|
if (this.language && Prism$1.languages[this.language]) {
|
|
2198
2242
|
return Prism$1.highlight(this.code, Prism$1.languages[this.language], this.language);
|
|
@@ -2203,10 +2247,10 @@ const EdsCodeBlock = class {
|
|
|
2203
2247
|
}
|
|
2204
2248
|
render() {
|
|
2205
2249
|
return h("div", {
|
|
2206
|
-
key: '
|
|
2250
|
+
key: '00eba9265ee17605f699d1e5606013b68e900b29',
|
|
2207
2251
|
class: "relative bg-stronger rounded-sm"
|
|
2208
2252
|
}, h("div", {
|
|
2209
|
-
key: '
|
|
2253
|
+
key: '1192584f04de5ff74e91c88597a3360b92053456',
|
|
2210
2254
|
class: "text-inverse flex justify-between items-center p-8"
|
|
2211
2255
|
}, this.language ? h("span", {
|
|
2212
2256
|
class: "f-ui-03"
|
|
@@ -2217,26 +2261,29 @@ const EdsCodeBlock = class {
|
|
|
2217
2261
|
}, h("code", {
|
|
2218
2262
|
innerHTML: this.getHighlightedCode()
|
|
2219
2263
|
})), h("span", {
|
|
2220
|
-
key: '
|
|
2264
|
+
key: '3666b6529a16a8cc64f448527db4ddee08f977a3',
|
|
2221
2265
|
"aria-hidden": "true",
|
|
2222
2266
|
class: "w-20 h-20 mt-8"
|
|
2223
2267
|
}, h("eds-icon-wrapper", {
|
|
2224
|
-
key: '
|
|
2268
|
+
key: 'f222d95a2e548429f6c4de96a7646e3cef1f360f',
|
|
2225
2269
|
icon: this.copied ? 'success' : 'copy',
|
|
2226
2270
|
onClick: () => this.copyToClipboard()
|
|
2227
2271
|
})), h("span", {
|
|
2228
|
-
key: '
|
|
2272
|
+
key: '8c539deda773909c01a41eb04ee51380c0a9c4bb',
|
|
2229
2273
|
class: "sr-only"
|
|
2230
2274
|
}, "Copy Code")), this.language && h("pre", {
|
|
2231
|
-
key: '
|
|
2275
|
+
key: '99541dedb32c543da5e780ffee4460333fbb3724',
|
|
2232
2276
|
class: `language-${this.language} bg-stronger pl-8 pb-8`,
|
|
2233
2277
|
role: "region",
|
|
2234
2278
|
"aria-label": `Code block in ${this.language}`
|
|
2235
2279
|
}, h("code", {
|
|
2236
|
-
key: '
|
|
2280
|
+
key: '4e6ae6fcfae3de8c1fe5ad9d22309e0c8bee0c2c',
|
|
2237
2281
|
innerHTML: this.getHighlightedCode()
|
|
2238
2282
|
})));
|
|
2239
2283
|
}
|
|
2284
|
+
get el() {
|
|
2285
|
+
return getElement(this);
|
|
2286
|
+
}
|
|
2240
2287
|
};
|
|
2241
2288
|
EdsCodeBlock.style = EdsCodeBlockStyle0;
|
|
2242
2289
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
2
|
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
3
|
-
import { m as matomoOptIn } from './color-
|
|
3
|
+
import { m as matomoOptIn } from './color-bb472c37.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react-dom';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './color-bb472c37.esm.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-dom';
|
|
6
|
+
import './index-39c58238.esm.js';
|
|
5
7
|
|
|
6
8
|
const edsPaginationCss = "ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}";
|
|
7
9
|
const EdsPaginationStyle0 = edsPaginationCss;
|
|
@@ -29,14 +31,17 @@ const EdsPagination = class {
|
|
|
29
31
|
componentDidLoad() {
|
|
30
32
|
// Emit context for each eds-link element after the component is fully loaded
|
|
31
33
|
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
32
|
-
|
|
34
|
+
links.forEach(lnk => {
|
|
35
|
+
this.emitContext(lnk);
|
|
36
|
+
});
|
|
37
|
+
/*if (links.length > 0) {
|
|
33
38
|
// Emit context for the first link
|
|
34
39
|
this.emitContext(links[0]);
|
|
35
|
-
|
|
40
|
+
// Emit context for the last link, if it's different from the first
|
|
36
41
|
if (links.length > 1) {
|
|
37
42
|
this.emitContext(links[links.length - 1]);
|
|
38
43
|
}
|
|
39
|
-
}
|
|
44
|
+
}*/
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* Emits a custom event called `parentContext` for a given link element.
|
|
@@ -167,12 +172,12 @@ const EdsPagination = class {
|
|
|
167
172
|
}
|
|
168
173
|
render() {
|
|
169
174
|
return h("div", {
|
|
170
|
-
key: '
|
|
175
|
+
key: '584e0918b070eac25a7c4bfceff59b000b60076c'
|
|
171
176
|
}, this.total > 0 && this.mode === 'default' && h("p", {
|
|
172
|
-
key: '
|
|
177
|
+
key: 'c688bd8e1f1d15904fc274454093f03213f59e38',
|
|
173
178
|
class: "f-ui-03 text-lightest mb-28 w-full text-center"
|
|
174
179
|
}, h("span", {
|
|
175
|
-
key: '
|
|
180
|
+
key: 'c2472919bad41f76e26d518da27509e545ed9db6',
|
|
176
181
|
class: "sr-only"
|
|
177
182
|
}, "Results:"), this.pageResults()), this.mode === 'navigator' || this.lastPage && this.lastPage > 1 ? h("nav", {
|
|
178
183
|
"aria-label": "Pagination"
|
|
@@ -342,10 +347,24 @@ const EdsTable = class {
|
|
|
342
347
|
}
|
|
343
348
|
handlePageChange(newPage) {
|
|
344
349
|
this.currentPage = newPage;
|
|
350
|
+
sendAnalytics({
|
|
351
|
+
category: 'ui-component',
|
|
352
|
+
parentContext: null,
|
|
353
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
|
|
354
|
+
name: `${newPage}` || '',
|
|
355
|
+
action: 'page'
|
|
356
|
+
});
|
|
345
357
|
}
|
|
346
358
|
handleSearch(event) {
|
|
347
359
|
this.searchQuery = event.target.value;
|
|
348
360
|
this.currentPage = 1;
|
|
361
|
+
/*sendAnalytics({
|
|
362
|
+
category: 'ui-component',
|
|
363
|
+
parentContext: null,
|
|
364
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
|
|
365
|
+
name: `${this.searchQuery}` || '',
|
|
366
|
+
action: 'page'
|
|
367
|
+
});*/
|
|
349
368
|
}
|
|
350
369
|
renderCell(value, column) {
|
|
351
370
|
var _a;
|
|
@@ -383,13 +402,11 @@ const EdsTable = class {
|
|
|
383
402
|
const visibleColumnsCount = this.getVisibleColumnsCount();
|
|
384
403
|
/// Calculate container width based on the optional prop or parent's measured width.
|
|
385
404
|
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
405
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor(containerWidth / visibleColumnsCount * this.divisionFactor()) : 100;
|
|
388
|
-
console.log('columnWidth:', columnWidth);
|
|
389
406
|
return h("div", {
|
|
390
|
-
key: '
|
|
407
|
+
key: '69fd87330d2049eeb91751c781c7aa753fa89883'
|
|
391
408
|
}, this.searchEnabled && h("div", {
|
|
392
|
-
key: '
|
|
409
|
+
key: '2f9680dd17b852b140fe560f7979e1dd58236c5a'
|
|
393
410
|
}, h("eds-input-field", {
|
|
394
411
|
key: 1,
|
|
395
412
|
name: "search",
|
|
@@ -399,15 +416,15 @@ const EdsTable = class {
|
|
|
399
416
|
// @ts-ignore
|
|
400
417
|
onInput: event => this.handleSearch(event)
|
|
401
418
|
})), h("div", {
|
|
402
|
-
key: '
|
|
419
|
+
key: 'd67edb24308e526a3e860a90250d58cf8bfee9c8',
|
|
403
420
|
class: "mt-20"
|
|
404
421
|
}, h("table", {
|
|
405
|
-
key: '
|
|
422
|
+
key: '9a2ef219110e459ac670a0f9c2e62c600f6b5acd',
|
|
406
423
|
class: "block overflow-x-auto mt-6 p-0"
|
|
407
424
|
}, h("thead", {
|
|
408
|
-
key: '
|
|
425
|
+
key: '81bae222447e805d06642dda19903d5bf99f2b01'
|
|
409
426
|
}, h("tr", {
|
|
410
|
-
key: '
|
|
427
|
+
key: '582d7ea661823b81ccdf3adc9769fe53cf56f04c',
|
|
411
428
|
class: "m-0 p-0 border border-softer even:bg-inverse-softer"
|
|
412
429
|
}, this.columns.map(column => {
|
|
413
430
|
var _a;
|
|
@@ -418,7 +435,7 @@ const EdsTable = class {
|
|
|
418
435
|
}
|
|
419
436
|
}, column);
|
|
420
437
|
}))), h("tbody", {
|
|
421
|
-
key: '
|
|
438
|
+
key: 'ce7f87e665c394c5e9f2201ef2658e888ea07948'
|
|
422
439
|
}, paginatedRows.map(row => h("tr", {
|
|
423
440
|
class: "m-0 p-0 border border-softer even:bg-inverse-softer"
|
|
424
441
|
}, this.columns.map(column => {
|
|
@@ -430,10 +447,10 @@ const EdsTable = class {
|
|
|
430
447
|
}
|
|
431
448
|
}, this.renderCell(row[column], column));
|
|
432
449
|
})))))), this.shouldEnablePagination() && h("div", {
|
|
433
|
-
key: '
|
|
450
|
+
key: '0fe6aed0d03c3aa491cd1bb17cd3bdc1e35372a0',
|
|
434
451
|
class: "mt-20"
|
|
435
452
|
}, h("eds-pagination", {
|
|
436
|
-
key: '
|
|
453
|
+
key: '5192f3f4b2ee93d5864d1afed3341a122c826d97',
|
|
437
454
|
currentPage: this.currentPage,
|
|
438
455
|
lastPage: lastPage,
|
|
439
456
|
perPage: this.rowsPerPage,
|
package/eds-rating.entry.esm.js
CHANGED
|
@@ -15,10 +15,8 @@ const EdsRating = class {
|
|
|
15
15
|
this.selectedRating = 0;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Parses the `
|
|
19
|
-
* Returns an empty array if parsing fails
|
|
20
|
-
*
|
|
21
|
-
* @returns {any[]} Array of parsed link objects
|
|
18
|
+
* Parses the `textMapping` prop into an array of strings.
|
|
19
|
+
* Returns an empty array if parsing fails.
|
|
22
20
|
*/
|
|
23
21
|
get parsedMappings() {
|
|
24
22
|
if (typeof this.textMapping === 'object') {
|
|
@@ -28,7 +26,7 @@ const EdsRating = class {
|
|
|
28
26
|
return JSON.parse(this.textMapping);
|
|
29
27
|
} catch (e) {
|
|
30
28
|
// eslint-disable-next-line
|
|
31
|
-
console.error('Error parsing
|
|
29
|
+
console.error('Error parsing textMapping prop:', e);
|
|
32
30
|
return [];
|
|
33
31
|
}
|
|
34
32
|
}
|
|
@@ -44,13 +42,13 @@ const EdsRating = class {
|
|
|
44
42
|
}
|
|
45
43
|
render() {
|
|
46
44
|
return h("div", {
|
|
47
|
-
key: '
|
|
45
|
+
key: 'c9147c2635f091d93f329d2b56a5fee8dce9126c',
|
|
48
46
|
class: "relative w-full flex flex-col"
|
|
49
47
|
}, h("span", {
|
|
50
|
-
key: '
|
|
48
|
+
key: '39a84bc3d9bcd4b729a35737c883eca7144d13ac',
|
|
51
49
|
class: "f-body-01"
|
|
52
50
|
}, this.label), h("div", {
|
|
53
|
-
key: '
|
|
51
|
+
key: '3cb84acf399cac0b23393c71df2f2b36aab4f43e',
|
|
54
52
|
class: "stars"
|
|
55
53
|
}, Array.from({
|
|
56
54
|
length: this.stars
|
|
@@ -61,7 +59,7 @@ const EdsRating = class {
|
|
|
61
59
|
},
|
|
62
60
|
onClick: () => this.handleClick(index + 1)
|
|
63
61
|
}, "\u2605"))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
|
|
64
|
-
key: '
|
|
62
|
+
key: '60605ec21b542825da0dad629fc1618d9cf63b25',
|
|
65
63
|
class: "f-ui-04 text-lighter"
|
|
66
64
|
}, this.parsedMappings[this.selectedRating - 1]));
|
|
67
65
|
}
|
|
@@ -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 './color-
|
|
2
|
+
import { s as sendAnalytics } from './color-bb472c37.esm.js';
|
|
3
3
|
import { c as cva } from './index-39c58238.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
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 './color-
|
|
2
|
+
import { s as sendAnalytics } from './color-bb472c37.esm.js';
|
|
3
3
|
import { c as cva } from './index-39c58238.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
@@ -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: '6016cb89d3fe3250482b42d8a0bf500fe18cee5d',
|
|
64
65
|
class: "max-w-sidebar mx-auto px-4 py-8"
|
|
65
66
|
}, h("div", {
|
|
66
|
-
key: '
|
|
67
|
+
key: '994cc7af75950a0f09d108804efff796602aeb93',
|
|
67
68
|
class: "relative"
|
|
68
69
|
}, h("div", {
|
|
69
|
-
key: '
|
|
70
|
+
key: '77b15ae60feb380ea20c6466b49d0efd5d8f5180',
|
|
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: '60bb384ce4eedd7bfc3b15a7a637e2b89318d619',
|
|
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,7 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './color-bb472c37.esm.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-dom';
|
|
6
|
+
import './index-39c58238.esm.js';
|
|
5
7
|
|
|
6
8
|
const edsTooltipCss = ".relative{position:relative}.absolute{position:absolute}.rounded-sm{border-radius:8px}.rounded-xs{border-radius:4px}.bg-stronger{background-color:var(--grey-900)}.bg-strongest{background-color:var(--black)}.text-inverse{color:var(--white)}.text-default{color:var(--black)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.pointer-events-none{pointer-events:none}.-top-8{top:-0.5rem}.left-1\\/2{left:50%}.z-10{z-index:10}.block{display:block}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y:-100%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.whitespace-nowrap{white-space:nowrap}.py-2{padding-top:0.125rem;padding-bottom:0.125rem}.px-4{padding-left:0.25rem;padding-right:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.p-12{padding:0.75rem}.p-16{padding:1rem}.p-20{padding:1.25rem}";
|
|
7
9
|
const EdsTooltipStyle0 = edsTooltipCss;
|
|
@@ -22,9 +24,17 @@ const EdsTooltip = class {
|
|
|
22
24
|
* Show the tooltip and update its position.
|
|
23
25
|
*/
|
|
24
26
|
async showTooltip() {
|
|
27
|
+
var _a;
|
|
25
28
|
await this.updateTooltipPosition();
|
|
26
29
|
this.isPositioned = true;
|
|
27
30
|
this.isVisible = true;
|
|
31
|
+
sendAnalytics({
|
|
32
|
+
category: 'ui-component',
|
|
33
|
+
parentContext: null,
|
|
34
|
+
tag: this.el.tagName.toLowerCase(),
|
|
35
|
+
name: ((_a = this.content) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
36
|
+
action: 'hover'
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
/**
|
|
30
40
|
* Hide the tooltip.
|
|
@@ -92,12 +102,12 @@ const EdsTooltip = class {
|
|
|
92
102
|
}
|
|
93
103
|
render() {
|
|
94
104
|
return h("div", {
|
|
95
|
-
key: '
|
|
105
|
+
key: '673ab0ee31378410f9c83bb5fd37b27d00a7b018',
|
|
96
106
|
class: "relative"
|
|
97
107
|
}, h("slot", {
|
|
98
|
-
key: '
|
|
108
|
+
key: '0c0138dfdf9aafecc1e0e925c84d4b0ca957f82d'
|
|
99
109
|
}), this.isVisible && this.isPositioned && this.content && h("div", {
|
|
100
|
-
key: '
|
|
110
|
+
key: '798d01cf631f2e5b3af9d9bb11a847041a6ee2ba',
|
|
101
111
|
class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6",
|
|
102
112
|
role: "tooltip",
|
|
103
113
|
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: '868a7c45e6495d7a2ed8a4ad2974ac31f74535a6',
|
|
56
55
|
class: "container mx-auto px-4 py-8"
|
|
57
56
|
}, h("eds-table", {
|
|
58
|
-
key: '
|
|
57
|
+
key: 'ed3e2a949d0e1d66a5e80018fa5fcac9bbe64620',
|
|
59
58
|
data: JSON.stringify(tableData),
|
|
60
59
|
config: JSON.stringify(tableConfig),
|
|
61
60
|
"rows-per-page": "2",
|
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 EdsTable, J as EdsTabs, K as EdsTag, L as EdsTimeline, M as EdsToast, N as EdsToastManager, O as EdsTooltip, P as EdsUser } from './index.esm2.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|