@ebrains/components 0.6.0-alpha.0 → 0.7.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/dist/cjs/color-primary-palette_6.cjs.entry.js +15 -15
- package/dist/cjs/components.cjs.js +2 -2
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/eds-accordion_22.cjs.entry.js +1959 -0
- package/dist/cjs/eds-alert.cjs.entry.js +1 -1
- package/dist/cjs/eds-app-root.cjs.entry.js +37 -0
- package/dist/cjs/eds-avatar_4.cjs.entry.js +180 -0
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +4 -18
- package/dist/cjs/eds-card-generic.cjs.entry.js +92 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-section.cjs.entry.js +39 -0
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +1 -1
- package/dist/cjs/eds-components-section.cjs.entry.js +2 -2
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +2 -2
- package/dist/cjs/eds-docs-palettes.cjs.entry.js +2 -2
- package/dist/cjs/eds-docs-tokens.cjs.entry.js +2 -2
- package/dist/cjs/{eds-dropdown_2.cjs.entry.js → eds-dropdown.cjs.entry.js} +8 -41
- package/dist/cjs/eds-feedback.cjs.entry.js +66 -0
- package/dist/cjs/eds-form.cjs.entry.js +237 -254
- package/dist/cjs/eds-frame.cjs.entry.js +32 -32
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-close.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-copy.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-eu.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-loader.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-menu.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-more.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-search.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-star.cjs.entry.js +18 -0
- package/dist/cjs/eds-icon-success.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-thumbs-down.cjs.entry.js +18 -0
- package/dist/cjs/eds-icon-thumbs-up.cjs.entry.js +18 -0
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-user.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +2 -2
- package/dist/{components/keycloak.js → cjs/eds-login_2.cjs.entry.js} +144 -1
- package/dist/cjs/eds-logo-variations.cjs.entry.js +2 -2
- package/dist/cjs/eds-modal.cjs.entry.js +15 -3
- package/dist/cjs/eds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/eds-rating.cjs.entry.js +31 -25
- package/dist/cjs/eds-section-core_2.cjs.entry.js +4 -4
- package/dist/cjs/eds-spinner.cjs.entry.js +54 -0
- package/dist/cjs/eds-steps.cjs.entry.js +9 -19
- package/dist/cjs/eds-svg-repository.cjs.entry.js +9 -3
- package/dist/cjs/eds-switch.cjs.entry.js +3 -3
- package/dist/cjs/eds-tabs.cjs.entry.js +10 -24
- package/dist/cjs/eds-timeline.cjs.entry.js +4 -22
- package/dist/cjs/eds-toast-manager.cjs.entry.js +46 -0
- package/dist/cjs/eds-toast.cjs.entry.js +76 -0
- package/dist/cjs/eds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/eds-trl.cjs.entry.js +2 -2
- package/dist/cjs/eds-user.cjs.entry.js +9 -79
- package/dist/cjs/eds-vertical-stepper.cjs.entry.js +2 -2
- package/dist/cjs/formUtils-4315a99c.js +228 -0
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/{index-f08e4f5c.js → index-2f63169d.js} +51 -54
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/logo-space.cjs.entry.js +2 -2
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +3 -3
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +2 -2
- package/dist/cjs/sharedUtils-8e287250.js +21 -0
- package/dist/cjs/star-942eee9f.js +7 -0
- package/dist/cjs/thumbs-down-714036b1.js +7 -0
- package/dist/cjs/thumbs-up-411babb8.js +8 -0
- package/dist/cjs/token-list_3.cjs.entry.js +4 -4
- package/dist/cjs/token-ratios.cjs.entry.js +2 -2
- package/dist/cjs/token-spacing.cjs.entry.js +2 -2
- package/dist/cjs/token-typography.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +10 -6
- package/dist/collection/components/eds-accordion/eds-accordion.js +7 -7
- package/dist/collection/components/eds-accordion/eds-accordion.stories.js +2 -2
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +3 -17
- package/dist/collection/components/eds-button/eds-button.css +1 -19
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +3 -15
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +24 -2
- package/dist/collection/components/eds-form/eds-form.js +278 -268
- package/dist/collection/components/eds-form-v2/eds-form-v2.css +7153 -0
- package/dist/collection/components/eds-form-v2/eds-form-v2.js +405 -0
- package/dist/collection/components/eds-form-v2/eds-form-v2.stories.js +73 -0
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-close/eds-icon-close.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-copy/eds-icon-copy.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-star/eds-icon-star.js +36 -0
- package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-down/eds-icon-thumbs-down.js +36 -0
- package/dist/collection/components/eds-icons/eds-icon-thumbs-up/eds-icon-thumbs-up.js +36 -0
- package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +1 -1
- package/dist/collection/components/eds-img/eds-img.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +57 -9
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +1 -1
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-link/eds-link.js +1 -1
- package/dist/collection/components/eds-logo/eds-logo.js +1 -1
- package/dist/collection/components/eds-modal/eds-modal.js +26 -2
- package/dist/collection/components/eds-pagination/eds-pagination.js +3 -3
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.css +31 -74
- package/dist/collection/components/eds-rating/eds-rating.js +44 -56
- package/dist/collection/components/eds-rating/eds-rating.stories.js +18 -51
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-spinner/eds-spinner.css +17 -0
- package/dist/collection/components/eds-spinner/eds-spinner.js +166 -0
- package/dist/collection/components/eds-spinner/eds-spinner.stories.js +52 -0
- package/dist/collection/components/eds-steps/eds-steps.css +1 -1
- package/dist/collection/components/eds-steps/eds-steps.js +8 -18
- package/dist/collection/components/eds-steps/eds-vertical-stepper.js +1 -1
- package/dist/collection/components/eds-switch/eds-switch.css +57 -58
- package/dist/collection/components/eds-switch/eds-switch.js +2 -2
- package/dist/collection/components/eds-table/eds-table.js +11 -8
- package/dist/collection/components/eds-table/eds-table.stories.js +11 -6
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.js +3 -21
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-trl/eds-trl.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
- package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
- package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +1 -1
- package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/eds-frame/eds-frame.css +113 -0
- package/dist/collection/{components → eds-docs-ui}/eds-frame/eds-frame.js +47 -76
- package/dist/collection/eds-docs-ui/eds-frame/eds-frame.stories.js +52 -0
- package/dist/collection/eds-docs-ui/eds-logo-variations/eds-logo-variations.js +1 -1
- package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +3 -19
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +1 -1
- package/dist/collection/shared-ui/eds-feedback/eds-feedback.css +155 -0
- package/dist/collection/shared-ui/eds-feedback/eds-feedback.js +191 -0
- package/dist/collection/shared-ui/eds-feedback/eds-feedback.stories.js +121 -0
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +1 -1
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +3 -28
- package/dist/collection/shared-ui/eds-header/eds-header.js +4 -20
- package/dist/collection/shared-ui/eds-header/eds-header.stories.js +1 -37
- package/dist/collection/shared-ui/eds-login/eds-login.js +34 -10
- package/dist/collection/{components → shared-ui}/eds-matomo-notice/eds-matomo-notice.js +32 -63
- package/dist/collection/{components → shared-ui}/eds-matomo-notice/eds-matomo-notice.stories.js +6 -4
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-splash-screen/eds-splash-screen.css +29 -0
- package/dist/collection/shared-ui/eds-splash-screen/eds-splash-screen.js +124 -0
- package/dist/collection/shared-ui/eds-splash-screen/eds-splash-screen.stories.js +23 -0
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.css +7774 -0
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +12 -25
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.stories.js +17 -30
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +4 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +17 -150
- package/dist/collection/shared-ui/eds-user/eds-user.stories.js +45 -0
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +39 -0
- package/dist/collection/utils/api.js +27 -0
- package/dist/collection/utils/eds-form/formUtils.js +95 -0
- package/dist/collection/utils/eds-form/formValidators.js +64 -0
- package/dist/collection/utils/eds-form/individualValidator.js +46 -0
- package/dist/collection/utils/eds-form/validateInput.js +23 -0
- package/dist/collection/utils/sharedUtils.js +17 -0
- package/dist/components/components.css +48 -72
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/eds-accordion2.js +5 -5
- package/dist/components/{eds-navigator.d.ts → eds-app-root.d.ts} +4 -4
- package/dist/components/eds-app-root.js +89 -0
- package/dist/components/eds-breadcrumb.js +3 -17
- package/dist/components/eds-button2.js +1 -1
- package/dist/components/eds-card-generic2.js +3 -15
- package/dist/components/eds-card-section.js +3 -19
- package/dist/components/eds-components-section.js +1 -1
- package/dist/components/eds-cookies-preference.js +1 -1
- package/dist/components/eds-docs-palettes.js +1 -1
- package/dist/components/eds-docs-tokens.js +1 -1
- package/dist/components/eds-dropdown2.js +8 -3
- package/dist/components/{eds-user-modal.d.ts → eds-feedback.d.ts} +4 -4
- package/dist/components/eds-feedback.js +105 -0
- package/dist/components/eds-footer2.js +1 -1
- package/dist/components/{eds-tab.d.ts → eds-form-v2.d.ts} +4 -4
- package/dist/{esm/eds-accordion_13.entry.js → components/eds-form-v2.js} +276 -854
- package/dist/components/eds-form.js +240 -255
- package/dist/components/eds-frame.js +33 -34
- package/dist/components/eds-fullscreen-menu.js +3 -28
- package/dist/components/eds-header.js +4 -20
- package/dist/components/eds-icon-arrow-diagonal.js +1 -1
- package/dist/components/eds-icon-arrow-right.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-chevron-down.js +1 -1
- package/dist/components/eds-icon-chevron-left.js +1 -1
- package/dist/components/eds-icon-chevron-right.js +1 -1
- package/dist/components/eds-icon-chevron-up.js +1 -1
- package/dist/components/eds-icon-close.js +1 -1
- package/dist/components/eds-icon-copy.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-facebook.js +1 -1
- package/dist/components/eds-icon-gitlab.js +1 -1
- package/dist/components/eds-icon-linkedin.js +1 -1
- package/dist/components/eds-icon-loader.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-menu.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/{eds-tabs-content.d.ts → eds-icon-star.d.ts} +4 -4
- package/dist/components/eds-icon-star.js +33 -0
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-thumbs-down.d.ts +11 -0
- package/dist/components/eds-icon-thumbs-down.js +33 -0
- package/dist/components/eds-icon-thumbs-up.d.ts +11 -0
- package/dist/components/eds-icon-thumbs-up.js +33 -0
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-field2.js +2 -2
- package/dist/components/eds-input-footer2.js +1 -1
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +2 -2
- package/dist/components/eds-input-search2.js +24 -9
- package/dist/components/eds-input-select2.js +1 -1
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +1 -1
- package/dist/components/eds-login.js +1 -118
- package/dist/{cjs/keycloak-93fc0315.js → components/eds-login2.js} +128 -7
- package/dist/components/eds-logo-variations.js +1 -1
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-matomo-notice2.js +16 -13
- package/dist/components/eds-modal.js +15 -3
- package/dist/components/eds-pagination2.js +2 -2
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating.js +1 -84
- package/dist/components/eds-rating2.js +91 -0
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner.d.ts +11 -0
- package/dist/components/eds-spinner.js +6 -0
- package/dist/components/eds-spinner2.js +72 -0
- package/dist/components/eds-splash-screen.d.ts +11 -0
- package/dist/components/eds-splash-screen.js +6 -0
- package/dist/components/eds-splash-screen2.js +78 -0
- package/dist/components/eds-steps.js +8 -18
- package/dist/components/eds-svg-repository.js +8 -2
- package/dist/components/eds-switch.js +2 -2
- package/dist/components/eds-table2.js +11 -8
- package/dist/components/eds-tabs.js +12 -31
- package/dist/components/eds-tag2.js +1 -1
- package/dist/components/eds-timeline.js +3 -21
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-tooltip.js +1 -1
- package/dist/components/eds-trl.js +1 -1
- package/dist/components/eds-user.js +23 -105
- package/dist/components/eds-vertical-stepper.js +1 -1
- package/dist/components/formUtils.js +223 -0
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +1 -1
- package/dist/components/logo-variations-horizontal2.js +1 -1
- package/dist/components/logo-variations-vertical2.js +1 -1
- package/dist/components/logo-wrong-usage.js +1 -1
- package/dist/components/p-033480b2.entry.js +1 -0
- package/dist/components/{p-89f600a3.entry.js → p-0443ac40.entry.js} +1 -1
- package/dist/components/{p-a2621d66.entry.js → p-066f6d27.entry.js} +1 -1
- package/dist/components/p-0e0106fc.entry.js +1 -0
- package/dist/components/p-117d180f.entry.js +1 -0
- package/dist/components/p-20e9ae7f.entry.js +1 -0
- package/dist/components/{p-a535838c.entry.js → p-2354daeb.entry.js} +1 -1
- package/dist/components/{p-5097066f.entry.js → p-2b31ca60.entry.js} +1 -1
- package/dist/components/p-3368cfd5.entry.js +1 -0
- package/dist/components/p-33c5b937.entry.js +1 -0
- package/dist/components/p-3af94671.entry.js +1 -0
- package/dist/components/{p-b1af5000.entry.js → p-43350dff.entry.js} +2 -2
- package/dist/components/p-43b3579a.entry.js +1 -0
- package/dist/components/p-467fe746.entry.js +1 -0
- package/dist/components/p-46a6042d.entry.js +1 -0
- package/dist/components/p-4a860d5b.entry.js +1 -0
- package/dist/components/p-4ac27fe7.entry.js +1 -0
- package/dist/components/p-4b2e6f03.entry.js +1 -0
- package/dist/components/{p-b50c8d49.entry.js → p-4cd69983.entry.js} +1 -1
- package/dist/components/p-5520a3b6.entry.js +1 -0
- package/dist/components/p-552b6a50.entry.js +1 -0
- package/dist/components/p-56b4e0fe.entry.js +1 -0
- package/dist/components/{p-f36f2aeb.entry.js → p-56ec190f.entry.js} +1 -1
- package/dist/components/p-5aff1ea0.entry.js +1 -0
- package/dist/components/p-5c12a0df.entry.js +1 -0
- package/dist/components/{p-5ff31f14.entry.js → p-5e2216ae.entry.js} +1 -1
- package/dist/components/p-5e63e8a5.entry.js +1 -0
- package/dist/components/p-60e7e745.entry.js +1 -0
- package/dist/components/p-62f2f274.entry.js +1 -0
- package/dist/components/p-6404e157.entry.js +1 -0
- package/dist/components/p-69c5074b.js +1 -0
- package/dist/components/p-6fd0c3b3.entry.js +1 -0
- package/dist/components/p-77cc7c02.entry.js +1 -0
- package/dist/components/p-79c14cf1.entry.js +1 -0
- package/dist/components/{p-c034c395.entry.js → p-7dd81017.entry.js} +1 -1
- package/dist/components/p-7e0dd5d8.entry.js +1 -0
- package/dist/components/p-80dba155.js +1 -0
- package/dist/components/{p-b860b4aa.entry.js → p-8154d013.entry.js} +1 -1
- package/dist/components/p-86eed1b7.entry.js +1 -0
- package/dist/components/{p-d56d9dda.entry.js → p-8b70a350.entry.js} +1 -1
- package/dist/components/p-8e548691.entry.js +1 -0
- package/dist/components/p-90503a64.entry.js +1 -0
- package/dist/components/p-90f85604.entry.js +1 -0
- package/dist/components/p-94698510.entry.js +1 -0
- package/dist/components/p-950ecb1c.entry.js +1 -0
- package/dist/components/p-9b9fba38.entry.js +1 -0
- package/dist/components/p-9dc879c9.entry.js +1 -0
- package/dist/components/{p-b1de9a6c.entry.js → p-9eb2e870.entry.js} +1 -1
- package/dist/components/p-9ebc84d6.entry.js +1 -0
- package/dist/components/p-a56f0579.entry.js +1 -0
- package/dist/components/{p-88751c8b.entry.js → p-a5c61d1c.entry.js} +1 -1
- package/dist/components/p-a6cd418e.entry.js +1 -0
- package/dist/components/p-a8dd1953.entry.js +1 -0
- package/dist/components/{p-045681d7.entry.js → p-a91ab66e.entry.js} +1 -1
- package/dist/components/p-ab292dd5.entry.js +1 -0
- package/dist/components/p-ad746789.entry.js +1 -0
- package/dist/components/p-b80a9020.entry.js +1 -0
- package/dist/components/p-b8ba7e5c.entry.js +1 -0
- package/dist/components/p-ba720bf3.js +1 -0
- package/dist/components/p-c06d4f14.entry.js +1 -0
- package/dist/components/p-c12d9350.entry.js +1 -0
- package/dist/components/p-c3dda942.entry.js +1 -0
- package/dist/components/p-c6b32753.entry.js +1 -0
- package/dist/components/p-c776b6f8.js +1 -0
- package/dist/components/p-c935aa46.entry.js +1 -0
- package/dist/components/{p-7a8b9de5.js → p-cccacbd3.js} +2 -2
- package/dist/components/p-dbcf1f0e.entry.js +1 -0
- package/dist/components/p-dcc08064.entry.js +1 -0
- package/dist/components/p-dcd4de1f.entry.js +1 -0
- package/dist/components/p-e2d5a487.js +1 -0
- package/dist/components/p-e64cd6f7.entry.js +1 -0
- package/dist/components/p-e9a533e0.entry.js +1 -0
- package/dist/components/p-eac63c82.entry.js +1 -0
- package/dist/components/p-f5959676.entry.js +1 -0
- package/dist/components/{p-fad10768.entry.js → p-f905ac92.entry.js} +1 -1
- package/dist/components/p-fba4080d.entry.js +1 -0
- package/dist/components/p-fc619588.entry.js +1 -0
- package/dist/components/p-fcc32210.entry.js +1 -0
- package/dist/components/{p-81942665.entry.js → p-ff7acb55.entry.js} +1 -1
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/sharedUtils.js +19 -0
- package/dist/components/star.js +5 -0
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/thumbs-down.js +5 -0
- package/dist/components/thumbs-up.js +6 -0
- package/dist/components/token-list2.js +1 -1
- package/dist/components/token-radii2.js +1 -1
- package/dist/components/token-ratios.js +1 -1
- package/dist/components/token-shadows2.js +1 -1
- package/dist/components/token-spacing.js +1 -1
- package/dist/components/token-typography.js +1 -1
- package/dist/esm/color-primary-palette_6.entry.js +15 -15
- package/dist/esm/components.js +3 -3
- package/dist/esm/correct-use-of-colors.entry.js +2 -2
- package/dist/esm/eds-accordion_22.entry.js +1934 -0
- package/dist/esm/eds-alert.entry.js +1 -1
- package/dist/esm/eds-app-root.entry.js +33 -0
- package/dist/esm/eds-avatar_4.entry.js +173 -0
- package/dist/esm/eds-breadcrumb.entry.js +4 -18
- package/dist/esm/eds-card-generic.entry.js +88 -0
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-section.entry.js +35 -0
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +1 -1
- package/dist/esm/eds-components-section.entry.js +2 -2
- package/dist/esm/eds-cookies-preference.entry.js +2 -2
- package/dist/esm/eds-docs-palettes.entry.js +2 -2
- package/dist/esm/eds-docs-tokens.entry.js +2 -2
- package/dist/esm/{eds-dropdown_2.entry.js → eds-dropdown.entry.js} +9 -41
- package/dist/esm/eds-feedback.entry.js +62 -0
- package/dist/esm/eds-form.entry.js +237 -254
- package/dist/esm/eds-frame.entry.js +32 -32
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-right.entry.js +2 -2
- package/dist/esm/eds-icon-bluesky.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-down.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-left.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-right.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-up.entry.js +2 -2
- package/dist/esm/eds-icon-close.entry.js +2 -2
- package/dist/esm/eds-icon-copy.entry.js +2 -2
- package/dist/esm/eds-icon-eu.entry.js +2 -2
- package/dist/esm/eds-icon-facebook.entry.js +2 -2
- package/dist/esm/eds-icon-gitlab.entry.js +2 -2
- package/dist/esm/eds-icon-linkedin.entry.js +2 -2
- package/dist/esm/eds-icon-loader.entry.js +2 -2
- package/dist/esm/eds-icon-mastodon.entry.js +2 -2
- package/dist/esm/eds-icon-menu.entry.js +2 -2
- package/dist/esm/eds-icon-more.entry.js +2 -2
- package/dist/esm/eds-icon-search.entry.js +2 -2
- package/dist/esm/eds-icon-star.entry.js +14 -0
- package/dist/esm/eds-icon-success.entry.js +2 -2
- package/dist/esm/eds-icon-thumbs-down.entry.js +14 -0
- package/dist/esm/eds-icon-thumbs-up.entry.js +14 -0
- package/dist/esm/eds-icon-twitter.entry.js +2 -2
- package/dist/esm/eds-icon-user.entry.js +2 -2
- package/dist/esm/eds-icon-youtube.entry.js +2 -2
- package/dist/esm/{keycloak-d502ec16.js → eds-login_2.entry.js} +139 -1
- package/dist/esm/eds-logo-variations.entry.js +2 -2
- package/dist/esm/eds-modal.entry.js +15 -3
- package/dist/esm/eds-progress-bar.entry.js +2 -2
- package/dist/esm/eds-rating.entry.js +31 -25
- package/dist/esm/eds-section-core_2.entry.js +4 -4
- package/dist/esm/eds-spinner.entry.js +50 -0
- package/dist/esm/eds-steps.entry.js +9 -19
- package/dist/esm/eds-svg-repository.entry.js +9 -3
- package/dist/esm/eds-switch.entry.js +3 -3
- package/dist/esm/eds-tabs.entry.js +10 -24
- package/dist/esm/eds-timeline.entry.js +4 -22
- package/dist/esm/eds-toast-manager.entry.js +42 -0
- package/dist/esm/eds-toast.entry.js +72 -0
- package/dist/esm/eds-tooltip.entry.js +2 -2
- package/dist/esm/eds-trl.entry.js +2 -2
- package/dist/esm/eds-user.entry.js +9 -79
- package/dist/esm/eds-vertical-stepper.entry.js +2 -2
- package/dist/esm/formUtils-ac68474d.js +223 -0
- package/dist/esm/incorrect-use-of-colors.entry.js +2 -2
- package/dist/esm/{index-e96badea.js → index-8a71b9a7.js} +51 -55
- package/dist/esm/loader.js +3 -3
- package/dist/esm/logo-space.entry.js +2 -2
- package/dist/esm/logo-variations-horizontal_2.entry.js +3 -3
- package/dist/esm/logo-wrong-usage.entry.js +2 -2
- package/dist/esm/sharedUtils-a550989c.js +19 -0
- package/dist/esm/star-0da9b5e9.js +5 -0
- package/dist/esm/thumbs-down-a18fd049.js +5 -0
- package/dist/esm/thumbs-up-c19a71bc.js +6 -0
- package/dist/esm/token-list_3.entry.js +4 -4
- package/dist/esm/token-ratios.entry.js +2 -2
- package/dist/esm/token-spacing.entry.js +2 -2
- package/dist/esm/token-typography.entry.js +2 -2
- package/dist/hydrate/index.js +1353 -1001
- package/dist/hydrate/index.mjs +1353 -1001
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/svgs/src/lib/svgs.d.ts +4 -1
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +3 -3
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +5 -0
- package/dist/types/components/eds-form/eds-form.d.ts +52 -20
- package/dist/types/components/eds-form-v2/eds-form-v2.d.ts +99 -0
- package/dist/types/components/eds-form-v2/eds-form-v2.stories.d.ts +27 -0
- package/dist/types/components/eds-icons/eds-icon-star/eds-icon-star.d.ts +10 -0
- package/dist/types/components/eds-icons/eds-icon-thumbs-down/eds-icon-thumbs-down.d.ts +10 -0
- package/dist/types/components/eds-icons/eds-icon-thumbs-up/eds-icon-thumbs-up.d.ts +10 -0
- package/dist/types/components/eds-input-elements/eds-input-search/eds-input-search.d.ts +6 -1
- package/dist/types/components/eds-modal/eds-modal.d.ts +8 -0
- package/dist/types/components/eds-pagination/eds-pagination.d.ts +1 -1
- package/dist/types/components/eds-rating/eds-rating.d.ts +19 -11
- package/dist/types/components/eds-rating/eds-rating.stories.d.ts +13 -27
- package/dist/types/components/eds-spinner/eds-spinner.d.ts +27 -0
- package/dist/types/components/eds-spinner/eds-spinner.stories.d.ts +42 -0
- package/dist/types/components/eds-steps/eds-steps.d.ts +1 -1
- package/dist/types/components/eds-table/eds-table.stories.d.ts +6 -0
- package/dist/types/components.d.ts +610 -321
- package/dist/types/{components → eds-docs-ui}/eds-frame/eds-frame.d.ts +26 -6
- package/dist/types/{components → eds-docs-ui}/eds-frame/eds-frame.stories.d.ts +8 -13
- package/dist/types/shared-ui/eds-feedback/eds-feedback.d.ts +56 -0
- package/dist/types/shared-ui/eds-feedback/eds-feedback.stories.d.ts +77 -0
- package/dist/types/shared-ui/eds-header/eds-header.stories.d.ts +0 -28
- package/dist/types/shared-ui/eds-login/eds-login.d.ts +12 -1
- package/dist/types/{components → shared-ui}/eds-matomo-notice/eds-matomo-notice.d.ts +5 -12
- package/dist/types/{components → shared-ui}/eds-matomo-notice/eds-matomo-notice.stories.d.ts +2 -1
- package/dist/types/shared-ui/eds-splash-screen/eds-splash-screen.d.ts +31 -0
- package/dist/types/shared-ui/eds-splash-screen/eds-splash-screen.stories.d.ts +22 -0
- package/dist/types/shared-ui/eds-tabs/eds-tabs.d.ts +3 -3
- package/dist/types/shared-ui/eds-tabs/eds-tabs.stories.d.ts +5 -2
- package/dist/types/shared-ui/eds-toast-manager/eds-toast-manager.d.ts +3 -0
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +12 -66
- package/dist/types/shared-ui/eds-user/eds-user.stories.d.ts +32 -0
- package/dist/types/shared-ui/examples/eds-app-root/eds-app-root.d.ts +9 -0
- package/dist/types/utils/api.d.ts +5 -0
- package/dist/types/utils/eds-form/formUtils.d.ts +38 -0
- package/dist/types/utils/eds-form/formValidators.d.ts +17 -0
- package/dist/types/utils/eds-form/individualValidator.d.ts +3 -0
- package/dist/types/utils/eds-form/validateInput.d.ts +10 -0
- package/dist/types/utils/sharedUtils.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/eds-accordion_13.cjs.entry.js +0 -911
- package/dist/cjs/eds-block-break.cjs.entry.js +0 -21
- package/dist/cjs/eds-footer.cjs.entry.js +0 -41
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +0 -100
- package/dist/cjs/eds-header.cjs.entry.js +0 -97
- package/dist/cjs/eds-input_7.cjs.entry.js +0 -324
- package/dist/cjs/eds-link.cjs.entry.js +0 -214
- package/dist/cjs/eds-login.cjs.entry.js +0 -91
- package/dist/cjs/eds-logo.cjs.entry.js +0 -78
- package/dist/cjs/eds-navigator.cjs.entry.js +0 -43
- package/dist/cjs/eds-pagination_2.cjs.entry.js +0 -386
- package/dist/cjs/eds-social-networks.cjs.entry.js +0 -66
- package/dist/cjs/eds-tab.cjs.entry.js +0 -40
- package/dist/cjs/eds-tabs-content.cjs.entry.js +0 -133
- package/dist/collection/components/eds-frame/eds-frame.stories.js +0 -68
- package/dist/collection/components/eds-navigator/eds-navigator.js +0 -147
- package/dist/collection/components/eds-navigator/eds-navigator.stories.js +0 -101
- package/dist/collection/components/eds-tab/eds-tab.js +0 -109
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +0 -194
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.stories.js +0 -112
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +0 -109
- package/dist/components/eds-navigator.js +0 -75
- package/dist/components/eds-tab.js +0 -6
- package/dist/components/eds-tab2.js +0 -55
- package/dist/components/eds-tabs-content.js +0 -159
- package/dist/components/eds-user-modal.js +0 -6
- package/dist/components/eds-user-modal2.js +0 -87
- package/dist/components/p-06299762.entry.js +0 -1
- package/dist/components/p-0a3b2576.entry.js +0 -1
- package/dist/components/p-0ab85eee.entry.js +0 -1
- package/dist/components/p-0e7bdd2c.entry.js +0 -1
- package/dist/components/p-10b81c47.entry.js +0 -1
- package/dist/components/p-1ae529f3.entry.js +0 -1
- package/dist/components/p-1ed3fdb7.entry.js +0 -1
- package/dist/components/p-21d42cf3.entry.js +0 -1
- package/dist/components/p-2831a9d5.entry.js +0 -1
- package/dist/components/p-2c00bd76.entry.js +0 -1
- package/dist/components/p-34a65e58.entry.js +0 -1
- package/dist/components/p-38d70586.entry.js +0 -1
- package/dist/components/p-3a7aa1eb.entry.js +0 -1
- package/dist/components/p-42d3c324.entry.js +0 -1
- package/dist/components/p-4a12a131.entry.js +0 -1
- package/dist/components/p-4b3fbd6d.entry.js +0 -1
- package/dist/components/p-4ea027ac.entry.js +0 -1
- package/dist/components/p-5980a142.entry.js +0 -1
- package/dist/components/p-599c7b97.entry.js +0 -1
- package/dist/components/p-5a2b8b6c.entry.js +0 -1
- package/dist/components/p-65703520.entry.js +0 -1
- package/dist/components/p-659ed449.entry.js +0 -1
- package/dist/components/p-6af40c33.entry.js +0 -1
- package/dist/components/p-6df9db15.entry.js +0 -1
- package/dist/components/p-759b2640.entry.js +0 -1
- package/dist/components/p-7b3b26b0.entry.js +0 -1
- package/dist/components/p-80a185ba.entry.js +0 -1
- package/dist/components/p-86fbc239.entry.js +0 -1
- package/dist/components/p-8c4a0fc9.entry.js +0 -1
- package/dist/components/p-8eab748d.js +0 -1
- package/dist/components/p-911d9b37.entry.js +0 -1
- package/dist/components/p-9579f9c2.entry.js +0 -1
- package/dist/components/p-96fe2267.entry.js +0 -1
- package/dist/components/p-9739def5.entry.js +0 -1
- package/dist/components/p-9b441a1f.entry.js +0 -1
- package/dist/components/p-a5b7d72d.entry.js +0 -1
- package/dist/components/p-a5d00633.entry.js +0 -1
- package/dist/components/p-a63bd0c9.entry.js +0 -1
- package/dist/components/p-a846dbca.entry.js +0 -1
- package/dist/components/p-a927a455.entry.js +0 -1
- package/dist/components/p-aec9b8e1.entry.js +0 -1
- package/dist/components/p-b3c1aef5.entry.js +0 -1
- package/dist/components/p-b60ed774.entry.js +0 -1
- package/dist/components/p-b67aafe7.entry.js +0 -1
- package/dist/components/p-b79999d5.entry.js +0 -1
- package/dist/components/p-b80457ed.entry.js +0 -1
- package/dist/components/p-bd43d83c.entry.js +0 -1
- package/dist/components/p-c5fa170d.entry.js +0 -1
- package/dist/components/p-c683be2c.entry.js +0 -1
- package/dist/components/p-d2a0b896.entry.js +0 -1
- package/dist/components/p-d5850ab3.entry.js +0 -1
- package/dist/components/p-de12396f.entry.js +0 -1
- package/dist/components/p-de2fbcfc.entry.js +0 -1
- package/dist/components/p-e2c250c5.entry.js +0 -1
- package/dist/components/p-e334f5bc.entry.js +0 -1
- package/dist/components/p-f1cd83da.entry.js +0 -1
- package/dist/components/p-f5dafbc8.entry.js +0 -1
- package/dist/components/p-f7493f41.entry.js +0 -1
- package/dist/components/p-fce25541.entry.js +0 -1
- package/dist/esm/eds-block-break.entry.js +0 -17
- package/dist/esm/eds-footer.entry.js +0 -37
- package/dist/esm/eds-fullscreen-menu.entry.js +0 -96
- package/dist/esm/eds-header.entry.js +0 -93
- package/dist/esm/eds-input_7.entry.js +0 -314
- package/dist/esm/eds-link.entry.js +0 -210
- package/dist/esm/eds-login.entry.js +0 -87
- package/dist/esm/eds-logo.entry.js +0 -74
- package/dist/esm/eds-navigator.entry.js +0 -39
- package/dist/esm/eds-pagination_2.entry.js +0 -381
- package/dist/esm/eds-social-networks.entry.js +0 -62
- package/dist/esm/eds-tab.entry.js +0 -36
- package/dist/esm/eds-tabs-content.entry.js +0 -129
- package/dist/types/components/eds-navigator/eds-navigator.d.ts +0 -42
- package/dist/types/components/eds-navigator/eds-navigator.stories.d.ts +0 -46
- package/dist/types/components/eds-tab/eds-tab.d.ts +0 -15
- package/dist/types/shared-ui/eds-tabs-content/eds-tabs-content.d.ts +0 -36
- package/dist/types/shared-ui/eds-tabs-content/eds-tabs-content.stories.d.ts +0 -16
- package/dist/types/shared-ui/eds-user-modal/eds-user-modal.d.ts +0 -47
- /package/dist/collection/{components → shared-ui}/eds-matomo-notice/eds-matomo-notice.css +0 -0
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-e96badea.js';
|
|
2
|
-
import { l as login, a as logout, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak-d502ec16.js';
|
|
3
|
-
import { t as toast } from './toastManager-d9eee791.js';
|
|
4
|
-
|
|
5
|
-
const EdsLogin = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
|
|
9
|
-
/**
|
|
10
|
-
* Handles user login by invoking the Keycloak `login` function.
|
|
11
|
-
* Only triggers login if the user is not already authenticated.
|
|
12
|
-
*/
|
|
13
|
-
this.handleLogin = async () => {
|
|
14
|
-
if (!this.authenticated) {
|
|
15
|
-
try {
|
|
16
|
-
await login();
|
|
17
|
-
toast.show('You are authenticated', 'success');
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
toast.show(error.message, 'error');
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Handles user logout by invoking the Keycloak `logout` function.
|
|
26
|
-
* Resets the `authenticated` state to `false` after logout.
|
|
27
|
-
*/
|
|
28
|
-
this.handleLogout = async () => {
|
|
29
|
-
try {
|
|
30
|
-
await logout();
|
|
31
|
-
}
|
|
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.authenticated = false;
|
|
42
|
-
this.user = null;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Lifecycle method that runs when the component is about to load.
|
|
46
|
-
* It initializes authentication by calling the `initAuth` method.
|
|
47
|
-
*/
|
|
48
|
-
async componentWillLoad() {
|
|
49
|
-
// Check if required props are provided (optional check)
|
|
50
|
-
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
51
|
-
// eslint-disable-next-line
|
|
52
|
-
console.error('Keycloak configuration props are missing.');
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
await this.initAuth();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
59
|
-
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
60
|
-
* Emits `authStatusChanged` event with the authentication status.
|
|
61
|
-
*/
|
|
62
|
-
async initAuth() {
|
|
63
|
-
try {
|
|
64
|
-
await initKeycloak({
|
|
65
|
-
url: this.keycloakUrl,
|
|
66
|
-
realm: this.keycloakRealm,
|
|
67
|
-
clientId: this.keycloakClientId
|
|
68
|
-
}, true);
|
|
69
|
-
if (isAuthenticated()) {
|
|
70
|
-
this.user = getUser();
|
|
71
|
-
this.authenticated = true;
|
|
72
|
-
this.authStatusChanged.emit({
|
|
73
|
-
authenticated: this.authenticated,
|
|
74
|
-
user: this.user
|
|
75
|
-
}); // Emit auth status change
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
toast.show(error.message, 'error');
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
return (h("div", { key: '62768f8a6cc8ac16b13f9b2bb9cf5835f7f63844', class: "block" }, !this.authenticated && (h("eds-button", { key: '31e341d628242fed472f673c0fe8346c7871515d', label: "Login", intent: "primary", "extra-class": "text-default", "aria-label": "Login", triggerClick: this.handleLogin.bind(this) }))));
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export { EdsLogin as eds_login };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-e96badea.js';
|
|
2
|
-
import { h as hLogoColor } from './logo-color-7f1fd803.js';
|
|
3
|
-
import { h as hLogoBlack, a as hLogoColorWhite, b as hLogoWhite, c as hLogoWhiteNoBg, v as vLogoColor, d as vLogoBlack, e as vLogoColorWhite, f as vLogoWhite, g as vLogoWhiteNoBg } from './logo-white-no-bg-f382f86f.js';
|
|
4
|
-
import { s as sendAnalytics } from './analytics-44b1416b.js';
|
|
5
|
-
|
|
6
|
-
const edsLogoCss = ".w-\\[130px\\]{width:130px}.mr-auto{margin-right:auto}.text-current{color:currentColor}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.h-full{height:100%}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}@media (min-width: 900px){.lg\\:w-\\[150px\\]{width:150px}}";
|
|
7
|
-
const EdsLogoStyle0 = edsLogoCss;
|
|
8
|
-
|
|
9
|
-
const EdsLogo = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.href = '/';
|
|
13
|
-
this.orientation = 'horizontal';
|
|
14
|
-
this.type = undefined;
|
|
15
|
-
this.label = 'Home';
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Handles the click event on the logo link.
|
|
19
|
-
* Emits a `matomoEvent` for analytics tracking with details about the interaction.
|
|
20
|
-
* - `category`: Component type (e.g., "ui-component").
|
|
21
|
-
* - `tag`: The HTML tag name of the component.
|
|
22
|
-
* - `name`: Event name, set as "logo".
|
|
23
|
-
* - `action`: The action, set as "click".
|
|
24
|
-
*/
|
|
25
|
-
handleClick() {
|
|
26
|
-
sendAnalytics({
|
|
27
|
-
category: 'ui-component',
|
|
28
|
-
tag: this.el.tagName.toLowerCase(),
|
|
29
|
-
name: 'logo',
|
|
30
|
-
action: 'click'
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Determines the appropriate SVG content based on the `orientation` and `type` props.
|
|
35
|
-
*/
|
|
36
|
-
getLogo() {
|
|
37
|
-
const logos = {
|
|
38
|
-
horizontal: {
|
|
39
|
-
color: hLogoColor,
|
|
40
|
-
black: hLogoBlack,
|
|
41
|
-
'color-white': hLogoColorWhite,
|
|
42
|
-
white: hLogoWhite,
|
|
43
|
-
'no-bg': hLogoWhiteNoBg
|
|
44
|
-
},
|
|
45
|
-
vertical: {
|
|
46
|
-
color: vLogoColor,
|
|
47
|
-
black: vLogoBlack,
|
|
48
|
-
'color-white': vLogoColorWhite,
|
|
49
|
-
white: vLogoWhite,
|
|
50
|
-
'no-bg': vLogoWhiteNoBg
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
// Validate the orientation and type
|
|
54
|
-
const validOrientation = logos[this.orientation];
|
|
55
|
-
if (!validOrientation) {
|
|
56
|
-
//console.error(`Invalid orientation "${this.orientation}". Falling back to "horizontal".`);
|
|
57
|
-
return hLogoColor; // Default fallback logo
|
|
58
|
-
}
|
|
59
|
-
const validLogo = validOrientation[this.type];
|
|
60
|
-
if (!validLogo) {
|
|
61
|
-
//console.error(`Invalid type "${this.type}" for orientation "${this.orientation}". Falling back to "color".`);
|
|
62
|
-
return validOrientation['color']; // Fallback to color logo
|
|
63
|
-
}
|
|
64
|
-
return validLogo;
|
|
65
|
-
}
|
|
66
|
-
render() {
|
|
67
|
-
const logoContent = this.getLogo();
|
|
68
|
-
return (h("a", { key: 'ee8de4071b0137020341982b4c5cb2c938f1c4df', href: this.href, onClick: () => this.handleClick(), class: "eds-logo-wrapper", "aria-label": this.label }, h("div", { key: '1eb620afbcc5a2a5c6914cc1c91a45ca62d0068c', innerHTML: logoContent })));
|
|
69
|
-
}
|
|
70
|
-
get el() { return getElement(this); }
|
|
71
|
-
};
|
|
72
|
-
EdsLogo.style = EdsLogoStyle0;
|
|
73
|
-
|
|
74
|
-
export { EdsLogo as eds_logo };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-e96badea.js';
|
|
2
|
-
|
|
3
|
-
const EdsNavigator = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.prevLabel = undefined;
|
|
7
|
-
this.nextLabel = undefined;
|
|
8
|
-
this.prevUrl = undefined;
|
|
9
|
-
this.nextUrl = undefined;
|
|
10
|
-
this.linkSize = 'small';
|
|
11
|
-
this.linkIntent = 'tertiary';
|
|
12
|
-
}
|
|
13
|
-
componentDidLoad() {
|
|
14
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
15
|
-
const links = this.el.querySelectorAll('eds-link');
|
|
16
|
-
links.forEach((link) => {
|
|
17
|
-
this.emitContext(link);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Emits a custom event 'parentContext' for a given link element with the component's context.
|
|
22
|
-
* @param linkElement - The eds-link element to emit the event for.
|
|
23
|
-
*/
|
|
24
|
-
emitContext(linkElement) {
|
|
25
|
-
const event = new CustomEvent('parentContext', {
|
|
26
|
-
detail: {
|
|
27
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
28
|
-
identifier: null
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
linkElement.dispatchEvent(event);
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
return (h("ul", { key: '712287e683436cc98c2d6ef195501add1929522e', class: "flex lg:flex grow items-center justify-center gap-x-8" }, this.prevLabel && (h("eds-link", { key: '4fda36ce37897284d7062f88133f147831d96a6f', label: this.prevLabel, url: this.prevUrl || undefined, disabled: !this.prevUrl, "aria-label": this.prevLabel, size: this.linkSize, intent: this.linkIntent, class: "mr-auto !p-8 lg:!pr-12" }, h("eds-icon-wrapper", { key: '9bfa6bbbdc68641f65bec49f207d96f075b9a5b0', icon: "chevron-left" }), this.prevLabel)), this.nextLabel && (h("eds-link", { key: '6ee8ebee011a2c30a74645b072c7c37929d0a55f', label: this.nextLabel, url: this.nextUrl || undefined, disabled: !this.nextUrl, "aria-label": this.nextLabel, size: this.linkSize, intent: this.linkIntent, class: "ml-auto !p-8 lg:!pl-12" }, this.nextLabel, h("eds-icon-wrapper", { key: '44ebd4dcce0e367df7d9035bb445e49fde35e913', icon: "chevron-right", class: "w-20 h-20" })))));
|
|
35
|
-
}
|
|
36
|
-
get el() { return getElement(this); }
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export { EdsNavigator as eds_navigator };
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-e96badea.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-44b1416b.js';
|
|
3
|
-
|
|
4
|
-
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}}";
|
|
5
|
-
const EdsPaginationStyle0 = edsPaginationCss;
|
|
6
|
-
|
|
7
|
-
const EdsPagination = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.currentPage = undefined;
|
|
11
|
-
this.lastPage = undefined;
|
|
12
|
-
this.perPage = 10;
|
|
13
|
-
this.total = 0;
|
|
14
|
-
this.url = '';
|
|
15
|
-
this.mode = 'default';
|
|
16
|
-
this.prevLabel = 'Prev';
|
|
17
|
-
this.nextLabel = 'Next';
|
|
18
|
-
this.prevUrl = '';
|
|
19
|
-
this.nextUrl = '';
|
|
20
|
-
this.links = [];
|
|
21
|
-
}
|
|
22
|
-
/** Lifecycle hook to generate pagination links on component load */
|
|
23
|
-
componentWillLoad() {
|
|
24
|
-
if (this.mode === 'default') {
|
|
25
|
-
this.generateLinks();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
componentDidLoad() {
|
|
29
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
30
|
-
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
31
|
-
links.forEach((lnk) => {
|
|
32
|
-
this.emitContext(lnk);
|
|
33
|
-
});
|
|
34
|
-
/*if (links.length > 0) {
|
|
35
|
-
// Emit context for the first link
|
|
36
|
-
this.emitContext(links[0]);
|
|
37
|
-
|
|
38
|
-
// Emit context for the last link, if it's different from the first
|
|
39
|
-
if (links.length > 1) {
|
|
40
|
-
this.emitContext(links[links.length - 1]);
|
|
41
|
-
}
|
|
42
|
-
}*/
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
46
|
-
* This event provides context information about the breadcrumb component.
|
|
47
|
-
*
|
|
48
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
49
|
-
*/
|
|
50
|
-
emitContext(linkElement) {
|
|
51
|
-
const event = new CustomEvent('parentContext', {
|
|
52
|
-
detail: {
|
|
53
|
-
componentName: this.hostEl.tagName.toLowerCase(),
|
|
54
|
-
identifier: null
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
linkElement.dispatchEvent(event);
|
|
58
|
-
}
|
|
59
|
-
onPageOrLastPageChange() {
|
|
60
|
-
if (this.mode === 'default') {
|
|
61
|
-
this.generateLinks();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Checks if the current page is the first page
|
|
66
|
-
* @returns {boolean} - true if current page is the first page
|
|
67
|
-
*/
|
|
68
|
-
isFirstPage() {
|
|
69
|
-
return this.currentPage === 1;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Checks if the current page is the last page
|
|
73
|
-
* @returns {boolean} - true if current page is the last page
|
|
74
|
-
*/
|
|
75
|
-
isLastPage() {
|
|
76
|
-
return this.currentPage === this.lastPage;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Generates a pagination link object
|
|
80
|
-
* @param {number} page - Page number for the link
|
|
81
|
-
* @returns {Link} - Link object with page details
|
|
82
|
-
*/
|
|
83
|
-
generateLink(page) {
|
|
84
|
-
const urlHasQuery = this.url.includes('?');
|
|
85
|
-
return {
|
|
86
|
-
ariaLabel: `Page ${page}`,
|
|
87
|
-
url: `${this.url}${urlHasQuery ? '&' : '?'}page=${page}`,
|
|
88
|
-
label: page.toString(),
|
|
89
|
-
current: this.currentPage === page,
|
|
90
|
-
disabled: false
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
/** Generates pagination links based on the last page and current page */
|
|
94
|
-
generateLinks() {
|
|
95
|
-
if (this.lastPage && this.lastPage > 5) {
|
|
96
|
-
this.links = this.getPaginationGenerator(this.currentPage || 1, this.lastPage).map((page) => typeof page === 'number' ? this.generateLink(page) : page);
|
|
97
|
-
}
|
|
98
|
-
else if (this.lastPage) {
|
|
99
|
-
this.links = Array.from({ length: this.lastPage }).map((_, i) => this.generateLink(i + 1));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Creates a pagination range based on delta, current, and total pages
|
|
104
|
-
* @param {number} current - Current page number
|
|
105
|
-
* @param {number} total - Total number of pages
|
|
106
|
-
* @param {number} delta - Range of pages to display around the current page
|
|
107
|
-
* @returns {(number | string)[]} - Range of page numbers or ellipses
|
|
108
|
-
*/
|
|
109
|
-
getPaginationGenerator(current, total) {
|
|
110
|
-
const delta = 1; // Show one page before and one after the current page
|
|
111
|
-
const range = [];
|
|
112
|
-
if (total <= 5) {
|
|
113
|
-
// If total pages are 5 or less, show all pages
|
|
114
|
-
for (let i = 1; i <= total; i++) {
|
|
115
|
-
range.push(i);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
// Always show the first page
|
|
120
|
-
range.push(1);
|
|
121
|
-
// Add ellipsis if there’s a gap between the first page and the current range start
|
|
122
|
-
if (current - delta > 2) {
|
|
123
|
-
range.push('...');
|
|
124
|
-
}
|
|
125
|
-
// Determine range for pages around the current page
|
|
126
|
-
for (let i = Math.max(2, current - delta); i <= Math.min(total - 1, current + delta); i++) {
|
|
127
|
-
range.push(i);
|
|
128
|
-
}
|
|
129
|
-
// Add ellipsis if there’s a gap between the current range end and the last page
|
|
130
|
-
if (current + delta < total - 1) {
|
|
131
|
-
range.push('...');
|
|
132
|
-
}
|
|
133
|
-
// Always show the last page
|
|
134
|
-
range.push(total);
|
|
135
|
-
}
|
|
136
|
-
return range;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Formats the current page results information for display
|
|
140
|
-
* @returns {string} - Formatted page result information
|
|
141
|
-
*/
|
|
142
|
-
pageResults() {
|
|
143
|
-
if (this.total > 0) {
|
|
144
|
-
return this.total > this.perPage
|
|
145
|
-
? `${this.perPage * ((this.currentPage || 1) - 1) + 1} - ${this.perPage * (this.currentPage || 1) >= this.total ? this.total : this.perPage * (this.currentPage || 1)} of ${this.total}`
|
|
146
|
-
: `${this.total}`;
|
|
147
|
-
}
|
|
148
|
-
return '';
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Handles a page click event, updating the current page and dispatching an event
|
|
152
|
-
* @param {MouseEvent} event - Click event
|
|
153
|
-
* @param {number} newPage - New page number
|
|
154
|
-
*/
|
|
155
|
-
handlePageClick(event, newPage) {
|
|
156
|
-
if (this.mode === 'navigator') {
|
|
157
|
-
return; // No page clicking logic for navigator mode
|
|
158
|
-
}
|
|
159
|
-
event.preventDefault(); // Prevent default link navigation
|
|
160
|
-
if (newPage !== this.currentPage) {
|
|
161
|
-
this.links = this.links.map((link) => typeof link === 'object' ? Object.assign(Object.assign({}, link), { current: parseInt(link.label) === newPage }) : link);
|
|
162
|
-
const pageChangeEvent = new CustomEvent('pageChange', {
|
|
163
|
-
detail: newPage,
|
|
164
|
-
bubbles: true,
|
|
165
|
-
composed: true
|
|
166
|
-
});
|
|
167
|
-
this.hostEl.dispatchEvent(pageChangeEvent);
|
|
168
|
-
this.currentPage = newPage;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
render() {
|
|
172
|
-
return (h("div", { key: '8c8418eec263acc153a928b752775458f897504f' }, this.total > 0 && this.mode === 'default' && (h("p", { key: '02a5a69772a4812f10b29e8df117b72df210614d', class: "f-ui-03 text-lightest mb-28 w-full text-center" }, h("span", { key: 'ef9804843100c722643c24e31a05f86f2d55efa0', class: "sr-only" }, "Results:"), this.pageResults())), this.mode === 'navigator' || (this.lastPage && this.lastPage > 1) ? (h("nav", { "aria-label": "Pagination" }, h("ul", { class: "flex items-center justify-center gap-x-8" }, h("li", { class: "mr-auto" }, h("eds-link", { label: this.prevLabel, url: this.mode === 'navigator'
|
|
173
|
-
? this.prevUrl || '#' // Use prevUrl if provided, otherwise disable with '#'
|
|
174
|
-
: this.isFirstPage()
|
|
175
|
-
? '#'
|
|
176
|
-
: this.generateLink(this.currentPage - 1).url, disabled: this.mode === 'navigator'
|
|
177
|
-
? !this.prevUrl // Disable if prevUrl is not provided
|
|
178
|
-
: this.isFirstPage(), "aria-label": "Previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "strong", "hide-label-on-small-screen": true, class: "!p-8 lg:!pr-12", onClick: (event) => {
|
|
179
|
-
if (this.mode === 'default') {
|
|
180
|
-
if (this.isFirstPage()) {
|
|
181
|
-
event.preventDefault(); // Prevent click if disabled
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
this.handlePageClick(event, (this.currentPage || 1) - 1);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
} })), this.mode === 'default' &&
|
|
188
|
-
this.links.map((link, index) => (h("li", { key: index, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof link === 'string' ? (h("span", { class: "flex items-center justify-center" }, link)) : (h("eds-link", { url: link.url, "aria-label": link.ariaLabel, label: link.label, current: link.current, size: "small", class: "!p-8", intent: link.current ? 'secondary' : 'ghost', onClick: (event) => this.handlePageClick(event, parseInt(link.label)) }))))), h("li", { class: "ml-auto" }, h("eds-link", { label: this.nextLabel, url: this.mode === 'navigator'
|
|
189
|
-
? this.nextUrl || '#' // Use nextUrl if provided, otherwise disable with '#'
|
|
190
|
-
: this.isLastPage()
|
|
191
|
-
? '#'
|
|
192
|
-
: this.generateLink(this.currentPage + 1).url, disabled: this.mode === 'navigator'
|
|
193
|
-
? !this.nextUrl // Disable if nextUrl is not provided
|
|
194
|
-
: this.isLastPage(), "aria-label": "Next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": true, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors", onClick: (event) => {
|
|
195
|
-
if (this.mode === 'default') {
|
|
196
|
-
if (this.isLastPage()) {
|
|
197
|
-
event.preventDefault(); // Prevent click if disabled
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
this.handlePageClick(event, (this.currentPage || 1) + 1);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
} }))))) : null));
|
|
204
|
-
}
|
|
205
|
-
get hostEl() { return getElement(this); }
|
|
206
|
-
static get watchers() { return {
|
|
207
|
-
"currentPage": ["onPageOrLastPageChange"],
|
|
208
|
-
"lastPage": ["onPageOrLastPageChange"]
|
|
209
|
-
}; }
|
|
210
|
-
};
|
|
211
|
-
EdsPagination.style = EdsPaginationStyle0;
|
|
212
|
-
|
|
213
|
-
const edsTableCss = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-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)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}";
|
|
214
|
-
const EdsTableStyle0 = edsTableCss;
|
|
215
|
-
|
|
216
|
-
const EdsTable = class {
|
|
217
|
-
constructor(hostRef) {
|
|
218
|
-
registerInstance(this, hostRef);
|
|
219
|
-
this.data = null;
|
|
220
|
-
this.endpoint = null;
|
|
221
|
-
this.config = {};
|
|
222
|
-
this.rowsPerPage = 10;
|
|
223
|
-
this.paginationEnabled = true;
|
|
224
|
-
this.searchEnabled = false;
|
|
225
|
-
this.hostWidth = undefined;
|
|
226
|
-
this.columnSize = 'default';
|
|
227
|
-
this.tableData = [];
|
|
228
|
-
this.columns = [];
|
|
229
|
-
this.currentPage = 1;
|
|
230
|
-
this.parsedConfig = {};
|
|
231
|
-
this.totalRows = 0;
|
|
232
|
-
this.searchQuery = '';
|
|
233
|
-
}
|
|
234
|
-
handleDataChange() {
|
|
235
|
-
this.parseData();
|
|
236
|
-
}
|
|
237
|
-
handleConfigChange() {
|
|
238
|
-
this.parseConfig();
|
|
239
|
-
}
|
|
240
|
-
componentWillLoad() {
|
|
241
|
-
this.parseConfig();
|
|
242
|
-
this.data ? this.parseData() : this.endpoint && this.fetchData();
|
|
243
|
-
}
|
|
244
|
-
componentDidLoad() {
|
|
245
|
-
this.setupPaginationListener();
|
|
246
|
-
}
|
|
247
|
-
componentDidUpdate() {
|
|
248
|
-
this.setupPaginationListener();
|
|
249
|
-
}
|
|
250
|
-
parseData() {
|
|
251
|
-
try {
|
|
252
|
-
this.tableData = typeof this.data === 'string' ? JSON.parse(this.data) : this.data || [];
|
|
253
|
-
this.totalRows = this.tableData.length;
|
|
254
|
-
this.updateColumns();
|
|
255
|
-
this.currentPage = 1;
|
|
256
|
-
}
|
|
257
|
-
catch (error) {
|
|
258
|
-
// eslint-disable-next-line
|
|
259
|
-
console.error('Failed to parse data:', error);
|
|
260
|
-
this.tableData = [];
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
parseConfig() {
|
|
264
|
-
try {
|
|
265
|
-
this.parsedConfig = typeof this.config === 'string' ? JSON.parse(this.config) : this.config;
|
|
266
|
-
}
|
|
267
|
-
catch (error) {
|
|
268
|
-
// eslint-disable-next-line
|
|
269
|
-
console.error('Failed to parse config:', error);
|
|
270
|
-
this.parsedConfig = {};
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
async fetchData() {
|
|
274
|
-
try {
|
|
275
|
-
const response = await fetch(this.endpoint);
|
|
276
|
-
const data = await response.json();
|
|
277
|
-
this.data = data;
|
|
278
|
-
}
|
|
279
|
-
catch (error) {
|
|
280
|
-
// eslint-disable-next-line
|
|
281
|
-
console.error('Failed to fetch data:', error);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
setupPaginationListener() {
|
|
285
|
-
if (!this.shouldEnablePagination()) {
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
const paginationEl = this.hostEl.shadowRoot.querySelector('eds-pagination');
|
|
289
|
-
if (paginationEl && !paginationEl.hasAttribute('listener-attached')) {
|
|
290
|
-
paginationEl.addEventListener('pageChange', (event) => this.handlePageChange(event.detail));
|
|
291
|
-
paginationEl.setAttribute('listener-attached', 'true');
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
getFilteredRows() {
|
|
295
|
-
return this.tableData.filter((row) => Object.values(row).some((value) => value.toString().toLowerCase().includes(this.searchQuery.toLowerCase())));
|
|
296
|
-
}
|
|
297
|
-
getPaginatedRows() {
|
|
298
|
-
const filteredRows = this.getFilteredRows();
|
|
299
|
-
this.totalRows = filteredRows.length;
|
|
300
|
-
const start = (this.currentPage - 1) * this.rowsPerPage;
|
|
301
|
-
return filteredRows.slice(start, start + this.rowsPerPage);
|
|
302
|
-
}
|
|
303
|
-
handlePageChange(newPage) {
|
|
304
|
-
this.currentPage = newPage;
|
|
305
|
-
sendAnalytics({
|
|
306
|
-
category: 'ui-component',
|
|
307
|
-
parentContext: null,
|
|
308
|
-
tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
|
|
309
|
-
name: `${newPage}` || '',
|
|
310
|
-
action: 'page'
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
handleSearch(event) {
|
|
314
|
-
this.searchQuery = event.target.value;
|
|
315
|
-
this.currentPage = 1;
|
|
316
|
-
/*sendAnalytics({
|
|
317
|
-
category: 'ui-component',
|
|
318
|
-
parentContext: null,
|
|
319
|
-
tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
|
|
320
|
-
name: `${this.searchQuery}` || '',
|
|
321
|
-
action: 'page'
|
|
322
|
-
});*/
|
|
323
|
-
}
|
|
324
|
-
renderCell(value, column) {
|
|
325
|
-
var _a;
|
|
326
|
-
const format = (_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.format;
|
|
327
|
-
return format === 'uppercase' ? (value === null || value === void 0 ? void 0 : value.toString().toUpperCase()) : format === 'svg' ? (h("div", { innerHTML: value })) : format === 'bold' ? (h("strong", null, value)) : format === 'code' ? (h("code", null, value)) : (value);
|
|
328
|
-
}
|
|
329
|
-
shouldEnablePagination() {
|
|
330
|
-
return this.paginationEnabled && this.totalRows > this.rowsPerPage;
|
|
331
|
-
}
|
|
332
|
-
updateColumns() {
|
|
333
|
-
this.columns = this.tableData.length > 0 ? Object.keys(this.tableData[0]) : [];
|
|
334
|
-
}
|
|
335
|
-
getVisibleColumnsCount() {
|
|
336
|
-
return this.columns.filter((column) => { var _a; return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden); }).length;
|
|
337
|
-
}
|
|
338
|
-
divisionFactor() {
|
|
339
|
-
let divisionFactor = 1;
|
|
340
|
-
if (this.columnSize === 'medium') {
|
|
341
|
-
divisionFactor = 2;
|
|
342
|
-
}
|
|
343
|
-
else if (this.columnSize === 'large') {
|
|
344
|
-
divisionFactor = 4;
|
|
345
|
-
}
|
|
346
|
-
return divisionFactor;
|
|
347
|
-
}
|
|
348
|
-
render() {
|
|
349
|
-
// Get the paginated rows and calculate the last page.
|
|
350
|
-
const paginatedRows = this.getPaginatedRows();
|
|
351
|
-
const lastPage = Math.ceil(this.totalRows / this.rowsPerPage);
|
|
352
|
-
// Determine the number of visible columns (i.e., those not hidden via config)
|
|
353
|
-
const visibleColumnsCount = this.getVisibleColumnsCount();
|
|
354
|
-
/// Calculate container width based on the optional prop or parent's measured width.
|
|
355
|
-
const containerWidth = this.hostWidth && this.hostWidth.trim() !== ''
|
|
356
|
-
? Number(this.hostWidth)
|
|
357
|
-
: this.hostEl.parentElement instanceof HTMLElement
|
|
358
|
-
? this.hostEl.parentElement.getBoundingClientRect().width
|
|
359
|
-
: this.hostEl.getRootNode().host instanceof HTMLElement
|
|
360
|
-
? this.hostEl.getRootNode().host.getBoundingClientRect().width
|
|
361
|
-
: 400;
|
|
362
|
-
const columnWidth = visibleColumnsCount > 0 ? Math.floor((containerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
363
|
-
return (h("div", { key: '66ca59804bc8054655ed0d942104516fe4cd259b' }, this.searchEnabled && (h("div", { key: 'df7267fc443da042e4b6ff81ded5800a2213bd73' }, h("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...",
|
|
364
|
-
// @ts-ignore
|
|
365
|
-
onInput: (event) => this.handleSearch(event) }))), h("div", { key: '80ac1fcb3802f9f5d5eabe016fb7345b88908b36', class: "mt-20" }, h("table", { key: '09acf39378b1a4c8bfe40b496ec6bf71a2d761ca', class: "block overflow-x-auto mt-6 p-0" }, h("thead", { key: '8b844806cfef10d1a59da54a385ee8ed6c167050' }, h("tr", { key: '1b3cff91bdaf225e9f3b337e245cd80ad4772b6a', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
|
|
366
|
-
var _a;
|
|
367
|
-
return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 5}px` } }, column));
|
|
368
|
-
}))), h("tbody", { key: '93dfd3abd196779c288f85bb6a357ad3e9c01418' }, paginatedRows.map((row) => (h("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
|
|
369
|
-
var _a;
|
|
370
|
-
return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (h("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${columnWidth - 5}px` } }, this.renderCell(row[column], column)));
|
|
371
|
-
}))))))), this.shouldEnablePagination() && (h("div", { key: '516b65d78a9ea91060c1dfcb3306bbd3ac2c6f58', class: "mt-20" }, h("eds-pagination", { key: 'abe3a593827d99437a06e204ea9d8ef92f80aba7', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
|
|
372
|
-
}
|
|
373
|
-
get hostEl() { return getElement(this); }
|
|
374
|
-
static get watchers() { return {
|
|
375
|
-
"data": ["handleDataChange", "parseData"],
|
|
376
|
-
"config": ["handleConfigChange"]
|
|
377
|
-
}; }
|
|
378
|
-
};
|
|
379
|
-
EdsTable.style = EdsTableStyle0;
|
|
380
|
-
|
|
381
|
-
export { EdsPagination as eds_pagination, EdsTable as eds_table };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-e96badea.js';
|
|
2
|
-
|
|
3
|
-
const edsSocialNetworksCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.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)}.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)}.mt-12{margin-top:0.75rem}.mt-16{margin-top:1rem}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.gap-4{gap:0.25rem}.effect-color{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:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.effect-focus{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.hover\\:text-default:hover{color:var(--black)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:8px}";
|
|
4
|
-
const EdsSocialNetworksStyle0 = edsSocialNetworksCss;
|
|
5
|
-
|
|
6
|
-
const EdsSocialNetworks = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
/**
|
|
10
|
-
* Array of social network objects, each containing label, URL, and icon.
|
|
11
|
-
* These are used to render the social network links.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
* @type {SocialNetworks[]}
|
|
15
|
-
*/
|
|
16
|
-
this.socialNetworks = [
|
|
17
|
-
{
|
|
18
|
-
label: 'Twitter',
|
|
19
|
-
url: 'https://twitter.com/ebrains_eu',
|
|
20
|
-
icon: 'twitter'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
label: 'Linkedin',
|
|
24
|
-
url: 'https://www.linkedin.com/company/ebrains-eu/about/',
|
|
25
|
-
icon: 'linkedin'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
label: 'Facebook',
|
|
29
|
-
url: 'https://www.facebook.com/people/Ebrains_eu/100046659909324/',
|
|
30
|
-
icon: 'facebook'
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: 'Youtube',
|
|
34
|
-
url: 'https://www.youtube.com/channel/UC6E796cVVR5Xrs2A5jJmleQ',
|
|
35
|
-
icon: 'youtube'
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
label: 'Mastodon',
|
|
39
|
-
url: 'https://mastodon.social/@ebrains',
|
|
40
|
-
icon: 'mastodon'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: 'Bluesky',
|
|
44
|
-
url: 'https://bsky.app/profile/ebrains.bsky.social',
|
|
45
|
-
icon: 'bluesky'
|
|
46
|
-
}
|
|
47
|
-
];
|
|
48
|
-
this.title = 'Follow EBRAINS to keep up-to-date';
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Renders the component's HTML structure with links to EBRAINS social profiles.
|
|
52
|
-
* Each social network link uses the `eds-link` component with specific classes and styles.
|
|
53
|
-
*
|
|
54
|
-
* @returns {JSX.Element} The rendered JSX for the component.
|
|
55
|
-
*/
|
|
56
|
-
render() {
|
|
57
|
-
return (h("div", { key: '9efc31261e88c70f9c808251124178d807140594' }, h("p", { key: '383101de2aaba05e1024f3ba86d788ad5d92173c', class: "f-ui-02" }, this.title), h("ul", { key: 'e27243a4e7b8aab085c4ef091d67df57dba70664', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index) => (h("li", { key: index }, h("eds-link", { "extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm", external: true, "aria-label": network.label, url: network.url, icon: network.icon, intent: "strong" })))))));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
EdsSocialNetworks.style = EdsSocialNetworksStyle0;
|
|
61
|
-
|
|
62
|
-
export { EdsSocialNetworks as eds_social_networks };
|