@city-of-helsinki/react-helsinki-headless-cms 3.0.0-rc.1 → 3.0.0-rc.2
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/LICENSE +21 -0
- package/dist/README.md +442 -0
- package/dist/__generated__-mcycL1jB.d.ts +7192 -0
- package/dist/apollo.d.ts +168 -0
- package/dist/apollo.js +194 -0
- package/dist/apollo.js.map +1 -0
- package/dist/archiveSearchPageContent.module-DmpLBZP5.js +4078 -0
- package/dist/archiveSearchPageContent.module-DmpLBZP5.js.map +1 -0
- package/dist/cjs/apollo.js +227 -0
- package/dist/cjs/apollo.js.map +1 -0
- package/dist/cjs/archiveSearchPageContent.module-Hcb4WVMf.js +4143 -0
- package/dist/cjs/archiveSearchPageContent.module-Hcb4WVMf.js.map +1 -0
- package/dist/cjs/defaultConfig-dV2AVA5S.js +19908 -0
- package/dist/cjs/defaultConfig-dV2AVA5S.js.map +1 -0
- package/dist/cjs/index-Eg-NhhyT.js +799 -0
- package/dist/cjs/index-Eg-NhhyT.js.map +1 -0
- package/dist/cjs/index.js +439 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/jest-setup.d.ts +1 -0
- package/dist/cjs/nextjs.js +74 -0
- package/dist/cjs/nextjs.js.map +1 -0
- package/dist/cjs/src/apollo/apollo-custom-template.stories.d.ts +12 -0
- package/dist/cjs/src/apollo/apollo.stories.d.ts +24 -0
- package/dist/cjs/src/apollo/index.d.ts +17 -0
- package/dist/cjs/src/apollo/navigation/Navigation.d.ts +13 -0
- package/dist/cjs/src/apollo/navigation/__tests__/Navigation.test.d.ts +1 -0
- package/dist/cjs/src/apollo/notification/Notification.d.ts +4 -0
- package/dist/cjs/src/apollo/notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/cjs/src/apollo/page/ApolloPageContextProvider.d.ts +5 -0
- package/dist/cjs/src/apollo/page/Page.d.ts +14 -0
- package/dist/cjs/src/apollo/page/apolloPageContext.d.ts +13 -0
- package/dist/cjs/src/apollo/page/useApolloPageContext.d.ts +4 -0
- package/dist/cjs/src/apollo/pageContent/PageContent.d.ts +9 -0
- package/dist/cjs/src/apollo/pageWithTemplateContent/PageWithTemplateContent.d.ts +14 -0
- package/dist/cjs/src/common/components/container/Container.d.ts +13 -0
- package/dist/cjs/src/common/components/grid/Grid.d.ts +16 -0
- package/dist/cjs/src/common/components/grid/Grid.stories.d.ts +8 -0
- package/dist/cjs/src/common/components/htmlToReact/HtmlToReact.d.ts +38 -0
- package/dist/cjs/src/common/components/htmlToReact/HtmlToReact.stories.d.ts +13 -0
- package/dist/cjs/src/common/components/htmlToReact/__tests__/HtmlToReact.tests.d.ts +1 -0
- package/dist/cjs/src/common/components/htmlToReact/replaceComponents/DefaultH2.d.ts +4 -0
- package/dist/cjs/src/common/components/htmlToReact/replaceComponents/DefaultP.d.ts +4 -0
- package/dist/cjs/src/common/components/htmlToReact/replaceComponents/IframeForEmbeddedMedia.d.ts +6 -0
- package/dist/cjs/src/common/components/htmlToReact/replaceComponents/index.d.ts +3 -0
- package/dist/cjs/src/common/components/icons/index.d.ts +5 -0
- package/dist/cjs/src/common/components/list/List.d.ts +13 -0
- package/dist/cjs/src/common/components/list/List.stories.d.ts +13 -0
- package/dist/cjs/src/common/components/tag/Tag.d.ts +26 -0
- package/dist/cjs/src/common/components/tag/Tag.stories.d.ts +80 -0
- package/dist/cjs/src/common/components/tag/__tests__/Tag.test.d.ts +1 -0
- package/dist/cjs/src/common/components/tag/tagThemes.d.ts +3 -0
- package/dist/cjs/src/common/components/text/Text.d.ts +27 -0
- package/dist/cjs/src/common/components/text/Text.stories.d.ts +14 -0
- package/dist/cjs/src/common/constants.d.ts +2 -0
- package/dist/cjs/src/common/eventsService/__generated__.d.ts +1420 -0
- package/dist/cjs/src/common/eventsService/events.d.ts +12 -0
- package/dist/cjs/src/common/eventsService/types.d.ts +2 -0
- package/dist/cjs/src/common/eventsService/utils.d.ts +7 -0
- package/dist/cjs/src/common/headlessService/__generated__.d.ts +20878 -0
- package/dist/cjs/src/common/headlessService/article.d.ts +7 -0
- package/dist/cjs/src/common/headlessService/articles.d.ts +17 -0
- package/dist/cjs/src/common/headlessService/categories.d.ts +13 -0
- package/dist/cjs/src/common/headlessService/category.d.ts +9 -0
- package/dist/cjs/src/common/headlessService/constants.d.ts +7 -0
- package/dist/cjs/src/common/headlessService/landingPage.d.ts +9 -0
- package/dist/cjs/src/common/headlessService/languages.d.ts +8 -0
- package/dist/cjs/src/common/headlessService/makeQueryWithApolloClientFromConfig.d.ts +12 -0
- package/dist/cjs/src/common/headlessService/menu.d.ts +10 -0
- package/dist/cjs/src/common/headlessService/notification.d.ts +7 -0
- package/dist/cjs/src/common/headlessService/page.d.ts +8 -0
- package/dist/cjs/src/common/headlessService/pageByTemplate.d.ts +9 -0
- package/dist/cjs/src/common/headlessService/pages.d.ts +13 -0
- package/dist/cjs/src/common/headlessService/tag.d.ts +9 -0
- package/dist/cjs/src/common/headlessService/tags.d.ts +13 -0
- package/dist/cjs/src/common/headlessService/types.d.ts +17 -0
- package/dist/cjs/src/common/headlessService/utils.d.ts +909 -0
- package/dist/cjs/src/common/utils/customRender.d.ts +4 -0
- package/dist/cjs/src/common/utils/dates.d.ts +20 -0
- package/dist/cjs/src/common/utils/getIsValidHttpUrl.d.ts +5 -0
- package/dist/cjs/src/common/utils/hash.d.ts +1 -0
- package/dist/cjs/src/common/utils/makeLocaleStorageValue.d.ts +6 -0
- package/dist/cjs/src/common/utils/testImage.d.ts +9 -0
- package/dist/cjs/src/common/venuesService/__generated__.d.ts +254 -0
- package/dist/cjs/src/common/venuesService/makeQueryWithVenuesApolloClientFromConfig.d.ts +7 -0
- package/dist/cjs/src/common/venuesService/types.d.ts +2 -0
- package/dist/cjs/src/constants.d.ts +5 -0
- package/dist/cjs/src/core/archiveSearchPage/ArchivePageMeta.d.ts +13 -0
- package/dist/cjs/src/core/archiveSearchPage/ArchiveSearchPage.d.ts +16 -0
- package/dist/cjs/src/core/archiveSearchPage/ArchiveSearchPage.stories.d.ts +50 -0
- package/dist/cjs/src/core/archiveSearchPageContent/ArchiveSearchPageContent.d.ts +92 -0
- package/dist/cjs/src/core/button/LoadingButton.d.ts +8 -0
- package/dist/cjs/src/core/card/Card.d.ts +102 -0
- package/dist/cjs/src/core/card/Card.stories.d.ts +99 -0
- package/dist/cjs/src/core/card/LargeCard.d.ts +68 -0
- package/dist/cjs/src/core/card/LargeCard.stories.d.ts +16 -0
- package/dist/cjs/src/core/cardsList/CardsList.d.ts +16 -0
- package/dist/cjs/src/core/cardsList/CardsList.stories.d.ts +22 -0
- package/dist/cjs/src/core/carousel/Carousel.d.ts +3 -0
- package/dist/cjs/src/core/carousel/Carousel.stories.d.ts +34 -0
- package/dist/cjs/src/core/carousel/__tests__/Carousel.test.d.ts +1 -0
- package/dist/cjs/src/core/carousel/components/CarouselSlideButton.d.ts +3 -0
- package/dist/cjs/src/core/carousel/components/CarouselSlider.d.ts +3 -0
- package/dist/cjs/src/core/carousel/components/CarouselSliderDot.d.ts +2 -0
- package/dist/cjs/src/core/carousel/components/CarouselSliderPage.d.ts +5 -0
- package/dist/cjs/src/core/carousel/components/__tests__/CarouselSlideButton.test.d.ts +1 -0
- package/dist/cjs/src/core/carousel/components/__tests__/CarouselSlider.test.d.ts +1 -0
- package/dist/cjs/src/core/carousel/components/__tests__/CarouselSliderDot.test.d.ts +1 -0
- package/dist/cjs/src/core/carousel/components/__tests__/CarouselSliderPage.test.d.ts +1 -0
- package/dist/cjs/src/core/carousel/constants.d.ts +20 -0
- package/dist/cjs/src/core/carousel/context/CarouselContext.d.ts +4 -0
- package/dist/cjs/src/core/carousel/context/CarouselContextProvider.d.ts +7 -0
- package/dist/cjs/src/core/carousel/types.d.ts +147 -0
- package/dist/cjs/src/core/carousel/utils/utils.d.ts +27 -0
- package/dist/cjs/src/core/collection/Collection.d.ts +102 -0
- package/dist/cjs/src/core/collection/Collection.stories.d.ts +48 -0
- package/dist/cjs/src/core/collection/__tests__/Collection.test.d.ts +1 -0
- package/dist/cjs/src/core/collection/constants.d.ts +1 -0
- package/dist/cjs/src/core/collection/types.d.ts +28 -0
- package/dist/cjs/src/core/collection/utils.d.ts +36 -0
- package/dist/cjs/src/core/configProvider/ConfigProvider.d.ts +13 -0
- package/dist/cjs/src/core/configProvider/configContext.d.ts +130 -0
- package/dist/cjs/src/core/configProvider/defaultConfig.d.ts +61 -0
- package/dist/cjs/src/core/configProvider/useApolloClientFromConfig.d.ts +1 -0
- package/dist/cjs/src/core/configProvider/useConfig.d.ts +2 -0
- package/dist/cjs/src/core/configProvider/useEventsApolloClientFromConfig.d.ts +1 -0
- package/dist/cjs/src/core/configProvider/useHeadlessCmsLink.d.ts +2 -0
- package/dist/cjs/src/core/configProvider/useVenuesApolloClientFromConfig.d.ts +1 -0
- package/dist/cjs/src/core/contentContainer/ContentContainer.d.ts +12 -0
- package/dist/cjs/src/core/contentContainer/ContentContainer.stories.d.ts +8 -0
- package/dist/cjs/src/core/hero/Hero.d.ts +33 -0
- package/dist/cjs/src/core/hero/Hero.stories.d.ts +23 -0
- package/dist/cjs/src/core/hooks/useResolveImageUrl.d.ts +6 -0
- package/dist/cjs/src/core/image/BackgroundImage.d.ts +20 -0
- package/dist/cjs/src/core/image/Image.d.ts +24 -0
- package/dist/cjs/src/core/image/__tests__/BackgroundImage.test.d.ts +1 -0
- package/dist/cjs/src/core/image/__tests__/Image.test.d.ts +1 -0
- package/dist/cjs/src/core/imageGallery/ImageGallery.d.ts +25 -0
- package/dist/cjs/src/core/imageGallery/ImageGalleryContext.d.ts +32 -0
- package/dist/cjs/src/core/imageGallery/ImageGalleryProvider.d.ts +10 -0
- package/dist/cjs/src/core/imageGallery/ImageItem.d.ts +26 -0
- package/dist/cjs/src/core/imageGallery/ImagesGrid.d.ts +26 -0
- package/dist/cjs/src/core/imageGallery/Lightbox.d.ts +24 -0
- package/dist/cjs/src/core/imageGallery/types.d.ts +6 -0
- package/dist/cjs/src/core/imageGallery/useImageGalleryContext.d.ts +1 -0
- package/dist/cjs/src/core/index.d.ts +43 -0
- package/dist/cjs/src/core/language/__tests__/languageSorter.test.d.ts +1 -0
- package/dist/cjs/src/core/language/constants.d.ts +6 -0
- package/dist/cjs/src/core/language/findLanguage.d.ts +10 -0
- package/dist/cjs/src/core/language/index.d.ts +6 -0
- package/dist/cjs/src/core/language/languageSorter.d.ts +4 -0
- package/dist/cjs/src/core/language/toPrimaryLanguageOption.d.ts +5 -0
- package/dist/cjs/src/core/language/typeGuards.d.ts +3 -0
- package/dist/cjs/src/core/language/types.d.ts +5 -0
- package/dist/cjs/src/core/link/Link.d.ts +44 -0
- package/dist/cjs/src/core/link/Link.stories.d.ts +33 -0
- package/dist/cjs/src/core/link/LinkBase.d.ts +106 -0
- package/dist/cjs/src/core/link/SecondaryLink.d.ts +3 -0
- package/dist/cjs/src/core/link/__tests__/Link.test.d.ts +1 -0
- package/dist/cjs/src/core/linkBox/Link.stories.d.ts +23 -0
- package/dist/cjs/src/core/linkBox/LinkBox.d.ts +20 -0
- package/dist/cjs/src/core/navigation/Navigation.d.ts +15 -0
- package/dist/cjs/src/core/notification/Notification.d.ts +9 -0
- package/dist/cjs/src/core/notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/cjs/src/core/notification/utils/getIsNotificationActive.d.ts +2 -0
- package/dist/cjs/src/core/notification/utils/getNotificationHash.d.ts +2 -0
- package/dist/cjs/src/core/page/Page.d.ts +9 -0
- package/dist/cjs/src/core/page/Page.stories.d.ts +40 -0
- package/dist/cjs/src/core/pageContent/PageContent.d.ts +11 -0
- package/dist/cjs/src/core/pageContent/PageContent.stories.d.ts +1146 -0
- package/dist/cjs/src/core/pageContent/PageContentBreadcrumb.d.ts +5 -0
- package/dist/cjs/src/core/pageContent/PageContentLayout.d.ts +16 -0
- package/dist/cjs/src/core/pageContent/PageMainContent.d.ts +11 -0
- package/dist/cjs/src/core/pageContent/__tests__/Page.test.d.ts +1 -0
- package/dist/cjs/src/core/pageContent/meta/PageMeta.d.ts +9 -0
- package/dist/cjs/src/core/pageContent/sidebarContent/SidebarCardsList.d.ts +5 -0
- package/dist/cjs/src/core/pageContent/sidebarContent/SidebarContent.d.ts +15 -0
- package/dist/cjs/src/core/pageContent/sidebarContent/SidebarContentCard.d.ts +12 -0
- package/dist/cjs/src/core/pageContent/sidebarContent/SidebarContentLinkList.d.ts +5 -0
- package/dist/cjs/src/core/pageContent/sidebarContent/SidebarPostListItem.d.ts +8 -0
- package/dist/cjs/src/core/pageContent/sidebarContent/__tests__/SidebarContent.test.d.ts +1 -0
- package/dist/cjs/src/core/pageContent/types.d.ts +36 -0
- package/dist/cjs/src/core/pageContent/utils.d.ts +28 -0
- package/dist/cjs/src/core/pageContextProvider/PageContext.d.ts +6 -0
- package/dist/cjs/src/core/pageContextProvider/PageContextProvider.d.ts +6 -0
- package/dist/cjs/src/core/pageContextProvider/__tests__/PageContextProvider.test.d.ts +1 -0
- package/dist/cjs/src/core/pageContextProvider/usePageContext.d.ts +1 -0
- package/dist/cjs/src/core/pageModules/CardModule/CardModule.d.ts +3 -0
- package/dist/cjs/src/core/pageModules/CardModule/CardModule.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/CardsModule/CardsModule.d.ts +17 -0
- package/dist/cjs/src/core/pageModules/CardsModule/CardsModule.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/CardsModule/Icon.d.ts +6 -0
- package/dist/cjs/src/core/pageModules/CardsModule/SimpleCard.d.ts +13 -0
- package/dist/cjs/src/core/pageModules/ContentModule/ContentModule.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/ContentModule/ContentModule.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/ImageGalleryModule/ImageGalleryModule.d.ts +3 -0
- package/dist/cjs/src/core/pageModules/ImageGalleryModule/ImageGalleryModule.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/SocialMediaFeedModule/SocialMediaFeedModule.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/SocialMediaFeedModule/SocialMediaFeedModule.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/StepsModule/StepsModule.d.ts +14 -0
- package/dist/cjs/src/core/pageModules/StepsModule/StepsModule.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageModules/constants.d.ts +1 -0
- package/dist/cjs/src/core/pageSection/PageSection.d.ts +32 -0
- package/dist/cjs/src/core/pageSection/PageSection.stories.d.ts +7 -0
- package/dist/cjs/src/core/pageSection/__tests__/PageSection.test.d.ts +1 -0
- package/dist/cjs/src/core/storyContainer/StoryContainer.d.ts +6 -0
- package/dist/cjs/src/core/translation/__tests__/getTranslationWithFallback.test.d.ts +1 -0
- package/dist/cjs/src/core/translation/constants.d.ts +12 -0
- package/dist/cjs/src/core/translation/getTranslationWithFallback.d.ts +4 -0
- package/dist/cjs/src/core/translation/types.d.ts +8 -0
- package/dist/cjs/src/core/translation/useTranslationWithFallback.d.ts +4 -0
- package/dist/cjs/src/core/utils/__tests__/findAllElementsOfType.test.d.ts +1 -0
- package/dist/cjs/src/core/utils/__tests__/getChildrenByType.test.d.ts +1 -0
- package/dist/cjs/src/core/utils/__tests__/recursiveMap.test.d.ts +1 -0
- package/dist/cjs/src/core/utils/createHashKey.d.ts +1 -0
- package/dist/cjs/src/core/utils/findAllElementsOfType.d.ts +5 -0
- package/dist/cjs/src/core/utils/getChildrenByType.d.ts +18 -0
- package/dist/cjs/src/core/utils/isTrustedOrigin.d.ts +1 -0
- package/dist/cjs/src/core/utils/recursiveMap.d.ts +15 -0
- package/dist/cjs/src/core/utils/string.d.ts +27 -0
- package/dist/cjs/src/core/utils/validateTrustedOriginsFormat.d.ts +1 -0
- package/dist/cjs/src/linkedEvents/utils/normalizeKey.d.ts +10 -0
- package/dist/cjs/src/linkedEvents/utils/normalizeKeys.d.ts +28 -0
- package/dist/cjs/src/mocks/handlers.d.ts +1 -0
- package/dist/cjs/src/mocks/queries/cms/languages.d.ts +1 -0
- package/dist/cjs/src/mocks/queries/cms/menu.d.ts +1 -0
- package/dist/cjs/src/mocks/queries/cms/notification.d.ts +1 -0
- package/dist/cjs/src/mocks/queries/cms/page.d.ts +1 -0
- package/dist/cjs/src/mocks/queries/linkedEvents/eventList.d.ts +242 -0
- package/dist/cjs/src/mocks/queries/linkedEvents/eventsByIds.d.ts +224 -0
- package/dist/cjs/src/mocks/responses/linkedEvents/eventMocks.d.ts +1112 -0
- package/dist/cjs/src/mocks/server.d.ts +1 -0
- package/dist/cjs/src/nextjs/getLanguageStaticProps.d.ts +3 -0
- package/dist/cjs/src/nextjs/getMenuStaticProps.d.ts +7 -0
- package/dist/cjs/src/nextjs/getPageStaticProps.d.ts +7 -0
- package/dist/cjs/src/nextjs/index.d.ts +3 -0
- package/dist/cjs/src/storybook-common/HelmetWrapper.d.ts +4 -0
- package/dist/cjs/src/storybook-common/constants.d.ts +9 -0
- package/dist/cjs/src/storybook-common/useCmsEndpointConfig.d.ts +3 -0
- package/dist/cjs/src/tests/apolloConfig.d.ts +2 -0
- package/dist/cjs/src/tests/hideConsoleMessages.d.ts +11 -0
- package/dist/configContext-BjJVyERb.d.ts +791 -0
- package/dist/defaultConfig-B0wJw6Kr.js +19810 -0
- package/dist/defaultConfig-B0wJw6Kr.js.map +1 -0
- package/dist/index-B0pDvzoV.js +2 -0
- package/dist/index-B0pDvzoV.js.map +1 -0
- package/dist/index.d.ts +1432 -0
- package/dist/index.js +333 -0
- package/dist/index.js.map +1 -0
- package/dist/jest-setup.d.ts +1 -0
- package/dist/nextjs.d.ts +17 -0
- package/dist/nextjs.js +70 -0
- package/dist/nextjs.js.map +1 -0
- package/dist/package.json +182 -0
- package/dist/src/apollo/apollo-custom-template.stories.d.ts +12 -0
- package/dist/src/apollo/apollo.stories.d.ts +24 -0
- package/dist/src/apollo/index.d.ts +17 -0
- package/dist/src/apollo/navigation/Navigation.d.ts +13 -0
- package/dist/src/apollo/navigation/__tests__/Navigation.test.d.ts +1 -0
- package/dist/src/apollo/notification/Notification.d.ts +4 -0
- package/dist/src/apollo/notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/src/apollo/page/ApolloPageContextProvider.d.ts +5 -0
- package/dist/src/apollo/page/Page.d.ts +14 -0
- package/dist/src/apollo/page/apolloPageContext.d.ts +13 -0
- package/dist/src/apollo/page/useApolloPageContext.d.ts +4 -0
- package/dist/src/apollo/pageContent/PageContent.d.ts +9 -0
- package/dist/src/apollo/pageWithTemplateContent/PageWithTemplateContent.d.ts +14 -0
- package/dist/src/common/components/container/Container.d.ts +13 -0
- package/dist/src/common/components/grid/Grid.d.ts +16 -0
- package/dist/src/common/components/grid/Grid.stories.d.ts +8 -0
- package/dist/src/common/components/htmlToReact/HtmlToReact.d.ts +38 -0
- package/dist/src/common/components/htmlToReact/HtmlToReact.stories.d.ts +13 -0
- package/dist/src/common/components/htmlToReact/__tests__/HtmlToReact.tests.d.ts +1 -0
- package/dist/src/common/components/htmlToReact/replaceComponents/DefaultH2.d.ts +4 -0
- package/dist/src/common/components/htmlToReact/replaceComponents/DefaultP.d.ts +4 -0
- package/dist/src/common/components/htmlToReact/replaceComponents/IframeForEmbeddedMedia.d.ts +6 -0
- package/dist/src/common/components/htmlToReact/replaceComponents/index.d.ts +3 -0
- package/dist/src/common/components/icons/index.d.ts +5 -0
- package/dist/src/common/components/list/List.d.ts +13 -0
- package/dist/src/common/components/list/List.stories.d.ts +13 -0
- package/dist/src/common/components/tag/Tag.d.ts +26 -0
- package/dist/src/common/components/tag/Tag.stories.d.ts +80 -0
- package/dist/src/common/components/tag/__tests__/Tag.test.d.ts +1 -0
- package/dist/src/common/components/tag/tagThemes.d.ts +3 -0
- package/dist/src/common/components/text/Text.d.ts +27 -0
- package/dist/src/common/components/text/Text.stories.d.ts +14 -0
- package/dist/src/common/constants.d.ts +2 -0
- package/dist/src/common/eventsService/__generated__.d.ts +1420 -0
- package/dist/src/common/eventsService/events.d.ts +12 -0
- package/dist/src/common/eventsService/types.d.ts +2 -0
- package/dist/src/common/eventsService/utils.d.ts +7 -0
- package/dist/src/common/headlessService/__generated__.d.ts +20878 -0
- package/dist/src/common/headlessService/article.d.ts +7 -0
- package/dist/src/common/headlessService/articles.d.ts +17 -0
- package/dist/src/common/headlessService/categories.d.ts +13 -0
- package/dist/src/common/headlessService/category.d.ts +9 -0
- package/dist/src/common/headlessService/constants.d.ts +7 -0
- package/dist/src/common/headlessService/landingPage.d.ts +9 -0
- package/dist/src/common/headlessService/languages.d.ts +8 -0
- package/dist/src/common/headlessService/makeQueryWithApolloClientFromConfig.d.ts +12 -0
- package/dist/src/common/headlessService/menu.d.ts +10 -0
- package/dist/src/common/headlessService/notification.d.ts +7 -0
- package/dist/src/common/headlessService/page.d.ts +8 -0
- package/dist/src/common/headlessService/pageByTemplate.d.ts +9 -0
- package/dist/src/common/headlessService/pages.d.ts +13 -0
- package/dist/src/common/headlessService/tag.d.ts +9 -0
- package/dist/src/common/headlessService/tags.d.ts +13 -0
- package/dist/src/common/headlessService/types.d.ts +17 -0
- package/dist/src/common/headlessService/utils.d.ts +909 -0
- package/dist/src/common/utils/customRender.d.ts +4 -0
- package/dist/src/common/utils/dates.d.ts +20 -0
- package/dist/src/common/utils/getIsValidHttpUrl.d.ts +5 -0
- package/dist/src/common/utils/hash.d.ts +1 -0
- package/dist/src/common/utils/makeLocaleStorageValue.d.ts +6 -0
- package/dist/src/common/utils/testImage.d.ts +9 -0
- package/dist/src/common/venuesService/__generated__.d.ts +254 -0
- package/dist/src/common/venuesService/makeQueryWithVenuesApolloClientFromConfig.d.ts +7 -0
- package/dist/src/common/venuesService/types.d.ts +2 -0
- package/dist/src/constants.d.ts +5 -0
- package/dist/src/core/archiveSearchPage/ArchivePageMeta.d.ts +13 -0
- package/dist/src/core/archiveSearchPage/ArchiveSearchPage.d.ts +16 -0
- package/dist/src/core/archiveSearchPage/ArchiveSearchPage.stories.d.ts +50 -0
- package/dist/src/core/archiveSearchPageContent/ArchiveSearchPageContent.d.ts +92 -0
- package/dist/src/core/button/LoadingButton.d.ts +8 -0
- package/dist/src/core/card/Card.d.ts +102 -0
- package/dist/src/core/card/Card.stories.d.ts +99 -0
- package/dist/src/core/card/LargeCard.d.ts +68 -0
- package/dist/src/core/card/LargeCard.stories.d.ts +16 -0
- package/dist/src/core/cardsList/CardsList.d.ts +16 -0
- package/dist/src/core/cardsList/CardsList.stories.d.ts +22 -0
- package/dist/src/core/carousel/Carousel.d.ts +3 -0
- package/dist/src/core/carousel/Carousel.stories.d.ts +34 -0
- package/dist/src/core/carousel/__tests__/Carousel.test.d.ts +1 -0
- package/dist/src/core/carousel/components/CarouselSlideButton.d.ts +3 -0
- package/dist/src/core/carousel/components/CarouselSlider.d.ts +3 -0
- package/dist/src/core/carousel/components/CarouselSliderDot.d.ts +2 -0
- package/dist/src/core/carousel/components/CarouselSliderPage.d.ts +5 -0
- package/dist/src/core/carousel/components/__tests__/CarouselSlideButton.test.d.ts +1 -0
- package/dist/src/core/carousel/components/__tests__/CarouselSlider.test.d.ts +1 -0
- package/dist/src/core/carousel/components/__tests__/CarouselSliderDot.test.d.ts +1 -0
- package/dist/src/core/carousel/components/__tests__/CarouselSliderPage.test.d.ts +1 -0
- package/dist/src/core/carousel/constants.d.ts +20 -0
- package/dist/src/core/carousel/context/CarouselContext.d.ts +4 -0
- package/dist/src/core/carousel/context/CarouselContextProvider.d.ts +7 -0
- package/dist/src/core/carousel/types.d.ts +147 -0
- package/dist/src/core/carousel/utils/utils.d.ts +27 -0
- package/dist/src/core/collection/Collection.d.ts +102 -0
- package/dist/src/core/collection/Collection.stories.d.ts +48 -0
- package/dist/src/core/collection/__tests__/Collection.test.d.ts +1 -0
- package/dist/src/core/collection/constants.d.ts +1 -0
- package/dist/src/core/collection/types.d.ts +28 -0
- package/dist/src/core/collection/utils.d.ts +36 -0
- package/dist/src/core/configProvider/ConfigProvider.d.ts +13 -0
- package/dist/src/core/configProvider/configContext.d.ts +130 -0
- package/dist/src/core/configProvider/defaultConfig.d.ts +61 -0
- package/dist/src/core/configProvider/useApolloClientFromConfig.d.ts +1 -0
- package/dist/src/core/configProvider/useConfig.d.ts +2 -0
- package/dist/src/core/configProvider/useEventsApolloClientFromConfig.d.ts +1 -0
- package/dist/src/core/configProvider/useHeadlessCmsLink.d.ts +2 -0
- package/dist/src/core/configProvider/useVenuesApolloClientFromConfig.d.ts +1 -0
- package/dist/src/core/contentContainer/ContentContainer.d.ts +12 -0
- package/dist/src/core/contentContainer/ContentContainer.stories.d.ts +8 -0
- package/dist/src/core/hero/Hero.d.ts +33 -0
- package/dist/src/core/hero/Hero.stories.d.ts +23 -0
- package/dist/src/core/hooks/useResolveImageUrl.d.ts +6 -0
- package/dist/src/core/image/BackgroundImage.d.ts +20 -0
- package/dist/src/core/image/Image.d.ts +24 -0
- package/dist/src/core/image/__tests__/BackgroundImage.test.d.ts +1 -0
- package/dist/src/core/image/__tests__/Image.test.d.ts +1 -0
- package/dist/src/core/imageGallery/ImageGallery.d.ts +25 -0
- package/dist/src/core/imageGallery/ImageGalleryContext.d.ts +32 -0
- package/dist/src/core/imageGallery/ImageGalleryProvider.d.ts +10 -0
- package/dist/src/core/imageGallery/ImageItem.d.ts +26 -0
- package/dist/src/core/imageGallery/ImagesGrid.d.ts +26 -0
- package/dist/src/core/imageGallery/Lightbox.d.ts +24 -0
- package/dist/src/core/imageGallery/types.d.ts +6 -0
- package/dist/src/core/imageGallery/useImageGalleryContext.d.ts +1 -0
- package/dist/src/core/index.d.ts +43 -0
- package/dist/src/core/language/__tests__/languageSorter.test.d.ts +1 -0
- package/dist/src/core/language/constants.d.ts +6 -0
- package/dist/src/core/language/findLanguage.d.ts +10 -0
- package/dist/src/core/language/index.d.ts +6 -0
- package/dist/src/core/language/languageSorter.d.ts +4 -0
- package/dist/src/core/language/toPrimaryLanguageOption.d.ts +5 -0
- package/dist/src/core/language/typeGuards.d.ts +3 -0
- package/dist/src/core/language/types.d.ts +5 -0
- package/dist/src/core/link/Link.d.ts +44 -0
- package/dist/src/core/link/Link.stories.d.ts +33 -0
- package/dist/src/core/link/LinkBase.d.ts +106 -0
- package/dist/src/core/link/SecondaryLink.d.ts +3 -0
- package/dist/src/core/link/__tests__/Link.test.d.ts +1 -0
- package/dist/src/core/linkBox/Link.stories.d.ts +23 -0
- package/dist/src/core/linkBox/LinkBox.d.ts +20 -0
- package/dist/src/core/navigation/Navigation.d.ts +15 -0
- package/dist/src/core/notification/Notification.d.ts +9 -0
- package/dist/src/core/notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/src/core/notification/utils/getIsNotificationActive.d.ts +2 -0
- package/dist/src/core/notification/utils/getNotificationHash.d.ts +2 -0
- package/dist/src/core/page/Page.d.ts +9 -0
- package/dist/src/core/page/Page.stories.d.ts +40 -0
- package/dist/src/core/pageContent/PageContent.d.ts +11 -0
- package/dist/src/core/pageContent/PageContent.stories.d.ts +1146 -0
- package/dist/src/core/pageContent/PageContentBreadcrumb.d.ts +5 -0
- package/dist/src/core/pageContent/PageContentLayout.d.ts +16 -0
- package/dist/src/core/pageContent/PageMainContent.d.ts +11 -0
- package/dist/src/core/pageContent/__tests__/Page.test.d.ts +1 -0
- package/dist/src/core/pageContent/meta/PageMeta.d.ts +9 -0
- package/dist/src/core/pageContent/sidebarContent/SidebarCardsList.d.ts +5 -0
- package/dist/src/core/pageContent/sidebarContent/SidebarContent.d.ts +15 -0
- package/dist/src/core/pageContent/sidebarContent/SidebarContentCard.d.ts +12 -0
- package/dist/src/core/pageContent/sidebarContent/SidebarContentLinkList.d.ts +5 -0
- package/dist/src/core/pageContent/sidebarContent/SidebarPostListItem.d.ts +8 -0
- package/dist/src/core/pageContent/sidebarContent/__tests__/SidebarContent.test.d.ts +1 -0
- package/dist/src/core/pageContent/types.d.ts +36 -0
- package/dist/src/core/pageContent/utils.d.ts +28 -0
- package/dist/src/core/pageContextProvider/PageContext.d.ts +6 -0
- package/dist/src/core/pageContextProvider/PageContextProvider.d.ts +6 -0
- package/dist/src/core/pageContextProvider/__tests__/PageContextProvider.test.d.ts +1 -0
- package/dist/src/core/pageContextProvider/usePageContext.d.ts +1 -0
- package/dist/src/core/pageModules/CardModule/CardModule.d.ts +3 -0
- package/dist/src/core/pageModules/CardModule/CardModule.stories.d.ts +7 -0
- package/dist/src/core/pageModules/CardsModule/CardsModule.d.ts +17 -0
- package/dist/src/core/pageModules/CardsModule/CardsModule.stories.d.ts +7 -0
- package/dist/src/core/pageModules/CardsModule/Icon.d.ts +6 -0
- package/dist/src/core/pageModules/CardsModule/SimpleCard.d.ts +13 -0
- package/dist/src/core/pageModules/ContentModule/ContentModule.d.ts +7 -0
- package/dist/src/core/pageModules/ContentModule/ContentModule.stories.d.ts +7 -0
- package/dist/src/core/pageModules/ImageGalleryModule/ImageGalleryModule.d.ts +3 -0
- package/dist/src/core/pageModules/ImageGalleryModule/ImageGalleryModule.stories.d.ts +7 -0
- package/dist/src/core/pageModules/SocialMediaFeedModule/SocialMediaFeedModule.d.ts +7 -0
- package/dist/src/core/pageModules/SocialMediaFeedModule/SocialMediaFeedModule.stories.d.ts +7 -0
- package/dist/src/core/pageModules/StepsModule/StepsModule.d.ts +14 -0
- package/dist/src/core/pageModules/StepsModule/StepsModule.stories.d.ts +7 -0
- package/dist/src/core/pageModules/constants.d.ts +1 -0
- package/dist/src/core/pageSection/PageSection.d.ts +32 -0
- package/dist/src/core/pageSection/PageSection.stories.d.ts +7 -0
- package/dist/src/core/pageSection/__tests__/PageSection.test.d.ts +1 -0
- package/dist/src/core/storyContainer/StoryContainer.d.ts +6 -0
- package/dist/src/core/translation/__tests__/getTranslationWithFallback.test.d.ts +1 -0
- package/dist/src/core/translation/constants.d.ts +12 -0
- package/dist/src/core/translation/getTranslationWithFallback.d.ts +4 -0
- package/dist/src/core/translation/types.d.ts +8 -0
- package/dist/src/core/translation/useTranslationWithFallback.d.ts +4 -0
- package/dist/src/core/utils/__tests__/findAllElementsOfType.test.d.ts +1 -0
- package/dist/src/core/utils/__tests__/getChildrenByType.test.d.ts +1 -0
- package/dist/src/core/utils/__tests__/recursiveMap.test.d.ts +1 -0
- package/dist/src/core/utils/createHashKey.d.ts +1 -0
- package/dist/src/core/utils/findAllElementsOfType.d.ts +5 -0
- package/dist/src/core/utils/getChildrenByType.d.ts +18 -0
- package/dist/src/core/utils/isTrustedOrigin.d.ts +1 -0
- package/dist/src/core/utils/recursiveMap.d.ts +15 -0
- package/dist/src/core/utils/string.d.ts +27 -0
- package/dist/src/core/utils/validateTrustedOriginsFormat.d.ts +1 -0
- package/dist/src/linkedEvents/utils/normalizeKey.d.ts +10 -0
- package/dist/src/linkedEvents/utils/normalizeKeys.d.ts +28 -0
- package/dist/src/mocks/handlers.d.ts +1 -0
- package/dist/src/mocks/queries/cms/languages.d.ts +1 -0
- package/dist/src/mocks/queries/cms/menu.d.ts +1 -0
- package/dist/src/mocks/queries/cms/notification.d.ts +1 -0
- package/dist/src/mocks/queries/cms/page.d.ts +1 -0
- package/dist/src/mocks/queries/linkedEvents/eventList.d.ts +242 -0
- package/dist/src/mocks/queries/linkedEvents/eventsByIds.d.ts +224 -0
- package/dist/src/mocks/responses/linkedEvents/eventMocks.d.ts +1112 -0
- package/dist/src/mocks/server.d.ts +1 -0
- package/dist/src/nextjs/getLanguageStaticProps.d.ts +3 -0
- package/dist/src/nextjs/getMenuStaticProps.d.ts +7 -0
- package/dist/src/nextjs/getPageStaticProps.d.ts +7 -0
- package/dist/src/nextjs/index.d.ts +3 -0
- package/dist/src/storybook-common/HelmetWrapper.d.ts +4 -0
- package/dist/src/storybook-common/constants.d.ts +9 -0
- package/dist/src/storybook-common/useCmsEndpointConfig.d.ts +3 -0
- package/dist/src/tests/apolloConfig.d.ts +2 -0
- package/dist/src/tests/hideConsoleMessages.d.ts +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4078 @@
|
|
|
1
|
+
import { d as defaultConfig, $ as getUri, c as _objectWithoutProperties, b as _objectSpread2, a4 as _defineProperty, h as LanguageCodeEnum, ao as groupBy, e as _slicedToArray, f as _toConsumableArray, Y as isLinkItem, _ as _asyncToGenerator, a as _regenerator, ap as startCase, aq as camelCase, O as isLayoutLinkList, C as isLayoutPage, B as isLayoutArticle, w as isLayoutCards, ar as _taggedTemplateLiteral, as as _typeof, D as DEFAULT_LOCALE, R as isPageType, Q as isArticleType, s as getBreadcrumbListItems, at as getHeroProps, l as getCollections, q as getCollectionUIType, V as isEventSearchCollection, U as isEventSelectionCollection, W as isLocationsSelectionCollection, u as isLayoutContent, v as isLayoutCard, x as isLayoutImage, y as isLayoutImageGallery, z as isLayoutSteps, A as isLayoutSocialMediaFeed } from './defaultConfig-B0wJw6Kr.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { createContext, useContext, useMemo, isValidElement, Children, useState, useCallback, Suspense, useEffect, useRef, useLayoutEffect } from 'react';
|
|
4
|
+
import { IconSize, IconLinkExternal, IconEnvelope, IconPhone, Header, Logo, LogoSize, Notification as Notification$1, IconArrowRight, Button, ButtonPresetTheme, ButtonVariant, IconAngleRight, IconArrowLeft, Koros, Tag as Tag$1, LoadingSpinner, IconAngleLeft, StepByStep, Breadcrumb } from 'hds-react';
|
|
5
|
+
import { isPast, isSameDay, isFuture, format, parseISO } from 'date-fns';
|
|
6
|
+
import parse, { attributesToProps, domToReact } from 'html-react-parser';
|
|
7
|
+
import DOMPurify from 'isomorphic-dompurify';
|
|
8
|
+
import * as Apollo from '@apollo/client';
|
|
9
|
+
import { gql } from '@apollo/client';
|
|
10
|
+
import ReactDOM from 'react-dom';
|
|
11
|
+
|
|
12
|
+
var configContext = /*#__PURE__*/createContext(defaultConfig);
|
|
13
|
+
|
|
14
|
+
var validateContext = function validateContext(config) {
|
|
15
|
+
var _config$fallbackImage;
|
|
16
|
+
if (config === undefined) {
|
|
17
|
+
throw new Error('useConfig must be used within a ConfigProvider');
|
|
18
|
+
}
|
|
19
|
+
if (((_config$fallbackImage = config.fallbackImageUrls) === null || _config$fallbackImage === void 0 ? void 0 : _config$fallbackImage.length) === 0) {
|
|
20
|
+
throw new Error('add at least one fallback background image for events');
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function useConfig() {
|
|
24
|
+
var config = useContext(configContext);
|
|
25
|
+
validateContext(config);
|
|
26
|
+
return config;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var ModuleItemTypeEnum;
|
|
30
|
+
(function (ModuleItemTypeEnum) {
|
|
31
|
+
ModuleItemTypeEnum["Article"] = "article";
|
|
32
|
+
ModuleItemTypeEnum["Page"] = "page";
|
|
33
|
+
ModuleItemTypeEnum["Link"] = "link";
|
|
34
|
+
ModuleItemTypeEnum["Event"] = "event";
|
|
35
|
+
ModuleItemTypeEnum["Venue"] = "venue";
|
|
36
|
+
})(ModuleItemTypeEnum || (ModuleItemTypeEnum = {}));
|
|
37
|
+
|
|
38
|
+
function useHeadlessCmsLink(link) {
|
|
39
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ModuleItemTypeEnum.Link;
|
|
40
|
+
var _useConfig = useConfig(),
|
|
41
|
+
internalHrefOrigins = _useConfig.internalHrefOrigins,
|
|
42
|
+
_useConfig$utils = _useConfig.utils,
|
|
43
|
+
getIsHrefExternal = _useConfig$utils.getIsHrefExternal,
|
|
44
|
+
getRoutedInternalHref = _useConfig$utils.getRoutedInternalHref;
|
|
45
|
+
var uri = getUri(link, internalHrefOrigins, getIsHrefExternal);
|
|
46
|
+
return getRoutedInternalHref(uri, type);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function getDefaultExportFromCjs (x) {
|
|
50
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var classnames = {exports: {}};
|
|
54
|
+
|
|
55
|
+
/*!
|
|
56
|
+
Copyright (c) 2018 Jed Watson.
|
|
57
|
+
Licensed under the MIT License (MIT), see
|
|
58
|
+
http://jedwatson.github.io/classnames
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
var hasRequiredClassnames;
|
|
62
|
+
|
|
63
|
+
function requireClassnames () {
|
|
64
|
+
if (hasRequiredClassnames) return classnames.exports;
|
|
65
|
+
hasRequiredClassnames = 1;
|
|
66
|
+
(function (module) {
|
|
67
|
+
/* global define */
|
|
68
|
+
|
|
69
|
+
(function () {
|
|
70
|
+
|
|
71
|
+
var hasOwn = {}.hasOwnProperty;
|
|
72
|
+
|
|
73
|
+
function classNames () {
|
|
74
|
+
var classes = '';
|
|
75
|
+
|
|
76
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
77
|
+
var arg = arguments[i];
|
|
78
|
+
if (arg) {
|
|
79
|
+
classes = appendClass(classes, parseValue(arg));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return classes;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function parseValue (arg) {
|
|
87
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
88
|
+
return arg;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (typeof arg !== 'object') {
|
|
92
|
+
return '';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (Array.isArray(arg)) {
|
|
96
|
+
return classNames.apply(null, arg);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
100
|
+
return arg.toString();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var classes = '';
|
|
104
|
+
|
|
105
|
+
for (var key in arg) {
|
|
106
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
107
|
+
classes = appendClass(classes, key);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return classes;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function appendClass (value, newClass) {
|
|
115
|
+
if (!newClass) {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (value) {
|
|
120
|
+
return value + ' ' + newClass;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return value + newClass;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (module.exports) {
|
|
127
|
+
classNames.default = classNames;
|
|
128
|
+
module.exports = classNames;
|
|
129
|
+
} else {
|
|
130
|
+
window.classNames = classNames;
|
|
131
|
+
}
|
|
132
|
+
}());
|
|
133
|
+
} (classnames));
|
|
134
|
+
return classnames.exports;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
var classnamesExports = requireClassnames();
|
|
138
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
139
|
+
|
|
140
|
+
function styleInject(css, ref) {
|
|
141
|
+
if ( ref === void 0 ) ref = {};
|
|
142
|
+
var insertAt = ref.insertAt;
|
|
143
|
+
|
|
144
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
145
|
+
|
|
146
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
147
|
+
var style = document.createElement('style');
|
|
148
|
+
style.type = 'text/css';
|
|
149
|
+
|
|
150
|
+
if (insertAt === 'top') {
|
|
151
|
+
if (head.firstChild) {
|
|
152
|
+
head.insertBefore(style, head.firstChild);
|
|
153
|
+
} else {
|
|
154
|
+
head.appendChild(style);
|
|
155
|
+
}
|
|
156
|
+
} else {
|
|
157
|
+
head.appendChild(style);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (style.styleSheet) {
|
|
161
|
+
style.styleSheet.cssText = css;
|
|
162
|
+
} else {
|
|
163
|
+
style.appendChild(document.createTextNode(css));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
var css_248z$s = ".LinkBase_hds-link__4Kjdj{--link-visited-color:#551a8b;--link-color:var(--color-bus);box-sizing:border-box;color:var(--link-color);text-decoration:underline}.LinkBase_hds-link__4Kjdj:visited{color:var(--link-visited-color)}.LinkBase_hds-link__4Kjdj:visited svg g path{fill:var(--link-visited-color)}.LinkBase_hds-link__4Kjdj:focus{outline:3px solid var(--color-coat-of-arms)}.LinkBase_hds-link__4Kjdj:focus-visible{outline:3px solid var(--color-coat-of-arms)}.LinkBase_hds-link__4Kjdj .LinkBase_vertical-align-big-icon__6npfv,.LinkBase_hds-link__4Kjdj .LinkBase_vertical-align-small-or-medium-icon__wxjmq{vertical-align:middle}.LinkBase_hds-link--disable-visited-styles__cQcea:visited{color:var(--color-bus)}.LinkBase_hds-link--small__ZK-yV{font-size:14px}.LinkBase_hds-link--medium__bHZ5t{font-size:16px}.LinkBase_hds-link--large__Cnd9b{display:block;font-size:18px;width:fit-content}.LinkBase_hds-link--small__ZK-yV .LinkBase_icon__neXZz{margin-left:7px}.LinkBase_hds-link--medium__bHZ5t .LinkBase_icon__neXZz{margin-left:var(--spacing-2-xs);margin-top:-3px}.LinkBase_hds-link--large__Cnd9b .LinkBase_icon__neXZz{margin-left:var(--spacing-s)}.LinkBase_hds-link--small__ZK-yV .LinkBase_hds-icon-left__e0wBz{margin-right:4px;vertical-align:text-top}.LinkBase_hds-link--medium__bHZ5t .LinkBase_hds-icon-left__e0wBz{margin-right:8px;vertical-align:middle}.LinkBase_hds-link--large__Cnd9b .LinkBase_hds-icon-left__e0wBz{margin-right:16px;vertical-align:middle}.LinkBase_hds-link--small__ZK-yV .LinkBase_hds-icon-right__AJnk1{vertical-align:text-top}.LinkBase_hds-link--large__Cnd9b .LinkBase_hds-icon-right__AJnk1,.LinkBase_hds-link--medium__bHZ5t .LinkBase_hds-icon-right__AJnk1{margin-left:4px;vertical-align:middle}.LinkBase-module_iconLeft__Joa9y,.LinkBase-module_iconRight__KjMW3{white-space:nowrap}.LinkBase-module_linkS__NdYSG svg{min-width:var(--spacing-layout-2-xs)}.LinkBase-module_linkM__Hz4Zc svg{min-width:var(--spacing-layout-xs)}.LinkBase-module_linkL__3EsMl svg{min-width:var(--spacing-layout-m)}.LinkBase-module_content__Y4oQw.LinkBase-module_withLeftIcon__z1QvX{flex:1 1 auto!important}.LinkBase-module_content__Y4oQw svg{position:relative;top:2px}.LinkBase-module_externalWrapper__0R9V1{white-space:nowrap}";
|
|
168
|
+
var styles$r = {"link":"LinkBase-module_link__djxNm LinkBase_hds-link__4Kjdj","icon":"LinkBase-module_icon__-LloU LinkBase_icon__neXZz","iconLeft":"LinkBase-module_iconLeft__Joa9y LinkBase_hds-icon-left__e0wBz","iconRight":"LinkBase-module_iconRight__KjMW3 LinkBase_hds-icon-right__AJnk1","verticalAlignSmallOrMediumIcon":"LinkBase-module_verticalAlignSmallOrMediumIcon__0SjrX LinkBase_vertical-align-small-or-medium-icon__wxjmq","verticalAlignBigIcon":"LinkBase-module_verticalAlignBigIcon__C4EBu LinkBase_vertical-align-big-icon__6npfv","disableVisitedStyles":"LinkBase-module_disableVisitedStyles__S6UjE LinkBase_hds-link--disable-visited-styles__cQcea","linkS":"LinkBase-module_linkS__NdYSG LinkBase_hds-link--small__ZK-yV","linkM":"LinkBase-module_linkM__Hz4Zc LinkBase_hds-link--medium__bHZ5t","linkL":"LinkBase-module_linkL__3EsMl LinkBase_hds-link--large__Cnd9b","content":"LinkBase-module_content__Y4oQw","withLeftIcon":"LinkBase-module_withLeftIcon__z1QvX","externalWrapper":"LinkBase-module_externalWrapper__0R9V1"};
|
|
169
|
+
styleInject(css_248z$s);
|
|
170
|
+
|
|
171
|
+
var _excluded$c = ["children", "className", "disableVisitedStyles", "external", "showExternalIcon", "href", "iconLeft", "iconRight", "openInNewTab", "openInExternalDomainAriaLabel", "openInNewTabAriaLabel", "style", "size", "inlineIcons"];
|
|
172
|
+
var mapLinkSizeToExternalIconSize = {
|
|
173
|
+
L: IconSize.Large,
|
|
174
|
+
M: IconSize.Small,
|
|
175
|
+
S: IconSize.ExtraSmall
|
|
176
|
+
};
|
|
177
|
+
var hasChildren = function hasChildren(element) {
|
|
178
|
+
return /*#__PURE__*/isValidElement(element) && Boolean(element.props.children);
|
|
179
|
+
};
|
|
180
|
+
var childToString = function childToString(child) {
|
|
181
|
+
if (typeof child === 'undefined' || child === null || typeof child === 'boolean') {
|
|
182
|
+
return '';
|
|
183
|
+
}
|
|
184
|
+
if (JSON.stringify(child) === '{}') {
|
|
185
|
+
return '';
|
|
186
|
+
}
|
|
187
|
+
return child.toString();
|
|
188
|
+
};
|
|
189
|
+
var _getTextFromReactChildren = function getTextFromReactChildren(children) {
|
|
190
|
+
if (!(children instanceof Array) && ! /*#__PURE__*/isValidElement(children)) {
|
|
191
|
+
return childToString(children);
|
|
192
|
+
}
|
|
193
|
+
return Children.toArray(children).reduce(function (text, child) {
|
|
194
|
+
var newText = '';
|
|
195
|
+
if (/*#__PURE__*/isValidElement(child) && hasChildren(child)) {
|
|
196
|
+
newText = _getTextFromReactChildren(child.props.children);
|
|
197
|
+
} else if (/*#__PURE__*/isValidElement(child) && !hasChildren(child)) {
|
|
198
|
+
newText = '';
|
|
199
|
+
} else {
|
|
200
|
+
newText = childToString(child);
|
|
201
|
+
}
|
|
202
|
+
return text.concat(newText);
|
|
203
|
+
}, '');
|
|
204
|
+
};
|
|
205
|
+
function LinkBase$1(_ref, ref) {
|
|
206
|
+
var children = _ref.children,
|
|
207
|
+
className = _ref.className,
|
|
208
|
+
_ref$disableVisitedSt = _ref.disableVisitedStyles,
|
|
209
|
+
disableVisitedStyles = _ref$disableVisitedSt === void 0 ? true : _ref$disableVisitedSt,
|
|
210
|
+
_ref$external = _ref.external,
|
|
211
|
+
external = _ref$external === void 0 ? false : _ref$external,
|
|
212
|
+
_ref$showExternalIcon = _ref.showExternalIcon,
|
|
213
|
+
showExternalIcon = _ref$showExternalIcon === void 0 ? true : _ref$showExternalIcon,
|
|
214
|
+
href = _ref.href,
|
|
215
|
+
iconLeft = _ref.iconLeft,
|
|
216
|
+
iconRight = _ref.iconRight,
|
|
217
|
+
_ref$openInNewTab = _ref.openInNewTab,
|
|
218
|
+
openInNewTab = _ref$openInNewTab === void 0 ? false : _ref$openInNewTab,
|
|
219
|
+
openInExternalDomainAriaLabel = _ref.openInExternalDomainAriaLabel,
|
|
220
|
+
openInNewTabAriaLabel = _ref.openInNewTabAriaLabel,
|
|
221
|
+
_ref$style = _ref.style,
|
|
222
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
223
|
+
_ref$size = _ref.size,
|
|
224
|
+
size = _ref$size === void 0 ? 'M' : _ref$size,
|
|
225
|
+
_ref$inlineIcons = _ref.inlineIcons,
|
|
226
|
+
inlineIcons = _ref$inlineIcons === void 0 ? false : _ref$inlineIcons,
|
|
227
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
228
|
+
var composeAriaLabel = function composeAriaLabel() {
|
|
229
|
+
var childrenText = _getTextFromReactChildren(children);
|
|
230
|
+
var newTabText = openInNewTab ? openInNewTabAriaLabel || 'Avautuu uudessa välilehdessä.' : '';
|
|
231
|
+
var externalText = external ? openInExternalDomainAriaLabel || 'Siirtyy toiseen sivustoon.' : '';
|
|
232
|
+
if (childrenText && childrenText.slice(-1) !== '.' && (newTabText || externalText)) {
|
|
233
|
+
childrenText = "".concat(childrenText, ".");
|
|
234
|
+
}
|
|
235
|
+
var label = [childrenText, newTabText, externalText].filter(function (text) {
|
|
236
|
+
return text;
|
|
237
|
+
}).join(' ');
|
|
238
|
+
if (!label.trim()) {
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
return label;
|
|
242
|
+
};
|
|
243
|
+
var ZERO_WIDTH_NO_BREAK_SPACE = "\uFEFF";
|
|
244
|
+
var leftIcon = useMemo(function () {
|
|
245
|
+
return iconLeft && (/*#__PURE__*/React__default.createElement("span", {
|
|
246
|
+
className: styles$r.iconLeft,
|
|
247
|
+
"aria-hidden": "true"
|
|
248
|
+
}, inlineIcons && ZERO_WIDTH_NO_BREAK_SPACE, iconLeft)) || null;
|
|
249
|
+
}, [iconLeft, inlineIcons]);
|
|
250
|
+
var externalIcon = useMemo(function () {
|
|
251
|
+
return showExternalIcon && external && (/*#__PURE__*/React__default.createElement("span", {
|
|
252
|
+
className: styles$r.externalWrapper
|
|
253
|
+
}, inlineIcons && ZERO_WIDTH_NO_BREAK_SPACE, /*#__PURE__*/React__default.createElement(IconLinkExternal, {
|
|
254
|
+
size: mapLinkSizeToExternalIconSize[size],
|
|
255
|
+
className: classNames(styles$r.icon, size === 'L' ? styles$r.verticalAlignBigIcon : styles$r.verticalAlignSmallOrMediumIcon),
|
|
256
|
+
"aria-hidden": true
|
|
257
|
+
}))) || null;
|
|
258
|
+
}, [showExternalIcon, external, inlineIcons, size]);
|
|
259
|
+
var rightIcon = useMemo(function () {
|
|
260
|
+
return iconRight && (/*#__PURE__*/React__default.createElement("span", {
|
|
261
|
+
className: classNames(styles$r.iconRight, size === 'L' ? styles$r.verticalAlignBigIcon : styles$r.verticalAlignSmallOrMediumIcon),
|
|
262
|
+
"aria-hidden": "true"
|
|
263
|
+
}, inlineIcons && ZERO_WIDTH_NO_BREAK_SPACE, iconRight)) || null;
|
|
264
|
+
}, [iconRight, inlineIcons, size]);
|
|
265
|
+
return /*#__PURE__*/React__default.createElement("a", _objectSpread2({
|
|
266
|
+
className: classNames(styles$r.link, styles$r["link".concat(size)], disableVisitedStyles ? styles$r.disableVisitedStyles : '', className),
|
|
267
|
+
href: href,
|
|
268
|
+
style: style,
|
|
269
|
+
ref: ref,
|
|
270
|
+
target: openInNewTab ? '_blank' : undefined,
|
|
271
|
+
rel: openInNewTab ? 'noopener noreferrer' : undefined,
|
|
272
|
+
"aria-label": composeAriaLabel()
|
|
273
|
+
}, rest), !inlineIcons && leftIcon, /*#__PURE__*/React__default.createElement("span", {
|
|
274
|
+
className: classNames(styles$r.content, iconLeft && styles$r.withLeftIcon)
|
|
275
|
+
}, inlineIcons && leftIcon, children, inlineIcons && externalIcon, inlineIcons && rightIcon), !inlineIcons && externalIcon, !inlineIcons && rightIcon);
|
|
276
|
+
}
|
|
277
|
+
var LinkBase = /*#__PURE__*/React__default.forwardRef(LinkBase$1);
|
|
278
|
+
|
|
279
|
+
var css_248z$r = ".Link-module_link__ysKHd,.Link-module_link__ysKHd:visited{color:var(--color-black-90)}.Link-module_link__ysKHd:visited svg g path{fill:var(--color-black-90)}.Link-module_secondaryLink__puDIj{font-size:1.125rem;font-weight:700;text-decoration:none}.Link-module_secondaryLink__puDIj,.Link-module_secondaryLink__puDIj:visited{color:var(--color-coat-of-arms-dark)}.Link-module_secondaryLink__puDIj:hover{text-decoration:underline}.Link-module_secondaryLink__puDIj:visited svg g path{fill:var(--color-coat-of-arms-dark)}.Link-module_imgLink__UbBZY img{display:block}";
|
|
280
|
+
var styles$q = {"link":"Link-module_link__ysKHd","secondaryLink":"Link-module_secondaryLink__puDIj","imgLink":"Link-module_imgLink__UbBZY"};
|
|
281
|
+
styleInject(css_248z$r);
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Gets the string type of the component or core html (JSX) element.
|
|
285
|
+
* React Fragments will return type 'react.fragment'.
|
|
286
|
+
* Priority will be given to the prop '__TYPE'.
|
|
287
|
+
*/
|
|
288
|
+
var typeOfComponent = function typeOfComponent(component) {
|
|
289
|
+
var _component$props, _component$type;
|
|
290
|
+
return (
|
|
291
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
292
|
+
(component === null || component === void 0 || (_component$props = component.props) === null || _component$props === void 0 ? void 0 : _component$props.__TYPE) || (component === null || component === void 0 || (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.toString().replace('Symbol(react.fragment)', 'react.fragment')) || undefined
|
|
293
|
+
);
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Gets all children by specified type.
|
|
297
|
+
* This function will check the prop '__TYPE' first
|
|
298
|
+
* and then the 'type' string to match core html elements.
|
|
299
|
+
* To find a React Fragment, search for type 'react.fragment'.
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* // Finds all occurrences of ToDo (custom component), div, and React Fragment
|
|
303
|
+
* getChildrenByType(children, ['ToDo', 'div', 'react.fragment']);
|
|
304
|
+
*/
|
|
305
|
+
var getChildrenByType = function getChildrenByType(children, types) {
|
|
306
|
+
return React__default.Children.toArray(children).filter(function (child) {
|
|
307
|
+
return /*#__PURE__*/React__default.isValidElement(child) && types.indexOf(typeOfComponent(child)) !== -1;
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Recursively loops through the children of a ReactNode
|
|
313
|
+
* and runs the given function from arguments to the every child.
|
|
314
|
+
*
|
|
315
|
+
* If the child is a ReactElement and it has children,
|
|
316
|
+
* the children will be recursively called with the given function.
|
|
317
|
+
*
|
|
318
|
+
* If the child is not a valid ReactElement,
|
|
319
|
+
* which would mean that it is for example a string content of an HTML-element,
|
|
320
|
+
* it is directly returned.
|
|
321
|
+
*
|
|
322
|
+
* See the unit tests for some examples.
|
|
323
|
+
*/
|
|
324
|
+
var _recursiveMap = function recursiveMap(children, fn) {
|
|
325
|
+
var _React$Children$map;
|
|
326
|
+
return (_React$Children$map = React__default.Children.map(children, function (child) {
|
|
327
|
+
if (! /*#__PURE__*/React__default.isValidElement(child)) {
|
|
328
|
+
// Strings inside HTML elements, etc.
|
|
329
|
+
return child;
|
|
330
|
+
}
|
|
331
|
+
if (child.props.children) {
|
|
332
|
+
// Make a recursive call to find the last node
|
|
333
|
+
return fn(/*#__PURE__*/React__default.cloneElement(child, {
|
|
334
|
+
children: _recursiveMap(child.props.children, fn)
|
|
335
|
+
}));
|
|
336
|
+
}
|
|
337
|
+
// Should never(?) come here
|
|
338
|
+
return fn(child);
|
|
339
|
+
})) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.flat();
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Find all elements of defined types recursively from a ReactNode.
|
|
344
|
+
* @returns a list of elements of specified types that could be found from inside the ReactNode.
|
|
345
|
+
*/
|
|
346
|
+
var findAllElementsOfType = function findAllElementsOfType(children, types) {
|
|
347
|
+
var elementsOfType = [];
|
|
348
|
+
_recursiveMap(children, function (child) {
|
|
349
|
+
elementsOfType.push(getChildrenByType(child, types));
|
|
350
|
+
return child;
|
|
351
|
+
});
|
|
352
|
+
return elementsOfType.flat();
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
var _excluded$b = ["href", "children", "showExternalIcon", "openInNewTab", "className", "size", "iconRight", "inlineIcons"];
|
|
356
|
+
// TODO: LinkBase component should be replaced with hds Link, when all features are supported
|
|
357
|
+
// issue is created to hds: https://github.com/City-of-Helsinki/helsinki-design-system/issues/808
|
|
358
|
+
function Link(_ref) {
|
|
359
|
+
var _ref2;
|
|
360
|
+
var _ref$href = _ref.href,
|
|
361
|
+
href = _ref$href === void 0 ? '#' : _ref$href,
|
|
362
|
+
children = _ref.children,
|
|
363
|
+
forceShowExternalIcon = _ref.showExternalIcon,
|
|
364
|
+
forceOpenInNewTab = _ref.openInNewTab,
|
|
365
|
+
className = _ref.className,
|
|
366
|
+
_ref$size = _ref.size,
|
|
367
|
+
size = _ref$size === void 0 ? 'M' : _ref$size,
|
|
368
|
+
iconRight = _ref.iconRight,
|
|
369
|
+
inlineIcons = _ref.inlineIcons,
|
|
370
|
+
delegatedProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
371
|
+
var _useConfig = useConfig(),
|
|
372
|
+
getIsHrefExternal = _useConfig.utils.getIsHrefExternal,
|
|
373
|
+
RoutedLink = _useConfig.components.Link,
|
|
374
|
+
_useConfig$copy = _useConfig.copy,
|
|
375
|
+
openInExternalDomainAriaLabel = _useConfig$copy.openInExternalDomainAriaLabel,
|
|
376
|
+
openInNewTabAriaLabel = _useConfig$copy.openInNewTabAriaLabel;
|
|
377
|
+
var isEmail = (href === null || href === void 0 ? void 0 : href.startsWith('mailto:')) || undefined;
|
|
378
|
+
var isPhone = (href === null || href === void 0 ? void 0 : href.startsWith('tel:')) || undefined;
|
|
379
|
+
var isExternal = getIsHrefExternal(href) && !isEmail && !isPhone;
|
|
380
|
+
var iconSize = size === 'S' ? IconSize.ExtraSmall : IconSize.Small;
|
|
381
|
+
var hasImageInLink = findAllElementsOfType(children, ['img']).length > 0;
|
|
382
|
+
// The external links should always open in a new tab.
|
|
383
|
+
var openInNewTab = forceOpenInNewTab !== null && forceOpenInNewTab !== void 0 ? forceOpenInNewTab : isExternal;
|
|
384
|
+
// If the link contains an image, the external icon should be hidden by default,
|
|
385
|
+
// because an icon next to image does not look good.
|
|
386
|
+
var showExternalIcon = forceShowExternalIcon !== null && forceShowExternalIcon !== void 0 ? forceShowExternalIcon : isExternal && !hasImageInLink;
|
|
387
|
+
var linkComponent = /*#__PURE__*/React__default.createElement(LinkBase, _objectSpread2(_objectSpread2({
|
|
388
|
+
size: size
|
|
389
|
+
}, delegatedProps), {}, {
|
|
390
|
+
href: href,
|
|
391
|
+
openInNewTab: openInNewTab,
|
|
392
|
+
external: isExternal,
|
|
393
|
+
showExternalIcon: showExternalIcon,
|
|
394
|
+
className: classNames(styles$q.link, className, _defineProperty({}, styles$q.imgLink, hasImageInLink)),
|
|
395
|
+
openInExternalDomainAriaLabel: openInExternalDomainAriaLabel,
|
|
396
|
+
openInNewTabAriaLabel: openInNewTabAriaLabel,
|
|
397
|
+
iconRight: (_ref2 = iconRight !== null && iconRight !== void 0 ? iconRight : isEmail && /*#__PURE__*/React__default.createElement(IconEnvelope, {
|
|
398
|
+
size: iconSize,
|
|
399
|
+
"aria-hidden": true
|
|
400
|
+
})) !== null && _ref2 !== void 0 ? _ref2 : isPhone && /*#__PURE__*/React__default.createElement(IconPhone, {
|
|
401
|
+
size: iconSize,
|
|
402
|
+
"aria-hidden": true
|
|
403
|
+
}),
|
|
404
|
+
inlineIcons: inlineIcons,
|
|
405
|
+
disableVisitedStyles: true
|
|
406
|
+
}), children !== null && children !== void 0 ? children : '');
|
|
407
|
+
return isExternal || typeof RoutedLink === 'undefined' ? (
|
|
408
|
+
/*#__PURE__*/
|
|
409
|
+
// ts(2786) - Type 'Element | { linkComponent: Element; }' is not assignable to type 'ReactNode'.
|
|
410
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
411
|
+
React__default.createElement(React__default.Fragment, null, linkComponent)) : (/*#__PURE__*/React__default.createElement(RoutedLink, {
|
|
412
|
+
href: href
|
|
413
|
+
}, linkComponent));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
var css_248z$q = ".LinkBox-module_linkBoxWrapper__s4W19{cursor:pointer;height:100%;position:relative;width:100%}.LinkBox-module_linkBoxWrapper__s4W19.LinkBox-module_flex__D0Uzu{display:flex}.LinkBox-module_linkBoxWrapper__s4W19 a:focus{border:2px solid var(--color-black-90);outline:none}.LinkBox-module_linkBox__Yy5I0{display:inline-block;height:100%;left:0;position:absolute;top:0;width:100%}";
|
|
417
|
+
var styles$p = {"linkBoxWrapper":"LinkBox-module_linkBoxWrapper__s4W19","flex":"LinkBox-module_flex__D0Uzu","linkBox":"LinkBox-module_linkBox__Yy5I0"};
|
|
418
|
+
styleInject(css_248z$q);
|
|
419
|
+
|
|
420
|
+
var _excluded$a = ["children", "flex"];
|
|
421
|
+
// TODO: this component should be replaced with hds one, when all layouts and directions are supported
|
|
422
|
+
// issue is created to hds: https://github.com/City-of-Helsinki/helsinki-design-system/issues/809
|
|
423
|
+
function LinkBox(_ref) {
|
|
424
|
+
var children = _ref.children,
|
|
425
|
+
flex = _ref.flex,
|
|
426
|
+
delegatedProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
427
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
428
|
+
className: classNames(styles$p.linkBoxWrapper, flex && styles$p.flex)
|
|
429
|
+
}, children, /*#__PURE__*/React__default.createElement(Link, _objectSpread2(_objectSpread2({}, delegatedProps), {}, {
|
|
430
|
+
className: styles$p.linkBox,
|
|
431
|
+
showExternalIcon: false
|
|
432
|
+
})));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
var MAIN_CONTENT_ID = 'main-content';
|
|
436
|
+
var TOP_LEVEL_MENU_ITEM_PARENT_ID = 'null_parent_id';
|
|
437
|
+
|
|
438
|
+
/** Default order for sorting languages. */
|
|
439
|
+
var LANGUAGE_CODE_ORDINAL_NUMBER = _defineProperty(_defineProperty(_defineProperty({}, LanguageCodeEnum.Fi, 1), LanguageCodeEnum.Sv, 2), LanguageCodeEnum.En, 3);
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Find language from language list by language code.
|
|
443
|
+
* @param {Language[]} languages - List of languages
|
|
444
|
+
* @param {string} languageCode - Language code
|
|
445
|
+
* @returns {Language | undefined} Language from given language list with the given
|
|
446
|
+
* language code or undefined if not found
|
|
447
|
+
*/
|
|
448
|
+
function findLanguage(languages, languageCode) {
|
|
449
|
+
return languages.find(function (language) {
|
|
450
|
+
var _language$code;
|
|
451
|
+
return ((_language$code = language.code) === null || _language$code === void 0 ? void 0 : _language$code.toLowerCase()) === languageCode.toLowerCase();
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** Sorting function for NonEmptyLanguage elements. */
|
|
456
|
+
var languageSorter = function languageSorter(left, right) {
|
|
457
|
+
return Math.sign(LANGUAGE_CODE_ORDINAL_NUMBER[left.code] - LANGUAGE_CODE_ORDINAL_NUMBER[right.code]);
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/** Map a NonEmptyLanguage to a primary LanguageOption. */
|
|
461
|
+
var toPrimaryLanguageOption = function toPrimaryLanguageOption(language) {
|
|
462
|
+
var _language$name, _language$code$toLowe, _language$code;
|
|
463
|
+
return {
|
|
464
|
+
label: (_language$name = language.name) !== null && _language$name !== void 0 ? _language$name : '',
|
|
465
|
+
value: (_language$code$toLowe = (_language$code = language.code) === null || _language$code === void 0 ? void 0 : _language$code.toLowerCase()) !== null && _language$code$toLowe !== void 0 ? _language$code$toLowe : '',
|
|
466
|
+
isPrimary: true
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
var isNonEmptyLanguage = function isNonEmptyLanguage(language) {
|
|
471
|
+
return Boolean((language === null || language === void 0 ? void 0 : language.name) && (language === null || language === void 0 ? void 0 : language.code));
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
var getTranslationWithFallback = function getTranslationWithFallback(config, field, language) {
|
|
475
|
+
var _config$copy$field;
|
|
476
|
+
return (_config$copy$field = config.copy[field]) !== null && _config$copy$field !== void 0 ? _config$copy$field : config.fallbackTranslations[field][language];
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
function useTranslationWithFallback() {
|
|
480
|
+
var config = useConfig();
|
|
481
|
+
var currentLanguageCode = config.currentLanguageCode;
|
|
482
|
+
var t = function t(field) {
|
|
483
|
+
return getTranslationWithFallback(config, field, currentLanguageCode);
|
|
484
|
+
};
|
|
485
|
+
return {
|
|
486
|
+
t: t
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Create a menu link element
|
|
492
|
+
* @param {MenuLinkProps} props - Properties, if menuItemChildren is undefined then the
|
|
493
|
+
* created element will not have dropdown links
|
|
494
|
+
* @return {React.JSX.Element} Header.Link element
|
|
495
|
+
*/
|
|
496
|
+
function createMenuLinkElement(props) {
|
|
497
|
+
var _navigationItem$title, _navigationItem$label, _getIsItemActive, _menuItemChildren$nav, _menuItemChildren$nav2;
|
|
498
|
+
var menuItemChildren = props.menuItemChildren,
|
|
499
|
+
navigationItem = props.navigationItem,
|
|
500
|
+
getRoutedInternalHref = props.getRoutedInternalHref,
|
|
501
|
+
getIsItemActive = props.getIsItemActive,
|
|
502
|
+
A = props.A;
|
|
503
|
+
return /*#__PURE__*/React__default.createElement(Header.Link, {
|
|
504
|
+
as: A,
|
|
505
|
+
id: navigationItem.id,
|
|
506
|
+
key: navigationItem.id,
|
|
507
|
+
title: (_navigationItem$title = navigationItem.title) !== null && _navigationItem$title !== void 0 ? _navigationItem$title : undefined,
|
|
508
|
+
label: (_navigationItem$label = navigationItem.label) !== null && _navigationItem$label !== void 0 ? _navigationItem$label : '',
|
|
509
|
+
href: getRoutedInternalHref(navigationItem.path),
|
|
510
|
+
active: (_getIsItemActive = getIsItemActive === null || getIsItemActive === void 0 ? void 0 : getIsItemActive(navigationItem)) !== null && _getIsItemActive !== void 0 ? _getIsItemActive : false,
|
|
511
|
+
dropdownLinks: (menuItemChildren === null || menuItemChildren === void 0 || (_menuItemChildren$nav = menuItemChildren[navigationItem.id]) === null || _menuItemChildren$nav === void 0 ? void 0 : _menuItemChildren$nav.length) && ((_menuItemChildren$nav2 = menuItemChildren[navigationItem.id]) === null || _menuItemChildren$nav2 === void 0 ? void 0 : _menuItemChildren$nav2.map(function (childNavigationItem) {
|
|
512
|
+
return createMenuLinkElement(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
513
|
+
navigationItem: childNavigationItem
|
|
514
|
+
}));
|
|
515
|
+
})) || undefined
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function Navigation(_ref) {
|
|
519
|
+
var _menu$menuItems$nodes, _menu$menuItems, _currentLanguage$code, _universalBarMenu$men, _menuItemChildren$TOP;
|
|
520
|
+
var menu = _ref.menu,
|
|
521
|
+
universalBarMenu = _ref.universalBarMenu,
|
|
522
|
+
languages = _ref.languages,
|
|
523
|
+
className = _ref.className,
|
|
524
|
+
userNavigation = _ref.userNavigation,
|
|
525
|
+
onTitleClick = _ref.onTitleClick,
|
|
526
|
+
getPathnameForLanguage = _ref.getPathnameForLanguage,
|
|
527
|
+
getIsItemActive = _ref.getIsItemActive;
|
|
528
|
+
var _useConfig = useConfig(),
|
|
529
|
+
siteName = _useConfig.siteName,
|
|
530
|
+
currentLanguageCode = _useConfig.currentLanguageCode,
|
|
531
|
+
_useConfig$copy = _useConfig.copy,
|
|
532
|
+
menuButtonLabel = _useConfig$copy.menuButtonLabel,
|
|
533
|
+
menuToggleAriaLabel = _useConfig$copy.menuToggleAriaLabel,
|
|
534
|
+
skipToContentLabel = _useConfig$copy.skipToContentLabel,
|
|
535
|
+
A = _useConfig.components.A,
|
|
536
|
+
mainContentId = _useConfig.mainContentId,
|
|
537
|
+
_useConfig$utils = _useConfig.utils,
|
|
538
|
+
getRoutedInternalHref = _useConfig$utils.getRoutedInternalHref,
|
|
539
|
+
redirectToUrl = _useConfig$utils.redirectToUrl;
|
|
540
|
+
var languagesData = languages || [];
|
|
541
|
+
var currentLanguage = findLanguage(languagesData, currentLanguageCode);
|
|
542
|
+
var _useTranslationWithFa = useTranslationWithFallback(),
|
|
543
|
+
t = _useTranslationWithFa.t;
|
|
544
|
+
var languageOptions = languagesData.filter(isNonEmptyLanguage).sort(languageSorter).map(toPrimaryLanguageOption);
|
|
545
|
+
var onDidChangeLanguage = function onDidChangeLanguage(newLanguageCode) {
|
|
546
|
+
var newLanguage = findLanguage(languagesData, newLanguageCode);
|
|
547
|
+
var url = newLanguage && currentLanguage ? getPathnameForLanguage(newLanguage, currentLanguage, languagesData) : undefined;
|
|
548
|
+
if (url) {
|
|
549
|
+
redirectToUrl(url);
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
var menuItemChildren = groupBy((_menu$menuItems$nodes = menu === null || menu === void 0 || (_menu$menuItems = menu.menuItems) === null || _menu$menuItems === void 0 ? void 0 : _menu$menuItems.nodes) !== null && _menu$menuItems$nodes !== void 0 ? _menu$menuItems$nodes : [], function (menuItem) {
|
|
553
|
+
var _menuItem$parentId;
|
|
554
|
+
return (_menuItem$parentId = menuItem.parentId) !== null && _menuItem$parentId !== void 0 ? _menuItem$parentId : TOP_LEVEL_MENU_ITEM_PARENT_ID;
|
|
555
|
+
});
|
|
556
|
+
var sharedMenuLinkProps = {
|
|
557
|
+
getRoutedInternalHref: getRoutedInternalHref,
|
|
558
|
+
getIsItemActive: getIsItemActive,
|
|
559
|
+
A: A
|
|
560
|
+
};
|
|
561
|
+
var overrideHeaderMaxWidth = {
|
|
562
|
+
'--header-max-width': 'var(--breakpoint-xl)' // Would be 1440px if not overridden
|
|
563
|
+
};
|
|
564
|
+
/** adding key property allows to update the Header context with dynamic data (rerender the component) so the languages appear when data loaded
|
|
565
|
+
* The fix is usggested by HDS team, they have a ticket about that issue
|
|
566
|
+
* https://helsinkisolutionoffice.atlassian.net/browse/HDS-2174
|
|
567
|
+
*/
|
|
568
|
+
return /*#__PURE__*/React__default.createElement(Header, {
|
|
569
|
+
key: currentLanguage === null || currentLanguage === void 0 ? void 0 : currentLanguage.code,
|
|
570
|
+
onDidChangeLanguage: onDidChangeLanguage,
|
|
571
|
+
defaultLanguage: currentLanguage === null || currentLanguage === void 0 || (_currentLanguage$code = currentLanguage.code) === null || _currentLanguage$code === void 0 ? void 0 : _currentLanguage$code.toLowerCase(),
|
|
572
|
+
languages: languageOptions,
|
|
573
|
+
className: className,
|
|
574
|
+
style:
|
|
575
|
+
/* HDS v3.4–v3.7 has broken theme support with next.js SSR & hydration.
|
|
576
|
+
* FIXME: Replace with `theme={overrideHeaderMaxWidth}` when HDS theme support is fixed.
|
|
577
|
+
*/
|
|
578
|
+
overrideHeaderMaxWidth
|
|
579
|
+
}, /*#__PURE__*/React__default.createElement(Header.SkipLink, {
|
|
580
|
+
skipTo: "#".concat(mainContentId !== null && mainContentId !== void 0 ? mainContentId : MAIN_CONTENT_ID),
|
|
581
|
+
label: skipToContentLabel
|
|
582
|
+
}), universalBarMenu && (/*#__PURE__*/React__default.createElement(Header.UniversalBar, {
|
|
583
|
+
primaryLinkText: t('headerUniversalBarPrimaryLinkText'),
|
|
584
|
+
primaryLinkHref: t('headerUniversalBarPrimaryLinkHref')
|
|
585
|
+
}, universalBarMenu === null || universalBarMenu === void 0 || (_universalBarMenu$men = universalBarMenu.menuItems) === null || _universalBarMenu$men === void 0 || (_universalBarMenu$men = _universalBarMenu$men.nodes) === null || _universalBarMenu$men === void 0 ? void 0 : _universalBarMenu$men.map(function (navigationItem) {
|
|
586
|
+
return createMenuLinkElement(_objectSpread2(_objectSpread2({}, sharedMenuLinkProps), {}, {
|
|
587
|
+
navigationItem: navigationItem
|
|
588
|
+
}));
|
|
589
|
+
}))), /*#__PURE__*/React__default.createElement(Header.ActionBar, {
|
|
590
|
+
titleHref: "#",
|
|
591
|
+
logoHref: "#",
|
|
592
|
+
menuButtonLabel: menuButtonLabel,
|
|
593
|
+
menuButtonAriaLabel: menuToggleAriaLabel,
|
|
594
|
+
title: siteName,
|
|
595
|
+
onTitleClick: onTitleClick,
|
|
596
|
+
onLogoClick: onTitleClick,
|
|
597
|
+
frontPageLabel: siteName,
|
|
598
|
+
logo: /*#__PURE__*/React__default.createElement(Logo, {
|
|
599
|
+
size: LogoSize.Large,
|
|
600
|
+
src: t('headerActionBarLogoSrc'),
|
|
601
|
+
alt: t('headerActionBarLogoAlt')
|
|
602
|
+
}),
|
|
603
|
+
logoAriaLabel: t('headerActionBarLogoAriaLabel')
|
|
604
|
+
}, /*#__PURE__*/React__default.createElement(Header.LanguageSelector, null), userNavigation), /*#__PURE__*/React__default.createElement(Header.NavigationMenu, null, (_menuItemChildren$TOP = menuItemChildren[TOP_LEVEL_MENU_ITEM_PARENT_ID]) === null || _menuItemChildren$TOP === void 0 ? void 0 : _menuItemChildren$TOP.map(function (navigationItem) {
|
|
605
|
+
return createMenuLinkElement(_objectSpread2(_objectSpread2({}, sharedMenuLinkProps), {}, {
|
|
606
|
+
menuItemChildren: menuItemChildren,
|
|
607
|
+
navigationItem: navigationItem
|
|
608
|
+
}));
|
|
609
|
+
})));
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// Utility function to check if we are in a browser environment
|
|
613
|
+
var isBrowser = function isBrowser() {
|
|
614
|
+
return typeof window !== 'undefined';
|
|
615
|
+
};
|
|
616
|
+
function makeLocaleStorageValue(key, options) {
|
|
617
|
+
var _ref = {},
|
|
618
|
+
_ref$serializer = _ref.serializer,
|
|
619
|
+
serialize = _ref$serializer === void 0 ? JSON.stringify : _ref$serializer,
|
|
620
|
+
_ref$deserializer = _ref.deserializer,
|
|
621
|
+
deserialize = _ref$deserializer === void 0 ? JSON.parse : _ref$deserializer;
|
|
622
|
+
return function useLocaleStorageValue() {
|
|
623
|
+
var readValueInLocalStorage = function readValueInLocalStorage() {
|
|
624
|
+
if (!isBrowser()) {
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
try {
|
|
628
|
+
var storedValue = localStorage.getItem(key);
|
|
629
|
+
return storedValue ? deserialize(storedValue) : null;
|
|
630
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
631
|
+
} catch (_) {
|
|
632
|
+
// eslint-disable-next-line no-console
|
|
633
|
+
console.error('Failed to parse value in localStorage', {
|
|
634
|
+
key: key
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
return null;
|
|
638
|
+
};
|
|
639
|
+
var _useState = useState(function () {
|
|
640
|
+
return readValueInLocalStorage();
|
|
641
|
+
}),
|
|
642
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
643
|
+
stateValue = _useState2[0],
|
|
644
|
+
setStateValue = _useState2[1];
|
|
645
|
+
var storeValue = useCallback(function (value) {
|
|
646
|
+
if (!isBrowser()) {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
try {
|
|
650
|
+
if (value) {
|
|
651
|
+
setStateValue(value);
|
|
652
|
+
localStorage.setItem(key, serialize(value));
|
|
653
|
+
} else {
|
|
654
|
+
setStateValue(null);
|
|
655
|
+
localStorage.removeItem(key);
|
|
656
|
+
}
|
|
657
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
658
|
+
} catch (_) {
|
|
659
|
+
// eslint-disable-next-line no-console
|
|
660
|
+
console.error('Failed to save value into localStorage', {
|
|
661
|
+
key: key
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
}, []);
|
|
665
|
+
return [stateValue, storeValue];
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
var css_248z$p = ".htmlToReact-module_hds-table__xJuhb{--content-background-color:var(--color-white);border-collapse:collapse;line-height:1.5;width:100%}.htmlToReact-module_hds-table-container__JM0dy{overflow-x:auto}.htmlToReact-module_hds-table-container__JM0dy:focus{outline:var(--color-focus-outline) 3px solid}.htmlToReact-module_hds-table__xJuhb th{border-bottom:1px solid var(--color-black-20);font-size:var(--fontsize-body-m);font-weight:500;line-height:var(--lineheight-l);padding:var(--spacing-xs) var(--spacing-m);text-align:left;white-space:nowrap}.htmlToReact-module_hds-table__content__lQ2fX tr td{background-color:var(--content-background-color);border-bottom:1px solid var(--color-black-50);color:var(--color-black-90);font-size:var(--fontsize-body-m);font-weight:400;line-height:24px;padding:var(--spacing-xs) var(--spacing-m)}.htmlToReact-module_hds-table__header-row__F7jA7{background-color:var(--header-background-color)}.htmlToReact-module_hds-table__content--text-align-td-right__PEdp6 td{text-align:right}.htmlToReact-module_hds-table__caption__kXj23{font-size:var(--fontsize-body-l);font-weight:400;line-height:var(--lineheight-l);margin-bottom:var(--spacing-s);text-align:left}.htmlToReact-module_hds-table--dark__dJ9ua{--header-background-color:var(--color-bus)}.htmlToReact-module_hds-table__xJuhb.htmlToReact-module_hds-table--dark__dJ9ua th{color:var(--color-white)}.htmlToReact-module_hds-table--light__3P2Wa{--header-background-color:var(--color-silver)}.htmlToReact-module_hds-table__xJuhb.htmlToReact-module_hds-table--light__3P2Wa th{color:var(--color-black-90)}.htmlToReact-module_hds-table--with-vertical-lines__naIak .htmlToReact-module_hds-table__content__lQ2fX{border-left:1px solid var(--color-black-50)}.htmlToReact-module_hds-table--with-vertical-lines__naIak .htmlToReact-module_hds-table__content__lQ2fX td{border-right:1px solid var(--color-black-50)}.htmlToReact-module_hds-table--with-vertical-lines__naIak .htmlToReact-module_hds-table__header-row__F7jA7{border-left:1px solid var(--header-background-color);border-right:1px solid var(--header-background-color)}.htmlToReact-module_hds-table--dense__U8ZWg.htmlToReact-module_hds-table__xJuhb th{font-size:var(--fontsize-body-s);font-weight:700;padding:9px var(--spacing-s)}.htmlToReact-module_hds-table--dense__U8ZWg .htmlToReact-module_hds-table__content__lQ2fX tr td{font-size:var(--fontsize-body-s);padding:9px var(--spacing-s)}.htmlToReact-module_hds-table--dense__U8ZWg .htmlToReact-module_hds-table__caption__kXj23{font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-bottom:var(--spacing-xs)}.htmlToReact-module_hds-table--zebra__kwUTs .htmlToReact-module_hds-table__content__lQ2fX tr td,.htmlToReact-module_striped-figure__RyQ-g table .htmlToReact-module_hds-table__content__lQ2fX tr td{border-bottom:none}.htmlToReact-module_hds-table--zebra__kwUTs .htmlToReact-module_hds-table__content__lQ2fX tr:nth-child(2n) td,.htmlToReact-module_striped-figure__RyQ-g table .htmlToReact-module_hds-table__content__lQ2fX tr:nth-child(2n) td{background-color:var(--color-black-10)}.htmlToReact-module_hds-table__vertical-header-column__sEyrZ{background-color:var(--header-background-color)}.htmlToReact-module_hds-table--with-vertical-header__WeYh9.htmlToReact-module_hds-table--with-vertical-lines__naIak .htmlToReact-module_hds-table__content__lQ2fX,.htmlToReact-module_hds-table--with-vertical-lines__naIak.htmlToReact-module_hds-table--with-vertical-header__WeYh9 .htmlToReact-module_hds-table__header-row__F7jA7{border-left:none}.htmlToReact-module_hds-table--text-align-right__wLcZ8{text-align:right}@media (max-width:767px){.htmlToReact-module_hds-table__xJuhb th{font-weight:700}.htmlToReact-module_hds-table__content__lQ2fX tr td,.htmlToReact-module_hds-table__xJuhb th{font-size:var(--fontsize-body-s);padding:9px var(--spacing-s)}.htmlToReact-module_hds-table__caption__kXj23{font-size:var(--fontsize-heading-xxs);letter-spacing:.2px;line-height:var(--lineheight-l);margin-bottom:var(--spacing-xs)}}";
|
|
670
|
+
var styles$o = {"hds-table":"htmlToReact-module_hds-table__xJuhb","hds-table-container":"htmlToReact-module_hds-table-container__JM0dy","hds-table__content":"htmlToReact-module_hds-table__content__lQ2fX","hds-table__header-row":"htmlToReact-module_hds-table__header-row__F7jA7","hds-table__content--text-align-td-right":"htmlToReact-module_hds-table__content--text-align-td-right__PEdp6","hds-table__caption":"htmlToReact-module_hds-table__caption__kXj23","hds-table--dark":"htmlToReact-module_hds-table--dark__dJ9ua","hds-table--light":"htmlToReact-module_hds-table--light__3P2Wa","hds-table--with-vertical-lines":"htmlToReact-module_hds-table--with-vertical-lines__naIak","hds-table--dense":"htmlToReact-module_hds-table--dense__U8ZWg","hds-table--zebra":"htmlToReact-module_hds-table--zebra__kwUTs","striped-figure":"htmlToReact-module_striped-figure__RyQ-g","hds-table__vertical-header-column":"htmlToReact-module_hds-table__vertical-header-column__sEyrZ","hds-table--with-vertical-header":"htmlToReact-module_hds-table--with-vertical-header__WeYh9","hds-table--text-align-right":"htmlToReact-module_hds-table--text-align-right__wLcZ8"};
|
|
671
|
+
styleInject(css_248z$p);
|
|
672
|
+
|
|
673
|
+
var css_248z$o = ".text-module_text__grNmV{color:#1a1a1a}.text-module_h1__OQ2vY{font-size:1.5rem;font-weight:500;line-height:1.2;margin:1rem 0}@media (min-width:576px){.text-module_h1__OQ2vY{margin:2rem 0}}.text-module_h2__-36q9,.text-module_h3__4MGCd{font-size:1.5rem;font-weight:500;margin:0 0 1rem}.text-module_h4__xfIOa{font-size:1.25rem;font-weight:500;margin:0 0 1rem}.text-module_h5__MCuak{font-size:1.125rem;font-weight:500;margin:0 0 1rem}.text-module_body-l__XfaGa{font-size:1.125rem;line-height:1.5;margin:0 0 1.5rem;white-space:pre-wrap}.text-module_body-l__XfaGa strong{font-size:1.125rem;font-weight:500;letter-spacing:.2px}.text-module_body__HIBzp{font-size:1rem;white-space:pre-wrap}.text-module_body-xl__JlH4q{font-size:1.25rem;white-space:pre-wrap}";
|
|
674
|
+
var styles$n = {"text":"text-module_text__grNmV","h1":"text-module_h1__OQ2vY","h2":"text-module_h2__-36q9","h3":"text-module_h3__4MGCd","h4":"text-module_h4__xfIOa","h5":"text-module_h5__MCuak","body-l":"text-module_body-l__XfaGa","body":"text-module_body__HIBzp","body-xl":"text-module_body-xl__JlH4q"};
|
|
675
|
+
styleInject(css_248z$o);
|
|
676
|
+
|
|
677
|
+
var _excluded$9 = ["as", "variant", "children", "className"];
|
|
678
|
+
function getElement(variant) {
|
|
679
|
+
switch (variant) {
|
|
680
|
+
case 'h1':
|
|
681
|
+
case 'h2':
|
|
682
|
+
case 'h3':
|
|
683
|
+
case 'h4':
|
|
684
|
+
case 'h5':
|
|
685
|
+
return variant;
|
|
686
|
+
case 'body':
|
|
687
|
+
case 'body-l':
|
|
688
|
+
default:
|
|
689
|
+
return 'p';
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
function Text(_ref) {
|
|
693
|
+
var elementType = _ref.as,
|
|
694
|
+
_ref$variant = _ref.variant,
|
|
695
|
+
variant = _ref$variant === void 0 ? 'body-l' : _ref$variant,
|
|
696
|
+
children = _ref.children,
|
|
697
|
+
className = _ref.className,
|
|
698
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
699
|
+
return /*#__PURE__*/React__default.createElement(elementType || getElement(variant), _objectSpread2({
|
|
700
|
+
className: [styles$n.text, styles$n[variant], className].join(' ')
|
|
701
|
+
}, rest), children);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
function DefaultH2(_ref) {
|
|
705
|
+
var children = _ref.children;
|
|
706
|
+
return /*#__PURE__*/React__default.createElement(Text, {
|
|
707
|
+
variant: "h2"
|
|
708
|
+
}, children);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
function DefaultP(_ref) {
|
|
712
|
+
var children = _ref.children;
|
|
713
|
+
return /*#__PURE__*/React__default.createElement(Text, {
|
|
714
|
+
variant: "body-l"
|
|
715
|
+
}, children);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* An iframe HTML-element to securely render
|
|
720
|
+
* a sandboxed version of an embedded video media player, e.g. from the CMS.
|
|
721
|
+
* */
|
|
722
|
+
function IframeForEmbeddedMedia(props) {
|
|
723
|
+
return (
|
|
724
|
+
/*#__PURE__*/
|
|
725
|
+
// eslint-disable-next-line jsx-a11y/iframe-has-title
|
|
726
|
+
React__default.createElement("iframe", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
727
|
+
loading: "lazy",
|
|
728
|
+
sandbox: "allow-scripts allow-same-origin allow-popups allow-presentation"
|
|
729
|
+
}))
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function validateTrustedOriginsFormat(trustedOrigins) {
|
|
734
|
+
// The URL constructor should throw a TypeError when the URL is not a valid URL:
|
|
735
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#exceptions.
|
|
736
|
+
// However, there are some cases, like `new URL("test://not-a-valid-url").origin`,
|
|
737
|
+
// when the TypeError is not thrown, but the origin is set to 'null'.
|
|
738
|
+
if (trustedOrigins !== null && trustedOrigins !== void 0 && trustedOrigins.some(function (origin) {
|
|
739
|
+
return new URL(origin).origin === 'null';
|
|
740
|
+
})) {
|
|
741
|
+
throw new Error("Not valid URLs in trustedOrigins: [".concat(trustedOrigins.join(', '), "]"));
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
function isTrustedOrigin(testedOrigin, trustedOrigins) {
|
|
746
|
+
return trustedOrigins.includes(new URL(testedOrigin).origin);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
var hasClassName = function hasClassName(domNode, className) {
|
|
750
|
+
var _domNode$attribs$clas, _domNode$attribs$clas2;
|
|
751
|
+
return (_domNode$attribs$clas = (_domNode$attribs$clas2 = domNode.attribs["class"]) === null || _domNode$attribs$clas2 === void 0 || (_domNode$attribs$clas2 = _domNode$attribs$clas2.split(/\s+/)) === null || _domNode$attribs$clas2 === void 0 ? void 0 : _domNode$attribs$clas2.includes(className)) !== null && _domNode$attribs$clas !== void 0 ? _domNode$attribs$clas : false;
|
|
752
|
+
};
|
|
753
|
+
var addClassNames = function addClassNames(domNode) {
|
|
754
|
+
var _domNode$attribs$clas3, _domNode$attribs$clas4;
|
|
755
|
+
for (var _len = arguments.length, newClassNames = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
756
|
+
newClassNames[_key - 1] = arguments[_key];
|
|
757
|
+
}
|
|
758
|
+
return classNames.apply(void 0, _toConsumableArray((_domNode$attribs$clas3 = (_domNode$attribs$clas4 = domNode.attribs["class"]) === null || _domNode$attribs$clas4 === void 0 ? void 0 : _domNode$attribs$clas4.split(/\s+/)) !== null && _domNode$attribs$clas3 !== void 0 ? _domNode$attribs$clas3 : []).concat(newClassNames));
|
|
759
|
+
};
|
|
760
|
+
var WHITELISTED_TAGS = [
|
|
761
|
+
// Content sectioning
|
|
762
|
+
'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
|
763
|
+
// Text content
|
|
764
|
+
'blockquote', 'dd', 'dl', 'dt', 'figcaption', 'figure', 'hr', 'li', 'ol', 'p', 'pre', 'ul',
|
|
765
|
+
// Inline text semantics
|
|
766
|
+
'a', 'abbr', 'b', 'bdi', 'bdo', 'br', 'cite', 'code', 'data', 'dfn', 'em', 'i', 'kdb', 'mark', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time', 'u', 'var', 'wbr',
|
|
767
|
+
// Image and multimedia
|
|
768
|
+
'area', 'audio', 'img', 'map', 'track', 'video',
|
|
769
|
+
// SVG and MathML
|
|
770
|
+
'svg', 'math'];
|
|
771
|
+
var DEFAULT_TABLE_VARIANTS = ['light'];
|
|
772
|
+
/**
|
|
773
|
+
* Inject HDS core table styles into children of <thead>
|
|
774
|
+
* @see https://hds.hel.fi/components/table/code/
|
|
775
|
+
*/
|
|
776
|
+
function mapTableHeaderChild(domNode, options) {
|
|
777
|
+
if ('attribs' in domNode && domNode.name === 'tr') {
|
|
778
|
+
return /*#__PURE__*/React__default.createElement("tr", _objectSpread2(_objectSpread2({}, attributesToProps(domNode.attribs)), {}, {
|
|
779
|
+
className: addClassNames(domNode, styles$o['hds-table__header-row'])
|
|
780
|
+
}), domToReact(domNode.children, options));
|
|
781
|
+
}
|
|
782
|
+
return domToReact([domNode], options);
|
|
783
|
+
}
|
|
784
|
+
function replaceDomNodeWithReactComponent(domNode, options) {
|
|
785
|
+
var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
786
|
+
var trustedOrigins = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
787
|
+
var _components$p = components.p,
|
|
788
|
+
P = _components$p === void 0 ? DefaultP : _components$p,
|
|
789
|
+
_components$h = components.h2,
|
|
790
|
+
H2 = _components$h === void 0 ? DefaultH2 : _components$h,
|
|
791
|
+
_components$a = components.a,
|
|
792
|
+
A = _components$a === void 0 ? 'a' : _components$a,
|
|
793
|
+
_components$table = components.table,
|
|
794
|
+
Table = _components$table === void 0 ? 'table' : _components$table,
|
|
795
|
+
_components$tableVari = components.tableVariants,
|
|
796
|
+
tableVariants = _components$tableVari === void 0 ? DEFAULT_TABLE_VARIANTS : _components$tableVari,
|
|
797
|
+
_components$img = components.img,
|
|
798
|
+
IMG = _components$img === void 0 ? 'img' : _components$img,
|
|
799
|
+
_components$iframe = components.iframe,
|
|
800
|
+
IFrame = _components$iframe === void 0 ? IframeForEmbeddedMedia : _components$iframe;
|
|
801
|
+
// html-react-parser advices to do an instanceof check
|
|
802
|
+
// domNode instanceof Element
|
|
803
|
+
// However, this will fail between contexts. As this code is meant to be used
|
|
804
|
+
// as a dependency, different contexts are likely.
|
|
805
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_context_e.g._frames_or_windows
|
|
806
|
+
if ('attribs' in domNode) {
|
|
807
|
+
switch (domNode.name) {
|
|
808
|
+
case 'p':
|
|
809
|
+
return /*#__PURE__*/React__default.createElement(P, _objectSpread2({}, attributesToProps(domNode.attribs)), domToReact(domNode.children, options));
|
|
810
|
+
case 'h2':
|
|
811
|
+
return /*#__PURE__*/React__default.createElement(H2, _objectSpread2({}, attributesToProps(domNode.attribs)), domToReact(domNode.children, options));
|
|
812
|
+
case 'a':
|
|
813
|
+
return /*#__PURE__*/React__default.createElement(A, _objectSpread2({}, attributesToProps(domNode.attribs)), domToReact(domNode.children, options));
|
|
814
|
+
case 'figure':
|
|
815
|
+
// Inject HDS core zebra table style into <table> if it's inside
|
|
816
|
+
// <figure class="is-style-stripes">,
|
|
817
|
+
// see https://hds.hel.fi/components/table/code/
|
|
818
|
+
return /*#__PURE__*/React__default.createElement("figure", _objectSpread2(_objectSpread2({}, attributesToProps(domNode.attribs)), {}, {
|
|
819
|
+
className: addClassNames(domNode, _defineProperty({}, styles$o['striped-figure'], hasClassName(domNode, 'is-style-stripes')))
|
|
820
|
+
}), domToReact(domNode.children, options));
|
|
821
|
+
case 'table':
|
|
822
|
+
// Inject HDS core table styles into <table> and its children,
|
|
823
|
+
// see https://hds.hel.fi/components/table/code/
|
|
824
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
825
|
+
className: addClassNames(domNode, styles$o['hds-table-container'])
|
|
826
|
+
}, /*#__PURE__*/React__default.createElement(Table, _objectSpread2(_objectSpread2({}, attributesToProps(domNode.attribs)), {}, {
|
|
827
|
+
className: addClassNames(domNode, styles$o['hds-table'], tableVariants.map(function (tableVariant) {
|
|
828
|
+
return styles$o["hds-table--".concat(tableVariant)];
|
|
829
|
+
}))
|
|
830
|
+
}), domToReact(domNode.children, options)));
|
|
831
|
+
case 'caption':
|
|
832
|
+
return /*#__PURE__*/React__default.createElement("caption", _objectSpread2(_objectSpread2({}, attributesToProps(domNode.attribs)), {}, {
|
|
833
|
+
className: addClassNames(domNode, styles$o['hds-table__caption'])
|
|
834
|
+
}), domToReact(domNode.children, options));
|
|
835
|
+
case 'thead':
|
|
836
|
+
return /*#__PURE__*/React__default.createElement("thead", _objectSpread2({}, attributesToProps(domNode.attribs)), domNode.children.map(function (child) {
|
|
837
|
+
return mapTableHeaderChild(child, options);
|
|
838
|
+
}));
|
|
839
|
+
case 'tbody':
|
|
840
|
+
return /*#__PURE__*/React__default.createElement("tbody", _objectSpread2(_objectSpread2({}, attributesToProps(domNode.attribs)), {}, {
|
|
841
|
+
className: addClassNames(domNode, styles$o['hds-table__content'])
|
|
842
|
+
}), domToReact(domNode.children, options));
|
|
843
|
+
case 'img':
|
|
844
|
+
return /*#__PURE__*/React__default.createElement(IMG, _objectSpread2(_objectSpread2({}, attributesToProps(domNode.attribs)), {}, {
|
|
845
|
+
width: "100%"
|
|
846
|
+
}));
|
|
847
|
+
case 'iframe':
|
|
848
|
+
if (isTrustedOrigin(domNode.attribs.src, trustedOrigins)) {
|
|
849
|
+
return /*#__PURE__*/React__default.createElement(IFrame, _objectSpread2({}, attributesToProps(domNode.attribs)));
|
|
850
|
+
}
|
|
851
|
+
// eslint-disable-next-line no-console
|
|
852
|
+
console.warn('The iframe src-attribute was not set to any of the trusted origins.');
|
|
853
|
+
return /*#__PURE__*/React__default.createElement("div", null);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
return domNode;
|
|
857
|
+
}
|
|
858
|
+
function HtmlToReact(_ref) {
|
|
859
|
+
var dirty = _ref.children,
|
|
860
|
+
components = _ref.components,
|
|
861
|
+
_ref$allowedUnsafeTag = _ref.allowedUnsafeTags,
|
|
862
|
+
allowedUnsafeTags = _ref$allowedUnsafeTag === void 0 ? [] : _ref$allowedUnsafeTag,
|
|
863
|
+
_ref$trustedOrigins = _ref.trustedOrigins,
|
|
864
|
+
trustedOrigins = _ref$trustedOrigins === void 0 ? [] : _ref$trustedOrigins;
|
|
865
|
+
validateTrustedOriginsFormat(trustedOrigins);
|
|
866
|
+
var clean = useMemo(function () {
|
|
867
|
+
return DOMPurify.sanitize(dirty, {
|
|
868
|
+
USE_PROFILES: {
|
|
869
|
+
html: true
|
|
870
|
+
},
|
|
871
|
+
ADD_ATTR: ['target'],
|
|
872
|
+
ADD_TAGS: allowedUnsafeTags,
|
|
873
|
+
ALLOWED_TAGS: WHITELISTED_TAGS
|
|
874
|
+
});
|
|
875
|
+
}, [dirty, allowedUnsafeTags]);
|
|
876
|
+
var htmlReactParserOptions = {
|
|
877
|
+
replace: function replace(domNode) {
|
|
878
|
+
return replaceDomNodeWithReactComponent(domNode, htmlReactParserOptions, components, trustedOrigins);
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parse(clean, htmlReactParserOptions));
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/* eslint-disable no-bitwise */
|
|
885
|
+
// https://stackoverflow.com/a/52171480
|
|
886
|
+
function hash(str) {
|
|
887
|
+
var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
888
|
+
var h1 = 0xdeadbeef ^ seed;
|
|
889
|
+
var h2 = 0x41c6ce57 ^ seed;
|
|
890
|
+
for (var i = 0, ch; i < str.length; i += 1) {
|
|
891
|
+
ch = str.charCodeAt(i);
|
|
892
|
+
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
893
|
+
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
894
|
+
}
|
|
895
|
+
h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507) ^ Math.imul(h2 ^ h2 >>> 13, 3266489909);
|
|
896
|
+
h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507) ^ Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
897
|
+
return 4294967296 * (2097151 & h2) + (h1 >>> 0);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
// The notification is a singleton in the CMS. Instead of there being multiple
|
|
901
|
+
// notifications, there ever only is one which is edited according to current
|
|
902
|
+
// needs.
|
|
903
|
+
// Because this notification comes with a dismissal option, we have to be able
|
|
904
|
+
// to distinct different versions of the notification, so that we can safely
|
|
905
|
+
// determine that the user has previously dismissed this notification (and
|
|
906
|
+
// received) the urgent information that's within the notification.
|
|
907
|
+
function getNotificationHash(notification) {
|
|
908
|
+
// Notification fields used to build string for unique hash
|
|
909
|
+
var stringKeys = ['title', 'content', 'linkText', 'linkUrl', 'level', 'endDate', 'startDate'];
|
|
910
|
+
var combinedString = stringKeys.reduce(function (acc, current) {
|
|
911
|
+
var _notification$current;
|
|
912
|
+
return acc + ((_notification$current = notification === null || notification === void 0 ? void 0 : notification[current]) !== null && _notification$current !== void 0 ? _notification$current : '');
|
|
913
|
+
}, '');
|
|
914
|
+
return hash(combinedString);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
function isNotificationActive(notification) {
|
|
918
|
+
var _ref = notification !== null && notification !== void 0 ? notification : {},
|
|
919
|
+
startDate = _ref.startDate,
|
|
920
|
+
endDate = _ref.endDate,
|
|
921
|
+
title = _ref.title,
|
|
922
|
+
content = _ref.content;
|
|
923
|
+
var isNotificationContentMissing = !content && !title;
|
|
924
|
+
if (!notification || isNotificationContentMissing) {
|
|
925
|
+
return false;
|
|
926
|
+
}
|
|
927
|
+
var isSameDayOrFuture = function isSameDayOrFuture(date) {
|
|
928
|
+
return isSameDay(new Date(), date) || isFuture(date);
|
|
929
|
+
};
|
|
930
|
+
return [
|
|
931
|
+
// both start and end dates are defined
|
|
932
|
+
function () {
|
|
933
|
+
return startDate && endDate && isPast(new Date(startDate)) && isSameDayOrFuture(new Date(endDate));
|
|
934
|
+
},
|
|
935
|
+
// only end date defined
|
|
936
|
+
function () {
|
|
937
|
+
return !startDate && endDate && isSameDayOrFuture(new Date(endDate));
|
|
938
|
+
},
|
|
939
|
+
// only start date defined
|
|
940
|
+
function () {
|
|
941
|
+
return startDate && !endDate && isPast(new Date(startDate));
|
|
942
|
+
},
|
|
943
|
+
// neither start or end date are defined
|
|
944
|
+
function () {
|
|
945
|
+
return !startDate && !endDate;
|
|
946
|
+
}].some(function (f) {
|
|
947
|
+
return !!f();
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
var css_248z$n = ".notification-module_notification__MkdMv p{margin:0}";
|
|
952
|
+
var styles$m = {"notification":"notification-module_notification__MkdMv"};
|
|
953
|
+
styleInject(css_248z$n);
|
|
954
|
+
|
|
955
|
+
var NotificationStatus;
|
|
956
|
+
(function (NotificationStatus) {
|
|
957
|
+
NotificationStatus[NotificationStatus["dismissed"] = 0] = "dismissed";
|
|
958
|
+
NotificationStatus[NotificationStatus["expired"] = 1] = "expired";
|
|
959
|
+
NotificationStatus[NotificationStatus["visible"] = 2] = "visible";
|
|
960
|
+
NotificationStatus[NotificationStatus["missing"] = 3] = "missing";
|
|
961
|
+
})(NotificationStatus || (NotificationStatus = {}));
|
|
962
|
+
var useLocaleStorageNotification = makeLocaleStorageValue('rhhc/notification');
|
|
963
|
+
function getNotificationStatus(notification, notificationState) {
|
|
964
|
+
if (!notification) {
|
|
965
|
+
return NotificationStatus.missing;
|
|
966
|
+
}
|
|
967
|
+
if (notificationState !== null && notificationState !== void 0 && notificationState.dismissed) {
|
|
968
|
+
return NotificationStatus.dismissed;
|
|
969
|
+
}
|
|
970
|
+
if (!isNotificationActive(notification)) {
|
|
971
|
+
return NotificationStatus.expired;
|
|
972
|
+
}
|
|
973
|
+
return NotificationStatus.visible;
|
|
974
|
+
}
|
|
975
|
+
var notificationTypeMap = {
|
|
976
|
+
info: 'alert',
|
|
977
|
+
high: 'error',
|
|
978
|
+
low: 'info'
|
|
979
|
+
};
|
|
980
|
+
var isCmsNotificationLevel = function isCmsNotificationLevel(value) {
|
|
981
|
+
return typeof value === 'string' && value in notificationTypeMap;
|
|
982
|
+
};
|
|
983
|
+
function Notification(_ref) {
|
|
984
|
+
var notification = _ref.notification;
|
|
985
|
+
var _useConfig = useConfig(),
|
|
986
|
+
closeButtonLabelText = _useConfig.copy.closeButtonLabelText,
|
|
987
|
+
getRoutedInternalHref = _useConfig.utils.getRoutedInternalHref;
|
|
988
|
+
var _useLocaleStorageNoti = useLocaleStorageNotification(),
|
|
989
|
+
_useLocaleStorageNoti2 = _slicedToArray(_useLocaleStorageNoti, 2),
|
|
990
|
+
notificationState = _useLocaleStorageNoti2[0],
|
|
991
|
+
setNotificationState = _useLocaleStorageNoti2[1];
|
|
992
|
+
var notificationHash = getNotificationHash(notification);
|
|
993
|
+
var notificationStatus = getNotificationStatus(notification, notificationState === null || notificationState === void 0 ? void 0 : notificationState[notificationHash]);
|
|
994
|
+
var _ref2 = notification !== null && notification !== void 0 ? notification : {},
|
|
995
|
+
level = _ref2.level,
|
|
996
|
+
title = _ref2.title,
|
|
997
|
+
linkUrl = _ref2.linkUrl,
|
|
998
|
+
linkText = _ref2.linkText,
|
|
999
|
+
content = _ref2.content;
|
|
1000
|
+
var handleClose = function handleClose() {
|
|
1001
|
+
setNotificationState(_defineProperty({}, notificationHash, {
|
|
1002
|
+
dismissed: true
|
|
1003
|
+
}));
|
|
1004
|
+
};
|
|
1005
|
+
return notificationStatus === NotificationStatus.visible && (/*#__PURE__*/React__default.createElement(Notification$1, {
|
|
1006
|
+
type: notificationTypeMap[isCmsNotificationLevel(level) ? level : 'info'],
|
|
1007
|
+
label: title !== null && title !== void 0 ? title : undefined,
|
|
1008
|
+
dismissible: true,
|
|
1009
|
+
closeButtonLabelText: closeButtonLabelText,
|
|
1010
|
+
onClose: handleClose,
|
|
1011
|
+
className: styles$m.notification
|
|
1012
|
+
}, /*#__PURE__*/React__default.createElement(HtmlToReact, null, String(content)), linkUrl && (/*#__PURE__*/React__default.createElement(Link, {
|
|
1013
|
+
openInNewTab: true,
|
|
1014
|
+
href: getRoutedInternalHref(linkUrl),
|
|
1015
|
+
style: {
|
|
1016
|
+
marginTop: '0.75rem',
|
|
1017
|
+
display: 'block'
|
|
1018
|
+
}
|
|
1019
|
+
}, linkText))));
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
var css_248z$m = ".page-module_pageLayout__W8mY7{display:flex;flex-direction:column;height:100%}.page-module_contentWrapper__B5NLi{flex:1 0 auto}.page-module_footerWrapper__eYNvc{flex-shrink:0}";
|
|
1023
|
+
var styles$l = {"pageLayout":"page-module_pageLayout__W8mY7","contentWrapper":"page-module_contentWrapper__B5NLi","footerWrapper":"page-module_footerWrapper__eYNvc"};
|
|
1024
|
+
styleInject(css_248z$m);
|
|
1025
|
+
|
|
1026
|
+
function Page(_ref) {
|
|
1027
|
+
var navigation = _ref.navigation,
|
|
1028
|
+
notification = _ref.notification,
|
|
1029
|
+
content = _ref.content,
|
|
1030
|
+
footer = _ref.footer,
|
|
1031
|
+
className = _ref.className;
|
|
1032
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1033
|
+
className: classNames(styles$l.pageLayout, className)
|
|
1034
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1035
|
+
className: styles$l.headerWrapper
|
|
1036
|
+
}, navigation, notification), /*#__PURE__*/React__default.createElement("div", {
|
|
1037
|
+
className: styles$l.contentWrapper
|
|
1038
|
+
}, content), /*#__PURE__*/React__default.createElement("div", {
|
|
1039
|
+
className: styles$l.footerWrapper
|
|
1040
|
+
}, footer));
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
var css_248z$l = ".list-module_list__Xs25k{--spacing:0;display:flex;flex-direction:column;list-style-type:none;margin:0;padding:0}.list-module_list__Xs25k li:not(:last-child){margin-bottom:var(--spacing)}.list-module_spacing-4-xs__upUeV{--spacing:0.125rem}.list-module_spacing-3-xs__OaNO0{--spacing:0.25rem}.list-module_spacing-2-xs__vmsPC{--spacing:0.5rem}.list-module_spacing-xs__Nxd9l{--spacing:0.75rem}.list-module_spacing-s__FctYR{--spacing:1rem}.list-module_spacing-m__ts8Or{--spacing:1.5rem}.list-module_spacing-l__2yHwE{--spacing:2rem}.list-module_spacing-xl__WD5HF{--spacing:2.5rem}.list-module_spacing-2-xl__UB4YJ{--spacing:3rem}.list-module_spacing-3-xl__dG8HW{--spacing:2.5rem}@media (min-width:768px){.list-module_spacing-3-xl__dG8HW{--spacing:3.5rem}}.list-module_spacing-4-xl__QMWQ4,.list-module_spacing-5-xl__-0oZL{--spacing:4rem}.list-module_spacing-layout-2-xs__4GzIt{--spacing:1rem}.list-module_spacing-layout-xs__-T7HA{--spacing:1.5rem}.list-module_spacing-layout-s__FJxQf{--spacing:2rem}.list-module_spacing-layout-m__gvgbH{--spacing:3rem}.list-module_spacing-layout-l__o-Sr5{--spacing:4rem}.list-module_spacing-layout-xl__BMrbm{--spacing:6rem}.list-module_spacing-layout-2-xl__LZoYT{--spacing:8rem}";
|
|
1044
|
+
var styles$k = {"list":"list-module_list__Xs25k","spacing-4-xs":"list-module_spacing-4-xs__upUeV","spacing-3-xs":"list-module_spacing-3-xs__OaNO0","spacing-2-xs":"list-module_spacing-2-xs__vmsPC","spacing-xs":"list-module_spacing-xs__Nxd9l","spacing-s":"list-module_spacing-s__FctYR","spacing-m":"list-module_spacing-m__ts8Or","spacing-l":"list-module_spacing-l__2yHwE","spacing-xl":"list-module_spacing-xl__WD5HF","spacing-2-xl":"list-module_spacing-2-xl__UB4YJ","spacing-3-xl":"list-module_spacing-3-xl__dG8HW","spacing-4-xl":"list-module_spacing-4-xl__QMWQ4","spacing-5-xl":"list-module_spacing-5-xl__-0oZL","spacing-layout-2-xs":"list-module_spacing-layout-2-xs__4GzIt","spacing-layout-xs":"list-module_spacing-layout-xs__-T7HA","spacing-layout-s":"list-module_spacing-layout-s__FJxQf","spacing-layout-m":"list-module_spacing-layout-m__gvgbH","spacing-layout-l":"list-module_spacing-layout-l__o-Sr5","spacing-layout-xl":"list-module_spacing-layout-xl__BMrbm","spacing-layout-2-xl":"list-module_spacing-layout-2-xl__LZoYT"};
|
|
1045
|
+
styleInject(css_248z$l);
|
|
1046
|
+
|
|
1047
|
+
function getKey() {
|
|
1048
|
+
for (var _len = arguments.length, elements = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1049
|
+
elements[_key] = arguments[_key];
|
|
1050
|
+
}
|
|
1051
|
+
return elements.reduce(function (acc, element) {
|
|
1052
|
+
return "".concat(acc).concat(element.key);
|
|
1053
|
+
}, '');
|
|
1054
|
+
}
|
|
1055
|
+
function List(_ref) {
|
|
1056
|
+
var items = _ref.items,
|
|
1057
|
+
_ref$variant = _ref.variant,
|
|
1058
|
+
variant = _ref$variant === void 0 ? 'spacing-m' : _ref$variant;
|
|
1059
|
+
return /*#__PURE__*/React__default.createElement("ul", {
|
|
1060
|
+
className: classNames(styles$k.list, styles$k[variant])
|
|
1061
|
+
}, items === null || items === void 0 ? void 0 : items.map(function (item) {
|
|
1062
|
+
return item ? (/*#__PURE__*/React__default.createElement("li", {
|
|
1063
|
+
key: Array.isArray(item) ? getKey.apply(void 0, _toConsumableArray(item)) : getKey(item)
|
|
1064
|
+
}, item)) : null;
|
|
1065
|
+
}));
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
var css_248z$k = ".sidebarContentLinkList-module_listContainer__1ObXc{margin-top:var(--spacing-s)}@media (min-width:768px){.sidebarContentLinkList-module_listContainer__1ObXc{margin-top:var(--spacing-xl)}}.sidebarContentLinkList-module_descriptionContainer__KA-YU{margin-bottom:1.5rem}.sidebarContentLinkList-module_link__zec26{align-items:center;background:#f2f2f2;color:#1a1a1a;display:flex;font-weight:500;justify-content:space-between;padding:1.5rem;text-decoration:none}.sidebarContentLinkList-module_link__zec26 svg{margin:0 .5rem}";
|
|
1069
|
+
var styles$j = {"listContainer":"sidebarContentLinkList-module_listContainer__1ObXc","descriptionContainer":"sidebarContentLinkList-module_descriptionContainer__KA-YU","link":"sidebarContentLinkList-module_link__zec26"};
|
|
1070
|
+
styleInject(css_248z$k);
|
|
1071
|
+
|
|
1072
|
+
function SidebarContentLinkList(_ref) {
|
|
1073
|
+
var anchor = _ref.anchor,
|
|
1074
|
+
title = _ref.title,
|
|
1075
|
+
description = _ref.description,
|
|
1076
|
+
links = _ref.links;
|
|
1077
|
+
var _useConfig = useConfig(),
|
|
1078
|
+
getIsHrefExternal = _useConfig.utils.getIsHrefExternal;
|
|
1079
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1080
|
+
className: styles$j.listContainer,
|
|
1081
|
+
id: anchor || undefined
|
|
1082
|
+
}, /*#__PURE__*/React__default.createElement("h2", null, title), description && (/*#__PURE__*/React__default.createElement("div", {
|
|
1083
|
+
className: styles$j.descriptionContainer
|
|
1084
|
+
}, /*#__PURE__*/React__default.createElement(HtmlToReact, null, description))), /*#__PURE__*/React__default.createElement(List, {
|
|
1085
|
+
variant: "spacing-s",
|
|
1086
|
+
items: links === null || links === void 0 ? void 0 : links.filter(function (item) {
|
|
1087
|
+
return isLinkItem(item);
|
|
1088
|
+
}).map(function (link) {
|
|
1089
|
+
return /*#__PURE__*/React__default.createElement(Link, {
|
|
1090
|
+
key: link.title,
|
|
1091
|
+
href: parse(link.url).toString() || '#',
|
|
1092
|
+
className: styles$j.link,
|
|
1093
|
+
iconRight: !getIsHrefExternal(link.url) && (/*#__PURE__*/React__default.createElement(IconArrowRight, {
|
|
1094
|
+
"aria-hidden": "true"
|
|
1095
|
+
}))
|
|
1096
|
+
}, link.title);
|
|
1097
|
+
})
|
|
1098
|
+
}));
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
var css_248z$j = ".sidebarContentCard-module_content__2tR4I{color:var(#1a1a1a);padding:0 1.5rem}.sidebarContentCard-module_link__-D8VG{display:flex;font-size:20px;justify-content:space-between;line-height:27px;text-decoration:none}.sidebarContentCard-module_link__-D8VG:hover{text-decoration:underline}figure{margin:0;padding:0}.sidebarContentCard-module_image__aZqzh{height:13rem;object-fit:cover;overflow:hidden;position:relative;width:100%}.sidebarContentCard-module_publishingDate__90R9P{color:var(#595959);margin:.5rem 0}";
|
|
1102
|
+
var styles$i = {"content":"sidebarContentCard-module_content__2tR4I","link":"sidebarContentCard-module_link__-D8VG","image":"sidebarContentCard-module_image__aZqzh","publishingDate":"sidebarContentCard-module_publishingDate__90R9P"};
|
|
1103
|
+
styleInject(css_248z$j);
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Tests if an image at a given URL loads successfully,
|
|
1107
|
+
* using AbortController for clean event listener management.
|
|
1108
|
+
*
|
|
1109
|
+
* @param {string} [url] - The URL of the image to test.
|
|
1110
|
+
* @return {Promise<void>} - A promise that resolves if the image loads, and rejects otherwise.
|
|
1111
|
+
*/
|
|
1112
|
+
var testImage = function testImage(url) {
|
|
1113
|
+
if (!url) {
|
|
1114
|
+
return Promise.reject(new Error('No image URL given'));
|
|
1115
|
+
}
|
|
1116
|
+
var imgElement = new Image();
|
|
1117
|
+
// Create the controller instance
|
|
1118
|
+
var controller = new AbortController();
|
|
1119
|
+
var signal = controller.signal;
|
|
1120
|
+
return new Promise(function (resolve, reject) {
|
|
1121
|
+
// The { signal } option ensures these listeners are grouped for cleanup
|
|
1122
|
+
imgElement.addEventListener('load', function () {
|
|
1123
|
+
controller.abort(); // Triggers removal of ALL listeners attached to this signal
|
|
1124
|
+
resolve();
|
|
1125
|
+
}, {
|
|
1126
|
+
signal: signal
|
|
1127
|
+
});
|
|
1128
|
+
imgElement.addEventListener('error', function () {
|
|
1129
|
+
controller.abort(); // Triggers removal of ALL listeners attached to this signal
|
|
1130
|
+
// Reject with a standard Error object
|
|
1131
|
+
reject(new Error("Failed to load image from URL: ".concat(url)));
|
|
1132
|
+
}, {
|
|
1133
|
+
signal: signal
|
|
1134
|
+
});
|
|
1135
|
+
imgElement.src = url;
|
|
1136
|
+
});
|
|
1137
|
+
// Note: The controller is self-contained and cleaned up when the promise resolves/rejects
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
var useResolveImageUrl = function useResolveImageUrl(_ref) {
|
|
1141
|
+
var id = _ref.id,
|
|
1142
|
+
url = _ref.url,
|
|
1143
|
+
customFallbackUrl = _ref.customFallbackUrl;
|
|
1144
|
+
var _useConfig = useConfig(),
|
|
1145
|
+
fallbackImageUrls = _useConfig.fallbackImageUrls;
|
|
1146
|
+
var _React$useState = React__default.useState(false),
|
|
1147
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1148
|
+
showFallbackImage = _React$useState2[0],
|
|
1149
|
+
setShowFallbackImage = _React$useState2[1];
|
|
1150
|
+
React__default.useEffect(function () {
|
|
1151
|
+
var testThatImageExist = /*#__PURE__*/function () {
|
|
1152
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
1153
|
+
return _regenerator().w(function (_context) {
|
|
1154
|
+
while (1) switch (_context.p = _context.n) {
|
|
1155
|
+
case 0:
|
|
1156
|
+
_context.p = 0;
|
|
1157
|
+
_context.n = 1;
|
|
1158
|
+
return testImage(url !== null && url !== void 0 ? url : undefined);
|
|
1159
|
+
case 1:
|
|
1160
|
+
_context.n = 3;
|
|
1161
|
+
break;
|
|
1162
|
+
case 2:
|
|
1163
|
+
_context.p = 2;
|
|
1164
|
+
_context.v;
|
|
1165
|
+
setShowFallbackImage(true);
|
|
1166
|
+
case 3:
|
|
1167
|
+
return _context.a(2);
|
|
1168
|
+
}
|
|
1169
|
+
}, _callee, null, [[0, 2]]);
|
|
1170
|
+
}));
|
|
1171
|
+
return function testThatImageExist() {
|
|
1172
|
+
return _ref2.apply(this, arguments);
|
|
1173
|
+
};
|
|
1174
|
+
}();
|
|
1175
|
+
if (url) {
|
|
1176
|
+
testThatImageExist();
|
|
1177
|
+
} else {
|
|
1178
|
+
setShowFallbackImage(true);
|
|
1179
|
+
}
|
|
1180
|
+
}, [url]);
|
|
1181
|
+
var randomIndex = Math.abs(hash(id !== null && id !== void 0 ? id : '')) % fallbackImageUrls.length;
|
|
1182
|
+
return !url || showFallbackImage ? customFallbackUrl !== null && customFallbackUrl !== void 0 ? customFallbackUrl : fallbackImageUrls[randomIndex] : url;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
var _excluded$8 = ["id", "src", "alt", "customFallbackSrc", "caption", "style"];
|
|
1186
|
+
function Image$1(_ref) {
|
|
1187
|
+
var id = _ref.id,
|
|
1188
|
+
src = _ref.src,
|
|
1189
|
+
alt = _ref.alt,
|
|
1190
|
+
customFallbackSrc = _ref.customFallbackSrc,
|
|
1191
|
+
caption = _ref.caption,
|
|
1192
|
+
style = _ref.style,
|
|
1193
|
+
imageProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
1194
|
+
var resolvedUrl = useResolveImageUrl({
|
|
1195
|
+
id: id,
|
|
1196
|
+
url: src,
|
|
1197
|
+
customFallbackUrl: customFallbackSrc
|
|
1198
|
+
});
|
|
1199
|
+
return /*#__PURE__*/React__default.createElement("figure", {
|
|
1200
|
+
style: style
|
|
1201
|
+
}, /*#__PURE__*/React__default.createElement("img", _objectSpread2(_objectSpread2({}, imageProps), {}, {
|
|
1202
|
+
src: resolvedUrl,
|
|
1203
|
+
alt: alt
|
|
1204
|
+
})), caption && /*#__PURE__*/React__default.createElement("figcaption", null, caption));
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* @param {dateTime} dateTime - date as string to format to 'd.M.yyyy'.
|
|
1209
|
+
* @return {string} - Formatted date.
|
|
1210
|
+
*/
|
|
1211
|
+
var formatDateFromString = function formatDateFromString(dateTime) {
|
|
1212
|
+
return format(parseISO(dateTime), 'd.M.yyyy');
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
function SidebarContentCard(_ref) {
|
|
1216
|
+
var id = _ref.id,
|
|
1217
|
+
title = _ref.title,
|
|
1218
|
+
url = _ref.url,
|
|
1219
|
+
imageUrl = _ref.imageUrl,
|
|
1220
|
+
imageAlt = _ref.imageAlt,
|
|
1221
|
+
description = _ref.description,
|
|
1222
|
+
publishingDate = _ref.publishingDate;
|
|
1223
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1224
|
+
className: styles$i.container
|
|
1225
|
+
}, /*#__PURE__*/React__default.createElement(Image$1, {
|
|
1226
|
+
id: id,
|
|
1227
|
+
className: styles$i.image,
|
|
1228
|
+
src: imageUrl !== null && imageUrl !== void 0 ? imageUrl : '',
|
|
1229
|
+
alt: imageAlt !== null && imageAlt !== void 0 ? imageAlt : ''
|
|
1230
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1231
|
+
className: styles$i.content
|
|
1232
|
+
}, description && /*#__PURE__*/React__default.createElement("p", {
|
|
1233
|
+
className: styles$i.description
|
|
1234
|
+
}, description), /*#__PURE__*/React__default.createElement(Link, {
|
|
1235
|
+
className: styles$i.link,
|
|
1236
|
+
href: url
|
|
1237
|
+
}, title), publishingDate && (/*#__PURE__*/React__default.createElement("p", {
|
|
1238
|
+
className: styles$i.publishingDate
|
|
1239
|
+
}, formatDateFromString(publishingDate)))));
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
function PostListItem(_ref) {
|
|
1243
|
+
var _featuredImage$node, _featuredImage$node2;
|
|
1244
|
+
var id = _ref.id,
|
|
1245
|
+
moduleItemType = _ref.moduleItemType,
|
|
1246
|
+
title = _ref.title,
|
|
1247
|
+
link = _ref.link,
|
|
1248
|
+
featuredImage = _ref.featuredImage,
|
|
1249
|
+
date = _ref.date;
|
|
1250
|
+
var url = useHeadlessCmsLink(link !== null && link !== void 0 ? link : '#', moduleItemType);
|
|
1251
|
+
if (!title || !url) {
|
|
1252
|
+
return null;
|
|
1253
|
+
}
|
|
1254
|
+
return /*#__PURE__*/React__default.createElement(SidebarContentCard, {
|
|
1255
|
+
key: id,
|
|
1256
|
+
id: id,
|
|
1257
|
+
title: title,
|
|
1258
|
+
publishingDate: date !== null && date !== void 0 ? date : undefined,
|
|
1259
|
+
url: url,
|
|
1260
|
+
imageUrl: (featuredImage === null || featuredImage === void 0 || (_featuredImage$node = featuredImage.node) === null || _featuredImage$node === void 0 ? void 0 : _featuredImage$node.medium) || undefined,
|
|
1261
|
+
imageAlt: (featuredImage === null || featuredImage === void 0 || (_featuredImage$node2 = featuredImage.node) === null || _featuredImage$node2 === void 0 ? void 0 : _featuredImage$node2.altText) || undefined
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
var css_248z$i = ".pageModules-module_pageModuleWrapper__G0ur8{margin:var(--spacing-layout-2-xs) 0}@media (min-width:576px){.pageModules-module_pageModuleWrapper__G0ur8{margin:var(--spacing-layout-s) 0}}.pageModules-module_pageModuleWrapper__G0ur8.pageModules-module_withPadding__XY5q4{padding:30px}.pageModules-module_pageModuleWrapper__G0ur8.pageModules-module_contentModuleWrapper__XSl5n p{margin:0!important}.pageModules-module_cardsWrapper__r-ISp{grid-gap:var(--spacing-layout-xs);grid-row-gap:var(--spacing-layout-xs);display:grid;grid-auto-rows:1fr;grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}.pageModules-module_cardsWrapper__r-ISp.pageModules-module_singleGridWrapper__K4Sb-{display:flex;gap:var(--spacing-layout-xs)}.pageModules-module_cardsWrapper__r-ISp.pageModules-module_singleGridWrapper__K4Sb->div{min-width:248px;width:100%}@media (min-width:1248px){.pageModules-module_cardsWrapper__r-ISp.pageModules-module_flexWrapper__1RWcF{display:flex;gap:var(--spacing-layout-xs)}.pageModules-module_cardsWrapper__r-ISp.pageModules-module_flexWrapper__1RWcF>div{min-width:248px;width:100%}}@media (max-width:767px){.pageModules-module_cardsWrapper__r-ISp{display:flex;flex-direction:column;gap:var(--spacing-layout-2-xs)}.pageModules-module_cardsWrapper__r-ISp>div{width:100%}}.pageModules-module_cardWrapper__161IL{display:flex;flex-direction:column;padding:30px}.pageModules-module_cardWrapper__161IL.pageModules-module_horisontal__SZ9pe{flex-direction:row;justify-content:flex-start}@media (max-width:575px){.pageModules-module_cardWrapper__161IL.pageModules-module_horisontal__SZ9pe{flex-direction:column}}.pageModules-module_cardWrapper__161IL svg{height:84px;width:84px}.pageModules-module_cardContent__njye1{align-items:flex-start;display:flex;flex-direction:column;gap:8px;height:100%}.pageModules-module_cardContent__njye1 .pageModules-module_title__ZEkpb{font-size:32px;margin-bottom:16px}.pageModules-module_cardContent__njye1 .pageModules-module_description__wer72{font-size:18px;line-height:28px;margin-bottom:var(--spacing-layout-xs)}.pageModules-module_cardContent__njye1 .pageModules-module_button__ZJnEW{align-items:flex-end;display:flex;flex-grow:1;width:100%}@media (max-width:575px){.pageModules-module_cardContent__njye1 .pageModules-module_button__ZJnEW button{width:100%}}.pageModules-module_cardContent__njye1 .pageModules-module_button__ZJnEW button div{min-width:var(--spacing-layout-xs)}.pageModules-module_cardIconWrapper__FD0HA{align-items:center;display:flex;justify-content:center;margin-bottom:16px;margin-right:0}@media (min-width:576px){.pageModules-module_cardIconWrapper__FD0HA.pageModules-module_horisontal__SZ9pe{align-items:flex-start;justify-content:flex-start;margin-bottom:16px;margin-right:30px}}.pageModules-module_fallbackIcon__UkRf9{height:84px;width:84px}.pageModules-module_stepsContainer__QZUUF>div>p{font-size:var(--fontsize-body-l)}";
|
|
1266
|
+
var styles$h = {"pageModuleWrapper":"pageModules-module_pageModuleWrapper__G0ur8","withPadding":"pageModules-module_withPadding__XY5q4","contentModuleWrapper":"pageModules-module_contentModuleWrapper__XSl5n","cardsWrapper":"pageModules-module_cardsWrapper__r-ISp","singleGridWrapper":"pageModules-module_singleGridWrapper__K4Sb-","flexWrapper":"pageModules-module_flexWrapper__1RWcF","cardWrapper":"pageModules-module_cardWrapper__161IL","horisontal":"pageModules-module_horisontal__SZ9pe","cardContent":"pageModules-module_cardContent__njye1","title":"pageModules-module_title__ZEkpb","description":"pageModules-module_description__wer72","button":"pageModules-module_button__ZJnEW","cardIconWrapper":"pageModules-module_cardIconWrapper__FD0HA","fallbackIcon":"pageModules-module_fallbackIcon__UkRf9","stepsContainer":"pageModules-module_stepsContainer__QZUUF"};
|
|
1267
|
+
styleInject(css_248z$i);
|
|
1268
|
+
|
|
1269
|
+
var css_248z$h = ".background-module_backgroundDefault__oNBmg{background-color:#fff}.background-module_backgroundCoatOfArms__Gy7-O{background-color:var(--color-coat-of-arms)}.background-module_backgroundGold__a0v0r{background-color:var(--color-gold)}.background-module_backgroundSilver__3n9-1{background-color:var(--color-silver)}.background-module_backgroundBrick__KQ5-r{background-color:var(--color-brick)}.background-module_backgroundBus__SLG7F{background-color:var(--color-bus)}.background-module_backgroundCopper__z2Ao1{background-color:var(--color-copper)}.background-module_backgroundEngel__w7K1V{background-color:var(--color-engel)}.background-module_backgroundFog__MuhoU{background-color:var(--color-fog)}.background-module_backgroundMetro__c31k-{background-color:var(--color-metro)}.background-module_backgroundSummer__mt065{background-color:var(--color-summer)}.background-module_backgroundSuomenlinna__RYiBo{background-color:var(--color-suomenlinna)}.background-module_backgroundTram__s3zOs{background-color:var(--color-tram)}.background-module_backgroundListItemCoatOfArms__mz0mZ li{background-color:var(--color-coat-of-arms)}.background-module_backgroundListItemGold__pcxAJ li{background-color:var(--color-gold)}.background-module_backgroundListItemSilver__--1w4 li{background-color:var(--color-silver)}.background-module_backgroundListItemBrick__j37LO li{background-color:var(--color-brick)}.background-module_backgroundListItemBus__2TLWo li{background-color:var(--color-bus)}.background-module_backgroundListItemCopper__bLGlk li{background-color:var(--color-copper)}.background-module_backgroundListItemEngel__nCn2b li{background-color:var(--color-engel)}.background-module_backgroundListItemFog__it1l0 li{background-color:var(--color-fog)}.background-module_backgroundListItemMetro__2ilGY li{background-color:var(--color-metro)}.background-module_backgroundListItemSummer__BGnjF li{background-color:var(--color-summer)}.background-module_backgroundListItemSuomenlinna__M9QNF li{background-color:var(--color-suomenlinna)}.background-module_backgroundListItemTram__WPUzf li{background-color:var(--color-tram)}.background-module_whiteText__f5V26,.background-module_whiteText__f5V26 h1{color:var(--color-white)!important}.background-module_whiteTextList__pTdu- li{color:var(--color-white)}.background-module_whiteTextList__pTdu- li:after{color:var(--color-black)}.background-module_whiteButton__O5neh button{border-color:var(--color-white)!important;color:var(--color-white)}.background-module_whiteLink__ZzvS0 path{color:var(--color-white)}";
|
|
1270
|
+
var colorStyles = {"backgroundDefault":"background-module_backgroundDefault__oNBmg","backgroundCoatOfArms":"background-module_backgroundCoatOfArms__Gy7-O","backgroundGold":"background-module_backgroundGold__a0v0r","backgroundSilver":"background-module_backgroundSilver__3n9-1","backgroundBrick":"background-module_backgroundBrick__KQ5-r","backgroundBus":"background-module_backgroundBus__SLG7F","backgroundCopper":"background-module_backgroundCopper__z2Ao1","backgroundEngel":"background-module_backgroundEngel__w7K1V","backgroundFog":"background-module_backgroundFog__MuhoU","backgroundMetro":"background-module_backgroundMetro__c31k-","backgroundSummer":"background-module_backgroundSummer__mt065","backgroundSuomenlinna":"background-module_backgroundSuomenlinna__RYiBo","backgroundTram":"background-module_backgroundTram__s3zOs","backgroundListItemCoatOfArms":"background-module_backgroundListItemCoatOfArms__mz0mZ","backgroundListItemGold":"background-module_backgroundListItemGold__pcxAJ","backgroundListItemSilver":"background-module_backgroundListItemSilver__--1w4","backgroundListItemBrick":"background-module_backgroundListItemBrick__j37LO","backgroundListItemBus":"background-module_backgroundListItemBus__2TLWo","backgroundListItemCopper":"background-module_backgroundListItemCopper__bLGlk","backgroundListItemEngel":"background-module_backgroundListItemEngel__nCn2b","backgroundListItemFog":"background-module_backgroundListItemFog__it1l0","backgroundListItemMetro":"background-module_backgroundListItemMetro__2ilGY","backgroundListItemSummer":"background-module_backgroundListItemSummer__BGnjF","backgroundListItemSuomenlinna":"background-module_backgroundListItemSuomenlinna__M9QNF","backgroundListItemTram":"background-module_backgroundListItemTram__WPUzf","whiteText":"background-module_whiteText__f5V26","whiteTextList":"background-module_whiteTextList__pTdu-","whiteButton":"background-module_whiteButton__O5neh","whiteLink":"background-module_whiteLink__ZzvS0"};
|
|
1271
|
+
styleInject(css_248z$h);
|
|
1272
|
+
|
|
1273
|
+
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
1274
|
+
__assign$1 = Object.assign || function(t) {
|
|
1275
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1276
|
+
s = arguments[i];
|
|
1277
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
1278
|
+
t[p] = s[p];
|
|
1279
|
+
}
|
|
1280
|
+
return t;
|
|
1281
|
+
};
|
|
1282
|
+
return __assign$1.apply(this, arguments);
|
|
1283
|
+
};
|
|
1284
|
+
// This file is autogenerated by tools/process-named-references.ts
|
|
1285
|
+
var pairDivider = "~";
|
|
1286
|
+
var blockDivider = "~~";
|
|
1287
|
+
function generateNamedReferences(input, prev) {
|
|
1288
|
+
var entities = {};
|
|
1289
|
+
var characters = {};
|
|
1290
|
+
var blocks = input.split(blockDivider);
|
|
1291
|
+
var isOptionalBlock = false;
|
|
1292
|
+
for (var i = 0; blocks.length > i; i++) {
|
|
1293
|
+
var entries = blocks[i].split(pairDivider);
|
|
1294
|
+
for (var j = 0; j < entries.length; j += 2) {
|
|
1295
|
+
var entity = entries[j];
|
|
1296
|
+
var character = entries[j + 1];
|
|
1297
|
+
var fullEntity = '&' + entity + ';';
|
|
1298
|
+
entities[fullEntity] = character;
|
|
1299
|
+
if (isOptionalBlock) {
|
|
1300
|
+
entities['&' + entity] = character;
|
|
1301
|
+
}
|
|
1302
|
+
characters[character] = fullEntity;
|
|
1303
|
+
}
|
|
1304
|
+
isOptionalBlock = true;
|
|
1305
|
+
}
|
|
1306
|
+
return prev ?
|
|
1307
|
+
{ entities: __assign$1(__assign$1({}, entities), prev.entities), characters: __assign$1(__assign$1({}, characters), prev.characters) } :
|
|
1308
|
+
{ entities: entities, characters: characters };
|
|
1309
|
+
}
|
|
1310
|
+
var bodyRegExps = {
|
|
1311
|
+
xml: /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,
|
|
1312
|
+
html4: /∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,
|
|
1313
|
+
html5: /·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g
|
|
1314
|
+
};
|
|
1315
|
+
var namedReferences = {};
|
|
1316
|
+
namedReferences['xml'] = generateNamedReferences("lt~<~gt~>~quot~\"~apos~'~amp~&");
|
|
1317
|
+
namedReferences['html4'] = generateNamedReferences("apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~~zwj~~lrm~~rlm~~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~\"~amp~&~lt~<~gt~>");
|
|
1318
|
+
namedReferences['html5'] = generateNamedReferences("Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~~InvisibleTimes~~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~~NegativeThickSpace~~NegativeThinSpace~~NegativeVeryThinSpace~~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~\t~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~ ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~\"~REG~®", namedReferences['html4']);
|
|
1319
|
+
|
|
1320
|
+
var numericUnicodeMap = {
|
|
1321
|
+
0: 65533,
|
|
1322
|
+
128: 8364,
|
|
1323
|
+
130: 8218,
|
|
1324
|
+
131: 402,
|
|
1325
|
+
132: 8222,
|
|
1326
|
+
133: 8230,
|
|
1327
|
+
134: 8224,
|
|
1328
|
+
135: 8225,
|
|
1329
|
+
136: 710,
|
|
1330
|
+
137: 8240,
|
|
1331
|
+
138: 352,
|
|
1332
|
+
139: 8249,
|
|
1333
|
+
140: 338,
|
|
1334
|
+
142: 381,
|
|
1335
|
+
145: 8216,
|
|
1336
|
+
146: 8217,
|
|
1337
|
+
147: 8220,
|
|
1338
|
+
148: 8221,
|
|
1339
|
+
149: 8226,
|
|
1340
|
+
150: 8211,
|
|
1341
|
+
151: 8212,
|
|
1342
|
+
152: 732,
|
|
1343
|
+
153: 8482,
|
|
1344
|
+
154: 353,
|
|
1345
|
+
155: 8250,
|
|
1346
|
+
156: 339,
|
|
1347
|
+
158: 382,
|
|
1348
|
+
159: 376
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
var fromCodePoint = String.fromCodePoint ||
|
|
1352
|
+
function (astralCodePoint) {
|
|
1353
|
+
return String.fromCharCode(Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800, ((astralCodePoint - 0x10000) % 0x400) + 0xdc00);
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
1357
|
+
__assign = Object.assign || function(t) {
|
|
1358
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1359
|
+
s = arguments[i];
|
|
1360
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
1361
|
+
t[p] = s[p];
|
|
1362
|
+
}
|
|
1363
|
+
return t;
|
|
1364
|
+
};
|
|
1365
|
+
return __assign.apply(this, arguments);
|
|
1366
|
+
};
|
|
1367
|
+
var allNamedReferences = __assign(__assign({}, namedReferences), { all: namedReferences.html5 });
|
|
1368
|
+
var defaultDecodeOptions = {
|
|
1369
|
+
scope: 'body',
|
|
1370
|
+
level: 'all'
|
|
1371
|
+
};
|
|
1372
|
+
var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;
|
|
1373
|
+
var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;
|
|
1374
|
+
var baseDecodeRegExps = {
|
|
1375
|
+
xml: {
|
|
1376
|
+
strict: strict,
|
|
1377
|
+
attribute: attribute,
|
|
1378
|
+
body: bodyRegExps.xml
|
|
1379
|
+
},
|
|
1380
|
+
html4: {
|
|
1381
|
+
strict: strict,
|
|
1382
|
+
attribute: attribute,
|
|
1383
|
+
body: bodyRegExps.html4
|
|
1384
|
+
},
|
|
1385
|
+
html5: {
|
|
1386
|
+
strict: strict,
|
|
1387
|
+
attribute: attribute,
|
|
1388
|
+
body: bodyRegExps.html5
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 });
|
|
1392
|
+
var fromCharCode = String.fromCharCode;
|
|
1393
|
+
var outOfBoundsChar = fromCharCode(65533);
|
|
1394
|
+
function getDecodedEntity(entity, references, isAttribute, isStrict) {
|
|
1395
|
+
var decodeResult = entity;
|
|
1396
|
+
var decodeEntityLastChar = entity[entity.length - 1];
|
|
1397
|
+
if (isAttribute && decodeEntityLastChar === '=') {
|
|
1398
|
+
decodeResult = entity;
|
|
1399
|
+
}
|
|
1400
|
+
else if (isStrict && decodeEntityLastChar !== ';') {
|
|
1401
|
+
decodeResult = entity;
|
|
1402
|
+
}
|
|
1403
|
+
else {
|
|
1404
|
+
var decodeResultByReference = references[entity];
|
|
1405
|
+
if (decodeResultByReference) {
|
|
1406
|
+
decodeResult = decodeResultByReference;
|
|
1407
|
+
}
|
|
1408
|
+
else if (entity[0] === '&' && entity[1] === '#') {
|
|
1409
|
+
var decodeSecondChar = entity[2];
|
|
1410
|
+
var decodeCode = decodeSecondChar == 'x' || decodeSecondChar == 'X'
|
|
1411
|
+
? parseInt(entity.substr(3), 16)
|
|
1412
|
+
: parseInt(entity.substr(2));
|
|
1413
|
+
decodeResult =
|
|
1414
|
+
decodeCode >= 0x10ffff
|
|
1415
|
+
? outOfBoundsChar
|
|
1416
|
+
: decodeCode > 65535
|
|
1417
|
+
? fromCodePoint(decodeCode)
|
|
1418
|
+
: fromCharCode(numericUnicodeMap[decodeCode] || decodeCode);
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
return decodeResult;
|
|
1422
|
+
}
|
|
1423
|
+
/** Decodes all entities in the text */
|
|
1424
|
+
function decode(text, _a) {
|
|
1425
|
+
var _b = defaultDecodeOptions , _c = _b.level, level = _c === void 0 ? 'all' : _c, _d = _b.scope, scope = _d === void 0 ? level === 'xml' ? 'strict' : 'body' : _d;
|
|
1426
|
+
if (!text) {
|
|
1427
|
+
return '';
|
|
1428
|
+
}
|
|
1429
|
+
var decodeRegExp = decodeRegExps[level][scope];
|
|
1430
|
+
var references = allNamedReferences[level].entities;
|
|
1431
|
+
var isAttribute = scope === 'attribute';
|
|
1432
|
+
var isStrict = scope === 'strict';
|
|
1433
|
+
return text.replace(decodeRegExp, function (entity) { return getDecodedEntity(entity, references, isAttribute, isStrict); });
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
var SELECT_COLORS_LIGHT = ['coat-of-arms', 'brick', 'bus', 'tram'];
|
|
1437
|
+
// Helper to convert strings like 'coat-of-arms' to 'CoatOfArms'
|
|
1438
|
+
var toPascalCase = function toPascalCase(s) {
|
|
1439
|
+
return startCase(camelCase(s)).replace(/\s/g, '');
|
|
1440
|
+
};
|
|
1441
|
+
/**
|
|
1442
|
+
* Converts a string (e.g., 'coat-of-arms') into PascalCase (e.g., 'CoatOfArms').
|
|
1443
|
+
* @param {string} color The color string to convert.
|
|
1444
|
+
* @returns {string} The color string in PascalCase format.
|
|
1445
|
+
*/
|
|
1446
|
+
var getColor = function getColor(color) {
|
|
1447
|
+
return toPascalCase(color);
|
|
1448
|
+
};
|
|
1449
|
+
/**
|
|
1450
|
+
* Prepends 'icon-' to a name and converts it to PascalCase (e.g., 'icon-alert' to 'IconAlert').
|
|
1451
|
+
* @param {string} name The icon name part.
|
|
1452
|
+
* @returns {string} The icon name in PascalCase format.
|
|
1453
|
+
*/
|
|
1454
|
+
var getIconName = function getIconName(name) {
|
|
1455
|
+
return toPascalCase("icon-".concat(name));
|
|
1456
|
+
};
|
|
1457
|
+
/**
|
|
1458
|
+
* Strips all HTML tags from a string and decodes HTML entities.
|
|
1459
|
+
* Uses a safe regex (/<[^>]*>/gi) to prevent ReDoS (Regular Expression Denial of Service).
|
|
1460
|
+
*
|
|
1461
|
+
* @param {string} html The input string containing HTML markup.
|
|
1462
|
+
* @returns {string} The resulting text string with all HTML tags removed and entities decoded.
|
|
1463
|
+
*/
|
|
1464
|
+
var getTextFromHtml = function getTextFromHtml(html) {
|
|
1465
|
+
return decode(html.replace(/<[^>]*>/gi, ''));
|
|
1466
|
+
};
|
|
1467
|
+
/**
|
|
1468
|
+
* Checks if the text color should be white based on the background color.
|
|
1469
|
+
* @param {string} color The background color string.
|
|
1470
|
+
* @returns {boolean} True if white text should be used, false otherwise.
|
|
1471
|
+
*/
|
|
1472
|
+
var isWhiteText = function isWhiteText(color) {
|
|
1473
|
+
return SELECT_COLORS_LIGHT.includes(color);
|
|
1474
|
+
};
|
|
1475
|
+
|
|
1476
|
+
function Icon(_ref) {
|
|
1477
|
+
var name = _ref.name;
|
|
1478
|
+
var fallback = function fallback() {
|
|
1479
|
+
return /*#__PURE__*/React__default.createElement("div", null);
|
|
1480
|
+
};
|
|
1481
|
+
var IconComponent = React__default.useMemo(function () {
|
|
1482
|
+
return /*#__PURE__*/React__default.lazy(function () {
|
|
1483
|
+
return import('./index-B0pDvzoV.js').then(function (module) {
|
|
1484
|
+
return {
|
|
1485
|
+
"default": module[name] || fallback
|
|
1486
|
+
};
|
|
1487
|
+
});
|
|
1488
|
+
});
|
|
1489
|
+
}, [name]);
|
|
1490
|
+
return /*#__PURE__*/React__default.createElement(Suspense, {
|
|
1491
|
+
fallback: /*#__PURE__*/React__default.createElement("div", {
|
|
1492
|
+
className: styles$h.fallbackIcon
|
|
1493
|
+
})
|
|
1494
|
+
}, /*#__PURE__*/React__default.createElement(IconComponent, null));
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
function SimpleCard(_ref) {
|
|
1498
|
+
var title = _ref.title,
|
|
1499
|
+
description = _ref.description,
|
|
1500
|
+
backgroundColor = _ref.backgroundColor,
|
|
1501
|
+
icon = _ref.icon,
|
|
1502
|
+
linkTitle = _ref.linkTitle,
|
|
1503
|
+
linkTarget = _ref.linkTarget,
|
|
1504
|
+
linkUrl = _ref.linkUrl,
|
|
1505
|
+
_ref$direction = _ref.direction,
|
|
1506
|
+
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction;
|
|
1507
|
+
var _useConfig = useConfig(),
|
|
1508
|
+
redirectToUrl = _useConfig.utils.redirectToUrl;
|
|
1509
|
+
var openInNewTab = function openInNewTab(url) {
|
|
1510
|
+
var newWindow = window.open(url, '_blank', 'noopener,noreferrer');
|
|
1511
|
+
if (newWindow) newWindow.opener = null;
|
|
1512
|
+
};
|
|
1513
|
+
var handleClick = function handleClick() {
|
|
1514
|
+
if (linkUrl) {
|
|
1515
|
+
if (linkTarget === '_blank') {
|
|
1516
|
+
openInNewTab(linkUrl);
|
|
1517
|
+
} else {
|
|
1518
|
+
redirectToUrl(linkUrl);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1523
|
+
className: classNames(styles$h.cardWrapper, backgroundColor && colorStyles["background".concat(getColor(backgroundColor))], backgroundColor && isWhiteText(backgroundColor) && colorStyles.whiteText, direction && styles$h[direction])
|
|
1524
|
+
}, icon && (/*#__PURE__*/React__default.createElement("div", {
|
|
1525
|
+
className: classNames(styles$h.cardIconWrapper, direction && styles$h[direction])
|
|
1526
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
1527
|
+
name: getIconName(icon)
|
|
1528
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
1529
|
+
className: styles$h.cardContent
|
|
1530
|
+
}, title && /*#__PURE__*/React__default.createElement("div", {
|
|
1531
|
+
className: styles$h.title
|
|
1532
|
+
}, title), description && (/*#__PURE__*/React__default.createElement("div", {
|
|
1533
|
+
className: styles$h.description
|
|
1534
|
+
}, getTextFromHtml(description))), linkTitle && linkUrl && (/*#__PURE__*/React__default.createElement("div", {
|
|
1535
|
+
className: classNames(styles$h.button, backgroundColor && isWhiteText(backgroundColor) && colorStyles.whiteButton)
|
|
1536
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1537
|
+
style: direction === 'vertical' ? {
|
|
1538
|
+
width: '100%'
|
|
1539
|
+
} : {},
|
|
1540
|
+
variant: ButtonVariant.Secondary,
|
|
1541
|
+
theme: ButtonPresetTheme.Black,
|
|
1542
|
+
onClick: handleClick,
|
|
1543
|
+
iconStart: /*#__PURE__*/React__default.createElement(IconAngleRight, null)
|
|
1544
|
+
}, linkTitle)))));
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
var css_248z$g = ".sidebarCardsList-module_cardsContainer__JRK-Q div:not(:last-child){margin-bottom:var(--spacing)}";
|
|
1548
|
+
var styles$g = {"cardsContainer":"sidebarCardsList-module_cardsContainer__JRK-Q"};
|
|
1549
|
+
styleInject(css_248z$g);
|
|
1550
|
+
|
|
1551
|
+
function SidebarCardsList(_ref) {
|
|
1552
|
+
var cards = _ref.cards;
|
|
1553
|
+
var _useConfig = useConfig(),
|
|
1554
|
+
internalHrefOrigins = _useConfig.internalHrefOrigins,
|
|
1555
|
+
_useConfig$utils = _useConfig.utils,
|
|
1556
|
+
getIsHrefExternal = _useConfig$utils.getIsHrefExternal,
|
|
1557
|
+
getRoutedInternalHref = _useConfig$utils.getRoutedInternalHref;
|
|
1558
|
+
if ((cards === null || cards === void 0 ? void 0 : cards.length) === 0) {
|
|
1559
|
+
return null;
|
|
1560
|
+
}
|
|
1561
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1562
|
+
className: styles$g.cardsContainer
|
|
1563
|
+
}, cards === null || cards === void 0 ? void 0 : cards.filter(function (card) {
|
|
1564
|
+
return !!card;
|
|
1565
|
+
}).map(function (card) {
|
|
1566
|
+
var _card$link$url, _card$link, _card$title, _card$icon, _card$description, _card$backgroundColor, _card$link$title, _card$link2, _card$link$target, _card$link3;
|
|
1567
|
+
var uri = getUri((_card$link$url = (_card$link = card.link) === null || _card$link === void 0 ? void 0 : _card$link.url) !== null && _card$link$url !== void 0 ? _card$link$url : '#', internalHrefOrigins, getIsHrefExternal);
|
|
1568
|
+
var key = btoa("sidebar-card-".concat(card.title, "-").concat(uri));
|
|
1569
|
+
return /*#__PURE__*/React__default.createElement(SimpleCard, {
|
|
1570
|
+
key: key,
|
|
1571
|
+
title: (_card$title = card.title) !== null && _card$title !== void 0 ? _card$title : undefined,
|
|
1572
|
+
icon: (_card$icon = card.icon) !== null && _card$icon !== void 0 ? _card$icon : undefined,
|
|
1573
|
+
description: (_card$description = card.description) !== null && _card$description !== void 0 ? _card$description : undefined,
|
|
1574
|
+
backgroundColor: (_card$backgroundColor = card.backgroundColor) !== null && _card$backgroundColor !== void 0 ? _card$backgroundColor : undefined,
|
|
1575
|
+
linkUrl: getRoutedInternalHref(uri),
|
|
1576
|
+
linkTitle: (_card$link$title = (_card$link2 = card.link) === null || _card$link2 === void 0 ? void 0 : _card$link2.title) !== null && _card$link$title !== void 0 ? _card$link$title : undefined,
|
|
1577
|
+
linkTarget: (_card$link$target = (_card$link3 = card.link) === null || _card$link3 === void 0 ? void 0 : _card$link3.target) !== null && _card$link$target !== void 0 ? _card$link$target : undefined,
|
|
1578
|
+
direction: "vertical"
|
|
1579
|
+
});
|
|
1580
|
+
}));
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
function SidebarContent(_ref) {
|
|
1584
|
+
var _content$map;
|
|
1585
|
+
var content = _ref.content,
|
|
1586
|
+
_ref$SidebarContentLi = _ref.SidebarContentLinkListComponent,
|
|
1587
|
+
SidebarContentLinkListComponent = _ref$SidebarContentLi === void 0 ? SidebarContentLinkList : _ref$SidebarContentLi,
|
|
1588
|
+
_ref$SidebarPostListC = _ref.SidebarPostListComponent,
|
|
1589
|
+
SidebarPostListComponent = _ref$SidebarPostListC === void 0 ? List : _ref$SidebarPostListC,
|
|
1590
|
+
_ref$SideBarPostListI = _ref.SideBarPostListItemComponent,
|
|
1591
|
+
SideBarPostListItemComponent = _ref$SideBarPostListI === void 0 ? PostListItem : _ref$SideBarPostListI,
|
|
1592
|
+
_ref$SideBarCardsList = _ref.SideBarCardsListComponent,
|
|
1593
|
+
SideBarCardsListComponent = _ref$SideBarCardsList === void 0 ? SidebarCardsList : _ref$SideBarCardsList;
|
|
1594
|
+
return /*#__PURE__*/React__default.createElement(List, {
|
|
1595
|
+
variant: "spacing-3-xl",
|
|
1596
|
+
items: (_content$map = content === null || content === void 0 ? void 0 : content.map(function (item) {
|
|
1597
|
+
if (isLayoutLinkList(item)) {
|
|
1598
|
+
return /*#__PURE__*/React__default.createElement(SidebarContentLinkListComponent, {
|
|
1599
|
+
key: item.title,
|
|
1600
|
+
title: item.title,
|
|
1601
|
+
links: item.links,
|
|
1602
|
+
description: item.description,
|
|
1603
|
+
anchor: item.anchor
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
if (isLayoutPage(item)) {
|
|
1607
|
+
var _item$pages;
|
|
1608
|
+
return /*#__PURE__*/React__default.createElement(SidebarPostListComponent, {
|
|
1609
|
+
key: "pages",
|
|
1610
|
+
variant: "spacing-3-xl",
|
|
1611
|
+
items: item === null || item === void 0 || (_item$pages = item.pages) === null || _item$pages === void 0 ? void 0 : _item$pages.map(function (page, index) {
|
|
1612
|
+
var _page$id, _page$id2;
|
|
1613
|
+
return /*#__PURE__*/React__default.createElement(SideBarPostListItemComponent, _objectSpread2(_objectSpread2({}, page), {}, {
|
|
1614
|
+
key: (_page$id = page === null || page === void 0 ? void 0 : page.id) !== null && _page$id !== void 0 ? _page$id : "sidebar-post-list-page-".concat(index),
|
|
1615
|
+
id: (_page$id2 = page === null || page === void 0 ? void 0 : page.id) !== null && _page$id2 !== void 0 ? _page$id2 : "sidebar-post-list-page-".concat(index),
|
|
1616
|
+
moduleItemType: ModuleItemTypeEnum.Page
|
|
1617
|
+
}));
|
|
1618
|
+
})
|
|
1619
|
+
});
|
|
1620
|
+
}
|
|
1621
|
+
if (isLayoutArticle(item)) {
|
|
1622
|
+
var _item$articles;
|
|
1623
|
+
return /*#__PURE__*/React__default.createElement(SidebarPostListComponent, {
|
|
1624
|
+
key: "articles",
|
|
1625
|
+
variant: "spacing-3-xl",
|
|
1626
|
+
items: item === null || item === void 0 || (_item$articles = item.articles) === null || _item$articles === void 0 ? void 0 : _item$articles.map(function (article, index) {
|
|
1627
|
+
var _article$id, _article$id2;
|
|
1628
|
+
return /*#__PURE__*/React__default.createElement(SideBarPostListItemComponent, _objectSpread2(_objectSpread2({
|
|
1629
|
+
key: (_article$id = article === null || article === void 0 ? void 0 : article.id) !== null && _article$id !== void 0 ? _article$id : "sidebar-post-list-article-".concat(index),
|
|
1630
|
+
id: (_article$id2 = article === null || article === void 0 ? void 0 : article.id) !== null && _article$id2 !== void 0 ? _article$id2 : "sidebar-post-list-article-".concat(index)
|
|
1631
|
+
}, article), {}, {
|
|
1632
|
+
moduleItemType: ModuleItemTypeEnum.Article
|
|
1633
|
+
}));
|
|
1634
|
+
})
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
if (isLayoutCards(item)) {
|
|
1638
|
+
return /*#__PURE__*/React__default.createElement(SideBarCardsListComponent, {
|
|
1639
|
+
key: "cards",
|
|
1640
|
+
cards: item.cards
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
return null;
|
|
1644
|
+
})) !== null && _content$map !== void 0 ? _content$map : []
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
var css_248z$f = "@charset \"UTF-8\";.pageContentLayout-module_contentLayout__DP-wd{--padding:1rem;--max-width:calc(1200px + (2 * var(--padding)));display:flex;flex-direction:column;height:100%;overflow:hidden}.pageContentLayout-module_contentLayout__DP-wd>:not(:last-child){margin-bottom:1rem}@media screen and (min-width:768px){.pageContentLayout-module_contentLayout__DP-wd{--padding:1.5rem}}.pageContentLayout-module_breadcrumbs__btTiJ{box-sizing:border-box;margin:0 auto;margin-bottom:0!important;max-width:var(--max-width);padding:0 var(--padding);width:100%}.pageContentLayout-module_mainLayout__7X1d6{display:flex;flex:1;flex-direction:column;width:100%}.pageContentLayout-module_contentWrapper__Yw2-t{flex-grow:1}.pageContentLayout-module_contentWrapper__Yw2-t.pageContentLayout-module_withBorder__EhVXW{border-top:1px solid var(--color-black-20)}.pageContentLayout-module_content__-pxH-{display:grid;width:100%}@media screen and (min-width:768px){.pageContentLayout-module_content__-pxH->:first-child{margin-right:22px}.pageContentLayout-module_content__-pxH- aside{margin-left:22px;margin-top:2rem}}@media (max-width:767px){.pageContentLayout-module_content__-pxH- aside{padding-top:var(--spacing-xl)}}@media (min-width:768px){.pageContentLayout-module_content__-pxH-{grid-template-columns:2fr 1fr;grid-template-rows:auto 1fr}.pageContentLayout-module_content__-pxH- .pageContentLayout-module_mainContent __pc2CY{grid-column:1}.pageContentLayout-module_content__-pxH- aside{grid-column:2;grid-row:1/span 2}.pageContentLayout-module_content__-pxH- .pageContentLayout-module_shareLinks__vJ7mJ{grid-column:1}}.pageContentLayout-module_content__-pxH- a{font-size:1.125rem}.pageContentLayout-module_content__-pxH- li{font-size:1.125rem;line-height:1.5}.pageContentLayout-module_collectionsWrapper__i93Jo{background-color:var(--color-black-5);padding-bottom:6rem}.pageContentLayout-module_collectionKorosTop__wEUg6{fill:var(--color-white)}.pageContentLayout-module_collectionsContainer__8Hb21{box-sizing:border-box;margin-top:3rem;position:relative}.pageContentLayout-module_collectionsContainer__8Hb21 .pageContentLayout-module_innerCollectionsWrapper__zsJ5B{background-color:var(--color-black-5);padding-bottom:96px;width:100%}.pageContentLayout-module_collectionsContainer__8Hb21 .pageContentLayout-module_innerCollectionsWrapper__zsJ5B .pageContentLayout-module_innerCollectionsContainer__WGPUA{background-color:var(--color-black-5);margin:0 auto;max-width:var(--max-width);width:100%}";
|
|
1649
|
+
var styles$f = {"contentLayout":"pageContentLayout-module_contentLayout__DP-wd","breadcrumbs":"pageContentLayout-module_breadcrumbs__btTiJ","mainLayout":"pageContentLayout-module_mainLayout__7X1d6","contentWrapper":"pageContentLayout-module_contentWrapper__Yw2-t","withBorder":"pageContentLayout-module_withBorder__EhVXW","content":"pageContentLayout-module_content__-pxH-","shareLinks":"pageContentLayout-module_shareLinks__vJ7mJ","collectionsWrapper":"pageContentLayout-module_collectionsWrapper__i93Jo","collectionKorosTop":"pageContentLayout-module_collectionKorosTop__wEUg6"};
|
|
1650
|
+
styleInject(css_248z$f);
|
|
1651
|
+
|
|
1652
|
+
function Container(_ref) {
|
|
1653
|
+
var wrapper = _ref.wrapper,
|
|
1654
|
+
children = _ref.children;
|
|
1655
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
1656
|
+
return wrapper ? /*#__PURE__*/React.cloneElement(wrapper, [], children) : /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
var css_248z$e = ".hero-module_hero__Pi-Nm{--hero-image-max-height:600px;background-color:var(--hcrc-color-hero-bg,--color-fog-light);position:relative}.hero-module_hero__Pi-Nm.hero-module_withKoros__36jKw{margin-bottom:1rem}.hero-module_hero__Pi-Nm.hero-module_withKoros__36jKw.hero-module_pulse__yXQJ1,.hero-module_hero__Pi-Nm.hero-module_withKoros__36jKw.hero-module_wave__Q-oSY{margin-bottom:2rem}.hero-module_hero__Pi-Nm.hero-module_withKoros__36jKw.hero-module_beat__IregM,.hero-module_hero__Pi-Nm.hero-module_withKoros__36jKw.hero-module_vibration__GhrnZ{margin-bottom:4rem}.hero-module_hero__Pi-Nm.hero-module_withMargin__xAyMc.hero-module_basic__CdTpJ{margin-bottom:70px}.hero-module_hero__Pi-Nm.hero-module_withMargin__xAyMc.hero-module_pulse__yXQJ1,.hero-module_hero__Pi-Nm.hero-module_withMargin__xAyMc.hero-module_storm__VbhnI{margin-bottom:50px}.hero-module_hero__Pi-Nm.hero-module_withMargin__xAyMc.hero-module_beat__IregM{margin-bottom:15px}.hero-module_hero__Pi-Nm.hero-module_withMargin__xAyMc.hero-module_wave__Q-oSY{margin-bottom:32px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z{bottom:-15px;position:absolute}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_pulse__yXQJ1,.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_wave__Q-oSY{bottom:-35px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_beat__IregM{bottom:-70px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_vibration__GhrnZ{bottom:-53px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_withMargin__xAyMc.hero-module_basic__CdTpJ{bottom:-70px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_withMargin__xAyMc.hero-module_pulse__yXQJ1,.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_withMargin__xAyMc.hero-module_wave__Q-oSY{bottom:-50px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_withMargin__xAyMc.hero-module_beat__IregM{bottom:-15px}.hero-module_hero__Pi-Nm .hero-module_heroKoros__Bb81z.hero-module_withMargin__xAyMc.hero-module_vibration__GhrnZ{bottom:-32px}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh{box-sizing:border-box;margin:0;position:relative;width:100%}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh.hero-module_withKoros__36jKw{padding-bottom:85px}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh>:first-child{position:relative}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh>:first-child .hero-module_label__PX5ab{background-color:var(--color-black);bottom:80px;color:var(--color-white);font-size:var(--fontsize-body-s);margin:0;max-height:80%;opacity:.6;overflow:hidden;padding:4px;position:absolute;right:0;text-overflow:ellipsis;-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);white-space:nowrap;writing-mode:vertical-lr;z-index:1}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh .hero-module_link__9P68I{left:var(--spacing-l);position:absolute;top:var(--spacing-l)}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh .hero-module_link__9P68I a:hover{outline:2px solid var(--color-coat-of-arms)}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh .hero-module_link__9P68I a{background-color:var(--color-white);display:flex}@media screen and (min-width:768px){.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh .hero-module_link__9P68I a{padding:var(--spacing-2-xs)}}@media screen and (min-width:1248px){.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh .hero-module_link__9P68I{left:calc(var(--spacing-4-xl) * -1);top:var(--spacing-l)}}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh .hero-module_link__9P68I span{align-items:center;display:flex;justify-content:center;margin:0}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh figure{line-height:0;margin:0}.hero-module_hero__Pi-Nm .hero-module_heroInner__CK2Bh img{max-height:var(--hero-image-max-height);object-fit:cover;width:100%}.hero-module_textContents__mu0sI{position:relative;z-index:1}@media screen and (min-width:768px){.hero-module_textContents__mu0sI{max-width:66.6666666667%;padding-right:44px}}.hero-module_textContents__mu0sI h1{font-weight:400}.hero-module_textContents__mu0sI p{font-size:var(--fontsize-body-l);line-height:var(--lineheight-l);margin-bottom:2rem}.hero-module_textContents__mu0sI .hero-module_button__tEUKr{margin-bottom:2.5rem}.hero-module_textContents__mu0sI .hero-module_button__tEUKr button:hover{background-color:var(--color-white)}";
|
|
1660
|
+
var styles$e = {"hero":"hero-module_hero__Pi-Nm","withKoros":"hero-module_withKoros__36jKw","pulse":"hero-module_pulse__yXQJ1","wave":"hero-module_wave__Q-oSY","beat":"hero-module_beat__IregM","vibration":"hero-module_vibration__GhrnZ","withMargin":"hero-module_withMargin__xAyMc","basic":"hero-module_basic__CdTpJ","storm":"hero-module_storm__VbhnI","heroKoros":"hero-module_heroKoros__Bb81z","heroInner":"hero-module_heroInner__CK2Bh","label":"hero-module_label__PX5ab","link":"hero-module_link__9P68I","textContents":"hero-module_textContents__mu0sI","button":"hero-module_button__tEUKr"};
|
|
1661
|
+
styleInject(css_248z$e);
|
|
1662
|
+
|
|
1663
|
+
var css_248z$d = ".contentContainer-module_container__jp4mL{align-items:center;box-sizing:border-box;padding:0 var(--spacing-s);position:relative;width:100%}@media screen and (min-width:768px){.contentContainer-module_container__jp4mL{margin:0 auto;max-width:var(--breakpoint-xl);padding:0 var(--spacing-m)}}";
|
|
1664
|
+
var styles$d = {"container":"contentContainer-module_container__jp4mL"};
|
|
1665
|
+
styleInject(css_248z$d);
|
|
1666
|
+
|
|
1667
|
+
function ContentContainer(_ref) {
|
|
1668
|
+
var className = _ref.className,
|
|
1669
|
+
children = _ref.children;
|
|
1670
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1671
|
+
className: classNames(styles$d.container, className)
|
|
1672
|
+
}, children);
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
function Hero(_ref) {
|
|
1676
|
+
var id = _ref.id,
|
|
1677
|
+
title = _ref.title,
|
|
1678
|
+
description = _ref.description,
|
|
1679
|
+
backgroundColor = _ref.backgroundColor,
|
|
1680
|
+
_ref$korosType = _ref.korosType,
|
|
1681
|
+
korosType = _ref$korosType === void 0 ? 'basic' : _ref$korosType,
|
|
1682
|
+
actionText = _ref.actionText,
|
|
1683
|
+
actionUrl = _ref.actionUrl,
|
|
1684
|
+
actionUrlTarget = _ref.actionUrlTarget,
|
|
1685
|
+
className = _ref.className,
|
|
1686
|
+
backUrl = _ref.backUrl,
|
|
1687
|
+
imageUrl = _ref.imageUrl,
|
|
1688
|
+
imageAlt = _ref.imageAlt,
|
|
1689
|
+
container = _ref.container,
|
|
1690
|
+
imageLabel = _ref.imageLabel;
|
|
1691
|
+
var _useConfig = useConfig(),
|
|
1692
|
+
redirectToUrl = _useConfig.utils.redirectToUrl;
|
|
1693
|
+
var openInNewTab = function openInNewTab(url) {
|
|
1694
|
+
var newWindow = window.open(url, '_blank', 'noopener,noreferrer');
|
|
1695
|
+
if (newWindow) newWindow.opener = null;
|
|
1696
|
+
};
|
|
1697
|
+
var handleClick = function handleClick() {
|
|
1698
|
+
if (actionUrl) {
|
|
1699
|
+
if (actionUrlTarget === '_blank') {
|
|
1700
|
+
openInNewTab(actionUrl);
|
|
1701
|
+
} else {
|
|
1702
|
+
redirectToUrl(actionUrl);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
var textContents = /*#__PURE__*/React__default.createElement("div", {
|
|
1707
|
+
className: classNames(styles$e.textContents, backgroundColor && !imageUrl && isWhiteText(backgroundColor) && colorStyles.whiteText, title && backgroundColor && korosType && styles$e.withKoros)
|
|
1708
|
+
}, /*#__PURE__*/React__default.createElement("header", null, /*#__PURE__*/React__default.createElement(Text, {
|
|
1709
|
+
as: "h1",
|
|
1710
|
+
variant: "h1"
|
|
1711
|
+
}, title)), description && /*#__PURE__*/React__default.createElement("p", null, description), actionText && actionUrl && (/*#__PURE__*/React__default.createElement("div", {
|
|
1712
|
+
className: classNames(!imageUrl && styles$e.button, backgroundColor && !imageUrl && isWhiteText(backgroundColor) && colorStyles.whiteButton)
|
|
1713
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1714
|
+
variant: ButtonVariant.Secondary,
|
|
1715
|
+
theme: ButtonPresetTheme.Black,
|
|
1716
|
+
onClick: handleClick,
|
|
1717
|
+
iconEnd: /*#__PURE__*/React__default.createElement(IconAngleRight, null)
|
|
1718
|
+
}, actionText))));
|
|
1719
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1720
|
+
className: classNames(styles$e.hero, className, backgroundColor && colorStyles["background".concat(getColor(backgroundColor))], title && backgroundColor && korosType && !imageUrl && styles$e.withKoros, korosType && styles$e[korosType])
|
|
1721
|
+
}, /*#__PURE__*/React__default.createElement(Container, {
|
|
1722
|
+
wrapper: container
|
|
1723
|
+
}, /*#__PURE__*/React__default.createElement(ContentContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1724
|
+
className: styles$e.heroInner
|
|
1725
|
+
}, imageUrl && (/*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Image$1, {
|
|
1726
|
+
id: id,
|
|
1727
|
+
className: styles$e.imageContainer,
|
|
1728
|
+
src: imageUrl,
|
|
1729
|
+
alt: imageAlt !== null && imageAlt !== void 0 ? imageAlt : ''
|
|
1730
|
+
}), imageLabel && (/*#__PURE__*/React__default.createElement("div", {
|
|
1731
|
+
className: styles$e.label
|
|
1732
|
+
}, imageLabel)))), backUrl && (/*#__PURE__*/React__default.createElement("div", {
|
|
1733
|
+
className: styles$e.link
|
|
1734
|
+
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
1735
|
+
href: backUrl,
|
|
1736
|
+
openInNewTab: false,
|
|
1737
|
+
"aria-label": "Back",
|
|
1738
|
+
iconLeft: /*#__PURE__*/React__default.createElement(IconArrowLeft, {
|
|
1739
|
+
"aria-hidden": "true"
|
|
1740
|
+
})
|
|
1741
|
+
}))), !imageUrl && title && textContents))), (title || backgroundColor || imageUrl) && korosType && (/*#__PURE__*/React__default.createElement(Koros, {
|
|
1742
|
+
className: classNames(styles$e.heroKoros, imageUrl && styles$e.withMargin, korosType && styles$e[korosType]),
|
|
1743
|
+
type: korosType,
|
|
1744
|
+
flipVertical: !imageUrl,
|
|
1745
|
+
style: {
|
|
1746
|
+
fill: "var(--".concat(
|
|
1747
|
+
// eslint-disable-next-line no-nested-ternary
|
|
1748
|
+
imageUrl ? 'color-white' : backgroundColor ? "color-".concat(backgroundColor) : 'hcrc-color-hero-bg, --color-fog-light', ")")
|
|
1749
|
+
}
|
|
1750
|
+
}))), imageUrl && title && (/*#__PURE__*/React__default.createElement(Container, null, /*#__PURE__*/React__default.createElement(ContentContainer, null, textContents))));
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
var css_248z$c = ".pageSection-module_pageSection__T0yH3{background-repeat:no-repeat;background-size:cover;display:flex;position:relative}.pageSection-module_pageSection__T0yH3 .pageSection-module_korosBottom__usuIU,.pageSection-module_pageSection__T0yH3 .pageSection-module_korosTop__jzlE9{margin-bottom:-1px;position:absolute}.pageSection-module_pageSection__T0yH3 .pageSection-module_korosTop__jzlE9{top:0}.pageSection-module_pageSection__T0yH3 .pageSection-module_korosBottom__usuIU{bottom:0}.pageSection-module_pageSection__T0yH3.pageSection-module_withKorosTop__p-pKQ{padding-top:85px}.pageSection-module_pageSection__T0yH3.pageSection-module_withKorosBottom__NrLhN{padding-bottom:85px}.pageSection-module_pageSectionGrey__-XxCb{background-color:var(--color-black-5)}";
|
|
1754
|
+
var styles$c = {"pageSection":"pageSection-module_pageSection__T0yH3","korosTop":"pageSection-module_korosTop__jzlE9","korosBottom":"pageSection-module_korosBottom__usuIU","withKorosTop":"pageSection-module_withKorosTop__p-pKQ","withKorosBottom":"pageSection-module_withKorosBottom__NrLhN"};
|
|
1755
|
+
styleInject(css_248z$c);
|
|
1756
|
+
|
|
1757
|
+
var css_248z$b = ".BackgroundImage-module_imageWrapper__lYyyv{background-position:50%;background-repeat:no-repeat;background-size:cover;box-sizing:border-box;min-width:var(--width-image);position:relative;text-decoration:none}.BackgroundImage-module_imageWrapper__lYyyv.BackgroundImage-module_fixed-vertical__vG7u1{min-height:var(--height-image)}@media (min-width:576px){.BackgroundImage-module_imageWrapper__lYyyv,.BackgroundImage-module_imageWrapper__lYyyv.BackgroundImage-module_fixed-vertical__vG7u1{min-height:var(--height-image-desktop)}}.BackgroundImage-module_imageWrapper__lYyyv .BackgroundImage-module_imageLabel__3MRFm{padding:var(--spacing-xs)}.BackgroundImage-module_imageWrapper__lYyyv .BackgroundImage-module_imageLabel__3MRFm .BackgroundImage-module_tag__t4kkz{--tag-background:var(--color-black-5);font-size:var(--fontsize-body-s);font-weight:600}";
|
|
1758
|
+
var styles$b = {"imageLabel":"BackgroundImage-module_imageLabel__3MRFm","tag":"BackgroundImage-module_tag__t4kkz"};
|
|
1759
|
+
styleInject(css_248z$b);
|
|
1760
|
+
|
|
1761
|
+
var css_248z$a = ".tag-module_tag__1QCQs{--tag-focus-outline-color:var(--color-black-70);margin-bottom:var(--spacing-3-xs);margin-right:var(--spacing-2-xs);margin-top:var(--spacing-3-xs);padding:var(--spacing-2-xs)}.tag-module_tag__1QCQs.tag-module_featured__z-7XB{--background-color:var(--color-tram-light)}.tag-module_tag__1QCQs.tag-module_whiteOnly__0xHj5{--background-color:var(--color-white)!important}.tag-module_tag__1QCQs.tag-module_selected__r0rM9{--background-color:var(--color-black-70)!important;color:var(--color-white)}.tag-module_tag__1QCQs.tag-module_noTextWrap__FguRo span{white-space:nowrap}.tag-module_tag__1QCQs:not(.tag-module_noTextWrap__FguRo) span{white-space:normal!important}.tag-module_tag__1QCQs.tag-module_withHover__3daxF:hover{--background-color:var(--color-black-5)!important}.tag-module_tag__1QCQs.tag-module_selected__r0rM9:hover{--background-color:var(--color-black-70)!important}.tag-module_tag__1QCQs.tag-module_noOutline__8T9je{--tag-focus-outline-color:none!important;box-shadow:none;cursor:default}";
|
|
1762
|
+
var styles$a = {"tag":"tag-module_tag__1QCQs","featured":"tag-module_featured__z-7XB","whiteOnly":"tag-module_whiteOnly__0xHj5","selected":"tag-module_selected__r0rM9","noTextWrap":"tag-module_noTextWrap__FguRo","withHover":"tag-module_withHover__3daxF","noOutline":"tag-module_noOutline__8T9je"};
|
|
1763
|
+
styleInject(css_248z$a);
|
|
1764
|
+
|
|
1765
|
+
var theme1 = {
|
|
1766
|
+
'--background-color': 'var(--color-black-10)',
|
|
1767
|
+
'--color': 'var(--color-black)',
|
|
1768
|
+
'--outline-color': 'var(--color-black-70)'
|
|
1769
|
+
};
|
|
1770
|
+
var theme2 = {
|
|
1771
|
+
'--background-color': 'var(--color-tram-light)',
|
|
1772
|
+
'--color': 'var(--color-black-90)',
|
|
1773
|
+
'--outline-color': 'var(--color-black-70)'
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
var _excluded$7 = ["className", "children", "featured", "selected", "whiteOnly", "noTextWrap", "onClick", "id"];
|
|
1777
|
+
function Tag(_ref) {
|
|
1778
|
+
var className = _ref.className,
|
|
1779
|
+
children = _ref.children,
|
|
1780
|
+
featured = _ref.featured,
|
|
1781
|
+
selected = _ref.selected,
|
|
1782
|
+
whiteOnly = _ref.whiteOnly,
|
|
1783
|
+
_ref$noTextWrap = _ref.noTextWrap,
|
|
1784
|
+
noTextWrap = _ref$noTextWrap === void 0 ? false : _ref$noTextWrap,
|
|
1785
|
+
onClick = _ref.onClick,
|
|
1786
|
+
id = _ref.id,
|
|
1787
|
+
hdsTagProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
1788
|
+
/**
|
|
1789
|
+
* @deprecated the generatedId won't be needed after HDS removes the default value from the HDS Tag component:
|
|
1790
|
+
* https://github.com/City-of-Helsinki/helsinki-design-system/blob/master/packages/react/src/components/tag/Tag.tsx#L81).
|
|
1791
|
+
* */
|
|
1792
|
+
var generatedId = React.useId();
|
|
1793
|
+
return /*#__PURE__*/React.createElement(Tag$1, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
1794
|
+
onClick: onClick
|
|
1795
|
+
}, !onClick && {
|
|
1796
|
+
tabIndex: -1
|
|
1797
|
+
}), {}, {
|
|
1798
|
+
theme: featured ? theme2 : theme1,
|
|
1799
|
+
className: classNames(styles$a.tag, featured && styles$a.featured, selected && styles$a.selected, whiteOnly && styles$a.whiteOnly, noTextWrap && styles$a.noTextWrap, onClick && !featured && styles$a.withHover, !onClick && styles$a.noOutline, className)
|
|
1800
|
+
}, hdsTagProps), {}, {
|
|
1801
|
+
// TODO: don't use the generatedId and allow an undefined id.
|
|
1802
|
+
id: id !== null && id !== void 0 ? id : "tag".concat(generatedId)
|
|
1803
|
+
}), children);
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
var _excluded$6 = ["id", "url", "customFallbackUrl", "labelTag", "children"];
|
|
1807
|
+
function BackgroundImage(_ref) {
|
|
1808
|
+
var id = _ref.id,
|
|
1809
|
+
url = _ref.url,
|
|
1810
|
+
customFallbackUrl = _ref.customFallbackUrl,
|
|
1811
|
+
labelTag = _ref.labelTag,
|
|
1812
|
+
children = _ref.children,
|
|
1813
|
+
divProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
1814
|
+
var resolvedUrl = useResolveImageUrl({
|
|
1815
|
+
id: id,
|
|
1816
|
+
url: url,
|
|
1817
|
+
customFallbackUrl: customFallbackUrl
|
|
1818
|
+
});
|
|
1819
|
+
return /*#__PURE__*/React__default.createElement("div", _objectSpread2(_objectSpread2({}, divProps), {}, {
|
|
1820
|
+
style: _objectSpread2(_objectSpread2({}, divProps.style), {}, {
|
|
1821
|
+
backgroundImage: "url(".concat(resolvedUrl, ")")
|
|
1822
|
+
})
|
|
1823
|
+
}), children, labelTag && (/*#__PURE__*/React__default.createElement("div", {
|
|
1824
|
+
className: styles$b.imageLabel
|
|
1825
|
+
}, /*#__PURE__*/React__default.createElement(Tag, {
|
|
1826
|
+
className: styles$b.tag
|
|
1827
|
+
}, labelTag))));
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
function PageSection(_ref) {
|
|
1831
|
+
var className = _ref.className,
|
|
1832
|
+
children = _ref.children,
|
|
1833
|
+
korosTop = _ref.korosTop,
|
|
1834
|
+
korosTopClassName = _ref.korosTopClassName,
|
|
1835
|
+
korosBottom = _ref.korosBottom,
|
|
1836
|
+
korosBottomClassName = _ref.korosBottomClassName,
|
|
1837
|
+
backgroundImageUrl = _ref.backgroundImageUrl;
|
|
1838
|
+
var Wrapper = backgroundImageUrl ? BackgroundImage : 'div';
|
|
1839
|
+
return /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
1840
|
+
id: backgroundImageUrl !== null && backgroundImageUrl !== void 0 ? backgroundImageUrl : 'page-section',
|
|
1841
|
+
url: backgroundImageUrl,
|
|
1842
|
+
className: classNames(styles$c.pageSection, korosTop && styles$c.withKorosTop, korosBottom && styles$c.withKorosBottom, className)
|
|
1843
|
+
}, korosTop && (/*#__PURE__*/React__default.createElement(Koros, {
|
|
1844
|
+
flipVertical: true,
|
|
1845
|
+
className: classNames(styles$c.korosTop, korosTopClassName)
|
|
1846
|
+
})), korosBottom && (/*#__PURE__*/React__default.createElement(Koros, {
|
|
1847
|
+
className: classNames(styles$c.korosBottom, korosBottomClassName)
|
|
1848
|
+
})), children);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
var _excluded$5 = ["id", "breadcrumbs", "heroContainer", "content", "shareLinks", "collections", "sidebarContent", "imageSrc", "imageAlt", "imageLabel", "backUrl"];
|
|
1852
|
+
function PageContentLayout(_ref) {
|
|
1853
|
+
var id = _ref.id,
|
|
1854
|
+
breadcrumbs = _ref.breadcrumbs,
|
|
1855
|
+
heroContainer = _ref.heroContainer,
|
|
1856
|
+
content = _ref.content,
|
|
1857
|
+
shareLinks = _ref.shareLinks,
|
|
1858
|
+
collections = _ref.collections,
|
|
1859
|
+
sidebarContent = _ref.sidebarContent,
|
|
1860
|
+
imageSrc = _ref.imageSrc,
|
|
1861
|
+
imageAlt = _ref.imageAlt,
|
|
1862
|
+
imageLabel = _ref.imageLabel,
|
|
1863
|
+
backUrl = _ref.backUrl,
|
|
1864
|
+
heroProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
1865
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1866
|
+
className: styles$f.contentLayout
|
|
1867
|
+
}, breadcrumbs && /*#__PURE__*/React__default.createElement("div", {
|
|
1868
|
+
className: styles$f.breadcrumbs
|
|
1869
|
+
}, breadcrumbs), /*#__PURE__*/React__default.createElement("div", {
|
|
1870
|
+
className: styles$f.mainLayout
|
|
1871
|
+
}, /*#__PURE__*/React__default.createElement(Hero, _objectSpread2({
|
|
1872
|
+
id: id,
|
|
1873
|
+
container: heroContainer,
|
|
1874
|
+
imageAlt: imageAlt,
|
|
1875
|
+
imageUrl: imageSrc !== null && imageSrc !== void 0 ? imageSrc : undefined,
|
|
1876
|
+
imageLabel: imageLabel,
|
|
1877
|
+
backUrl: backUrl
|
|
1878
|
+
}, heroProps)), /*#__PURE__*/React__default.createElement(PageSection, {
|
|
1879
|
+
className: classNames(styles$f.contentWrapper, !heroProps.title && !imageSrc ? styles$f.withBorder : '')
|
|
1880
|
+
}, /*#__PURE__*/React__default.createElement(ContentContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1881
|
+
className: styles$f.content
|
|
1882
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1883
|
+
className: styles$f.mainContent
|
|
1884
|
+
}, content), /*#__PURE__*/React__default.createElement("aside", null, sidebarContent), /*#__PURE__*/React__default.createElement("div", {
|
|
1885
|
+
className: styles$f.shareLinks
|
|
1886
|
+
}, shareLinks)))), collections && (/*#__PURE__*/React__default.createElement(PageSection, {
|
|
1887
|
+
className: styles$f.collectionsWrapper,
|
|
1888
|
+
korosTop: true,
|
|
1889
|
+
korosTopClassName: styles$f.collectionKorosTop
|
|
1890
|
+
}, /*#__PURE__*/React__default.createElement(ContentContainer, null, collections)))));
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
var css_248z$9 = ".pageMainContent-module_imageContainer__qfqro img{max-width:100%}.pageMainContent-module_mainContent__blo6c figure{margin:0}.pageMainContent-module_mainContent__blo6c figure img{height:auto}.pageMainContent-module_mainContent__blo6c figure table{background-color:transparent;border-collapse:collapse;border-spacing:0;margin-left:auto;margin-right:auto}.pageMainContent-module_mainContent__blo6c figure table thead{display:table-header-group;vertical-align:middle}.pageMainContent-module_mainContent__blo6c figure table td,.pageMainContent-module_mainContent__blo6c figure table th{word-break:normal}.pageMainContent-module_mainContent__blo6c h1{font-size:1.5rem;font-weight:400;line-height:1.2;margin:1.5rem 0}@media (min-width:576px){.pageMainContent-module_mainContent__blo6c h1{margin:2rem 0}}.pageMainContent-module_mainContent__blo6c h2{font-size:2rem;font-weight:400;letter-spacing:-.4px;margin:3rem 0 1.5rem}.pageMainContent-module_mainContent__blo6c h3{font-size:1.5rem;font-weight:400;margin:2.5rem 0 1.5rem}.pageMainContent-module_mainContent__blo6c h4{font-size:1.25rem;font-weight:400;letter-spacing:.2px;margin:1.5rem 0}.pageMainContent-module_mainContent__blo6c h5{font-size:1.125rem;font-weight:500;margin:1.5rem 0}.pageMainContent-module_mainContent__blo6c ol,.pageMainContent-module_mainContent__blo6c ul{margin:1.5rem 0 2rem}.pageMainContent-module_mainContent__blo6c ol li,.pageMainContent-module_mainContent__blo6c ul li{margin-bottom:1rem}.pageMainContent-module_mainContent__blo6c figure{margin:1.5rem 0 2rem}.pageMainContent-module_mainContent__blo6c figure figcaption{font-size:1rem;margin:1rem 0}blockquote{border-left:.25em solid;margin:0 0 1.75em;padding-left:1em}.pageMainContent-module_articleData__OdxV6{align-items:center;display:flex;flex-wrap:wrap;margin-bottom:var(--spacing-s)}@media (min-width:768px){.pageMainContent-module_articleData__OdxV6{margin-bottom:var(--spacing-xl)}}.pageMainContent-module_articleData__OdxV6 .pageMainContent-module_articleDate__8TotS{font-size:var(--fontsize-body-l);margin-right:var(--spacing-l)}";
|
|
1894
|
+
var styles$9 = {"mainContent":"pageMainContent-module_mainContent__blo6c","articleData":"pageMainContent-module_articleData__OdxV6","articleDate":"pageMainContent-module_articleDate__8TotS"};
|
|
1895
|
+
styleInject(css_248z$9);
|
|
1896
|
+
|
|
1897
|
+
function PageMainContent(_ref) {
|
|
1898
|
+
var _categories$edges, _ref2;
|
|
1899
|
+
var title = _ref.title,
|
|
1900
|
+
content = _ref.content,
|
|
1901
|
+
date = _ref.date,
|
|
1902
|
+
categories = _ref.categories,
|
|
1903
|
+
contentModules = _ref.contentModules,
|
|
1904
|
+
onArticlesSearch = _ref.onArticlesSearch;
|
|
1905
|
+
var _useConfig = useConfig(),
|
|
1906
|
+
_useConfig$htmlSaniti = _useConfig.htmlSanitizer,
|
|
1907
|
+
allowedUnsafeTags = _useConfig$htmlSaniti.allowedUnsafeTags,
|
|
1908
|
+
trustedOrigins = _useConfig$htmlSaniti.trustedOrigins;
|
|
1909
|
+
return /*#__PURE__*/React__default.createElement("article", {
|
|
1910
|
+
className: styles$9.mainContent
|
|
1911
|
+
}, /*#__PURE__*/React__default.createElement("header", null, /*#__PURE__*/React__default.createElement(Text, {
|
|
1912
|
+
as: "h1",
|
|
1913
|
+
variant: "h1"
|
|
1914
|
+
}, title)), (date || categories) && (/*#__PURE__*/React__default.createElement("div", {
|
|
1915
|
+
className: styles$9.articleData
|
|
1916
|
+
}, date && (/*#__PURE__*/React__default.createElement("div", {
|
|
1917
|
+
className: styles$9.articleDate
|
|
1918
|
+
}, formatDateFromString(date || ''))), categories === null || categories === void 0 || (_categories$edges = categories.edges) === null || _categories$edges === void 0 ? void 0 : _categories$edges.map(function (category) {
|
|
1919
|
+
var _category$node, _category$node3;
|
|
1920
|
+
return /*#__PURE__*/React__default.createElement(Tag, {
|
|
1921
|
+
className: styles$9.tag,
|
|
1922
|
+
key: (_category$node = category.node) === null || _category$node === void 0 ? void 0 : _category$node.id,
|
|
1923
|
+
onClick: onArticlesSearch ? function () {
|
|
1924
|
+
var _category$node2;
|
|
1925
|
+
onArticlesSearch((_category$node2 = category.node) === null || _category$node2 === void 0 ? void 0 : _category$node2.id);
|
|
1926
|
+
} : undefined
|
|
1927
|
+
}, String((_category$node3 = category.node) === null || _category$node3 === void 0 ? void 0 : _category$node3.name));
|
|
1928
|
+
}))), /*#__PURE__*/React__default.createElement(HtmlToReact, {
|
|
1929
|
+
components: {
|
|
1930
|
+
a: Link
|
|
1931
|
+
},
|
|
1932
|
+
allowedUnsafeTags: allowedUnsafeTags,
|
|
1933
|
+
trustedOrigins: trustedOrigins
|
|
1934
|
+
}, content), ((_ref2 = contentModules !== null && contentModules !== void 0 ? contentModules : []) === null || _ref2 === void 0 ? void 0 : _ref2.length) > 0 && contentModules);
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
function replaceAll(str, find, replace) {
|
|
1938
|
+
return str.replace(new RegExp(find, 'g'), replace);
|
|
1939
|
+
}
|
|
1940
|
+
function unescapeDash(str) {
|
|
1941
|
+
if (!str) {
|
|
1942
|
+
return str !== null && str !== void 0 ? str : '';
|
|
1943
|
+
}
|
|
1944
|
+
return replaceAll(str, '-', '-');
|
|
1945
|
+
}
|
|
1946
|
+
function PageMeta(_ref) {
|
|
1947
|
+
var _seoForCurrentLanguag, _ref3, _ref4;
|
|
1948
|
+
var page = _ref.page,
|
|
1949
|
+
Head = _ref.headComponent;
|
|
1950
|
+
var seoForCurrentLanguage = page === null || page === void 0 ? void 0 : page.seo;
|
|
1951
|
+
var _ref2 = seoForCurrentLanguage !== null && seoForCurrentLanguage !== void 0 ? seoForCurrentLanguage : {},
|
|
1952
|
+
title = _ref2.title,
|
|
1953
|
+
description = _ref2.description,
|
|
1954
|
+
twitterTitle = _ref2.twitterTitle,
|
|
1955
|
+
twitterDescription = _ref2.twitterDescription,
|
|
1956
|
+
openGraphTitle = _ref2.openGraphTitle,
|
|
1957
|
+
openGraphType = _ref2.openGraphType,
|
|
1958
|
+
openGraphDescription = _ref2.openGraphDescription;
|
|
1959
|
+
var image = seoForCurrentLanguage === null || seoForCurrentLanguage === void 0 || (_seoForCurrentLanguag = seoForCurrentLanguage.socialImage) === null || _seoForCurrentLanguag === void 0 ? void 0 : _seoForCurrentLanguag.mediaItemUrl;
|
|
1960
|
+
var xTitle = (_ref3 = twitterTitle !== null && twitterTitle !== void 0 ? twitterTitle : title) !== null && _ref3 !== void 0 ? _ref3 : undefined;
|
|
1961
|
+
var xDescription = (_ref4 = twitterDescription !== null && twitterDescription !== void 0 ? twitterDescription : description) !== null && _ref4 !== void 0 ? _ref4 : undefined;
|
|
1962
|
+
var _useConfig = useConfig(),
|
|
1963
|
+
meta = _useConfig.meta;
|
|
1964
|
+
return /*#__PURE__*/React__default.createElement(Head, null, /*#__PURE__*/React__default.createElement("title", null, unescapeDash(title !== null && title !== void 0 ? title : undefined)), description && /*#__PURE__*/React__default.createElement("meta", {
|
|
1965
|
+
name: "description",
|
|
1966
|
+
content: description
|
|
1967
|
+
}), /*#__PURE__*/React__default.createElement("meta", {
|
|
1968
|
+
property: "og:title",
|
|
1969
|
+
content: openGraphTitle !== null && openGraphTitle !== void 0 ? openGraphTitle : unescapeDash(title !== null && title !== void 0 ? title : undefined)
|
|
1970
|
+
}), openGraphDescription && (/*#__PURE__*/React__default.createElement("meta", {
|
|
1971
|
+
property: "og:description",
|
|
1972
|
+
content: openGraphDescription
|
|
1973
|
+
})), /*#__PURE__*/React__default.createElement("meta", {
|
|
1974
|
+
name: "twitter:card",
|
|
1975
|
+
content: "summary_large_image"
|
|
1976
|
+
}), image && (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("meta", {
|
|
1977
|
+
property: "og:image",
|
|
1978
|
+
content: image
|
|
1979
|
+
}), /*#__PURE__*/React__default.createElement("meta", {
|
|
1980
|
+
property: "twitter:image",
|
|
1981
|
+
content: image
|
|
1982
|
+
}))), openGraphType && /*#__PURE__*/React__default.createElement("meta", {
|
|
1983
|
+
property: "og:type",
|
|
1984
|
+
content: openGraphType
|
|
1985
|
+
}), xTitle && /*#__PURE__*/React__default.createElement("meta", {
|
|
1986
|
+
name: "twitter:title",
|
|
1987
|
+
content: xTitle
|
|
1988
|
+
}), xDescription && (/*#__PURE__*/React__default.createElement("meta", {
|
|
1989
|
+
name: "twitter:description",
|
|
1990
|
+
content: xDescription
|
|
1991
|
+
})), /*#__PURE__*/React__default.createElement("link", {
|
|
1992
|
+
rel: "icon",
|
|
1993
|
+
href: meta === null || meta === void 0 ? void 0 : meta.favIconUrl,
|
|
1994
|
+
sizes: "any"
|
|
1995
|
+
}), /*#__PURE__*/React__default.createElement("link", {
|
|
1996
|
+
rel: "icon",
|
|
1997
|
+
href: meta === null || meta === void 0 ? void 0 : meta.favIconSvgUrl,
|
|
1998
|
+
type: "image/svg+xml"
|
|
1999
|
+
}), /*#__PURE__*/React__default.createElement("link", {
|
|
2000
|
+
rel: "apple-touch-icon",
|
|
2001
|
+
href: meta === null || meta === void 0 ? void 0 : meta.appleTouchIconUrl
|
|
2002
|
+
}), /*#__PURE__*/React__default.createElement("link", {
|
|
2003
|
+
rel: "manifest",
|
|
2004
|
+
href: meta === null || meta === void 0 ? void 0 : meta.manifestUrl
|
|
2005
|
+
}));
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
var css_248z$8 = ".collection-module_collection__kkp5k .collection-module_headerRow__9m3TA{align-items:center;display:flex;height:6.5rem;justify-content:space-between;padding-top:3rem}@media screen and (max-width:768px){.collection-module_collection__kkp5k .collection-module_headerRow__9m3TA{align-items:flex-start;flex-direction:column}.collection-module_collection__kkp5k .collection-module_headerRow__9m3TA.collection-module_withShowAll__IYUH7{margin-bottom:2.5rem}}.collection-module_collection__kkp5k .collection-module_headerRow__9m3TA .collection-module_showAll__tqgWL{font-weight:500;margin-left:1rem;text-decoration:none}.collection-module_collection__kkp5k .collection-module_headerRow__9m3TA .collection-module_showAll__tqgWL:hover{text-decoration:underline}.collection-module_collection__kkp5k .collection-module_headerRow__9m3TA .collection-module_showAll__tqgWL{color:var(--hcrc-color-link-show-all)}@media screen and (max-width:768px){.collection-module_collection__kkp5k a{min-width:80px;padding-bottom:2rem}}.collection-module_collection__kkp5k .collection-module_heading__pbkZx{font-size:1.5rem!important;line-height:1.5rem;margin:0;padding-bottom:1rem}@media screen and (min-width:768px){.collection-module_collection__kkp5k .collection-module_heading__pbkZx{padding-bottom:2rem}}.collection-module_collection__kkp5k .collection-module_heading__pbkZx.collection-module_carousel__EPITT{font-weight:400;margin-left:1rem}@media screen and (min-width:768px){.collection-module_collection__kkp5k .collection-module_heading__pbkZx.collection-module_carousel__EPITT{margin-left:0}.collection-module_collection__kkp5k .collection-module_heading__pbkZx{font-size:2rem}}.collection-module_collection__kkp5k .collection-module_description__Cg-RJ{font-size:1.5rem;margin:0;padding-bottom:2rem}@media screen and (min-width:768px){.collection-module_collection__kkp5k .collection-module_description__Cg-RJ{padding-bottom:3rem}}.collection-module_collection__kkp5k .collection-module_carouselWrapper__1Q-Lg .collection-module_carousel__EPITT{margin-top:0}.collection-module_collection__kkp5k .collection-module_loadMoreButton__IrYPn{margin-top:var(--spacing-m)}.collection-module_loadingSpinnerWrapper__QjLGZ{align-items:center;display:flex;justify-content:center;margin:4rem}";
|
|
2009
|
+
var styles$8 = {"collection":"collection-module_collection__kkp5k","headerRow":"collection-module_headerRow__9m3TA","withShowAll":"collection-module_withShowAll__IYUH7","showAll":"collection-module_showAll__tqgWL","heading":"collection-module_heading__pbkZx","carousel":"collection-module_carousel__EPITT","description":"collection-module_description__Cg-RJ","carouselWrapper":"collection-module_carouselWrapper__1Q-Lg","loadMoreButton":"collection-module_loadMoreButton__IrYPn","loadingSpinnerWrapper":"collection-module_loadingSpinnerWrapper__QjLGZ"};
|
|
2010
|
+
styleInject(css_248z$8);
|
|
2011
|
+
|
|
2012
|
+
var css_248z$7 = ".carousel-module_container__-oNW8{box-sizing:border-box;margin:100px -60px 0}@media screen and (max-width:1248px){.carousel-module_container__-oNW8{margin:100px -42px 0}}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj{box-sizing:border-box;overflow:hidden;padding:0;position:relative}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu{align-items:center;background:#fff;border:none;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);cursor:pointer;display:flex;height:44px;justify-content:center;margin-top:-12px;padding:5px;position:absolute;top:50%;width:44px;z-index:5}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu:focus,.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu:hover{color:var(--color-bus)}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu:focus{outline-color:var(--color-black-90)}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu.carousel-module_btnPrev__e-wQ1{margin-left:32px;transition:.1s}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu.carousel-module_btnPrev__e-wQ1:hover{margin-left:28px;transition:.1s}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu.carousel-module_btnNext__r-L2f{margin-right:32px;right:0;transition:.1s}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu.carousel-module_btnNext__r-L2f:hover{margin-right:28px;transition:.1s}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_btn__FDYVu svg{color:var(--color-black-90)}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC{box-sizing:border-box;margin:0;outline:none;padding:0}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV{box-sizing:border-box;overflow:visible;padding:0 48px;position:relative;width:100%}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV.carousel-module_noDots__Gp68Y{margin-bottom:32px}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV .carousel-module_sliderWrapper__iuWEp{box-sizing:border-box;margin:auto;overflow:visible;transition:height .15s ease-in;width:100%}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV .carousel-module_sliderWrapper__iuWEp .carousel-module_sliderAnimated__g3Y2u{background:transparent;box-sizing:border-box;display:flex;height:auto;list-style:none;margin:0;padding:0;position:relative;transition-duration:.25s;width:100%}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV .carousel-module_sliderWrapper__iuWEp .carousel-module_sliderAnimated__g3Y2u .carousel-module_slide__AjSkx{background:transparent;box-sizing:border-box;flex-flow:column;margin:0;min-width:100%;opacity:.5;position:relative;transition:opacity .25s ease-in,padding .25s ease-in}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV .carousel-module_sliderWrapper__iuWEp .carousel-module_sliderAnimated__g3Y2u .carousel-module_slide__AjSkx .carousel-module_slideItems__1cRje{box-sizing:border-box;display:flex;height:100%}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV .carousel-module_sliderWrapper__iuWEp .carousel-module_sliderAnimated__g3Y2u .carousel-module_slide__AjSkx .carousel-module_slideItems__1cRje .carousel-module_slideItem__nGpRP{box-sizing:border-box;padding:0 12px;position:relative}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_slider__CWijV .carousel-module_sliderWrapper__iuWEp .carousel-module_sliderAnimated__g3Y2u .carousel-module_slideSelected__7juUC{opacity:1}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_dotsContainer__BB4SK{display:flex;justify-content:center;margin:32px 0 0}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_dotsContainer__BB4SK .carousel-module_dot__Mguvv{border:2px solid var(--color-black-40);border-radius:50%;height:12px;margin:0 2px;padding:4px;width:12px}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_dotsContainer__BB4SK .carousel-module_dot__Mguvv.carousel-module_button__od3Bp:hover:not([disabled]){cursor:pointer}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_dotsContainer__BB4SK .carousel-module_dot__Mguvv.carousel-module_selected__iRlel{background-color:var(--color-black-40)}.carousel-module_container__-oNW8 .carousel-module_carouselWrapper__cRoSj .carousel-module_root__UnNLC .carousel-module_onLoadMoreContainer__Btxcv{align-items:center;display:flex;height:100%;justify-content:center;padding-left:5em;width:max-content}";
|
|
2013
|
+
var styles$7 = {"container":"carousel-module_container__-oNW8","carouselWrapper":"carousel-module_carouselWrapper__cRoSj","btn":"carousel-module_btn__FDYVu","btnPrev":"carousel-module_btnPrev__e-wQ1","btnNext":"carousel-module_btnNext__r-L2f","root":"carousel-module_root__UnNLC","slider":"carousel-module_slider__CWijV","noDots":"carousel-module_noDots__Gp68Y","sliderWrapper":"carousel-module_sliderWrapper__iuWEp","sliderAnimated":"carousel-module_sliderAnimated__g3Y2u","slide":"carousel-module_slide__AjSkx","slideItems":"carousel-module_slideItems__1cRje","slideItem":"carousel-module_slideItem__nGpRP","slideSelected":"carousel-module_slideSelected__7juUC","dotsContainer":"carousel-module_dotsContainer__BB4SK","dot":"carousel-module_dot__Mguvv","button":"carousel-module_button__od3Bp","selected":"carousel-module_selected__iRlel","onLoadMoreContainer":"carousel-module_onLoadMoreContainer__Btxcv"};
|
|
2014
|
+
styleInject(css_248z$7);
|
|
2015
|
+
|
|
2016
|
+
var MOBILE_WIDTH = 840;
|
|
2017
|
+
// NOTE: Would it be better to leave all these undefined?
|
|
2018
|
+
// For some reason VSCode is always showing them as defined,
|
|
2019
|
+
// when the context is being used,
|
|
2020
|
+
// eventhough they would be explicitly set to undefined.
|
|
2021
|
+
var initialCarouselContextProps = {
|
|
2022
|
+
itemsShownOnDesktop: 3,
|
|
2023
|
+
itemsShownOnMobile: 1,
|
|
2024
|
+
withDots: false,
|
|
2025
|
+
navigateWithDots: true,
|
|
2026
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2027
|
+
onLoadMore: function onLoadMore() {},
|
|
2028
|
+
hasMore: false,
|
|
2029
|
+
loading: false,
|
|
2030
|
+
loadMoreButtonLabelText: '',
|
|
2031
|
+
title: ''
|
|
2032
|
+
};
|
|
2033
|
+
var initialCarouselContextStateValues = _objectSpread2({
|
|
2034
|
+
isReady: true,
|
|
2035
|
+
transformValue: '0px',
|
|
2036
|
+
numberOfSlides: 0,
|
|
2037
|
+
itemsPerSlide: 0,
|
|
2038
|
+
currentSlide: 0,
|
|
2039
|
+
width: 0,
|
|
2040
|
+
numberOfItems: 0,
|
|
2041
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2042
|
+
handleUpdateSlideProps: function handleUpdateSlideProps() {}
|
|
2043
|
+
}, initialCarouselContextProps);
|
|
2044
|
+
|
|
2045
|
+
var throwFieldImplError = function throwFieldImplError(fieldName) {
|
|
2046
|
+
throw new Error("".concat(fieldName, " is still unimplemented, when it should be implemented"));
|
|
2047
|
+
};
|
|
2048
|
+
var CarouselContext = /*#__PURE__*/React__default.createContext(_objectSpread2(_objectSpread2({}, initialCarouselContextStateValues), {}, {
|
|
2049
|
+
setTransformValue: function setTransformValue() {
|
|
2050
|
+
throwFieldImplError('setTransformValue');
|
|
2051
|
+
},
|
|
2052
|
+
setNumberOfSlides: function setNumberOfSlides() {
|
|
2053
|
+
throwFieldImplError('setNumberOfSlides');
|
|
2054
|
+
},
|
|
2055
|
+
setItemsPerSlide: function setItemsPerSlide() {
|
|
2056
|
+
throwFieldImplError('setItemsPerSlide');
|
|
2057
|
+
},
|
|
2058
|
+
setCurrentSlide: function setCurrentSlide() {
|
|
2059
|
+
throwFieldImplError('setCurrentSlide');
|
|
2060
|
+
},
|
|
2061
|
+
setWidth: function setWidth() {
|
|
2062
|
+
throwFieldImplError('setWidth');
|
|
2063
|
+
},
|
|
2064
|
+
handleUpdateSlideProps: function handleUpdateSlideProps() {
|
|
2065
|
+
throwFieldImplError('handleUpdateSlideProps');
|
|
2066
|
+
}
|
|
2067
|
+
}));
|
|
2068
|
+
function useCarouselContext() {
|
|
2069
|
+
var context = React__default.useContext(CarouselContext);
|
|
2070
|
+
if (!context) {
|
|
2071
|
+
throw new Error("Carousel components cannot be rendered outside the CarouselContextProvider");
|
|
2072
|
+
}
|
|
2073
|
+
return context;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
var _excluded$4 = ["children", "numberOfItems"];
|
|
2077
|
+
function useCarouselContextState() {
|
|
2078
|
+
var _React$useState = React__default.useState(initialCarouselContextStateValues.isReady),
|
|
2079
|
+
_React$useState2 = _slicedToArray(_React$useState, 1),
|
|
2080
|
+
isReady = _React$useState2[0];
|
|
2081
|
+
var _React$useState3 = React__default.useState(initialCarouselContextStateValues.transformValue),
|
|
2082
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
2083
|
+
transformValue = _React$useState4[0],
|
|
2084
|
+
setTransformValue = _React$useState4[1];
|
|
2085
|
+
var _React$useState5 = React__default.useState(initialCarouselContextStateValues.numberOfSlides),
|
|
2086
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
2087
|
+
numberOfSlides = _React$useState6[0],
|
|
2088
|
+
setNumberOfSlides = _React$useState6[1];
|
|
2089
|
+
var _React$useState7 = React__default.useState(initialCarouselContextStateValues.itemsPerSlide),
|
|
2090
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
2091
|
+
itemsPerSlide = _React$useState8[0],
|
|
2092
|
+
setItemsPerSlide = _React$useState8[1];
|
|
2093
|
+
var _React$useState9 = React__default.useState(initialCarouselContextStateValues.currentSlide),
|
|
2094
|
+
_React$useState0 = _slicedToArray(_React$useState9, 2),
|
|
2095
|
+
currentSlide = _React$useState0[0],
|
|
2096
|
+
setCurrentSlide = _React$useState0[1];
|
|
2097
|
+
var _React$useState1 = React__default.useState(initialCarouselContextStateValues.width),
|
|
2098
|
+
_React$useState10 = _slicedToArray(_React$useState1, 2),
|
|
2099
|
+
width = _React$useState10[0],
|
|
2100
|
+
setWidth = _React$useState10[1];
|
|
2101
|
+
var handleUpdateSlideProps = function handleUpdateSlideProps(targetSlide) {
|
|
2102
|
+
if (targetSlide === 0) {
|
|
2103
|
+
setTransformValue('0px');
|
|
2104
|
+
} else {
|
|
2105
|
+
// The transform is ALWAYS negative, based purely on the target index.
|
|
2106
|
+
setTransformValue("-".concat(targetSlide, "00%"));
|
|
2107
|
+
}
|
|
2108
|
+
setCurrentSlide(targetSlide);
|
|
2109
|
+
};
|
|
2110
|
+
return {
|
|
2111
|
+
isReady: isReady,
|
|
2112
|
+
transformValue: transformValue,
|
|
2113
|
+
setTransformValue: setTransformValue,
|
|
2114
|
+
numberOfSlides: numberOfSlides,
|
|
2115
|
+
setNumberOfSlides: setNumberOfSlides,
|
|
2116
|
+
itemsPerSlide: itemsPerSlide,
|
|
2117
|
+
setItemsPerSlide: setItemsPerSlide,
|
|
2118
|
+
currentSlide: currentSlide,
|
|
2119
|
+
setCurrentSlide: setCurrentSlide,
|
|
2120
|
+
width: width,
|
|
2121
|
+
setWidth: setWidth,
|
|
2122
|
+
handleUpdateSlideProps: handleUpdateSlideProps
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2125
|
+
function CarouselContextProvider(_ref) {
|
|
2126
|
+
var children = _ref.children,
|
|
2127
|
+
numberOfItems = _ref.numberOfItems,
|
|
2128
|
+
backwardCompatibleProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
2129
|
+
var carouselContext = useCarouselContextState();
|
|
2130
|
+
var value = React__default.useMemo(function () {
|
|
2131
|
+
return _objectSpread2(_objectSpread2({
|
|
2132
|
+
numberOfItems: numberOfItems
|
|
2133
|
+
}, carouselContext), backwardCompatibleProps);
|
|
2134
|
+
}, [numberOfItems, carouselContext, backwardCompatibleProps]);
|
|
2135
|
+
return /*#__PURE__*/React__default.createElement(CarouselContext.Provider, {
|
|
2136
|
+
value: value
|
|
2137
|
+
}, children);
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* @param arr - any array.
|
|
2142
|
+
* @param len - the array length.
|
|
2143
|
+
* @return chunks array of initial array (grouped elements).
|
|
2144
|
+
*/
|
|
2145
|
+
function splitArrayIntoChunksOfLen(
|
|
2146
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2147
|
+
arr, len) {
|
|
2148
|
+
var chunks = [];
|
|
2149
|
+
var i = 0;
|
|
2150
|
+
var n = arr.length;
|
|
2151
|
+
while (i < n) {
|
|
2152
|
+
chunks.push(arr.slice(i, i += len));
|
|
2153
|
+
}
|
|
2154
|
+
return chunks;
|
|
2155
|
+
}
|
|
2156
|
+
/**
|
|
2157
|
+
* Create an unique key for item set.
|
|
2158
|
+
* @param index - item index.
|
|
2159
|
+
* @param itemId - item (element of the array). Default 'itemSet-item'
|
|
2160
|
+
* @param itemSetPrefix - item prefix (element of the array).
|
|
2161
|
+
* @return an unique key based on input data.
|
|
2162
|
+
*/
|
|
2163
|
+
var getItemSetItemKey = function getItemSetItemKey(index, itemId) {
|
|
2164
|
+
var itemSetPrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'itemSet-item';
|
|
2165
|
+
return "".concat(itemSetPrefix, "-").concat('', "-").concat(index);
|
|
2166
|
+
};
|
|
2167
|
+
/**
|
|
2168
|
+
* @param item - item (element of the array).
|
|
2169
|
+
* @param index - item index.
|
|
2170
|
+
* @return an unique key for the dot (slide counter) based on input data.
|
|
2171
|
+
*/
|
|
2172
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2173
|
+
var getSlideDotKey = function getSlideDotKey(item, index) {
|
|
2174
|
+
var _item$id;
|
|
2175
|
+
return "slide-dot-".concat((_item$id = item === null || item === void 0 ? void 0 : item.id) !== null && _item$id !== void 0 ? _item$id : '', "-").concat(index);
|
|
2176
|
+
};
|
|
2177
|
+
var getLoadMoreKey = function getLoadMoreKey() {
|
|
2178
|
+
return 'carousel-loadmore';
|
|
2179
|
+
};
|
|
2180
|
+
|
|
2181
|
+
function CarouselSliderPage(_ref) {
|
|
2182
|
+
var _ref2;
|
|
2183
|
+
var itemSet = _ref.itemSet,
|
|
2184
|
+
itemSetIndex = _ref.itemSetIndex;
|
|
2185
|
+
var _useCarouselContext = useCarouselContext(),
|
|
2186
|
+
currentSlide = _useCarouselContext.currentSlide,
|
|
2187
|
+
width = _useCarouselContext.width,
|
|
2188
|
+
itemsShownOnDesktop = _useCarouselContext.itemsShownOnDesktop,
|
|
2189
|
+
itemsShownOnMobile = _useCarouselContext.itemsShownOnMobile;
|
|
2190
|
+
var itemsPerSlide = (_ref2 = width > MOBILE_WIDTH ? itemsShownOnDesktop : itemsShownOnMobile) !== null && _ref2 !== void 0 ? _ref2 : 1;
|
|
2191
|
+
var styleWidth = "".concat(100 / itemsPerSlide, "%");
|
|
2192
|
+
return /*#__PURE__*/React__default.createElement("li", {
|
|
2193
|
+
ref: function ref(node) {
|
|
2194
|
+
return node && node.toggleAttribute('inert', itemSetIndex !== currentSlide);
|
|
2195
|
+
},
|
|
2196
|
+
"aria-hidden": itemSetIndex !== currentSlide,
|
|
2197
|
+
className: classNames(styles$7.slide, itemSetIndex === currentSlide && styles$7.slideSelected)
|
|
2198
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2199
|
+
className: styles$7.slideItems
|
|
2200
|
+
}, itemSet.map(function (item, itemIndex) {
|
|
2201
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2202
|
+
key: getItemSetItemKey(itemIndex, undefined, "itemSet-".concat(itemSetIndex, "-item")),
|
|
2203
|
+
className: styles$7.slideItem,
|
|
2204
|
+
style: {
|
|
2205
|
+
width: styleWidth
|
|
2206
|
+
}
|
|
2207
|
+
}, item);
|
|
2208
|
+
})));
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
function useCarouselSliderRegionAriaLabel() {
|
|
2212
|
+
var _useCarouselContext = useCarouselContext(),
|
|
2213
|
+
itemsPerSlide = _useCarouselContext.itemsPerSlide,
|
|
2214
|
+
currentSlide = _useCarouselContext.currentSlide,
|
|
2215
|
+
numberOfItems = _useCarouselContext.numberOfItems;
|
|
2216
|
+
var _useTranslationWithFa = useTranslationWithFallback(),
|
|
2217
|
+
t = _useTranslationWithFa.t;
|
|
2218
|
+
return t('carouselSliderRegionLabelText').replace('{itemsPerSlide}', String(itemsPerSlide)).replace('{numberOfItems}', String(numberOfItems)).replace('{currentSlide}', String(currentSlide + 1));
|
|
2219
|
+
}
|
|
2220
|
+
function CarouselLoadMoreButton() {
|
|
2221
|
+
var _useCarouselContext2 = useCarouselContext(),
|
|
2222
|
+
onLoadMore = _useCarouselContext2.onLoadMore,
|
|
2223
|
+
loading = _useCarouselContext2.loading,
|
|
2224
|
+
loadMoreButtonLabelText = _useCarouselContext2.loadMoreButtonLabelText;
|
|
2225
|
+
var iconStart = loading ? /*#__PURE__*/React__default.createElement(LoadingSpinner, {
|
|
2226
|
+
small: true
|
|
2227
|
+
}) : null;
|
|
2228
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2229
|
+
className: styles$7.onLoadMoreContainer
|
|
2230
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
2231
|
+
iconStart: iconStart,
|
|
2232
|
+
onClick: onLoadMore,
|
|
2233
|
+
variant: ButtonVariant.Primary,
|
|
2234
|
+
role: "button"
|
|
2235
|
+
}, String(loadMoreButtonLabelText)));
|
|
2236
|
+
}
|
|
2237
|
+
function CarouselSlider(_ref) {
|
|
2238
|
+
var children = _ref.children;
|
|
2239
|
+
var _useCarouselContext3 = useCarouselContext(),
|
|
2240
|
+
transformValue = _useCarouselContext3.transformValue,
|
|
2241
|
+
itemsPerSlide = _useCarouselContext3.itemsPerSlide,
|
|
2242
|
+
onLoadMore = _useCarouselContext3.onLoadMore,
|
|
2243
|
+
hasMore = _useCarouselContext3.hasMore;
|
|
2244
|
+
var shouldShowLoadMoreButton = hasMore && !!onLoadMore;
|
|
2245
|
+
var items = React__default.useMemo(function () {
|
|
2246
|
+
return shouldShowLoadMoreButton ? [].concat(_toConsumableArray(children), [/*#__PURE__*/React__default.createElement(CarouselLoadMoreButton, {
|
|
2247
|
+
key: getLoadMoreKey()
|
|
2248
|
+
})]) : children;
|
|
2249
|
+
}, [children, shouldShowLoadMoreButton]);
|
|
2250
|
+
var itemSets = React__default.useMemo(function () {
|
|
2251
|
+
return itemsPerSlide > 0 ? splitArrayIntoChunksOfLen(items, itemsPerSlide) : [];
|
|
2252
|
+
}, [items, itemsPerSlide]);
|
|
2253
|
+
var ariaLabel = useCarouselSliderRegionAriaLabel();
|
|
2254
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2255
|
+
className: styles$7.sliderWrapper,
|
|
2256
|
+
"data-testid": "carousel-slider"
|
|
2257
|
+
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
2258
|
+
className: styles$7.sliderAnimated,
|
|
2259
|
+
style: {
|
|
2260
|
+
transform: "translateX(".concat(transformValue, ")")
|
|
2261
|
+
},
|
|
2262
|
+
"aria-label": ariaLabel,
|
|
2263
|
+
role: "presentation"
|
|
2264
|
+
}, itemSets.map(function (itemSet, itemSetIndex) {
|
|
2265
|
+
return /*#__PURE__*/React__default.createElement(CarouselSliderPage
|
|
2266
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
2267
|
+
, {
|
|
2268
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
2269
|
+
key: "itemSet-".concat(itemSetIndex),
|
|
2270
|
+
itemSet: itemSet,
|
|
2271
|
+
itemSetIndex: itemSetIndex
|
|
2272
|
+
});
|
|
2273
|
+
})));
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
function CarouselPreviousSlideButton() {
|
|
2277
|
+
var _useConfig = useConfig(),
|
|
2278
|
+
previous = _useConfig.copy.previous;
|
|
2279
|
+
var _useCarouselContext = useCarouselContext(),
|
|
2280
|
+
isReady = _useCarouselContext.isReady,
|
|
2281
|
+
numberOfSlides = _useCarouselContext.numberOfSlides,
|
|
2282
|
+
currentSlide = _useCarouselContext.currentSlide,
|
|
2283
|
+
title = _useCarouselContext.title,
|
|
2284
|
+
handleUpdateSlideProps = _useCarouselContext.handleUpdateSlideProps;
|
|
2285
|
+
var handlePrevClick = function handlePrevClick() {
|
|
2286
|
+
// Loop to the last slide if we are on the first, otherwise go to the previous.
|
|
2287
|
+
var targetSlide = currentSlide === 0 ? numberOfSlides - 1 : currentSlide - 1;
|
|
2288
|
+
handleUpdateSlideProps(targetSlide);
|
|
2289
|
+
};
|
|
2290
|
+
var ariaLabelTitle = title ? " - ".concat(title) : '';
|
|
2291
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
2292
|
+
type: "button",
|
|
2293
|
+
"aria-label": "".concat(previous).concat(ariaLabelTitle),
|
|
2294
|
+
className: classNames(styles$7.btn, styles$7.btnPrev),
|
|
2295
|
+
onClick: handlePrevClick,
|
|
2296
|
+
disabled: !isReady
|
|
2297
|
+
}, /*#__PURE__*/React__default.createElement(IconAngleLeft, null));
|
|
2298
|
+
}
|
|
2299
|
+
function CarouselNextSlideButton() {
|
|
2300
|
+
var _useConfig2 = useConfig(),
|
|
2301
|
+
next = _useConfig2.copy.next;
|
|
2302
|
+
var _useCarouselContext2 = useCarouselContext(),
|
|
2303
|
+
isReady = _useCarouselContext2.isReady,
|
|
2304
|
+
numberOfSlides = _useCarouselContext2.numberOfSlides,
|
|
2305
|
+
currentSlide = _useCarouselContext2.currentSlide,
|
|
2306
|
+
title = _useCarouselContext2.title,
|
|
2307
|
+
handleUpdateSlideProps = _useCarouselContext2.handleUpdateSlideProps;
|
|
2308
|
+
var handleNextClick = function handleNextClick() {
|
|
2309
|
+
// Loop to the first slide if we are on the last, otherwise go to the next.
|
|
2310
|
+
handleUpdateSlideProps(currentSlide + 1 === numberOfSlides ? 0 : currentSlide + 1);
|
|
2311
|
+
};
|
|
2312
|
+
var ariaLabelTitle = title ? " - ".concat(title) : '';
|
|
2313
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
2314
|
+
type: "button",
|
|
2315
|
+
"aria-label": "".concat(next).concat(ariaLabelTitle),
|
|
2316
|
+
className: classNames(styles$7.btn, styles$7.btnNext),
|
|
2317
|
+
onClick: handleNextClick,
|
|
2318
|
+
disabled: !isReady
|
|
2319
|
+
}, /*#__PURE__*/React__default.createElement(IconAngleRight, null));
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
function CarouselSlideDot(_ref) {
|
|
2323
|
+
var slideIndex = _ref.slideIndex;
|
|
2324
|
+
var _useCarouselContext = useCarouselContext(),
|
|
2325
|
+
currentSlide = _useCarouselContext.currentSlide,
|
|
2326
|
+
handleUpdateSlideProps = _useCarouselContext.handleUpdateSlideProps,
|
|
2327
|
+
navigateWithDots = _useCarouselContext.navigateWithDots;
|
|
2328
|
+
var _useTranslationWithFa = useTranslationWithFallback(),
|
|
2329
|
+
t = _useTranslationWithFa.t;
|
|
2330
|
+
var onClickHandler = function onClickHandler(targetSlide) {
|
|
2331
|
+
if (targetSlide === currentSlide) {
|
|
2332
|
+
return;
|
|
2333
|
+
}
|
|
2334
|
+
handleUpdateSlideProps(targetSlide);
|
|
2335
|
+
};
|
|
2336
|
+
var dotButtonAriaLabel = t('carouselSliderDotNavLabelText').replace('{slideNumber}', String(slideIndex + 1));
|
|
2337
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
2338
|
+
className: classNames(styles$7.dot, _defineProperty(_defineProperty({}, styles$7.selected, slideIndex === currentSlide), styles$7.button, navigateWithDots)),
|
|
2339
|
+
onClick: function onClick() {
|
|
2340
|
+
return onClickHandler(slideIndex);
|
|
2341
|
+
},
|
|
2342
|
+
tabIndex: 0,
|
|
2343
|
+
type: "button",
|
|
2344
|
+
"aria-label": dotButtonAriaLabel,
|
|
2345
|
+
disabled: !navigateWithDots
|
|
2346
|
+
});
|
|
2347
|
+
}
|
|
2348
|
+
function CarouselSlideDots() {
|
|
2349
|
+
var _useCarouselContext2 = useCarouselContext(),
|
|
2350
|
+
numberOfSlides = _useCarouselContext2.numberOfSlides,
|
|
2351
|
+
navigateWithDots = _useCarouselContext2.navigateWithDots;
|
|
2352
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2353
|
+
className: styles$7.dotsContainer,
|
|
2354
|
+
role: "navigation",
|
|
2355
|
+
"aria-hidden": !navigateWithDots,
|
|
2356
|
+
"data-testid": "carousel-dots"
|
|
2357
|
+
}, _toConsumableArray(Array(numberOfSlides)).map(function (entry, slideIndex) {
|
|
2358
|
+
return /*#__PURE__*/React__default.createElement(CarouselSlideDot, {
|
|
2359
|
+
key: getSlideDotKey(entry, slideIndex),
|
|
2360
|
+
slideIndex: slideIndex
|
|
2361
|
+
});
|
|
2362
|
+
}));
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
var _excluded$3 = ["children", "className", "itemsDesktop", "itemsMobile"];
|
|
2366
|
+
function useCarouselDimensions() {
|
|
2367
|
+
var _useCarouselContext = useCarouselContext(),
|
|
2368
|
+
setWidth = _useCarouselContext.setWidth;
|
|
2369
|
+
var updateDimensions = function updateDimensions() {
|
|
2370
|
+
return setWidth(window.innerWidth);
|
|
2371
|
+
};
|
|
2372
|
+
useEffect(function () {
|
|
2373
|
+
updateDimensions();
|
|
2374
|
+
window.addEventListener('resize', updateDimensions);
|
|
2375
|
+
return function () {
|
|
2376
|
+
return window.removeEventListener('resize', updateDimensions);
|
|
2377
|
+
};
|
|
2378
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2379
|
+
}, []);
|
|
2380
|
+
}
|
|
2381
|
+
function useCarouselRegionAriaLabel() {
|
|
2382
|
+
var _useCarouselContext2 = useCarouselContext(),
|
|
2383
|
+
title = _useCarouselContext2.title;
|
|
2384
|
+
var _useTranslationWithFa = useTranslationWithFallback(),
|
|
2385
|
+
t = _useTranslationWithFa.t;
|
|
2386
|
+
return t('carouselRegionLabelText').replace('{title}', title !== null && title !== void 0 ? title : '');
|
|
2387
|
+
}
|
|
2388
|
+
function CarouselWithContext(_ref) {
|
|
2389
|
+
var items = _ref.children,
|
|
2390
|
+
_ref$className = _ref.className,
|
|
2391
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
2392
|
+
var _useCarouselContext3 = useCarouselContext(),
|
|
2393
|
+
isReady = _useCarouselContext3.isReady,
|
|
2394
|
+
setTransformValue = _useCarouselContext3.setTransformValue,
|
|
2395
|
+
numberOfSlides = _useCarouselContext3.numberOfSlides,
|
|
2396
|
+
setNumberOfSlides = _useCarouselContext3.setNumberOfSlides,
|
|
2397
|
+
itemsPerSlide = _useCarouselContext3.itemsPerSlide,
|
|
2398
|
+
setItemsPerSlide = _useCarouselContext3.setItemsPerSlide,
|
|
2399
|
+
setCurrentSlide = _useCarouselContext3.setCurrentSlide,
|
|
2400
|
+
width = _useCarouselContext3.width,
|
|
2401
|
+
itemsShownOnDesktop = _useCarouselContext3.itemsShownOnDesktop,
|
|
2402
|
+
itemsShownOnMobile = _useCarouselContext3.itemsShownOnMobile,
|
|
2403
|
+
withDots = _useCarouselContext3.withDots,
|
|
2404
|
+
onLoadMore = _useCarouselContext3.onLoadMore,
|
|
2405
|
+
hasMore = _useCarouselContext3.hasMore;
|
|
2406
|
+
var carouselAriaLabel = useCarouselRegionAriaLabel();
|
|
2407
|
+
useCarouselDimensions();
|
|
2408
|
+
useEffect(function () {
|
|
2409
|
+
var _ref2;
|
|
2410
|
+
setItemsPerSlide(Math.ceil((_ref2 = width > MOBILE_WIDTH ? itemsShownOnDesktop : itemsShownOnMobile) !== null && _ref2 !== void 0 ? _ref2 : 1));
|
|
2411
|
+
setCurrentSlide(0);
|
|
2412
|
+
setTransformValue('0px');
|
|
2413
|
+
}, [width, itemsShownOnDesktop, itemsShownOnMobile, setItemsPerSlide, setCurrentSlide, setTransformValue]);
|
|
2414
|
+
useEffect(function () {
|
|
2415
|
+
if (itemsPerSlide > 0) {
|
|
2416
|
+
var itemsCount = hasMore && !!onLoadMore ? items.length + 1 : items.length;
|
|
2417
|
+
setNumberOfSlides(Math.ceil(itemsCount / itemsPerSlide));
|
|
2418
|
+
}
|
|
2419
|
+
}, [itemsPerSlide, hasMore, onLoadMore, items.length, setNumberOfSlides]);
|
|
2420
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2421
|
+
className: classNames(styles$7.container, className),
|
|
2422
|
+
role: "region",
|
|
2423
|
+
"aria-label": carouselAriaLabel
|
|
2424
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2425
|
+
role: "group",
|
|
2426
|
+
className: styles$7.carouselWrapper
|
|
2427
|
+
}, numberOfSlides > 1 && (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(CarouselPreviousSlideButton, null), /*#__PURE__*/React__default.createElement(CarouselNextSlideButton, null))), isReady && (/*#__PURE__*/React__default.createElement("div", {
|
|
2428
|
+
className: styles$7.root
|
|
2429
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2430
|
+
className: classNames(styles$7.slider, numberOfSlides === 1 && styles$7.noDots)
|
|
2431
|
+
}, /*#__PURE__*/React__default.createElement(CarouselSlider, null, items)), withDots && numberOfSlides > 1 && /*#__PURE__*/React__default.createElement(CarouselSlideDots, null)))));
|
|
2432
|
+
}
|
|
2433
|
+
function Carousel(_ref3) {
|
|
2434
|
+
var items = _ref3.children,
|
|
2435
|
+
_ref3$className = _ref3.className,
|
|
2436
|
+
className = _ref3$className === void 0 ? '' : _ref3$className,
|
|
2437
|
+
_ref3$itemsDesktop = _ref3.itemsDesktop,
|
|
2438
|
+
itemsDesktop = _ref3$itemsDesktop === void 0 ? initialCarouselContextStateValues.itemsShownOnDesktop : _ref3$itemsDesktop,
|
|
2439
|
+
_ref3$itemsMobile = _ref3.itemsMobile,
|
|
2440
|
+
itemsMobile = _ref3$itemsMobile === void 0 ? initialCarouselContextStateValues.itemsShownOnMobile : _ref3$itemsMobile,
|
|
2441
|
+
restOfBackwardCompatibleProps = _objectWithoutProperties(_ref3, _excluded$3);
|
|
2442
|
+
return /*#__PURE__*/React__default.createElement(CarouselContextProvider, _objectSpread2({
|
|
2443
|
+
itemsShownOnDesktop: itemsDesktop,
|
|
2444
|
+
itemsShownOnMobile: itemsMobile,
|
|
2445
|
+
numberOfItems: items.length
|
|
2446
|
+
}, restOfBackwardCompatibleProps), /*#__PURE__*/React__default.createElement(CarouselWithContext, {
|
|
2447
|
+
className: className
|
|
2448
|
+
}, items));
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
var css_248z$6 = ".card-module_cardWrapper__SJr54{--height-image:8rem;--height-image-desktop:14.5rem;--width-image:8rem;--link-arrow-color:#000;--link-arrow-label-color:var(--link-arrow-color);display:flex;flex-direction:column;height:100%;min-width:fit-content;position:relative;word-break:break-word}@media (min-width:576px){.card-module_cardWrapper__SJr54{word-break:unset}.card-module_cardWrapper__SJr54.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_isDelimited__gQvB-{--height-image-desktop:100%;overflow-y:hidden}}.card-module_cardWrapper__SJr54.card-module_isHovered__cjbBc:hover{cursor:pointer}.card-module_cardWrapper__SJr54.card-module_isHovered__cjbBc .card-module_title__OJNPP{text-decoration:underline}.card-module_cardWrapper__SJr54.card-module_responsive__UybH4{flex-direction:row}.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_image-left__i3R--{flex-direction:row-reverse}.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi{flex-direction:column}.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_image-left__i3R--,.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_isDelimited__gQvB-{flex-direction:row-reverse}.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_image-left__i3R--.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_image-left__i3R--.card-module_isDelimited__gQvB-,.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_image-right__VbzxV{flex-direction:row}.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_image-right__VbzxV.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_fixed-horisontal__wHQHq.card-module_image-right__VbzxV.card-module_isDelimited__gQvB-{flex-direction:row-reverse}.card-module_cardWrapper__SJr54>:first-child{flex:1 1}.card-module_cardWrapper__SJr54.card-module_primary-image__95TKR>:first-child,.card-module_cardWrapper__SJr54>:last-child{flex:2 1}.card-module_cardWrapper__SJr54.card-module_primary-image__95TKR>:last-child{flex:1 1}.card-module_cardWrapper__SJr54.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_isDelimited__gQvB-{height:100%;text-decoration:none;width:100%}@media (min-width:576px){.card-module_cardWrapper__SJr54.card-module_isCentered__N166x>:first-child,.card-module_cardWrapper__SJr54.card-module_isCentered__N166x>:last-child,.card-module_cardWrapper__SJr54.card-module_isDelimited__gQvB->:first-child,.card-module_cardWrapper__SJr54.card-module_isDelimited__gQvB->:last-child{flex:none}}.card-module_cardWrapper__SJr54.card-module_withBorder__k-C0z{border:1px solid var(--color-black-30)}.card-module_cardWrapper__SJr54.card-module_withShadow__iM-RO{box-shadow:0 1px 12px 1px rgba(45,62,80,.12)}@media (min-width:576px){.card-module_cardWrapper__SJr54{flex-direction:column;margin-bottom:0}.card-module_cardWrapper__SJr54.card-module_responsive__UybH4,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_image-left__i3R--{flex-direction:column}.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_image-left__i3R--.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_image-left__i3R--.card-module_isDelimited__gQvB-{flex-direction:row}.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_isDelimited__gQvB-{flex-direction:row-reverse}.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi{flex-direction:row}.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_image-left__i3R--,.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_isDelimited__gQvB-{flex-direction:row-reverse}.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_image-left__i3R--.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_image-left__i3R--.card-module_isDelimited__gQvB-{flex-direction:row}.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_horizontalBorder__THzT0{border:none}}@media (min-width:576px) and (max-width:575px){.card-module_cardWrapper__SJr54.card-module_responsive-reverse__YmcIi.card-module_horizontalBorder__THzT0{border:1px solid var(--color-black-30)}}@media (min-width:576px){.card-module_cardWrapper__SJr54>:first-child{flex:1 1}.card-module_cardWrapper__SJr54.card-module_primary-image__95TKR>:first-child,.card-module_cardWrapper__SJr54>:last-child{flex:2 1}.card-module_cardWrapper__SJr54.card-module_primary-image__95TKR>:last-child{flex:1 1}.card-module_cardWrapper__SJr54.card-module_fixed-vertical__-kgtk>:first-child,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4>:first-child{flex:0}.card-module_cardWrapper__SJr54.card-module_fixed-vertical__-kgtk>:last-child,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4>:last-child{flex:auto}.card-module_cardWrapper__SJr54.card-module_isCentered__N166x.card-module_horizontalBorder__THzT0,.card-module_cardWrapper__SJr54.card-module_isDelimited__gQvB-.card-module_horizontalBorder__THzT0,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_horizontalBorder__THzT0{border:1px solid var(--color-black-30)}}@media (min-width:576px) and (max-width:575px){.card-module_cardWrapper__SJr54.card-module_isCentered__N166x.card-module_horizontalBorder__THzT0,.card-module_cardWrapper__SJr54.card-module_isDelimited__gQvB-.card-module_horizontalBorder__THzT0,.card-module_cardWrapper__SJr54.card-module_responsive__UybH4.card-module_horizontalBorder__THzT0{border:none}}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR{background-position:50%;background-repeat:no-repeat;background-size:cover;box-sizing:border-box;min-width:var(--width-image);padding:var(--spacing-s) var(--spacing-m);position:relative;text-decoration:none}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_fixed-vertical__-kgtk,.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_responsive-reverse__YmcIi,.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_responsive__UybH4{padding-bottom:62.5%}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_fixed-vertical__-kgtk,.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_responsive-reverse__YmcIi,.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_responsive__UybH4{min-height:var(--height-image-desktop)}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_responsive-reverse__YmcIi{padding-bottom:unset}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-{position:absolute;width:100%}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-{width:62.5%}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-.card-module_right__o9C8m{margin-right:37.5%}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-.card-module_left__GKCFu{margin-left:37.5%}}@media (min-width:576px) and (min-width:992px){.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-{width:80%}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-.card-module_right__o9C8m{margin-right:20%}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR.card-module_isDelimited__gQvB-.card-module_left__GKCFu{margin-left:20%}}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR{min-height:var(--height-image-desktop)}}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR .card-module_imageLabel__0d1qL{padding:var(--spacing-xs)}.card-module_cardWrapper__SJr54 .card-module_imageWrapper__tIOgR .card-module_imageLabel__0d1qL .card-module_tag__B2hlG{--tag-background:var(--color-black-5);font-size:var(--fontsize-body-s);font-weight:600}.card-module_cardWrapper__SJr54 .card-module_contentWrapper__uM-3X{align-self:stretch;display:flex;flex:1;flex-direction:column;justify-content:space-between;position:relative}@media (max-width:575px){.card-module_cardWrapper__SJr54 .card-module_contentWrapper__uM-3X{background-color:var(--color-white)!important}}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_contentWrapper__uM-3X.card-module_isCentered__N166x,.card-module_cardWrapper__SJr54 .card-module_contentWrapper__uM-3X.card-module_isDelimited__gQvB-{margin:24px;width:37.5%;z-index:1}.card-module_cardWrapper__SJr54 .card-module_contentWrapper__uM-3X.card-module_isDelimited__gQvB-{margin:42px 24px;max-width:460px;width:62.5%}}.card-module_cardWrapper__SJr54 .card-module_content__sRwUK{flex:1}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F{display:flex;flex-direction:column;padding:var(--spacing-s) var(--spacing-m)}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_title__OJNPP{word-wrap:break-word;font-size:var(--fontsize-heading-s);line-height:var(--lineheight-m);margin:var(--spacing-2-xs) 0;padding:0}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_title__OJNPP.card-module_responsive-reverse__YmcIi{font-size:var(--fontsize-heading-m)}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_title__OJNPP{word-wrap:normal;font-size:var(--fontsize-heading-m);margin-top:var(--spacing-2-xs)}}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_subTitle__nkj5k{color:var(--color-black-60);font-size:var(--fontsize-body-s);margin:var(--spacing-2-xs) 0}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_subTitle__nkj5k{font-size:var(--fontsize-body-m)}}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_text__z1EUK{display:-webkit-box;font-size:var(--fontsize-body-m);line-height:var(--lineheight-m);order:3}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_text__z1EUK.card-module_clamp__ClsPx{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_text__z1EUK{-webkit-line-clamp:none;-webkit-box-orient:vertical;font-size:var(--fontsize-body-l);line-height:var(--lineheight-l);margin-bottom:var(--spacing-2-xs)}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_text__z1EUK.card-module_clamp__ClsPx{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_text__z1EUK.card-module_responsive-reverse__YmcIi{font-size:var(--fontsize-body-l);line-height:var(--lineheight-l)}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_text__z1EUK p{margin:0}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_customContent__mAO7p{margin:var(--spacing-2-xs) 0;order:4}.card-module_cardWrapper__SJr54 .card-module_textWrapper__xZN4F .card-module_customContent__mAO7p p{margin:0}.card-module_cardWrapper__SJr54 .card-module_buttonWrapper__oMDvH{color:var(--link-arrow-color);display:flex;line-height:var(--lineheight-l);order:5;padding:0 var(--spacing-s);padding-bottom:var(--spacing-2-xs);vertical-align:middle}@media (min-width:576px){.card-module_cardWrapper__SJr54 .card-module_buttonWrapper__oMDvH{padding-bottom:var(--spacing-s)}}.card-module_cardWrapper__SJr54 .card-module_buttonWrapper__oMDvH a{align-items:center;color:var(--link-arrow-color);display:flex;flex:1!important;justify-content:flex-start!important;text-decoration:none}.card-module_cardWrapper__SJr54 .card-module_buttonWrapper__oMDvH a>span{flex:none}.card-module_cardWrapper__SJr54 .card-module_buttonWrapper__oMDvH a svg{height:var(--spacing-2-xl);width:var(--spacing-2-xl)}.card-module_cardWrapper__SJr54 .card-module_buttonWrapper__oMDvH a .card-module_linkArrowLabel__wvEjb{color:var(--link-arrow-label-color);padding-top:var(--spacing-xs)}";
|
|
2452
|
+
var styles$6 = {"cardWrapper":"card-module_cardWrapper__SJr54","isCentered":"card-module_isCentered__N166x","isDelimited":"card-module_isDelimited__gQvB-","isHovered":"card-module_isHovered__cjbBc","title":"card-module_title__OJNPP","responsive":"card-module_responsive__UybH4","image-left":"card-module_image-left__i3R--","responsive-reverse":"card-module_responsive-reverse__YmcIi","fixed-horisontal":"card-module_fixed-horisontal__wHQHq","image-right":"card-module_image-right__VbzxV","primary-image":"card-module_primary-image__95TKR","withBorder":"card-module_withBorder__k-C0z","withShadow":"card-module_withShadow__iM-RO","horizontalBorder":"card-module_horizontalBorder__THzT0","fixed-vertical":"card-module_fixed-vertical__-kgtk","imageWrapper":"card-module_imageWrapper__tIOgR","right":"card-module_right__o9C8m","left":"card-module_left__GKCFu","imageLabel":"card-module_imageLabel__0d1qL","tag":"card-module_tag__B2hlG","contentWrapper":"card-module_contentWrapper__uM-3X","content":"card-module_content__sRwUK","textWrapper":"card-module_textWrapper__xZN4F","subTitle":"card-module_subTitle__nkj5k","text":"card-module_text__z1EUK","clamp":"card-module_clamp__ClsPx","customContent":"card-module_customContent__mAO7p","buttonWrapper":"card-module_buttonWrapper__oMDvH","linkArrowLabel":"card-module_linkArrowLabel__wvEjb"};
|
|
2453
|
+
styleInject(css_248z$6);
|
|
2454
|
+
|
|
2455
|
+
var warnOnSSR = function warnOnSSR() {
|
|
2456
|
+
// eslint-disable-next-line no-console
|
|
2457
|
+
console.warn('Attempted to navigate in a non-browser environment.');
|
|
2458
|
+
};
|
|
2459
|
+
function CardTitle(_ref) {
|
|
2460
|
+
var children = _ref.children,
|
|
2461
|
+
direction = _ref.direction,
|
|
2462
|
+
withTitleIcon = _ref.withTitleIcon,
|
|
2463
|
+
titleIcon = _ref.titleIcon;
|
|
2464
|
+
if (!children) {
|
|
2465
|
+
return null;
|
|
2466
|
+
}
|
|
2467
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2468
|
+
className: classNames(styles$6.title, direction && styles$6[direction])
|
|
2469
|
+
}, children, withTitleIcon && titleIcon);
|
|
2470
|
+
}
|
|
2471
|
+
function CardSubTitle(_ref2) {
|
|
2472
|
+
var children = _ref2.children,
|
|
2473
|
+
backgroundColor = _ref2.backgroundColor;
|
|
2474
|
+
if (!children) {
|
|
2475
|
+
return null;
|
|
2476
|
+
}
|
|
2477
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2478
|
+
className: classNames(styles$6.subTitle, backgroundColor && isWhiteText(backgroundColor) && colorStyles.whiteText)
|
|
2479
|
+
}, children);
|
|
2480
|
+
}
|
|
2481
|
+
function CardText(_ref3) {
|
|
2482
|
+
var children = _ref3.children,
|
|
2483
|
+
clampText = _ref3.clampText,
|
|
2484
|
+
direction = _ref3.direction;
|
|
2485
|
+
if (!children) {
|
|
2486
|
+
return null;
|
|
2487
|
+
}
|
|
2488
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2489
|
+
className: classNames(styles$6.text, clampText && styles$6.clamp, direction && styles$6[direction])
|
|
2490
|
+
}, children);
|
|
2491
|
+
}
|
|
2492
|
+
function CardLink(_ref4) {
|
|
2493
|
+
var url = _ref4.url,
|
|
2494
|
+
backgroundColor = _ref4.backgroundColor,
|
|
2495
|
+
openLinkInNewTab = _ref4.openLinkInNewTab,
|
|
2496
|
+
ariaLabel = _ref4.ariaLabel,
|
|
2497
|
+
linkArrowLabel = _ref4.linkArrowLabel;
|
|
2498
|
+
if (!url) {
|
|
2499
|
+
return null;
|
|
2500
|
+
}
|
|
2501
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2502
|
+
className: classNames(styles$6.buttonWrapper, backgroundColor ? colorStyles["background".concat(getColor(backgroundColor))] : colorStyles.backgroundDefault, backgroundColor && isWhiteText(backgroundColor) && colorStyles.whiteLink)
|
|
2503
|
+
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
2504
|
+
tabIndex: -1,
|
|
2505
|
+
href: url,
|
|
2506
|
+
openInNewTab: openLinkInNewTab,
|
|
2507
|
+
iconLeft: /*#__PURE__*/React__default.createElement(IconArrowRight, {
|
|
2508
|
+
"aria-hidden": "true"
|
|
2509
|
+
}),
|
|
2510
|
+
showExternalIcon: false,
|
|
2511
|
+
"aria-label": ariaLabel
|
|
2512
|
+
}, linkArrowLabel && (/*#__PURE__*/React__default.createElement("span", {
|
|
2513
|
+
className: styles$6.linkArrowLabel
|
|
2514
|
+
}, linkArrowLabel))));
|
|
2515
|
+
}
|
|
2516
|
+
var getImagePosition = function getImagePosition(alignment) {
|
|
2517
|
+
if (alignment === undefined) {
|
|
2518
|
+
return 'image-left';
|
|
2519
|
+
}
|
|
2520
|
+
return alignment.indexOf('left') === -1 ? 'image-right' : 'image-left';
|
|
2521
|
+
};
|
|
2522
|
+
function CardInnerContent(_ref5) {
|
|
2523
|
+
var id = _ref5.id,
|
|
2524
|
+
ariaLabel = _ref5.ariaLabel,
|
|
2525
|
+
imageUrl = _ref5.imageUrl,
|
|
2526
|
+
imageLabel = _ref5.imageLabel,
|
|
2527
|
+
title = _ref5.title,
|
|
2528
|
+
withTitleIcon = _ref5.withTitleIcon,
|
|
2529
|
+
titleIcon = _ref5.titleIcon,
|
|
2530
|
+
subTitle = _ref5.subTitle,
|
|
2531
|
+
text = _ref5.text,
|
|
2532
|
+
customContent = _ref5.customContent,
|
|
2533
|
+
hasLink = _ref5.hasLink,
|
|
2534
|
+
linkArrowLabel = _ref5.linkArrowLabel,
|
|
2535
|
+
url = _ref5.url,
|
|
2536
|
+
withBorder = _ref5.withBorder,
|
|
2537
|
+
withShadow = _ref5.withShadow,
|
|
2538
|
+
_ref5$direction = _ref5.direction,
|
|
2539
|
+
direction = _ref5$direction === void 0 ? 'responsive' : _ref5$direction,
|
|
2540
|
+
clampText = _ref5.clampText,
|
|
2541
|
+
openLinkInNewTab = _ref5.openLinkInNewTab,
|
|
2542
|
+
style = _ref5.style,
|
|
2543
|
+
backgroundColor = _ref5.backgroundColor,
|
|
2544
|
+
_ref5$primaryContent = _ref5.primaryContent,
|
|
2545
|
+
primaryContent = _ref5$primaryContent === void 0 ? 'text' : _ref5$primaryContent,
|
|
2546
|
+
isHovered = _ref5.isHovered,
|
|
2547
|
+
handleToggleActive = _ref5.handleToggleActive,
|
|
2548
|
+
isDelimited = _ref5.isDelimited,
|
|
2549
|
+
isCentered = _ref5.isCentered,
|
|
2550
|
+
imagePosition = _ref5.imagePosition,
|
|
2551
|
+
handleClick = _ref5.handleClick;
|
|
2552
|
+
var dynamicBackgroundClass = backgroundColor ? colorStyles["background".concat(getColor(backgroundColor))] : colorStyles.backgroundDefault;
|
|
2553
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2554
|
+
className: classNames(styles$6.cardWrapper, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$6[direction], direction), styles$6['primary-image'], primaryContent === 'image'), styles$6[imagePosition], imagePosition), styles$6.isDelimited, isDelimited), styles$6.isCentered, isCentered), styles$6.withBorder, withBorder), styles$6.withShadow, withShadow), styles$6.isHovered, isHovered), styles$6.horizontalBorder, backgroundColor), colorStyles.whiteText, backgroundColor && isWhiteText(backgroundColor))),
|
|
2555
|
+
style: style,
|
|
2556
|
+
onMouseEnter: url ? handleToggleActive : undefined,
|
|
2557
|
+
onMouseLeave: url ? handleToggleActive : undefined
|
|
2558
|
+
}, /*#__PURE__*/React__default.createElement(BackgroundImage, {
|
|
2559
|
+
id: "".concat(id, "-image"),
|
|
2560
|
+
url: imageUrl,
|
|
2561
|
+
labelTag: imageLabel,
|
|
2562
|
+
className: classNames(styles$6.imageWrapper, direction && styles$6[direction], isDelimited && styles$6.isDelimited, isCentered && styles$6.isCentered, imagePosition.includes('left') ? styles$6.left : styles$6.right)
|
|
2563
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2564
|
+
className: classNames(styles$6.contentWrapper, isDelimited && styles$6.isDelimited, isCentered && styles$6.isCentered),
|
|
2565
|
+
onClick: handleClick
|
|
2566
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2567
|
+
className: classNames(styles$6.content, dynamicBackgroundClass, _defineProperty(_defineProperty(_defineProperty({}, colorStyles.whiteText, backgroundColor && isWhiteText(backgroundColor)), styles$6.isDelimited, isDelimited), styles$6.isCentered, isCentered))
|
|
2568
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2569
|
+
className: styles$6.textWrapper
|
|
2570
|
+
}, title && (/*#__PURE__*/React__default.createElement(CardTitle, {
|
|
2571
|
+
direction: direction,
|
|
2572
|
+
withTitleIcon: withTitleIcon,
|
|
2573
|
+
titleIcon: titleIcon
|
|
2574
|
+
}, title)), /*#__PURE__*/React__default.createElement(CardSubTitle, {
|
|
2575
|
+
backgroundColor: backgroundColor
|
|
2576
|
+
}, subTitle), text && (/*#__PURE__*/React__default.createElement(CardText, {
|
|
2577
|
+
clampText: clampText,
|
|
2578
|
+
direction: direction
|
|
2579
|
+
}, getTextFromHtml(text))), customContent && (/*#__PURE__*/React__default.createElement("div", {
|
|
2580
|
+
className: styles$6.customContent
|
|
2581
|
+
}, customContent)))), hasLink && (/*#__PURE__*/React__default.createElement(CardLink, {
|
|
2582
|
+
url: url,
|
|
2583
|
+
backgroundColor: backgroundColor,
|
|
2584
|
+
openLinkInNewTab: openLinkInNewTab,
|
|
2585
|
+
ariaLabel: ariaLabel,
|
|
2586
|
+
linkArrowLabel: linkArrowLabel
|
|
2587
|
+
}))));
|
|
2588
|
+
}
|
|
2589
|
+
function Card(props) {
|
|
2590
|
+
var _alignment$startsWith, _alignment$startsWith2;
|
|
2591
|
+
var id = props.id,
|
|
2592
|
+
ariaLabel = props.ariaLabel,
|
|
2593
|
+
className = props.className,
|
|
2594
|
+
url = props.url,
|
|
2595
|
+
openLinkInNewTab = props.openLinkInNewTab,
|
|
2596
|
+
flex = props.flex,
|
|
2597
|
+
alignment = props.alignment;
|
|
2598
|
+
var _useState = useState(false),
|
|
2599
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2600
|
+
isHovered = _useState2[0],
|
|
2601
|
+
setIsHovered = _useState2[1];
|
|
2602
|
+
var handleToggleActive = function handleToggleActive() {
|
|
2603
|
+
return setIsHovered(function (val) {
|
|
2604
|
+
return !val;
|
|
2605
|
+
});
|
|
2606
|
+
};
|
|
2607
|
+
var isDelimited = (_alignment$startsWith = alignment === null || alignment === void 0 ? void 0 : alignment.startsWith('delimited')) !== null && _alignment$startsWith !== void 0 ? _alignment$startsWith : false;
|
|
2608
|
+
var isCentered = (_alignment$startsWith2 = alignment === null || alignment === void 0 ? void 0 : alignment.startsWith('center')) !== null && _alignment$startsWith2 !== void 0 ? _alignment$startsWith2 : false;
|
|
2609
|
+
var imagePosition = getImagePosition(alignment);
|
|
2610
|
+
var _useConfig = useConfig(),
|
|
2611
|
+
_useConfig$utils = _useConfig.utils,
|
|
2612
|
+
redirectToUrl = _useConfig$utils.redirectToUrl,
|
|
2613
|
+
getIsHrefExternal = _useConfig$utils.getIsHrefExternal;
|
|
2614
|
+
var handleClick = function handleClick() {
|
|
2615
|
+
if (!url) return;
|
|
2616
|
+
// Ensure we are in a client-side (browser) environment
|
|
2617
|
+
if (typeof window === 'undefined') {
|
|
2618
|
+
warnOnSSR();
|
|
2619
|
+
return;
|
|
2620
|
+
}
|
|
2621
|
+
// Determine if we should open a new tab: either it's explicitly set, or it's an external URL.
|
|
2622
|
+
var shouldOpenNewTab = openLinkInNewTab || getIsHrefExternal(url);
|
|
2623
|
+
if (shouldOpenNewTab) {
|
|
2624
|
+
var newWindow = window.open(url, '_blank', 'noopener,noreferrer');
|
|
2625
|
+
if (newWindow) newWindow.opener = null;
|
|
2626
|
+
} else {
|
|
2627
|
+
redirectToUrl(url);
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
var content = /*#__PURE__*/React__default.createElement(CardInnerContent, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2631
|
+
isHovered: isHovered,
|
|
2632
|
+
handleToggleActive: handleToggleActive,
|
|
2633
|
+
isDelimited: isDelimited,
|
|
2634
|
+
isCentered: isCentered,
|
|
2635
|
+
imagePosition: imagePosition,
|
|
2636
|
+
handleClick: handleClick
|
|
2637
|
+
}));
|
|
2638
|
+
if (url) {
|
|
2639
|
+
return /*#__PURE__*/React__default.createElement(LinkBox, {
|
|
2640
|
+
id: id,
|
|
2641
|
+
href: url,
|
|
2642
|
+
className: className,
|
|
2643
|
+
"aria-label": ariaLabel || '',
|
|
2644
|
+
openInNewTab: openLinkInNewTab,
|
|
2645
|
+
onMouseEnter: handleToggleActive,
|
|
2646
|
+
onMouseLeave: handleToggleActive,
|
|
2647
|
+
flex: flex
|
|
2648
|
+
}, content);
|
|
2649
|
+
}
|
|
2650
|
+
return content;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
var css_248z$5 = ".grid-module_grid__JUXmh{display:flex;flex-direction:column;gap:1.5rem;margin-bottom:0}@media (min-width:768px){.grid-module_grid__JUXmh{grid-gap:1.5rem;display:grid}}.grid-module_cols1__ZbHhZ{grid-template-columns:repeat(1,1fr)}.grid-module_cols2__w-J5q{grid-template-columns:repeat(2,1fr)}.grid-module_cols3__RME8z{grid-template-columns:repeat(3,1fr)}.grid-module_cols4__GJLLr{grid-template-columns:repeat(4,1fr)}.grid-module_cols5__cWFZQ{grid-template-columns:repeat(5,1fr)}.grid-module_cols6__iTHpi{grid-template-columns:repeat(6,1fr)}.grid-module_cols7__fcSjJ{grid-template-columns:repeat(7,1fr)}.grid-module_cols8__Ida4g{grid-template-columns:repeat(8,1fr)}.grid-module_cols9__DSIkl{grid-template-columns:repeat(9,1fr)}.grid-module_cols10__13ESR{grid-template-columns:repeat(10,1fr)}.grid-module_cols11__uIC1K{grid-template-columns:repeat(11,1fr)}.grid-module_cols12__WaIiP{grid-template-columns:repeat(12,1fr)}";
|
|
2654
|
+
var styles$5 = {"grid":"grid-module_grid__JUXmh","cols1":"grid-module_cols1__ZbHhZ","cols2":"grid-module_cols2__w-J5q","cols3":"grid-module_cols3__RME8z","cols4":"grid-module_cols4__GJLLr","cols5":"grid-module_cols5__cWFZQ","cols6":"grid-module_cols6__iTHpi","cols7":"grid-module_cols7__fcSjJ","cols8":"grid-module_cols8__Ida4g","cols9":"grid-module_cols9__DSIkl","cols10":"grid-module_cols10__13ESR","cols11":"grid-module_cols11__uIC1K","cols12":"grid-module_cols12__WaIiP"};
|
|
2655
|
+
styleInject(css_248z$5);
|
|
2656
|
+
|
|
2657
|
+
function Grid(_ref) {
|
|
2658
|
+
var _ref$colsCount = _ref.colsCount,
|
|
2659
|
+
colsCount = _ref$colsCount === void 0 ? 3 : _ref$colsCount,
|
|
2660
|
+
children = _ref.children,
|
|
2661
|
+
className = _ref.className;
|
|
2662
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2663
|
+
className: classNames(styles$5.grid, styles$5["cols".concat(colsCount)], className)
|
|
2664
|
+
}, children);
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
var _templateObject$1, _templateObject2$1, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
2668
|
+
var defaultOptions$1 = {};
|
|
2669
|
+
var EventTypeId;
|
|
2670
|
+
(function (EventTypeId) {
|
|
2671
|
+
EventTypeId["Course"] = "Course";
|
|
2672
|
+
EventTypeId["General"] = "General";
|
|
2673
|
+
})(EventTypeId || (EventTypeId = {}));
|
|
2674
|
+
var Link__Purpose$1;
|
|
2675
|
+
(function (Link__Purpose) {
|
|
2676
|
+
/** `EXECUTION` features provide metadata necessary for operation execution. */
|
|
2677
|
+
Link__Purpose["Execution"] = "EXECUTION";
|
|
2678
|
+
/** `SECURITY` features provide metadata necessary to securely resolve fields. */
|
|
2679
|
+
Link__Purpose["Security"] = "SECURITY";
|
|
2680
|
+
})(Link__Purpose$1 || (Link__Purpose$1 = {}));
|
|
2681
|
+
var LocalizedCmsEventFieldsFragmentDoc = gql(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n fragment localizedCmsEventFields on LocalizedObject {\n en\n fi\n sv\n }\n"])));
|
|
2682
|
+
var KeywordCmsEventFieldsFragmentDoc = gql(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n fragment keywordCmsEventFields on Keyword {\n id\n internalId\n dataSource\n hasUpcomingEvents\n name {\n ...localizedCmsEventFields\n }\n }\n ", "\n"])), LocalizedCmsEventFieldsFragmentDoc);
|
|
2683
|
+
var PlaceCmsEventFieldsFragmentDoc = gql(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n fragment placeCmsEventFields on Place {\n id\n divisions {\n type\n name {\n ...localizedCmsEventFields\n }\n }\n hasUpcomingEvents\n internalId\n email\n infoUrl {\n ...localizedCmsEventFields\n }\n name {\n ...localizedCmsEventFields\n }\n addressLocality {\n ...localizedCmsEventFields\n }\n streetAddress {\n ...localizedCmsEventFields\n }\n postalCode\n position {\n coordinates\n }\n telephone {\n ...localizedCmsEventFields\n }\n }\n ", "\n"])), LocalizedCmsEventFieldsFragmentDoc);
|
|
2684
|
+
var OfferCmsEventFieldsFragmentDoc = gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n fragment offerCmsEventFields on Offer {\n isFree\n price {\n ...localizedCmsEventFields\n }\n description {\n ...localizedCmsEventFields\n }\n infoUrl {\n ...localizedCmsEventFields\n }\n }\n ", "\n"])), LocalizedCmsEventFieldsFragmentDoc);
|
|
2685
|
+
var RegistrationCmsEventFieldsFragmentDoc = gql(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n fragment registrationCmsEventFields on Registration {\n enrolmentStartTime\n enrolmentEndTime\n remainingAttendeeCapacity\n audienceMinAge\n audienceMaxAge\n }\n"])));
|
|
2686
|
+
var EventCmsEventFieldsFragmentDoc = gql(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n fragment eventCmsEventFields on EventDetails {\n id\n internalId\n audienceMinAge\n audienceMaxAge\n eventStatus\n externalLinks {\n name\n link\n }\n images {\n id\n name\n url\n photographerName\n }\n subEvents {\n internalId\n }\n typeId\n superEvent {\n internalId\n }\n inLanguage {\n name {\n ...localizedCmsEventFields\n }\n }\n keywords {\n ...keywordCmsEventFields\n }\n location {\n ...placeCmsEventFields\n }\n offers {\n ...offerCmsEventFields\n }\n name {\n ...localizedCmsEventFields\n }\n description {\n ...localizedCmsEventFields\n }\n shortDescription {\n ...localizedCmsEventFields\n }\n endTime\n startTime\n publisher\n provider {\n ...localizedCmsEventFields\n }\n infoUrl {\n ...localizedCmsEventFields\n }\n audience {\n id\n name {\n ...localizedCmsEventFields\n }\n }\n registration {\n ...registrationCmsEventFields\n }\n locationExtraInfo {\n ...localizedCmsEventFields\n }\n enrolmentStartTime\n enrolmentEndTime\n }\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), LocalizedCmsEventFieldsFragmentDoc, KeywordCmsEventFieldsFragmentDoc, PlaceCmsEventFieldsFragmentDoc, OfferCmsEventFieldsFragmentDoc, RegistrationCmsEventFieldsFragmentDoc);
|
|
2687
|
+
var EventListDocument = gql(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n query EventList(\n $eventType: [EventTypeId]\n $internetBased: Boolean\n $suitableFor: [Int]\n $allOngoing: Boolean\n $allOngoingAnd: [String]\n $division: [String]\n $end: String\n $endsAfter: String\n $endsBefore: String\n $inLanguage: String\n $include: [String]\n $isFree: Boolean\n $keyword: [String]\n $keywordAnd: [String]\n $keywordOrSet1: [String]\n $keywordOrSet2: [String]\n $keywordOrSet3: [String]\n $keywordNot: [String]\n $language: String\n $localOngoingAnd: [String]\n $location: [String]\n $page: Int\n $pageSize: Int\n $publisher: ID\n $sort: String\n $start: String\n $startsAfter: String\n $startsBefore: String\n $superEvent: ID\n $superEventType: [String]\n $text: String\n $translation: String\n ) {\n eventList(\n eventType: $eventType\n internetBased: $internetBased\n suitableFor: $suitableFor\n allOngoing: $allOngoing\n allOngoingAnd: $allOngoingAnd\n division: $division\n end: $end\n endsAfter: $endsAfter\n endsBefore: $endsBefore\n include: $include\n inLanguage: $inLanguage\n isFree: $isFree\n keyword: $keyword\n keywordAnd: $keywordAnd\n keywordOrSet1: $keywordOrSet1\n keywordOrSet2: $keywordOrSet2\n keywordOrSet3: $keywordOrSet3\n keywordNot: $keywordNot\n language: $language\n localOngoingAnd: $localOngoingAnd\n location: $location\n page: $page\n pageSize: $pageSize\n publisher: $publisher\n sort: $sort\n start: $start\n startsAfter: $startsAfter\n startsBefore: $startsBefore\n superEvent: $superEvent\n superEventType: $superEventType\n text: $text\n translation: $translation\n ) {\n meta {\n count\n next\n previous\n }\n data {\n ...eventCmsEventFields\n }\n }\n }\n ", "\n"])), EventCmsEventFieldsFragmentDoc);
|
|
2688
|
+
/**
|
|
2689
|
+
* __useEventListQuery__
|
|
2690
|
+
*
|
|
2691
|
+
* To run a query within a React component, call `useEventListQuery` and pass it any options that fit your needs.
|
|
2692
|
+
* When your component renders, `useEventListQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
2693
|
+
* you can use to render your UI.
|
|
2694
|
+
*
|
|
2695
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
2696
|
+
*
|
|
2697
|
+
* @example
|
|
2698
|
+
* const { data, loading, error } = useEventListQuery({
|
|
2699
|
+
* variables: {
|
|
2700
|
+
* eventType: // value for 'eventType'
|
|
2701
|
+
* internetBased: // value for 'internetBased'
|
|
2702
|
+
* suitableFor: // value for 'suitableFor'
|
|
2703
|
+
* allOngoing: // value for 'allOngoing'
|
|
2704
|
+
* allOngoingAnd: // value for 'allOngoingAnd'
|
|
2705
|
+
* division: // value for 'division'
|
|
2706
|
+
* end: // value for 'end'
|
|
2707
|
+
* endsAfter: // value for 'endsAfter'
|
|
2708
|
+
* endsBefore: // value for 'endsBefore'
|
|
2709
|
+
* inLanguage: // value for 'inLanguage'
|
|
2710
|
+
* include: // value for 'include'
|
|
2711
|
+
* isFree: // value for 'isFree'
|
|
2712
|
+
* keyword: // value for 'keyword'
|
|
2713
|
+
* keywordAnd: // value for 'keywordAnd'
|
|
2714
|
+
* keywordOrSet1: // value for 'keywordOrSet1'
|
|
2715
|
+
* keywordOrSet2: // value for 'keywordOrSet2'
|
|
2716
|
+
* keywordOrSet3: // value for 'keywordOrSet3'
|
|
2717
|
+
* keywordNot: // value for 'keywordNot'
|
|
2718
|
+
* language: // value for 'language'
|
|
2719
|
+
* localOngoingAnd: // value for 'localOngoingAnd'
|
|
2720
|
+
* location: // value for 'location'
|
|
2721
|
+
* page: // value for 'page'
|
|
2722
|
+
* pageSize: // value for 'pageSize'
|
|
2723
|
+
* publisher: // value for 'publisher'
|
|
2724
|
+
* sort: // value for 'sort'
|
|
2725
|
+
* start: // value for 'start'
|
|
2726
|
+
* startsAfter: // value for 'startsAfter'
|
|
2727
|
+
* startsBefore: // value for 'startsBefore'
|
|
2728
|
+
* superEvent: // value for 'superEvent'
|
|
2729
|
+
* superEventType: // value for 'superEventType'
|
|
2730
|
+
* text: // value for 'text'
|
|
2731
|
+
* translation: // value for 'translation'
|
|
2732
|
+
* },
|
|
2733
|
+
* });
|
|
2734
|
+
*/
|
|
2735
|
+
function useEventListQuery(baseOptions) {
|
|
2736
|
+
var options = _objectSpread2(_objectSpread2({}, defaultOptions$1), baseOptions);
|
|
2737
|
+
return Apollo.useQuery(EventListDocument, options);
|
|
2738
|
+
}
|
|
2739
|
+
var EventsByIdsDocument = gql(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n query EventsByIds(\n $ids: [ID!]!\n $eventType: [EventTypeId]\n $include: [String]\n $sort: String\n $pageSize: Int\n $page: Int\n $start: String\n $end: String\n ) {\n eventsByIds(\n ids: $ids\n eventType: $eventType\n include: $include\n sort: $sort\n pageSize: $pageSize\n page: $page\n start: $start\n end: $end\n ) {\n data {\n ...eventCmsEventFields\n }\n meta {\n count\n next\n previous\n }\n }\n }\n ", "\n"])), EventCmsEventFieldsFragmentDoc);
|
|
2740
|
+
/**
|
|
2741
|
+
* __useEventsByIdsQuery__
|
|
2742
|
+
*
|
|
2743
|
+
* To run a query within a React component, call `useEventsByIdsQuery` and pass it any options that fit your needs.
|
|
2744
|
+
* When your component renders, `useEventsByIdsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
2745
|
+
* you can use to render your UI.
|
|
2746
|
+
*
|
|
2747
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
2748
|
+
*
|
|
2749
|
+
* @example
|
|
2750
|
+
* const { data, loading, error } = useEventsByIdsQuery({
|
|
2751
|
+
* variables: {
|
|
2752
|
+
* ids: // value for 'ids'
|
|
2753
|
+
* eventType: // value for 'eventType'
|
|
2754
|
+
* include: // value for 'include'
|
|
2755
|
+
* sort: // value for 'sort'
|
|
2756
|
+
* pageSize: // value for 'pageSize'
|
|
2757
|
+
* page: // value for 'page'
|
|
2758
|
+
* start: // value for 'start'
|
|
2759
|
+
* end: // value for 'end'
|
|
2760
|
+
* },
|
|
2761
|
+
* });
|
|
2762
|
+
*/
|
|
2763
|
+
function useEventsByIdsQuery(baseOptions) {
|
|
2764
|
+
var options = _objectSpread2(_objectSpread2({}, defaultOptions$1), baseOptions);
|
|
2765
|
+
return Apollo.useQuery(EventsByIdsDocument, options);
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
function useQueryWithEventsApolloClientFromConfig() {
|
|
2769
|
+
var _useConfig = useConfig(),
|
|
2770
|
+
eventsApolloClient = _useConfig.eventsApolloClient;
|
|
2771
|
+
if (!eventsApolloClient) {
|
|
2772
|
+
throw Error('Error: useQueryWithEventsApolloClientFromConfig - When using components from the apollo sub module, you must include a compatible events (LinkedEvents) apollo client in the eventsApolloClient field of the config object you provide with ConfigProvider');
|
|
2773
|
+
}
|
|
2774
|
+
return eventsApolloClient;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
function useQueryWithVenuesApolloClientFromConfig() {
|
|
2778
|
+
var _useConfig = useConfig(),
|
|
2779
|
+
venuesApolloClient = _useConfig.venuesApolloClient;
|
|
2780
|
+
if (!venuesApolloClient) {
|
|
2781
|
+
throw Error('Error: useQueryWithVenuesApolloClientFromConfig - When using components from the apollo sub module, you must include a compatible Venues apollo client in the apolloClient field of the config object you provide with ConfigProvider');
|
|
2782
|
+
}
|
|
2783
|
+
return venuesApolloClient;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
var _templateObject, _templateObject2;
|
|
2787
|
+
var defaultOptions = {};
|
|
2788
|
+
var ResourceState;
|
|
2789
|
+
(function (ResourceState) {
|
|
2790
|
+
ResourceState["Closed"] = "closed";
|
|
2791
|
+
ResourceState["EnterOnly"] = "enter_only";
|
|
2792
|
+
ResourceState["ExitOnly"] = "exit_only";
|
|
2793
|
+
ResourceState["Open"] = "open";
|
|
2794
|
+
ResourceState["OpenAndReservable"] = "open_and_reservable";
|
|
2795
|
+
ResourceState["SelfService"] = "self_service";
|
|
2796
|
+
ResourceState["Undefined"] = "undefined";
|
|
2797
|
+
ResourceState["WeatherPermitting"] = "weather_permitting";
|
|
2798
|
+
ResourceState["WithKey"] = "with_key";
|
|
2799
|
+
ResourceState["WithKeyAndReservation"] = "with_key_and_reservation";
|
|
2800
|
+
ResourceState["WithReservation"] = "with_reservation";
|
|
2801
|
+
})(ResourceState || (ResourceState = {}));
|
|
2802
|
+
var Link__Purpose;
|
|
2803
|
+
(function (Link__Purpose) {
|
|
2804
|
+
/** `EXECUTION` features provide metadata necessary for operation execution. */
|
|
2805
|
+
Link__Purpose["Execution"] = "EXECUTION";
|
|
2806
|
+
/** `SECURITY` features provide metadata necessary to securely resolve fields. */
|
|
2807
|
+
Link__Purpose["Security"] = "SECURITY";
|
|
2808
|
+
})(Link__Purpose || (Link__Purpose = {}));
|
|
2809
|
+
var ListVenueFragmentDoc = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment listVenue on Venue {\n description\n id\n image\n name\n streetAddress\n addressLocality\n ontologyWords {\n id\n label\n }\n providerType\n displayedServiceOwnerType\n }\n"])));
|
|
2810
|
+
var VenuesByIdsDocument = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query VenuesByIds($ids: [ID!]!) {\n venuesByIds(ids: $ids) {\n ...listVenue\n }\n }\n ", "\n"])), ListVenueFragmentDoc);
|
|
2811
|
+
/**
|
|
2812
|
+
* __useVenuesByIdsQuery__
|
|
2813
|
+
*
|
|
2814
|
+
* To run a query within a React component, call `useVenuesByIdsQuery` and pass it any options that fit your needs.
|
|
2815
|
+
* When your component renders, `useVenuesByIdsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
2816
|
+
* you can use to render your UI.
|
|
2817
|
+
*
|
|
2818
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
2819
|
+
*
|
|
2820
|
+
* @example
|
|
2821
|
+
* const { data, loading, error } = useVenuesByIdsQuery({
|
|
2822
|
+
* variables: {
|
|
2823
|
+
* ids: // value for 'ids'
|
|
2824
|
+
* },
|
|
2825
|
+
* });
|
|
2826
|
+
*/
|
|
2827
|
+
function useVenuesByIdsQuery(baseOptions) {
|
|
2828
|
+
var options = _objectSpread2(_objectSpread2({}, defaultOptions), baseOptions);
|
|
2829
|
+
return Apollo.useQuery(VenuesByIdsDocument, options);
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
/** Cloned from the events-proxy https://github.com/City-of-Helsinki/events-helsinki-api-proxy/tree/master/src/utils */
|
|
2833
|
+
/**
|
|
2834
|
+
* Normalize snake case keys to a form that GraphlQL can use
|
|
2835
|
+
* Keys with @-prefix are replacing with internal-prefix
|
|
2836
|
+
* e.g
|
|
2837
|
+
* @event_type => internalEventType
|
|
2838
|
+
* event_end_date => eventEndDate
|
|
2839
|
+
*/
|
|
2840
|
+
var normalizeKey = (function (snakecase) {
|
|
2841
|
+
var str = snakecase.replace('@', 'internal_');
|
|
2842
|
+
return str[0].toLowerCase() + str.substr(1).toLowerCase().replace(/(_[a-z])/g, function ($1) {
|
|
2843
|
+
return $1.toUpperCase().replace('_', '');
|
|
2844
|
+
});
|
|
2845
|
+
});
|
|
2846
|
+
|
|
2847
|
+
/**
|
|
2848
|
+
* Normalizes an object or array of objects by converting keys from snake_case to camelCase.
|
|
2849
|
+
* This function handles nested objects and arrays recursively.
|
|
2850
|
+
*
|
|
2851
|
+
* Example:
|
|
2852
|
+
* Before:
|
|
2853
|
+
* {
|
|
2854
|
+
* @id: "123",
|
|
2855
|
+
* event_type: "foo",
|
|
2856
|
+
* event_price: {
|
|
2857
|
+
* is_free: false
|
|
2858
|
+
* }
|
|
2859
|
+
* }
|
|
2860
|
+
* After:
|
|
2861
|
+
* {
|
|
2862
|
+
* internalId: "123",
|
|
2863
|
+
* eventType: "foo",
|
|
2864
|
+
* eventPrice: {
|
|
2865
|
+
* isFree: false
|
|
2866
|
+
* }
|
|
2867
|
+
* }
|
|
2868
|
+
*
|
|
2869
|
+
* @template T - The type of the input value.
|
|
2870
|
+
* @param {T} value - The object, array, or primitive to normalize.
|
|
2871
|
+
* @returns {T} - A new object or array with normalized keys, or the original value if it's a primitive.
|
|
2872
|
+
*/
|
|
2873
|
+
function normalizeKeys(value) {
|
|
2874
|
+
// If the value is an array, map over it and recursively call normalizeKeys for each item.
|
|
2875
|
+
if (Array.isArray(value)) {
|
|
2876
|
+
return value.map(normalizeKeys);
|
|
2877
|
+
}
|
|
2878
|
+
// If the value is an object (and not null), recursively call normalizeKeys for its values.
|
|
2879
|
+
if (value && _typeof(value) === 'object' && value.constructor === Object) {
|
|
2880
|
+
// We use a type assertion here to build the new object.
|
|
2881
|
+
var obj = {};
|
|
2882
|
+
var keys = Object.keys(value);
|
|
2883
|
+
var len = keys.length;
|
|
2884
|
+
for (var i = 0; i < len; i += 1) {
|
|
2885
|
+
var currentKey = keys[i];
|
|
2886
|
+
var normalizedKey = normalizeKey(currentKey);
|
|
2887
|
+
// Recursively normalize the value associated with the current key
|
|
2888
|
+
obj[normalizedKey] = normalizeKeys(value[currentKey]);
|
|
2889
|
+
}
|
|
2890
|
+
return obj;
|
|
2891
|
+
}
|
|
2892
|
+
// If the value is a primitive (string, number, boolean, null, etc.), return it directly.
|
|
2893
|
+
return value;
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
var LINKEDEVENTS_DATE_NOW = 'now';
|
|
2897
|
+
|
|
2898
|
+
/**
|
|
2899
|
+
* @param {ids} ids - the venue ids in number format.
|
|
2900
|
+
* @return {Array} - Returns array of tprek formatted string ids.
|
|
2901
|
+
*/
|
|
2902
|
+
function getVenueIds(ids) {
|
|
2903
|
+
return ids.map(function (id) {
|
|
2904
|
+
return "tprek:".concat(id);
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
/**
|
|
2908
|
+
* @param {event} - event.
|
|
2909
|
+
* @return {boolean} - Returns true if events' end time in past.
|
|
2910
|
+
*/
|
|
2911
|
+
var isEventEndTimeInPast = function isEventEndTimeInPast(event) {
|
|
2912
|
+
return !!(event !== null && event !== void 0 && event.endTime) && isPast(new Date(event.endTime));
|
|
2913
|
+
};
|
|
2914
|
+
/**
|
|
2915
|
+
* @param {event} - event.
|
|
2916
|
+
* @return {boolean} - Returns true if events' end time in null and start time in past.
|
|
2917
|
+
*/
|
|
2918
|
+
var isEventEndTimeNullAndStartTimeInPast = function isEventEndTimeNullAndStartTimeInPast(event) {
|
|
2919
|
+
return !!(event !== null && event !== void 0 && event.startTime) && (event === null || event === void 0 ? void 0 : event.endTime) === null && isPast(new Date(event.startTime));
|
|
2920
|
+
};
|
|
2921
|
+
/**
|
|
2922
|
+
* @param {event} - event.
|
|
2923
|
+
* @return {boolean} - Returns true if event is closed.
|
|
2924
|
+
*/
|
|
2925
|
+
var isEventClosed = function isEventClosed(event) {
|
|
2926
|
+
return isEventEndTimeInPast(event) || isEventEndTimeNullAndStartTimeInPast(event);
|
|
2927
|
+
};
|
|
2928
|
+
/**
|
|
2929
|
+
* @param {params} - Get params.
|
|
2930
|
+
* @return {object} - Returns normalized values.
|
|
2931
|
+
*/
|
|
2932
|
+
var normalizeParamsValues = function normalizeParamsValues(params) {
|
|
2933
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2934
|
+
var normalizedParams = _objectSpread2({}, normalizeKeys(params));
|
|
2935
|
+
// Fix for course event type lower case
|
|
2936
|
+
if (normalizedParams.eventType) {
|
|
2937
|
+
normalizedParams.eventType = normalizedParams.eventType.charAt(0).toUpperCase() + normalizedParams.eventType.slice(1);
|
|
2938
|
+
}
|
|
2939
|
+
// Fix boolean types
|
|
2940
|
+
Object.keys(normalizedParams).forEach(function (param) {
|
|
2941
|
+
if (normalizedParams[param] === 'true') {
|
|
2942
|
+
normalizedParams[param] = true;
|
|
2943
|
+
} else if (normalizedParams[param] === 'false') {
|
|
2944
|
+
normalizedParams[param] = false;
|
|
2945
|
+
}
|
|
2946
|
+
});
|
|
2947
|
+
return normalizedParams;
|
|
2948
|
+
};
|
|
2949
|
+
/**
|
|
2950
|
+
* @param {dateString} - Get date string.
|
|
2951
|
+
* @return {boolean} - Returns true if the date is valid
|
|
2952
|
+
*/
|
|
2953
|
+
function isValidDate(dateString) {
|
|
2954
|
+
return !Number.isNaN(Date.parse(dateString));
|
|
2955
|
+
}
|
|
2956
|
+
/**
|
|
2957
|
+
* @param {start} start - Get start date.
|
|
2958
|
+
* @return {boolean} - Returns current date as string if the initial was in past.
|
|
2959
|
+
*/
|
|
2960
|
+
var convertDateStringInPastToNow = function convertDateStringInPastToNow(start) {
|
|
2961
|
+
var startDate = new Date(start);
|
|
2962
|
+
var now = new Date();
|
|
2963
|
+
if (isValidDate(start) && startDate <= now) {
|
|
2964
|
+
return LINKEDEVENTS_DATE_NOW;
|
|
2965
|
+
}
|
|
2966
|
+
return start;
|
|
2967
|
+
};
|
|
2968
|
+
|
|
2969
|
+
var _excluded$2 = ["children", "isLoading", "loadingText"];
|
|
2970
|
+
function LoadingButton(_ref) {
|
|
2971
|
+
var children = _ref.children,
|
|
2972
|
+
isLoading = _ref.isLoading,
|
|
2973
|
+
loadingText = _ref.loadingText,
|
|
2974
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
2975
|
+
var disabled = isLoading ? true : rest.disabled;
|
|
2976
|
+
var iconStart = isLoading ? /*#__PURE__*/React__default.createElement(LoadingSpinner, {
|
|
2977
|
+
small: true
|
|
2978
|
+
}) : null;
|
|
2979
|
+
var variant = isLoading ? ButtonVariant.Clear : ButtonVariant.Primary;
|
|
2980
|
+
return /*#__PURE__*/React__default.createElement(Button, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
2981
|
+
variant: variant,
|
|
2982
|
+
disabled: disabled || isLoading,
|
|
2983
|
+
iconStart: iconStart,
|
|
2984
|
+
style: {
|
|
2985
|
+
cursor: isLoading ? 'wait' : ''
|
|
2986
|
+
}
|
|
2987
|
+
}), isLoading ? String(loadingText) : String(children));
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
var _excluded$1 = ["cards"],
|
|
2991
|
+
_excluded2 = ["cards", "onLoadMore", "hasMore", "loading", "loadMoreButtonLabelText", "title"],
|
|
2992
|
+
_excluded3 = ["collection", "convertPastDatesToNow"],
|
|
2993
|
+
_excluded4 = ["collection"],
|
|
2994
|
+
_excluded5 = ["collection", "locale"],
|
|
2995
|
+
_excluded6 = ["collection"];
|
|
2996
|
+
function CollectionGrid(_ref) {
|
|
2997
|
+
var cards = _ref.cards,
|
|
2998
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
2999
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3000
|
+
className: styles$8.gridWrapper
|
|
3001
|
+
}, /*#__PURE__*/React__default.createElement(Grid, _objectSpread2({
|
|
3002
|
+
className: styles$8.grid
|
|
3003
|
+
}, rest), cards));
|
|
3004
|
+
}
|
|
3005
|
+
function CollectionCarousel(_ref2) {
|
|
3006
|
+
var cards = _ref2.cards,
|
|
3007
|
+
onLoadMore = _ref2.onLoadMore,
|
|
3008
|
+
hasMore = _ref2.hasMore,
|
|
3009
|
+
loading = _ref2.loading,
|
|
3010
|
+
loadMoreButtonLabelText = _ref2.loadMoreButtonLabelText,
|
|
3011
|
+
title = _ref2.title,
|
|
3012
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
3013
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3014
|
+
className: styles$8.carouselWrapper
|
|
3015
|
+
}, /*#__PURE__*/React__default.createElement(Carousel, _objectSpread2({
|
|
3016
|
+
title: title,
|
|
3017
|
+
className: styles$8.carousel,
|
|
3018
|
+
onLoadMore: onLoadMore,
|
|
3019
|
+
hasMore: hasMore,
|
|
3020
|
+
loading: loading,
|
|
3021
|
+
loadMoreButtonLabelText: loadMoreButtonLabelText,
|
|
3022
|
+
withDots: true,
|
|
3023
|
+
navigateWithDots: true
|
|
3024
|
+
}, rest), cards));
|
|
3025
|
+
}
|
|
3026
|
+
function Collection(_ref3) {
|
|
3027
|
+
var title = _ref3.title,
|
|
3028
|
+
description = _ref3.description,
|
|
3029
|
+
cards = _ref3.cards,
|
|
3030
|
+
className = _ref3.className,
|
|
3031
|
+
collectionContainerProps = _ref3.collectionContainerProps,
|
|
3032
|
+
_ref3$type = _ref3.type,
|
|
3033
|
+
type = _ref3$type === void 0 ? 'grid' : _ref3$type,
|
|
3034
|
+
_ref3$loading = _ref3.loading,
|
|
3035
|
+
loading = _ref3$loading === void 0 ? false : _ref3$loading,
|
|
3036
|
+
_ref3$hasNext = _ref3.hasNext,
|
|
3037
|
+
hasNext = _ref3$hasNext === void 0 ? false : _ref3$hasNext,
|
|
3038
|
+
onLoadMore = _ref3.onLoadMore,
|
|
3039
|
+
showAllUrl = _ref3.showAllUrl;
|
|
3040
|
+
var _useConfig = useConfig(),
|
|
3041
|
+
_useConfig$copy = _useConfig.copy,
|
|
3042
|
+
loadMoreButtonLabelText = _useConfig$copy.loadMoreButtonLabelText,
|
|
3043
|
+
showAllText = _useConfig$copy.showAllText;
|
|
3044
|
+
var componentForType = {
|
|
3045
|
+
carousel: (/*#__PURE__*/React__default.createElement(CollectionCarousel, _objectSpread2({
|
|
3046
|
+
cards: cards,
|
|
3047
|
+
onLoadMore: onLoadMore,
|
|
3048
|
+
hasMore: hasNext,
|
|
3049
|
+
loading: loading,
|
|
3050
|
+
loadMoreButtonLabelText: loadMoreButtonLabelText,
|
|
3051
|
+
title: title
|
|
3052
|
+
}, collectionContainerProps))),
|
|
3053
|
+
// todo: initial grid items amout (3) take from config or headless cms when implemented
|
|
3054
|
+
grid: (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(CollectionGrid, _objectSpread2({
|
|
3055
|
+
cards: cards
|
|
3056
|
+
}, collectionContainerProps)), hasNext && (/*#__PURE__*/React__default.createElement(LoadingButton, {
|
|
3057
|
+
className: styles$8.loadMoreButton,
|
|
3058
|
+
onClick: onLoadMore,
|
|
3059
|
+
isLoading: loading
|
|
3060
|
+
}, loadMoreButtonLabelText))))
|
|
3061
|
+
};
|
|
3062
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3063
|
+
className: classNames(styles$8[type], className)
|
|
3064
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3065
|
+
className: styles$8.collection
|
|
3066
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3067
|
+
className: classNames(styles$8.headerRow, showAllUrl ? styles$8.withShowAll : '')
|
|
3068
|
+
}, title && (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h2", {
|
|
3069
|
+
className: classNames(styles$8.heading, type === 'carousel' && styles$8.carousel)
|
|
3070
|
+
}, title), showAllUrl && showAllText && (/*#__PURE__*/React__default.createElement(Link, {
|
|
3071
|
+
className: styles$8.showAll,
|
|
3072
|
+
href: showAllUrl
|
|
3073
|
+
}, showAllText))))), description && /*#__PURE__*/React__default.createElement("p", {
|
|
3074
|
+
className: styles$8.description
|
|
3075
|
+
}, description), componentForType[type]));
|
|
3076
|
+
}
|
|
3077
|
+
function getEventCollectionCards(_ref4) {
|
|
3078
|
+
var items = _ref4.items,
|
|
3079
|
+
getRoutedInternalHref = _ref4.getRoutedInternalHref,
|
|
3080
|
+
getEventCardProps = _ref4.getEventCardProps,
|
|
3081
|
+
EventCardContent = _ref4.EventCardContent,
|
|
3082
|
+
HelsinkiCityOwnedIcon = _ref4.HelsinkiCityOwnedIcon,
|
|
3083
|
+
organisationPrefixes = _ref4.organisationPrefixes,
|
|
3084
|
+
_ref4$locale = _ref4.locale,
|
|
3085
|
+
locale = _ref4$locale === void 0 ? DEFAULT_LOCALE : _ref4$locale;
|
|
3086
|
+
var cards = items.map(function (item) {
|
|
3087
|
+
return getEventCardProps(item, organisationPrefixes, locale);
|
|
3088
|
+
}).map(function (cardProps, i) {
|
|
3089
|
+
var url = getRoutedInternalHref(cardProps.url, undefined);
|
|
3090
|
+
return /*#__PURE__*/React__default.createElement(Card, _objectSpread2(_objectSpread2({
|
|
3091
|
+
key: cardProps.id
|
|
3092
|
+
}, cardProps), {}, {
|
|
3093
|
+
url: url,
|
|
3094
|
+
direction: "fixed-vertical",
|
|
3095
|
+
customContent: EventCardContent && /*#__PURE__*/React__default.createElement(EventCardContent, {
|
|
3096
|
+
event: items[i]
|
|
3097
|
+
}),
|
|
3098
|
+
titleIcon: cardProps.withTitleIcon && HelsinkiCityOwnedIcon && /*#__PURE__*/React__default.createElement(HelsinkiCityOwnedIcon, null)
|
|
3099
|
+
}));
|
|
3100
|
+
});
|
|
3101
|
+
return cards;
|
|
3102
|
+
}
|
|
3103
|
+
/**
|
|
3104
|
+
* EventSearchCollection uses an (LinkedEvents) URL to make a API query to fetch the related events.
|
|
3105
|
+
*
|
|
3106
|
+
* Use `convertPastDatesToNow = true` to fix an issue (between the CMS and the LinkedEvents) when old ended events are shown.
|
|
3107
|
+
*/
|
|
3108
|
+
function EventSearchCollection(_ref5) {
|
|
3109
|
+
var _url$split$, _eventsList$data;
|
|
3110
|
+
var collection = _ref5.collection,
|
|
3111
|
+
_ref5$convertPastDate = _ref5.convertPastDatesToNow,
|
|
3112
|
+
convertPastDatesToNow = _ref5$convertPastDate === void 0 ? true : _ref5$convertPastDate,
|
|
3113
|
+
delegatedProps = _objectWithoutProperties(_ref5, _excluded3);
|
|
3114
|
+
var eventsApolloClient = useQueryWithEventsApolloClientFromConfig();
|
|
3115
|
+
var _useConfig2 = useConfig(),
|
|
3116
|
+
currentLanguageCode = _useConfig2.currentLanguageCode,
|
|
3117
|
+
organisationPrefixes = _useConfig2.organisationPrefixes,
|
|
3118
|
+
_useConfig2$utils = _useConfig2.utils,
|
|
3119
|
+
_getRoutedInternalHref = _useConfig2$utils.getRoutedInternalHref,
|
|
3120
|
+
getEventCardProps = _useConfig2$utils.getEventCardProps,
|
|
3121
|
+
_useConfig2$component = _useConfig2.components,
|
|
3122
|
+
EventCardContent = _useConfig2$component.EventCardContent,
|
|
3123
|
+
HelsinkiCityOwnedIcon = _useConfig2$component.HelsinkiCityOwnedIcon;
|
|
3124
|
+
var url = collection.url;
|
|
3125
|
+
// TODO: use initAmountOfEvents -field when it's null-issue is fixed
|
|
3126
|
+
// initAmountOfEvents only in case if load more is implemented (this feature is skipped now)
|
|
3127
|
+
var pageSize = 9; // collection.initAmountOfEvents
|
|
3128
|
+
var searchParams = new URLSearchParams((_url$split$ = url.split('?')[1]) !== null && _url$split$ !== void 0 ? _url$split$ : url.split('?')[0]);
|
|
3129
|
+
var params = Object.fromEntries(searchParams.entries());
|
|
3130
|
+
var normalizedParams = normalizeParamsValues(params);
|
|
3131
|
+
var start = convertPastDatesToNow ? convertDateStringInPastToNow(normalizedParams.start) : normalizedParams.start;
|
|
3132
|
+
var variables = _objectSpread2(_objectSpread2({}, normalizedParams), {}, {
|
|
3133
|
+
start: start,
|
|
3134
|
+
pageSize: pageSize,
|
|
3135
|
+
include: ['in_language', 'keywords', 'location', 'audience']
|
|
3136
|
+
});
|
|
3137
|
+
var _useEventListQuery = useEventListQuery({
|
|
3138
|
+
client: eventsApolloClient !== 'disabled' ? eventsApolloClient : undefined,
|
|
3139
|
+
ssr: false,
|
|
3140
|
+
notifyOnNetworkStatusChange: true,
|
|
3141
|
+
variables: variables
|
|
3142
|
+
}),
|
|
3143
|
+
data = _useEventListQuery.data,
|
|
3144
|
+
loading = _useEventListQuery.loading;
|
|
3145
|
+
var eventsList = data === null || data === void 0 ? void 0 : data.eventList;
|
|
3146
|
+
if (!data && loading) {
|
|
3147
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3148
|
+
className: styles$8.loadingSpinnerWrapper
|
|
3149
|
+
}, /*#__PURE__*/React__default.createElement(LoadingSpinner, {
|
|
3150
|
+
multicolor: true
|
|
3151
|
+
}));
|
|
3152
|
+
}
|
|
3153
|
+
var cards = getEventCollectionCards({
|
|
3154
|
+
items: (_eventsList$data = eventsList === null || eventsList === void 0 ? void 0 : eventsList.data) !== null && _eventsList$data !== void 0 ? _eventsList$data : [],
|
|
3155
|
+
getRoutedInternalHref: function getRoutedInternalHref(link, type) {
|
|
3156
|
+
return _getRoutedInternalHref(link, type !== null && type !== void 0 ? type : ModuleItemTypeEnum.Event);
|
|
3157
|
+
},
|
|
3158
|
+
getEventCardProps: getEventCardProps,
|
|
3159
|
+
EventCardContent: EventCardContent,
|
|
3160
|
+
HelsinkiCityOwnedIcon: HelsinkiCityOwnedIcon,
|
|
3161
|
+
organisationPrefixes: organisationPrefixes,
|
|
3162
|
+
locale: currentLanguageCode
|
|
3163
|
+
});
|
|
3164
|
+
return /*#__PURE__*/React__default.createElement(Collection, _objectSpread2(_objectSpread2({}, delegatedProps), {}, {
|
|
3165
|
+
cards: cards
|
|
3166
|
+
}));
|
|
3167
|
+
}
|
|
3168
|
+
function EventSelectionCollection(_ref6) {
|
|
3169
|
+
var _data$eventsByIds$dat;
|
|
3170
|
+
var collection = _ref6.collection,
|
|
3171
|
+
delegatedProps = _objectWithoutProperties(_ref6, _excluded4);
|
|
3172
|
+
var eventsApolloClient = useQueryWithEventsApolloClientFromConfig();
|
|
3173
|
+
var _useConfig3 = useConfig(),
|
|
3174
|
+
currentLanguageCode = _useConfig3.currentLanguageCode,
|
|
3175
|
+
organisationPrefixes = _useConfig3.organisationPrefixes,
|
|
3176
|
+
_useConfig3$utils = _useConfig3.utils,
|
|
3177
|
+
_getRoutedInternalHref2 = _useConfig3$utils.getRoutedInternalHref,
|
|
3178
|
+
getEventCardProps = _useConfig3$utils.getEventCardProps,
|
|
3179
|
+
_useConfig3$component = _useConfig3.components,
|
|
3180
|
+
EventCardContent = _useConfig3$component.EventCardContent,
|
|
3181
|
+
HelsinkiCityOwnedIcon = _useConfig3$component.HelsinkiCityOwnedIcon;
|
|
3182
|
+
// TODO: use initAmountOfEvents -field when it's null-issue is fixed
|
|
3183
|
+
var pageSize = collection.events.length; // collection.initAmountOfEvents
|
|
3184
|
+
var _useEventsByIdsQuery = useEventsByIdsQuery({
|
|
3185
|
+
client: eventsApolloClient !== 'disabled' ? eventsApolloClient : undefined,
|
|
3186
|
+
ssr: false,
|
|
3187
|
+
notifyOnNetworkStatusChange: true,
|
|
3188
|
+
skip: collection.events.length === 0,
|
|
3189
|
+
variables: {
|
|
3190
|
+
ids: collection.events,
|
|
3191
|
+
pageSize: pageSize,
|
|
3192
|
+
include: ['in_language', 'keywords', 'location', 'audience'],
|
|
3193
|
+
eventType: [EventTypeId.General, EventTypeId.Course]
|
|
3194
|
+
}
|
|
3195
|
+
}),
|
|
3196
|
+
data = _useEventsByIdsQuery.data,
|
|
3197
|
+
loading = _useEventsByIdsQuery.loading;
|
|
3198
|
+
// Reduce past events that are no longer available and therefore do not need to be displayed
|
|
3199
|
+
var eventsListFiltered = (_data$eventsByIds$dat = data === null || data === void 0 ? void 0 : data.eventsByIds.data.filter(function (event) {
|
|
3200
|
+
return !isEventClosed(event);
|
|
3201
|
+
})) !== null && _data$eventsByIds$dat !== void 0 ? _data$eventsByIds$dat : [];
|
|
3202
|
+
var eventsListSorted = [];
|
|
3203
|
+
// sorting events in the same order it was defined in cms
|
|
3204
|
+
if ((eventsListFiltered === null || eventsListFiltered === void 0 ? void 0 : eventsListFiltered.length) > 0) {
|
|
3205
|
+
collection.events.forEach(function (eventId) {
|
|
3206
|
+
var event = eventsListFiltered.find(function (eventData) {
|
|
3207
|
+
return eventData.id === eventId;
|
|
3208
|
+
});
|
|
3209
|
+
if (event) {
|
|
3210
|
+
eventsListSorted.push(event);
|
|
3211
|
+
}
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
if (!data && loading) {
|
|
3215
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3216
|
+
className: styles$8.loadingSpinnerWrapper
|
|
3217
|
+
}, /*#__PURE__*/React__default.createElement(LoadingSpinner, {
|
|
3218
|
+
multicolor: true
|
|
3219
|
+
}));
|
|
3220
|
+
}
|
|
3221
|
+
var cards = getEventCollectionCards({
|
|
3222
|
+
items: eventsListSorted,
|
|
3223
|
+
getRoutedInternalHref: function getRoutedInternalHref(link, type) {
|
|
3224
|
+
return _getRoutedInternalHref2(link, type !== null && type !== void 0 ? type : ModuleItemTypeEnum.Event);
|
|
3225
|
+
},
|
|
3226
|
+
getEventCardProps: getEventCardProps,
|
|
3227
|
+
EventCardContent: EventCardContent,
|
|
3228
|
+
HelsinkiCityOwnedIcon: HelsinkiCityOwnedIcon,
|
|
3229
|
+
organisationPrefixes: organisationPrefixes,
|
|
3230
|
+
locale: currentLanguageCode
|
|
3231
|
+
});
|
|
3232
|
+
return /*#__PURE__*/React__default.createElement(Collection, _objectSpread2(_objectSpread2({}, delegatedProps), {}, {
|
|
3233
|
+
cards: cards
|
|
3234
|
+
}));
|
|
3235
|
+
}
|
|
3236
|
+
function getLocationsCollectionCards(_ref7) {
|
|
3237
|
+
var items = _ref7.items,
|
|
3238
|
+
getRoutedInternalHref = _ref7.getRoutedInternalHref,
|
|
3239
|
+
getLocationCardProps = _ref7.getLocationCardProps,
|
|
3240
|
+
VenueCardContent = _ref7.VenueCardContent,
|
|
3241
|
+
HelsinkiCityOwnedIcon = _ref7.HelsinkiCityOwnedIcon;
|
|
3242
|
+
var cards = items.map(function (item) {
|
|
3243
|
+
return getLocationCardProps(item);
|
|
3244
|
+
}).map(function (cardProps, i) {
|
|
3245
|
+
var url = getRoutedInternalHref(cardProps.url, ModuleItemTypeEnum.Venue);
|
|
3246
|
+
return /*#__PURE__*/React__default.createElement(Card, _objectSpread2(_objectSpread2({
|
|
3247
|
+
key: cardProps.id
|
|
3248
|
+
}, cardProps), {}, {
|
|
3249
|
+
url: url,
|
|
3250
|
+
titleIcon: cardProps.withTitleIcon && HelsinkiCityOwnedIcon && /*#__PURE__*/React__default.createElement(HelsinkiCityOwnedIcon, null),
|
|
3251
|
+
direction: "fixed-vertical",
|
|
3252
|
+
customContent: VenueCardContent && /*#__PURE__*/React__default.createElement(VenueCardContent, {
|
|
3253
|
+
location: items[i]
|
|
3254
|
+
})
|
|
3255
|
+
}));
|
|
3256
|
+
});
|
|
3257
|
+
return cards;
|
|
3258
|
+
}
|
|
3259
|
+
function LocationsSelectionCollection(_ref8) {
|
|
3260
|
+
var collection = _ref8.collection,
|
|
3261
|
+
locale = _ref8.locale,
|
|
3262
|
+
delegatedProps = _objectWithoutProperties(_ref8, _excluded5);
|
|
3263
|
+
var venuesApolloClient = useQueryWithVenuesApolloClientFromConfig();
|
|
3264
|
+
var _useConfig4 = useConfig(),
|
|
3265
|
+
_useConfig4$utils = _useConfig4.utils,
|
|
3266
|
+
_getRoutedInternalHref3 = _useConfig4$utils.getRoutedInternalHref,
|
|
3267
|
+
getLocationCardProps = _useConfig4$utils.getLocationCardProps,
|
|
3268
|
+
_useConfig4$component = _useConfig4.components,
|
|
3269
|
+
VenueCardContent = _useConfig4$component.VenueCardContent,
|
|
3270
|
+
HelsinkiCityOwnedIcon = _useConfig4$component.HelsinkiCityOwnedIcon;
|
|
3271
|
+
var _useVenuesByIdsQuery = useVenuesByIdsQuery({
|
|
3272
|
+
client: venuesApolloClient !== 'disabled' ? venuesApolloClient : undefined,
|
|
3273
|
+
ssr: false,
|
|
3274
|
+
notifyOnNetworkStatusChange: true,
|
|
3275
|
+
variables: {
|
|
3276
|
+
ids: getVenueIds(collection.venues)
|
|
3277
|
+
},
|
|
3278
|
+
context: {
|
|
3279
|
+
headers: {
|
|
3280
|
+
'Accept-Language': locale
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
}),
|
|
3284
|
+
data = _useVenuesByIdsQuery.data,
|
|
3285
|
+
loading = _useVenuesByIdsQuery.loading;
|
|
3286
|
+
var venuesList = data === null || data === void 0 ? void 0 : data.venuesByIds;
|
|
3287
|
+
if (!data && loading) {
|
|
3288
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3289
|
+
className: styles$8.loadingSpinnerWrapper
|
|
3290
|
+
}, /*#__PURE__*/React__default.createElement(LoadingSpinner, {
|
|
3291
|
+
multicolor: true
|
|
3292
|
+
}));
|
|
3293
|
+
}
|
|
3294
|
+
var cards = getLocationsCollectionCards({
|
|
3295
|
+
items: venuesList !== null && venuesList !== void 0 ? venuesList : [],
|
|
3296
|
+
getRoutedInternalHref: function getRoutedInternalHref(link) {
|
|
3297
|
+
return _getRoutedInternalHref3(link, ModuleItemTypeEnum.Venue);
|
|
3298
|
+
},
|
|
3299
|
+
getLocationCardProps: getLocationCardProps,
|
|
3300
|
+
VenueCardContent: VenueCardContent,
|
|
3301
|
+
HelsinkiCityOwnedIcon: HelsinkiCityOwnedIcon
|
|
3302
|
+
});
|
|
3303
|
+
return /*#__PURE__*/React__default.createElement(Collection, _objectSpread2(_objectSpread2({}, delegatedProps), {}, {
|
|
3304
|
+
cards: cards
|
|
3305
|
+
}));
|
|
3306
|
+
}
|
|
3307
|
+
function PageArticleCollection(_ref9) {
|
|
3308
|
+
var collection = _ref9.collection,
|
|
3309
|
+
delegatedProps = _objectWithoutProperties(_ref9, _excluded6);
|
|
3310
|
+
var _useConfig5 = useConfig(),
|
|
3311
|
+
_useConfig5$utils = _useConfig5.utils,
|
|
3312
|
+
getRoutedInternalHref = _useConfig5$utils.getRoutedInternalHref,
|
|
3313
|
+
getArticlePageCardProps = _useConfig5$utils.getArticlePageCardProps;
|
|
3314
|
+
var cards = collection.items.reduce(function (result, item) {
|
|
3315
|
+
if (isPageType(item) || isArticleType(item)) result.push(getArticlePageCardProps(item));
|
|
3316
|
+
return result;
|
|
3317
|
+
}, []).map(function (cardProps) {
|
|
3318
|
+
var url = getRoutedInternalHref(cardProps.url, undefined);
|
|
3319
|
+
return /*#__PURE__*/React__default.createElement(Card, _objectSpread2(_objectSpread2({
|
|
3320
|
+
key: cardProps.id
|
|
3321
|
+
}, cardProps), {}, {
|
|
3322
|
+
url: url,
|
|
3323
|
+
direction: "fixed-vertical"
|
|
3324
|
+
}));
|
|
3325
|
+
});
|
|
3326
|
+
return /*#__PURE__*/React__default.createElement(Collection, _objectSpread2(_objectSpread2({}, delegatedProps), {}, {
|
|
3327
|
+
showAllUrl: collection.showAllUrl,
|
|
3328
|
+
cards: cards
|
|
3329
|
+
}));
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
function ContentModule(_ref) {
|
|
3333
|
+
var content = _ref.content,
|
|
3334
|
+
backgroundColor = _ref.backgroundColor,
|
|
3335
|
+
className = _ref.className;
|
|
3336
|
+
var _useConfig = useConfig(),
|
|
3337
|
+
_useConfig$htmlSaniti = _useConfig.htmlSanitizer,
|
|
3338
|
+
allowedUnsafeTags = _useConfig$htmlSaniti.allowedUnsafeTags,
|
|
3339
|
+
trustedOrigins = _useConfig$htmlSaniti.trustedOrigins;
|
|
3340
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3341
|
+
className: classNames(styles$h.pageModuleWrapper, styles$h.contentModuleWrapper, backgroundColor && colorStyles["background".concat(getColor(backgroundColor))], backgroundColor && isWhiteText(backgroundColor) && colorStyles.whiteText, backgroundColor ? styles$h.withPadding : '')
|
|
3342
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3343
|
+
className: classNames(className)
|
|
3344
|
+
}, /*#__PURE__*/React__default.createElement(HtmlToReact, {
|
|
3345
|
+
components: {
|
|
3346
|
+
a: Link
|
|
3347
|
+
},
|
|
3348
|
+
allowedUnsafeTags: allowedUnsafeTags,
|
|
3349
|
+
trustedOrigins: trustedOrigins
|
|
3350
|
+
}, content || '')));
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
// todo: implement module
|
|
3354
|
+
function CardModule(props) {
|
|
3355
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3356
|
+
className: styles$h.pageModuleWrapper
|
|
3357
|
+
}, /*#__PURE__*/React__default.createElement(Card, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
3358
|
+
direction: "responsive-reverse",
|
|
3359
|
+
imageLabel: "",
|
|
3360
|
+
withBorder: true,
|
|
3361
|
+
hasLink: false,
|
|
3362
|
+
clampText: false
|
|
3363
|
+
})));
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
var MAX_KEY_LENGTH = 200;
|
|
3367
|
+
function createHashKey(source) {
|
|
3368
|
+
var data = typeof source === 'string' ? source : JSON.stringify(source);
|
|
3369
|
+
return btoa(unescape(encodeURIComponent(data))).substring(0, MAX_KEY_LENGTH);
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
// todo: implement module
|
|
3373
|
+
function CardsModule(_ref) {
|
|
3374
|
+
var items = _ref.items;
|
|
3375
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3376
|
+
className: classNames(styles$h.pageModuleWrapper, styles$h.cardsWrapper, items.length < 4 && styles$h.flexWrapper, items.length === 1 && styles$h.singleGridWrapper)
|
|
3377
|
+
}, items === null || items === void 0 ? void 0 : items.map(function (card, index) {
|
|
3378
|
+
var _card$link, _card$link2, _card$link3;
|
|
3379
|
+
// The card module does not contain any proeprty that could be used as an unique id, so one needs to be created
|
|
3380
|
+
var uniqueKey = createHashKey("".concat(index, "-").concat(card.title, "-").concat(card.description));
|
|
3381
|
+
return /*#__PURE__*/React__default.createElement(SimpleCard, {
|
|
3382
|
+
key: uniqueKey,
|
|
3383
|
+
title: card.title,
|
|
3384
|
+
description: card.description,
|
|
3385
|
+
linkTarget: (_card$link = card.link) === null || _card$link === void 0 ? void 0 : _card$link.target,
|
|
3386
|
+
linkTitle: (_card$link2 = card.link) === null || _card$link2 === void 0 ? void 0 : _card$link2.title,
|
|
3387
|
+
linkUrl: (_card$link3 = card.link) === null || _card$link3 === void 0 ? void 0 : _card$link3.url,
|
|
3388
|
+
backgroundColor: card.backgroundColor,
|
|
3389
|
+
direction: items.length === 1 ? 'horisontal' : 'vertical',
|
|
3390
|
+
icon: card.icon
|
|
3391
|
+
});
|
|
3392
|
+
}));
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
var ImageGalleryContext = /*#__PURE__*/createContext({
|
|
3396
|
+
imageIndex: 0,
|
|
3397
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3398
|
+
setImageIndex: function setImageIndex() {},
|
|
3399
|
+
selectedImageIndex: -1,
|
|
3400
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3401
|
+
setSelectedImageIndex: function setSelectedImageIndex() {},
|
|
3402
|
+
isLightboxVisible: false,
|
|
3403
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3404
|
+
setIsLightboxVisible: function setIsLightboxVisible() {},
|
|
3405
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3406
|
+
toggleLightbox: function toggleLightbox() {}
|
|
3407
|
+
});
|
|
3408
|
+
|
|
3409
|
+
function ImageGalleryProvider(_ref) {
|
|
3410
|
+
var children = _ref.children;
|
|
3411
|
+
var _useState = useState(0),
|
|
3412
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3413
|
+
imageIndex = _useState2[0],
|
|
3414
|
+
setImageIndex = _useState2[1];
|
|
3415
|
+
var _useState3 = useState(-1),
|
|
3416
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
3417
|
+
selectedImageIndex = _useState4[0],
|
|
3418
|
+
setSelectedImageIndex = _useState4[1];
|
|
3419
|
+
var _useState5 = useState(false),
|
|
3420
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3421
|
+
isLightboxVisible = _useState6[0],
|
|
3422
|
+
setIsLightboxVisible = _useState6[1];
|
|
3423
|
+
var toggleLightbox = useCallback(function () {
|
|
3424
|
+
setIsLightboxVisible(function (prev) {
|
|
3425
|
+
return !prev;
|
|
3426
|
+
});
|
|
3427
|
+
}, [setIsLightboxVisible]);
|
|
3428
|
+
var config = React__default.useMemo(function () {
|
|
3429
|
+
return {
|
|
3430
|
+
imageIndex: imageIndex,
|
|
3431
|
+
setImageIndex: setImageIndex,
|
|
3432
|
+
selectedImageIndex: selectedImageIndex,
|
|
3433
|
+
setSelectedImageIndex: setSelectedImageIndex,
|
|
3434
|
+
isLightboxVisible: isLightboxVisible,
|
|
3435
|
+
setIsLightboxVisible: setIsLightboxVisible,
|
|
3436
|
+
toggleLightbox: toggleLightbox
|
|
3437
|
+
};
|
|
3438
|
+
}, [imageIndex, isLightboxVisible, selectedImageIndex, toggleLightbox]);
|
|
3439
|
+
return /*#__PURE__*/React__default.createElement(ImageGalleryContext.Provider, {
|
|
3440
|
+
value: config
|
|
3441
|
+
}, children);
|
|
3442
|
+
}
|
|
3443
|
+
|
|
3444
|
+
function useImageGalleryContext() {
|
|
3445
|
+
var context = React__default.useContext(ImageGalleryContext);
|
|
3446
|
+
if (!context) {
|
|
3447
|
+
throw new Error("Image gallery components cannot be used outside the ImageGalleryProvider");
|
|
3448
|
+
}
|
|
3449
|
+
return context;
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
var css_248z$4 = ".imageGallery-module_imageCardWrapper__dTEII{margin:0!important;overflow:hidden;position:relative;width:100%}.imageGallery-module_imageCardWrapper__dTEII .imageGallery-module_imageWrapper__Gdx5g{aspect-ratio:3/2;background-position:50%;background-repeat:no-repeat;background-size:cover;border:2px solid transparent;box-sizing:border-box;width:100%}.imageGallery-module_imageCardWrapper__dTEII .imageGallery-module_imageWrapper__Gdx5g.imageGallery-module_withLightbox__6jLvc:focus{border:2px solid var(--color-black);outline:2px solid var(--color-black)}.imageGallery-module_imageCardWrapper__dTEII .imageGallery-module_imageWrapper__Gdx5g.imageGallery-module_withBorder__uUw5x{border:2px solid var(--color-black-90)}.imageGallery-module_photographer__fwPdR{margin:var(--spacing-xs) 0;word-break:break-all}.imageGallery-module_photographer__fwPdR.imageGallery-module_withMargin__WBGSQ{margin:var(--spacing-xs)}.imageGallery-module_link__n91FJ{display:inline-block;height:100%;left:0;position:absolute;top:0;width:100%}.imageGallery-module_lightbox__T4cmg{align-items:center;background-color:rgba(0,0,0,.6);display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:10}.imageGallery-module_lightbox__T4cmg .imageGallery-module_lightboxContent__5Yag-{align-items:center;display:flex;height:100%;justify-content:center;margin:var(--spacing-m);max-height:90%;max-width:100%;position:absolute}.imageGallery-module_lightbox__T4cmg .imageGallery-module_lightboxContent__5Yag- .imageGallery-module_inner__OPlsi{background:#fff;display:flex;flex-direction:column;max-height:100%;position:relative;width:100%}.imageGallery-module_lightbox__T4cmg .imageGallery-module_lightboxContent__5Yag- .imageGallery-module_inner__OPlsi img{width:100%}.imageGallery-module_closeButton__D5W0J{background:0 0;border:none;color:var(--color-white);cursor:pointer;padding:0;position:absolute;right:0;top:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}.imageGallery-module_closeButton__D5W0J svg{fill:none;background-color:var(--color-white);display:block;mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M18 7.5 13.5 12l4.5 4.5-1.5 1.5-4.5-4.5L7.5 18 6 16.5l4.5-4.5L6 7.5 7.5 6l4.5 4.5L16.5 6z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-transition:.3s;transition:.3s;width:1.5em}.imageGallery-module_actionsWrapper__IBaAP{display:flex;gap:8px;justify-content:space-between;padding:var(--spacing-xs)}.imageGallery-module_actionsWrapper__IBaAP button:focus{outline-color:var(--color-black)}.imageGallery-module_actionsWrapper__IBaAP button>div,.imageGallery-module_actionsWrapper__IBaAP button>span{margin:0!important;padding:0!important}.imageGallery-module_imageItemWrapper__Ug-Ma{display:flex;flex:1;flex-direction:column;overflow:hidden}.imageGallery-module_imageItemWrapper__Ug-Ma.imageGallery-module_withLightbox__6jLvc{cursor:pointer}";
|
|
3453
|
+
var styles$4 = {"imageCardWrapper":"imageGallery-module_imageCardWrapper__dTEII","imageWrapper":"imageGallery-module_imageWrapper__Gdx5g","withLightbox":"imageGallery-module_withLightbox__6jLvc","withBorder":"imageGallery-module_withBorder__uUw5x","photographer":"imageGallery-module_photographer__fwPdR","withMargin":"imageGallery-module_withMargin__WBGSQ","lightbox":"imageGallery-module_lightbox__T4cmg","lightboxContent":"imageGallery-module_lightboxContent__5Yag-","inner":"imageGallery-module_inner__OPlsi","closeButton":"imageGallery-module_closeButton__D5W0J","actionsWrapper":"imageGallery-module_actionsWrapper__IBaAP","imageItemWrapper":"imageGallery-module_imageItemWrapper__Ug-Ma"};
|
|
3454
|
+
styleInject(css_248z$4);
|
|
3455
|
+
|
|
3456
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3457
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3458
|
+
function ImageItem(_ref) {
|
|
3459
|
+
var image = _ref.image,
|
|
3460
|
+
imageId = _ref.imageId,
|
|
3461
|
+
lightboxUid = _ref.lightboxUid,
|
|
3462
|
+
withLightbox = _ref.withLightbox,
|
|
3463
|
+
withBorder = _ref.withBorder;
|
|
3464
|
+
var _useImageGalleryConte = useImageGalleryContext(),
|
|
3465
|
+
isLightboxVisible = _useImageGalleryConte.isLightboxVisible,
|
|
3466
|
+
setIsLightboxVisible = _useImageGalleryConte.setIsLightboxVisible,
|
|
3467
|
+
setImageIndex = _useImageGalleryConte.setImageIndex,
|
|
3468
|
+
setSelectedImageIndex = _useImageGalleryConte.setSelectedImageIndex,
|
|
3469
|
+
toggleLightbox = _useImageGalleryConte.toggleLightbox;
|
|
3470
|
+
var handleImageCardClick = function handleImageCardClick(e) {
|
|
3471
|
+
e.preventDefault();
|
|
3472
|
+
if (withLightbox) {
|
|
3473
|
+
toggleLightbox();
|
|
3474
|
+
}
|
|
3475
|
+
};
|
|
3476
|
+
var handleEnterKeyPress = function handleEnterKeyPress(event) {
|
|
3477
|
+
if (withLightbox && event.key === 'Enter') {
|
|
3478
|
+
setIsLightboxVisible(true);
|
|
3479
|
+
}
|
|
3480
|
+
};
|
|
3481
|
+
var handleImageCardFocus = function handleImageCardFocus(index) {
|
|
3482
|
+
setImageIndex(index);
|
|
3483
|
+
// selected card index before opening the lightbox
|
|
3484
|
+
setSelectedImageIndex(index);
|
|
3485
|
+
};
|
|
3486
|
+
var imageTitle = image.title || image.photographer;
|
|
3487
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3488
|
+
className: classNames(styles$4.imageItemWrapper, withLightbox ? styles$4.withLightbox : ''),
|
|
3489
|
+
onClick: handleImageCardClick
|
|
3490
|
+
}, /*#__PURE__*/React__default.createElement("figure", {
|
|
3491
|
+
className: classNames(styles$4.imageCardWrapper, withLightbox ? styles$4.withLightbox : ''),
|
|
3492
|
+
"aria-label": imageTitle
|
|
3493
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3494
|
+
tabIndex: withLightbox && !isLightboxVisible ? 0 : -1,
|
|
3495
|
+
id: "".concat(lightboxUid, "-card-").concat(imageId),
|
|
3496
|
+
className: classNames(styles$4.imageWrapper, withBorder ? styles$4.withBorder : '', withLightbox ? styles$4.withLightbox : ''),
|
|
3497
|
+
style: {
|
|
3498
|
+
backgroundImage: "url(".concat(image.url)
|
|
3499
|
+
},
|
|
3500
|
+
onFocus: function onFocus() {
|
|
3501
|
+
return handleImageCardFocus(imageId);
|
|
3502
|
+
},
|
|
3503
|
+
onKeyDown: handleEnterKeyPress
|
|
3504
|
+
})), /*#__PURE__*/React__default.createElement("figcaption", {
|
|
3505
|
+
className: styles$4.photographer
|
|
3506
|
+
}, image.photographer));
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
function ImagesGrid(_ref) {
|
|
3510
|
+
var images = _ref.images,
|
|
3511
|
+
columns = _ref.columns,
|
|
3512
|
+
lightboxUid = _ref.lightboxUid,
|
|
3513
|
+
withLightbox = _ref.withLightbox,
|
|
3514
|
+
withBorder = _ref.withBorder;
|
|
3515
|
+
var _useImageGalleryConte = useImageGalleryContext(),
|
|
3516
|
+
isLightboxVisible = _useImageGalleryConte.isLightboxVisible,
|
|
3517
|
+
selectedImageIndex = _useImageGalleryConte.selectedImageIndex;
|
|
3518
|
+
var gridContainerRef = useRef(null);
|
|
3519
|
+
useEffect(function () {
|
|
3520
|
+
if (!isLightboxVisible && selectedImageIndex !== -1) {
|
|
3521
|
+
var gridContainer = gridContainerRef.current;
|
|
3522
|
+
var selectedCard = gridContainer === null || gridContainer === void 0 ? void 0 : gridContainer.querySelector("[id=\"".concat(lightboxUid, "-card-").concat(selectedImageIndex, "\"]"));
|
|
3523
|
+
if (selectedCard) {
|
|
3524
|
+
selectedCard.focus();
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3527
|
+
}, [isLightboxVisible, selectedImageIndex, lightboxUid]);
|
|
3528
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3529
|
+
ref: gridContainerRef
|
|
3530
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3531
|
+
colsCount: images.length === 1 ? 1 : columns
|
|
3532
|
+
}, images.map(function (image, i) {
|
|
3533
|
+
return /*#__PURE__*/React__default.createElement(ImageItem
|
|
3534
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
3535
|
+
, {
|
|
3536
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
3537
|
+
key: "grid-image-".concat(i),
|
|
3538
|
+
imageId: i,
|
|
3539
|
+
image: image,
|
|
3540
|
+
lightboxUid: lightboxUid,
|
|
3541
|
+
withLightbox: withLightbox,
|
|
3542
|
+
withBorder: withBorder
|
|
3543
|
+
});
|
|
3544
|
+
})));
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3548
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3549
|
+
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
3550
|
+
function Lightbox(_ref) {
|
|
3551
|
+
var images = _ref.images,
|
|
3552
|
+
lightboxUid = _ref.lightboxUid;
|
|
3553
|
+
var lightboxRef = useRef(null);
|
|
3554
|
+
var barrierRef = useRef(null);
|
|
3555
|
+
var _useImageGalleryConte = useImageGalleryContext(),
|
|
3556
|
+
isLightboxVisible = _useImageGalleryConte.isLightboxVisible,
|
|
3557
|
+
imageIndex = _useImageGalleryConte.imageIndex,
|
|
3558
|
+
toggleLightbox = _useImageGalleryConte.toggleLightbox;
|
|
3559
|
+
var handleEscapeKeyPress = useCallback(function (event) {
|
|
3560
|
+
if (event.key === 'Escape') {
|
|
3561
|
+
toggleLightbox();
|
|
3562
|
+
}
|
|
3563
|
+
}, [toggleLightbox]);
|
|
3564
|
+
useEffect(function () {
|
|
3565
|
+
var lightbox = lightboxRef.current;
|
|
3566
|
+
if (!lightbox) return undefined;
|
|
3567
|
+
var focusableElements = lightbox.querySelectorAll('button, [tabindex]:not([tabindex="-1"])');
|
|
3568
|
+
var firstElement = focusableElements ? focusableElements[0] : null;
|
|
3569
|
+
var lastElement = focusableElements ? focusableElements[focusableElements.length - 1] : null;
|
|
3570
|
+
var handleTabKeyPress = function handleTabKeyPress(event) {
|
|
3571
|
+
if (focusableElements && event.key === 'Tab') {
|
|
3572
|
+
if (event.shiftKey && document.activeElement === firstElement) {
|
|
3573
|
+
event.preventDefault();
|
|
3574
|
+
lastElement === null || lastElement === void 0 || lastElement.focus();
|
|
3575
|
+
} else if (!event.shiftKey && document.activeElement === lastElement) {
|
|
3576
|
+
event.preventDefault();
|
|
3577
|
+
focusableElements[0].focus();
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3580
|
+
};
|
|
3581
|
+
if (isLightboxVisible) {
|
|
3582
|
+
var _barrierRef$current;
|
|
3583
|
+
(_barrierRef$current = barrierRef.current) === null || _barrierRef$current === void 0 || _barrierRef$current.focus();
|
|
3584
|
+
lightbox.addEventListener('keydown', handleTabKeyPress);
|
|
3585
|
+
lightbox.addEventListener('keydown', handleEscapeKeyPress);
|
|
3586
|
+
}
|
|
3587
|
+
return function () {
|
|
3588
|
+
lightbox === null || lightbox === void 0 || lightbox.removeEventListener('keydown', handleTabKeyPress);
|
|
3589
|
+
lightbox === null || lightbox === void 0 || lightbox.removeEventListener('keydown', handleEscapeKeyPress);
|
|
3590
|
+
};
|
|
3591
|
+
}, [isLightboxVisible, handleEscapeKeyPress]);
|
|
3592
|
+
var imageTitle = images[imageIndex].title || images[imageIndex].photographer;
|
|
3593
|
+
var imagePhotogrpher = images[imageIndex].photographer;
|
|
3594
|
+
var imageUrl = images[imageIndex].url;
|
|
3595
|
+
var renderLightboxComponent = function renderLightboxComponent() {
|
|
3596
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3597
|
+
id: lightboxUid,
|
|
3598
|
+
role: "dialog",
|
|
3599
|
+
"aria-modal": true,
|
|
3600
|
+
"aria-labelledby": "".concat(lightboxUid, "-title"),
|
|
3601
|
+
className: styles$4.lightbox,
|
|
3602
|
+
onClick: toggleLightbox,
|
|
3603
|
+
ref: lightboxRef
|
|
3604
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3605
|
+
onClick: function onClick(e) {
|
|
3606
|
+
e.stopPropagation();
|
|
3607
|
+
},
|
|
3608
|
+
className: styles$4.lightboxContent
|
|
3609
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3610
|
+
className: styles$4.inner
|
|
3611
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
3612
|
+
id: "".concat(lightboxUid, "-title"),
|
|
3613
|
+
className: styles$4.screenReaderText,
|
|
3614
|
+
ref: barrierRef,
|
|
3615
|
+
tabIndex: -1
|
|
3616
|
+
}, imageTitle), /*#__PURE__*/React__default.createElement("figure", {
|
|
3617
|
+
className: styles$4.imageCardWrapper,
|
|
3618
|
+
"aria-label": imageTitle
|
|
3619
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
3620
|
+
alt: imageTitle,
|
|
3621
|
+
src: imageUrl
|
|
3622
|
+
})), /*#__PURE__*/React__default.createElement("figcaption", {
|
|
3623
|
+
className: classNames(styles$4.photographer, styles$4.withMargin)
|
|
3624
|
+
}, imagePhotogrpher), images.length > 1 && /*#__PURE__*/React__default.createElement(Lightbox.Actions, {
|
|
3625
|
+
images: images
|
|
3626
|
+
}), /*#__PURE__*/React__default.createElement(Lightbox.CloseButton, {
|
|
3627
|
+
lightboxUid: lightboxUid
|
|
3628
|
+
}))));
|
|
3629
|
+
};
|
|
3630
|
+
return isLightboxVisible ? /*#__PURE__*/ReactDOM.createPortal(renderLightboxComponent(), document.body) : null;
|
|
3631
|
+
}
|
|
3632
|
+
function Actions(_ref2) {
|
|
3633
|
+
var images = _ref2.images;
|
|
3634
|
+
var _useImageGalleryConte2 = useImageGalleryContext(),
|
|
3635
|
+
imageIndex = _useImageGalleryConte2.imageIndex,
|
|
3636
|
+
setImageIndex = _useImageGalleryConte2.setImageIndex;
|
|
3637
|
+
var handleNextClick = function handleNextClick() {
|
|
3638
|
+
setImageIndex(function (prev) {
|
|
3639
|
+
return imageIndex === images.length - 1 ? 0 : prev + 1;
|
|
3640
|
+
});
|
|
3641
|
+
};
|
|
3642
|
+
var handlePreviousClick = function handlePreviousClick() {
|
|
3643
|
+
setImageIndex(function (prev) {
|
|
3644
|
+
return imageIndex === 0 ? images.length - 1 : prev - 1;
|
|
3645
|
+
});
|
|
3646
|
+
};
|
|
3647
|
+
var _useConfig = useConfig(),
|
|
3648
|
+
_useConfig$copy = _useConfig.copy,
|
|
3649
|
+
previous = _useConfig$copy.previous,
|
|
3650
|
+
next = _useConfig$copy.next;
|
|
3651
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3652
|
+
className: styles$4.actionsWrapper
|
|
3653
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
3654
|
+
iconStart: /*#__PURE__*/React__default.createElement(IconAngleLeft, null),
|
|
3655
|
+
onClick: handlePreviousClick,
|
|
3656
|
+
theme: ButtonPresetTheme.Black,
|
|
3657
|
+
variant: ButtonVariant.Secondary,
|
|
3658
|
+
"aria-label": previous
|
|
3659
|
+
}, previous), /*#__PURE__*/React__default.createElement(Button, {
|
|
3660
|
+
iconStart: /*#__PURE__*/React__default.createElement(IconAngleRight, null),
|
|
3661
|
+
onClick: handleNextClick,
|
|
3662
|
+
theme: ButtonPresetTheme.Black,
|
|
3663
|
+
variant: ButtonVariant.Secondary,
|
|
3664
|
+
"aria-label": next
|
|
3665
|
+
}, next));
|
|
3666
|
+
}
|
|
3667
|
+
function CloseButton(_ref3) {
|
|
3668
|
+
var lightboxUid = _ref3.lightboxUid;
|
|
3669
|
+
var _useImageGalleryConte3 = useImageGalleryContext(),
|
|
3670
|
+
toggleLightbox = _useImageGalleryConte3.toggleLightbox;
|
|
3671
|
+
var _useConfig2 = useConfig(),
|
|
3672
|
+
closeButtonLabelText = _useConfig2.copy.closeButtonLabelText;
|
|
3673
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
3674
|
+
className: styles$4.closeButton,
|
|
3675
|
+
id: "close-".concat(lightboxUid),
|
|
3676
|
+
type: "button",
|
|
3677
|
+
"aria-controls": lightboxUid.toString(),
|
|
3678
|
+
"aria-expanded": "true",
|
|
3679
|
+
onClick: toggleLightbox
|
|
3680
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3681
|
+
className: styles$4.screenReaderText
|
|
3682
|
+
}, closeButtonLabelText), /*#__PURE__*/React__default.createElement("svg", {
|
|
3683
|
+
viewBox: "0 0 24 24",
|
|
3684
|
+
"aria-hidden": "true",
|
|
3685
|
+
tabIndex: -1
|
|
3686
|
+
}));
|
|
3687
|
+
}
|
|
3688
|
+
Lightbox.Actions = Actions;
|
|
3689
|
+
Lightbox.CloseButton = CloseButton;
|
|
3690
|
+
|
|
3691
|
+
function ImageGallery(_ref) {
|
|
3692
|
+
var images = _ref.images,
|
|
3693
|
+
_ref$withBorder = _ref.withBorder,
|
|
3694
|
+
withBorder = _ref$withBorder === void 0 ? false : _ref$withBorder,
|
|
3695
|
+
_ref$withLightbox = _ref.withLightbox,
|
|
3696
|
+
withLightbox = _ref$withLightbox === void 0 ? true : _ref$withLightbox,
|
|
3697
|
+
lightboxUid = _ref.lightboxUid,
|
|
3698
|
+
_ref$columns = _ref.columns,
|
|
3699
|
+
columns = _ref$columns === void 0 ? 5 : _ref$columns;
|
|
3700
|
+
return /*#__PURE__*/React__default.createElement(ImageGalleryProvider, null, withLightbox && /*#__PURE__*/React__default.createElement(Lightbox, {
|
|
3701
|
+
lightboxUid: lightboxUid,
|
|
3702
|
+
images: images
|
|
3703
|
+
}), /*#__PURE__*/React__default.createElement(ImagesGrid, {
|
|
3704
|
+
images: images,
|
|
3705
|
+
columns: columns,
|
|
3706
|
+
lightboxUid: lightboxUid,
|
|
3707
|
+
withBorder: withBorder,
|
|
3708
|
+
withLightbox: withLightbox
|
|
3709
|
+
}));
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
function ImageGalleryModule(props) {
|
|
3713
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3714
|
+
className: styles$h.pageModuleWrapper
|
|
3715
|
+
}, /*#__PURE__*/React__default.createElement(ImageGallery, _objectSpread2({}, props)));
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
function StepsModule(_ref) {
|
|
3719
|
+
var title = _ref.title,
|
|
3720
|
+
helpText = _ref.helpText,
|
|
3721
|
+
color = _ref.color,
|
|
3722
|
+
steps = _ref.steps,
|
|
3723
|
+
type = _ref.type,
|
|
3724
|
+
className = _ref.className;
|
|
3725
|
+
var stepsContents = steps === null || steps === void 0 ? void 0 : steps.map(function (step, index) {
|
|
3726
|
+
// The card module does not contain any proeprty that could be used as an unique id, so one needs to be created
|
|
3727
|
+
var uniqueKey = createHashKey("".concat(index, "-").concat(step.title, "-").concat(step.content));
|
|
3728
|
+
return {
|
|
3729
|
+
key: uniqueKey,
|
|
3730
|
+
title: getTextFromHtml(step.title),
|
|
3731
|
+
description: getTextFromHtml(step.content)
|
|
3732
|
+
};
|
|
3733
|
+
});
|
|
3734
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3735
|
+
className: styles$h.pageModuleWrapper
|
|
3736
|
+
}, /*#__PURE__*/React__default.createElement(StepByStep, {
|
|
3737
|
+
numberedList: type === 'numbers',
|
|
3738
|
+
className: classNames(color && colorStyles["backgroundListItem".concat(getColor(color))], color && isWhiteText(color) && colorStyles.whiteTextList, styles$h.stepsContainer, className),
|
|
3739
|
+
helpText: getTextFromHtml(helpText !== null && helpText !== void 0 ? helpText : ''),
|
|
3740
|
+
steps: stepsContents !== null && stepsContents !== void 0 ? stepsContents : [],
|
|
3741
|
+
title: title
|
|
3742
|
+
}));
|
|
3743
|
+
}
|
|
3744
|
+
|
|
3745
|
+
var css_248z$3 = ".pageContentBreadcrumb-module_container__Nq6Hc nav{margin:0}";
|
|
3746
|
+
var styles$3 = {"container":"pageContentBreadcrumb-module_container__Nq6Hc"};
|
|
3747
|
+
styleInject(css_248z$3);
|
|
3748
|
+
|
|
3749
|
+
function PageContentBreadcrumb(_ref) {
|
|
3750
|
+
var breadcrumbs = _ref.breadcrumbs;
|
|
3751
|
+
var _useConfig = useConfig(),
|
|
3752
|
+
breadcrumbNavigationLabel = _useConfig.copy.breadcrumbNavigationLabel;
|
|
3753
|
+
var listItems = getBreadcrumbListItems(breadcrumbs);
|
|
3754
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3755
|
+
className: styles$3.container
|
|
3756
|
+
}, /*#__PURE__*/React__default.createElement(Breadcrumb, {
|
|
3757
|
+
"aria-label": breadcrumbNavigationLabel,
|
|
3758
|
+
list: listItems
|
|
3759
|
+
}));
|
|
3760
|
+
}
|
|
3761
|
+
|
|
3762
|
+
function SocialMediaFeedModule(_ref) {
|
|
3763
|
+
var anchor = _ref.anchor,
|
|
3764
|
+
title = _ref.title,
|
|
3765
|
+
script = _ref.script;
|
|
3766
|
+
var _useConfig = useConfig(),
|
|
3767
|
+
trustedOrigins = _useConfig.htmlSanitizer.trustedOrigins;
|
|
3768
|
+
var scriptWrapperRef = useRef(null);
|
|
3769
|
+
var clean = useMemo(function () {
|
|
3770
|
+
return DOMPurify.sanitize(script !== null && script !== void 0 ? script : '', {
|
|
3771
|
+
FORCE_BODY: true,
|
|
3772
|
+
ADD_TAGS: ['script', 'div']
|
|
3773
|
+
});
|
|
3774
|
+
}, [script]);
|
|
3775
|
+
useLayoutEffect(function () {
|
|
3776
|
+
var _scriptWrapperRef$cur;
|
|
3777
|
+
if ((_scriptWrapperRef$cur = scriptWrapperRef.current) !== null && _scriptWrapperRef$cur !== void 0 && _scriptWrapperRef$cur.innerHTML) {
|
|
3778
|
+
var range = document.createRange();
|
|
3779
|
+
range.selectNode(scriptWrapperRef.current);
|
|
3780
|
+
var documentFragment = range.createContextualFragment(scriptWrapperRef.current.innerHTML);
|
|
3781
|
+
scriptWrapperRef.current.innerHTML = '';
|
|
3782
|
+
scriptWrapperRef.current.append(documentFragment);
|
|
3783
|
+
}
|
|
3784
|
+
}, [clean, trustedOrigins]);
|
|
3785
|
+
var sanitizeScripts = function sanitizeScripts(domNode) {
|
|
3786
|
+
if ('attribs' in domNode) {
|
|
3787
|
+
if (domNode.name === 'script' && !isTrustedOrigin(domNode.attribs.src, trustedOrigins !== null && trustedOrigins !== void 0 ? trustedOrigins : [])) {
|
|
3788
|
+
// eslint-disable-next-line no-console
|
|
3789
|
+
console.warn('The unsafe social media feed script is not allowed. Please enable it in hcrc library configs.');
|
|
3790
|
+
return /*#__PURE__*/React__default.createElement("div", null);
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
return domNode;
|
|
3794
|
+
};
|
|
3795
|
+
var htmlReactParserOptions = {
|
|
3796
|
+
replace: function replace(domNode) {
|
|
3797
|
+
return sanitizeScripts(domNode);
|
|
3798
|
+
}
|
|
3799
|
+
};
|
|
3800
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3801
|
+
id: anchor,
|
|
3802
|
+
className: styles$h.pageModuleWrapper
|
|
3803
|
+
}, title && (/*#__PURE__*/React__default.createElement(Text, {
|
|
3804
|
+
as: "h2",
|
|
3805
|
+
variant: "h2"
|
|
3806
|
+
}, title)), /*#__PURE__*/React__default.createElement("div", {
|
|
3807
|
+
ref: scriptWrapperRef
|
|
3808
|
+
}, parse(clean, htmlReactParserOptions)));
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3811
|
+
var initialValue = {
|
|
3812
|
+
page: null
|
|
3813
|
+
};
|
|
3814
|
+
var PageContext = /*#__PURE__*/React__default.createContext(initialValue);
|
|
3815
|
+
|
|
3816
|
+
function PageContextProvider(_ref) {
|
|
3817
|
+
var page = _ref.page,
|
|
3818
|
+
children = _ref.children;
|
|
3819
|
+
var context = React__default.useMemo(function () {
|
|
3820
|
+
return {
|
|
3821
|
+
page: page
|
|
3822
|
+
};
|
|
3823
|
+
},
|
|
3824
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3825
|
+
[page === null || page === void 0 ? void 0 : page.id, page === null || page === void 0 ? void 0 : page.uri]);
|
|
3826
|
+
return /*#__PURE__*/React__default.createElement(PageContext.Provider, {
|
|
3827
|
+
value: context
|
|
3828
|
+
}, children);
|
|
3829
|
+
}
|
|
3830
|
+
|
|
3831
|
+
var _excluded = ["page", "breadcrumbs", "collections", "heroContainer", "backUrl", "sidebarContentProps", "PageContentLayoutComponent", "content", "shareLinks", "className", "onArticlesSearch"];
|
|
3832
|
+
// Modules: Content, Image, Cards, Steps (possibly other in future)
|
|
3833
|
+
var defaultContentModules = function defaultContentModules(page) {
|
|
3834
|
+
var _page$modules;
|
|
3835
|
+
var contentModules = [];
|
|
3836
|
+
page === null || page === void 0 || (_page$modules = page.modules) === null || _page$modules === void 0 || _page$modules.map(function (module, index) {
|
|
3837
|
+
var uniqueKey = createHashKey("".concat(index, "-").concat(JSON.stringify(module)));
|
|
3838
|
+
if (isLayoutContent(module)) {
|
|
3839
|
+
var _module$content, _module$backgroundCol;
|
|
3840
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(ContentModule, {
|
|
3841
|
+
key: uniqueKey,
|
|
3842
|
+
content: (_module$content = module.content) !== null && _module$content !== void 0 ? _module$content : undefined,
|
|
3843
|
+
backgroundColor: (_module$backgroundCol = module.backgroundColor) !== null && _module$backgroundCol !== void 0 ? _module$backgroundCol : undefined
|
|
3844
|
+
}));
|
|
3845
|
+
} else if (isLayoutCard(module)) {
|
|
3846
|
+
var _module$title, _module$description, _module$backgroundCol2, _module$link$url, _module$link, _module$image;
|
|
3847
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(CardModule, {
|
|
3848
|
+
key: uniqueKey,
|
|
3849
|
+
title: (_module$title = module.title) !== null && _module$title !== void 0 ? _module$title : undefined,
|
|
3850
|
+
text: (_module$description = module.description) !== null && _module$description !== void 0 ? _module$description : undefined,
|
|
3851
|
+
backgroundColor: (_module$backgroundCol2 = module.backgroundColor) !== null && _module$backgroundCol2 !== void 0 ? _module$backgroundCol2 : undefined,
|
|
3852
|
+
hasLink: true,
|
|
3853
|
+
url: (_module$link$url = (_module$link = module.link) === null || _module$link === void 0 ? void 0 : _module$link.url) !== null && _module$link$url !== void 0 ? _module$link$url : undefined,
|
|
3854
|
+
imageUrl: (_module$image = module.image) === null || _module$image === void 0 ? void 0 : _module$image.medium_large,
|
|
3855
|
+
alignment: module.alignment
|
|
3856
|
+
}));
|
|
3857
|
+
} else if (isLayoutCards(module)) {
|
|
3858
|
+
var _module$cards$filter$, _module$cards;
|
|
3859
|
+
var items = (_module$cards$filter$ = (_module$cards = module.cards) === null || _module$cards === void 0 ? void 0 : _module$cards.filter(function (card) {
|
|
3860
|
+
return card !== null;
|
|
3861
|
+
}).map(function (card) {
|
|
3862
|
+
var _card$backgroundColor, _card$description, _card$description2, _card$icon, _card$link$title, _card$link, _card$link$target, _card$link2, _card$link$url, _card$link3;
|
|
3863
|
+
return _objectSpread2(_objectSpread2({}, card), {}, {
|
|
3864
|
+
backgroundColor: (_card$backgroundColor = card.backgroundColor) !== null && _card$backgroundColor !== void 0 ? _card$backgroundColor : undefined,
|
|
3865
|
+
title: (_card$description = card.description) !== null && _card$description !== void 0 ? _card$description : undefined,
|
|
3866
|
+
description: (_card$description2 = card.description) !== null && _card$description2 !== void 0 ? _card$description2 : undefined,
|
|
3867
|
+
icon: (_card$icon = card.icon) !== null && _card$icon !== void 0 ? _card$icon : undefined,
|
|
3868
|
+
link: _objectSpread2(_objectSpread2({}, card.link), {}, {
|
|
3869
|
+
title: (_card$link$title = (_card$link = card.link) === null || _card$link === void 0 ? void 0 : _card$link.title) !== null && _card$link$title !== void 0 ? _card$link$title : undefined,
|
|
3870
|
+
target: (_card$link$target = (_card$link2 = card.link) === null || _card$link2 === void 0 ? void 0 : _card$link2.target) !== null && _card$link$target !== void 0 ? _card$link$target : undefined,
|
|
3871
|
+
url: (_card$link$url = (_card$link3 = card.link) === null || _card$link3 === void 0 ? void 0 : _card$link3.url) !== null && _card$link$url !== void 0 ? _card$link$url : undefined
|
|
3872
|
+
})
|
|
3873
|
+
});
|
|
3874
|
+
})) !== null && _module$cards$filter$ !== void 0 ? _module$cards$filter$ : [];
|
|
3875
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(CardsModule, {
|
|
3876
|
+
key: uniqueKey,
|
|
3877
|
+
items: items
|
|
3878
|
+
}));
|
|
3879
|
+
} else if (isLayoutImage(module)) {
|
|
3880
|
+
var _module$image$medium_, _module$image2, _module$image$medium, _module$image3, _module$photographer_, _module$border, _module$show_on_light;
|
|
3881
|
+
var image = {
|
|
3882
|
+
url: (_module$image$medium_ = (_module$image2 = module.image) === null || _module$image2 === void 0 ? void 0 : _module$image2.medium_large) !== null && _module$image$medium_ !== void 0 ? _module$image$medium_ : '',
|
|
3883
|
+
previewUrl: (_module$image$medium = (_module$image3 = module.image) === null || _module$image3 === void 0 ? void 0 : _module$image3.medium) !== null && _module$image$medium !== void 0 ? _module$image$medium : '',
|
|
3884
|
+
photographer: (_module$photographer_ = module.photographer_name) !== null && _module$photographer_ !== void 0 ? _module$photographer_ : ''
|
|
3885
|
+
};
|
|
3886
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(ImageGalleryModule, {
|
|
3887
|
+
images: [image],
|
|
3888
|
+
key: uniqueKey,
|
|
3889
|
+
withBorder: (_module$border = module.border) !== null && _module$border !== void 0 ? _module$border : undefined,
|
|
3890
|
+
withLightbox: (_module$show_on_light = module.show_on_lightbox) !== null && _module$show_on_light !== void 0 ? _module$show_on_light : undefined,
|
|
3891
|
+
lightboxUid: "lightbox-".concat(index),
|
|
3892
|
+
columns: 1
|
|
3893
|
+
}));
|
|
3894
|
+
} else if (isLayoutImageGallery(module)) {
|
|
3895
|
+
var _module$gallery$filte, _module$gallery;
|
|
3896
|
+
var images = (_module$gallery$filte = (_module$gallery = module.gallery) === null || _module$gallery === void 0 ? void 0 : _module$gallery.filter(function (image) {
|
|
3897
|
+
return !!image;
|
|
3898
|
+
}).map(function (image) {
|
|
3899
|
+
var _image$medium_large, _image$medium, _image$caption, _image$title;
|
|
3900
|
+
return {
|
|
3901
|
+
url: (_image$medium_large = image === null || image === void 0 ? void 0 : image.medium_large) !== null && _image$medium_large !== void 0 ? _image$medium_large : '',
|
|
3902
|
+
previewUrl: (_image$medium = image === null || image === void 0 ? void 0 : image.medium) !== null && _image$medium !== void 0 ? _image$medium : '',
|
|
3903
|
+
photographer: (_image$caption = image === null || image === void 0 ? void 0 : image.caption) !== null && _image$caption !== void 0 ? _image$caption : '',
|
|
3904
|
+
title: (_image$title = image === null || image === void 0 ? void 0 : image.title) !== null && _image$title !== void 0 ? _image$title : ''
|
|
3905
|
+
};
|
|
3906
|
+
})) !== null && _module$gallery$filte !== void 0 ? _module$gallery$filte : [];
|
|
3907
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(ImageGalleryModule, {
|
|
3908
|
+
images: images,
|
|
3909
|
+
key: uniqueKey,
|
|
3910
|
+
withLightbox: true,
|
|
3911
|
+
lightboxUid: "lightbox-".concat(index),
|
|
3912
|
+
columns: 3
|
|
3913
|
+
}));
|
|
3914
|
+
} else if (isLayoutSteps(module)) {
|
|
3915
|
+
var _module$steps$filter$, _module$steps, _module$title2, _module$description2, _module$color, _module$type;
|
|
3916
|
+
var steps = (_module$steps$filter$ = (_module$steps = module.steps) === null || _module$steps === void 0 ? void 0 : _module$steps.filter(function (step) {
|
|
3917
|
+
return !!step;
|
|
3918
|
+
}).map(function (step) {
|
|
3919
|
+
var _step$title, _step$content;
|
|
3920
|
+
return {
|
|
3921
|
+
title: (_step$title = step.title) !== null && _step$title !== void 0 ? _step$title : '',
|
|
3922
|
+
content: (_step$content = step.content) !== null && _step$content !== void 0 ? _step$content : ''
|
|
3923
|
+
};
|
|
3924
|
+
})) !== null && _module$steps$filter$ !== void 0 ? _module$steps$filter$ : [];
|
|
3925
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(StepsModule, {
|
|
3926
|
+
key: uniqueKey,
|
|
3927
|
+
title: (_module$title2 = module.title) !== null && _module$title2 !== void 0 ? _module$title2 : undefined,
|
|
3928
|
+
steps: steps,
|
|
3929
|
+
helpText: (_module$description2 = module.description) !== null && _module$description2 !== void 0 ? _module$description2 : undefined,
|
|
3930
|
+
color: (_module$color = module.color) !== null && _module$color !== void 0 ? _module$color : undefined,
|
|
3931
|
+
type: (_module$type = module.type) !== null && _module$type !== void 0 ? _module$type : undefined
|
|
3932
|
+
}));
|
|
3933
|
+
} else if (isLayoutSocialMediaFeed(module)) {
|
|
3934
|
+
var _module$anchor, _module$title3, _module$script;
|
|
3935
|
+
contentModules.push(/*#__PURE__*/React__default.createElement(SocialMediaFeedModule, {
|
|
3936
|
+
key: uniqueKey,
|
|
3937
|
+
anchor: (_module$anchor = module.anchor) !== null && _module$anchor !== void 0 ? _module$anchor : '',
|
|
3938
|
+
title: (_module$title3 = module.title) !== null && _module$title3 !== void 0 ? _module$title3 : undefined,
|
|
3939
|
+
script: (_module$script = module.script) !== null && _module$script !== void 0 ? _module$script : undefined
|
|
3940
|
+
}));
|
|
3941
|
+
}
|
|
3942
|
+
return null;
|
|
3943
|
+
});
|
|
3944
|
+
return contentModules;
|
|
3945
|
+
};
|
|
3946
|
+
var defaultContent = function defaultContent(page, onArticlesSearch) {
|
|
3947
|
+
var _page$title, _page$content, _page$date;
|
|
3948
|
+
var hideTitle = false;
|
|
3949
|
+
if (isPageType(page)) {
|
|
3950
|
+
var _page$hero;
|
|
3951
|
+
hideTitle = Boolean(page === null || page === void 0 || (_page$hero = page.hero) === null || _page$hero === void 0 ? void 0 : _page$hero.title);
|
|
3952
|
+
}
|
|
3953
|
+
return /*#__PURE__*/React__default.createElement(PageMainContent, {
|
|
3954
|
+
title: !hideTitle ? (_page$title = page === null || page === void 0 ? void 0 : page.title) !== null && _page$title !== void 0 ? _page$title : '' : '',
|
|
3955
|
+
content: (_page$content = page === null || page === void 0 ? void 0 : page.content) !== null && _page$content !== void 0 ? _page$content : '',
|
|
3956
|
+
date: (_page$date = page === null || page === void 0 ? void 0 : page.date) !== null && _page$date !== void 0 ? _page$date : undefined,
|
|
3957
|
+
categories: page === null || page === void 0 ? void 0 : page.categories,
|
|
3958
|
+
contentModules: defaultContentModules(page),
|
|
3959
|
+
onArticlesSearch: onArticlesSearch
|
|
3960
|
+
});
|
|
3961
|
+
};
|
|
3962
|
+
var defaultCollections = function defaultCollections(_ref) {
|
|
3963
|
+
var _getCollections, _page$modules2;
|
|
3964
|
+
var page = _ref.page,
|
|
3965
|
+
_ref$isEventModulesEn = _ref.isEventModulesEnabled,
|
|
3966
|
+
isEventModulesEnabled = _ref$isEventModulesEn === void 0 ? true : _ref$isEventModulesEn,
|
|
3967
|
+
_ref$isVenueModulesEn = _ref.isVenueModulesEnabled,
|
|
3968
|
+
isVenueModulesEnabled = _ref$isVenueModulesEn === void 0 ? true : _ref$isVenueModulesEn;
|
|
3969
|
+
return (_getCollections = getCollections((_page$modules2 = page === null || page === void 0 ? void 0 : page.modules) !== null && _page$modules2 !== void 0 ? _page$modules2 : [], true)) === null || _getCollections === void 0 ? void 0 : _getCollections.reduce(function (collectionElements, collection) {
|
|
3970
|
+
var _collection$id, _collection$title, _collection$descripti;
|
|
3971
|
+
var key = "collection-".concat(btoa("".concat((_collection$id = collection === null || collection === void 0 ? void 0 : collection.id) !== null && _collection$id !== void 0 ? _collection$id : '', "-").concat((_collection$title = collection === null || collection === void 0 ? void 0 : collection.title) !== null && _collection$title !== void 0 ? _collection$title : '', "-").concat((_collection$descripti = collection === null || collection === void 0 ? void 0 : collection.description) !== null && _collection$descripti !== void 0 ? _collection$descripti : '')));
|
|
3972
|
+
var commonCollectionProps = {
|
|
3973
|
+
title: collection.title,
|
|
3974
|
+
description: collection.description,
|
|
3975
|
+
type: getCollectionUIType(collection),
|
|
3976
|
+
collectionContainerProps: {}
|
|
3977
|
+
};
|
|
3978
|
+
if (isEventSearchCollection(collection)) {
|
|
3979
|
+
if (isEventModulesEnabled) {
|
|
3980
|
+
collectionElements.push(/*#__PURE__*/React__default.createElement(EventSearchCollection, _objectSpread2(_objectSpread2({}, commonCollectionProps), {}, {
|
|
3981
|
+
key: key,
|
|
3982
|
+
collection: collection
|
|
3983
|
+
})));
|
|
3984
|
+
}
|
|
3985
|
+
} else if (isEventSelectionCollection(collection)) {
|
|
3986
|
+
if (isEventModulesEnabled) {
|
|
3987
|
+
collectionElements.push(/*#__PURE__*/React__default.createElement(EventSelectionCollection, _objectSpread2(_objectSpread2({}, commonCollectionProps), {}, {
|
|
3988
|
+
key: key,
|
|
3989
|
+
collection: collection
|
|
3990
|
+
})));
|
|
3991
|
+
}
|
|
3992
|
+
} else if (isLocationsSelectionCollection(collection)) {
|
|
3993
|
+
if (isVenueModulesEnabled) {
|
|
3994
|
+
var _page$language;
|
|
3995
|
+
collectionElements.push(/*#__PURE__*/React__default.createElement(LocationsSelectionCollection, _objectSpread2(_objectSpread2({}, commonCollectionProps), {}, {
|
|
3996
|
+
key: key,
|
|
3997
|
+
collection: collection,
|
|
3998
|
+
locale: page === null || page === void 0 || (_page$language = page.language) === null || _page$language === void 0 ? void 0 : _page$language.locale
|
|
3999
|
+
})));
|
|
4000
|
+
}
|
|
4001
|
+
} else {
|
|
4002
|
+
collectionElements.push(/*#__PURE__*/React__default.createElement(PageArticleCollection, _objectSpread2(_objectSpread2({}, commonCollectionProps), {}, {
|
|
4003
|
+
key: key,
|
|
4004
|
+
collection: collection
|
|
4005
|
+
})));
|
|
4006
|
+
}
|
|
4007
|
+
return collectionElements;
|
|
4008
|
+
}, []);
|
|
4009
|
+
};
|
|
4010
|
+
function PageContent(props) {
|
|
4011
|
+
var _page$id, _page$featuredImage, _page$featuredImage$n, _page$featuredImage2, _page$featuredImage$n2, _page$featuredImage3;
|
|
4012
|
+
var page = props.page,
|
|
4013
|
+
breadcrumbs = props.breadcrumbs,
|
|
4014
|
+
collections = props.collections,
|
|
4015
|
+
heroContainer = props.heroContainer,
|
|
4016
|
+
backUrl = props.backUrl,
|
|
4017
|
+
sidebarContentProps = props.sidebarContentProps,
|
|
4018
|
+
_props$PageContentLay = props.PageContentLayoutComponent,
|
|
4019
|
+
PageContentLayoutComponent = _props$PageContentLay === void 0 ? PageContentLayout : _props$PageContentLay,
|
|
4020
|
+
content = props.content,
|
|
4021
|
+
shareLinks = props.shareLinks,
|
|
4022
|
+
className = props.className,
|
|
4023
|
+
onArticlesSearch = props.onArticlesSearch,
|
|
4024
|
+
pageContentLayoutProps = _objectWithoutProperties(props, _excluded);
|
|
4025
|
+
var _useConfig = useConfig(),
|
|
4026
|
+
Head = _useConfig.components.Head,
|
|
4027
|
+
eventsApolloClient = _useConfig.eventsApolloClient,
|
|
4028
|
+
venuesApolloClient = _useConfig.venuesApolloClient,
|
|
4029
|
+
mainContentId = _useConfig.mainContentId;
|
|
4030
|
+
var isEventModulesEnabled = eventsApolloClient !== undefined && eventsApolloClient !== 'disabled';
|
|
4031
|
+
var isVenueModulesEnabled = eventsApolloClient !== undefined && venuesApolloClient !== 'disabled';
|
|
4032
|
+
return /*#__PURE__*/React__default.createElement("main", {
|
|
4033
|
+
id: mainContentId !== null && mainContentId !== void 0 ? mainContentId : MAIN_CONTENT_ID,
|
|
4034
|
+
className: classNames('page-main-content', className)
|
|
4035
|
+
}, Head && /*#__PURE__*/React__default.createElement(PageMeta, {
|
|
4036
|
+
headComponent: Head,
|
|
4037
|
+
page: page
|
|
4038
|
+
}), /*#__PURE__*/React__default.createElement(PageContextProvider, {
|
|
4039
|
+
page: page
|
|
4040
|
+
}, /*#__PURE__*/React__default.createElement(PageContentLayoutComponent, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, props), pageContentLayoutProps), getHeroProps(page)), {}, {
|
|
4041
|
+
breadcrumbs: breadcrumbs && (typeof breadcrumbs === 'function' ? (/*#__PURE__*/React__default.createElement(PageContentBreadcrumb, {
|
|
4042
|
+
breadcrumbs: breadcrumbs(page)
|
|
4043
|
+
})) : (/*#__PURE__*/React__default.createElement(PageContentBreadcrumb, {
|
|
4044
|
+
breadcrumbs: breadcrumbs
|
|
4045
|
+
}))),
|
|
4046
|
+
heroContainer: heroContainer,
|
|
4047
|
+
id: (_page$id = page === null || page === void 0 ? void 0 : page.id) !== null && _page$id !== void 0 ? _page$id : 'page',
|
|
4048
|
+
imageSrc: page === null || page === void 0 || (_page$featuredImage = page.featuredImage) === null || _page$featuredImage === void 0 || (_page$featuredImage = _page$featuredImage.node) === null || _page$featuredImage === void 0 ? void 0 : _page$featuredImage.large,
|
|
4049
|
+
imageAlt: (_page$featuredImage$n = page === null || page === void 0 || (_page$featuredImage2 = page.featuredImage) === null || _page$featuredImage2 === void 0 || (_page$featuredImage2 = _page$featuredImage2.node) === null || _page$featuredImage2 === void 0 ? void 0 : _page$featuredImage2.altText) !== null && _page$featuredImage$n !== void 0 ? _page$featuredImage$n : undefined,
|
|
4050
|
+
imageLabel: (_page$featuredImage$n2 = page === null || page === void 0 || (_page$featuredImage3 = page.featuredImage) === null || _page$featuredImage3 === void 0 || (_page$featuredImage3 = _page$featuredImage3.node) === null || _page$featuredImage3 === void 0 ? void 0 : _page$featuredImage3.photographerName) !== null && _page$featuredImage$n2 !== void 0 ? _page$featuredImage$n2 : undefined,
|
|
4051
|
+
backUrl: backUrl,
|
|
4052
|
+
content: typeof content === 'function' ? content(page) : content !== null && content !== void 0 ? content : defaultContent(page, onArticlesSearch),
|
|
4053
|
+
shareLinks: shareLinks,
|
|
4054
|
+
collections: typeof collections === 'function' ? collections(page) : collections !== null && collections !== void 0 ? collections : defaultCollections({
|
|
4055
|
+
page: page,
|
|
4056
|
+
isEventModulesEnabled: isEventModulesEnabled,
|
|
4057
|
+
isVenueModulesEnabled: isVenueModulesEnabled
|
|
4058
|
+
}),
|
|
4059
|
+
sidebarContent: /*#__PURE__*/React__default.createElement(SidebarContent, _objectSpread2({
|
|
4060
|
+
content: page === null || page === void 0 ? void 0 : page.sidebar
|
|
4061
|
+
}, sidebarContentProps))
|
|
4062
|
+
}))));
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
var css_248z$2 = ".largeCard-module_cardLink__vlRsl{margin-bottom:var(--spacing-s)}@media (min-width:576px){.largeCard-module_cardLink__vlRsl{margin-bottom:var(--spacing-m)}}.largeCard-module_cardWrapper__12eBz{--height-image:12.75rem;--height-image-desktop:40.5rem;--width-image:8rem;background-color:var(--color-white);display:flex;flex-direction:column;height:100%;min-width:fit-content;position:relative;text-decoration:none;width:100%;word-break:break-word}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz{word-break:unset}}.largeCard-module_cardWrapper__12eBz.largeCard-module_isHovered__HyKtv .largeCard-module_title__sVYR8{text-decoration:underline}.largeCard-module_cardWrapper__12eBz.largeCard-module_withBorder__ffTAd{border:1px solid var(--color-black-30)}.largeCard-module_cardWrapper__12eBz.largeCard-module_default__e8RPV{border:none}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz{flex-direction:row}.largeCard-module_cardWrapper__12eBz.largeCard-module_image-left__f-zx9{flex-direction:row-reverse}}.largeCard-module_cardWrapper__12eBz .largeCard-module_imageWrapper__KM26i{background-position:50%;background-repeat:no-repeat;background-size:cover;box-sizing:border-box;display:flex;padding-bottom:62.5%;text-decoration:none}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz .largeCard-module_imageWrapper__KM26i{flex:1.5 1;min-height:var(--height-image-desktop);padding-bottom:0}}.largeCard-module_cardWrapper__12eBz .largeCard-module_imageWrapper__KM26i .largeCard-module_imageLabel__LhKeg{padding:var(--spacing-xs)}.largeCard-module_cardWrapper__12eBz .largeCard-module_imageWrapper__KM26i .largeCard-module_imageLabel__LhKeg .largeCard-module_tag__geBaK{--tag-background:var(--color-black-5);font-size:var(--fontsize-body-s);font-weight:600}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM-{display:flex;flex-direction:column;justify-content:center;padding:var(--spacing-s)}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM-{flex:1 1;min-height:40.5rem;min-width:12.75rem;padding:var(--spacing-m)}}@media (min-width:992px){.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM-{flex:1 1;min-height:40.5rem;min-width:31.25rem;padding:var(--spacing-m)}}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_title__sVYR8{font-size:var(--fontsize-heading-s);font-weight:400;line-height:var(--lineheight-m);margin-bottom:var(--spacing-2-xs)}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_title__sVYR8{font-size:var(--fontsize-heading-l);hyphens:auto;margin-bottom:var(--spacing-s);word-break:break-word}}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_subTitle__M1ag4{color:var(--color-black-60);font-size:var(--fontsize-body-s);margin-bottom:var(--spacing-2-xs)}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_subTitle__M1ag4{font-size:var(--fontsize-body-l);line-height:2.25rem}}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_text__P4Qgs{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;font-size:var(--fontsize-body-m);line-height:var(--lineheight-m);margin-bottom:var(--spacing-2-xs);order:3;overflow:hidden}@media (min-width:576px){.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_text__P4Qgs{-webkit-line-clamp:none;-webkit-box-orient:vertical;font-size:var(--fontsize-body-l);line-height:var(--lineheight-l);margin-bottom:var(--spacing-2-xs)}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_text__P4Qgs.largeCard-module_clamp__uMsqm{-webkit-line-clamp:3;-webkit-box-orient:vertical}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_text__P4Qgs p{margin:0}}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_customContent__TN-6Y{margin:var(--spacing-2-xs) 0;order:4}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_customContent__TN-6Y p{margin:0}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_buttonWrapper__45-rv{order:5}.largeCard-module_cardWrapper__12eBz .largeCard-module_textWrapper__D6KM- .largeCard-module_buttonWrapper__45-rv a svg{height:var(--spacing-2-xl);width:var(--spacing-2-xl)}";
|
|
4066
|
+
var styles$2 = {"cardLink":"largeCard-module_cardLink__vlRsl","cardWrapper":"largeCard-module_cardWrapper__12eBz","isHovered":"largeCard-module_isHovered__HyKtv","title":"largeCard-module_title__sVYR8","withBorder":"largeCard-module_withBorder__ffTAd","default":"largeCard-module_default__e8RPV","image-left":"largeCard-module_image-left__f-zx9","imageWrapper":"largeCard-module_imageWrapper__KM26i","imageLabel":"largeCard-module_imageLabel__LhKeg","tag":"largeCard-module_tag__geBaK","textWrapper":"largeCard-module_textWrapper__D6KM-","subTitle":"largeCard-module_subTitle__M1ag4","text":"largeCard-module_text__P4Qgs","clamp":"largeCard-module_clamp__uMsqm","customContent":"largeCard-module_customContent__TN-6Y","buttonWrapper":"largeCard-module_buttonWrapper__45-rv"};
|
|
4067
|
+
styleInject(css_248z$2);
|
|
4068
|
+
|
|
4069
|
+
var css_248z$1 = ".archiveSearchPage-module_pageLayout__B2XBw{display:grid;grid-template-rows:auto 1fr auto;min-height:100vh}";
|
|
4070
|
+
var styles$1 = {"pageLayout":"archiveSearchPage-module_pageLayout__B2XBw"};
|
|
4071
|
+
styleInject(css_248z$1);
|
|
4072
|
+
|
|
4073
|
+
var css_248z = ".archiveSearchPageContent-module_grid__uwVy4{margin-top:var(--spacing-m)}.archiveSearchPageContent-module_breadcrumbs__UgoYJ{box-sizing:border-box;margin:0 auto;max-width:var(--max-width);padding:0 var(--padding);width:100%}.archiveSearchPageContent-module_breadcrumbs__UgoYJ nav{margin:0}.archiveSearchPageContent-module_contentLayout__4rj0N{--padding:1rem;--max-width:calc(1200px + (2 * var(--padding)));display:flex;flex-direction:column;height:100%}.archiveSearchPageContent-module_contentLayout__4rj0N>:not(:last-child){margin-bottom:1rem}@media screen and (min-width:768px){.archiveSearchPageContent-module_contentLayout__4rj0N{--padding:1.5rem}}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_customContentContainer__erKWw .archiveSearchPageContent-module_customContentContainerInner__lad7E{box-sizing:border-box;margin:0 auto;max-width:var(--max-width);padding:0 var(--padding);width:100%}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh{background-color:var(--hcrc-color-archive-search-bg,--color-black-5);display:flex;flex-direction:column;padding-top:1.5rem;position:relative}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_koros__HjRLc{fill:var(--color-white);bottom:-24px;position:absolute}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q{box-sizing:border-box;display:flex;flex-direction:column;margin:0 auto;max-width:var(--max-width);padding:0 var(--padding);width:100%;z-index:1}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q h1{font-size:var(--fontsize-heading-xl);font-weight:500;margin-bottom:var(--spacing-m);margin-top:var(--spacing-s)}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q .archiveSearchPageContent-module_tagsContainer__ap7hj{display:flex;flex-direction:column;gap:8px;min-height:16px}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q .archiveSearchPageContent-module_tagsContainer__ap7hj>:last-child .archiveSearchPageContent-module_clearButton__8S3pO{align-items:center;background-color:unset;border:2px solid transparent;border-color:transparent!important;color:var(--color-black-90);display:flex;font-size:var(--fontsize-body-m);font-weight:500;justify-content:center;padding:0;text-align:left}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q .archiveSearchPageContent-module_tagsContainer__ap7hj>:last-child .archiveSearchPageContent-module_clearButton__8S3pO:focus{outline:2px solid var(--color-black-90);outline-offset:.25rem}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q .archiveSearchPageContent-module_tagsContainer__ap7hj>:last-child .archiveSearchPageContent-module_clearButton__8S3pO svg{margin-left:var(--spacing-3-xs)}@media screen and (min-width:992px){.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q .archiveSearchPageContent-module_tagsContainer__ap7hj{align-items:center;column-gap:.75rem;display:grid;grid-template-columns:5fr 1fr}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchFormContainer__EB2sh .archiveSearchPageContent-module_searchFormContainerInner__Ub35q .archiveSearchPageContent-module_tagsContainer__ap7hj>:last-child{align-items:center;display:flex;height:100%;justify-content:center}}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchForm__OEkHX{display:flex;flex-direction:column;padding:1rem 0}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchForm__OEkHX>:not(:last-child){margin-bottom:1.5rem}@media screen and (min-width:768px){.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchForm__OEkHX{padding-top:1rem}}@media screen and (min-width:992px){.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchForm__OEkHX{column-gap:.75rem;display:grid;grid-template-columns:5fr 1fr;row-gap:.75rem}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchForm__OEkHX>:not(:last-child){margin-bottom:unset}}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_inputWithIcon__4rICV{position:relative}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_inputWithIcon__4rICV>div>input{padding-left:calc(2 * 1rem + 1.5rem)!important}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_inputWithIcon__4rICV>div>svg{bottom:1rem;left:1rem;position:absolute}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_inputWithIcon__4rICV>div>svg *{color:var(--color-black-90)}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_hdsTextInputOverrides__6NkiT>div>input{border:none}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_hdsTextInputOverrides__6NkiT>div>input:focus{box-shadow:none!important;outline:3px solid var(--color-coat-of-arms);outline-offset:2px}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_hdsButtonOverrides__pcMkn{background-color:var(--hcrc-color-archive-search-btn);border-color:var(--hcrc-color-archive-search-btn)}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_hdsButtonOverrides__pcMkn:hover{background-color:var(--hcrc-color-archive-search-btn-hover);border-color:var(--hcrc-color-archive-search-btn-hover)}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN{display:flex;flex-direction:column;padding-bottom:6rem}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l{box-sizing:border-box;display:flex;flex-direction:column;margin:0 auto;max-width:var(--max-width);padding:0 var(--padding);width:100%}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_noResultsContainer__n-Vfm{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:var(--padding)}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_noResultsContainer__n-Vfm h1{font-weight:400;margin:.75rem}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_noResultsContainer__n-Vfm p{font-size:var(--fontsize-body-l);margin:0}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_noResultsContainer__n-Vfm svg{height:var(--spacing-3-xl);width:var(--spacing-3-xl)}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_bottomActions__P-wa5{align-items:center;display:flex;flex-direction:column}.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_bottomActions__P-wa5 .archiveSearchPageContent-module_loadMoreButton__--0oS,.archiveSearchPageContent-module_contentLayout__4rj0N .archiveSearchPageContent-module_mainLayout__UJuw4 .archiveSearchPageContent-module_searchResultsContainer__uKfRN .archiveSearchPageContent-module_searchResultsContainerInner__Sx58l .archiveSearchPageContent-module_bottomActions__P-wa5 .archiveSearchPageContent-module_loadingSpinner__pnPYD{margin:1rem}";
|
|
4074
|
+
var styles = {"grid":"archiveSearchPageContent-module_grid__uwVy4","breadcrumbs":"archiveSearchPageContent-module_breadcrumbs__UgoYJ","contentLayout":"archiveSearchPageContent-module_contentLayout__4rj0N","mainLayout":"archiveSearchPageContent-module_mainLayout__UJuw4","customContentContainer":"archiveSearchPageContent-module_customContentContainer__erKWw","customContentContainerInner":"archiveSearchPageContent-module_customContentContainerInner__lad7E","searchFormContainer":"archiveSearchPageContent-module_searchFormContainer__EB2sh","koros":"archiveSearchPageContent-module_koros__HjRLc","searchFormContainerInner":"archiveSearchPageContent-module_searchFormContainerInner__Ub35q","tagsContainer":"archiveSearchPageContent-module_tagsContainer__ap7hj","clearButton":"archiveSearchPageContent-module_clearButton__8S3pO","searchForm":"archiveSearchPageContent-module_searchForm__OEkHX","inputWithIcon":"archiveSearchPageContent-module_inputWithIcon__4rICV","hdsTextInputOverrides":"archiveSearchPageContent-module_hdsTextInputOverrides__6NkiT","hdsButtonOverrides":"archiveSearchPageContent-module_hdsButtonOverrides__pcMkn","searchResultsContainer":"archiveSearchPageContent-module_searchResultsContainer__uKfRN","searchResultsContainerInner":"archiveSearchPageContent-module_searchResultsContainerInner__Sx58l","noResultsContainer":"archiveSearchPageContent-module_noResultsContainer__n-Vfm","bottomActions":"archiveSearchPageContent-module_bottomActions__P-wa5","loadMoreButton":"archiveSearchPageContent-module_loadMoreButton__--0oS","loadingSpinner":"archiveSearchPageContent-module_loadingSpinner__pnPYD"};
|
|
4075
|
+
styleInject(css_248z);
|
|
4076
|
+
|
|
4077
|
+
export { isEventClosed as A, BackgroundImage as B, Card as C, Carousel as D, EventSelectionCollection as E, useResolveImageUrl as F, Grid as G, HtmlToReact as H, Image$1 as I, getTextFromHtml as J, findLanguage as K, Link as L, MAIN_CONTENT_ID as M, Navigation as N, languageSorter as O, PageContext as P, toPrimaryLanguageOption as Q, LANGUAGE_CODE_ORDINAL_NUMBER as R, isNonEmptyLanguage as S, Tag as T, styleInject as U, classNames as a, styles$2 as b, configContext as c, LinkBox as d, styles$1 as e, styles as f, PageMeta as g, PageContentBreadcrumb as h, PageSection as i, useHeadlessCmsLink as j, ModuleItemTypeEnum as k, Notification as l, Page as m, PageContent as n, ContentContainer as o, PageContentLayout as p, PageMainContent as q, PageContextProvider as r, styles$q as s, Collection as t, useConfig as u, EventSearchCollection as v, getEventCollectionCards as w, LocationsSelectionCollection as x, getLocationsCollectionCards as y, getVenueIds as z };
|
|
4078
|
+
//# sourceMappingURL=archiveSearchPageContent.module-DmpLBZP5.js.map
|