@prezly/theme-kit-nextjs 4.3.5-alpha.1 → 5.0.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/README.md +16 -9
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchGalleries.js +2 -2
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchStories.js +2 -2
- package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -0
- package/build/adapter-nextjs/api-handlers/index.d.ts +2 -0
- package/build/adapter-nextjs/api-handlers/index.js +8 -0
- package/build/adapter-nextjs/api-handlers/index.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomServerSideProps.d.ts +2 -2
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomServerSideProps.js +2 -2
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomStaticProps.d.ts +2 -2
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomStaticProps.js +2 -2
- package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -0
- package/build/adapter-nextjs/index.d.ts +6 -0
- package/build/{cjs/server.js → adapter-nextjs/index.js} +7 -8
- package/build/adapter-nextjs/index.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/category.js +10 -10
- package/build/adapter-nextjs/page-props/category.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/gallery.js +8 -8
- package/build/adapter-nextjs/page-props/gallery.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/galleryAlbum.js +10 -10
- package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/home.js +8 -8
- package/build/adapter-nextjs/page-props/home.js.map +1 -0
- package/build/{types/adapter-nextjs → adapter-nextjs}/page-props/index.d.ts +8 -8
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/index.js +24 -24
- package/build/adapter-nextjs/page-props/index.js.map +1 -0
- package/build/adapter-nextjs/page-props/lib/types.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/search.js +8 -8
- package/build/adapter-nextjs/page-props/search.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/getServerSideProps.js +6 -6
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/index.d.ts +4 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/index.js +7 -7
- package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/types.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/story.js +14 -14
- package/build/adapter-nextjs/page-props/story.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/storyPreview.js +6 -6
- package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/processRequest.js +2 -2
- package/build/adapter-nextjs/processRequest.js.map +1 -0
- package/build/adapter-nextjs/processStaticRequest.js.map +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/PageSeo.js +14 -15
- package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -0
- package/build/components-nextjs/PageSeo/index.d.ts +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/index.js +2 -2
- package/build/components-nextjs/PageSeo/index.js.map +1 -0
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -0
- package/build/components-nextjs/PageSeo/lib/index.d.ts +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/index.js +2 -2
- package/build/components-nextjs/PageSeo/lib/index.js.map +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/StorySeo.js +0 -1
- package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -0
- package/build/components-nextjs/StorySeo/index.d.ts +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/index.js +2 -2
- package/build/components-nextjs/StorySeo/index.js.map +1 -0
- package/build/{types/components-nextjs → components-nextjs}/document.d.ts +1 -1
- package/build/{cjs/components-nextjs → components-nextjs}/document.js +3 -4
- package/build/components-nextjs/document.js.map +1 -0
- package/build/components-nextjs/index.d.ts +3 -0
- package/build/components-nextjs/index.js +10 -0
- package/build/components-nextjs/index.js.map +1 -0
- package/build/{cjs/data-fetching → data-fetching}/NextPrezlyApi.js +2 -2
- package/build/data-fetching/NextPrezlyApi.js.map +1 -0
- package/build/{cjs/data-fetching → data-fetching}/getNextPrezlyApi.d.ts +1 -1
- package/build/{cjs/data-fetching → data-fetching}/getNextPrezlyApi.js +2 -2
- package/build/data-fetching/getNextPrezlyApi.js.map +1 -0
- package/build/data-fetching/index.d.ts +1 -0
- package/build/{cjs/data-fetching → data-fetching}/index.js +2 -2
- package/build/data-fetching/index.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/{cjs/adapter-nextjs/index.js → index.js} +8 -6
- package/build/index.js.map +1 -0
- package/build/{cjs/infinite-loading → infinite-loading}/index.d.ts +4 -4
- package/build/{cjs/infinite-loading → infinite-loading}/index.js +7 -7
- package/build/infinite-loading/index.js.map +1 -0
- package/build/{esm → infinite-loading}/types.js.map +1 -1
- package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteGalleriesLoading.js +2 -2
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -0
- package/build/infinite-loading/useInfiniteLoading.js.map +1 -0
- package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteStoriesLoading.js +4 -4
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -0
- package/build/intl/index.d.ts +2 -0
- package/build/{cjs/intl → intl}/index.js +2 -2
- package/build/intl/index.js.map +1 -0
- package/build/{cjs/intl → intl}/languages.js +2 -2
- package/build/intl/languages.js.map +1 -0
- package/build/intl/locale.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/context.js +0 -1
- package/build/newsroom-context/context.js.map +1 -0
- package/build/newsroom-context/hooks/index.d.ts +11 -0
- package/build/{cjs → newsroom-context/hooks}/index.js +11 -8
- package/build/newsroom-context/hooks/index.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useAlgoliaSettings.js +2 -2
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCategories.js +2 -2
- package/build/newsroom-context/hooks/useCategories.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCompanyInformation.js +2 -2
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentCategory.js +2 -2
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentLocale.js +2 -2
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentStory.js +2 -2
- package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetLinkLocaleSlug.js +4 -4
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetTranslationUrl.js +6 -6
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useLanguages.js +2 -2
- package/build/newsroom-context/hooks/useLanguages.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroom.js +2 -2
- package/build/newsroom-context/hooks/useNewsroom.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroomContext.js +2 -2
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -0
- package/build/newsroom-context/index.d.ts +2 -0
- package/build/{cjs/newsroom-context → newsroom-context}/index.js +4 -4
- package/build/newsroom-context/index.js.map +1 -0
- package/build/{cjs/sentry → sentry}/client.js +2 -2
- package/build/sentry/client.js.map +1 -0
- package/build/{esm/sentry → sentry}/common.js.map +1 -1
- package/build/sentry/index.d.ts +2 -0
- package/build/{cjs/sentry → sentry}/index.js +4 -4
- package/build/sentry/index.js.map +1 -0
- package/build/{cjs/sentry → sentry}/server.js +2 -2
- package/build/sentry/server.js.map +1 -0
- package/build/{cjs/types.d.ts → types.d.ts} +1 -1
- package/build/types.js.map +1 -0
- package/package.json +11 -43
- package/build/cjs/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
- package/build/cjs/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
- package/build/cjs/adapter-nextjs/api-handlers/index.d.ts +0 -2
- package/build/cjs/adapter-nextjs/api-handlers/index.js +0 -8
- package/build/cjs/adapter-nextjs/api-handlers/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
- package/build/cjs/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
- package/build/cjs/adapter-nextjs/index.d.ts +0 -6
- package/build/cjs/adapter-nextjs/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/category.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/gallery.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/home.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/index.d.ts +0 -8
- package/build/cjs/adapter-nextjs/page-props/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/lib/types.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/search.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.d.ts +0 -4
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/story.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/storyPreview.js.map +0 -1
- package/build/cjs/adapter-nextjs/processRequest.js.map +0 -1
- package/build/cjs/adapter-nextjs/processStaticRequest.js.map +0 -1
- package/build/cjs/client.d.ts +0 -7
- package/build/cjs/client.js +0 -24
- package/build/cjs/client.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/PageSeo.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/index.d.ts +0 -1
- package/build/cjs/components-nextjs/PageSeo/index.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/lib/index.d.ts +0 -1
- package/build/cjs/components-nextjs/PageSeo/lib/index.js.map +0 -1
- package/build/cjs/components-nextjs/StorySeo/StorySeo.js.map +0 -1
- package/build/cjs/components-nextjs/StorySeo/index.d.ts +0 -1
- package/build/cjs/components-nextjs/StorySeo/index.js.map +0 -1
- package/build/cjs/components-nextjs/document.d.ts +0 -6
- package/build/cjs/components-nextjs/document.js.map +0 -1
- package/build/cjs/components-nextjs/index.d.ts +0 -3
- package/build/cjs/components-nextjs/index.js +0 -10
- package/build/cjs/components-nextjs/index.js.map +0 -1
- package/build/cjs/data-fetching/NextPrezlyApi.js.map +0 -1
- package/build/cjs/data-fetching/getNextPrezlyApi.js.map +0 -1
- package/build/cjs/data-fetching/index.d.ts +0 -1
- package/build/cjs/data-fetching/index.js.map +0 -1
- package/build/cjs/i18nConfig.cjs +0 -21
- package/build/cjs/i18nConfig.cjs.map +0 -1
- package/build/cjs/i18nConfig.d.cts +0 -3
- package/build/cjs/index.d.ts +0 -8
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/infinite-loading/index.js.map +0 -1
- package/build/cjs/infinite-loading/types.js.map +0 -1
- package/build/cjs/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
- package/build/cjs/infinite-loading/useInfiniteLoading.js.map +0 -1
- package/build/cjs/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
- package/build/cjs/intl/index.d.ts +0 -2
- package/build/cjs/intl/index.js.map +0 -1
- package/build/cjs/intl/languages.js.map +0 -1
- package/build/cjs/intl/locale.js.map +0 -1
- package/build/cjs/newsroom-context/context.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/index.d.ts +0 -11
- package/build/cjs/newsroom-context/hooks/index.js +0 -28
- package/build/cjs/newsroom-context/hooks/index.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCategories.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCurrentStory.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useLanguages.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useNewsroom.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
- package/build/cjs/newsroom-context/index.d.ts +0 -2
- package/build/cjs/newsroom-context/index.js.map +0 -1
- package/build/cjs/sentry/client.js.map +0 -1
- package/build/cjs/sentry/common.js.map +0 -1
- package/build/cjs/sentry/index.d.ts +0 -2
- package/build/cjs/sentry/index.js.map +0 -1
- package/build/cjs/sentry/server.js.map +0 -1
- package/build/cjs/server.d.ts +0 -7
- package/build/cjs/server.js.map +0 -1
- package/build/cjs/types.js.map +0 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js +0 -19
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js +0 -29
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
- package/build/esm/adapter-nextjs/api-handlers/index.js +0 -3
- package/build/esm/adapter-nextjs/api-handlers/index.js.map +0 -1
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js +0 -15
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js +0 -15
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
- package/build/esm/adapter-nextjs/index.js +0 -7
- package/build/esm/adapter-nextjs/index.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/category.js +0 -97
- package/build/esm/adapter-nextjs/page-props/category.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/gallery.js +0 -66
- package/build/esm/adapter-nextjs/page-props/gallery.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +0 -49
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/home.js +0 -70
- package/build/esm/adapter-nextjs/page-props/home.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/index.js +0 -9
- package/build/esm/adapter-nextjs/page-props/index.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/lib/types.js +0 -2
- package/build/esm/adapter-nextjs/page-props/lib/types.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/search.js +0 -27
- package/build/esm/adapter-nextjs/page-props/search.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +0 -47
- package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js +0 -15
- package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +0 -32
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js +0 -5
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/types.js +0 -2
- package/build/esm/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/story.js +0 -63
- package/build/esm/adapter-nextjs/page-props/story.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/storyPreview.js +0 -22
- package/build/esm/adapter-nextjs/page-props/storyPreview.js.map +0 -1
- package/build/esm/adapter-nextjs/processRequest.js +0 -33
- package/build/esm/adapter-nextjs/processRequest.js.map +0 -1
- package/build/esm/adapter-nextjs/processStaticRequest.js +0 -22
- package/build/esm/adapter-nextjs/processStaticRequest.js.map +0 -1
- package/build/esm/client.js +0 -8
- package/build/esm/client.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/PageSeo.js +0 -78
- package/build/esm/components-nextjs/PageSeo/PageSeo.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/index.js +0 -2
- package/build/esm/components-nextjs/PageSeo/index.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +0 -7
- package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/lib/index.js +0 -2
- package/build/esm/components-nextjs/PageSeo/lib/index.js.map +0 -1
- package/build/esm/components-nextjs/StorySeo/StorySeo.js +0 -53
- package/build/esm/components-nextjs/StorySeo/StorySeo.js.map +0 -1
- package/build/esm/components-nextjs/StorySeo/index.js +0 -2
- package/build/esm/components-nextjs/StorySeo/index.js.map +0 -1
- package/build/esm/components-nextjs/document.js +0 -22
- package/build/esm/components-nextjs/document.js.map +0 -1
- package/build/esm/components-nextjs/index.js +0 -4
- package/build/esm/components-nextjs/index.js.map +0 -1
- package/build/esm/data-fetching/NextPrezlyApi.js +0 -36
- package/build/esm/data-fetching/NextPrezlyApi.js.map +0 -1
- package/build/esm/data-fetching/getNextPrezlyApi.js +0 -17
- package/build/esm/data-fetching/getNextPrezlyApi.js.map +0 -1
- package/build/esm/data-fetching/index.js +0 -2
- package/build/esm/data-fetching/index.js.map +0 -1
- package/build/esm/i18nConfig.cjs +0 -20
- package/build/esm/i18nConfig.cjs.map +0 -1
- package/build/esm/index.js +0 -9
- package/build/esm/index.js.map +0 -1
- package/build/esm/infinite-loading/index.js +0 -5
- package/build/esm/infinite-loading/index.js.map +0 -1
- package/build/esm/infinite-loading/types.js +0 -2
- package/build/esm/infinite-loading/types.js.map +0 -1
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js +0 -41
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
- package/build/esm/infinite-loading/useInfiniteLoading.js +0 -40
- package/build/esm/infinite-loading/useInfiniteLoading.js.map +0 -1
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +0 -58
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
- package/build/esm/intl/index.js +0 -3
- package/build/esm/intl/index.js.map +0 -1
- package/build/esm/intl/languages.js +0 -26
- package/build/esm/intl/languages.js.map +0 -1
- package/build/esm/intl/locale.js +0 -25
- package/build/esm/intl/locale.js.map +0 -1
- package/build/esm/newsroom-context/context.js +0 -26
- package/build/esm/newsroom-context/context.js.map +0 -1
- package/build/esm/newsroom-context/hooks/index.js +0 -12
- package/build/esm/newsroom-context/hooks/index.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js +0 -6
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCategories.js +0 -6
- package/build/esm/newsroom-context/hooks/useCategories.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js +0 -6
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js +0 -6
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js +0 -6
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCurrentStory.js +0 -6
- package/build/esm/newsroom-context/hooks/useCurrentStory.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js +0 -25
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js +0 -71
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useLanguages.js +0 -6
- package/build/esm/newsroom-context/hooks/useLanguages.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useNewsroom.js +0 -6
- package/build/esm/newsroom-context/hooks/useNewsroom.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js +0 -12
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
- package/build/esm/newsroom-context/index.js +0 -3
- package/build/esm/newsroom-context/index.js.map +0 -1
- package/build/esm/sentry/client.js +0 -5
- package/build/esm/sentry/client.js.map +0 -1
- package/build/esm/sentry/common.js +0 -62
- package/build/esm/sentry/index.js +0 -3
- package/build/esm/sentry/index.js.map +0 -1
- package/build/esm/sentry/server.js +0 -5
- package/build/esm/sentry/server.js.map +0 -1
- package/build/esm/server.js +0 -8
- package/build/esm/server.js.map +0 -1
- package/build/esm/types.js +0 -2
- package/build/tsconfig.cjs.tsbuildinfo +0 -1
- package/build/tsconfig.esm.tsbuildinfo +0 -1
- package/build/types/adapter-nextjs/api-handlers/fetchGalleries.d.ts +0 -2
- package/build/types/adapter-nextjs/api-handlers/fetchStories.d.ts +0 -2
- package/build/types/adapter-nextjs/api-handlers/index.d.ts +0 -2
- package/build/types/adapter-nextjs/getNewsroomServerSideProps.d.ts +0 -15
- package/build/types/adapter-nextjs/getNewsroomStaticProps.d.ts +0 -15
- package/build/types/adapter-nextjs/index.d.ts +0 -6
- package/build/types/adapter-nextjs/page-props/category.d.ts +0 -16
- package/build/types/adapter-nextjs/page-props/gallery.d.ts +0 -14
- package/build/types/adapter-nextjs/page-props/galleryAlbum.d.ts +0 -9
- package/build/types/adapter-nextjs/page-props/home.d.ts +0 -22
- package/build/types/adapter-nextjs/page-props/lib/types.d.ts +0 -3
- package/build/types/adapter-nextjs/page-props/search.d.ts +0 -4
- package/build/types/adapter-nextjs/page-props/sitemap/SitemapBuilder.d.ts +0 -11
- package/build/types/adapter-nextjs/page-props/sitemap/createPaths.d.ts +0 -2
- package/build/types/adapter-nextjs/page-props/sitemap/getServerSideProps.d.ts +0 -7
- package/build/types/adapter-nextjs/page-props/sitemap/index.d.ts +0 -4
- package/build/types/adapter-nextjs/page-props/sitemap/types.d.ts +0 -5
- package/build/types/adapter-nextjs/page-props/story.d.ts +0 -14
- package/build/types/adapter-nextjs/page-props/storyPreview.d.ts +0 -3
- package/build/types/adapter-nextjs/processRequest.d.ts +0 -12
- package/build/types/adapter-nextjs/processStaticRequest.d.ts +0 -11
- package/build/types/client.d.ts +0 -7
- package/build/types/components-nextjs/PageSeo/PageSeo.d.ts +0 -12
- package/build/types/components-nextjs/PageSeo/index.d.ts +0 -1
- package/build/types/components-nextjs/PageSeo/lib/getAbsoluteUrl.d.ts +0 -1
- package/build/types/components-nextjs/PageSeo/lib/index.d.ts +0 -1
- package/build/types/components-nextjs/StorySeo/StorySeo.d.ts +0 -12
- package/build/types/components-nextjs/StorySeo/index.d.ts +0 -1
- package/build/types/components-nextjs/index.d.ts +0 -3
- package/build/types/data-fetching/NextPrezlyApi.d.ts +0 -8
- package/build/types/data-fetching/getNextPrezlyApi.d.ts +0 -4
- package/build/types/data-fetching/index.d.ts +0 -1
- package/build/types/i18nConfig.d.cts +0 -3
- package/build/types/index.d.ts +0 -8
- package/build/types/infinite-loading/index.d.ts +0 -4
- package/build/types/infinite-loading/types.d.ts +0 -9
- package/build/types/infinite-loading/useInfiniteGalleriesLoading.d.ts +0 -13
- package/build/types/infinite-loading/useInfiniteLoading.d.ts +0 -16
- package/build/types/infinite-loading/useInfiniteStoriesLoading.d.ts +0 -13
- package/build/types/intl/index.d.ts +0 -2
- package/build/types/intl/languages.d.ts +0 -6
- package/build/types/intl/locale.d.ts +0 -5
- package/build/types/newsroom-context/context.d.ts +0 -62
- package/build/types/newsroom-context/hooks/index.d.ts +0 -11
- package/build/types/newsroom-context/hooks/useAlgoliaSettings.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCategories.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCompanyInformation.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCurrentCategory.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCurrentLocale.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCurrentStory.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useGetLinkLocaleSlug.d.ts +0 -2
- package/build/types/newsroom-context/hooks/useGetTranslationUrl.d.ts +0 -6
- package/build/types/newsroom-context/hooks/useLanguages.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useNewsroom.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useNewsroomContext.d.ts +0 -2
- package/build/types/newsroom-context/index.d.ts +0 -2
- package/build/types/sentry/client.d.ts +0 -2
- package/build/types/sentry/common.d.ts +0 -2
- package/build/types/sentry/index.d.ts +0 -2
- package/build/types/sentry/server.d.ts +0 -2
- package/build/types/server.d.ts +0 -7
- package/build/types/types.d.ts +0 -14
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchGalleries.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchStories.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/category.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/gallery.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/galleryAlbum.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/home.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/lib/types.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/lib/types.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/search.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/SitemapBuilder.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/SitemapBuilder.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/createPaths.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/createPaths.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/getServerSideProps.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/types.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/types.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/story.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/storyPreview.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processRequest.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processStaticRequest.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processStaticRequest.js +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/PageSeo.d.ts +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/getAbsoluteUrl.d.ts +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/getAbsoluteUrl.js +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/StorySeo.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/NextPrezlyApi.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/types.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/types.js +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteGalleriesLoading.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteLoading.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteLoading.js +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteStoriesLoading.d.ts +0 -0
- /package/build/{cjs/intl → intl}/languages.d.ts +0 -0
- /package/build/{cjs/intl → intl}/locale.d.ts +0 -0
- /package/build/{cjs/intl → intl}/locale.js +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/context.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useAlgoliaSettings.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCategories.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCompanyInformation.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentCategory.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentLocale.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentStory.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetLinkLocaleSlug.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetTranslationUrl.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useLanguages.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroom.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroomContext.d.ts +0 -0
- /package/build/{cjs/sentry → sentry}/client.d.ts +0 -0
- /package/build/{cjs/sentry → sentry}/common.d.ts +0 -0
- /package/build/{cjs/sentry → sentry}/common.js +0 -0
- /package/build/{cjs/sentry → sentry}/server.d.ts +0 -0
- /package/build/{cjs/types.js → types.js} +0 -0
package/README.md
CHANGED
|
@@ -12,12 +12,13 @@ The package is built with [Typescript] on top of [Prezly SDK].
|
|
|
12
12
|
### npm
|
|
13
13
|
|
|
14
14
|
```Shell
|
|
15
|
-
npm install --save @prezly/theme-kit-core @prezly/theme-kit-nextjs
|
|
15
|
+
npm install --save @prezly/sdk @prezly/theme-kit-core @prezly/theme-kit-nextjs
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
#### peerDependencies
|
|
19
19
|
|
|
20
|
-
This library depends on `@prezly/theme-kit-core` package, which contains more helpers that are not specific to Next.
|
|
20
|
+
This library depends on `@prezly/theme-kit-core` package, which contains more helpers that are not specific to Next, as well as `@prezly/sdk`, which provides the communication with Prezly API and typings.
|
|
21
|
+
We will occasionally bump the minimum required SDK version to ensure compatibility with latest Prezly features.
|
|
21
22
|
|
|
22
23
|
This library is intended to be used with [Next.js] applications, so it also requires `next`, `react` and `react-dom` to work. These should already be installed if you have an existing [Next.js] app.
|
|
23
24
|
If you're starting from scratch, use [create-next-app] to quick-start the project.
|
|
@@ -71,12 +72,23 @@ module.exports = {
|
|
|
71
72
|
If you want to support multi-language in your theme, you'll need to make additional changes to the file:
|
|
72
73
|
|
|
73
74
|
```js
|
|
74
|
-
const
|
|
75
|
+
const { DUMMY_DEFAULT_LOCALE } = require('@prezly/theme-kit-nextjs');
|
|
76
|
+
const locales = require('@prezly/theme-kit-nextjs/core/intl/localeConfig');
|
|
75
77
|
|
|
76
78
|
module.exports = {
|
|
77
79
|
/* ...your next config... */
|
|
78
80
|
|
|
79
|
-
i18n:
|
|
81
|
+
i18n: {
|
|
82
|
+
// These are all the locales you want to support in
|
|
83
|
+
// your application
|
|
84
|
+
locales: [...locales, DUMMY_DEFAULT_LOCALE],
|
|
85
|
+
// This is the default locale you want to be used when visiting
|
|
86
|
+
// a non-locale prefixed path e.g. `/media`
|
|
87
|
+
// We use Pseudo locale used for localization testing, to reliably determine if we need to fallback to the default newsroom language
|
|
88
|
+
defaultLocale: DUMMY_DEFAULT_LOCALE,
|
|
89
|
+
// Default locale detection is disabled, since the locales would be determined by Prezly API
|
|
90
|
+
localeDetection: false,
|
|
91
|
+
},
|
|
80
92
|
};
|
|
81
93
|
```
|
|
82
94
|
|
|
@@ -300,11 +312,6 @@ These are available for `/category/[slug]`, `/story/[slug]` and `/media/album/[u
|
|
|
300
312
|
|
|
301
313
|
You can find all of the helper methods in the [page-props](./tree/main/src/adapter-nextjs/page-props) directory.
|
|
302
314
|
|
|
303
|
-
### Experimental: Next 13 /app directory
|
|
304
|
-
|
|
305
|
-
Currently, Next doesn't work well with tree-shaking during the code introspection phase, which will result in errors if you import anything from main export of `@prezly/theme-kit-nextjs` into a Next server component.
|
|
306
|
-
So far, the workaround for this (introduced in v4.2.0) is to import from the `server` subpath (`import ... from '@prezly/theme-kit-nextjs/server`). For client components and code that is not imported into server components, you can still use regular `@prezly/theme-kit-nextjs` imports.
|
|
307
|
-
|
|
308
315
|
----
|
|
309
316
|
|
|
310
317
|
## Contributing
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fetchGalleries = void 0;
|
|
4
|
-
const
|
|
4
|
+
const data_fetching_1 = require("../../data-fetching");
|
|
5
5
|
async function fetchGalleries(req, res) {
|
|
6
6
|
if (req.method !== 'POST') {
|
|
7
7
|
res.status(405);
|
|
@@ -9,7 +9,7 @@ async function fetchGalleries(req, res) {
|
|
|
9
9
|
}
|
|
10
10
|
const { page, pageSize } = req.body;
|
|
11
11
|
try {
|
|
12
|
-
const api = (0,
|
|
12
|
+
const api = (0, data_fetching_1.getNextPrezlyApi)(req);
|
|
13
13
|
const { galleries } = await api.getGalleries({ page, pageSize });
|
|
14
14
|
res.status(200).json({ galleries });
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":";;;AAEA,uDAAuD;AAEhD,KAAK,UAAU,cAAc,CAAC,GAAmB,EAAE,GAAoB;IAC1E,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE;QACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO;KACV;IAED,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;IAEpC,IAAI;QACA,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,GAAG,CAAC,CAAC;QAElC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEjE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;KACvC;IAAC,OAAO,KAAK,EAAE;QACZ,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACjB,OAAO,EAAG,KAAe,CAAC,OAAO;SACpC,CAAC,CAAC;KACN;AACL,CAAC;AAnBD,wCAmBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fetchStories = void 0;
|
|
4
|
-
const
|
|
4
|
+
const data_fetching_1 = require("../../data-fetching");
|
|
5
5
|
async function fetchStories(req, res) {
|
|
6
6
|
if (req.method !== 'POST') {
|
|
7
7
|
res.status(405);
|
|
@@ -9,7 +9,7 @@ async function fetchStories(req, res) {
|
|
|
9
9
|
}
|
|
10
10
|
const { page, pageSize, withHighlightedStory, category, include, localeCode, pinning, filterQuery, } = req.body;
|
|
11
11
|
try {
|
|
12
|
-
const api = (0,
|
|
12
|
+
const api = (0, data_fetching_1.getNextPrezlyApi)(req);
|
|
13
13
|
const { stories } = await (category
|
|
14
14
|
? api.getStoriesFromCategory(category, { page, pageSize, include, localeCode })
|
|
15
15
|
: api.getStories({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":";;;AAEA,uDAAuD;AAEhD,KAAK,UAAU,YAAY,CAAC,GAAmB,EAAE,GAAoB;IACxE,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE;QACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO;KACV;IAED,MAAM,EACF,IAAI,EACJ,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,OAAO,EACP,WAAW,GACd,GAAG,GAAG,CAAC,IAAI,CAAC;IAEb,IAAI;QACA,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,GAAG,CAAC,CAAC;QAElC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,QAAQ;YAC/B,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;YAC/E,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC;gBACX,IAAI;gBACJ,QAAQ;gBACR,OAAO;gBACP,UAAU;gBACV,oBAAoB;gBACpB,OAAO;gBACP,WAAW;aACd,CAAC,CAAC,CAAC;QAEV,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACZ,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACjB,OAAO,EAAG,KAAe,CAAC,OAAO;SACpC,CAAC,CAAC;KACN;AACL,CAAC;AAtCD,oCAsCC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchStories = exports.fetchGalleries = void 0;
|
|
4
|
+
var fetchGalleries_1 = require("./fetchGalleries");
|
|
5
|
+
Object.defineProperty(exports, "fetchGalleries", { enumerable: true, get: function () { return fetchGalleries_1.fetchGalleries; } });
|
|
6
|
+
var fetchStories_1 = require("./fetchStories");
|
|
7
|
+
Object.defineProperty(exports, "fetchStories", { enumerable: true, get: function () { return fetchStories_1.fetchStories; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,+CAA8C;AAArC,4GAAA,YAAY,OAAA"}
|
|
@@ -9,7 +9,7 @@ interface Options {
|
|
|
9
9
|
* See README for usage examples.
|
|
10
10
|
*/
|
|
11
11
|
export declare function getNewsroomServerSideProps(context: GetServerSidePropsContext, options?: Options): Promise<{
|
|
12
|
-
api: import("../data-fetching/NextPrezlyApi
|
|
13
|
-
serverSideProps: import("
|
|
12
|
+
api: import("../data-fetching/NextPrezlyApi").NextPrezlyApi;
|
|
13
|
+
serverSideProps: import("..").PageProps & import("..").ServerSidePageProps;
|
|
14
14
|
}>;
|
|
15
15
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNewsroomServerSideProps = void 0;
|
|
4
|
-
const
|
|
4
|
+
const data_fetching_1 = require("../data-fetching");
|
|
5
5
|
/**
|
|
6
6
|
* Use this function in your `getServerSideProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
|
|
7
7
|
* See README for usage examples.
|
|
8
8
|
*/
|
|
9
9
|
async function getNewsroomServerSideProps(context, options = {}) {
|
|
10
10
|
const { req: request, locale } = context;
|
|
11
|
-
const api = (0,
|
|
11
|
+
const api = (0, data_fetching_1.getNextPrezlyApi)(request);
|
|
12
12
|
const serverSideProps = await api.getNewsroomServerSideProps(request, locale, options.story);
|
|
13
13
|
if (options.loadHomepageContacts) {
|
|
14
14
|
serverSideProps.newsroomContextProps.contacts = await api.getNewsroomContacts();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":";;;AAGA,oDAAoD;AAOpD;;;GAGG;AACI,KAAK,UAAU,0BAA0B,CAC5C,OAAkC,EAClC,UAAmB,EAAE;IAErB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEzC,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,OAAO,CAAC,CAAC;IACtC,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAE7F,IAAI,OAAO,CAAC,oBAAoB,EAAE;QAC9B,eAAe,CAAC,oBAAoB,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC,mBAAmB,EAAE,CAAC;KACnF;IAED,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;AACpC,CAAC;AAdD,gEAcC"}
|
|
@@ -9,7 +9,7 @@ interface Options {
|
|
|
9
9
|
* See README for usage examples.
|
|
10
10
|
*/
|
|
11
11
|
export declare function getNewsroomStaticProps(context: GetStaticPropsContext, options?: Options): Promise<{
|
|
12
|
-
api: import("../data-fetching/NextPrezlyApi
|
|
13
|
-
staticProps: import("
|
|
12
|
+
api: import("../data-fetching/NextPrezlyApi").NextPrezlyApi;
|
|
13
|
+
staticProps: import("..").PageProps & import("..").ServerSidePageProps;
|
|
14
14
|
}>;
|
|
15
15
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNewsroomStaticProps = void 0;
|
|
4
|
-
const
|
|
4
|
+
const data_fetching_1 = require("../data-fetching");
|
|
5
5
|
/**
|
|
6
6
|
* Use this function in your `getNewsroomStaticProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
|
|
7
7
|
* See README for usage examples.
|
|
8
8
|
*/
|
|
9
9
|
async function getNewsroomStaticProps(context, options = {}) {
|
|
10
10
|
const { locale } = context;
|
|
11
|
-
const api = (0,
|
|
11
|
+
const api = (0, data_fetching_1.getNextPrezlyApi)();
|
|
12
12
|
const staticProps = await api.getNewsroomServerSideProps(undefined, locale, options.story);
|
|
13
13
|
if (options.loadHomepageContacts) {
|
|
14
14
|
staticProps.newsroomContextProps.contacts = await api.getNewsroomContacts();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNewsroomStaticProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomStaticProps.ts"],"names":[],"mappings":";;;AAGA,oDAAoD;AAOpD;;;GAGG;AACI,KAAK,UAAU,sBAAsB,CACxC,OAA8B,EAC9B,UAAmB,EAAE;IAErB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,MAAM,GAAG,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAE3F,IAAI,OAAO,CAAC,oBAAoB,EAAE;QAC9B,WAAW,CAAC,oBAAoB,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC,mBAAmB,EAAE,CAAC;KAC/E;IAED,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;AAChC,CAAC;AAdD,wDAcC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This is a subset export created for Next 13 /app directory, which doesn't support tree-shaking properly.
|
|
4
|
-
* See https://github.com/vercel/next.js/issues/12557
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
3
|
if (k2 === undefined) k2 = k;
|
|
9
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -19,6 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
19
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
15
|
};
|
|
21
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
|
|
17
|
+
__exportStar(require("./api-handlers"), exports);
|
|
18
|
+
__exportStar(require("./getNewsroomServerSideProps"), exports);
|
|
19
|
+
__exportStar(require("./getNewsroomStaticProps"), exports);
|
|
20
|
+
__exportStar(require("./page-props"), exports);
|
|
21
|
+
__exportStar(require("./processRequest"), exports);
|
|
22
|
+
__exportStar(require("./processStaticRequest"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter-nextjs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+DAA6C;AAC7C,2DAAyC;AACzC,+CAA6B;AAC7B,mDAAiC;AACjC,yDAAuC"}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCategoryPageStaticPaths = exports.getCategoryPageStaticProps = exports.getCategoryPageServerSideProps = void 0;
|
|
4
4
|
const theme_kit_core_1 = require("@prezly/theme-kit-core");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
5
|
+
const data_fetching_1 = require("../../data-fetching");
|
|
6
|
+
const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
|
|
7
|
+
const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
|
|
8
|
+
const processRequest_1 = require("../processRequest");
|
|
9
|
+
const processStaticRequest_1 = require("../processStaticRequest");
|
|
10
10
|
function getCategoryPageServerSideProps(customProps, options) {
|
|
11
11
|
const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
|
|
12
12
|
return async function getServerSideProps(context) {
|
|
13
|
-
const { api, serverSideProps } = await (0,
|
|
13
|
+
const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
|
|
14
14
|
const { slug } = context.params;
|
|
15
15
|
const category = await api.getCategoryBySlug(slug);
|
|
16
16
|
if (!category) {
|
|
@@ -28,7 +28,7 @@ function getCategoryPageServerSideProps(customProps, options) {
|
|
|
28
28
|
localeCode,
|
|
29
29
|
});
|
|
30
30
|
serverSideProps.newsroomContextProps.currentCategory = category;
|
|
31
|
-
return (0,
|
|
31
|
+
return (0, processRequest_1.processRequest)(context, {
|
|
32
32
|
...serverSideProps,
|
|
33
33
|
// TODO: This is temporary until return types from API are figured out
|
|
34
34
|
stories: stories,
|
|
@@ -47,7 +47,7 @@ exports.getCategoryPageServerSideProps = getCategoryPageServerSideProps;
|
|
|
47
47
|
function getCategoryPageStaticProps(customProps, options) {
|
|
48
48
|
const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
|
|
49
49
|
return async function getStaticProps(context) {
|
|
50
|
-
const { api, staticProps } = await (0,
|
|
50
|
+
const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
|
|
51
51
|
const { slug } = context.params;
|
|
52
52
|
const category = await api.getCategoryBySlug(slug);
|
|
53
53
|
if (!category) {
|
|
@@ -62,7 +62,7 @@ function getCategoryPageStaticProps(customProps, options) {
|
|
|
62
62
|
localeCode,
|
|
63
63
|
});
|
|
64
64
|
staticProps.newsroomContextProps.currentCategory = category;
|
|
65
|
-
return (0,
|
|
65
|
+
return (0, processStaticRequest_1.processStaticRequest)(context, {
|
|
66
66
|
...staticProps,
|
|
67
67
|
// TODO: This is temporary until return types from API are figured out
|
|
68
68
|
stories: stories,
|
|
@@ -79,7 +79,7 @@ function getCategoryPageStaticProps(customProps, options) {
|
|
|
79
79
|
}
|
|
80
80
|
exports.getCategoryPageStaticProps = getCategoryPageStaticProps;
|
|
81
81
|
async function getCategoryPageStaticPaths() {
|
|
82
|
-
const api = (0,
|
|
82
|
+
const api = (0, data_fetching_1.getNextPrezlyApi)();
|
|
83
83
|
const [categories, defaultLanguage] = await Promise.all([
|
|
84
84
|
api.getCategories(),
|
|
85
85
|
api.getNewsroomDefaultLanguage(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/category.ts"],"names":[],"mappings":";;;AACA,2DAAmG;AASnG,uDAAuD;AAEvD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;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AC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AA/CD,gEA+CC;AAEM,KAAK,UAAU,0BAA0B;IAC5C,MAAM,GAAG,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAC/B,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpD,GAAG,CAAC,aAAa,EAAE;QACnB,GAAG,CAAC,0BAA0B,EAAE;KACnC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,6BAAY,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAE9D,MAAM,KAAK,GAAG,UAAU;SACnB,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QACd,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,yCAAwB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,EAAE;YACP,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;IAChC,CAAC,CAAC;SACD,MAAM,CAA+B,OAAc,CAAC,CAAC;IAE1D,OAAO;QACH,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC;AAvBD,gEAuBC"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getGalleryPageStaticProps = exports.getGalleryPageServerSideProps = void 0;
|
|
4
4
|
const theme_kit_core_1 = require("@prezly/theme-kit-core");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
|
|
6
|
+
const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
|
|
7
|
+
const processRequest_1 = require("../processRequest");
|
|
8
|
+
const processStaticRequest_1 = require("../processStaticRequest");
|
|
9
9
|
function getGalleryPageServerSideProps(customProps, options) {
|
|
10
10
|
const { pageSize = theme_kit_core_1.DEFAULT_GALLERY_PAGE_SIZE } = options || {};
|
|
11
11
|
return async function getServerSideProps(context) {
|
|
12
|
-
const { api, serverSideProps } = await (0,
|
|
12
|
+
const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
|
|
13
13
|
const { query } = context;
|
|
14
14
|
const page = query.page && typeof query.page === 'string' ? Number(query.page) : undefined;
|
|
15
15
|
const { galleries, pagination } = await api.getGalleries({ page, pageSize });
|
|
@@ -23,7 +23,7 @@ function getGalleryPageServerSideProps(customProps, options) {
|
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
return (0,
|
|
26
|
+
return (0, processRequest_1.processRequest)(context, {
|
|
27
27
|
...serverSideProps,
|
|
28
28
|
galleries,
|
|
29
29
|
pagination: {
|
|
@@ -41,7 +41,7 @@ exports.getGalleryPageServerSideProps = getGalleryPageServerSideProps;
|
|
|
41
41
|
function getGalleryPageStaticProps(customProps, options) {
|
|
42
42
|
const { pageSize = theme_kit_core_1.DEFAULT_GALLERY_PAGE_SIZE } = options || {};
|
|
43
43
|
return async function getStaticProps(context) {
|
|
44
|
-
const { api, staticProps } = await (0,
|
|
44
|
+
const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
|
|
45
45
|
const { galleries, pagination } = await api.getGalleries({ pageSize });
|
|
46
46
|
// If there's only one gallery, redirect to it immediately
|
|
47
47
|
if (galleries.length === 1) {
|
|
@@ -53,7 +53,7 @@ function getGalleryPageStaticProps(customProps, options) {
|
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
return (0,
|
|
56
|
+
return (0, processStaticRequest_1.processStaticRequest)(context, {
|
|
57
57
|
...staticProps,
|
|
58
58
|
galleries,
|
|
59
59
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@@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getGalleryAlbumPageStaticPaths = exports.getGalleryAlbumPageStaticProps = exports.getGalleryAlbumPageServerSideProps = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
4
|
+
const data_fetching_1 = require("../../data-fetching");
|
|
5
|
+
const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
|
|
6
|
+
const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
|
|
7
|
+
const processRequest_1 = require("../processRequest");
|
|
8
|
+
const processStaticRequest_1 = require("../processStaticRequest");
|
|
9
9
|
function getGalleryAlbumPageServerSideProps(customProps) {
|
|
10
10
|
return async function getServerSideProps(context) {
|
|
11
|
-
const { api, serverSideProps } = await (0,
|
|
11
|
+
const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
|
|
12
12
|
const { uuid } = context.params;
|
|
13
13
|
const gallery = await api.getGallery(uuid);
|
|
14
14
|
if (!gallery || !gallery.images_number) {
|
|
15
15
|
return { notFound: true };
|
|
16
16
|
}
|
|
17
|
-
return (0,
|
|
17
|
+
return (0, processRequest_1.processRequest)(context, {
|
|
18
18
|
...serverSideProps,
|
|
19
19
|
gallery,
|
|
20
20
|
...(typeof customProps === 'function'
|
|
@@ -26,13 +26,13 @@ function getGalleryAlbumPageServerSideProps(customProps) {
|
|
|
26
26
|
exports.getGalleryAlbumPageServerSideProps = getGalleryAlbumPageServerSideProps;
|
|
27
27
|
function getGalleryAlbumPageStaticProps(customProps) {
|
|
28
28
|
return async function getStaticProps(context) {
|
|
29
|
-
const { api, staticProps } = await (0,
|
|
29
|
+
const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
|
|
30
30
|
const { uuid } = context.params;
|
|
31
31
|
const gallery = await api.getGallery(uuid);
|
|
32
32
|
if (!gallery || !gallery.images_number) {
|
|
33
33
|
return { notFound: true };
|
|
34
34
|
}
|
|
35
|
-
return (0,
|
|
35
|
+
return (0, processStaticRequest_1.processStaticRequest)(context, {
|
|
36
36
|
...staticProps,
|
|
37
37
|
gallery,
|
|
38
38
|
...(typeof customProps === 'function'
|
|
@@ -43,7 +43,7 @@ function getGalleryAlbumPageStaticProps(customProps) {
|
|
|
43
43
|
}
|
|
44
44
|
exports.getGalleryAlbumPageStaticProps = getGalleryAlbumPageStaticProps;
|
|
45
45
|
async function getGalleryAlbumPageStaticPaths() {
|
|
46
|
-
const api = (0,
|
|
46
|
+
const api = (0, data_fetching_1.getNextPrezlyApi)();
|
|
47
47
|
const { galleries } = await api.getGalleries({});
|
|
48
48
|
const paths = galleries.map(({ uuid }) => ({ params: { uuid } }));
|
|
49
49
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AASA,uDAAuD;AACvD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAQ/D,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAE3E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YACpC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7B;QAED,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,OAAO;YACP,GAAG,CAAC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H,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC;AAVD,wEAUC"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHomepageStaticProps = exports.getHomepageServerSideProps = void 0;
|
|
4
4
|
const theme_kit_core_1 = require("@prezly/theme-kit-core");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
|
|
6
|
+
const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
|
|
7
|
+
const processRequest_1 = require("../processRequest");
|
|
8
|
+
const processStaticRequest_1 = require("../processStaticRequest");
|
|
9
9
|
function getHomepageServerSideProps(customProps, options) {
|
|
10
10
|
const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields, pinning = false, withHighlightedStory = false, filterQuery, } = options || {};
|
|
11
11
|
return async function getServerSideProps(context) {
|
|
12
|
-
const { api, serverSideProps } = await (0,
|
|
12
|
+
const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context, {
|
|
13
13
|
loadHomepageContacts: true,
|
|
14
14
|
});
|
|
15
15
|
const { query } = context;
|
|
@@ -25,7 +25,7 @@ function getHomepageServerSideProps(customProps, options) {
|
|
|
25
25
|
filterQuery,
|
|
26
26
|
});
|
|
27
27
|
const { stories, storiesTotal } = storiesPaginated;
|
|
28
|
-
return (0,
|
|
28
|
+
return (0, processRequest_1.processRequest)(context, {
|
|
29
29
|
...serverSideProps,
|
|
30
30
|
// TODO: This is temporary until return types from API are figured out
|
|
31
31
|
stories: stories,
|
|
@@ -45,7 +45,7 @@ exports.getHomepageServerSideProps = getHomepageServerSideProps;
|
|
|
45
45
|
function getHomepageStaticProps(customProps, options) {
|
|
46
46
|
const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields, pinning = false } = options || {};
|
|
47
47
|
return async function getStaticProps(context) {
|
|
48
|
-
const { api, staticProps } = await (0,
|
|
48
|
+
const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context, {
|
|
49
49
|
loadHomepageContacts: true,
|
|
50
50
|
});
|
|
51
51
|
const { localeCode } = staticProps.newsroomContextProps;
|
|
@@ -56,7 +56,7 @@ function getHomepageStaticProps(customProps, options) {
|
|
|
56
56
|
localeCode,
|
|
57
57
|
});
|
|
58
58
|
const { stories, storiesTotal } = storiesPaginated;
|
|
59
|
-
return (0,
|
|
59
|
+
return (0, processStaticRequest_1.processStaticRequest)(context, {
|
|
60
60
|
...staticProps,
|
|
61
61
|
// TODO: This is temporary until return types from API are figured out
|
|
62
62
|
stories: stories,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/home.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAS3D,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAqB/D,SAAgB,0BAA0B,CAGxC,WAAqD,EAAE,OAAiB;IACtE,MAAM,EACF,QAAQ,GAAG,kCAAiB,EAC5B,gBAAgB,EAChB,OAAO,GAAG,KAAK,EACf,oBAAoB,GAAG,KAAK,EAC5B,WAAW,GACd,GAAG,OAAO,IAAI,EAAE,CAAC;IAElB,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,EAAE;YACvE,oBAAoB,EAAE,IAAI;SAC7B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC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R,OAAO;YACP,OAAO,EAAE,gBAAgB;YACzB,UAAU;SACb,CAAC,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;QAEnD,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,sEAAsE;YACtE,OAAO,EAAE,OAAsB;YAC/B,UAAU,EAAE;gBACR,UAAU,EAAE,YAAY;gBACxB,WAAW,EAAE,CAAC;gBACd,QAAQ;aACX;YACD,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAxCD,wDAwCC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { getCategoryPageServerSideProps, getCategoryPageStaticPaths, getCategoryPageStaticProps, type CategoryPageProps, } from './category
|
|
2
|
-
export { getGalleryPageServerSideProps, getGalleryPageStaticProps, type GalleryPageProps, } from './gallery
|
|
3
|
-
export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, type GalleryAlbumPageProps, } from './galleryAlbum
|
|
4
|
-
export { getHomepageServerSideProps, getHomepageStaticProps, type HomePageProps } from './home
|
|
5
|
-
export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search
|
|
6
|
-
export * from './sitemap
|
|
7
|
-
export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story
|
|
8
|
-
export { getStoryPreviewPageServerSideProps } from './storyPreview
|
|
1
|
+
export { getCategoryPageServerSideProps, getCategoryPageStaticPaths, getCategoryPageStaticProps, type CategoryPageProps, } from './category';
|
|
2
|
+
export { getGalleryPageServerSideProps, getGalleryPageStaticProps, type GalleryPageProps, } from './gallery';
|
|
3
|
+
export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, type GalleryAlbumPageProps, } from './galleryAlbum';
|
|
4
|
+
export { getHomepageServerSideProps, getHomepageStaticProps, type HomePageProps } from './home';
|
|
5
|
+
export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search';
|
|
6
|
+
export * from './sitemap';
|
|
7
|
+
export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story';
|
|
8
|
+
export { getStoryPreviewPageServerSideProps } from './storyPreview';
|
|
@@ -15,28 +15,28 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.getStoryPreviewPageServerSideProps = exports.getStoryPageStaticProps = exports.getStoryPageStaticPaths = exports.getStoryPageServerSideProps = exports.getSearchPageStaticProps = exports.getSearchPageServerSideProps = exports.getHomepageStaticProps = exports.getHomepageServerSideProps = exports.getGalleryAlbumPageStaticProps = exports.getGalleryAlbumPageStaticPaths = exports.getGalleryAlbumPageServerSideProps = exports.getGalleryPageStaticProps = exports.getGalleryPageServerSideProps = exports.getCategoryPageStaticProps = exports.getCategoryPageStaticPaths = exports.getCategoryPageServerSideProps = void 0;
|
|
18
|
-
var
|
|
19
|
-
Object.defineProperty(exports, "getCategoryPageServerSideProps", { enumerable: true, get: function () { return
|
|
20
|
-
Object.defineProperty(exports, "getCategoryPageStaticPaths", { enumerable: true, get: function () { return
|
|
21
|
-
Object.defineProperty(exports, "getCategoryPageStaticProps", { enumerable: true, get: function () { return
|
|
22
|
-
var
|
|
23
|
-
Object.defineProperty(exports, "getGalleryPageServerSideProps", { enumerable: true, get: function () { return
|
|
24
|
-
Object.defineProperty(exports, "getGalleryPageStaticProps", { enumerable: true, get: function () { return
|
|
25
|
-
var
|
|
26
|
-
Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", { enumerable: true, get: function () { return
|
|
27
|
-
Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", { enumerable: true, get: function () { return
|
|
28
|
-
Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", { enumerable: true, get: function () { return
|
|
29
|
-
var
|
|
30
|
-
Object.defineProperty(exports, "getHomepageServerSideProps", { enumerable: true, get: function () { return
|
|
31
|
-
Object.defineProperty(exports, "getHomepageStaticProps", { enumerable: true, get: function () { return
|
|
32
|
-
var
|
|
33
|
-
Object.defineProperty(exports, "getSearchPageServerSideProps", { enumerable: true, get: function () { return
|
|
34
|
-
Object.defineProperty(exports, "getSearchPageStaticProps", { enumerable: true, get: function () { return
|
|
35
|
-
__exportStar(require("./sitemap
|
|
36
|
-
var
|
|
37
|
-
Object.defineProperty(exports, "getStoryPageServerSideProps", { enumerable: true, get: function () { return
|
|
38
|
-
Object.defineProperty(exports, "getStoryPageStaticPaths", { enumerable: true, get: function () { return
|
|
39
|
-
Object.defineProperty(exports, "getStoryPageStaticProps", { enumerable: true, get: function () { return
|
|
40
|
-
var
|
|
41
|
-
Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", { enumerable: true, get: function () { return
|
|
18
|
+
var category_1 = require("./category");
|
|
19
|
+
Object.defineProperty(exports, "getCategoryPageServerSideProps", { enumerable: true, get: function () { return category_1.getCategoryPageServerSideProps; } });
|
|
20
|
+
Object.defineProperty(exports, "getCategoryPageStaticPaths", { enumerable: true, get: function () { return category_1.getCategoryPageStaticPaths; } });
|
|
21
|
+
Object.defineProperty(exports, "getCategoryPageStaticProps", { enumerable: true, get: function () { return category_1.getCategoryPageStaticProps; } });
|
|
22
|
+
var gallery_1 = require("./gallery");
|
|
23
|
+
Object.defineProperty(exports, "getGalleryPageServerSideProps", { enumerable: true, get: function () { return gallery_1.getGalleryPageServerSideProps; } });
|
|
24
|
+
Object.defineProperty(exports, "getGalleryPageStaticProps", { enumerable: true, get: function () { return gallery_1.getGalleryPageStaticProps; } });
|
|
25
|
+
var galleryAlbum_1 = require("./galleryAlbum");
|
|
26
|
+
Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageServerSideProps; } });
|
|
27
|
+
Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageStaticPaths; } });
|
|
28
|
+
Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageStaticProps; } });
|
|
29
|
+
var home_1 = require("./home");
|
|
30
|
+
Object.defineProperty(exports, "getHomepageServerSideProps", { enumerable: true, get: function () { return home_1.getHomepageServerSideProps; } });
|
|
31
|
+
Object.defineProperty(exports, "getHomepageStaticProps", { enumerable: true, get: function () { return home_1.getHomepageStaticProps; } });
|
|
32
|
+
var search_1 = require("./search");
|
|
33
|
+
Object.defineProperty(exports, "getSearchPageServerSideProps", { enumerable: true, get: function () { return search_1.getSearchPageServerSideProps; } });
|
|
34
|
+
Object.defineProperty(exports, "getSearchPageStaticProps", { enumerable: true, get: function () { return search_1.getSearchPageStaticProps; } });
|
|
35
|
+
__exportStar(require("./sitemap"), exports);
|
|
36
|
+
var story_1 = require("./story");
|
|
37
|
+
Object.defineProperty(exports, "getStoryPageServerSideProps", { enumerable: true, get: function () { return story_1.getStoryPageServerSideProps; } });
|
|
38
|
+
Object.defineProperty(exports, "getStoryPageStaticPaths", { enumerable: true, get: function () { return story_1.getStoryPageStaticPaths; } });
|
|
39
|
+
Object.defineProperty(exports, "getStoryPageStaticProps", { enumerable: true, get: function () { return story_1.getStoryPageStaticProps; } });
|
|
40
|
+
var storyPreview_1 = require("./storyPreview");
|
|
41
|
+
Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", { enumerable: true, get: function () { return storyPreview_1.getStoryPreviewPageServerSideProps; } });
|
|
42
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAKoB;AAJhB,0HAAA,8BAA8B,OAAA;AAC9B,sHAAA,0BAA0B,OAAA;AAC1B,sHAAA,0BAA0B,OAAA;AAG9B,qCAImB;AAHf,wHAAA,6BAA6B,OAAA;AAC7B,oHAAA,yBAAyB,OAAA;AAG7B,+CAKwB;AAJpB,kIAAA,kCAAkC,OAAA;AAClC,8HAAA,8BAA8B,OAAA;AAC9B,8HAAA,8BAA8B,OAAA;AAGlC,+BAAgG;AAAvF,kHAAA,0BAA0B,OAAA;AAAE,8GAAA,sBAAsB,OAAA;AAC3D,mCAAkF;AAAzE,sHAAA,4BAA4B,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAC/D,4CAA0B;AAC1B,iCAIiB;AAHb,oHAAA,2BAA2B,OAAA;AAC3B,gHAAA,uBAAuB,OAAA;AACvB,gHAAA,uBAAuB,OAAA;AAE3B,+CAAoE;AAA3D,kIAAA,kCAAkC,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/lib/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSearchPageStaticProps = exports.getSearchPageServerSideProps = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
|
|
5
|
+
const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
|
|
6
|
+
const processRequest_1 = require("../processRequest");
|
|
7
|
+
const processStaticRequest_1 = require("../processStaticRequest");
|
|
8
8
|
function getSearchPageServerSideProps(customProps) {
|
|
9
9
|
return async function getServerSideProps(context) {
|
|
10
|
-
const { serverSideProps } = await (0,
|
|
11
|
-
return (0,
|
|
10
|
+
const { serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
|
|
11
|
+
return (0, processRequest_1.processRequest)(context, {
|
|
12
12
|
...serverSideProps,
|
|
13
13
|
...(typeof customProps === 'function'
|
|
14
14
|
? await customProps(context, serverSideProps)
|
|
@@ -19,8 +19,8 @@ function getSearchPageServerSideProps(customProps) {
|
|
|
19
19
|
exports.getSearchPageServerSideProps = getSearchPageServerSideProps;
|
|
20
20
|
function getSearchPageStaticProps(customProps) {
|
|
21
21
|
return async function getStaticProps(context) {
|
|
22
|
-
const { staticProps } = await (0,
|
|
23
|
-
return (0,
|
|
22
|
+
const { staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
|
|
23
|
+
return (0, processStaticRequest_1.processStaticRequest)(context, {
|
|
24
24
|
...staticProps,
|
|
25
25
|
...(typeof customProps === 'function'
|
|
26
26
|
? await customProps(context, staticProps)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/search.ts"],"names":[],"mappings":";;;AAMA,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAI/D,SAAgB,4BAA4B,CACxC,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAEtE,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,SAAS,CACZ,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAnBD,oEAmBC;AAED,SAAgB,wBAAwB,CACpC,WAA4E;IAE5E,OAAO,KAAK,UAAU,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