@ebrains/vue 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-BDRcCMlV.mjs +24 -0
- package/analytics-1cde8e4a-B_MD-9qW.js +1 -0
- package/color-2554aad6-CCcV5UJZ.mjs +131 -0
- package/color-2554aad6-D1hFGX4H.js +1 -0
- package/{color-primary-palette_6.entry-WwN9tuB9.mjs → color-primary-palette_6.entry-CgeStD0V.mjs} +21 -21
- package/color-primary-palette_6.entry-c_K7930i.js +1 -0
- package/correct-use-of-colors.entry-De5Tcxdm.mjs +59 -0
- package/correct-use-of-colors.entry-DpmXW_CD.js +1 -0
- package/{eds-accordion.entry-RvtdAQT0.mjs → eds-accordion.entry-B8TjhnWX.mjs} +19 -28
- package/eds-accordion.entry-BySfMYU2.js +4 -0
- package/{eds-avatar_17.entry-BQZz43q9.js → eds-alert_17.entry-BfpBSBVW.js} +572 -113
- package/{eds-avatar_17.entry-08AUpBqo.mjs → eds-alert_17.entry-IJq6baZd.mjs} +897 -452
- package/eds-avatar_4.entry-B7CV7v_n.mjs +283 -0
- package/eds-avatar_4.entry-D1CDRW_R.js +149 -0
- package/eds-card-generic.entry-BhLK-nyp.js +1 -0
- package/{eds-card-generic.entry-0IAAHjtS.mjs → eds-card-generic.entry-DIHPUjbI.mjs} +4 -4
- package/{eds-card-project.entry-Ckgpwy2Y.mjs → eds-card-project.entry-C2dWgXXW.mjs} +12 -11
- package/eds-card-project.entry-CunHqbYK.js +1 -0
- package/{eds-card-section.entry-B90kv8Pj.js → eds-card-section.entry-0n2V-MH6.js} +1 -1
- package/{eds-card-section.entry-DnktDeDm.mjs → eds-card-section.entry-Ccjil38X.mjs} +4 -4
- package/eds-card-tags.entry-C6jjLiGA.mjs +13 -0
- package/eds-card-tags.entry-CQS5AtAg.js +1 -0
- package/{eds-card-tool.entry-CmRu6pmc.mjs → eds-card-tool.entry-Bi8w0xds.mjs} +7 -7
- package/eds-card-tool.entry-DJA23zJf.js +1 -0
- package/{eds-card-wrapper.entry-rBHdbwzh.js → eds-card-wrapper.entry-BKPCc7ci.js} +1 -1
- package/{eds-card-wrapper.entry-Buesg37A.mjs → eds-card-wrapper.entry-UPnkq2JI.mjs} +4 -4
- package/{eds-code-block.entry-DKnuVY85.mjs → eds-code-block.entry-BZTLGjqq.mjs} +50 -9
- package/{eds-code-block.entry-M3x0FsRB.js → eds-code-block.entry-Ckb3jisn.js} +3 -3
- package/{eds-components-section.entry-BEBky2Me.js → eds-components-section.entry-B3WrdIfL.js} +45 -36
- package/{eds-components-section.entry-BAWU9rKy.mjs → eds-components-section.entry-D1ovrn93.mjs} +56 -37
- package/{eds-docs-palettes.entry-D3DdXkoo.js → eds-docs-palettes.entry-Bk77Xn04.js} +1 -1
- package/{eds-docs-palettes.entry-etHagd2P.mjs → eds-docs-palettes.entry-lpT0ypSs.mjs} +2 -2
- package/{eds-docs-tokens.entry-CIGNTs97.mjs → eds-docs-tokens.entry-Bi35zxEM.mjs} +2 -2
- package/{eds-docs-tokens.entry--gW4Z293.js → eds-docs-tokens.entry-DCHw-jrS.js} +1 -1
- package/eds-dropdown_2.entry-Bamjbo1o.mjs +115 -0
- package/eds-dropdown_2.entry-YEBzyKJu.js +1 -0
- package/{eds-form.entry-D8FLPsaS.js → eds-form.entry-a52cYx3b.js} +2 -2
- package/{eds-form.entry-zewjTpaa.mjs → eds-form.entry-xm937wbh.mjs} +113 -92
- package/{eds-frame.entry-BlOnLCrI.js → eds-frame.entry-BnT9nQwa.js} +1 -1
- package/{eds-frame.entry-SCGm_pju.mjs → eds-frame.entry-CU7GoLj6.mjs} +2 -2
- package/eds-icon-arrow-diagonal.entry-fzsCJiPP.js +1 -0
- package/eds-icon-arrow-diagonal.entry-kClkB8LF.mjs +13 -0
- package/eds-icon-arrow-right.entry-B75Ra6OD.js +1 -0
- package/eds-icon-arrow-right.entry-DX6A-VKL.mjs +13 -0
- package/{eds-icon-bluesky.entry-BDD9os2p.js → eds-icon-bluesky.entry-7tzCZSoL.js} +1 -1
- package/eds-icon-bluesky.entry-BNSdVu2K.mjs +13 -0
- package/eds-icon-chevron-down.entry-BLvZ3e_N.mjs +13 -0
- package/{eds-icon-chevron-down.entry-DA_Mq25N.js → eds-icon-chevron-down.entry-BUG6E9eR.js} +1 -1
- package/eds-icon-chevron-left.entry-BT-KYjSo.js +1 -0
- package/eds-icon-chevron-left.entry-Vq-R3b59.mjs +13 -0
- package/{eds-icon-chevron-right.entry-B2HI3b59.mjs → eds-icon-chevron-right.entry-B1qzmGrD.mjs} +2 -2
- package/eds-icon-chevron-right.entry-BmU_I0Y1.js +1 -0
- package/eds-icon-chevron-up.entry-DXXRgw1V.js +1 -0
- package/eds-icon-chevron-up.entry-DuySJU_i.mjs +13 -0
- package/eds-icon-close.entry-DDxUAr21.mjs +13 -0
- package/{eds-icon-close.entry-JIzBTjIa.js → eds-icon-close.entry-DS7BLTzl.js} +1 -1
- package/eds-icon-copy.entry-DNa1wI4F.mjs +13 -0
- package/{eds-icon-copy.entry-Ccrvu27o.js → eds-icon-copy.entry-Nz_P5A7p.js} +1 -1
- package/eds-icon-eu.entry-CLQcoimB.js +1 -0
- package/eds-icon-eu.entry-DTdf6Skc.mjs +13 -0
- package/eds-icon-facebook.entry-B9szoikj.mjs +13 -0
- package/eds-icon-facebook.entry-knUdck2t.js +1 -0
- package/eds-icon-gitlab.entry-IO7f4hgL.mjs +13 -0
- package/eds-icon-gitlab.entry-pKxaKA0B.js +1 -0
- package/{eds-icon-linkedin.entry-B4ev6evD.js → eds-icon-linkedin.entry-BD__kbDV.js} +1 -1
- package/eds-icon-linkedin.entry-CryUW1Er.mjs +13 -0
- package/{eds-icon-loader.entry-BFeh0vtX.js → eds-icon-loader.entry-B_3Sd6PB.js} +1 -1
- package/eds-icon-loader.entry-CxizdRT8.mjs +13 -0
- package/eds-icon-mastodon.entry-7152lwgd.js +1 -0
- package/eds-icon-mastodon.entry-MyM74vvm.mjs +13 -0
- package/eds-icon-menu.entry-5RRmRTxa.mjs +13 -0
- package/eds-icon-menu.entry-BVU8htgo.js +1 -0
- package/eds-icon-more.entry-KE6_EsAg.mjs +13 -0
- package/{eds-icon-more.entry-C-v0Cjp9.js → eds-icon-more.entry-lossstHZ.js} +1 -1
- package/eds-icon-search.entry-Dg0wabdP.mjs +13 -0
- package/eds-icon-search.entry-DiYaxnYX.js +1 -0
- package/{eds-icon-success.entry-DSukl_w-.js → eds-icon-success.entry-CRu9Ssdi.js} +1 -1
- package/eds-icon-success.entry-_fWfddhX.mjs +13 -0
- package/eds-icon-twitter.entry-B4xPE3Vz.js +1 -0
- package/eds-icon-twitter.entry-DHFpeStb.mjs +13 -0
- package/eds-icon-user.entry-BOv2lInW.mjs +13 -0
- package/eds-icon-user.entry-DkRLDrdp.js +1 -0
- package/eds-icon-youtube.entry-CRRGbDsw.mjs +13 -0
- package/eds-icon-youtube.entry-DL5fWU8k.js +1 -0
- package/{eds-input_7.entry-BV0VagCj.js → eds-input_7.entry-BZ9afXqe.js} +3 -3
- package/{eds-input_7.entry-CRNkC-uR.mjs → eds-input_7.entry-WvoE_Mue.mjs} +30 -25
- package/eds-login.entry-BRWK6otG.js +1 -0
- package/eds-login.entry-C0eOhlEq.mjs +58 -0
- package/{eds-logo-variations.entry-U65PDVhE.js → eds-logo-variations.entry-BnB25dDH.js} +1 -1
- package/eds-logo-variations.entry-Cw44vuQE.mjs +22 -0
- package/eds-matomo-notice.entry-BpwE1vQ3.js +1 -0
- package/{eds-matomo-notice.entry-y5SvHzsZ.mjs → eds-matomo-notice.entry-DsLbzeqQ.mjs} +2 -2
- package/eds-modal.entry-B9gXEOjT.js +1 -0
- package/eds-modal.entry-CCy9SRVR.mjs +84 -0
- package/{eds-navigator.entry-DixbL3UY.js → eds-navigator.entry-B9scz8p_.js} +1 -1
- package/{eds-navigator.entry-CvKDpQVM.mjs → eds-navigator.entry-Dk-4UW_d.mjs} +2 -2
- package/eds-pagination_2.entry-D_sngThL.js +1 -0
- package/{eds-pagination_2.entry-CRrIKRa-.mjs → eds-pagination_2.entry-M3CLFGN_.mjs} +25 -17
- package/{eds-progress-bar.entry-sdqDGSI3.mjs → eds-progress-bar.entry-BtI2_94Z.mjs} +5 -5
- package/{eds-progress-bar.entry-Bmjv2r3W.js → eds-progress-bar.entry-D56TNSGj.js} +1 -1
- package/{eds-section-core_2.entry-DBjBQ_AT.js → eds-section-core_2.entry-BmbK_RfT.js} +1 -1
- package/{eds-section-core_2.entry-cwkrHET8.mjs → eds-section-core_2.entry-pmUkAIz7.mjs} +6 -6
- package/{eds-svg-repository.entry-UvAba6M3.mjs → eds-svg-repository.entry-B3xCCFOp.mjs} +2 -2
- package/{eds-svg-repository.entry-BEJBJ538.js → eds-svg-repository.entry-DZ1FMRrQ.js} +2 -2
- package/{eds-tab.entry-CR1nFyrH.mjs → eds-tab.entry-Bpv6R_M0.mjs} +2 -2
- package/{eds-tab.entry-uQka8MTr.js → eds-tab.entry-DjpVgaDN.js} +1 -1
- package/eds-tabs-content.entry-Bj5wNmkr.js +1 -0
- package/{eds-tabs-content.entry-BKT7-iAV.mjs → eds-tabs-content.entry-CzwoLZzR.mjs} +4 -4
- package/{eds-tabs.entry-BKx8xHJ8.mjs → eds-tabs.entry-BYBPkYRs.mjs} +5 -5
- package/eds-tabs.entry-Cbc9yhHL.js +1 -0
- package/eds-timeline.entry-Bq-eo4Og.js +1 -0
- package/{eds-timeline.entry-B7jxBFA4.mjs → eds-timeline.entry-DJYcN7rN.mjs} +7 -7
- package/{eds-tooltip.entry-DJqN6_P4.mjs → eds-tooltip.entry-CTCdKTKM.mjs} +14 -6
- package/eds-tooltip.entry-eiFlYpfl.js +1 -0
- package/eds-trl.entry-8BXrp9SK.mjs +34 -0
- package/eds-trl.entry-DtffM-e5.js +1 -0
- package/eds-user.entry-DfBE6LuF.js +1 -0
- package/eds-user.entry-ybggwcts.mjs +66 -0
- package/eds-vertical-stepper.entry-DpcwvOst.mjs +27 -0
- package/eds-vertical-stepper.entry-O_GJNo8B.js +1 -0
- package/generated/components.d.ts +3 -1
- package/incorrect-use-of-colors.entry-CDHLoNBa.js +1 -0
- package/incorrect-use-of-colors.entry-DbwiJCH0.mjs +42 -0
- package/{index-Dg2DO7q4.mjs → index-C-Gy1Lax.mjs} +502 -498
- package/index-D_kZU_4I.js +21 -0
- package/index.js +1 -1
- package/index.mjs +33 -31
- package/{keycloak-13893af6-BLzE1H6E.mjs → keycloak-d502ec16-Ce0iGqyk.mjs} +259 -247
- package/keycloak-d502ec16-m7LwS-Gh.js +9 -0
- package/{logo-space.entry-DC5fUroI.js → logo-space.entry-D56IaLNE.js} +1 -1
- package/{logo-space.entry-Cf-keXHv.mjs → logo-space.entry-DERJLkyL.mjs} +7 -7
- package/logo-variations-horizontal_2.entry-OY3Zka_7.js +7 -0
- package/logo-variations-horizontal_2.entry-wp9D1MMl.mjs +29 -0
- package/logo-wrong-usage.entry-BniBpQrN.js +1 -0
- package/logo-wrong-usage.entry-RgKFDObE.mjs +14 -0
- package/package.json +1 -4
- package/{token-list_3.entry-BkOkChEb.js → token-list_3.entry-C0Tohj1W.js} +1 -1
- package/{token-list_3.entry-CheMK1r_.mjs → token-list_3.entry-Zgzwbhio.mjs} +4 -4
- package/{token-ratios.entry-rSMXHIix.mjs → token-ratios.entry-B7ZwRluK.mjs} +2 -2
- package/token-ratios.entry-bO5CkZ9D.js +1 -0
- package/token-spacing.entry-BTYazF9c.js +1 -0
- package/token-spacing.entry-_yyMlwbO.mjs +12 -0
- package/{token-typography.entry-AjIHL4M4.js → token-typography.entry-D-PPtDvs.js} +1 -1
- package/{token-typography.entry-CExckWkx.mjs → token-typography.entry-D4bxbB2m.mjs} +2 -2
- package/color-0ba8ed56-BVeDdJAE.js +0 -1
- package/color-0ba8ed56-D-UJpBQL.mjs +0 -207
- package/color-primary-palette_6.entry-_ANGnnBl.js +0 -1
- package/correct-use-of-colors.entry-B312hpv9.js +0 -1
- package/correct-use-of-colors.entry-BjxRVkfm.mjs +0 -59
- package/eds-accordion.entry-h9ApF51u.js +0 -4
- package/eds-alert.entry-C6VZ3ss6.js +0 -608
- package/eds-alert.entry-D5o-ZjCb.mjs +0 -688
- package/eds-card-desc_3.entry-D7hiMZ09.mjs +0 -87
- package/eds-card-desc_3.entry-Dxs_izUN.js +0 -1
- package/eds-card-generic.entry-DZYZP5oa.js +0 -1
- package/eds-card-project.entry-D7P4K88F.js +0 -1
- package/eds-card-tags.entry-CnHitp9l.js +0 -1
- package/eds-card-tags.entry-XboLA5-P.mjs +0 -13
- package/eds-card-tool.entry-CbreK2xg.js +0 -1
- package/eds-icon-arrow-diagonal.entry-CEffhVkn.mjs +0 -13
- package/eds-icon-arrow-diagonal.entry-abxXXnCe.js +0 -1
- package/eds-icon-arrow-right.entry-4zl098Gq.js +0 -1
- package/eds-icon-arrow-right.entry-DrA5pZ5q.mjs +0 -13
- package/eds-icon-bluesky.entry-CRey5aEK.mjs +0 -13
- package/eds-icon-chevron-down.entry-DCd5FfEN.mjs +0 -13
- package/eds-icon-chevron-left.entry-CiGlPKup.js +0 -1
- package/eds-icon-chevron-left.entry-Lmfmw6QC.mjs +0 -13
- package/eds-icon-chevron-right.entry-DMwxsQGs.js +0 -1
- package/eds-icon-chevron-up.entry-CwavCcA0.mjs +0 -13
- package/eds-icon-chevron-up.entry-D9pmuoVK.js +0 -1
- package/eds-icon-close.entry-pxvkbolY.mjs +0 -13
- package/eds-icon-copy.entry-Begn9c9I.mjs +0 -13
- package/eds-icon-eu.entry-C0ZIqXHV.js +0 -1
- package/eds-icon-eu.entry-CLI94rkv.mjs +0 -13
- package/eds-icon-facebook.entry-BIZwxPBr.js +0 -1
- package/eds-icon-facebook.entry-o2SylrAp.mjs +0 -13
- package/eds-icon-gitlab.entry-BJi35Zov.js +0 -1
- package/eds-icon-gitlab.entry-BWfZkXKF.mjs +0 -13
- package/eds-icon-linkedin.entry-Z4gD9HGr.mjs +0 -13
- package/eds-icon-loader.entry-DgIgWpYk.mjs +0 -13
- package/eds-icon-mastodon.entry-BLCaUfQY.js +0 -1
- package/eds-icon-mastodon.entry-C_2paQis.mjs +0 -13
- package/eds-icon-menu.entry-CNtaXAOo.mjs +0 -13
- package/eds-icon-menu.entry-CzF-GJXn.js +0 -1
- package/eds-icon-more.entry-4gqxzs_k.mjs +0 -13
- package/eds-icon-search.entry-D070uKfZ.mjs +0 -13
- package/eds-icon-search.entry-iLCAU3Et.js +0 -1
- package/eds-icon-success.entry-Ci0RTnP5.mjs +0 -13
- package/eds-icon-twitter.entry-D6I83zuS.mjs +0 -13
- package/eds-icon-twitter.entry-I9FRjdSE.js +0 -1
- package/eds-icon-user.entry-BI7Uw3Pp.mjs +0 -13
- package/eds-icon-user.entry-DcLB78T6.js +0 -1
- package/eds-icon-youtube.entry-CR4ml_RW.mjs +0 -13
- package/eds-icon-youtube.entry-DAke-XDg.js +0 -1
- package/eds-login.entry-DOeyfoyM.js +0 -1
- package/eds-login.entry-DmJw6ABI.mjs +0 -46
- package/eds-logo-variations.entry-o4lyGmhR.mjs +0 -22
- package/eds-matomo-notice.entry-tzuOtKT9.js +0 -1
- package/eds-modal.entry-B7Ph4m3y.js +0 -1
- package/eds-modal.entry-BW8crUoC.mjs +0 -65
- package/eds-pagination_2.entry-DoZ-NFBH.js +0 -1
- package/eds-rating.entry-J5lQt6oj.mjs +0 -40
- package/eds-rating.entry-dK5fopCq.js +0 -1
- package/eds-tabs-content.entry-CTM0EjTl.js +0 -1
- package/eds-tabs.entry-BWxSN8SV.js +0 -1
- package/eds-timeline.entry-D9KWrb_r.js +0 -1
- package/eds-tooltip.entry-CfhqHRxF.js +0 -1
- package/eds-trl.entry-COK7rgVS.mjs +0 -36
- package/eds-trl.entry-CoySvAJL.js +0 -1
- package/incorrect-use-of-colors.entry-D7xAYXu2.js +0 -1
- package/incorrect-use-of-colors.entry-DsNEjuWo.mjs +0 -42
- package/index-Dvww9rdy.js +0 -21
- package/keycloak-13893af6-NiM3zoVg.js +0 -9
- package/logo-variations-horizontal_2.entry-BWau6qh4.js +0 -7
- package/logo-variations-horizontal_2.entry-xvJ8Iiu5.mjs +0 -29
- package/logo-wrong-usage.entry-RcSb8NIe.mjs +0 -14
- package/logo-wrong-usage.entry-sU8NISwX.js +0 -1
- package/token-ratios.entry-Dfz4q4qy.js +0 -1
- package/token-spacing.entry-ByzbVlGi.js +0 -1
- package/token-spacing.entry-DvopunO1.mjs +0 -12
package/{eds-components-section.entry-BAWU9rKy.mjs → eds-components-section.entry-D1ovrn93.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as t, h as e } from "./index-
|
|
1
|
+
import { r as t, h as e } from "./index-C-Gy1Lax.mjs";
|
|
2
2
|
const a = () => e(
|
|
3
3
|
"div",
|
|
4
4
|
{ class: "static-content container" },
|
|
@@ -62,6 +62,16 @@ const a = () => e(
|
|
|
62
62
|
"div",
|
|
63
63
|
{ class: "my-8" },
|
|
64
64
|
e("eds-code-block", { code: "npm install @ebrains/react", language: "html", "copy-label": "Copy Code" })
|
|
65
|
+
),
|
|
66
|
+
e(
|
|
67
|
+
"div",
|
|
68
|
+
{ class: "my-8" },
|
|
69
|
+
e("eds-code-block", { code: "npm install @ebrains/vue", language: "html", "copy-label": "Copy Code" })
|
|
70
|
+
),
|
|
71
|
+
e(
|
|
72
|
+
"div",
|
|
73
|
+
{ class: "my-8" },
|
|
74
|
+
e("eds-code-block", { code: "npm install @ebrains/angular", language: "html", "copy-label": "Copy Code" })
|
|
65
75
|
)
|
|
66
76
|
), o = () => e(
|
|
67
77
|
"div",
|
|
@@ -77,11 +87,16 @@ const a = () => e(
|
|
|
77
87
|
"eds-section-core",
|
|
78
88
|
{ "section-title": "Example React App", "heading-level": "h3" },
|
|
79
89
|
e("eds-code-block", { code: `
|
|
80
|
-
import {
|
|
90
|
+
import {
|
|
91
|
+
EdsHeader,
|
|
92
|
+
EdsFullscreenMenu,
|
|
93
|
+
EdsUser
|
|
94
|
+
} from "@ebrains/react";
|
|
81
95
|
|
|
82
96
|
interface User {
|
|
83
97
|
firstname: string;
|
|
84
98
|
lastname: string;
|
|
99
|
+
// Add any other properties your user object might have
|
|
85
100
|
}
|
|
86
101
|
|
|
87
102
|
interface AuthStatus {
|
|
@@ -92,73 +107,77 @@ interface AuthStatus {
|
|
|
92
107
|
import { useEffect, useState } from "react";
|
|
93
108
|
|
|
94
109
|
export function App() {
|
|
95
|
-
|
|
96
110
|
const [authStatus, setAuthStatus] = useState<AuthStatus>({
|
|
97
111
|
authenticated: false,
|
|
98
112
|
user: null,
|
|
99
113
|
});
|
|
100
|
-
|
|
101
114
|
const [activeTabIndex, setActiveTabIndex] = useState<number>(0);
|
|
102
115
|
|
|
103
116
|
// Use useEffect to render Stencil components dynamically after the component mounts
|
|
104
117
|
useEffect(() => {
|
|
105
|
-
|
|
106
118
|
const handleAuthStatusChange = (event: CustomEvent) => {
|
|
107
119
|
console.log(event.detail);
|
|
108
120
|
setAuthStatus(event.detail); // Set the entire object
|
|
109
121
|
};
|
|
110
122
|
|
|
111
|
-
const handleTabChange = (
|
|
112
|
-
event: CustomEvent<{ index: number; name: string }>,
|
|
113
|
-
) => {
|
|
114
|
-
console.log(event.detail);
|
|
115
|
-
setActiveTabIndex(event.detail.index);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
123
|
document.addEventListener(
|
|
119
124
|
"authStatusChanged",
|
|
120
125
|
handleAuthStatusChange as EventListener,
|
|
121
126
|
);
|
|
122
|
-
document.addEventListener("tabChange", handleTabChange as EventListener);
|
|
123
127
|
|
|
124
128
|
return () => {
|
|
125
129
|
document.removeEventListener(
|
|
126
130
|
"authStatusChanged",
|
|
127
131
|
handleAuthStatusChange as EventListener,
|
|
128
132
|
);
|
|
129
|
-
document.removeEventListener(
|
|
130
|
-
"tabChange",
|
|
131
|
-
handleTabChange as EventListener,
|
|
132
|
-
);
|
|
133
133
|
};
|
|
134
|
-
}, []);
|
|
134
|
+
}, []);
|
|
135
135
|
|
|
136
136
|
return (
|
|
137
|
-
<div
|
|
137
|
+
<div>
|
|
138
138
|
<EdsHeader
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
139
|
+
homeUrl="/"
|
|
140
|
+
menuEnabled={true}
|
|
141
|
+
inverseHeader={false}
|
|
142
|
+
links={[
|
|
143
|
+
{ label: "About", url: "#" },
|
|
144
|
+
{ label: "Focus Areas", url: "#" },
|
|
145
|
+
{ label: "News & Events", url: "#" },
|
|
146
|
+
{ label: "Contact", url: "#" }
|
|
147
|
+
]}
|
|
148
|
+
>
|
|
149
|
+
<div className="px-16">
|
|
150
|
+
<EdsUser
|
|
151
|
+
keycloak-url="http://localhost:8080"
|
|
152
|
+
keycloak-realm="nigeor-realm"
|
|
153
|
+
keycloak-client-id="stencil-app"
|
|
154
|
+
></EdsUser>
|
|
155
|
+
</div>
|
|
156
|
+
</EdsHeader>
|
|
151
157
|
|
|
152
|
-
<
|
|
153
|
-
|
|
158
|
+
<EdsFullscreenMenu
|
|
159
|
+
home-url="/"
|
|
160
|
+
links={[
|
|
161
|
+
{ label: "About", url: "#" },
|
|
162
|
+
{ label: "Focus Areas", url: "#" },
|
|
163
|
+
{ label: "News & Events", url: "#" },
|
|
164
|
+
{ label: "Contact", url: "#" }
|
|
165
|
+
]}
|
|
166
|
+
></EdsFullscreenMenu>
|
|
167
|
+
|
|
168
|
+
<div>
|
|
169
|
+
User is{" "}
|
|
170
|
+
{authStatus.authenticated ? "authenticated" : "not authenticated"}
|
|
154
171
|
</div>
|
|
155
172
|
{authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}
|
|
156
|
-
|
|
173
|
+
|
|
174
|
+
<div id="main"></div>
|
|
157
175
|
</div>
|
|
158
176
|
);
|
|
159
177
|
}
|
|
160
178
|
|
|
161
179
|
export default App;
|
|
180
|
+
|
|
162
181
|
`, language: "javascript", "copy-label": "Copy Code" })
|
|
163
182
|
)
|
|
164
183
|
), l = () => e(
|
|
@@ -266,7 +285,7 @@ defineCustomElements();`, language: "javascript", "copy-label": "Copy Code" }),
|
|
|
266
285
|
<eds-footer></eds-footer>
|
|
267
286
|
</div>`, language: "javascript", "copy-label": "Copy Code" })
|
|
268
287
|
)
|
|
269
|
-
),
|
|
288
|
+
), c = class {
|
|
270
289
|
constructor(n) {
|
|
271
290
|
t(this, n), this.tabIndex = void 0;
|
|
272
291
|
}
|
|
@@ -287,9 +306,9 @@ defineCustomElements();`, language: "javascript", "copy-label": "Copy Code" }),
|
|
|
287
306
|
}
|
|
288
307
|
}
|
|
289
308
|
render() {
|
|
290
|
-
return e("div", { key: "
|
|
309
|
+
return e("div", { key: "7e582a0eeafc2687229454532b5a7f66f91c1856", class: "container" }, this.renderContent());
|
|
291
310
|
}
|
|
292
311
|
};
|
|
293
312
|
export {
|
|
294
|
-
|
|
313
|
+
c as eds_components_section
|
|
295
314
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D_kZU_4I.js"),l=class{constructor(t){e.registerInstance(this,t),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h("div",null,e.h("h2",null,"Primary Palette"),e.h("color-primary-palette",null),e.h("h2",null,"Secondary Palette"),e.h("color-secondary-palette",null),e.h("h2",null,"Support Palette"),e.h("color-support-palette",null));case 1:return e.h("div",null,e.h("h2",null,"Primary Palette"),e.h("gradient-primary-palette",null),e.h("h2",null,"Secondary Palette"),e.h("gradient-secondary-palette",null),e.h("h2",null,"Support Palette"),e.h("gradient-support-palette",null));default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"e8cd71caa7b23cc4dc28c694ecb9f13e3fd4170a",class:"container"},this.renderContent())}};exports.eds_docs_palettes=l;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as l, h as e } from "./index-
|
|
1
|
+
import { r as l, h as e } from "./index-C-Gy1Lax.mjs";
|
|
2
2
|
const r = class {
|
|
3
3
|
constructor(t) {
|
|
4
4
|
l(this, t), this.tabIndex = void 0;
|
|
@@ -14,7 +14,7 @@ const r = class {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return e("div", { key: "
|
|
17
|
+
return e("div", { key: "e8cd71caa7b23cc4dc28c694ecb9f13e3fd4170a", class: "container" }, this.renderContent());
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as n, h as e } from "./index-
|
|
1
|
+
import { r as n, h as e } from "./index-C-Gy1Lax.mjs";
|
|
2
2
|
const r = class {
|
|
3
3
|
constructor(t) {
|
|
4
4
|
n(this, t), this.tabIndex = void 0;
|
|
@@ -22,7 +22,7 @@ const r = class {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return e("div", { key: "
|
|
25
|
+
return e("div", { key: "b140f7650e5e01711dc0778b04af83f9d004efc7", class: "container" }, this.renderContent());
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D_kZU_4I.js"),n=class{constructor(t){e.registerInstance(this,t),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h("token-list",{show:"background"});case 1:return e.h("token-list",{show:"text"});case 2:return e.h("token-list",{show:"border"});case 3:return e.h("token-radii",null);case 4:return e.h("token-list",{show:"outline"});case 5:return e.h("token-shadows",null);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"b140f7650e5e01711dc0778b04af83f9d004efc7",class:"container"},this.renderContent())}};exports.eds_docs_tokens=n;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { r as l, h as s, g as n } from "./index-C-Gy1Lax.mjs";
|
|
2
|
+
import { s as f } from "./analytics-1cde8e4a-BDRcCMlV.mjs";
|
|
3
|
+
const c = ".z-focus{z-index:99}.relative{position:relative}.shadow-small{--tw-shadow:0px 1.5px 2px rgba(0, 0, 0, 0.1);--tw-shadow-colored:0px 1.5px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-inverse{background-color:var(--white)}.border-softest{border:2px solid rgba(0, 0, 0, .05)}.z-10{z-index:10}.z-on-top{z-index:99999}.absolute{position:absolute}.top-full{top:100%}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.gap-y-4{row-gap:0.25rem}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.left-0{left:0rem}.left-1\\/2{left:50%}.left-4{left:0.25rem}.left-\\[4px\\]{left:4px}.right-0{right:0rem}.right-4{right:0.25rem}.right-8{right:0.5rem}", h = c, p = class {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
l(this, e), this.focusableItems = [], this.handleClick = () => {
|
|
6
|
+
var t;
|
|
7
|
+
this.isOpen = !this.isOpen, this.isOpen ? (this.focusIndex = 0, this.focusItem()) : this.closeDropdown(), f({
|
|
8
|
+
category: "ui-component",
|
|
9
|
+
parentContext: null,
|
|
10
|
+
tag: this.host.tagName.toLowerCase(),
|
|
11
|
+
name: ((t = this.label) === null || t === void 0 ? void 0 : t.toLowerCase()) || "",
|
|
12
|
+
action: this.isOpen ? "expanded" : "collapsed"
|
|
13
|
+
});
|
|
14
|
+
}, this.icon = "chevron-down", this.label = void 0, this.rounded = !1, this.ariaLabel = "Open dropdown", this.asNav = !0, this.dropdownPos = "left", this.dropdownOffset = !0, this.intent = "tertiary", this.isOpen = !1, this.focusIndex = -1;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Closes the dropdown when a click occurs outside of it.
|
|
18
|
+
* @param {Event} e - The click event.
|
|
19
|
+
*/
|
|
20
|
+
handleWindowClick(e) {
|
|
21
|
+
this.host.contains(e.target) || this.closeDropdown();
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Handles keyboard navigation and accessibility within the dropdown.
|
|
25
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
26
|
+
*/
|
|
27
|
+
handleKeyDown(e) {
|
|
28
|
+
if (this.isOpen)
|
|
29
|
+
switch (e.key) {
|
|
30
|
+
case "Tab":
|
|
31
|
+
this.closeDropdown();
|
|
32
|
+
break;
|
|
33
|
+
case "ArrowUp":
|
|
34
|
+
e.preventDefault(), this.focusIndex = (this.focusIndex - 1 + this.focusableItems.length) % this.focusableItems.length, this.focusItem();
|
|
35
|
+
break;
|
|
36
|
+
case "ArrowDown":
|
|
37
|
+
e.preventDefault(), this.focusIndex = (this.focusIndex + 1) % this.focusableItems.length, this.focusItem();
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Closes the dropdown and resets focus.
|
|
43
|
+
*/
|
|
44
|
+
closeDropdown() {
|
|
45
|
+
this.isOpen = !1, this.focusIndex = -1;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Sets focus on the currently selected item in the dropdown.
|
|
49
|
+
*/
|
|
50
|
+
focusItem() {
|
|
51
|
+
var e;
|
|
52
|
+
(e = this.focusableItems[this.focusIndex]) === null || e === void 0 || e.focus();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Lifecycle method that runs after the component has been added to the DOM.
|
|
56
|
+
* Initializes focusable items within the dropdown.
|
|
57
|
+
*/
|
|
58
|
+
componentDidLoad() {
|
|
59
|
+
var e;
|
|
60
|
+
this.focusableItems = Array.from(((e = this.dropdownContent) === null || e === void 0 ? void 0 : e.querySelectorAll("a, button")) || []);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Renders the dropdown component and displays its content when open.
|
|
64
|
+
* @returns {JSX.Element} The rendered dropdown component.
|
|
65
|
+
*/
|
|
66
|
+
render() {
|
|
67
|
+
return s("div", { key: "84f4cea78ea1c40c7897a356fe03ac83922fccb8", class: "z-focus relative", ref: (e) => this.dropdownContent = e }, s("eds-button", { key: "99dc51632dc82830054502a2d6d77d9fcefe9337", label: this.label, "aria-label": this.ariaLabel, icon: this.icon, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu" }), s("nav", { key: "a63613a7ecf709fd1d22d77da4b2d286905fef3e", role: "menu", class: {
|
|
68
|
+
"shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8": !0,
|
|
69
|
+
"left-4": this.dropdownPos === "left" && this.dropdownOffset,
|
|
70
|
+
"left-0": this.dropdownPos === "left" && !this.dropdownOffset,
|
|
71
|
+
"right-4": this.dropdownPos === "right" && this.dropdownOffset,
|
|
72
|
+
"right-0": this.dropdownPos === "right" && !this.dropdownOffset,
|
|
73
|
+
"rounded-lg": this.rounded
|
|
74
|
+
}, style: { display: this.isOpen ? "block" : "none" }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, s("slot", { key: "dda70b865ed03dc7ad36a32934587bbcb0a16c1b" })));
|
|
75
|
+
}
|
|
76
|
+
get host() {
|
|
77
|
+
return n(this);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
p.style = h;
|
|
81
|
+
const g = class {
|
|
82
|
+
constructor(e) {
|
|
83
|
+
l(this, e), this.user = void 0, this.links = void 0, this.onLogout = void 0, this.parsedUser = {}, this.parsedLinks = [];
|
|
84
|
+
}
|
|
85
|
+
parseUserProp(e) {
|
|
86
|
+
this.parsedUser = typeof e == "string" ? JSON.parse(e) : e;
|
|
87
|
+
}
|
|
88
|
+
parseLinksProp(e) {
|
|
89
|
+
this.parsedLinks = typeof e == "string" ? JSON.parse(e) : e;
|
|
90
|
+
}
|
|
91
|
+
componentWillLoad() {
|
|
92
|
+
this.parseUserProp(this.user), this.parseLinksProp(this.links);
|
|
93
|
+
}
|
|
94
|
+
get initials() {
|
|
95
|
+
var e, t, i, o, a, r, d;
|
|
96
|
+
return `${((t = (e = this.parsedUser) === null || e === void 0 ? void 0 : e.firstname) === null || t === void 0 ? void 0 : t.charAt(0)) || ""}${((o = (i = this.parsedUser) === null || i === void 0 ? void 0 : i.lastname) === null || o === void 0 ? void 0 : o.charAt(0)) || ""}`.toUpperCase() || ((d = (r = (a = this.parsedUser) === null || a === void 0 ? void 0 : a.fullname) === null || r === void 0 ? void 0 : r.charAt(0)) === null || d === void 0 ? void 0 : d.toUpperCase()) || "";
|
|
97
|
+
}
|
|
98
|
+
get hasLogout() {
|
|
99
|
+
return typeof this.onLogout == "function";
|
|
100
|
+
}
|
|
101
|
+
render() {
|
|
102
|
+
var e, t, i, o, a;
|
|
103
|
+
return s("div", { key: "4a80335b6a59b9653130ca75a6e42c04fce68f4f", class: "min-w-[280px] p-8" }, s("div", { key: "9c97f6be46216587692d4852174cecfaacb70593", class: "flex gap-x-16 pb-16 border-b-2 border-softer" }, s("eds-avatar", { key: "c778f6bdfb21068ca7c2deff6e298f61af6dbc67", "first-name": (e = this.parsedUser) === null || e === void 0 ? void 0 : e.firstname, "last-name": (t = this.parsedUser) === null || t === void 0 ? void 0 : t.lastname, initials: this.initials, color: "grey", rounded: !0, "initials-strong": !0 }), s("div", { key: "7f453546c9cc54597069abb3e4b50312fe7bf364", class: "max-w-full" }, ((i = this.parsedUser) === null || i === void 0 ? void 0 : i.fullname) && s("p", { key: "34e080ef159535820c09378701de0e6f4fd96009", class: "f-ui-01 text-default w-full text-ellipsis" }, this.parsedUser.fullname), ((o = this.parsedUser) === null || o === void 0 ? void 0 : o.username) && s("p", { key: "2f85764e7d015dc3f3b22ca8a07126f8f57216ef", class: "f-ui-03-light text-light mt-4" }, this.parsedUser.username), ((a = this.parsedUser) === null || a === void 0 ? void 0 : a.email) && s("p", { key: "002dec51e979c29f2343f55e004449e4cee4075c", class: "f-ui-03-light text-light mt-4" }, this.parsedUser.email))), s("div", { key: "740b78c504257fb755ba7ba04dd25f023d37ed33", class: "text-default mt-16 flex w-full flex-col gap-y-8" }, s("div", { key: "ac307937bdd3fc86cce502e5eeb3e922d931f418", class: "border-softer mb-10 border-b-2 pb-16" }, s("eds-link", { key: "bdd0f1ef62ac78ffb1b40ed6873475df360cec66", label: "My EBRAINS", "aria-label": "My EBRAINS", url: "https://www.ebrains.eu/dashboard", intent: "primary", "extra-class": "w-full", external: !0 })), s("eds-link", { key: 1, label: "Account Settings", url: "https://iam.ebrains.eu/auth/realms/hbp/account/", intent: "secondary", icon: "arrow-diagonal", external: !0, "extra-class": "w-full" }), this.hasLogout && s("eds-link", { key: "d73016ad71f3b356b7fb7d0a2a84124eabb05da5", label: "Sign out", intent: "tertiary", "extra-class": "w-full justify-center", onClick: () => this.onLogout && this.onLogout() })));
|
|
104
|
+
}
|
|
105
|
+
static get watchers() {
|
|
106
|
+
return {
|
|
107
|
+
user: ["parseUserProp"],
|
|
108
|
+
links: ["parseLinksProp"]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
p as eds_dropdown,
|
|
114
|
+
g as eds_user_modal
|
|
115
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-D_kZU_4I.js"),l=require("./analytics-1cde8e4a-B_MD-9qW.js"),h=".z-focus{z-index:99}.relative{position:relative}.shadow-small{--tw-shadow:0px 1.5px 2px rgba(0, 0, 0, 0.1);--tw-shadow-colored:0px 1.5px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-inverse{background-color:var(--white)}.border-softest{border:2px solid rgba(0, 0, 0, .05)}.z-10{z-index:10}.z-on-top{z-index:99999}.absolute{position:absolute}.top-full{top:100%}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.gap-y-4{row-gap:0.25rem}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.left-0{left:0rem}.left-1\\/2{left:50%}.left-4{left:0.25rem}.left-\\[4px\\]{left:4px}.right-0{right:0rem}.right-4{right:0.25rem}.right-8{right:0.5rem}",c=h,n=class{constructor(e){s.registerInstance(this,e),this.focusableItems=[],this.handleClick=()=>{var t;this.isOpen=!this.isOpen,this.isOpen?(this.focusIndex=0,this.focusItem()):this.closeDropdown(),l.sendAnalytics({category:"ui-component",parentContext:null,tag:this.host.tagName.toLowerCase(),name:((t=this.label)===null||t===void 0?void 0:t.toLowerCase())||"",action:this.isOpen?"expanded":"collapsed"})},this.icon="chevron-down",this.label=void 0,this.rounded=!1,this.ariaLabel="Open dropdown",this.asNav=!0,this.dropdownPos="left",this.dropdownOffset=!0,this.intent="tertiary",this.isOpen=!1,this.focusIndex=-1}handleWindowClick(e){this.host.contains(e.target)||this.closeDropdown()}handleKeyDown(e){if(this.isOpen)switch(e.key){case"Tab":this.closeDropdown();break;case"ArrowUp":e.preventDefault(),this.focusIndex=(this.focusIndex-1+this.focusableItems.length)%this.focusableItems.length,this.focusItem();break;case"ArrowDown":e.preventDefault(),this.focusIndex=(this.focusIndex+1)%this.focusableItems.length,this.focusItem();break}}closeDropdown(){this.isOpen=!1,this.focusIndex=-1}focusItem(){var e;(e=this.focusableItems[this.focusIndex])===null||e===void 0||e.focus()}componentDidLoad(){var e;this.focusableItems=Array.from(((e=this.dropdownContent)===null||e===void 0?void 0:e.querySelectorAll("a, button"))||[])}render(){return s.h("div",{key:"84f4cea78ea1c40c7897a356fe03ac83922fccb8",class:"z-focus relative",ref:e=>this.dropdownContent=e},s.h("eds-button",{key:"99dc51632dc82830054502a2d6d77d9fcefe9337",label:this.label,"aria-label":this.ariaLabel,icon:this.icon,intent:this.intent,onClick:this.handleClick,"aria-expanded":this.isOpen.toString(),"aria-haspopup":"menu"}),s.h("nav",{key:"a63613a7ecf709fd1d22d77da4b2d286905fef3e",role:"menu",class:{"shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8":!0,"left-4":this.dropdownPos==="left"&&this.dropdownOffset,"left-0":this.dropdownPos==="left"&&!this.dropdownOffset,"right-4":this.dropdownPos==="right"&&this.dropdownOffset,"right-0":this.dropdownPos==="right"&&!this.dropdownOffset,"rounded-lg":this.rounded},style:{display:this.isOpen?"block":"none"},"aria-label":"Dropdown","aria-hidden":!this.isOpen},s.h("slot",{key:"dda70b865ed03dc7ad36a32934587bbcb0a16c1b"})))}get host(){return s.getElement(this)}};n.style=c;const f=class{constructor(e){s.registerInstance(this,e),this.user=void 0,this.links=void 0,this.onLogout=void 0,this.parsedUser={},this.parsedLinks=[]}parseUserProp(e){this.parsedUser=typeof e=="string"?JSON.parse(e):e}parseLinksProp(e){this.parsedLinks=typeof e=="string"?JSON.parse(e):e}componentWillLoad(){this.parseUserProp(this.user),this.parseLinksProp(this.links)}get initials(){var e,t,i,o,r,a,d;return`${((t=(e=this.parsedUser)===null||e===void 0?void 0:e.firstname)===null||t===void 0?void 0:t.charAt(0))||""}${((o=(i=this.parsedUser)===null||i===void 0?void 0:i.lastname)===null||o===void 0?void 0:o.charAt(0))||""}`.toUpperCase()||((d=(a=(r=this.parsedUser)===null||r===void 0?void 0:r.fullname)===null||a===void 0?void 0:a.charAt(0))===null||d===void 0?void 0:d.toUpperCase())||""}get hasLogout(){return typeof this.onLogout=="function"}render(){var e,t,i,o,r;return s.h("div",{key:"4a80335b6a59b9653130ca75a6e42c04fce68f4f",class:"min-w-[280px] p-8"},s.h("div",{key:"9c97f6be46216587692d4852174cecfaacb70593",class:"flex gap-x-16 pb-16 border-b-2 border-softer"},s.h("eds-avatar",{key:"c778f6bdfb21068ca7c2deff6e298f61af6dbc67","first-name":(e=this.parsedUser)===null||e===void 0?void 0:e.firstname,"last-name":(t=this.parsedUser)===null||t===void 0?void 0:t.lastname,initials:this.initials,color:"grey",rounded:!0,"initials-strong":!0}),s.h("div",{key:"7f453546c9cc54597069abb3e4b50312fe7bf364",class:"max-w-full"},((i=this.parsedUser)===null||i===void 0?void 0:i.fullname)&&s.h("p",{key:"34e080ef159535820c09378701de0e6f4fd96009",class:"f-ui-01 text-default w-full text-ellipsis"},this.parsedUser.fullname),((o=this.parsedUser)===null||o===void 0?void 0:o.username)&&s.h("p",{key:"2f85764e7d015dc3f3b22ca8a07126f8f57216ef",class:"f-ui-03-light text-light mt-4"},this.parsedUser.username),((r=this.parsedUser)===null||r===void 0?void 0:r.email)&&s.h("p",{key:"002dec51e979c29f2343f55e004449e4cee4075c",class:"f-ui-03-light text-light mt-4"},this.parsedUser.email))),s.h("div",{key:"740b78c504257fb755ba7ba04dd25f023d37ed33",class:"text-default mt-16 flex w-full flex-col gap-y-8"},s.h("div",{key:"ac307937bdd3fc86cce502e5eeb3e922d931f418",class:"border-softer mb-10 border-b-2 pb-16"},s.h("eds-link",{key:"bdd0f1ef62ac78ffb1b40ed6873475df360cec66",label:"My EBRAINS","aria-label":"My EBRAINS",url:"https://www.ebrains.eu/dashboard",intent:"primary","extra-class":"w-full",external:!0})),s.h("eds-link",{key:1,label:"Account Settings",url:"https://iam.ebrains.eu/auth/realms/hbp/account/",intent:"secondary",icon:"arrow-diagonal",external:!0,"extra-class":"w-full"}),this.hasLogout&&s.h("eds-link",{key:"d73016ad71f3b356b7fb7d0a2a84124eabb05da5",label:"Sign out",intent:"tertiary","extra-class":"w-full justify-center",onClick:()=>this.onLogout&&this.onLogout()})))}static get watchers(){return{user:["parseUserProp"],links:["parseLinksProp"]}}};exports.eds_dropdown=n;exports.eds_user_modal=f;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-D_kZU_4I.js"),g=require("./toastManager-d9eee791-DvR_vUPI.js"),x=require("./analytics-1cde8e4a-B_MD-9qW.js"),h=`@font-face {
|
|
2
2
|
font-family: "Inter";
|
|
3
3
|
font-weight: 100 900;
|
|
4
4
|
font-display: swap;
|
|
@@ -7150,4 +7150,4 @@
|
|
|
7150
7150
|
padding-right: 0rem;
|
|
7151
7151
|
}
|
|
7152
7152
|
}
|
|
7153
|
-
`,h
|
|
7153
|
+
`,f=h,b=class{constructor(e){d.registerInstance(this,e),this.formSubmitting=d.createEvent(this,"formSubmitting",7),this.handleChange=(r,n)=>{const i=r.target;this.values=Object.assign(Object.assign({},this.values),{[n.name]:i.value});const l=Object.assign({},this.errors);if(n.type==="checkbox"||n.type==="radio")if(n.options){const t=this.validateFieldGroup(n.name,n.type,n.required);t.length>0?l[n.name]=t:delete l[n.name]}else{const t=this.validateSingleBox(n.name,n.required);t.length>0?l[n.name]=t:delete l[n.name]}else{const t=this.validateField(n.name,i.value,n.type,n.required,n.maxlength);t.length>0?l[n.name]=t:delete l[n.name]}this.errors=l,this.hasError=Object.keys(l).length>0},this.handleSubmit=async r=>{var n,i,l;if(r.preventDefault(),this.isSubmitting)return;if(this.validateForm(),this.hasError){x.sendAnalytics({category:"ui-component",parentContext:null,tag:this.el.tagName.toLowerCase(),name:`${(n=this.submitBtnLabel)===null||n===void 0?void 0:n.toLowerCase()}/error`||"",action:"click"}),this.alertMessage=this.errorMessage;return}this.isSubmitting=!0,this.formSubmitted=!1,this.alertMessage=null,this.errors={};const t=await this.getFormData();this.setFormUrl&&typeof window<"u"&&t.set("form_url",window.location.href),this.authUser&&t.set("form_user",(i=this.authUser)===null||i===void 0?void 0:i.email);const s=this.coupleAuth?{Authorization:`Bearer ${this.authUser.token}`}:{};try{const o=await fetch(this.endpoint,{method:"POST",body:t,headers:s});if(!o.ok){const c=await o.json();this.hasError=!0,g.toast.show(c.error||this.errorMessage,"error");return}const a=await o.json();this.formSubmitted=!0,g.toast.show(a.message||this.successMessage,"success"),this.formEl.reset(),x.sendAnalytics({category:"ui-component",parentContext:null,tag:this.el.tagName.toLowerCase(),name:`${(l=this.submitBtnLabel)===null||l===void 0?void 0:l.toLowerCase()}/success`||"",action:"click"})}catch(o){this.hasError=!0,g.toast.show(`${o}`,"error")}finally{this.isSubmitting=!1,this.formSubmitting.emit(this.isSubmitting)}},this.setFormUrl=!0,this.submitBtn=!0,this.submitBtnLabel="Submit",this.successMessage="Your message has been sent.",this.errorMessage="Some fields in your form are incorrect.",this.submitBtnHintMessage="To participate, please sign in using your EBRAINS account. If you do not have an account yet, you can easily create one on the EBRAINS portal.",this.endpoint=void 0,this.name="form",this.fields=[],this.values={},this.coupleAuth=!1,this.formSubmitted=!1,this.hasError=!1,this.errors={},this.isSubmitting=!1,this.alertMessage=null,this.isAuthenticated=!1,this.authUser=void 0,this.parsedFields=[]}onAuthStatusChanged(e){var r;this.isAuthenticated=(r=e.detail)===null||r===void 0?void 0:r.authenticated,this.authUser=e.detail.user}componentDidLoad(){this.parseFields(this.fields)}isFieldVisible(e){return e.condition?this.values[e.condition.field]===e.condition.value:!0}validateField(e,r,n,i,l){const t=[];return i&&!r&&t.push(`${e} is required.`),l&&typeof r=="string"&&r.length>l&&t.push(`${e} must be at most ${l} characters.`),n==="email"&&r&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.toString())&&t.push("Invalid email format."),t}validateFieldGroup(e,r,n){const t=Array.from(this.formEl.querySelectorAll("eds-input-field")).filter(o=>{var a,c;return((c=(a=o.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll(`input[name="${e}"]`))===null||c===void 0?void 0:c.length)>0}).flatMap(o=>{var a;return Array.from(((a=o.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll(`input[name="${e}"]`))||[])}).some(o=>o.checked),s=[];return n&&!t&&s.push(`At least one option in ${e} is required.`),s}validateSingleBox(e,r){var n;const i=[],l=Array.from(this.formEl.querySelectorAll("eds-input-field")).find(s=>{var o;return(o=s.shadowRoot)===null||o===void 0?void 0:o.querySelector(`[name="${e}"]`)});if(!l)return r&&i.push(`${e} is required.`),i;const t=(n=l.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[name="${e}"]`);return r&&t&&!t.checked&&i.push(`${e} is required.`),i}validateForm(){this.errors={},this.hasError=!1,this.parsedFields.forEach(e=>{if(e.type!=="hidden")if((e.type==="checkbox"||e.type==="radio")&&!e.options){const r=this.validateSingleBox(e.name,e.required);r.length>0&&(this.errors[e.name]=r,this.hasError=!0)}else if(e.options&&(e.type==="checkbox"||e.type==="radio")){const r=this.validateFieldGroup(e.name,e.type,e.required);r.length>0&&(this.errors[e.name]=r,this.hasError=!0)}else{const r=this.findFieldElement(e.name);if(r){const n=r.value,i=this.validateField(e.name,n,e.type,e.required,e.maxlength);i.length>0&&(this.errors[e.name]=i,this.hasError=!0)}}})}findFieldElement(e){const r=Array.from(this.formEl.querySelectorAll("eds-input-field"));for(const n of r)if(n.shadowRoot){const i=n.shadowRoot.querySelector(`[name="${e}"]`);if(i)return i}return null}async getFormData(){const e=new FormData;return e.append("form_name",this.name),Array.from(this.formEl.querySelectorAll("eds-input-field")).forEach(n=>{if(n.shadowRoot){const i=n.shadowRoot.querySelector("input, textarea, select");if(i&&i.name)if(i.type==="checkbox"||i.type==="radio"){const t=Array.from(n.shadowRoot.querySelectorAll(`input[name="${i.name}"]:checked`)).map(s=>s.value);e.append(i.name,t.join(","))}else if(i.type==="file"){const l=i;l.files&&l.files.length>0&&Array.from(l.files).forEach(t=>{e.append(l.name,t)})}else e.append(i.name,i.value)}}),e}parseFields(e){try{typeof e=="string"?this.parsedFields=JSON.parse(e):Array.isArray(e)?this.parsedFields=e:e&&typeof e=="object"?this.parsedFields=e:this.parsedFields=[]}catch(r){console.error("Error parsing fields prop:",r),this.parsedFields=[]}}render(){const e=this.parsedFields.filter(n=>n.type==="hidden"),r=this.parsedFields.filter(n=>n.type!=="hidden");return d.h("form",{key:"3d4ae34d48c0551f9de6dacb50ceee15b487b5de",ref:n=>this.formEl=n,enctype:"multipart/form-data",autocomplete:"on",method:"post",onSubmit:this.handleSubmit},d.h("div",{key:"344c56dcba3de5a1b55255d794a78fb0f19d04b5"},d.h("slot",{key:"3ca6d203458d67fa66840fac55f94d71acc2ee4d"}),e.map((n,i)=>d.h("eds-input",{key:i,type:"hidden",name:n.name,value:n.value})),r.map((n,i)=>{var l,t;return this.isFieldVisible(n)?d.h("eds-input-field",{key:i,name:n.name,id:`${this.name}_${n.name}`,label:n.label,type:n.type,icon:n.icon||null,required:n.required,maxLength:n.maxlength,hint:n.hint,error:((l=this.errors[n.name])===null||l===void 0?void 0:l.length)>0,errorMessage:(t=this.errors[n.name])===null||t===void 0?void 0:t.join("<br />"),onInput:s=>this.handleChange(s,n),class:i>0?"mt-20":"",options:n.options}):null})),this.submitBtn&&d.h("div",{key:"22915285f3522f6d260e358eea964c59a9557a55",class:"mt-20"},d.h("eds-button",{key:"9e2191ba8cc49d7ac2a6588c0fa468214773c791",intent:"primary",label:this.submitBtnLabel,disabled:this.isSubmitting||this.coupleAuth&&!this.isAuthenticated,loading:this.isSubmitting,onClick:n=>this.handleSubmit(n)}),this.coupleAuth&&!this.isAuthenticated?d.h("p",{class:"f-ui-05 text-lighter mt-8 ml-8"},this.submitBtnHintMessage):null),this.alertMessage&&(this.formSubmitted||this.hasError)&&d.h("div",{key:"8045c3dff26286a6735157b82afd56ec9001ba14",class:"mt-20"},d.h("eds-alert",{key:"dc8c8f74e8aada9023f110bb862afee1fb629601",message:this.alertMessage,intent:this.hasError?"error":"success",direction:"horizontal"})))}get el(){return d.getElement(this)}static get watchers(){return{fields:["parseFields"]}}};b.style=f;exports.eds_form=b;
|