@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,24 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-webpack5';
|
|
2
|
+
import { Page } from './page/Page';
|
|
3
|
+
declare const _default: Meta<typeof Page>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const ExampleUsingEventsDataSource: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../core").PageProps & {
|
|
6
|
+
uri?: string;
|
|
7
|
+
pageTemplate?: import("../core").TemplateEnum;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ExampleUsingHobbiesDataSource: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../core").PageProps & {
|
|
10
|
+
uri?: string;
|
|
11
|
+
pageTemplate?: import("../core").TemplateEnum;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const ExampleUsingSportsDataSource: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../core").PageProps & {
|
|
14
|
+
uri?: string;
|
|
15
|
+
pageTemplate?: import("../core").TemplateEnum;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const ExampleUsingKultusDataSource: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../core").PageProps & {
|
|
18
|
+
uri?: string;
|
|
19
|
+
pageTemplate?: import("../core").TemplateEnum;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const ExampleUsingKukkuuDataSource: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../core").PageProps & {
|
|
22
|
+
uri?: string;
|
|
23
|
+
pageTemplate?: import("../core").TemplateEnum;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Navigation } from './navigation/Navigation';
|
|
2
|
+
export { Notification } from './notification/Notification';
|
|
3
|
+
export { Page } from './page/Page';
|
|
4
|
+
export { PageContent } from './pageContent/PageContent';
|
|
5
|
+
export { PageWithTemplateContent } from './pageWithTemplateContent/PageWithTemplateContent';
|
|
6
|
+
export * from '../common/headlessService/page';
|
|
7
|
+
export * from '../common/headlessService/pages';
|
|
8
|
+
export * from '../common/headlessService/article';
|
|
9
|
+
export * from '../common/headlessService/articles';
|
|
10
|
+
export * from '../common/headlessService/category';
|
|
11
|
+
export * from '../common/headlessService/categories';
|
|
12
|
+
export * from '../common/headlessService/tag';
|
|
13
|
+
export * from '../common/headlessService/tags';
|
|
14
|
+
export * from '../common/headlessService/landingPage';
|
|
15
|
+
export * from '../common/headlessService/pageByTemplate';
|
|
16
|
+
export * from '../common/headlessService/menu';
|
|
17
|
+
export * from '../common/headlessService/languages';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NavigationProps as NavigationPropsWithoutData } from '../../core/navigation/Navigation';
|
|
3
|
+
export type NavigationProps = Omit<NavigationPropsWithoutData, 'menu' | 'languages' | 'getPathnameForLanguage'> & {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the menu in Wordpress headless CMS.
|
|
6
|
+
*/
|
|
7
|
+
menuName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Gets language specific path for navigation item.
|
|
10
|
+
*/
|
|
11
|
+
getPathnameForLanguage: NavigationPropsWithoutData['getPathnameForLanguage'];
|
|
12
|
+
};
|
|
13
|
+
export declare function Navigation({ menuName, getPathnameForLanguage, ...delegatedProps }: NavigationProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TemplateEnum } from '../../core';
|
|
3
|
+
import type { PageProps as PagePropsWithoutData } from '../../core/page/Page';
|
|
4
|
+
export type PageProps = PagePropsWithoutData & {
|
|
5
|
+
/**
|
|
6
|
+
* Uri of the page.
|
|
7
|
+
*/
|
|
8
|
+
uri?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Page template value.
|
|
11
|
+
*/
|
|
12
|
+
pageTemplate?: TemplateEnum;
|
|
13
|
+
};
|
|
14
|
+
export declare function Page({ uri, pageTemplate, ...delegatedProps }: PageProps): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TemplateEnum } from '../../core';
|
|
2
|
+
type ApolloPageContext = {
|
|
3
|
+
/**
|
|
4
|
+
* Uri of the page.
|
|
5
|
+
*/
|
|
6
|
+
uri?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Page tyoe template.
|
|
9
|
+
*/
|
|
10
|
+
template?: TemplateEnum;
|
|
11
|
+
};
|
|
12
|
+
declare const apolloPageContext: import("react").Context<ApolloPageContext>;
|
|
13
|
+
export default apolloPageContext;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PageContentProps as PageContentPropsWithoutData } from '../../core/pageContent/types';
|
|
2
|
+
export type PageProps = Omit<PageContentPropsWithoutData, 'page'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Page content if data not found or missing from cms.
|
|
5
|
+
*/
|
|
6
|
+
notFoundPageContent?: JSX.Element;
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export declare function PageContent({ notFoundPageContent, ...delegatedProps }: PageProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PageContentProps as PageContentPropsWithoutData } from '../../core/pageContent/types';
|
|
2
|
+
import type { LanguageCodeEnum } from '../../core';
|
|
3
|
+
export type PageProps = Omit<PageContentPropsWithoutData, 'page'> & {
|
|
4
|
+
/**
|
|
5
|
+
* The language of the page.
|
|
6
|
+
*/
|
|
7
|
+
language: LanguageCodeEnum;
|
|
8
|
+
/**
|
|
9
|
+
* Page content if data not found or missing from cms.
|
|
10
|
+
*/
|
|
11
|
+
notFoundPageContent?: JSX.Element;
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
};
|
|
14
|
+
export declare function PageWithTemplateContent({ language, notFoundPageContent, ...delegatedProps }: PageProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ContainerProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Additional children to render inside the container.
|
|
5
|
+
*/
|
|
6
|
+
children: JSX.Element | string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional wrapper element for the container.
|
|
9
|
+
*/
|
|
10
|
+
wrapper?: JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export default function Container({ wrapper, children }: ContainerProps): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface GridProps {
|
|
3
|
+
/**
|
|
4
|
+
* Additional children to render inside the grid.
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Number of grid columns.
|
|
9
|
+
*/
|
|
10
|
+
colsCount?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Additional classname for grid container.
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export default function Grid({ colsCount, children, className, }: GridProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-webpack5';
|
|
2
|
+
import Grid from './Grid';
|
|
3
|
+
declare const _default: Meta<typeof Grid>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const GridDefault: {
|
|
6
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Grid").GridProps>;
|
|
7
|
+
args: {};
|
|
8
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Config } from 'isomorphic-dompurify';
|
|
3
|
+
export declare const TABLE_VARIANTS: readonly ["dark", "dense", "light", "with-vertical-lines", "zebra"];
|
|
4
|
+
export type TableVariant = (typeof TABLE_VARIANTS)[number];
|
|
5
|
+
export declare const DEFAULT_TABLE_VARIANTS: TableVariant[];
|
|
6
|
+
type Components = {
|
|
7
|
+
p?: React.ComponentType<{
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}>;
|
|
10
|
+
h2?: React.ComponentType<{
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}>;
|
|
13
|
+
a?: React.ComponentType<React.AnchorHTMLAttributes<HTMLAnchorElement>> | string;
|
|
14
|
+
table?: React.ComponentType<React.TableHTMLAttributes<HTMLTableElement>> | string;
|
|
15
|
+
tableVariants?: TableVariant[];
|
|
16
|
+
img?: React.ComponentType<React.ImgHTMLAttributes<HTMLImageElement>> | string;
|
|
17
|
+
iframe?: React.ComponentType<React.IframeHTMLAttributes<HTMLIFrameElement>>;
|
|
18
|
+
};
|
|
19
|
+
export type HtmlToReactProps = {
|
|
20
|
+
/**
|
|
21
|
+
* Additional children to render inside the grid.
|
|
22
|
+
*/
|
|
23
|
+
children: string;
|
|
24
|
+
/**
|
|
25
|
+
* React components for custom html elements transformation.
|
|
26
|
+
*/
|
|
27
|
+
components?: Components;
|
|
28
|
+
/**
|
|
29
|
+
* Option to allow unsafe tags, otherwise cleared and not rendered.
|
|
30
|
+
*/
|
|
31
|
+
allowedUnsafeTags?: Config['ALLOWED_TAGS'];
|
|
32
|
+
/**
|
|
33
|
+
* Trusted origins for url properties and attributes, for elements such as iframes and scripts.
|
|
34
|
+
*/
|
|
35
|
+
trustedOrigins?: string[];
|
|
36
|
+
};
|
|
37
|
+
export declare function HtmlToReact({ children: dirty, components, allowedUnsafeTags, trustedOrigins, }: HtmlToReactProps): React.JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-webpack5';
|
|
2
|
+
import type { HtmlToReactProps } from './HtmlToReact';
|
|
3
|
+
import { HtmlToReact } from './HtmlToReact';
|
|
4
|
+
declare const _default: Meta<typeof HtmlToReact>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const HtmlToReactMedia: {
|
|
7
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, HtmlToReactProps>;
|
|
8
|
+
args: {
|
|
9
|
+
children: string;
|
|
10
|
+
allowedUnsafeTags: string[];
|
|
11
|
+
trustedOrigins: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cjs/src/common/components/htmlToReact/replaceComponents/IframeForEmbeddedMedia.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* An iframe HTML-element to securely render
|
|
4
|
+
* a sandboxed version of an embedded video media player, e.g. from the CMS.
|
|
5
|
+
* */
|
|
6
|
+
export default function IframeForEmbeddedMedia(props: React.PropsWithChildren<React.IframeHTMLAttributes<HTMLIFrameElement>>): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { IconAlertCircle, IconAlertCircleFill, IconAngleDown, IconAngleLeft, IconAngleRight, IconAngleUp, IconArrowBottomLeft, IconArrowBottomRight, IconArrowDown, IconArrowLeft, IconArrowRedo, IconArrowRight, IconArrowRightDashed, IconArrowTopLeft, IconArrowTopRight, IconArrowUndo, IconArrowUp, IconAtSign as IconGlyphAt, // @deprecated Use IconAtSign instead
|
|
2
|
+
IconAtSign, IconBagCogwheel, IconBell, IconBellCrossed, IconBinoculars, IconCake, IconCalendar, IconCalendarClock, IconCalendarCross, IconCalendarEvent as IconEvent, // @deprecated Use IconCalendarEvent instead
|
|
3
|
+
IconCalendarEvent, IconCalendarPlus, IconCalendarRecurring, IconCamera, IconCheck, IconCheckCircle, IconCheckCircleFill, IconChildren, IconClock, IconClockCross, IconClockPlus, IconCoffeeCupSaucer, IconCogwheel, IconCogwheels, IconCollapse, IconCompany, IconCopy, IconCross, IconCrossCircle, IconCrossCircleFill, IconCustomerBotNegative, IconCustomerBotNeutral, IconCustomerBotPositive, IconDiscord, IconDisplay, IconDocument, IconDownload, IconDownloadCloud, IconDrag, IconEntrepreneur, IconEnvelope, IconError, IconErrorFill, IconEuroSign as IconGlyphEuro, // @deprecated Use IconEuroSign instead
|
|
4
|
+
IconEuroSign, IconEye, IconEyeCrossed, IconFacebook, IconFaceNeutral, IconFaceSad, IconFaceSmile, IconFamily, IconGlobe, IconGoogle, IconGraphColumns, IconGroup, IconHammers, IconHeadphones, IconHeart, IconHeartFill, IconHistory, IconHome, IconHomeSmoke, IconInfoCircle, IconInfoCircleFill, IconInstagram, IconKey, IconLayers, IconLightbulb, IconLink, IconLinkedin, IconLinkExternal, IconLocate, IconLocation, IconLock, IconLockOpen, IconMap, IconMenuDots, IconMenuHamburger, IconMicrophone, IconMicrophoneCrossed, IconMinus, IconMinusCircle, IconMinusCircleFill, IconMobile, IconMoneyBag, IconMoneyBagFill, IconMover, IconOccupation, IconPaperclip, IconPen, IconPenLine, IconPersonFemale, IconPersonGenderless, IconPersonMale, IconPersonWheelchair, IconPhone, IconPhoto, IconPhotoPlus, IconPlaybackFastforward, IconPlaybackNext, IconPlaybackPause, IconPlaybackPlay, IconPlaybackPrevious, IconPlaybackRecord, IconPlaybackRewind, IconPlaybackStop, IconPlus, IconPlusCircle, IconPlusCircleFill, IconPodcast, IconPrinter, IconQuestionCircle, IconQuestionCircleFill, IconRefresh, IconRestaurant, IconRss, IconSaveDiskette, IconSaveDisketteFill, IconScroll, IconScrollCogwheel, IconScrollContent, IconScrollGroup, IconSearch, IconSenior, IconShare, IconShield, IconShoppingCart, IconSignin, IconSignout, IconSitemap, IconSliders, IconSnapchat, IconSort, IconSortAlphabeticalAscending, IconSortAlphabeticalDescending, IconSortAscending, IconSortDescending, IconSpeechbubble, IconSpeechbubbleText, IconStar, IconStarFill, IconSwapUser, IconTextBold, IconTextItalic, IconTextTool, IconThumbsDown, IconThumbsDownFill, IconThumbsUp, IconThumbsUpFill, IconTicket, IconTiktok, IconTrash, IconTraveler, IconTwitch, IconTwitter, IconUpload, IconUploadCloud, IconUser, IconVaccine, IconVideocamera, IconVideocameraCrossed, IconVimeo, IconVirus, IconVolumeHigh, IconVolumeLow, IconVolumeMinus, IconVolumeMute, IconVolumePlus, IconWhatsapp as IconWhatsApp, // @deprecated Use IconWhatsapp instead
|
|
5
|
+
IconWhatsapp, IconWifi, IconWifiCrossed, IconX, IconYle, IconYouth, IconYoutube, IconZoomIn, IconZoomOut, IconZoomText, } from 'hds-react';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ListProps = {
|
|
3
|
+
/**
|
|
4
|
+
* List item elements.
|
|
5
|
+
*/
|
|
6
|
+
items?: (JSX.Element | JSX.Element[] | null | false)[];
|
|
7
|
+
/**
|
|
8
|
+
* List item variant options.
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'spacing-4-xs' | 'spacing-3-xs' | 'spacing-2-xs' | 'spacing-xs' | 'spacing-s' | 'spacing-m' | 'spacing-l' | 'spacing-xl' | 'spacing-2-xl' | 'spacing-3-xl' | 'spacing-4-xl' | 'spacing-5-xl' | 'spacing-layout-2-xs' | 'spacing-layout-xs' | 'spacing-layout-s' | 'spacing-layout-m' | 'spacing-layout-l' | 'spacing-layout-xl' | 'spacing-layout-2-xl';
|
|
11
|
+
};
|
|
12
|
+
export default function List({ items, variant }: ListProps): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-webpack5';
|
|
2
|
+
import List from './List';
|
|
3
|
+
declare const _default: Meta<typeof List>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const ListDefault: {
|
|
6
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
7
|
+
items?: (JSX.Element | JSX.Element[] | null | false)[];
|
|
8
|
+
variant?: "spacing-4-xs" | "spacing-3-xs" | "spacing-2-xs" | "spacing-xs" | "spacing-s" | "spacing-m" | "spacing-l" | "spacing-xl" | "spacing-2-xl" | "spacing-3-xl" | "spacing-4-xl" | "spacing-5-xl" | "spacing-layout-2-xs" | "spacing-layout-xs" | "spacing-layout-s" | "spacing-layout-m" | "spacing-layout-l" | "spacing-layout-xl" | "spacing-layout-2-xl";
|
|
9
|
+
}>;
|
|
10
|
+
args: {
|
|
11
|
+
items: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { TagProps as HDSTagProps } from 'hds-react';
|
|
3
|
+
type Props = {
|
|
4
|
+
/**
|
|
5
|
+
* Boolean indicating whether the tag has a featured style variant.
|
|
6
|
+
*/
|
|
7
|
+
featured?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Boolean indicating whether the tag has a white-only style variant.
|
|
10
|
+
*/
|
|
11
|
+
whiteOnly?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Boolean indicating whether the tag has a selected style variant.
|
|
14
|
+
*/
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* White-space wrapping (Enabled by default in HDS v4, but disabled in this lib).
|
|
18
|
+
*/
|
|
19
|
+
noTextWrap?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* onClick handler.
|
|
22
|
+
*/
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
} & Pick<HDSTagProps, 'children' | 'className' | 'id' | 'role' | 'size'>;
|
|
25
|
+
export declare function Tag({ className, children, featured, selected, whiteOnly, noTextWrap, onClick, id, ...hdsTagProps }: Props): React.JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-webpack5';
|
|
2
|
+
import { Tag } from './Tag';
|
|
3
|
+
declare const _default: Meta<typeof Tag>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TagDefault: {
|
|
6
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
7
|
+
featured?: boolean;
|
|
8
|
+
whiteOnly?: boolean;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
noTextWrap?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
} & Pick<import("hds-react").TagProps, "id" | "children" | "className" | "role" | "size">>;
|
|
13
|
+
args: {
|
|
14
|
+
onClick: undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const TagFeatured: {
|
|
18
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
19
|
+
featured?: boolean;
|
|
20
|
+
whiteOnly?: boolean;
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
noTextWrap?: boolean;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
} & Pick<import("hds-react").TagProps, "id" | "children" | "className" | "role" | "size">>;
|
|
25
|
+
args: {
|
|
26
|
+
featured: boolean;
|
|
27
|
+
onClick: undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const TagSelected: {
|
|
31
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
32
|
+
featured?: boolean;
|
|
33
|
+
whiteOnly?: boolean;
|
|
34
|
+
selected?: boolean;
|
|
35
|
+
noTextWrap?: boolean;
|
|
36
|
+
onClick?: () => void;
|
|
37
|
+
} & Pick<import("hds-react").TagProps, "id" | "children" | "className" | "role" | "size">>;
|
|
38
|
+
args: {
|
|
39
|
+
selected: boolean;
|
|
40
|
+
onClick: undefined;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const TagWhiteOnly: {
|
|
44
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
45
|
+
featured?: boolean;
|
|
46
|
+
whiteOnly?: boolean;
|
|
47
|
+
selected?: boolean;
|
|
48
|
+
noTextWrap?: boolean;
|
|
49
|
+
onClick?: () => void;
|
|
50
|
+
} & Pick<import("hds-react").TagProps, "id" | "children" | "className" | "role" | "size">>;
|
|
51
|
+
args: {
|
|
52
|
+
whiteOnly: boolean;
|
|
53
|
+
onClick: undefined;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export declare const TagNoTextWrap: {
|
|
57
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
58
|
+
featured?: boolean;
|
|
59
|
+
whiteOnly?: boolean;
|
|
60
|
+
selected?: boolean;
|
|
61
|
+
noTextWrap?: boolean;
|
|
62
|
+
onClick?: () => void;
|
|
63
|
+
} & Pick<import("hds-react").TagProps, "id" | "children" | "className" | "role" | "size">>;
|
|
64
|
+
args: {
|
|
65
|
+
noTextWrap: boolean;
|
|
66
|
+
onClick: undefined;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export declare const TagWithOnclickHandler: {
|
|
70
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
71
|
+
featured?: boolean;
|
|
72
|
+
whiteOnly?: boolean;
|
|
73
|
+
selected?: boolean;
|
|
74
|
+
noTextWrap?: boolean;
|
|
75
|
+
onClick?: () => void;
|
|
76
|
+
} & Pick<import("hds-react").TagProps, "id" | "children" | "className" | "role" | "size">>;
|
|
77
|
+
args: {
|
|
78
|
+
onClick: () => void;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'body' | 'body-l' | 'body-xl';
|
|
4
|
+
type TextVariantProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The render html element type for the text.
|
|
7
|
+
*/
|
|
8
|
+
as?: string | React.ComponentType<HTMLAttributes<HTMLElement>>;
|
|
9
|
+
/**
|
|
10
|
+
* Text variant option.
|
|
11
|
+
*/
|
|
12
|
+
variant?: TextVariant;
|
|
13
|
+
/**
|
|
14
|
+
* Additional classname for the text.
|
|
15
|
+
*/
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Additional classname for the text.
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Deprecated
|
|
23
|
+
*/
|
|
24
|
+
role?: string;
|
|
25
|
+
};
|
|
26
|
+
declare function Text({ as: elementType, variant, children, className, ...rest }: TextVariantProps): React.ReactElement<HTMLAttributes<HTMLElement>, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
export default Text;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react-webpack5';
|
|
3
|
+
import Text from './Text';
|
|
4
|
+
declare const _default: Meta<typeof Text>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TextDefault: {
|
|
7
|
+
render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
8
|
+
as?: string | React.ComponentType<React.HTMLAttributes<HTMLElement>>;
|
|
9
|
+
variant?: "body" | "h1" | "h2" | "h3" | "h4" | "h5" | "body-l" | "body-xl";
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
role?: string;
|
|
13
|
+
}>;
|
|
14
|
+
};
|