@prezly/theme-kit-nextjs 4.2.1 → 4.3.1
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/esm/adapter-nextjs/api-handlers/fetchGalleries.js +1 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js +1 -1
- package/build/esm/adapter-nextjs/api-handlers/index.js +2 -2
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js +1 -1
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js +1 -1
- package/build/esm/adapter-nextjs/index.js +6 -6
- package/build/esm/adapter-nextjs/page-props/category.js +5 -5
- package/build/esm/adapter-nextjs/page-props/gallery.js +4 -4
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +5 -5
- package/build/esm/adapter-nextjs/page-props/home.js +4 -4
- package/build/esm/adapter-nextjs/page-props/index.js +8 -8
- package/build/esm/adapter-nextjs/page-props/search.js +4 -4
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +3 -3
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js +4 -4
- package/build/esm/adapter-nextjs/page-props/story.js +6 -6
- package/build/esm/adapter-nextjs/page-props/storyPreview.js +3 -3
- package/build/esm/adapter-nextjs/processRequest.js +1 -1
- package/build/esm/client.js +3 -3
- package/build/esm/components-nextjs/PageSeo/PageSeo.js +2 -2
- package/build/esm/components-nextjs/PageSeo/index.js +1 -1
- package/build/esm/components-nextjs/PageSeo/lib/index.js +1 -1
- package/build/esm/components-nextjs/StorySeo/index.js +1 -1
- package/build/esm/components-nextjs/index.js +3 -3
- package/build/esm/data-fetching/NextPrezlyApi.js +1 -1
- package/build/esm/data-fetching/getNextPrezlyApi.js +1 -1
- package/build/esm/data-fetching/index.js +1 -1
- package/build/esm/index.js +8 -8
- package/build/esm/infinite-loading/index.js +4 -4
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js +1 -1
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +2 -2
- package/build/esm/intl/index.js +2 -2
- package/build/esm/intl/languages.js +1 -1
- package/build/esm/newsroom-context/hooks/index.js +11 -11
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js +1 -1
- package/build/esm/newsroom-context/hooks/useCategories.js +1 -1
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentStory.js +1 -1
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js +2 -2
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js +2 -2
- package/build/esm/newsroom-context/hooks/useLanguages.js +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroom.js +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js +1 -1
- package/build/esm/newsroom-context/index.js +2 -2
- package/build/esm/sentry/client.js +1 -1
- package/build/esm/sentry/index.js +2 -2
- package/build/esm/sentry/server.js +1 -1
- package/build/esm/server.js +2 -2
- package/build/tsconfig.cjs.tsbuildinfo +1 -1
- package/build/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +7 -5
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { fetchGalleries } from './fetchGalleries';
|
|
2
|
-
export { fetchStories } from './fetchStories';
|
|
1
|
+
export { fetchGalleries } from './fetchGalleries.js';
|
|
2
|
+
export { fetchStories } from './fetchStories.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../data-fetching';
|
|
1
|
+
import { getNextPrezlyApi } from '../data-fetching.js';
|
|
2
2
|
/**
|
|
3
3
|
* Use this function in your `getServerSideProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
|
|
4
4
|
* See README for usage examples.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../data-fetching';
|
|
1
|
+
import { getNextPrezlyApi } from '../data-fetching.js';
|
|
2
2
|
/**
|
|
3
3
|
* Use this function in your `getNewsroomStaticProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
|
|
4
4
|
* See README for usage examples.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './api-handlers';
|
|
2
|
-
export * from './getNewsroomServerSideProps';
|
|
3
|
-
export * from './getNewsroomStaticProps';
|
|
4
|
-
export * from './page-props';
|
|
5
|
-
export * from './processRequest';
|
|
6
|
-
export * from './processStaticRequest';
|
|
1
|
+
export * from './api-handlers.js';
|
|
2
|
+
export * from './getNewsroomServerSideProps.js';
|
|
3
|
+
export * from './getNewsroomStaticProps.js';
|
|
4
|
+
export * from './page-props.js';
|
|
5
|
+
export * from './processRequest.js';
|
|
6
|
+
export * from './processStaticRequest.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DEFAULT_PAGE_SIZE, getLocalizedCategoryData, LocaleObject } from '@prezly/theme-kit-core';
|
|
2
|
-
import { getNextPrezlyApi } from '../../data-fetching';
|
|
3
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
4
|
-
import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
|
|
5
|
-
import { processRequest } from '../processRequest';
|
|
6
|
-
import { processStaticRequest } from '../processStaticRequest';
|
|
2
|
+
import { getNextPrezlyApi } from '../../data-fetching.js';
|
|
3
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
4
|
+
import { getNewsroomStaticProps } from '../getNewsroomStaticProps.js';
|
|
5
|
+
import { processRequest } from '../processRequest.js';
|
|
6
|
+
import { processStaticRequest } from '../processStaticRequest.js';
|
|
7
7
|
export function getCategoryPageServerSideProps(customProps, options) {
|
|
8
8
|
const { pageSize = DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
|
|
9
9
|
return async function getServerSideProps(context) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DEFAULT_GALLERY_PAGE_SIZE } from '@prezly/theme-kit-core';
|
|
2
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
3
|
-
import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
|
|
4
|
-
import { processRequest } from '../processRequest';
|
|
5
|
-
import { processStaticRequest } from '../processStaticRequest';
|
|
2
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
3
|
+
import { getNewsroomStaticProps } from '../getNewsroomStaticProps.js';
|
|
4
|
+
import { processRequest } from '../processRequest.js';
|
|
5
|
+
import { processStaticRequest } from '../processStaticRequest.js';
|
|
6
6
|
export function getGalleryPageServerSideProps(customProps, options) {
|
|
7
7
|
const { pageSize = DEFAULT_GALLERY_PAGE_SIZE } = options || {};
|
|
8
8
|
return async function getServerSideProps(context) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../../data-fetching';
|
|
2
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
3
|
-
import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
|
|
4
|
-
import { processRequest } from '../processRequest';
|
|
5
|
-
import { processStaticRequest } from '../processStaticRequest';
|
|
1
|
+
import { getNextPrezlyApi } from '../../data-fetching.js';
|
|
2
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
3
|
+
import { getNewsroomStaticProps } from '../getNewsroomStaticProps.js';
|
|
4
|
+
import { processRequest } from '../processRequest.js';
|
|
5
|
+
import { processStaticRequest } from '../processStaticRequest.js';
|
|
6
6
|
export function getGalleryAlbumPageServerSideProps(customProps) {
|
|
7
7
|
return async function getServerSideProps(context) {
|
|
8
8
|
const { api, serverSideProps } = await getNewsroomServerSideProps(context);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DEFAULT_PAGE_SIZE } from '@prezly/theme-kit-core';
|
|
2
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
3
|
-
import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
|
|
4
|
-
import { processRequest } from '../processRequest';
|
|
5
|
-
import { processStaticRequest } from '../processStaticRequest';
|
|
2
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
3
|
+
import { getNewsroomStaticProps } from '../getNewsroomStaticProps.js';
|
|
4
|
+
import { processRequest } from '../processRequest.js';
|
|
5
|
+
import { processStaticRequest } from '../processStaticRequest.js';
|
|
6
6
|
export function getHomepageServerSideProps(customProps, options) {
|
|
7
7
|
const { pageSize = DEFAULT_PAGE_SIZE, extraStoryFields, pinning = false, withHighlightedStory = false, filterQuery, } = options || {};
|
|
8
8
|
return async function getServerSideProps(context) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { getCategoryPageServerSideProps, getCategoryPageStaticPaths, getCategoryPageStaticProps, } from './category';
|
|
2
|
-
export { getGalleryPageServerSideProps, getGalleryPageStaticProps, } from './gallery';
|
|
3
|
-
export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, } from './galleryAlbum';
|
|
4
|
-
export { getHomepageServerSideProps, getHomepageStaticProps } 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, } from './category.js';
|
|
2
|
+
export { getGalleryPageServerSideProps, getGalleryPageStaticProps, } from './gallery.js';
|
|
3
|
+
export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, } from './galleryAlbum.js';
|
|
4
|
+
export { getHomepageServerSideProps, getHomepageStaticProps } from './home.js';
|
|
5
|
+
export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search.js';
|
|
6
|
+
export * from './sitemap.js';
|
|
7
|
+
export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story.js';
|
|
8
|
+
export { getStoryPreviewPageServerSideProps } from './storyPreview.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
2
|
-
import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
|
|
3
|
-
import { processRequest } from '../processRequest';
|
|
4
|
-
import { processStaticRequest } from '../processStaticRequest';
|
|
1
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
2
|
+
import { getNewsroomStaticProps } from '../getNewsroomStaticProps.js';
|
|
3
|
+
import { processRequest } from '../processRequest.js';
|
|
4
|
+
import { processStaticRequest } from '../processStaticRequest.js';
|
|
5
5
|
export function getSearchPageServerSideProps(customProps) {
|
|
6
6
|
return async function getServerSideProps(context) {
|
|
7
7
|
const { serverSideProps } = await getNewsroomServerSideProps(context);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../../../data-fetching';
|
|
2
|
-
import { createPaths } from './createPaths';
|
|
3
|
-
import { SitemapBuilder } from './SitemapBuilder';
|
|
1
|
+
import { getNextPrezlyApi } from '../../../data-fetching.js';
|
|
2
|
+
import { createPaths } from './createPaths.js';
|
|
3
|
+
import { SitemapBuilder } from './SitemapBuilder.js';
|
|
4
4
|
export function getSitemapServerSideProps(options = {}) {
|
|
5
5
|
return async function getServerSideProps(ctx) {
|
|
6
6
|
const { res, req } = ctx;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { getSitemapServerSideProps } from './getServerSideProps';
|
|
2
|
-
export { SitemapBuilder } from './SitemapBuilder';
|
|
3
|
-
export { createPaths } from './createPaths';
|
|
4
|
-
export * from './types';
|
|
1
|
+
export { getSitemapServerSideProps } from './getServerSideProps.js';
|
|
2
|
+
export { SitemapBuilder } from './SitemapBuilder.js';
|
|
3
|
+
export { createPaths } from './createPaths.js';
|
|
4
|
+
export * from './types.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../../data-fetching';
|
|
2
|
-
import { DUMMY_DEFAULT_LOCALE } from '../../intl';
|
|
3
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
4
|
-
import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
|
|
5
|
-
import { processRequest } from '../processRequest';
|
|
6
|
-
import { processStaticRequest } from '../processStaticRequest';
|
|
1
|
+
import { getNextPrezlyApi } from '../../data-fetching.js';
|
|
2
|
+
import { DUMMY_DEFAULT_LOCALE } from '../../intl.js';
|
|
3
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
4
|
+
import { getNewsroomStaticProps } from '../getNewsroomStaticProps.js';
|
|
5
|
+
import { processRequest } from '../processRequest.js';
|
|
6
|
+
import { processStaticRequest } from '../processStaticRequest.js';
|
|
7
7
|
export function getStoryPageServerSideProps(customProps) {
|
|
8
8
|
return async function getServerSideProps(context) {
|
|
9
9
|
const api = getNextPrezlyApi(context.req);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../../data-fetching';
|
|
2
|
-
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
|
|
3
|
-
import { processRequest } from '../processRequest';
|
|
1
|
+
import { getNextPrezlyApi } from '../../data-fetching.js';
|
|
2
|
+
import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps.js';
|
|
3
|
+
import { processRequest } from '../processRequest.js';
|
|
4
4
|
export function getStoryPreviewPageServerSideProps(customProps) {
|
|
5
5
|
return async function getServerSideProps(context) {
|
|
6
6
|
const api = getNextPrezlyApi(context.req);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getShortestLocaleCode, LocaleObject } from '@prezly/theme-kit-core';
|
|
2
|
-
import { getRedirectToCanonicalLocale } from '../intl';
|
|
2
|
+
import { getRedirectToCanonicalLocale } from '../intl.js';
|
|
3
3
|
/**
|
|
4
4
|
* This function combines the props returned from `getNewsroomServerSideProps` and your optional custom props for the page.
|
|
5
5
|
* It also handles locale redirects, if `canonicalUrl` parameter is provided.
|
package/build/esm/client.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This is a subset export created for Next 13 /app directory, which doesn't support tree-shaking properly.
|
|
3
3
|
* See https://github.com/vercel/next.js/issues/12557
|
|
4
4
|
*/
|
|
5
|
-
export * from './components-nextjs';
|
|
6
|
-
export * from './infinite-loading';
|
|
7
|
-
export * from './newsroom-context';
|
|
5
|
+
export * from './components-nextjs.js';
|
|
6
|
+
export * from './infinite-loading.js';
|
|
7
|
+
export * from './newsroom-context.js';
|
|
8
8
|
//# sourceMappingURL=client.js.map
|
|
@@ -4,8 +4,8 @@ import { getAlternateLanguageLinks, getNewsroomLogoUrl, getUsedLanguages, } from
|
|
|
4
4
|
import { useRouter } from 'next/router';
|
|
5
5
|
import { NextSeo } from 'next-seo';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
|
-
import { useCompanyInformation, useCurrentLocale, useCurrentStory, useGetLinkLocaleSlug, useGetTranslationUrl, useLanguages, useNewsroom, } from '../../newsroom-context';
|
|
8
|
-
import { getAbsoluteUrl } from './lib';
|
|
7
|
+
import { useCompanyInformation, useCurrentLocale, useCurrentStory, useGetLinkLocaleSlug, useGetTranslationUrl, useLanguages, useNewsroom, } from '../../newsroom-context.js';
|
|
8
|
+
import { getAbsoluteUrl } from './lib.js';
|
|
9
9
|
/**
|
|
10
10
|
* This component provides base page attributes for every Newsroom page.
|
|
11
11
|
* It depends on information from NewsroomContext, so the component should be placed inside the `NewsroomContextProvider`.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { PageSeo } from './PageSeo';
|
|
1
|
+
export { PageSeo } from './PageSeo.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getAbsoluteUrl } from './getAbsoluteUrl';
|
|
1
|
+
export { getAbsoluteUrl } from './getAbsoluteUrl.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { StorySeo } from './StorySeo';
|
|
1
|
+
export { StorySeo } from './StorySeo.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PageSeo } from './PageSeo';
|
|
2
|
-
export { StorySeo } from './StorySeo';
|
|
3
|
-
export { PrezlyThemeDocument } from './document';
|
|
1
|
+
export { PageSeo } from './PageSeo.js';
|
|
2
|
+
export { StorySeo } from './StorySeo.js';
|
|
3
|
+
export { PrezlyThemeDocument } from './document.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getAlgoliaSettings, getCompanyInformation, getDefaultLanguage, getLanguageFromStory, getNotifications, LocaleObject, PrezlyApi, } from '@prezly/theme-kit-core';
|
|
2
|
-
import { getLanguageFromNextLocaleIsoCode } from '../intl';
|
|
2
|
+
import { getLanguageFromNextLocaleIsoCode } from '../intl.js';
|
|
3
3
|
export class NextPrezlyApi extends PrezlyApi {
|
|
4
4
|
async getNewsroomServerSideProps(request, nextLocaleIsoCode, story) {
|
|
5
5
|
const [newsroom, languages, categories, themePreset] = await Promise.all([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnvVariables } from '@prezly/theme-kit-core';
|
|
2
|
-
import { NextPrezlyApi } from './NextPrezlyApi';
|
|
2
|
+
import { NextPrezlyApi } from './NextPrezlyApi.js';
|
|
3
3
|
export function getNextPrezlyApi(req) {
|
|
4
4
|
if (typeof window !== 'undefined') {
|
|
5
5
|
throw new Error('"getNextPrezlyApi" should only be used on back-end side.');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getNextPrezlyApi } from './getNextPrezlyApi';
|
|
1
|
+
export { getNextPrezlyApi } from './getNextPrezlyApi.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/build/esm/index.js
CHANGED
|
@@ -1,9 +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';
|
|
1
|
+
export * from './adapter-nextjs.js';
|
|
2
|
+
export * from './components-nextjs.js';
|
|
3
|
+
export * from './data-fetching.js';
|
|
4
|
+
export * from './infinite-loading.js';
|
|
5
|
+
export * from './intl.js';
|
|
6
|
+
export * from './newsroom-context.js';
|
|
7
|
+
export * from './sentry.js';
|
|
8
|
+
export * from './types.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { useInfiniteLoading } from './useInfiniteLoading';
|
|
2
|
-
export { useInfiniteStoriesLoading } from './useInfiniteStoriesLoading';
|
|
3
|
-
export { useInfiniteGalleriesLoading } from './useInfiniteGalleriesLoading';
|
|
4
|
-
export * from './types';
|
|
1
|
+
export { useInfiniteLoading } from './useInfiniteLoading.js';
|
|
2
|
+
export { useInfiniteStoriesLoading } from './useInfiniteStoriesLoading.js';
|
|
3
|
+
export { useInfiniteGalleriesLoading } from './useInfiniteGalleriesLoading.js';
|
|
4
|
+
export * from './types.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { useCurrentLocale } from '../newsroom-context';
|
|
3
|
-
import { useInfiniteLoading } from './useInfiniteLoading';
|
|
2
|
+
import { useCurrentLocale } from '../newsroom-context.js';
|
|
3
|
+
import { useInfiniteLoading } from './useInfiniteLoading.js';
|
|
4
4
|
async function fetchStories(page, pageSize, withHighlightedStory, category, locale, include, pinning, filterQuery) {
|
|
5
5
|
const result = await fetch('/api/fetch-stories', {
|
|
6
6
|
method: 'POST',
|
package/build/esm/intl/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './languages';
|
|
2
|
-
export * from './locale';
|
|
1
|
+
export * from './languages.js';
|
|
2
|
+
export * from './locale.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultLanguage, getLanguageByExactLocaleCode, getLanguageByNeutralLocaleCode, getLanguageByShortRegionCode, LocaleObject, } from '@prezly/theme-kit-core';
|
|
2
|
-
import { DUMMY_DEFAULT_LOCALE } from './locale';
|
|
2
|
+
import { DUMMY_DEFAULT_LOCALE } from './locale.js';
|
|
3
3
|
/**
|
|
4
4
|
* Retrieve a culture with fallback to legacy codes support.
|
|
5
5
|
* Pulled from https://github.com/prezly/prezly/blob/de9900d9890a33502780494aa3fb85c9a732b3c3/lib/model/CulturePeer.php#L91-L114
|
|
@@ -1,12 +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';
|
|
1
|
+
export * from './useAlgoliaSettings.js';
|
|
2
|
+
export * from './useCategories.js';
|
|
3
|
+
export * from './useCompanyInformation.js';
|
|
4
|
+
export * from './useCurrentCategory.js';
|
|
5
|
+
export * from './useCurrentLocale.js';
|
|
6
|
+
export * from './useCurrentStory.js';
|
|
7
|
+
export * from './useGetLinkLocaleSlug.js';
|
|
8
|
+
export * from './useGetTranslationUrl.js';
|
|
9
|
+
export * from './useLanguages.js';
|
|
10
|
+
export * from './useNewsroom.js';
|
|
11
|
+
export * from './useNewsroomContext.js';
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getShortestLocaleCode, LocaleObject } from '@prezly/theme-kit-core';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { useCurrentLocale } from './useCurrentLocale';
|
|
4
|
-
import { useLanguages } from './useLanguages';
|
|
3
|
+
import { useCurrentLocale } from './useCurrentLocale.js';
|
|
4
|
+
import { useLanguages } from './useLanguages.js';
|
|
5
5
|
/**
|
|
6
6
|
* Determines correct locale slug for the link (trying to shorten the locale code if possible).
|
|
7
7
|
* E.g. if newsroom has a single locale for Dutch (`nl_BE`), it will be shortened to `nl`.
|
|
@@ -2,8 +2,8 @@ import { Story } from '@prezly/sdk';
|
|
|
2
2
|
import { getCategoryHasTranslation, getCategoryUrl } from '@prezly/theme-kit-core';
|
|
3
3
|
import { useRouter } from 'next/router';
|
|
4
4
|
import { useCallback } from 'react';
|
|
5
|
-
import { useCurrentCategory } from './useCurrentCategory';
|
|
6
|
-
import { useCurrentStory } from './useCurrentStory';
|
|
5
|
+
import { useCurrentCategory } from './useCurrentCategory.js';
|
|
6
|
+
import { useCurrentStory } from './useCurrentStory.js';
|
|
7
7
|
// Pulled from SDK types to not leak the `@prezly/sdk` dependency into the client bundle
|
|
8
8
|
// It looks like a hack, but the name of enum must be the same as in SDK
|
|
9
9
|
var Visibility;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
|
-
import { NewsroomContext } from '../context';
|
|
2
|
+
import { NewsroomContext } from '../context.js';
|
|
3
3
|
export function useNewsroomContext() {
|
|
4
4
|
// TS Compiler is having a hard time figuring this type implicitly, so we have to set it explicitly
|
|
5
5
|
// See https://github.com/microsoft/TypeScript/issues/5711#issuecomment-340283439
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { NewsroomContext, NewsroomContextProvider } from './context';
|
|
2
|
-
export * from './hooks';
|
|
1
|
+
export { NewsroomContext, NewsroomContextProvider } from './context.js';
|
|
2
|
+
export * from './hooks.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { getSentryClientOptions } from './client';
|
|
2
|
-
export { getSentryServerOptions } from './server';
|
|
1
|
+
export { getSentryClientOptions } from './client.js';
|
|
2
|
+
export { getSentryServerOptions } from './server.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/build/esm/server.js
CHANGED