@prezly/theme-kit-nextjs 4.1.0 → 4.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -0
- package/build/cjs/adapter-nextjs/api-handlers/fetchStories.js.map +1 -0
- package/build/cjs/adapter-nextjs/api-handlers/index.js.map +1 -0
- package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -0
- package/build/cjs/adapter-nextjs/getNewsroomStaticProps.js.map +1 -0
- package/build/cjs/adapter-nextjs/index.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/category.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/gallery.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/galleryAlbum.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/home.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/index.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/lib/types.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/search.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/sitemap/types.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/story.js.map +1 -0
- package/build/cjs/adapter-nextjs/page-props/storyPreview.js.map +1 -0
- package/build/cjs/adapter-nextjs/processRequest.js.map +1 -0
- package/build/cjs/adapter-nextjs/processStaticRequest.js.map +1 -0
- package/build/cjs/components-nextjs/PageSeo/PageSeo.js.map +1 -0
- package/build/cjs/components-nextjs/PageSeo/index.js.map +1 -0
- package/build/cjs/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -0
- package/build/cjs/components-nextjs/PageSeo/lib/index.js.map +1 -0
- package/build/cjs/components-nextjs/StorySeo/StorySeo.js.map +1 -0
- package/build/cjs/components-nextjs/StorySeo/index.js.map +1 -0
- package/build/cjs/components-nextjs/document.js.map +1 -0
- package/build/cjs/components-nextjs/index.js.map +1 -0
- package/build/cjs/data-fetching/NextPrezlyApi.js.map +1 -0
- package/build/cjs/data-fetching/getNextPrezlyApi.js.map +1 -0
- package/build/cjs/data-fetching/index.js.map +1 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/infinite-loading/index.js.map +1 -0
- package/build/cjs/infinite-loading/types.js.map +1 -0
- package/build/cjs/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -0
- package/build/cjs/infinite-loading/useInfiniteLoading.js.map +1 -0
- package/build/cjs/infinite-loading/useInfiniteStoriesLoading.js.map +1 -0
- package/build/cjs/intl/index.js.map +1 -0
- package/build/cjs/intl/languages.js.map +1 -0
- package/build/cjs/intl/locale.js.map +1 -0
- package/build/cjs/newsroom-context/context.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/index.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useCategories.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useCompanyInformation.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useCurrentCategory.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useCurrentLocale.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useCurrentStory.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useLanguages.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useNewsroom.js.map +1 -0
- package/build/cjs/newsroom-context/hooks/useNewsroomContext.js.map +1 -0
- package/build/cjs/newsroom-context/index.js.map +1 -0
- package/build/cjs/sentry/client.js.map +1 -0
- package/build/cjs/sentry/common.js.map +1 -0
- package/build/cjs/sentry/index.js.map +1 -0
- package/build/cjs/sentry/server.js.map +1 -0
- package/build/{infinite-loading → cjs}/types.js.map +1 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js +19 -0
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -0
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js +29 -0
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js.map +1 -0
- package/build/esm/adapter-nextjs/api-handlers/index.js +3 -0
- package/build/esm/adapter-nextjs/api-handlers/index.js.map +1 -0
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js +15 -0
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -0
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js +15 -0
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js.map +1 -0
- package/build/esm/adapter-nextjs/index.js +7 -0
- package/build/esm/adapter-nextjs/index.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/category.js +97 -0
- package/build/esm/adapter-nextjs/page-props/category.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/gallery.js +66 -0
- package/build/esm/adapter-nextjs/page-props/gallery.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +49 -0
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/home.js +70 -0
- package/build/esm/adapter-nextjs/page-props/home.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/index.js +9 -0
- package/build/esm/adapter-nextjs/page-props/index.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/lib/types.js +2 -0
- package/build/esm/adapter-nextjs/page-props/lib/types.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/search.js +27 -0
- package/build/esm/adapter-nextjs/page-props/search.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +47 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js +15 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +32 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js +5 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/types.js +2 -0
- package/build/esm/adapter-nextjs/page-props/sitemap/types.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/story.js +63 -0
- package/build/esm/adapter-nextjs/page-props/story.js.map +1 -0
- package/build/esm/adapter-nextjs/page-props/storyPreview.js +22 -0
- package/build/esm/adapter-nextjs/page-props/storyPreview.js.map +1 -0
- package/build/esm/adapter-nextjs/processRequest.js +33 -0
- package/build/esm/adapter-nextjs/processRequest.js.map +1 -0
- package/build/esm/adapter-nextjs/processStaticRequest.js +22 -0
- package/build/esm/adapter-nextjs/processStaticRequest.js.map +1 -0
- package/build/esm/components-nextjs/PageSeo/PageSeo.js +77 -0
- package/build/esm/components-nextjs/PageSeo/PageSeo.js.map +1 -0
- package/build/esm/components-nextjs/PageSeo/index.js +2 -0
- package/build/esm/components-nextjs/PageSeo/index.js.map +1 -0
- package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +7 -0
- package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -0
- package/build/esm/components-nextjs/PageSeo/lib/index.js +2 -0
- package/build/esm/components-nextjs/PageSeo/lib/index.js.map +1 -0
- package/build/esm/components-nextjs/StorySeo/StorySeo.js +52 -0
- package/build/esm/components-nextjs/StorySeo/StorySeo.js.map +1 -0
- package/build/esm/components-nextjs/StorySeo/index.js +2 -0
- package/build/esm/components-nextjs/StorySeo/index.js.map +1 -0
- package/build/esm/components-nextjs/document.js +21 -0
- package/build/esm/components-nextjs/document.js.map +1 -0
- package/build/esm/components-nextjs/index.js +4 -0
- package/build/esm/components-nextjs/index.js.map +1 -0
- package/build/esm/data-fetching/NextPrezlyApi.js +36 -0
- package/build/esm/data-fetching/NextPrezlyApi.js.map +1 -0
- package/build/esm/data-fetching/getNextPrezlyApi.js +17 -0
- package/build/esm/data-fetching/getNextPrezlyApi.js.map +1 -0
- package/build/esm/data-fetching/index.js +2 -0
- package/build/esm/data-fetching/index.js.map +1 -0
- package/build/esm/index.js +9 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/infinite-loading/index.js +5 -0
- package/build/esm/infinite-loading/index.js.map +1 -0
- package/build/esm/infinite-loading/types.js +2 -0
- package/build/esm/infinite-loading/types.js.map +1 -0
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js +41 -0
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -0
- package/build/esm/infinite-loading/useInfiniteLoading.js +40 -0
- package/build/esm/infinite-loading/useInfiniteLoading.js.map +1 -0
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +58 -0
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js.map +1 -0
- package/build/esm/intl/index.js +3 -0
- package/build/esm/intl/index.js.map +1 -0
- package/build/esm/intl/languages.js +26 -0
- package/build/esm/intl/languages.js.map +1 -0
- package/build/esm/intl/locale.js +25 -0
- package/build/esm/intl/locale.js.map +1 -0
- package/build/esm/newsroom-context/context.js +25 -0
- package/build/esm/newsroom-context/context.js.map +1 -0
- package/build/esm/newsroom-context/hooks/index.js +12 -0
- package/build/esm/newsroom-context/hooks/index.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js +6 -0
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useCategories.js +6 -0
- package/build/esm/newsroom-context/hooks/useCategories.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js +6 -0
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js +6 -0
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js +6 -0
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useCurrentStory.js +6 -0
- package/build/esm/newsroom-context/hooks/useCurrentStory.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js +25 -0
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js +71 -0
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useLanguages.js +6 -0
- package/build/esm/newsroom-context/hooks/useLanguages.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useNewsroom.js +6 -0
- package/build/esm/newsroom-context/hooks/useNewsroom.js.map +1 -0
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js +12 -0
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js.map +1 -0
- package/build/esm/newsroom-context/index.js +3 -0
- package/build/esm/newsroom-context/index.js.map +1 -0
- package/build/esm/sentry/client.js +5 -0
- package/build/esm/sentry/client.js.map +1 -0
- package/build/esm/sentry/common.js +62 -0
- package/build/{sentry → esm/sentry}/common.js.map +1 -1
- package/build/esm/sentry/index.js +3 -0
- package/build/esm/sentry/index.js.map +1 -0
- package/build/esm/sentry/server.js +5 -0
- package/build/esm/sentry/server.js.map +1 -0
- package/build/esm/types.js +2 -0
- package/build/esm/types.js.map +1 -0
- package/build/tsconfig.cjs.tsbuildinfo +1 -0
- package/build/tsconfig.esm.tsbuildinfo +1 -0
- package/build/types/adapter-nextjs/api-handlers/fetchGalleries.d.ts +2 -0
- package/build/types/adapter-nextjs/api-handlers/fetchStories.d.ts +2 -0
- package/build/types/adapter-nextjs/api-handlers/index.d.ts +2 -0
- package/build/types/adapter-nextjs/getNewsroomServerSideProps.d.ts +15 -0
- package/build/types/adapter-nextjs/getNewsroomStaticProps.d.ts +15 -0
- package/build/types/adapter-nextjs/index.d.ts +6 -0
- package/build/types/adapter-nextjs/page-props/category.d.ts +16 -0
- package/build/types/adapter-nextjs/page-props/gallery.d.ts +14 -0
- package/build/types/adapter-nextjs/page-props/galleryAlbum.d.ts +9 -0
- package/build/types/adapter-nextjs/page-props/home.d.ts +22 -0
- package/build/types/adapter-nextjs/page-props/index.d.ts +8 -0
- package/build/types/adapter-nextjs/page-props/lib/types.d.ts +3 -0
- package/build/types/adapter-nextjs/page-props/search.d.ts +4 -0
- package/build/types/adapter-nextjs/page-props/sitemap/SitemapBuilder.d.ts +11 -0
- package/build/types/adapter-nextjs/page-props/sitemap/createPaths.d.ts +2 -0
- package/build/types/adapter-nextjs/page-props/sitemap/getServerSideProps.d.ts +7 -0
- package/build/types/adapter-nextjs/page-props/sitemap/index.d.ts +4 -0
- package/build/types/adapter-nextjs/page-props/sitemap/types.d.ts +5 -0
- package/build/types/adapter-nextjs/page-props/story.d.ts +14 -0
- package/build/types/adapter-nextjs/page-props/storyPreview.d.ts +3 -0
- package/build/types/adapter-nextjs/processRequest.d.ts +12 -0
- package/build/types/adapter-nextjs/processStaticRequest.d.ts +11 -0
- package/build/types/components-nextjs/PageSeo/PageSeo.d.ts +12 -0
- package/build/types/components-nextjs/PageSeo/index.d.ts +1 -0
- package/build/types/components-nextjs/PageSeo/lib/getAbsoluteUrl.d.ts +1 -0
- package/build/types/components-nextjs/PageSeo/lib/index.d.ts +1 -0
- package/build/types/components-nextjs/StorySeo/StorySeo.d.ts +12 -0
- package/build/types/components-nextjs/StorySeo/index.d.ts +1 -0
- package/build/types/components-nextjs/document.d.ts +6 -0
- package/build/types/components-nextjs/index.d.ts +3 -0
- package/build/types/data-fetching/NextPrezlyApi.d.ts +8 -0
- package/build/types/data-fetching/getNextPrezlyApi.d.ts +4 -0
- package/build/types/data-fetching/index.d.ts +1 -0
- package/build/types/index.d.ts +8 -0
- package/build/types/infinite-loading/index.d.ts +4 -0
- package/build/types/infinite-loading/types.d.ts +9 -0
- package/build/types/infinite-loading/useInfiniteGalleriesLoading.d.ts +13 -0
- package/build/types/infinite-loading/useInfiniteLoading.d.ts +16 -0
- package/build/types/infinite-loading/useInfiniteStoriesLoading.d.ts +13 -0
- package/build/types/intl/index.d.ts +2 -0
- package/build/types/intl/languages.d.ts +6 -0
- package/build/types/intl/locale.d.ts +5 -0
- package/build/types/newsroom-context/context.d.ts +62 -0
- package/build/types/newsroom-context/hooks/index.d.ts +11 -0
- package/build/types/newsroom-context/hooks/useAlgoliaSettings.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useCategories.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useCompanyInformation.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useCurrentCategory.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useCurrentLocale.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useCurrentStory.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useGetLinkLocaleSlug.d.ts +2 -0
- package/build/types/newsroom-context/hooks/useGetTranslationUrl.d.ts +6 -0
- package/build/types/newsroom-context/hooks/useLanguages.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useNewsroom.d.ts +1 -0
- package/build/types/newsroom-context/hooks/useNewsroomContext.d.ts +2 -0
- package/build/types/newsroom-context/index.d.ts +2 -0
- package/build/types/sentry/client.d.ts +2 -0
- package/build/types/sentry/common.d.ts +2 -0
- package/build/types/sentry/index.d.ts +2 -0
- package/build/types/sentry/server.d.ts +2 -0
- package/build/types/types.d.ts +14 -0
- package/package.json +13 -6
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
- package/build/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
- package/build/adapter-nextjs/api-handlers/index.js.map +0 -1
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
- package/build/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
- package/build/adapter-nextjs/index.js.map +0 -1
- package/build/adapter-nextjs/page-props/category.js.map +0 -1
- package/build/adapter-nextjs/page-props/gallery.js.map +0 -1
- package/build/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
- package/build/adapter-nextjs/page-props/home.js.map +0 -1
- package/build/adapter-nextjs/page-props/index.js.map +0 -1
- package/build/adapter-nextjs/page-props/lib/types.js.map +0 -1
- package/build/adapter-nextjs/page-props/search.js.map +0 -1
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
- package/build/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
- package/build/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
- package/build/adapter-nextjs/page-props/story.js.map +0 -1
- package/build/adapter-nextjs/page-props/storyPreview.js.map +0 -1
- package/build/adapter-nextjs/processRequest.js.map +0 -1
- package/build/adapter-nextjs/processStaticRequest.js.map +0 -1
- package/build/components-nextjs/PageSeo/PageSeo.js.map +0 -1
- package/build/components-nextjs/PageSeo/index.js.map +0 -1
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
- package/build/components-nextjs/PageSeo/lib/index.js.map +0 -1
- package/build/components-nextjs/StorySeo/StorySeo.js.map +0 -1
- package/build/components-nextjs/StorySeo/index.js.map +0 -1
- package/build/components-nextjs/document.js.map +0 -1
- package/build/components-nextjs/index.js.map +0 -1
- package/build/data-fetching/NextPrezlyApi.js.map +0 -1
- package/build/data-fetching/getNextPrezlyApi.js.map +0 -1
- package/build/data-fetching/index.js.map +0 -1
- package/build/index.js.map +0 -1
- package/build/infinite-loading/index.js.map +0 -1
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
- package/build/infinite-loading/useInfiniteLoading.js.map +0 -1
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
- package/build/intl/index.js.map +0 -1
- package/build/intl/languages.js.map +0 -1
- package/build/intl/locale.js.map +0 -1
- package/build/newsroom-context/context.js.map +0 -1
- package/build/newsroom-context/hooks/index.js.map +0 -1
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
- package/build/newsroom-context/hooks/useCategories.js.map +0 -1
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
- package/build/newsroom-context/hooks/useCurrentStory.js.map +0 -1
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
- package/build/newsroom-context/hooks/useLanguages.js.map +0 -1
- package/build/newsroom-context/hooks/useNewsroom.js.map +0 -1
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
- package/build/newsroom-context/index.js.map +0 -1
- package/build/sentry/client.js.map +0 -1
- package/build/sentry/index.js.map +0 -1
- package/build/sentry/server.js.map +0 -1
- package/build/types.js.map +0 -1
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/api-handlers/fetchGalleries.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/api-handlers/fetchGalleries.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/api-handlers/fetchStories.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/api-handlers/fetchStories.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/api-handlers/index.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/api-handlers/index.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/getNewsroomServerSideProps.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/getNewsroomServerSideProps.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/getNewsroomStaticProps.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/getNewsroomStaticProps.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/index.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/index.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/category.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/category.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/gallery.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/gallery.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/galleryAlbum.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/galleryAlbum.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/home.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/home.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/index.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/index.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/lib/types.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/lib/types.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/search.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/search.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/SitemapBuilder.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/SitemapBuilder.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/createPaths.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/createPaths.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/getServerSideProps.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/getServerSideProps.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/index.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/index.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/types.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/sitemap/types.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/story.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/story.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/storyPreview.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/page-props/storyPreview.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/processRequest.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/processRequest.js +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/processStaticRequest.d.ts +0 -0
- /package/build/{adapter-nextjs → cjs/adapter-nextjs}/processStaticRequest.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/PageSeo.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/PageSeo.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/index.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/index.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/lib/getAbsoluteUrl.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/lib/getAbsoluteUrl.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/lib/index.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/PageSeo/lib/index.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/StorySeo/StorySeo.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/StorySeo/StorySeo.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/StorySeo/index.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/StorySeo/index.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/document.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/document.js +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/index.d.ts +0 -0
- /package/build/{components-nextjs → cjs/components-nextjs}/index.js +0 -0
- /package/build/{data-fetching → cjs/data-fetching}/NextPrezlyApi.d.ts +0 -0
- /package/build/{data-fetching → cjs/data-fetching}/NextPrezlyApi.js +0 -0
- /package/build/{data-fetching → cjs/data-fetching}/getNextPrezlyApi.d.ts +0 -0
- /package/build/{data-fetching → cjs/data-fetching}/getNextPrezlyApi.js +0 -0
- /package/build/{data-fetching → cjs/data-fetching}/index.d.ts +0 -0
- /package/build/{data-fetching → cjs/data-fetching}/index.js +0 -0
- /package/build/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/build/{index.js → cjs/index.js} +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/index.d.ts +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/index.js +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/types.d.ts +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/types.js +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/useInfiniteGalleriesLoading.d.ts +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/useInfiniteGalleriesLoading.js +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/useInfiniteLoading.d.ts +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/useInfiniteLoading.js +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/useInfiniteStoriesLoading.d.ts +0 -0
- /package/build/{infinite-loading → cjs/infinite-loading}/useInfiniteStoriesLoading.js +0 -0
- /package/build/{intl → cjs/intl}/index.d.ts +0 -0
- /package/build/{intl → cjs/intl}/index.js +0 -0
- /package/build/{intl → cjs/intl}/languages.d.ts +0 -0
- /package/build/{intl → cjs/intl}/languages.js +0 -0
- /package/build/{intl → cjs/intl}/locale.d.ts +0 -0
- /package/build/{intl → cjs/intl}/locale.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/context.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/context.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/index.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/index.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useAlgoliaSettings.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useAlgoliaSettings.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCategories.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCategories.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCompanyInformation.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCompanyInformation.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCurrentCategory.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCurrentCategory.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCurrentLocale.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCurrentLocale.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCurrentStory.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useCurrentStory.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useGetLinkLocaleSlug.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useGetLinkLocaleSlug.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useGetTranslationUrl.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useGetTranslationUrl.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useLanguages.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useLanguages.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useNewsroom.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useNewsroom.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useNewsroomContext.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/hooks/useNewsroomContext.js +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/index.d.ts +0 -0
- /package/build/{newsroom-context → cjs/newsroom-context}/index.js +0 -0
- /package/build/{sentry → cjs/sentry}/client.d.ts +0 -0
- /package/build/{sentry → cjs/sentry}/client.js +0 -0
- /package/build/{sentry → cjs/sentry}/common.d.ts +0 -0
- /package/build/{sentry → cjs/sentry}/common.js +0 -0
- /package/build/{sentry → cjs/sentry}/index.d.ts +0 -0
- /package/build/{sentry → cjs/sentry}/index.js +0 -0
- /package/build/{sentry → cjs/sentry}/server.d.ts +0 -0
- /package/build/{sentry → cjs/sentry}/server.js +0 -0
- /package/build/{types.d.ts → cjs/types.d.ts} +0 -0
- /package/build/{types.js → cjs/types.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageSeo.js","sourceRoot":"","sources":["../../../../src/components-nextjs/PageSeo/PageSeo.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,SAAS,EAA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AAE,QAAQ;YACnB,GAAG,SAAS;SACf,EACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,GAAG,OAAO;SACb,EACD,kBAAkB,EAAE;YAChB,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE;YAC3C,IAAI,CAAC,yBAAyB,IAAI;gBAC9B,IAAI,EAAE,0BAA0B;gBAChC,OAAO,EAAE,IAAI,CAAC,yBAAyB;aAC1C;SACJ,CAAC,MAAM,CAAC,CAAC,GAAG,EAA6C,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAC1E,kBAAkB,EAAE;YAChB;gBACI,GAAG,EAAE,WAAW;gBAChB,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC;aAC1C;SACJ,EACD,kBAAkB,EAAE,sBAAsB,KACtC,YAAY,GAClB,CACL,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components-nextjs/PageSeo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Returns absolute URL based on the path and without any query parameters
|
|
2
|
+
export function getAbsoluteUrl(path, origin, localeCode) {
|
|
3
|
+
const url = new URL(`${localeCode ? `/${localeCode}` : ''}${path || '/'}`, origin);
|
|
4
|
+
url.search = '';
|
|
5
|
+
return url.toString();
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=getAbsoluteUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAbsoluteUrl.js","sourceRoot":"","sources":["../../../../../src/components-nextjs/PageSeo/lib/getAbsoluteUrl.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,MAAc,EAAE,UAA2B;IACpF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,IAAI,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;IACnF,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAEhB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components-nextjs/PageSeo/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Story } from '@prezly/sdk';
|
|
3
|
+
import { ArticleJsonLd, NextSeo } from 'next-seo';
|
|
4
|
+
/**
|
|
5
|
+
* This components provides additional page attributes for the Story page.
|
|
6
|
+
* It works in conjunction with `PageSeo` component, overidding some of its attributes.
|
|
7
|
+
*/
|
|
8
|
+
export function StorySeo({ story, noindex }) {
|
|
9
|
+
const { title, subtitle, published_at, updated_at, author, oembed, newsroom, summary } = story;
|
|
10
|
+
const authorName = author?.display_name || author?.email || 'Unknown';
|
|
11
|
+
const seoTitle = story.seo_settings.meta_title || story.seo_settings.default_meta_title || title;
|
|
12
|
+
const seoDescription = story.seo_settings.meta_description ||
|
|
13
|
+
story.seo_settings.default_meta_description ||
|
|
14
|
+
subtitle ||
|
|
15
|
+
summary;
|
|
16
|
+
const canonical = story.seo_settings.canonical_url || oembed.url;
|
|
17
|
+
const indexable = newsroom.is_indexable && story.visibility === Story.Visibility.PUBLIC;
|
|
18
|
+
return (_jsxs(_Fragment, { children: [_jsx(NextSeo, { title: seoTitle, description: seoDescription, canonical: canonical, noindex: noindex ?? !indexable, nofollow: noindex ?? !indexable, openGraph: {
|
|
19
|
+
title,
|
|
20
|
+
description: seoDescription,
|
|
21
|
+
url: oembed.url,
|
|
22
|
+
site_name: newsroom.display_name,
|
|
23
|
+
type: 'article',
|
|
24
|
+
article: {
|
|
25
|
+
publishedTime: published_at || undefined,
|
|
26
|
+
modifiedTime: updated_at,
|
|
27
|
+
authors: [authorName],
|
|
28
|
+
},
|
|
29
|
+
...(oembed.thumbnail_url && {
|
|
30
|
+
images: [
|
|
31
|
+
{
|
|
32
|
+
url: oembed.thumbnail_url,
|
|
33
|
+
alt: oembed.title,
|
|
34
|
+
width: oembed.thumbnail_width,
|
|
35
|
+
height: oembed.thumbnail_height,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}),
|
|
39
|
+
}, additionalMetaTags: oembed.thumbnail_url
|
|
40
|
+
? [
|
|
41
|
+
{ name: 'twitter:card', content: 'summary_large_image' },
|
|
42
|
+
{ name: 'twitter:image', content: oembed.thumbnail_url },
|
|
43
|
+
]
|
|
44
|
+
: undefined, additionalLinkTags: [
|
|
45
|
+
{
|
|
46
|
+
rel: 'alternate',
|
|
47
|
+
type: 'application/json',
|
|
48
|
+
href: `${oembed.url}.json`,
|
|
49
|
+
},
|
|
50
|
+
] }), _jsx(ArticleJsonLd, { url: oembed.url, title: title, images: oembed.thumbnail_url ? [oembed.thumbnail_url] : [], datePublished: published_at || '', dateModified: updated_at, authorName: [authorName], publisherName: newsroom.display_name, publisherLogo: newsroom.thumbnail_url, description: seoDescription })] }));
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=StorySeo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorySeo.js","sourceRoot":"","sources":["../../../../src/components-nextjs/StorySeo/StorySeo.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,M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
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_LOCALE, getLocaleDirection, LocaleObject } from '@prezly/theme-kit-core';
|
|
3
|
+
import Document, { Head, Html, Main, NextScript } from 'next/document';
|
|
4
|
+
export class PrezlyThemeDocument extends Document {
|
|
5
|
+
getLocaleCode() {
|
|
6
|
+
const { newsroomContextProps,
|
|
7
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
8
|
+
} = this.props.__NEXT_DATA__.props.pageProps;
|
|
9
|
+
// In some cases (like server errors) the newsroom context props will not be loaded.
|
|
10
|
+
// We need to fall back to default locale to keep the app working.
|
|
11
|
+
const { localeCode } = newsroomContextProps ?? { localeCode: DEFAULT_LOCALE };
|
|
12
|
+
return localeCode;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const locale = LocaleObject.fromAnyCode(this.getLocaleCode());
|
|
16
|
+
// TODO: The direction can be pulled from the Language object
|
|
17
|
+
const direction = getLocaleDirection(locale);
|
|
18
|
+
return (_jsxs(Html, { lang: locale.toHyphenCode(), dir: direction, children: [_jsx(Head, { children: _jsx("meta", { name: "og:locale", content: locale.toHyphenCode() }) }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/components-nextjs/document.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIvE,MAAM,OAAO,mBAAoB,SAAQ,QAAQ;IAC7C,aAAa;QACT,MAAM,EACF,oBAAoB;QACpB,gDAAgD;UACnD,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,SAAsB,CAAC;QAE1D,oFAAoF;QACpF,kEAAkE;QAClE,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;QAE9E,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,MAAM;QACF,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC9D,6DAA6D;QAC7D,MAAM,SAAS,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAE7C,OAAO,CACH,MAAC,IAAI,IAAC,IAAI,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,GAAG,EAAE,SAAS,aAC7C,KAAC,IAAI,cACD,eAAM,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,GAAI,GACtD,EACP,2BACI,KAAC,IAAI,KAAG,EACR,KAAC,UAAU,KAAG,IACX,IACJ,CACV,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components-nextjs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getAlgoliaSettings, getCompanyInformation, getDefaultLanguage, getLanguageFromStory, getNotifications, LocaleObject, PrezlyApi, } from '@prezly/theme-kit-core';
|
|
2
|
+
import { getLanguageFromNextLocaleIsoCode } from '../intl';
|
|
3
|
+
export class NextPrezlyApi extends PrezlyApi {
|
|
4
|
+
async getNewsroomServerSideProps(request, nextLocaleIsoCode, story) {
|
|
5
|
+
const [newsroom, languages, categories, themePreset] = await Promise.all([
|
|
6
|
+
this.getNewsroom(),
|
|
7
|
+
this.getNewsroomLanguages(),
|
|
8
|
+
this.getCategories(),
|
|
9
|
+
this.getThemePreset(),
|
|
10
|
+
]);
|
|
11
|
+
const currentLanguage = story
|
|
12
|
+
? getLanguageFromStory(languages, story)
|
|
13
|
+
: getLanguageFromNextLocaleIsoCode(languages, nextLocaleIsoCode);
|
|
14
|
+
const defaultLanguage = getDefaultLanguage(languages);
|
|
15
|
+
const { code: localeCode } = currentLanguage || defaultLanguage;
|
|
16
|
+
const locale = LocaleObject.fromAnyCode(localeCode);
|
|
17
|
+
// TODO: if no information given for current language, show boilerplate from default language
|
|
18
|
+
const companyInformation = getCompanyInformation(languages, locale);
|
|
19
|
+
const notifications = getNotifications(languages, locale);
|
|
20
|
+
const algoliaSettings = getAlgoliaSettings(request);
|
|
21
|
+
return {
|
|
22
|
+
newsroomContextProps: {
|
|
23
|
+
newsroom,
|
|
24
|
+
companyInformation,
|
|
25
|
+
categories,
|
|
26
|
+
languages,
|
|
27
|
+
localeCode,
|
|
28
|
+
notifications,
|
|
29
|
+
themePreset,
|
|
30
|
+
algoliaSettings,
|
|
31
|
+
},
|
|
32
|
+
localeResolved: Boolean(currentLanguage),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=NextPrezlyApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextPrezlyApi.js","sourceRoot":"","sources":["../../../src/data-fetching/NextPrezlyApi.ts"],"names":[],"mappings":"AACA,OAAO,EACH,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,SAAS,GACZ,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAG3D,MAAM,OAAO,aAAc,SAAQ,SAAS;IACxC,KAAK,CAAC,0BAA0B,CAC5B,OAAyB,EACzB,iBAA0B,EAC1B,KAAa;QAEb,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACrE,IAAI,CAAC,WAAW,EAAE;YAClB,IAAI,CAAC,oBAAoB,EAAE;YAC3B,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,cAAc,EAAE;SACxB,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,KAAK;YACzB,CAAC,CAAC,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC;YACxC,CAAC,CAAC,gCAAgC,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QACrE,MAAM,eAAe,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAEtD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,eAAe,IAAI,eAAe,CAAC;QAChE,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAEpD,6FAA6F;QAC7F,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAEpE,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC1D,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAEpD,OAAO;YACH,oBAAoB,EAAE;gBAClB,QAAQ;gBACR,kBAAkB;gBAClB,UAAU;gBACV,SAAS;gBACT,UAAU;gBACV,aAAa;gBACb,WAAW;gBACX,eAAe;aAClB;YACD,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;SAC3C,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getEnvVariables } from '@prezly/theme-kit-core';
|
|
2
|
+
import { NextPrezlyApi } from './NextPrezlyApi';
|
|
3
|
+
export function getNextPrezlyApi(req) {
|
|
4
|
+
if (typeof window !== 'undefined') {
|
|
5
|
+
throw new Error('"getNextPrezlyApi" should only be used on back-end side.');
|
|
6
|
+
}
|
|
7
|
+
// `getEnvVariables` handles both cases for envs parsing - .env and request headers
|
|
8
|
+
const { PREZLY_ACCESS_TOKEN, PREZLY_NEWSROOM_UUID, PREZLY_THEME_UUID } = getEnvVariables(req);
|
|
9
|
+
if (!PREZLY_ACCESS_TOKEN) {
|
|
10
|
+
throw new Error('"PREZLY_ACCESS_TOKEN" is not set in env variables.');
|
|
11
|
+
}
|
|
12
|
+
if (!PREZLY_NEWSROOM_UUID) {
|
|
13
|
+
throw new Error('"PREZLY_NEWSROOM_UUID" is not set in env variables.');
|
|
14
|
+
}
|
|
15
|
+
return new NextPrezlyApi(PREZLY_ACCESS_TOKEN, PREZLY_NEWSROOM_UUID, PREZLY_THEME_UUID);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=getNextPrezlyApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNextPrezlyApi.js","sourceRoot":"","sources":["../../../src/data-fetching/getNextPrezlyApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,UAAU,gBAAgB,CAAC,GAAqB;IAClD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC/E;IAED,mFAAmF;IACnF,MAAM,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAE9F,IAAI,CAAC,mBAAmB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;KACzE;IAED,IAAI,CAAC,oBAAoB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;KAC1E;IAED,OAAO,IAAI,aAAa,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-fetching/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './adapter-nextjs';
|
|
2
|
+
export * from './components-nextjs';
|
|
3
|
+
export * from './data-fetching';
|
|
4
|
+
export * from './infinite-loading';
|
|
5
|
+
export * from './intl';
|
|
6
|
+
export * from './newsroom-context';
|
|
7
|
+
export * from './sentry';
|
|
8
|
+
export * from './types';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useInfiniteLoading } from './useInfiniteLoading';
|
|
2
|
+
export { useInfiniteStoriesLoading } from './useInfiniteStoriesLoading';
|
|
3
|
+
export { useInfiniteGalleriesLoading } from './useInfiniteGalleriesLoading';
|
|
4
|
+
export * from './types';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infinite-loading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/infinite-loading/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useInfiniteLoading } from './useInfiniteLoading';
|
|
2
|
+
async function fetchGalleries(page, pageSize) {
|
|
3
|
+
const result = await fetch('/api/fetch-galleries', {
|
|
4
|
+
method: 'POST',
|
|
5
|
+
headers: {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
'Content-Type': 'application/json',
|
|
8
|
+
},
|
|
9
|
+
body: JSON.stringify({
|
|
10
|
+
page,
|
|
11
|
+
pageSize,
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
if (!result.ok) {
|
|
15
|
+
const { message } = await result.json();
|
|
16
|
+
throw new Error(message);
|
|
17
|
+
}
|
|
18
|
+
return result.json();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* NOTE: This hook depends on the presence of a Next API route (/api/fetch-galleries)!
|
|
22
|
+
* The handler for this route is exported from `apiHandlers/fetchGalleries.ts` file.
|
|
23
|
+
* See https://github.com/prezly/theme-nextjs-bea/blob/d381e9878187ca98815d240d3ffdf10a75993c14/pages/media/index.tsx#L23 for usage example
|
|
24
|
+
*/
|
|
25
|
+
export function useInfiniteGalleriesLoading(initialGalleries, pagination) {
|
|
26
|
+
const { canLoadMore, data, isLoading, loadMore } = useInfiniteLoading({
|
|
27
|
+
fetchingFn: async (nextPage, pageSize) => {
|
|
28
|
+
const { galleries } = await fetchGalleries(nextPage, pageSize);
|
|
29
|
+
return galleries;
|
|
30
|
+
},
|
|
31
|
+
initialData: initialGalleries,
|
|
32
|
+
pagination,
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
canLoadMore,
|
|
36
|
+
galleries: data,
|
|
37
|
+
isLoading,
|
|
38
|
+
loadMoreGalleries: loadMore,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=useInfiniteGalleriesLoading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInfiniteGalleriesLoading.js","sourceRoot":"","sources":["../../../src/infinite-loading/useInfiniteGalleriesLoading.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,KAAK,UAAU,cAAc,CACzB,IAAY,EACZ,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,sBAAsB,EAAE;QAC/C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,gEAAgE;YAChE,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,IAAI;YACJ,QAAQ;SACX,CAAC;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QACZ,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CACvC,gBAAmC,EACnC,UAA2B;IAE3B,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,kBAAkB,CAAkB;QACnF,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;YACrC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC/D,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,WAAW,EAAE,gBAAgB;QAC7B,UAAU;KACb,CAAC,CAAC;IAEH,OAAO;QACH,WAAW;QACX,SAAS,EAAE,IAAI;QACf,SAAS;QACT,iBAAiB,EAAE,QAAQ;KAC9B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useAsync } from '@react-hookz/web';
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
export function useInfiniteLoading({ fetchingFn, initialData, pagination, }) {
|
|
4
|
+
const [data, setData] = useState(initialData);
|
|
5
|
+
const [currentPage, setCurrentPage] = useState(pagination.currentPage);
|
|
6
|
+
const { itemsTotal, pageSize, withHighlightedStory } = pagination;
|
|
7
|
+
const adjustedItemsTotal = withHighlightedStory ? itemsTotal - 1 : itemsTotal;
|
|
8
|
+
const pagesTotal = Math.ceil(adjustedItemsTotal / pageSize);
|
|
9
|
+
const canLoadMore = currentPage < pagesTotal;
|
|
10
|
+
const [{ error, status }, { execute: loadMoreFn }] = useAsync(async () => {
|
|
11
|
+
const nextPage = currentPage + 1;
|
|
12
|
+
const newData = await fetchingFn(nextPage, pageSize);
|
|
13
|
+
setCurrentPage(nextPage);
|
|
14
|
+
setData((currentData) => [...currentData, ...newData]);
|
|
15
|
+
});
|
|
16
|
+
const loadMore = useCallback(() => {
|
|
17
|
+
if (canLoadMore) {
|
|
18
|
+
loadMoreFn();
|
|
19
|
+
}
|
|
20
|
+
}, [canLoadMore, loadMoreFn]);
|
|
21
|
+
const resetData = useCallback(() => {
|
|
22
|
+
setData(initialData);
|
|
23
|
+
setCurrentPage(pagination.currentPage);
|
|
24
|
+
}, [pagination.currentPage, initialData]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (error) {
|
|
27
|
+
// eslint-disable-next-line no-console
|
|
28
|
+
console.error(error);
|
|
29
|
+
}
|
|
30
|
+
}, [error]);
|
|
31
|
+
return {
|
|
32
|
+
canLoadMore,
|
|
33
|
+
currentPage,
|
|
34
|
+
data,
|
|
35
|
+
isLoading: status === 'loading',
|
|
36
|
+
loadMore,
|
|
37
|
+
resetData,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=useInfiniteLoading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInfiniteLoading.js","sourceRoot":"","sources":["../../../src/infinite-loading/useInfiniteLoading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAmBzD,MAAM,UAAU,kBAAkB,CAAI,EAClC,UAAU,EACV,WAAW,EACX,UAAU,GACE;IACZ,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAM,WAAW,CAAC,CAAC;IACnD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAEvE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,oBAAoB,EAAE,GAAG,UAAU,CAAC;IAClE,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAC9E,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,CAAC;IAC5D,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC;IAE7C,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE;QACrE,MAAM,QAAQ,GAAG,WAAW,GAAG,CAAC,CAAC;QACjC,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACrD,cAAc,CAAC,QAAQ,CAAC,CAAC;QACzB,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,IAAI,WAAW,EAAE;YACb,UAAU,EAAE,CAAC;SAChB;IACL,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,OAAO,CAAC,WAAW,CAAC,CAAC;QACrB,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,KAAK,EAAE;YACP,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO;QACH,WAAW;QACX,WAAW;QACX,IAAI;QACJ,SAAS,EAAE,MAAM,KAAK,SAAS;QAC/B,QAAQ;QACR,SAAS;KACZ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useCurrentLocale } from '../newsroom-context';
|
|
3
|
+
import { useInfiniteLoading } from './useInfiniteLoading';
|
|
4
|
+
async function fetchStories(page, pageSize, withHighlightedStory, category, locale, include, pinning, filterQuery) {
|
|
5
|
+
const result = await fetch('/api/fetch-stories', {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
headers: {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
'Content-Type': 'application/json',
|
|
10
|
+
},
|
|
11
|
+
body: JSON.stringify({
|
|
12
|
+
page,
|
|
13
|
+
pageSize,
|
|
14
|
+
withHighlightedStory,
|
|
15
|
+
category,
|
|
16
|
+
include,
|
|
17
|
+
pinning,
|
|
18
|
+
...(locale && {
|
|
19
|
+
localeCode: locale.toUnderscoreCode(),
|
|
20
|
+
}),
|
|
21
|
+
filterQuery,
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
const { message } = await result.json();
|
|
26
|
+
throw new Error(message);
|
|
27
|
+
}
|
|
28
|
+
return result.json();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* NOTE: This hook depends on the presence of a Next API route (/api/fetch-stories)!
|
|
32
|
+
* The handler for this route is exported from `apiHandlers/fetchStories.ts` file.
|
|
33
|
+
* See https://github.com/prezly/theme-nextjs-bea/blob/d381e9878187ca98815d240d3ffdf10a75993c14/pages/index.tsx#L24 for usage example
|
|
34
|
+
*/
|
|
35
|
+
export function useInfiniteStoriesLoading(initialStories, pagination, category, include, pinning, filterQuery) {
|
|
36
|
+
const currentLocale = useCurrentLocale();
|
|
37
|
+
const { withHighlightedStory = false } = pagination;
|
|
38
|
+
const { canLoadMore, data, isLoading, loadMore, resetData } = useInfiniteLoading({
|
|
39
|
+
fetchingFn: async (nextPage, pageSize) => {
|
|
40
|
+
const { stories } = await fetchStories(nextPage, pageSize, withHighlightedStory, category, currentLocale, include, pinning, filterQuery);
|
|
41
|
+
return stories;
|
|
42
|
+
},
|
|
43
|
+
initialData: initialStories,
|
|
44
|
+
pagination,
|
|
45
|
+
});
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (category?.id) {
|
|
48
|
+
resetData();
|
|
49
|
+
}
|
|
50
|
+
}, [category?.id, resetData]);
|
|
51
|
+
return {
|
|
52
|
+
canLoadMore,
|
|
53
|
+
isLoading,
|
|
54
|
+
loadMoreStories: loadMore,
|
|
55
|
+
stories: data,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=useInfiniteStoriesLoading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInfiniteStoriesLoading.js","sourceRoot":"","sources":["../../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EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAI;QAChF,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;YACrC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAClC,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,OAAO,EACP,WAAW,CACd,CAAC;YACF,OAAO,OAAO,CAAC;QACnB,CAAC;QACD,WAAW,EAAE,cAAc;QAC3B,UAAU;KACb,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,QAAQ,EAAE,EAAE,EAAE;YACd,SAAS,EAAE,CAAC;SACf;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;IAE9B,OAAO;QACH,WAAW;QACX,SAAS;QACT,eAAe,EAAE,QAAQ;QACzB,OAAO,EAAE,IAAI;KAChB,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/intl/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getDefaultLanguage, getLanguageByExactLocaleCode, getLanguageByNeutralLocaleCode, getLanguageByShortRegionCode, LocaleObject, } from '@prezly/theme-kit-core';
|
|
2
|
+
import { DUMMY_DEFAULT_LOCALE } from './locale';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve a culture with fallback to legacy codes support.
|
|
5
|
+
* Pulled from https://github.com/prezly/prezly/blob/de9900d9890a33502780494aa3fb85c9a732b3c3/lib/model/CulturePeer.php#L91-L114
|
|
6
|
+
*/
|
|
7
|
+
export function getLanguageFromNextLocaleIsoCode(languages, nextLocaleIsoCode) {
|
|
8
|
+
const defaultLanguage = getDefaultLanguage(languages);
|
|
9
|
+
if (!nextLocaleIsoCode || nextLocaleIsoCode === DUMMY_DEFAULT_LOCALE) {
|
|
10
|
+
return defaultLanguage;
|
|
11
|
+
}
|
|
12
|
+
const locale = LocaleObject.fromAnyCode(nextLocaleIsoCode);
|
|
13
|
+
let targetLanguage;
|
|
14
|
+
if (nextLocaleIsoCode.length >= 2 && nextLocaleIsoCode.length <= 4) {
|
|
15
|
+
// The order of methods here is reversed from `getShortestLocaleCode`, so that the logic "unwraps" the possible variants with no collisions
|
|
16
|
+
targetLanguage =
|
|
17
|
+
getLanguageByExactLocaleCode(languages, locale) ||
|
|
18
|
+
getLanguageByShortRegionCode(languages, locale) ||
|
|
19
|
+
getLanguageByNeutralLocaleCode(languages, locale);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
targetLanguage = getLanguageByExactLocaleCode(languages, locale);
|
|
23
|
+
}
|
|
24
|
+
return targetLanguage;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../src/intl/languages.ts"],"names":[],"mappings":"AACA,OAAO,EACH,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,4BAA4B,EAC5B,YAAY,GACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAC5C,SAAqC,EACrC,iBAA0B;IAE1B,MAAM,eAAe,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAEtD,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,oBAAoB,EAAE;QAClE,OAAO,eAAe,CAAC;KAC1B;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,cAAoD,CAAC;IAEzD,IAAI,iBAAiB,CAAC,MAAM,IAAI,CAAC,IAAI,iBAAiB,CAAC,MAAM,IAAI,CAAC,EAAE;QAChE,2IAA2I;QAC3I,cAAc;YACV,4BAA4B,CAAC,SAAS,EAAE,MAAM,CAAC;gBAC/C,4BAA4B,CAAC,SAAS,EAAE,MAAM,CAAC;gBAC/C,8BAA8B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;KACzD;SAAM;QACH,cAAc,GAAG,4BAA4B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;KACpE;IAED,OAAO,cAAc,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LocaleObject } from '@prezly/theme-kit-core';
|
|
2
|
+
import { stringify } from 'querystring';
|
|
3
|
+
// We use pseudo locale used for localization testing, to reliably determine if we need to fallback to the default newsroom language
|
|
4
|
+
export const DUMMY_DEFAULT_LOCALE = 'qps-ploc';
|
|
5
|
+
export function getRedirectToCanonicalLocale(shortestLocaleCode, nextLocaleIsoCode, redirectPath, query) {
|
|
6
|
+
// No need to redirect if no particular locale was requested by the application
|
|
7
|
+
if (!nextLocaleIsoCode || nextLocaleIsoCode === DUMMY_DEFAULT_LOCALE) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const shortestLocaleSlug = shortestLocaleCode
|
|
11
|
+
? LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug()
|
|
12
|
+
: shortestLocaleCode;
|
|
13
|
+
if (shortestLocaleSlug !== nextLocaleIsoCode) {
|
|
14
|
+
const prefixedPath = redirectPath && !redirectPath.startsWith('/') ? `/${redirectPath}` : redirectPath;
|
|
15
|
+
const urlQuery = query ? `?${stringify(query)}` : '';
|
|
16
|
+
return {
|
|
17
|
+
destination: shortestLocaleSlug
|
|
18
|
+
? `/${shortestLocaleSlug}${prefixedPath}${urlQuery}`
|
|
19
|
+
: `${prefixedPath}${urlQuery}`,
|
|
20
|
+
permanent: false,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../../src/intl/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,oIAAoI;AACpI,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE/C,MAAM,UAAU,4BAA4B,CACxC,kBAAkC,EAClC,iBAAqC,EACrC,YAAoB,EACpB,KAAsB;IAEtB,+EAA+E;IAC/E,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,oBAAoB,EAAE;QAClE,OAAO,SAAS,CAAC;KACpB;IAED,MAAM,kBAAkB,GAAG,kBAAkB;QACzC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,SAAS,EAAE;QAC1D,CAAC,CAAC,kBAAkB,CAAC;IAEzB,IAAI,kBAAkB,KAAK,iBAAiB,EAAE;QAC1C,MAAM,YAAY,GACd,YAAY,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;QAEtF,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErD,OAAO;YACH,WAAW,EAAE,kBAAkB;gBAC3B,CAAC,CAAC,IAAI,kBAAkB,GAAG,YAAY,GAAG,QAAQ,EAAE;gBACpD,CAAC,CAAC,GAAG,YAAY,GAAG,QAAQ,EAAE;YAClC,SAAS,EAAE,KAAK;SACnB,CAAC;KACL;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_LOCALE, LocaleObject } from '@prezly/theme-kit-core';
|
|
3
|
+
import { createContext, useMemo } from 'react';
|
|
4
|
+
export const NewsroomContext = createContext(undefined);
|
|
5
|
+
/**
|
|
6
|
+
* This context provides common Newsroom information retrieved by `getNewsroomServerSideProps` helper.
|
|
7
|
+
* Please refer to the `NewsroomContextType` definition for more info on what's exposed from the context.
|
|
8
|
+
*/
|
|
9
|
+
export function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentStory, companyInformation, languages, localeCode, notifications, themePreset, algoliaSettings, children, }) {
|
|
10
|
+
const locale = useMemo(() => LocaleObject.fromAnyCode(localeCode || DEFAULT_LOCALE), [localeCode]);
|
|
11
|
+
return (_jsx(NewsroomContext.Provider, { value: {
|
|
12
|
+
categories,
|
|
13
|
+
contacts,
|
|
14
|
+
newsroom,
|
|
15
|
+
currentCategory,
|
|
16
|
+
currentStory,
|
|
17
|
+
companyInformation,
|
|
18
|
+
languages,
|
|
19
|
+
locale,
|
|
20
|
+
notifications,
|
|
21
|
+
themePreset,
|
|
22
|
+
algoliaSettings,
|
|
23
|
+
}, children: children }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/newsroom-context/context.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAwD/C,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC;AAEzF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACpC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,GAC8B;IACtC,MAAM,MAAM,GAAG,OAAO,CAClB,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,UAAU,IAAI,cAAc,CAAC,EAC5D,CAAC,UAAU,CAAC,CACf,CAAC;IAEF,OAAO,CACH,KAAC,eAAe,CAAC,QAAQ,IACrB,KAAK,EAAE;YACH,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,SAAS;YACT,MAAM;YACN,aAAa;YACb,WAAW;YACX,eAAe;SAClB,YAEA,QAAQ,GACc,CAC9B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './useAlgoliaSettings';
|
|
2
|
+
export * from './useCategories';
|
|
3
|
+
export * from './useCompanyInformation';
|
|
4
|
+
export * from './useCurrentCategory';
|
|
5
|
+
export * from './useCurrentLocale';
|
|
6
|
+
export * from './useCurrentStory';
|
|
7
|
+
export * from './useGetLinkLocaleSlug';
|
|
8
|
+
export * from './useGetTranslationUrl';
|
|
9
|
+
export * from './useLanguages';
|
|
10
|
+
export * from './useNewsroom';
|
|
11
|
+
export * from './useNewsroomContext';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlgoliaSettings.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useAlgoliaSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,kBAAkB;IAC9B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCategories.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCategories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,aAAa;IACzB,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,UAAU,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCompanyInformation.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCompanyInformation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,qBAAqB;IACjC,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,kBAAkB,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrentCategory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentCategory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,kBAAkB;IAC9B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrentLocale.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,gBAAgB;IAC5B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrentStory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentStory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,eAAe;IAC3B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,YAAY,CAAC;AAChC,CAAC"}
|