@ebrains/components 0.4.0-alpha.0 → 0.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/analytics-223ea8e5.js +51 -0
- package/dist/cjs/color-c00146a8.js +134 -0
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +84 -0
- package/dist/cjs/eds-alert_17.cjs.entry.js +1392 -0
- package/dist/cjs/eds-avatar_4.cjs.entry.js +187 -0
- package/dist/cjs/eds-card-generic.cjs.entry.js +104 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +4 -3
- package/dist/cjs/eds-card-section.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +3 -4
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +2 -2
- package/dist/cjs/eds-components-section.cjs.entry.js +7 -3
- package/dist/cjs/eds-docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/eds-docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/eds-dropdown_2.cjs.entry.js +158 -0
- package/dist/cjs/eds-form.cjs.entry.js +361 -0
- package/dist/cjs/eds-frame.cjs.entry.js +91 -0
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-close.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-copy.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-loader.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-more.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-search.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-success.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-user.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-input_7.cjs.entry.js +324 -0
- package/dist/cjs/eds-login.cjs.entry.js +60 -41
- package/dist/cjs/eds-logo-variations.cjs.entry.js +1 -1
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +2 -3
- package/dist/cjs/eds-modal.cjs.entry.js +97 -0
- package/dist/cjs/eds-navigator.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +9 -10
- package/dist/cjs/eds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-svg-repository.cjs.entry.js +1 -1
- package/dist/cjs/eds-tab.cjs.entry.js +1 -1
- package/dist/cjs/eds-tabs-content.cjs.entry.js +4 -4
- package/dist/cjs/eds-tabs.cjs.entry.js +3 -3
- package/dist/cjs/eds-timeline.cjs.entry.js +1 -1
- package/dist/cjs/eds-tooltip.cjs.entry.js +3 -4
- package/dist/cjs/eds-trl.cjs.entry.js +1 -1
- package/dist/cjs/eds-user.cjs.entry.js +99 -0
- package/dist/cjs/eds-vertical-stepper.cjs.entry.js +45 -0
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-f08e4f5c.js +42 -6
- package/dist/cjs/{keycloak-5aaa21af.js → keycloak-93fc0315.js} +225 -170
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +1 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +2 -2
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +1 -1
- package/dist/cjs/token-list_3.cjs.entry.js +3 -3
- package/dist/cjs/token-ratios.cjs.entry.js +1 -1
- package/dist/cjs/token-spacing.cjs.entry.js +1 -1
- package/dist/cjs/token-typography.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +3 -3
- package/dist/collection/components/eds-alert/eds-alert.js +8 -5
- package/dist/collection/components/eds-avatar/eds-avatar.js +8 -6
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +23 -29
- package/dist/collection/components/eds-button/eds-button.js +20 -25
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +2 -2
- package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +3 -2
- package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.js +2 -2
- package/dist/collection/components/eds-code-block/eds-code-block.js +3 -3
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +3 -3
- package/dist/collection/components/eds-form/eds-form.js +32 -16
- package/dist/collection/components/eds-frame/eds-frame.js +1 -1
- 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-success/eds-icon-success.js +1 -1
- 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 +13 -7
- 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 +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +11 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-link/eds-link.js +6 -3
- package/dist/collection/components/eds-logo/eds-logo.js +21 -2
- package/dist/collection/components/eds-modal/eds-modal.js +19 -24
- package/dist/collection/components/eds-navigator/eds-navigator.js +1 -1
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.css +48 -0
- package/dist/collection/components/eds-rating/eds-rating.js +10 -8
- 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-steps/eds-steps.css +71 -0
- package/dist/collection/components/eds-steps/eds-steps.js +132 -0
- package/dist/collection/components/eds-steps/eds-steps.stories.js +35 -0
- package/dist/collection/components/eds-steps/eds-vertical-stepper.css +78 -0
- package/dist/collection/components/eds-steps/eds-vertical-stepper.js +72 -0
- package/dist/collection/components/eds-switch/eds-switch.css +59 -0
- package/dist/collection/components/eds-switch/eds-switch.js +131 -0
- package/dist/collection/components/eds-switch/eds-switch.stories.js +38 -0
- package/dist/collection/components/eds-tab/eds-tab.js +1 -1
- package/dist/collection/components/eds-table/eds-table.js +8 -8
- package/dist/collection/components/eds-tag/eds-tag.js +22 -1
- package/dist/collection/components/eds-timeline/eds-timeline.js +1 -1
- package/dist/collection/components/eds-toast/eds-toast.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +2 -2
- 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-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/functional/installation.js +1 -1
- package/dist/collection/eds-docs-ui/functional/react.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 +10 -4
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +1 -1
- package/dist/collection/shared-ui/eds-header/eds-header.js +2 -75
- package/dist/collection/shared-ui/eds-login/eds-login.js +66 -58
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +1 -1
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +2 -2
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +3 -3
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +27 -24
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +1 -1
- package/dist/collection/utils/analytics.js +85 -0
- package/dist/collection/utils/color.js +129 -0
- package/dist/collection/utils/global.js +8 -0
- package/dist/collection/utils/keycloak.js +11 -5
- package/dist/components/analytics.js +6 -1
- package/dist/components/color.js +0 -164
- package/dist/components/components.css +51 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/eds-accordion2.js +2 -3
- package/dist/components/eds-alert2.js +8 -5
- package/dist/components/eds-avatar2.js +3 -3
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +23 -29
- package/dist/components/eds-button2.js +16 -14
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +1 -2
- package/dist/components/eds-card-project.js +2 -2
- package/dist/components/eds-card-section.js +1 -1
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-tool.js +1 -2
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +2 -2
- package/dist/components/eds-components-section.js +7 -3
- package/dist/components/eds-docs-palettes.js +1 -1
- package/dist/components/eds-docs-tokens.js +1 -1
- package/dist/components/eds-dropdown2.js +2 -3
- package/dist/components/eds-footer2.js +1 -1
- package/dist/components/eds-form.js +32 -16
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-header.js +10 -48
- 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-icon-success.js +1 -1
- 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 +9 -4
- 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 +1 -1
- package/dist/components/eds-input-select2.js +11 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +5 -3
- package/dist/components/eds-login.js +60 -41
- package/dist/components/eds-logo-variations.js +1 -1
- package/dist/components/eds-logo2.js +4 -3
- package/dist/components/eds-matomo-notice.js +0 -1
- package/dist/components/eds-modal.js +10 -24
- package/dist/components/eds-navigator.js +1 -1
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating.js +23 -9
- 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-steps.d.ts +11 -0
- package/dist/components/eds-steps.js +106 -0
- package/dist/components/eds-svg-repository.js +1 -1
- package/dist/components/eds-switch.d.ts +11 -0
- package/dist/components/eds-switch.js +57 -0
- package/dist/components/eds-tab2.js +1 -1
- package/dist/components/eds-table2.js +6 -7
- package/dist/components/eds-tabs-content.js +2 -3
- package/dist/components/eds-tabs.js +1 -2
- package/dist/components/eds-tag2.js +5 -1
- package/dist/components/eds-timeline.js +1 -1
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-toast2.js +1 -1
- package/dist/components/eds-tooltip.js +1 -2
- package/dist/components/eds-trl.js +1 -1
- package/dist/components/eds-user-modal2.js +1 -1
- package/dist/components/eds-user.js +157 -1
- package/dist/components/eds-vertical-stepper.d.ts +11 -0
- package/dist/components/eds-vertical-stepper.js +86 -0
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/keycloak.js +225 -170
- 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-030f67c1.entry.js +1 -0
- package/dist/components/p-06299762.entry.js +1 -0
- package/dist/components/p-0ab85eee.entry.js +1 -0
- package/dist/components/{p-b04eff31.entry.js → p-0bafc5ae.entry.js} +1 -1
- package/dist/components/p-0e0e1815.entry.js +1 -0
- package/dist/components/p-0e7bdd2c.entry.js +1 -0
- package/dist/components/p-1ed3fdb7.entry.js +1 -0
- package/dist/components/p-209fa119.entry.js +1 -0
- package/dist/components/p-2831a9d5.entry.js +1 -0
- package/dist/components/p-2c00bd76.entry.js +1 -0
- package/dist/components/p-38d70586.entry.js +1 -0
- package/dist/components/p-3babd772.entry.js +1 -0
- package/dist/components/p-4a12a131.entry.js +1 -0
- package/dist/components/p-505ddcda.entry.js +1 -0
- package/dist/components/{p-8ddc67a1.entry.js → p-59405ecf.entry.js} +1 -1
- package/dist/components/p-5980a142.entry.js +1 -0
- package/dist/components/p-599c7b97.entry.js +1 -0
- package/dist/components/{p-22762818.entry.js → p-65703520.entry.js} +1 -1
- package/dist/components/p-6af40c33.entry.js +1 -0
- package/dist/components/p-6df9db15.entry.js +1 -0
- package/dist/components/p-72b42d77.entry.js +1 -0
- package/dist/components/p-75795b05.entry.js +1 -0
- package/dist/components/{p-435a14c1.entry.js → p-759b2640.entry.js} +1 -1
- package/dist/components/p-80a185ba.entry.js +1 -0
- package/dist/components/p-81942665.entry.js +1 -0
- package/dist/components/p-86fbc239.entry.js +1 -0
- package/dist/components/p-89227919.js +1 -0
- package/dist/components/{p-c3b294a0.entry.js → p-89f600a3.entry.js} +1 -1
- package/dist/components/{p-ba6bafef.entry.js → p-8b583210.entry.js} +1 -1
- package/dist/components/p-8c4a0fc9.entry.js +1 -0
- package/dist/components/p-8d19a05b.entry.js +1 -0
- package/dist/components/p-8eab748d.js +1 -0
- package/dist/components/p-911d9b37.entry.js +1 -0
- package/dist/components/p-92e16cc9.entry.js +1 -0
- package/dist/components/p-96fe2267.entry.js +1 -0
- package/dist/components/p-9739def5.entry.js +1 -0
- package/dist/components/p-9826acae.entry.js +1 -0
- package/dist/components/{p-87830085.entry.js → p-9b441a1f.entry.js} +1 -1
- package/dist/components/{p-c72c8fb0.entry.js → p-a2621d66.entry.js} +1 -1
- package/dist/components/p-a535838c.entry.js +1 -0
- package/dist/components/p-a5b7d72d.entry.js +1 -0
- package/dist/components/p-a5d00633.entry.js +1 -0
- package/dist/components/p-a63bd0c9.entry.js +1 -0
- package/dist/components/{p-762c8c83.entry.js → p-a846dbca.entry.js} +1 -1
- package/dist/components/p-a927a455.entry.js +1 -0
- package/dist/components/p-aec9b8e1.entry.js +1 -0
- package/dist/components/{p-5398d652.entry.js → p-b1af5000.entry.js} +1 -1
- package/dist/components/{p-d571d530.entry.js → p-b1de9a6c.entry.js} +1 -1
- package/dist/components/{p-0910d733.entry.js → p-b3c1aef5.entry.js} +1 -1
- package/dist/components/p-b60ed774.entry.js +1 -0
- package/dist/components/p-b67aafe7.entry.js +1 -0
- package/dist/components/p-b79999d5.entry.js +1 -0
- package/dist/components/p-b80457ed.entry.js +1 -0
- package/dist/components/p-b860b4aa.entry.js +1 -0
- package/dist/components/p-c034c395.entry.js +1 -0
- package/dist/components/p-c5fa170d.entry.js +1 -0
- package/dist/components/p-d69ef196.entry.js +1 -0
- package/dist/components/p-de12396f.entry.js +1 -0
- package/dist/components/p-de2fbcfc.entry.js +1 -0
- package/dist/components/p-def72462.entry.js +1 -0
- package/dist/components/p-e2c250c5.entry.js +1 -0
- package/dist/components/p-eb0b93d5.js +1 -0
- package/dist/components/p-eeeb0d83.entry.js +1 -0
- package/dist/components/p-f08eac56.entry.js +1 -0
- package/dist/components/p-f1cd83da.entry.js +1 -0
- package/dist/components/{p-22e6d7d5.entry.js → p-f36f2aeb.entry.js} +1 -1
- package/dist/components/p-f5dafbc8.entry.js +1 -0
- package/dist/components/p-f7493f41.entry.js +1 -0
- package/dist/components/{p-dd6daa96.entry.js → p-fce25541.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/support.js +1 -1
- package/dist/components/support2.js +3 -3
- 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 +48 -0
- package/dist/esm/color-2554aad6.js +132 -0
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/eds-accordion.entry.js +80 -0
- package/dist/esm/eds-alert_17.entry.js +1372 -0
- package/dist/esm/eds-avatar_4.entry.js +180 -0
- package/dist/esm/eds-card-generic.entry.js +100 -0
- package/dist/esm/eds-card-project.entry.js +3 -2
- package/dist/esm/eds-card-section.entry.js +1 -1
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +2 -3
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +2 -2
- package/dist/esm/eds-components-section.entry.js +7 -3
- package/dist/esm/eds-docs-palettes.entry.js +1 -1
- package/dist/esm/eds-docs-tokens.entry.js +1 -1
- package/dist/esm/eds-dropdown_2.entry.js +153 -0
- package/dist/esm/eds-form.entry.js +357 -0
- package/dist/esm/eds-frame.entry.js +87 -0
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +1 -1
- package/dist/esm/eds-icon-arrow-right.entry.js +1 -1
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-down.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-left.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-right.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-up.entry.js +1 -1
- package/dist/esm/eds-icon-close.entry.js +1 -1
- package/dist/esm/eds-icon-copy.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-facebook.entry.js +1 -1
- package/dist/esm/eds-icon-gitlab.entry.js +1 -1
- package/dist/esm/eds-icon-linkedin.entry.js +1 -1
- package/dist/esm/eds-icon-loader.entry.js +1 -1
- package/dist/esm/eds-icon-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-menu.entry.js +1 -1
- package/dist/esm/eds-icon-more.entry.js +1 -1
- package/dist/esm/eds-icon-search.entry.js +1 -1
- package/dist/esm/eds-icon-success.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-user.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-input_7.entry.js +314 -0
- package/dist/esm/eds-login.entry.js +60 -41
- package/dist/esm/eds-logo-variations.entry.js +1 -1
- package/dist/esm/eds-matomo-notice.entry.js +1 -2
- package/dist/esm/eds-modal.entry.js +93 -0
- package/dist/esm/eds-navigator.entry.js +1 -1
- package/dist/esm/eds-pagination_2.entry.js +8 -9
- package/dist/esm/eds-progress-bar.entry.js +1 -1
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-svg-repository.entry.js +1 -1
- package/dist/esm/eds-tab.entry.js +1 -1
- package/dist/esm/eds-tabs-content.entry.js +3 -3
- package/dist/esm/eds-tabs.entry.js +2 -2
- package/dist/esm/eds-timeline.entry.js +1 -1
- package/dist/esm/eds-tooltip.entry.js +2 -3
- package/dist/esm/eds-trl.entry.js +1 -1
- package/dist/esm/eds-user.entry.js +95 -0
- package/dist/esm/eds-vertical-stepper.entry.js +41 -0
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/index-e96badea.js +42 -6
- package/dist/esm/{keycloak-13893af6.js → keycloak-d502ec16.js} +225 -170
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +1 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +2 -2
- package/dist/esm/logo-wrong-usage.entry.js +1 -1
- package/dist/esm/token-list_3.entry.js +3 -3
- package/dist/esm/token-ratios.entry.js +1 -1
- package/dist/esm/token-spacing.entry.js +1 -1
- package/dist/esm/token-typography.entry.js +1 -1
- package/dist/hydrate/index.js +900 -804
- package/dist/hydrate/index.mjs +900 -804
- package/dist/types/components/eds-alert/eds-alert.d.ts +1 -1
- package/dist/types/components/eds-breadcrump/eds-breadcrump.d.ts +9 -8
- package/dist/types/components/eds-button/eds-button.d.ts +2 -3
- package/dist/types/components/eds-form/eds-form.d.ts +0 -1
- package/dist/types/components/eds-img/eds-img.d.ts +3 -1
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +6 -0
- package/dist/types/components/eds-logo/eds-logo.d.ts +1 -0
- package/dist/types/components/eds-modal/eds-modal.d.ts +2 -7
- package/dist/types/components/eds-rating/eds-rating.d.ts +1 -2
- package/dist/types/components/eds-steps/eds-steps.d.ts +39 -0
- package/dist/types/components/eds-steps/eds-steps.stories.d.ts +34 -0
- package/dist/types/components/eds-steps/eds-vertical-stepper.d.ts +22 -0
- package/dist/types/components/eds-switch/eds-switch.d.ts +25 -0
- package/dist/types/components/eds-switch/eds-switch.stories.d.ts +32 -0
- package/dist/types/components/eds-tag/eds-tag.d.ts +5 -0
- package/dist/types/components.d.ts +163 -82
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +28 -1
- package/dist/types/shared-ui/eds-header/eds-header.d.ts +0 -20
- package/dist/types/shared-ui/eds-login/eds-login.d.ts +21 -18
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +5 -5
- package/dist/types/utils/global.d.ts +1 -0
- package/dist/types/utils/keycloak.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/color-88793e49.js +0 -342
- package/dist/cjs/eds-accordion_33.cjs.entry.js +0 -2670
- package/dist/cjs/eds-rating.cjs.entry.js +0 -56
- package/dist/components/eds-user2.js +0 -156
- package/dist/components/p-005de86f.entry.js +0 -1
- package/dist/components/p-0c2e844e.entry.js +0 -1
- package/dist/components/p-145f13ad.entry.js +0 -1
- package/dist/components/p-16458a81.entry.js +0 -1
- package/dist/components/p-2851ff44.entry.js +0 -1
- package/dist/components/p-29648b47.entry.js +0 -1
- package/dist/components/p-297b2bc3.entry.js +0 -1
- package/dist/components/p-2dda1ec4.entry.js +0 -1
- package/dist/components/p-32cddd94.entry.js +0 -1
- package/dist/components/p-35ec730b.entry.js +0 -1
- package/dist/components/p-388b4966.entry.js +0 -1
- package/dist/components/p-4037ad48.entry.js +0 -1
- package/dist/components/p-490ba155.entry.js +0 -1
- package/dist/components/p-4932aab2.entry.js +0 -1
- package/dist/components/p-4a24c2ce.entry.js +0 -1
- package/dist/components/p-57c964c5.entry.js +0 -1
- package/dist/components/p-5a43503a.entry.js +0 -1
- package/dist/components/p-5aad9d3f.entry.js +0 -1
- package/dist/components/p-5fc68438.entry.js +0 -1
- package/dist/components/p-610db2b2.entry.js +0 -1
- package/dist/components/p-6378fb3e.entry.js +0 -1
- package/dist/components/p-673dce11.entry.js +0 -1
- package/dist/components/p-7802e966.entry.js +0 -1
- package/dist/components/p-832dc95a.entry.js +0 -1
- package/dist/components/p-846fc91c.entry.js +0 -1
- package/dist/components/p-855aa1a3.entry.js +0 -1
- package/dist/components/p-8c56e39a.entry.js +0 -1
- package/dist/components/p-a44a1abe.entry.js +0 -1
- package/dist/components/p-a4e9b68b.entry.js +0 -1
- package/dist/components/p-ab32b3fc.entry.js +0 -1
- package/dist/components/p-ac0112d5.entry.js +0 -1
- package/dist/components/p-acb16e1c.entry.js +0 -1
- package/dist/components/p-ae5dbd41.entry.js +0 -1
- package/dist/components/p-b86a4985.js +0 -1
- package/dist/components/p-bdd86a3c.entry.js +0 -1
- package/dist/components/p-bf0f851d.entry.js +0 -1
- package/dist/components/p-c2d369bc.entry.js +0 -1
- package/dist/components/p-c6038449.entry.js +0 -1
- package/dist/components/p-c9c417de.js +0 -1
- package/dist/components/p-d1670eec.entry.js +0 -1
- package/dist/components/p-d53b7a75.entry.js +0 -1
- package/dist/components/p-d6d86366.entry.js +0 -1
- package/dist/components/p-df94285c.entry.js +0 -1
- package/dist/components/p-e74834bc.entry.js +0 -1
- package/dist/components/p-f7a6ce69.entry.js +0 -1
- package/dist/esm/color-bb472c37.js +0 -338
- package/dist/esm/eds-accordion_33.entry.js +0 -2634
- package/dist/esm/eds-rating.entry.js +0 -52
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/index.d.ts +0 -3
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/keycloak.d.ts +0 -30
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/render.d.ts +0 -8
- /package/dist/types/{Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib → utils}/analytics.d.ts +0 -0
- /package/dist/types/{Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib → utils}/color.d.ts +0 -0
|
@@ -60,7 +60,7 @@ function Keycloak (config) {
|
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
kc.init = function (initOptions) {
|
|
63
|
+
kc.init = function (initOptions = {}) {
|
|
64
64
|
if (kc.didInitialize) {
|
|
65
65
|
throw new Error("A 'Keycloak' instance can only be initialized once.");
|
|
66
66
|
}
|
|
@@ -72,9 +72,9 @@ function Keycloak (config) {
|
|
|
72
72
|
callbackStorage = createCallbackStorage();
|
|
73
73
|
var adapters = ['default', 'cordova', 'cordova-native'];
|
|
74
74
|
|
|
75
|
-
if (
|
|
75
|
+
if (adapters.indexOf(initOptions.adapter) > -1) {
|
|
76
76
|
adapter = loadAdapter(initOptions.adapter);
|
|
77
|
-
} else if (
|
|
77
|
+
} else if (typeof initOptions.adapter === "object") {
|
|
78
78
|
adapter = initOptions.adapter;
|
|
79
79
|
} else {
|
|
80
80
|
if (window.Cordova || window.cordova) {
|
|
@@ -84,101 +84,99 @@ function Keycloak (config) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
if (initOptions) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (typeof initOptions.checkLoginIframe !== 'undefined') {
|
|
93
|
-
loginIframe.enable = initOptions.checkLoginIframe;
|
|
94
|
-
}
|
|
87
|
+
if (typeof initOptions.useNonce !== 'undefined') {
|
|
88
|
+
useNonce = initOptions.useNonce;
|
|
89
|
+
}
|
|
95
90
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
if (typeof initOptions.checkLoginIframe !== 'undefined') {
|
|
92
|
+
loginIframe.enable = initOptions.checkLoginIframe;
|
|
93
|
+
}
|
|
99
94
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
if (initOptions.checkLoginIframeInterval) {
|
|
96
|
+
loginIframe.interval = initOptions.checkLoginIframeInterval;
|
|
97
|
+
}
|
|
103
98
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else {
|
|
108
|
-
throw 'Invalid value for responseMode';
|
|
109
|
-
}
|
|
110
|
-
}
|
|
99
|
+
if (initOptions.onLoad === 'login-required') {
|
|
100
|
+
kc.loginRequired = true;
|
|
101
|
+
}
|
|
111
102
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
case 'implicit':
|
|
118
|
-
kc.responseType = 'id_token token';
|
|
119
|
-
break;
|
|
120
|
-
case 'hybrid':
|
|
121
|
-
kc.responseType = 'code id_token token';
|
|
122
|
-
break;
|
|
123
|
-
default:
|
|
124
|
-
throw 'Invalid value for flow';
|
|
125
|
-
}
|
|
126
|
-
kc.flow = initOptions.flow;
|
|
103
|
+
if (initOptions.responseMode) {
|
|
104
|
+
if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {
|
|
105
|
+
kc.responseMode = initOptions.responseMode;
|
|
106
|
+
} else {
|
|
107
|
+
throw 'Invalid value for responseMode';
|
|
127
108
|
}
|
|
109
|
+
}
|
|
128
110
|
|
|
129
|
-
|
|
130
|
-
|
|
111
|
+
if (initOptions.flow) {
|
|
112
|
+
switch (initOptions.flow) {
|
|
113
|
+
case 'standard':
|
|
114
|
+
kc.responseType = 'code';
|
|
115
|
+
break;
|
|
116
|
+
case 'implicit':
|
|
117
|
+
kc.responseType = 'id_token token';
|
|
118
|
+
break;
|
|
119
|
+
case 'hybrid':
|
|
120
|
+
kc.responseType = 'code id_token token';
|
|
121
|
+
break;
|
|
122
|
+
default:
|
|
123
|
+
throw 'Invalid value for flow';
|
|
131
124
|
}
|
|
125
|
+
kc.flow = initOptions.flow;
|
|
126
|
+
}
|
|
132
127
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
if (initOptions.timeSkew != null) {
|
|
129
|
+
kc.timeSkew = initOptions.timeSkew;
|
|
130
|
+
}
|
|
136
131
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
if(initOptions.redirectUri) {
|
|
133
|
+
kc.redirectUri = initOptions.redirectUri;
|
|
134
|
+
}
|
|
140
135
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
kc.silentCheckSsoFallback = true;
|
|
145
|
-
}
|
|
136
|
+
if (initOptions.silentCheckSsoRedirectUri) {
|
|
137
|
+
kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;
|
|
138
|
+
}
|
|
146
139
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
140
|
+
if (typeof initOptions.silentCheckSsoFallback === 'boolean') {
|
|
141
|
+
kc.silentCheckSsoFallback = initOptions.silentCheckSsoFallback;
|
|
142
|
+
} else {
|
|
143
|
+
kc.silentCheckSsoFallback = true;
|
|
144
|
+
}
|
|
151
145
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
if (typeof initOptions.pkceMethod !== "undefined") {
|
|
147
|
+
if (initOptions.pkceMethod !== "S256" && initOptions.pkceMethod !== false) {
|
|
148
|
+
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${initOptions.pkceMethod}.`);
|
|
155
149
|
}
|
|
156
150
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
151
|
+
kc.pkceMethod = initOptions.pkceMethod;
|
|
152
|
+
} else {
|
|
153
|
+
kc.pkceMethod = "S256";
|
|
154
|
+
}
|
|
162
155
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
156
|
+
if (typeof initOptions.enableLogging === 'boolean') {
|
|
157
|
+
kc.enableLogging = initOptions.enableLogging;
|
|
158
|
+
} else {
|
|
159
|
+
kc.enableLogging = false;
|
|
160
|
+
}
|
|
168
161
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
162
|
+
if (initOptions.logoutMethod === 'POST') {
|
|
163
|
+
kc.logoutMethod = 'POST';
|
|
164
|
+
} else {
|
|
165
|
+
kc.logoutMethod = 'GET';
|
|
166
|
+
}
|
|
172
167
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
if (typeof initOptions.scope === 'string') {
|
|
169
|
+
kc.scope = initOptions.scope;
|
|
170
|
+
}
|
|
176
171
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
172
|
+
if (typeof initOptions.acrValues === 'string') {
|
|
173
|
+
kc.acrValues = initOptions.acrValues;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (typeof initOptions.messageReceiveTimeout === 'number' && initOptions.messageReceiveTimeout > 0) {
|
|
177
|
+
kc.messageReceiveTimeout = initOptions.messageReceiveTimeout;
|
|
178
|
+
} else {
|
|
179
|
+
kc.messageReceiveTimeout = 10000;
|
|
182
180
|
}
|
|
183
181
|
|
|
184
182
|
if (!kc.responseMode) {
|
|
@@ -207,7 +205,7 @@ function Keycloak (config) {
|
|
|
207
205
|
options.prompt = 'none';
|
|
208
206
|
}
|
|
209
207
|
|
|
210
|
-
if (initOptions
|
|
208
|
+
if (initOptions.locale) {
|
|
211
209
|
options.locale = initOptions.locale;
|
|
212
210
|
}
|
|
213
211
|
kc.login(options).then(function () {
|
|
@@ -281,42 +279,40 @@ function Keycloak (config) {
|
|
|
281
279
|
}).catch(function (error) {
|
|
282
280
|
initPromise.setError(error);
|
|
283
281
|
});
|
|
284
|
-
}
|
|
285
|
-
if (initOptions.token && initOptions.refreshToken) {
|
|
286
|
-
setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);
|
|
282
|
+
}
|
|
287
283
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}).catch(function (error) {
|
|
299
|
-
initPromise.setError(error);
|
|
300
|
-
});
|
|
301
|
-
});
|
|
302
|
-
} else {
|
|
303
|
-
kc.updateToken(-1).then(function() {
|
|
304
|
-
kc.onAuthSuccess && kc.onAuthSuccess();
|
|
305
|
-
initPromise.setSuccess();
|
|
306
|
-
}).catch(function(error) {
|
|
307
|
-
kc.onAuthError && kc.onAuthError();
|
|
308
|
-
if (initOptions.onLoad) {
|
|
309
|
-
onLoad();
|
|
284
|
+
if (initOptions.token && initOptions.refreshToken) {
|
|
285
|
+
setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);
|
|
286
|
+
|
|
287
|
+
if (loginIframe.enable) {
|
|
288
|
+
setupCheckLoginIframe().then(function() {
|
|
289
|
+
checkLoginIframe().then(function (unchanged) {
|
|
290
|
+
if (unchanged) {
|
|
291
|
+
kc.onAuthSuccess && kc.onAuthSuccess();
|
|
292
|
+
initPromise.setSuccess();
|
|
293
|
+
scheduleCheckIframe();
|
|
310
294
|
} else {
|
|
311
|
-
initPromise.
|
|
295
|
+
initPromise.setSuccess();
|
|
312
296
|
}
|
|
297
|
+
}).catch(function (error) {
|
|
298
|
+
initPromise.setError(error);
|
|
313
299
|
});
|
|
314
|
-
}
|
|
315
|
-
} else if (initOptions.onLoad) {
|
|
316
|
-
onLoad();
|
|
300
|
+
});
|
|
317
301
|
} else {
|
|
318
|
-
|
|
302
|
+
kc.updateToken(-1).then(function() {
|
|
303
|
+
kc.onAuthSuccess && kc.onAuthSuccess();
|
|
304
|
+
initPromise.setSuccess();
|
|
305
|
+
}).catch(function(error) {
|
|
306
|
+
kc.onAuthError && kc.onAuthError();
|
|
307
|
+
if (initOptions.onLoad) {
|
|
308
|
+
onLoad();
|
|
309
|
+
} else {
|
|
310
|
+
initPromise.setError(error);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
319
313
|
}
|
|
314
|
+
} else if (initOptions.onLoad) {
|
|
315
|
+
onLoad();
|
|
320
316
|
} else {
|
|
321
317
|
initPromise.setSuccess();
|
|
322
318
|
}
|
|
@@ -677,7 +673,7 @@ function Keycloak (config) {
|
|
|
677
673
|
|
|
678
674
|
kc.onAuthRefreshError && kc.onAuthRefreshError();
|
|
679
675
|
for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {
|
|
680
|
-
p.setError(
|
|
676
|
+
p.setError("Failed to refresh token: An unexpected HTTP error occurred while attempting to refresh the token.");
|
|
681
677
|
}
|
|
682
678
|
}
|
|
683
679
|
}
|
|
@@ -1245,7 +1241,7 @@ function Keycloak (config) {
|
|
|
1245
1241
|
function check3pCookiesSupported() {
|
|
1246
1242
|
var promise = createPromise();
|
|
1247
1243
|
|
|
1248
|
-
if (loginIframe.enable || kc.silentCheckSsoRedirectUri) {
|
|
1244
|
+
if ((loginIframe.enable || kc.silentCheckSsoRedirectUri) && typeof kc.endpoints.thirdPartyCookiesIframe === 'function') {
|
|
1249
1245
|
var iframe = document.createElement('iframe');
|
|
1250
1246
|
iframe.setAttribute('src', kc.endpoints.thirdPartyCookiesIframe());
|
|
1251
1247
|
iframe.setAttribute('sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin');
|
|
@@ -1265,7 +1261,7 @@ function Keycloak (config) {
|
|
|
1265
1261
|
"[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n" +
|
|
1266
1262
|
" - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n" +
|
|
1267
1263
|
" - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\n" +
|
|
1268
|
-
"For more information see: https://www.keycloak.org/
|
|
1264
|
+
"For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers"
|
|
1269
1265
|
);
|
|
1270
1266
|
|
|
1271
1267
|
loginIframe.enable = false;
|
|
@@ -1303,34 +1299,37 @@ function Keycloak (config) {
|
|
|
1303
1299
|
return;
|
|
1304
1300
|
}
|
|
1305
1301
|
|
|
1306
|
-
|
|
1307
|
-
const
|
|
1308
|
-
method: "POST",
|
|
1309
|
-
headers: {
|
|
1310
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1311
|
-
},
|
|
1312
|
-
body: new URLSearchParams({
|
|
1313
|
-
id_token_hint: kc.idToken,
|
|
1314
|
-
client_id: kc.clientId,
|
|
1315
|
-
post_logout_redirect_uri: adapter.redirectUri(options, false)
|
|
1316
|
-
})
|
|
1317
|
-
});
|
|
1302
|
+
// Create form to send POST request.
|
|
1303
|
+
const form = document.createElement("form");
|
|
1318
1304
|
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
}
|
|
1305
|
+
form.setAttribute("method", "POST");
|
|
1306
|
+
form.setAttribute("action", kc.createLogoutUrl(options));
|
|
1307
|
+
form.style.display = "none";
|
|
1323
1308
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1309
|
+
// Add data to form as hidden input fields.
|
|
1310
|
+
const data = {
|
|
1311
|
+
id_token_hint: kc.idToken,
|
|
1312
|
+
client_id: kc.clientId,
|
|
1313
|
+
post_logout_redirect_uri: adapter.redirectUri(options, false)
|
|
1314
|
+
};
|
|
1315
|
+
|
|
1316
|
+
for (const [name, value] of Object.entries(data)) {
|
|
1317
|
+
const input = document.createElement("input");
|
|
1318
|
+
|
|
1319
|
+
input.setAttribute("type", "hidden");
|
|
1320
|
+
input.setAttribute("name", name);
|
|
1321
|
+
input.setAttribute("value", value);
|
|
1322
|
+
|
|
1323
|
+
form.appendChild(input);
|
|
1327
1324
|
}
|
|
1328
1325
|
|
|
1329
|
-
|
|
1326
|
+
// Append form to page and submit it to perform logout and redirect.
|
|
1327
|
+
document.body.appendChild(form);
|
|
1328
|
+
form.submit();
|
|
1330
1329
|
},
|
|
1331
1330
|
|
|
1332
|
-
register: function(options) {
|
|
1333
|
-
window.location.assign(kc.createRegisterUrl(options));
|
|
1331
|
+
register: async function(options) {
|
|
1332
|
+
window.location.assign(await kc.createRegisterUrl(options));
|
|
1334
1333
|
return createPromise().promise;
|
|
1335
1334
|
},
|
|
1336
1335
|
|
|
@@ -1483,9 +1482,9 @@ function Keycloak (config) {
|
|
|
1483
1482
|
return promise.promise;
|
|
1484
1483
|
},
|
|
1485
1484
|
|
|
1486
|
-
register : function(options) {
|
|
1485
|
+
register : async function(options) {
|
|
1487
1486
|
var promise = createPromise();
|
|
1488
|
-
var registerUrl = kc.createRegisterUrl();
|
|
1487
|
+
var registerUrl = await kc.createRegisterUrl();
|
|
1489
1488
|
var cordovaOptions = createCordovaOptions(options);
|
|
1490
1489
|
var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);
|
|
1491
1490
|
ref.addEventListener('loadstart', function(event) {
|
|
@@ -1552,9 +1551,9 @@ function Keycloak (config) {
|
|
|
1552
1551
|
return promise.promise;
|
|
1553
1552
|
},
|
|
1554
1553
|
|
|
1555
|
-
register : function(options) {
|
|
1554
|
+
register : async function(options) {
|
|
1556
1555
|
var promise = createPromise();
|
|
1557
|
-
var registerUrl = kc.createRegisterUrl(options);
|
|
1556
|
+
var registerUrl = await kc.createRegisterUrl(options);
|
|
1558
1557
|
universalLinks.subscribe('keycloak' , function(event) {
|
|
1559
1558
|
universalLinks.unsubscribe('keycloak');
|
|
1560
1559
|
window.cordova.plugins.browsertab.close();
|
|
@@ -1590,6 +1589,8 @@ function Keycloak (config) {
|
|
|
1590
1589
|
throw 'invalid adapter type: ' + type;
|
|
1591
1590
|
}
|
|
1592
1591
|
|
|
1592
|
+
const STORAGE_KEY_PREFIX = 'kc-callback-';
|
|
1593
|
+
|
|
1593
1594
|
var LocalStorage = function() {
|
|
1594
1595
|
if (!(this instanceof LocalStorage)) {
|
|
1595
1596
|
return new LocalStorage();
|
|
@@ -1600,48 +1601,96 @@ function Keycloak (config) {
|
|
|
1600
1601
|
|
|
1601
1602
|
var cs = this;
|
|
1602
1603
|
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
localStorage.removeItem(key);
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1604
|
+
/**
|
|
1605
|
+
* Clears all values from local storage that are no longer valid.
|
|
1606
|
+
*/
|
|
1607
|
+
function clearInvalidValues() {
|
|
1608
|
+
const currentTime = Date.now();
|
|
1609
|
+
|
|
1610
|
+
for (const [key, value] of getStoredEntries()) {
|
|
1611
|
+
// Attempt to parse the expiry time from the value.
|
|
1612
|
+
const expiry = parseExpiry(value);
|
|
1613
|
+
|
|
1614
|
+
// Discard the value if it is malformed or expired.
|
|
1615
|
+
if (expiry === null || expiry < currentTime) {
|
|
1616
|
+
localStorage.removeItem(key);
|
|
1619
1617
|
}
|
|
1620
1618
|
}
|
|
1621
1619
|
}
|
|
1622
1620
|
|
|
1621
|
+
/**
|
|
1622
|
+
* Clears all known values from local storage.
|
|
1623
|
+
*/
|
|
1624
|
+
function clearAllValues() {
|
|
1625
|
+
for (const [key] of getStoredEntries()) {
|
|
1626
|
+
localStorage.removeItem(key);
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* Gets all entries stored in local storage that are known to be managed by this class.
|
|
1632
|
+
* @returns {Array<[string, unknown]>} An array of key-value pairs.
|
|
1633
|
+
*/
|
|
1634
|
+
function getStoredEntries() {
|
|
1635
|
+
return Object.entries(localStorage).filter(([key]) => key.startsWith(STORAGE_KEY_PREFIX));
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Parses the expiry time from a value stored in local storage.
|
|
1640
|
+
* @param {unknown} value
|
|
1641
|
+
* @returns {number | null} The expiry time in milliseconds, or `null` if the value is malformed.
|
|
1642
|
+
*/
|
|
1643
|
+
function parseExpiry(value) {
|
|
1644
|
+
let parsedValue;
|
|
1645
|
+
|
|
1646
|
+
// Attempt to parse the value as JSON.
|
|
1647
|
+
try {
|
|
1648
|
+
parsedValue = JSON.parse(value);
|
|
1649
|
+
} catch (error) {
|
|
1650
|
+
return null;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
// Attempt to extract the 'expires' property.
|
|
1654
|
+
if (isObject(parsedValue) && 'expires' in parsedValue && typeof parsedValue.expires === 'number') {
|
|
1655
|
+
return parsedValue.expires;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
return null;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1623
1661
|
cs.get = function(state) {
|
|
1624
1662
|
if (!state) {
|
|
1625
1663
|
return;
|
|
1626
1664
|
}
|
|
1627
1665
|
|
|
1628
|
-
var key =
|
|
1666
|
+
var key = STORAGE_KEY_PREFIX + state;
|
|
1629
1667
|
var value = localStorage.getItem(key);
|
|
1630
1668
|
if (value) {
|
|
1631
1669
|
localStorage.removeItem(key);
|
|
1632
1670
|
value = JSON.parse(value);
|
|
1633
1671
|
}
|
|
1634
1672
|
|
|
1635
|
-
|
|
1673
|
+
clearInvalidValues();
|
|
1636
1674
|
return value;
|
|
1637
1675
|
};
|
|
1638
1676
|
|
|
1639
1677
|
cs.add = function(state) {
|
|
1640
|
-
|
|
1678
|
+
clearInvalidValues();
|
|
1641
1679
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1680
|
+
const key = STORAGE_KEY_PREFIX + state.state;
|
|
1681
|
+
const value = JSON.stringify({
|
|
1682
|
+
...state,
|
|
1683
|
+
// Set the expiry time to 1 hour from now.
|
|
1684
|
+
expires: Date.now() + (60 * 60 * 1000)
|
|
1685
|
+
});
|
|
1686
|
+
|
|
1687
|
+
try {
|
|
1688
|
+
localStorage.setItem(key, value);
|
|
1689
|
+
} catch (error) {
|
|
1690
|
+
// If the storage is full, clear all known values and try again.
|
|
1691
|
+
clearAllValues();
|
|
1692
|
+
localStorage.setItem(key, value);
|
|
1693
|
+
}
|
|
1645
1694
|
};
|
|
1646
1695
|
};
|
|
1647
1696
|
|
|
@@ -1657,15 +1706,15 @@ function Keycloak (config) {
|
|
|
1657
1706
|
return;
|
|
1658
1707
|
}
|
|
1659
1708
|
|
|
1660
|
-
var value = getCookie(
|
|
1661
|
-
setCookie(
|
|
1709
|
+
var value = getCookie(STORAGE_KEY_PREFIX + state);
|
|
1710
|
+
setCookie(STORAGE_KEY_PREFIX + state, '', cookieExpiration(-100));
|
|
1662
1711
|
if (value) {
|
|
1663
1712
|
return JSON.parse(value);
|
|
1664
1713
|
}
|
|
1665
1714
|
};
|
|
1666
1715
|
|
|
1667
1716
|
cs.add = function(state) {
|
|
1668
|
-
setCookie(
|
|
1717
|
+
setCookie(STORAGE_KEY_PREFIX + state.state, JSON.stringify(state), cookieExpiration(60));
|
|
1669
1718
|
};
|
|
1670
1719
|
|
|
1671
1720
|
cs.removeItem = function(key) {
|
|
@@ -1819,8 +1868,15 @@ function isObject(input) {
|
|
|
1819
1868
|
}
|
|
1820
1869
|
|
|
1821
1870
|
let keycloak = null;
|
|
1871
|
+
let keycloakInitPromise = null;
|
|
1822
1872
|
// Initialize Keycloak with an optional silent check
|
|
1823
1873
|
function initKeycloak(config, silentCheck = true) {
|
|
1874
|
+
// If already initializing or initialized, return the cached promise
|
|
1875
|
+
if (keycloakInitPromise) {
|
|
1876
|
+
// eslint-disable-next-line
|
|
1877
|
+
console.log('Keycloak already initialized, returning from cache');
|
|
1878
|
+
return keycloakInitPromise;
|
|
1879
|
+
}
|
|
1824
1880
|
if (!keycloak) {
|
|
1825
1881
|
keycloak = new Keycloak({
|
|
1826
1882
|
url: config.url,
|
|
@@ -1828,7 +1884,7 @@ function initKeycloak(config, silentCheck = true) {
|
|
|
1828
1884
|
clientId: config.clientId
|
|
1829
1885
|
});
|
|
1830
1886
|
}
|
|
1831
|
-
|
|
1887
|
+
keycloakInitPromise = keycloak
|
|
1832
1888
|
.init({
|
|
1833
1889
|
onLoad: silentCheck ? 'check-sso' : 'login-required',
|
|
1834
1890
|
checkLoginIframe: false
|
|
@@ -1840,6 +1896,7 @@ function initKeycloak(config, silentCheck = true) {
|
|
|
1840
1896
|
console.error('Failed to initialize Keycloak:', error);
|
|
1841
1897
|
return false;
|
|
1842
1898
|
});
|
|
1899
|
+
return keycloakInitPromise;
|
|
1843
1900
|
}
|
|
1844
1901
|
function getUser() {
|
|
1845
1902
|
if ((keycloak === null || keycloak === void 0 ? void 0 : keycloak.authenticated) && (keycloak === null || keycloak === void 0 ? void 0 : keycloak.idTokenParsed)) {
|
|
@@ -1862,8 +1919,7 @@ function login() {
|
|
|
1862
1919
|
keycloak.login();
|
|
1863
1920
|
}
|
|
1864
1921
|
else {
|
|
1865
|
-
|
|
1866
|
-
console.error('Keycloak is not initialized.');
|
|
1922
|
+
throw new Error('Keycloak is not initialized.');
|
|
1867
1923
|
}
|
|
1868
1924
|
}
|
|
1869
1925
|
// Log out the user
|
|
@@ -1872,8 +1928,7 @@ function logout() {
|
|
|
1872
1928
|
keycloak.logout();
|
|
1873
1929
|
}
|
|
1874
1930
|
else {
|
|
1875
|
-
|
|
1876
|
-
console.error('Keycloak is not initialized.');
|
|
1931
|
+
throw new Error('Keycloak is not initialized.');
|
|
1877
1932
|
}
|
|
1878
1933
|
}
|
|
1879
1934
|
// Check if the user is authenticated
|