@ebrains/components 0.5.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/{analytics-223ea8e5.js → analytics-d8fb3fdd.js} +9 -0
- 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 +97 -0
- package/dist/cjs/eds-app-root.cjs.entry.js +37 -0
- package/dist/cjs/eds-avatar_4.cjs.entry.js +2 -9
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +135 -0
- package/dist/cjs/eds-card-generic.cjs.entry.js +5 -17
- package/dist/cjs/eds-card-project.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-section.cjs.entry.js +6 -22
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +2 -2
- 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 +39 -0
- 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} +9 -42
- package/dist/cjs/eds-feedback.cjs.entry.js +66 -0
- package/dist/cjs/eds-form.cjs.entry.js +238 -255
- 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 +16 -4
- package/dist/cjs/eds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/eds-rating.cjs.entry.js +64 -0
- 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 +55 -0
- package/dist/cjs/eds-svg-repository.cjs.entry.js +9 -3
- package/dist/cjs/eds-switch.cjs.entry.js +38 -0
- package/dist/cjs/eds-tabs.cjs.entry.js +11 -25
- 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 +3 -3
- 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} +57 -28
- 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 -5
- 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-button/eds-button.js +21 -16
- 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.css +6793 -6676
- 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 +61 -6
- package/dist/collection/components/eds-steps/eds-steps.js +10 -19
- 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 +4 -35
- package/dist/collection/components/eds-timeline/eds-timeline.js +3 -21
- package/dist/collection/components/eds-toast/eds-toast.css +91 -0
- package/dist/collection/components/eds-toast/eds-toast.js +18 -9
- 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.css +236 -140
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +12 -28
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +2 -2
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.css +0 -0
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +87 -0
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.st.js +31 -0
- 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 +7 -53
- 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/shared-ui/eds-matomo-notice/eds-matomo-notice.js +78 -66
- package/dist/collection/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.css +1 -1
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +5 -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/analytics.js +9 -1
- package/dist/components/components.css +501 -5
- 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 +12 -16
- package/dist/components/eds-card-generic2.js +3 -15
- package/dist/components/eds-card-section.js +6 -22
- package/dist/components/eds-components-section.js +1 -1
- package/dist/components/eds-cookies-preference.d.ts +11 -0
- package/dist/components/eds-cookies-preference.js +88 -0
- 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 +3 -13
- package/dist/components/{eds-tab.d.ts → eds-form-v2.d.ts} +4 -4
- package/dist/components/eds-form-v2.js +317 -0
- 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 +2 -2
- 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-notice.js +1 -140
- package/dist/components/eds-matomo-notice2.js +130 -0
- 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 +11 -20
- 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 -9
- package/dist/components/eds-timeline.js +3 -21
- package/dist/components/eds-toast-manager.js +4 -3
- package/dist/components/eds-toast2.js +13 -10
- 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-89227919.js → p-13efafb9.js} +1 -1
- 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-2b31ca60.entry.js +1 -0
- 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-4cd69983.entry.js +1 -0
- 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-72b42d77.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-8b70a350.entry.js +1 -0
- 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-0e0e1815.entry.js → p-a5c61d1c.entry.js} +1 -1
- package/dist/components/p-a6cd418e.entry.js +1 -0
- package/dist/components/{p-505ddcda.entry.js → p-a8dd1953.entry.js} +1 -1
- package/dist/components/p-a91ab66e.entry.js +1 -0
- 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-def72462.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/{analytics-1cde8e4a.js → analytics-44b1416b.js} +9 -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 +93 -0
- package/dist/esm/eds-app-root.entry.js +33 -0
- package/dist/esm/eds-avatar_4.entry.js +2 -9
- package/dist/esm/eds-breadcrumb.entry.js +131 -0
- package/dist/esm/eds-card-generic.entry.js +5 -17
- package/dist/esm/eds-card-project.entry.js +2 -2
- package/dist/esm/eds-card-section.entry.js +6 -22
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +2 -2
- 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 +35 -0
- 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} +10 -42
- package/dist/esm/eds-feedback.entry.js +62 -0
- package/dist/esm/eds-form.entry.js +238 -255
- 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 +16 -4
- package/dist/esm/eds-progress-bar.entry.js +2 -2
- package/dist/esm/eds-rating.entry.js +60 -0
- 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 +51 -0
- package/dist/esm/eds-svg-repository.entry.js +9 -3
- package/dist/esm/eds-switch.entry.js +34 -0
- package/dist/esm/eds-tabs.entry.js +11 -25
- 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 +3 -3
- 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} +57 -29
- 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 +1556 -1192
- package/dist/hydrate/index.mjs +1556 -1192
- 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-button/eds-button.d.ts +3 -1
- 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 -2
- package/dist/types/components/eds-table/eds-table.stories.d.ts +6 -0
- package/dist/types/components/eds-tag/eds-tag.d.ts +1 -25
- package/dist/types/components/eds-toast/eds-toast.d.ts +4 -5
- package/dist/types/components.d.ts +689 -387
- 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-card-section/eds-card-section.d.ts +5 -5
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +1 -1
- package/dist/types/shared-ui/eds-cookies-preference/eds-cookies-preference.d.ts +27 -0
- package/dist/types/shared-ui/eds-cookies-preference/eds-cookies-preference.st.d.ts +27 -0
- 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-footer/eds-footer.d.ts +2 -15
- 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/shared-ui/eds-matomo-notice/eds-matomo-notice.d.ts +17 -48
- package/dist/types/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.cjs.entry.js +0 -84
- package/dist/cjs/eds-alert_17.cjs.entry.js +0 -1392
- package/dist/cjs/eds-input_7.cjs.entry.js +0 -324
- package/dist/cjs/eds-login.cjs.entry.js +0 -91
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +0 -109
- 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-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-030f67c1.entry.js +0 -1
- package/dist/components/p-06299762.entry.js +0 -1
- package/dist/components/p-0ab85eee.entry.js +0 -1
- package/dist/components/p-0bafc5ae.entry.js +0 -1
- package/dist/components/p-0e7bdd2c.entry.js +0 -1
- package/dist/components/p-1ed3fdb7.entry.js +0 -1
- package/dist/components/p-209fa119.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-38d70586.entry.js +0 -1
- package/dist/components/p-3babd772.entry.js +0 -1
- package/dist/components/p-4a12a131.entry.js +0 -1
- package/dist/components/p-59405ecf.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-65703520.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-75795b05.entry.js +0 -1
- package/dist/components/p-759b2640.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-8b583210.entry.js +0 -1
- package/dist/components/p-8c4a0fc9.entry.js +0 -1
- package/dist/components/p-8d19a05b.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-92e16cc9.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-9826acae.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-c5fa170d.entry.js +0 -1
- package/dist/components/p-d69ef196.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-eeeb0d83.entry.js +0 -1
- package/dist/components/p-f08eac56.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-accordion.entry.js +0 -80
- package/dist/esm/eds-alert_17.entry.js +0 -1372
- package/dist/esm/eds-input_7.entry.js +0 -314
- package/dist/esm/eds-login.entry.js +0 -87
- package/dist/esm/eds-matomo-notice.entry.js +0 -105
- package/dist/esm/eds-navigator.entry.js +0 -39
- package/dist/esm/eds-pagination_2.entry.js +0 -381
- 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
|
@@ -1,121 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as login, a as logout, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak.js';
|
|
3
|
-
import { t as toast } from './toastManager.js';
|
|
4
|
-
import { d as defineCustomElement$3 } from './eds-button2.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './eds-icon-wrapper2.js';
|
|
6
|
-
|
|
7
|
-
const EdsLogin$1 = /*@__PURE__*/ proxyCustomElement(class EdsLogin extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Handles user login by invoking the Keycloak `login` function.
|
|
15
|
-
* Only triggers login if the user is not already authenticated.
|
|
16
|
-
*/
|
|
17
|
-
this.handleLogin = async () => {
|
|
18
|
-
if (!this.authenticated) {
|
|
19
|
-
try {
|
|
20
|
-
await login();
|
|
21
|
-
toast.show('You are authenticated', 'success');
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
toast.show(error.message, 'error');
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Handles user logout by invoking the Keycloak `logout` function.
|
|
30
|
-
* Resets the `authenticated` state to `false` after logout.
|
|
31
|
-
*/
|
|
32
|
-
this.handleLogout = async () => {
|
|
33
|
-
try {
|
|
34
|
-
await logout();
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
toast.show(error.message, 'error');
|
|
38
|
-
}
|
|
39
|
-
this.authenticated = false;
|
|
40
|
-
this.user = null;
|
|
41
|
-
};
|
|
42
|
-
this.keycloakUrl = undefined;
|
|
43
|
-
this.keycloakRealm = undefined;
|
|
44
|
-
this.keycloakClientId = undefined;
|
|
45
|
-
this.authenticated = false;
|
|
46
|
-
this.user = null;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Lifecycle method that runs when the component is about to load.
|
|
50
|
-
* It initializes authentication by calling the `initAuth` method.
|
|
51
|
-
*/
|
|
52
|
-
async componentWillLoad() {
|
|
53
|
-
// Check if required props are provided (optional check)
|
|
54
|
-
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
55
|
-
// eslint-disable-next-line
|
|
56
|
-
console.error('Keycloak configuration props are missing.');
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
await this.initAuth();
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
63
|
-
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
64
|
-
* Emits `authStatusChanged` event with the authentication status.
|
|
65
|
-
*/
|
|
66
|
-
async initAuth() {
|
|
67
|
-
try {
|
|
68
|
-
await initKeycloak({
|
|
69
|
-
url: this.keycloakUrl,
|
|
70
|
-
realm: this.keycloakRealm,
|
|
71
|
-
clientId: this.keycloakClientId
|
|
72
|
-
}, true);
|
|
73
|
-
if (isAuthenticated()) {
|
|
74
|
-
this.user = getUser();
|
|
75
|
-
this.authenticated = true;
|
|
76
|
-
this.authStatusChanged.emit({
|
|
77
|
-
authenticated: this.authenticated,
|
|
78
|
-
user: this.user
|
|
79
|
-
}); // Emit auth status change
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (error) {
|
|
83
|
-
toast.show(error.message, 'error');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
render() {
|
|
87
|
-
return (h("div", { key: 'cd30a135920ae77959330a43a8544bb9c231986e', class: "block" }, !this.authenticated && (h("eds-button", { key: '98fa63c46b063a67c215ff9160c6dfbfee2265f7', label: "Login", intent: "primary", "extra-class": "text-default", "aria-label": "Login", triggerClick: this.handleLogin.bind(this) }))));
|
|
88
|
-
}
|
|
89
|
-
}, [1, "eds-login", {
|
|
90
|
-
"keycloakUrl": [1, "keycloak-url"],
|
|
91
|
-
"keycloakRealm": [1, "keycloak-realm"],
|
|
92
|
-
"keycloakClientId": [1, "keycloak-client-id"],
|
|
93
|
-
"authenticated": [32],
|
|
94
|
-
"user": [32]
|
|
95
|
-
}]);
|
|
96
|
-
function defineCustomElement$1() {
|
|
97
|
-
if (typeof customElements === "undefined") {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const components = ["eds-login", "eds-button", "eds-icon-wrapper"];
|
|
101
|
-
components.forEach(tagName => { switch (tagName) {
|
|
102
|
-
case "eds-login":
|
|
103
|
-
if (!customElements.get(tagName)) {
|
|
104
|
-
customElements.define(tagName, EdsLogin$1);
|
|
105
|
-
}
|
|
106
|
-
break;
|
|
107
|
-
case "eds-button":
|
|
108
|
-
if (!customElements.get(tagName)) {
|
|
109
|
-
defineCustomElement$3();
|
|
110
|
-
}
|
|
111
|
-
break;
|
|
112
|
-
case "eds-icon-wrapper":
|
|
113
|
-
if (!customElements.get(tagName)) {
|
|
114
|
-
defineCustomElement$2();
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
} });
|
|
118
|
-
}
|
|
1
|
+
import { E as EdsLogin$1, d as defineCustomElement$1 } from './eds-login2.js';
|
|
119
2
|
|
|
120
3
|
const EdsLogin = EdsLogin$1;
|
|
121
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { t as toast } from './toastManager.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './eds-button2.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
2
5
|
|
|
3
6
|
/*
|
|
4
7
|
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
@@ -1947,9 +1950,127 @@ async function checkServerAvailability(url) {
|
|
|
1947
1950
|
}
|
|
1948
1951
|
}
|
|
1949
1952
|
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1953
|
+
const EdsLogin = /*@__PURE__*/ proxyCustomElement(class EdsLogin extends HTMLElement {
|
|
1954
|
+
constructor() {
|
|
1955
|
+
super();
|
|
1956
|
+
this.__registerHost();
|
|
1957
|
+
this.__attachShadow();
|
|
1958
|
+
this.keycloak = createEvent(this, "keycloak", 7);
|
|
1959
|
+
this.auth = createEvent(this, "auth", 7);
|
|
1960
|
+
/**
|
|
1961
|
+
* Handles user login by invoking the Keycloak `login` function.
|
|
1962
|
+
* Only triggers login if the user is not already authenticated.
|
|
1963
|
+
*/
|
|
1964
|
+
this.handleLogin = async () => {
|
|
1965
|
+
if (!this.authenticated) {
|
|
1966
|
+
try {
|
|
1967
|
+
await login();
|
|
1968
|
+
}
|
|
1969
|
+
catch (error) {
|
|
1970
|
+
toast.show(error.message, 'error');
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
};
|
|
1974
|
+
/**
|
|
1975
|
+
* Handles user logout by invoking the Keycloak `logout` function.
|
|
1976
|
+
* Resets the `authenticated` state to `false` after logout.
|
|
1977
|
+
*/
|
|
1978
|
+
this.handleLogout = async () => {
|
|
1979
|
+
try {
|
|
1980
|
+
await logout();
|
|
1981
|
+
}
|
|
1982
|
+
catch (error) {
|
|
1983
|
+
toast.show(error.message, 'error');
|
|
1984
|
+
}
|
|
1985
|
+
this.authenticated = false;
|
|
1986
|
+
this.user = null;
|
|
1987
|
+
};
|
|
1988
|
+
this.keycloakUrl = undefined;
|
|
1989
|
+
this.keycloakRealm = undefined;
|
|
1990
|
+
this.keycloakClientId = undefined;
|
|
1991
|
+
this.authenticated = false;
|
|
1992
|
+
this.user = null;
|
|
1993
|
+
this.serverAvailable = false;
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Lifecycle method that runs when the component is about to load.
|
|
1997
|
+
* It initializes authentication by calling the `initAuth` method.
|
|
1998
|
+
*/
|
|
1999
|
+
async componentWillLoad() {
|
|
2000
|
+
// Check if required props are provided (optional check)
|
|
2001
|
+
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
2002
|
+
// eslint-disable-next-line
|
|
2003
|
+
console.error('Keycloak configuration props are missing.');
|
|
2004
|
+
return;
|
|
2005
|
+
}
|
|
2006
|
+
this.serverAvailable = await checkServerAvailability(`${this.keycloakUrl}/realms/${this.keycloakRealm}`);
|
|
2007
|
+
if (!this.serverAvailable) {
|
|
2008
|
+
toast.show('Keycloak server is unavailable.', 'error');
|
|
2009
|
+
return; // Do not proceed further
|
|
2010
|
+
}
|
|
2011
|
+
await this.initAuth();
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
2015
|
+
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
2016
|
+
* Emits `authStatusChanged` event with the authentication status.
|
|
2017
|
+
*/
|
|
2018
|
+
async initAuth() {
|
|
2019
|
+
try {
|
|
2020
|
+
const res = await initKeycloak({
|
|
2021
|
+
url: this.keycloakUrl,
|
|
2022
|
+
realm: this.keycloakRealm,
|
|
2023
|
+
clientId: this.keycloakClientId
|
|
2024
|
+
}, true);
|
|
2025
|
+
this.keycloak.emit({
|
|
2026
|
+
init: res
|
|
2027
|
+
});
|
|
2028
|
+
if (isAuthenticated()) {
|
|
2029
|
+
this.user = getUser();
|
|
2030
|
+
this.authenticated = true;
|
|
2031
|
+
this.auth.emit({
|
|
2032
|
+
authenticated: this.authenticated,
|
|
2033
|
+
user: this.user
|
|
2034
|
+
}); // Emit auth status change
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
catch (error) {
|
|
2038
|
+
toast.show(error.message, 'error');
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
render() {
|
|
2042
|
+
return (h("div", { key: '074566b791eeb9ea4a0558b4ed83a96e4b673356', class: "block" }, !this.authenticated && (h("eds-button", { key: '3a05ff97a90d73204eb77c5dad0d328294d72d3e', label: "Login", intent: "primary", "extra-class": "text-default", "aria-label": "Login", triggerClick: this.handleLogin.bind(this) }))));
|
|
2043
|
+
}
|
|
2044
|
+
}, [1, "eds-login", {
|
|
2045
|
+
"keycloakUrl": [1, "keycloak-url"],
|
|
2046
|
+
"keycloakRealm": [1, "keycloak-realm"],
|
|
2047
|
+
"keycloakClientId": [1, "keycloak-client-id"],
|
|
2048
|
+
"authenticated": [32],
|
|
2049
|
+
"user": [32],
|
|
2050
|
+
"serverAvailable": [32]
|
|
2051
|
+
}]);
|
|
2052
|
+
function defineCustomElement() {
|
|
2053
|
+
if (typeof customElements === "undefined") {
|
|
2054
|
+
return;
|
|
2055
|
+
}
|
|
2056
|
+
const components = ["eds-login", "eds-button", "eds-icon-wrapper"];
|
|
2057
|
+
components.forEach(tagName => { switch (tagName) {
|
|
2058
|
+
case "eds-login":
|
|
2059
|
+
if (!customElements.get(tagName)) {
|
|
2060
|
+
customElements.define(tagName, EdsLogin);
|
|
2061
|
+
}
|
|
2062
|
+
break;
|
|
2063
|
+
case "eds-button":
|
|
2064
|
+
if (!customElements.get(tagName)) {
|
|
2065
|
+
defineCustomElement$2();
|
|
2066
|
+
}
|
|
2067
|
+
break;
|
|
2068
|
+
case "eds-icon-wrapper":
|
|
2069
|
+
if (!customElements.get(tagName)) {
|
|
2070
|
+
defineCustomElement$1();
|
|
2071
|
+
}
|
|
2072
|
+
break;
|
|
2073
|
+
} });
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
export { EdsLogin as E, defineCustomElement as d };
|
|
@@ -20,7 +20,7 @@ const EdsLogoVariations$1 = /*@__PURE__*/ proxyCustomElement(class EdsLogoVariat
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return h("div", { key: '
|
|
23
|
+
return h("div", { key: '0b23fee608fcbe7059fce155bd65a0c0a4d16e07', class: "container" }, this.renderContent());
|
|
24
24
|
}
|
|
25
25
|
}, [0, "eds-logo-variations", {
|
|
26
26
|
"tabIndex": [2, "tab-index"]
|
|
@@ -67,7 +67,7 @@ const EdsLogo = /*@__PURE__*/ proxyCustomElement(class EdsLogo extends HTMLEleme
|
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
69
|
const logoContent = this.getLogo();
|
|
70
|
-
return (h("a", { key: '
|
|
70
|
+
return (h("a", { key: '5656cc942833ab3f5511ab634c502d694e982db7', href: this.href, onClick: () => this.handleClick(), class: "eds-logo-wrapper", "aria-label": this.label }, h("div", { key: '3e0763fdd94b7624182af3aee50b314c81f064d6', innerHTML: logoContent })));
|
|
71
71
|
}
|
|
72
72
|
get el() { return this; }
|
|
73
73
|
static get style() { return EdsLogoStyle0; }
|
|
@@ -1,143 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as toast } from './toastManager.js';
|
|
3
|
-
import { m as matomoOptIn } from './analytics.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './eds-accordion2.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './eds-button2.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './eds-icon-wrapper2.js';
|
|
7
|
-
|
|
8
|
-
const edsMatomoNoticeCss = ".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}";
|
|
9
|
-
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
10
|
-
|
|
11
|
-
const EdsMatomoNotice$1 = /*@__PURE__*/ proxyCustomElement(class EdsMatomoNotice extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.__attachShadow();
|
|
16
|
-
this.title = 'Analytics Consent';
|
|
17
|
-
this.description = 'We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.';
|
|
18
|
-
this.showNotice = true;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Lifecycle method called before the component is rendered.
|
|
22
|
-
* Checks for the presence of the "mtm_consent" cookie to determine
|
|
23
|
-
* if the notice should be displayed.
|
|
24
|
-
*/
|
|
25
|
-
componentWillLoad() {
|
|
26
|
-
this.checkConsentCookie();
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Lifecycle method called after the component has been rendered.
|
|
30
|
-
* Emits `parentContext` events for each `eds-button` in the shadow DOM.
|
|
31
|
-
*/
|
|
32
|
-
componentDidLoad() {
|
|
33
|
-
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
34
|
-
btns.forEach((b) => {
|
|
35
|
-
this.emitContext(b);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Emits a custom `parentContext` event for a given button element.
|
|
40
|
-
* This can be used to provide context information about the component.
|
|
41
|
-
*
|
|
42
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
43
|
-
*/
|
|
44
|
-
emitContext(linkElement) {
|
|
45
|
-
const event = new CustomEvent('parentContext', {
|
|
46
|
-
detail: {
|
|
47
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
48
|
-
identifier: null
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
linkElement.dispatchEvent(event);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Checks if the Matomo "mtm_consent" cookie exists in the browser.
|
|
55
|
-
* If the cookie is found, the notice is hidden.
|
|
56
|
-
*/
|
|
57
|
-
checkConsentCookie() {
|
|
58
|
-
const consentCookie = document.cookie.split('; ').find((row) => row.startsWith('mtm_consent='));
|
|
59
|
-
//this.showNotice = !consentCookie;
|
|
60
|
-
const sessionDeferred = sessionStorage.getItem('matomo-deferred');
|
|
61
|
-
this.showNotice = !consentCookie && !sessionDeferred;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Handles user consent for analytics tracking.
|
|
65
|
-
* Calls the `matomoOptIn` utility and shows a success toast notification.
|
|
66
|
-
*/
|
|
67
|
-
optInAnalytics() {
|
|
68
|
-
matomoOptIn();
|
|
69
|
-
toast.show('You have opted in to analytics.', 'success');
|
|
70
|
-
this.hideNotice();
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Handles user opt-out from analytics tracking.
|
|
74
|
-
* Calls the `matomoOptOut` utility and shows a warning toast notification.
|
|
75
|
-
|
|
76
|
-
private optOutAnalytics() {
|
|
77
|
-
matomoOptOut();
|
|
78
|
-
toast.show('You have opted out of analytics.', 'warning');
|
|
79
|
-
this.hideNotice();
|
|
80
|
-
}*/
|
|
81
|
-
/**
|
|
82
|
-
* Handles "Ask me later" action by storing a session storage entry
|
|
83
|
-
* and hiding the notice for the rest of the session.
|
|
84
|
-
*/
|
|
85
|
-
deferDecision() {
|
|
86
|
-
sessionStorage.setItem('matomo-deferred', 'true');
|
|
87
|
-
toast.show('You can decide later.', 'warning');
|
|
88
|
-
this.hideNotice();
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Hides the notice by updating the `showNotice` state.
|
|
92
|
-
*/
|
|
93
|
-
hideNotice() {
|
|
94
|
-
this.showNotice = false;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Renders the Matomo consent notice with user options.
|
|
98
|
-
* Includes an accordion for the description and two buttons for user consent.
|
|
99
|
-
*/
|
|
100
|
-
render() {
|
|
101
|
-
if (!this.showNotice) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
return (h("div", { class: "fixed bottom-0 p-8 z-10 grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center" }, h("eds-accordion", { title: this.title, description: this.description, switchBg: true, expanded: true }, h("div", { class: "flex items-center gap-4" }, h("eds-button", { intent: "primary", label: "Yes, I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() }), h("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))));
|
|
105
|
-
}
|
|
106
|
-
get el() { return this; }
|
|
107
|
-
static get style() { return EdsMatomoNoticeStyle0; }
|
|
108
|
-
}, [1, "eds-matomo-notice", {
|
|
109
|
-
"title": [1],
|
|
110
|
-
"description": [1],
|
|
111
|
-
"showNotice": [32]
|
|
112
|
-
}]);
|
|
113
|
-
function defineCustomElement$1() {
|
|
114
|
-
if (typeof customElements === "undefined") {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const components = ["eds-matomo-notice", "eds-accordion", "eds-button", "eds-icon-wrapper"];
|
|
118
|
-
components.forEach(tagName => { switch (tagName) {
|
|
119
|
-
case "eds-matomo-notice":
|
|
120
|
-
if (!customElements.get(tagName)) {
|
|
121
|
-
customElements.define(tagName, EdsMatomoNotice$1);
|
|
122
|
-
}
|
|
123
|
-
break;
|
|
124
|
-
case "eds-accordion":
|
|
125
|
-
if (!customElements.get(tagName)) {
|
|
126
|
-
defineCustomElement$4();
|
|
127
|
-
}
|
|
128
|
-
break;
|
|
129
|
-
case "eds-button":
|
|
130
|
-
if (!customElements.get(tagName)) {
|
|
131
|
-
defineCustomElement$3();
|
|
132
|
-
}
|
|
133
|
-
break;
|
|
134
|
-
case "eds-icon-wrapper":
|
|
135
|
-
if (!customElements.get(tagName)) {
|
|
136
|
-
defineCustomElement$2();
|
|
137
|
-
}
|
|
138
|
-
break;
|
|
139
|
-
} });
|
|
140
|
-
}
|
|
1
|
+
import { E as EdsMatomoNotice$1, d as defineCustomElement$1 } from './eds-matomo-notice2.js';
|
|
141
2
|
|
|
142
3
|
const EdsMatomoNotice = EdsMatomoNotice$1;
|
|
143
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { m as matomoOptIn, a as matomoOptOut } from './analytics.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './eds-accordion2.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './eds-button2.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
6
|
+
|
|
7
|
+
const edsMatomoNoticeCss = ".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}";
|
|
8
|
+
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
9
|
+
|
|
10
|
+
const EdsMatomoNotice = /*@__PURE__*/ proxyCustomElement(class EdsMatomoNotice extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
this.consent = createEvent(this, "consent", 7);
|
|
16
|
+
this.title = 'Analytics Consent';
|
|
17
|
+
this.description = 'We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.';
|
|
18
|
+
this.forceShow = false;
|
|
19
|
+
this.showNotice = true;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Checks if the consent cookie exists.
|
|
23
|
+
*/
|
|
24
|
+
hasCookieConsent() {
|
|
25
|
+
return !!document.cookie.split('; ').find((row) => row.startsWith('mtm_consent='));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Generate a unique storage key based on appId or the app's domain.
|
|
29
|
+
*/
|
|
30
|
+
getStorageKey() {
|
|
31
|
+
return `${window.location.host}-matomo-deferred`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check cookies and sessionStorage (unless forceShow is true) to decide if the notice should be shown.
|
|
35
|
+
*/
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
if (this.forceShow) {
|
|
38
|
+
// If forceShow is true, always show the notice
|
|
39
|
+
this.showNotice = true;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
// If user has already consented, hide the notice
|
|
43
|
+
// eslint-disable-next-line
|
|
44
|
+
if (this.hasCookieConsent()) {
|
|
45
|
+
this.showNotice = false;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// Otherwise check if user deferred in this session
|
|
49
|
+
const sessionDeferred = sessionStorage.getItem(this.getStorageKey());
|
|
50
|
+
this.showNotice = !sessionDeferred;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
56
|
+
btns.forEach((b) => {
|
|
57
|
+
this.emitContext(b);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
emitContext(linkElement) {
|
|
61
|
+
const event = new CustomEvent('parentContext', {
|
|
62
|
+
detail: {
|
|
63
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
64
|
+
identifier: null
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
linkElement.dispatchEvent(event);
|
|
68
|
+
}
|
|
69
|
+
optInAnalytics() {
|
|
70
|
+
matomoOptIn();
|
|
71
|
+
this.hideNotice();
|
|
72
|
+
this.consent.emit('in');
|
|
73
|
+
}
|
|
74
|
+
optOutAnalytics() {
|
|
75
|
+
matomoOptOut();
|
|
76
|
+
this.hideNotice();
|
|
77
|
+
this.consent.emit('out');
|
|
78
|
+
}
|
|
79
|
+
deferDecision() {
|
|
80
|
+
sessionStorage.setItem(this.getStorageKey(), 'true');
|
|
81
|
+
this.hideNotice();
|
|
82
|
+
this.consent.emit('defer');
|
|
83
|
+
}
|
|
84
|
+
hideNotice() {
|
|
85
|
+
this.showNotice = false;
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
if (!this.showNotice) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
return (h("div", { class: "fixed bottom-0 p-8 z-10 grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center" }, h("eds-accordion", { title: this.title, description: this.description, switchBg: true, expanded: true }, h("div", { class: "flex items-center gap-4" }, this.hasCookieConsent() ? (h("eds-button", { intent: "primary", label: "Opt-out", "aria-label": "Opt-out from analytics", onClick: () => this.optOutAnalytics() })) : (h("eds-button", { intent: "primary", label: "Yes, I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() })), h("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))));
|
|
92
|
+
}
|
|
93
|
+
get el() { return this; }
|
|
94
|
+
static get style() { return EdsMatomoNoticeStyle0; }
|
|
95
|
+
}, [1, "eds-matomo-notice", {
|
|
96
|
+
"title": [1],
|
|
97
|
+
"description": [1],
|
|
98
|
+
"forceShow": [4, "force-show"],
|
|
99
|
+
"showNotice": [32]
|
|
100
|
+
}]);
|
|
101
|
+
function defineCustomElement() {
|
|
102
|
+
if (typeof customElements === "undefined") {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const components = ["eds-matomo-notice", "eds-accordion", "eds-button", "eds-icon-wrapper"];
|
|
106
|
+
components.forEach(tagName => { switch (tagName) {
|
|
107
|
+
case "eds-matomo-notice":
|
|
108
|
+
if (!customElements.get(tagName)) {
|
|
109
|
+
customElements.define(tagName, EdsMatomoNotice);
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
case "eds-accordion":
|
|
113
|
+
if (!customElements.get(tagName)) {
|
|
114
|
+
defineCustomElement$3();
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
case "eds-button":
|
|
118
|
+
if (!customElements.get(tagName)) {
|
|
119
|
+
defineCustomElement$2();
|
|
120
|
+
}
|
|
121
|
+
break;
|
|
122
|
+
case "eds-icon-wrapper":
|
|
123
|
+
if (!customElements.get(tagName)) {
|
|
124
|
+
defineCustomElement$1();
|
|
125
|
+
}
|
|
126
|
+
break;
|
|
127
|
+
} });
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { EdsMatomoNotice as E, defineCustomElement as d };
|
|
@@ -75,6 +75,18 @@ const EdsModal$1 = /*@__PURE__*/ proxyCustomElement(class EdsModal extends HTMLE
|
|
|
75
75
|
async toggle() {
|
|
76
76
|
this.isOpen = !this.isOpen;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Listens for global custom events to open the modal.
|
|
80
|
+
*/
|
|
81
|
+
handleGlobalOpen() {
|
|
82
|
+
this.open();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Listens for global custom events to close the modal.
|
|
86
|
+
*/
|
|
87
|
+
handleGlobalClose() {
|
|
88
|
+
this.close();
|
|
89
|
+
}
|
|
78
90
|
/**
|
|
79
91
|
* Closes the modal when the Escape key is pressed.
|
|
80
92
|
*/
|
|
@@ -86,9 +98,9 @@ const EdsModal$1 = /*@__PURE__*/ proxyCustomElement(class EdsModal extends HTMLE
|
|
|
86
98
|
render() {
|
|
87
99
|
// Generate a unique id for the title so we can reference it for aria-labelledby.
|
|
88
100
|
const titleId = `modal-title-${this.el.tagName.toLowerCase()}`;
|
|
89
|
-
return (h("div", { key: '
|
|
101
|
+
return (h("div", { key: '980f396b79c32a36005b5f7813cc52b2e97457fa', id: "eds-modal", class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex`, role: "dialog", "aria-modal": "true", "aria-labelledby": titleId }, this.isOpen && (h("div", { key: 'a2e4bb022c17c66266809f1a8dd706523a6ff07b', class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
90
102
|
,
|
|
91
|
-
onClick: () => this.close() })), h("div", { key: '
|
|
103
|
+
onClick: () => this.close() })), h("div", { key: '53c0c2a9559a6a5116f88caa2a7d92810560521e', class: `container max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center` }, h("div", { key: '576b58f6bd78a969436c6a892f4dfec84a486cc4', class: "flex justify-between items-center border-b-2 border-softer pb-8" }, h("span", { key: '63e682d4297a346426dc7559cf0d80e21cc51f4c', id: titleId, class: `f-heading-04 text-lighter ${this.getTruncateClass()}` }, this.title), h("eds-button", { key: 'eed35b30903d65694f2944431e7f387a8ef3f3e9', intent: "tertiary", icon: "close", "aria-label": "Close modal", onClick: () => this.close(), "extra-class": "ml-8" })), h("div", { key: '6c6e673640ed2ef2ae6139ae1931a4b0a0db9aa9', class: "pt-8" }, h("slot", { key: 'eaaf2c17470681dc799b74f5eaebbe2496564c0e' })))));
|
|
92
104
|
}
|
|
93
105
|
get el() { return this; }
|
|
94
106
|
static get style() { return EdsModalStyle0; }
|
|
@@ -101,7 +113,7 @@ const EdsModal$1 = /*@__PURE__*/ proxyCustomElement(class EdsModal extends HTMLE
|
|
|
101
113
|
"open": [64],
|
|
102
114
|
"close": [64],
|
|
103
115
|
"toggle": [64]
|
|
104
|
-
}, [[8, "keydown", "handleKeyDown"]]]);
|
|
116
|
+
}, [[0, "eds-modal-open", "handleGlobalOpen"], [0, "eds-modal-close", "handleGlobalClose"], [8, "keydown", "handleKeyDown"]]]);
|
|
105
117
|
function defineCustomElement$1() {
|
|
106
118
|
if (typeof customElements === "undefined") {
|
|
107
119
|
return;
|
|
@@ -162,7 +162,7 @@ const EdsPagination = /*@__PURE__*/ proxyCustomElement(class EdsPagination exten
|
|
|
162
162
|
event.preventDefault(); // Prevent default link navigation
|
|
163
163
|
if (newPage !== this.currentPage) {
|
|
164
164
|
this.links = this.links.map((link) => typeof link === 'object' ? Object.assign(Object.assign({}, link), { current: parseInt(link.label) === newPage }) : link);
|
|
165
|
-
const pageChangeEvent = new CustomEvent('
|
|
165
|
+
const pageChangeEvent = new CustomEvent('page', {
|
|
166
166
|
detail: newPage,
|
|
167
167
|
bubbles: true,
|
|
168
168
|
composed: true
|
|
@@ -172,7 +172,7 @@ const EdsPagination = /*@__PURE__*/ proxyCustomElement(class EdsPagination exten
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
render() {
|
|
175
|
-
return (h("div", { key: '
|
|
175
|
+
return (h("div", { key: 'b33415e05457ccc78ea3744a1baa9affbf38ca4a' }, this.total > 0 && this.mode === 'default' && (h("p", { key: 'e555e94a3fd13cf0d57108bd2cca3fb97cd0c688', class: "f-ui-03 text-lightest mb-28 w-full text-center" }, h("span", { key: 'c63f1d5aa6154a23d714c74dcd9a0a75b68df579', 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'
|
|
176
176
|
? this.prevUrl || '#' // Use prevUrl if provided, otherwise disable with '#'
|
|
177
177
|
: this.isFirstPage()
|
|
178
178
|
? '#'
|
|
@@ -19,7 +19,7 @@ const EdsProgressBar = /*@__PURE__*/ proxyCustomElement(class EdsProgressBar ext
|
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
const progressValue = this.value;
|
|
22
|
-
return (h("div", { key: '
|
|
22
|
+
return (h("div", { key: '9a7fa42058034305b22818d464e7b633d7831d67', role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": progressValue, "aria-valuetext": `${progressValue}%`, class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden" }, h("div", { key: '90b0ac9a538b575a30163c0dbbf437e1cfe8ce39', class: `inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02`, style: { width: `${progressValue}%` } }, progressValue, "%")));
|
|
23
23
|
}
|
|
24
24
|
static get style() { return EdsProgressBarStyle0; }
|
|
25
25
|
}, [1, "eds-progress-bar", {
|