@prezly/theme-kit-nextjs 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/adapter-nextjs/api-handlers/fetchGalleries.js +2 -2
- package/build/cjs/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
- package/build/cjs/adapter-nextjs/api-handlers/fetchStories.js +2 -2
- package/build/cjs/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
- package/build/cjs/adapter-nextjs/api-handlers/index.d.ts +2 -2
- package/build/cjs/adapter-nextjs/api-handlers/index.js +4 -4
- package/build/cjs/adapter-nextjs/api-handlers/index.js.map +1 -1
- package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.d.ts +2 -2
- package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.js +2 -2
- package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
- package/build/cjs/adapter-nextjs/getNewsroomStaticProps.d.ts +2 -2
- package/build/cjs/adapter-nextjs/getNewsroomStaticProps.js +2 -2
- package/build/cjs/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
- package/build/cjs/adapter-nextjs/index.d.ts +6 -6
- package/build/cjs/adapter-nextjs/index.js +6 -6
- package/build/cjs/adapter-nextjs/index.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/category.js +10 -10
- package/build/cjs/adapter-nextjs/page-props/category.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/gallery.js +8 -8
- package/build/cjs/adapter-nextjs/page-props/gallery.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/galleryAlbum.js +10 -10
- package/build/cjs/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/home.js +8 -8
- package/build/cjs/adapter-nextjs/page-props/home.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/index.d.ts +8 -8
- package/build/cjs/adapter-nextjs/page-props/index.js +24 -24
- package/build/cjs/adapter-nextjs/page-props/index.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/search.js +8 -8
- package/build/cjs/adapter-nextjs/page-props/search.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/getServerSideProps.js +6 -6
- package/build/cjs/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.d.ts +4 -4
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.js +7 -7
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/story.js +14 -14
- package/build/cjs/adapter-nextjs/page-props/story.js.map +1 -1
- package/build/cjs/adapter-nextjs/page-props/storyPreview.js +6 -6
- package/build/cjs/adapter-nextjs/page-props/storyPreview.js.map +1 -1
- package/build/cjs/adapter-nextjs/processRequest.js +2 -2
- package/build/cjs/adapter-nextjs/processRequest.js.map +1 -1
- package/build/cjs/client.d.ts +3 -3
- package/build/cjs/client.js +3 -3
- package/build/cjs/client.js.map +1 -1
- package/build/cjs/components-nextjs/PageSeo/PageSeo.js +12 -12
- package/build/cjs/components-nextjs/PageSeo/PageSeo.js.map +1 -1
- package/build/cjs/components-nextjs/PageSeo/index.d.ts +1 -1
- package/build/cjs/components-nextjs/PageSeo/index.js +2 -2
- package/build/cjs/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/cjs/components-nextjs/PageSeo/lib/index.d.ts +1 -1
- package/build/cjs/components-nextjs/PageSeo/lib/index.js +2 -2
- package/build/cjs/components-nextjs/PageSeo/lib/index.js.map +1 -1
- package/build/cjs/components-nextjs/StorySeo/index.d.ts +1 -1
- package/build/cjs/components-nextjs/StorySeo/index.js +2 -2
- package/build/cjs/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/cjs/components-nextjs/index.d.ts +3 -3
- package/build/cjs/components-nextjs/index.js +6 -6
- package/build/cjs/components-nextjs/index.js.map +1 -1
- package/build/cjs/data-fetching/NextPrezlyApi.js +2 -2
- package/build/cjs/data-fetching/NextPrezlyApi.js.map +1 -1
- package/build/cjs/data-fetching/getNextPrezlyApi.d.ts +1 -1
- package/build/cjs/data-fetching/getNextPrezlyApi.js +2 -2
- package/build/cjs/data-fetching/getNextPrezlyApi.js.map +1 -1
- package/build/cjs/data-fetching/index.d.ts +1 -1
- package/build/cjs/data-fetching/index.js +2 -2
- package/build/cjs/data-fetching/index.js.map +1 -1
- package/build/cjs/index.d.ts +8 -8
- package/build/cjs/index.js +8 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/infinite-loading/index.d.ts +4 -4
- package/build/cjs/infinite-loading/index.js +7 -7
- package/build/cjs/infinite-loading/index.js.map +1 -1
- package/build/cjs/infinite-loading/useInfiniteGalleriesLoading.js +2 -2
- package/build/cjs/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/cjs/infinite-loading/useInfiniteStoriesLoading.js +4 -4
- package/build/cjs/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/cjs/intl/index.d.ts +2 -2
- package/build/cjs/intl/index.js +2 -2
- package/build/cjs/intl/index.js.map +1 -1
- package/build/cjs/intl/languages.js +2 -2
- package/build/cjs/intl/languages.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/index.d.ts +11 -11
- package/build/cjs/newsroom-context/hooks/index.js +11 -11
- package/build/cjs/newsroom-context/hooks/index.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useAlgoliaSettings.js +2 -2
- package/build/cjs/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useCategories.js +2 -2
- package/build/cjs/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useCompanyInformation.js +2 -2
- package/build/cjs/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useCurrentCategory.js +2 -2
- package/build/cjs/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useCurrentLocale.js +2 -2
- package/build/cjs/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useCurrentStory.js +2 -2
- package/build/cjs/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useGetLinkLocaleSlug.js +4 -4
- package/build/cjs/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useGetTranslationUrl.js +4 -4
- package/build/cjs/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useLanguages.js +2 -2
- package/build/cjs/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useNewsroom.js +2 -2
- package/build/cjs/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/cjs/newsroom-context/hooks/useNewsroomContext.js +2 -2
- package/build/cjs/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/cjs/newsroom-context/index.d.ts +2 -2
- package/build/cjs/newsroom-context/index.js +4 -4
- package/build/cjs/newsroom-context/index.js.map +1 -1
- package/build/cjs/sentry/client.js +2 -2
- package/build/cjs/sentry/client.js.map +1 -1
- package/build/cjs/sentry/index.d.ts +2 -2
- package/build/cjs/sentry/index.js +4 -4
- package/build/cjs/sentry/index.js.map +1 -1
- package/build/cjs/sentry/server.js +2 -2
- package/build/cjs/sentry/server.js.map +1 -1
- package/build/cjs/server.d.ts +2 -2
- package/build/cjs/server.js +2 -2
- package/build/cjs/server.js.map +1 -1
- package/build/cjs/types.d.ts +1 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js +1 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js +1 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
- package/build/esm/adapter-nextjs/api-handlers/index.js.map +1 -1
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js +1 -1
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js +1 -1
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
- package/build/esm/adapter-nextjs/index.js +2 -2
- package/build/esm/adapter-nextjs/index.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/category.js +1 -1
- package/build/esm/adapter-nextjs/page-props/category.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/gallery.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +1 -1
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/home.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/index.js +1 -1
- package/build/esm/adapter-nextjs/page-props/index.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/search.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +1 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/story.js +2 -2
- package/build/esm/adapter-nextjs/page-props/story.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/storyPreview.js +1 -1
- package/build/esm/adapter-nextjs/page-props/storyPreview.js.map +1 -1
- package/build/esm/adapter-nextjs/processRequest.js +1 -1
- package/build/esm/adapter-nextjs/processRequest.js.map +1 -1
- package/build/esm/client.js +3 -3
- package/build/esm/client.js.map +1 -1
- package/build/esm/components-nextjs/PageSeo/PageSeo.js +2 -2
- package/build/esm/components-nextjs/PageSeo/PageSeo.js.map +1 -1
- package/build/esm/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/esm/components-nextjs/PageSeo/lib/index.js.map +1 -1
- package/build/esm/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/esm/components-nextjs/index.js +2 -2
- package/build/esm/components-nextjs/index.js.map +1 -1
- package/build/esm/data-fetching/NextPrezlyApi.js +1 -1
- package/build/esm/data-fetching/NextPrezlyApi.js.map +1 -1
- package/build/esm/data-fetching/getNextPrezlyApi.js.map +1 -1
- package/build/esm/data-fetching/index.js.map +1 -1
- package/build/esm/index.js +7 -7
- package/build/esm/index.js.map +1 -1
- package/build/esm/infinite-loading/index.js.map +1 -1
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +1 -1
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/esm/intl/index.js.map +1 -1
- package/build/esm/intl/languages.js.map +1 -1
- package/build/esm/newsroom-context/hooks/index.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/esm/newsroom-context/index.js +1 -1
- package/build/esm/newsroom-context/index.js.map +1 -1
- package/build/esm/sentry/client.js.map +1 -1
- package/build/esm/sentry/index.js.map +1 -1
- package/build/esm/sentry/server.js.map +1 -1
- package/build/esm/server.js +2 -2
- package/build/esm/server.js.map +1 -1
- package/build/tsconfig.cjs.tsbuildinfo +1 -1
- package/build/tsconfig.esm.tsbuildinfo +1 -1
- package/build/types/adapter-nextjs/api-handlers/index.d.ts +2 -2
- package/build/types/adapter-nextjs/getNewsroomServerSideProps.d.ts +2 -2
- package/build/types/adapter-nextjs/getNewsroomStaticProps.d.ts +2 -2
- package/build/types/adapter-nextjs/index.d.ts +6 -6
- package/build/types/adapter-nextjs/page-props/index.d.ts +8 -8
- package/build/types/adapter-nextjs/page-props/sitemap/index.d.ts +4 -4
- package/build/types/client.d.ts +3 -3
- package/build/types/components-nextjs/PageSeo/index.d.ts +1 -1
- package/build/types/components-nextjs/PageSeo/lib/index.d.ts +1 -1
- package/build/types/components-nextjs/StorySeo/index.d.ts +1 -1
- package/build/types/components-nextjs/index.d.ts +3 -3
- package/build/types/data-fetching/getNextPrezlyApi.d.ts +1 -1
- package/build/types/data-fetching/index.d.ts +1 -1
- package/build/types/index.d.ts +8 -8
- package/build/types/infinite-loading/index.d.ts +4 -4
- package/build/types/intl/index.d.ts +2 -2
- package/build/types/newsroom-context/hooks/index.d.ts +11 -11
- package/build/types/newsroom-context/index.d.ts +2 -2
- package/build/types/sentry/index.d.ts +2 -2
- package/build/types/server.d.ts +2 -2
- package/build/types/types.d.ts +1 -1
- package/package.json +4 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useInfiniteGalleriesLoading = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useInfiniteLoading_js_1 = require("./useInfiniteLoading.js");
|
|
5
5
|
async function fetchGalleries(page, pageSize) {
|
|
6
6
|
const result = await fetch('/api/fetch-galleries', {
|
|
7
7
|
method: 'POST',
|
|
@@ -26,7 +26,7 @@ async function fetchGalleries(page, pageSize) {
|
|
|
26
26
|
* See https://github.com/prezly/theme-nextjs-bea/blob/d381e9878187ca98815d240d3ffdf10a75993c14/pages/media/index.tsx#L23 for usage example
|
|
27
27
|
*/
|
|
28
28
|
function useInfiniteGalleriesLoading(initialGalleries, pagination) {
|
|
29
|
-
const { canLoadMore, data, isLoading, loadMore } = (0,
|
|
29
|
+
const { canLoadMore, data, isLoading, loadMore } = (0, useInfiniteLoading_js_1.useInfiniteLoading)({
|
|
30
30
|
fetchingFn: async (nextPage, pageSize) => {
|
|
31
31
|
const { galleries } = await fetchGalleries(nextPage, pageSize);
|
|
32
32
|
return galleries;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteGalleriesLoading.js","sourceRoot":"","sources":["../../../src/infinite-loading/useInfiniteGalleriesLoading.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"useInfiniteGalleriesLoading.js","sourceRoot":"","sources":["../../../src/infinite-loading/useInfiniteGalleriesLoading.ts"],"names":[],"mappings":";;;AAGA,mEAA6D;AAE7D,KAAK,UAAU,cAAc,CACzB,IAAY,EACZ,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,sBAAsB,EAAE;QAC/C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,gEAAgE;YAChE,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,IAAI;YACJ,QAAQ;SACX,CAAC;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QACZ,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,SAAgB,2BAA2B,CACvC,gBAAmC,EACnC,UAA2B;IAE3B,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAA,0CAAkB,EAAkB;QACnF,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;YACrC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC/D,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,WAAW,EAAE,gBAAgB;QAC7B,UAAU;KACb,CAAC,CAAC;IAEH,OAAO;QACH,WAAW;QACX,SAAS,EAAE,IAAI;QACf,SAAS;QACT,iBAAiB,EAAE,QAAQ;KAC9B,CAAC;AACN,CAAC;AAnBD,kEAmBC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useInfiniteStoriesLoading = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const index_js_1 = require("../newsroom-context/index.js");
|
|
6
|
+
const useInfiniteLoading_js_1 = require("./useInfiniteLoading.js");
|
|
7
7
|
async function fetchStories(page, pageSize, withHighlightedStory, category, locale, include, pinning, filterQuery) {
|
|
8
8
|
const result = await fetch('/api/fetch-stories', {
|
|
9
9
|
method: 'POST',
|
|
@@ -36,9 +36,9 @@ async function fetchStories(page, pageSize, withHighlightedStory, category, loca
|
|
|
36
36
|
* See https://github.com/prezly/theme-nextjs-bea/blob/d381e9878187ca98815d240d3ffdf10a75993c14/pages/index.tsx#L24 for usage example
|
|
37
37
|
*/
|
|
38
38
|
function useInfiniteStoriesLoading(initialStories, pagination, category, include, pinning, filterQuery) {
|
|
39
|
-
const currentLocale = (0,
|
|
39
|
+
const currentLocale = (0, index_js_1.useCurrentLocale)();
|
|
40
40
|
const { withHighlightedStory = false } = pagination;
|
|
41
|
-
const { canLoadMore, data, isLoading, loadMore, resetData } = (0,
|
|
41
|
+
const { canLoadMore, data, isLoading, loadMore, resetData } = (0, useInfiniteLoading_js_1.useInfiniteLoading)({
|
|
42
42
|
fetchingFn: async (nextPage, pageSize) => {
|
|
43
43
|
const { stories } = await fetchStories(nextPage, pageSize, withHighlightedStory, category, currentLocale, include, pinning, filterQuery);
|
|
44
44
|
return stories;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteStoriesLoading.js","sourceRoot":"","sources":["../../../src/infinite-loading/useInfiniteStoriesLoading.ts"],"names":[],"mappings":";;;AAEA,iCAAkC;AAElC,
|
|
1
|
+
{"version":3,"file":"useInfiniteStoriesLoading.js","sourceRoot":"","sources":["../../../src/infinite-loading/useInfiniteStoriesLoading.ts"],"names":[],"mappings":";;;AAEA,iCAAkC;AAElC,2DAAgE;AAGhE,mEAA6D;AAE7D,KAAK,UAAU,YAAY,CACvB,IAAY,EACZ,QAAgB,EAChB,oBAA6B,EAC7B,QAAmB,EACnB,MAAqB,EACrB,OAAqC,EACrC,OAAiB,EACjB,WAAoB;IAEpB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,oBAAoB,EAAE;QAC7C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,gEAAgE;YAChE,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,IAAI;YACJ,QAAQ;YACR,oBAAoB;YACpB,QAAQ;YACR,OAAO;YACP,OAAO;YACP,GAAG,CAAC,MAAM,IAAI;gBACV,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE;aACxC,CAAC;YACF,WAAW;SACd,CAAC;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QACZ,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,SAAgB,yBAAyB,CACrC,cAAmB,EACnB,UAA2B,EAC3B,QAAmB,EACnB,OAAqC,EACrC,OAAiB,EACjB,WAAoB;IAEpB,MAAM,aAAa,GAAG,IAAA,2BAAgB,GAAE,CAAC;IACzC,MAAM,EAAE,oBAAoB,GAAG,KAAK,EAAE,GAAG,UAAU,CAAC;IAEpD,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAA,0CAAkB,EAAI;QAChF,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;YACrC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAClC,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,OAAO,EACP,WAAW,CACd,CAAC;YACF,OAAO,OAAO,CAAC;QACnB,CAAC;QACD,WAAW,EAAE,cAAc;QAC3B,UAAU;KACb,CAAC,CAAC;IAEH,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,IAAI,QAAQ,EAAE,EAAE,EAAE;YACd,SAAS,EAAE,CAAC;SACf;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;IAE9B,OAAO;QACH,WAAW;QACX,SAAS;QACT,eAAe,EAAE,QAAQ;QACzB,OAAO,EAAE,IAAI;KAChB,CAAC;AACN,CAAC;AAzCD,8DAyCC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './languages';
|
|
2
|
-
export * from './locale';
|
|
1
|
+
export * from './languages.js';
|
|
2
|
+
export * from './locale.js';
|
package/build/cjs/intl/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./languages"), exports);
|
|
18
|
-
__exportStar(require("./locale"), exports);
|
|
17
|
+
__exportStar(require("./languages.js"), exports);
|
|
18
|
+
__exportStar(require("./locale.js"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/intl/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/intl/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8CAA4B"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLanguageFromNextLocaleIsoCode = void 0;
|
|
4
4
|
const theme_kit_core_1 = require("@prezly/theme-kit-core");
|
|
5
|
-
const
|
|
5
|
+
const locale_js_1 = require("./locale.js");
|
|
6
6
|
/**
|
|
7
7
|
* Retrieve a culture with fallback to legacy codes support.
|
|
8
8
|
* Pulled from https://github.com/prezly/prezly/blob/de9900d9890a33502780494aa3fb85c9a732b3c3/lib/model/CulturePeer.php#L91-L114
|
|
9
9
|
*/
|
|
10
10
|
function getLanguageFromNextLocaleIsoCode(languages, nextLocaleIsoCode) {
|
|
11
11
|
const defaultLanguage = (0, theme_kit_core_1.getDefaultLanguage)(languages);
|
|
12
|
-
if (!nextLocaleIsoCode || nextLocaleIsoCode ===
|
|
12
|
+
if (!nextLocaleIsoCode || nextLocaleIsoCode === locale_js_1.DUMMY_DEFAULT_LOCALE) {
|
|
13
13
|
return defaultLanguage;
|
|
14
14
|
}
|
|
15
15
|
const locale = theme_kit_core_1.LocaleObject.fromAnyCode(nextLocaleIsoCode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../src/intl/languages.ts"],"names":[],"mappings":";;;AACA,2DAMgC;AAEhC,
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../src/intl/languages.ts"],"names":[],"mappings":";;;AACA,2DAMgC;AAEhC,2CAAmD;AAEnD;;;GAGG;AACH,SAAgB,gCAAgC,CAC5C,SAAqC,EACrC,iBAA0B;IAE1B,MAAM,eAAe,GAAG,IAAA,mCAAkB,EAAC,SAAS,CAAC,CAAC;IAEtD,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,gCAAoB,EAAE;QAClE,OAAO,eAAe,CAAC;KAC1B;IAED,MAAM,MAAM,GAAG,6BAAY,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,cAAoD,CAAC;IAEzD,IAAI,iBAAiB,CAAC,MAAM,IAAI,CAAC,IAAI,iBAAiB,CAAC,MAAM,IAAI,CAAC,EAAE;QAChE,2IAA2I;QAC3I,cAAc;YACV,IAAA,6CAA4B,EAAC,SAAS,EAAE,MAAM,CAAC;gBAC/C,IAAA,6CAA4B,EAAC,SAAS,EAAE,MAAM,CAAC;gBAC/C,IAAA,+CAA8B,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;KACzD;SAAM;QACH,cAAc,GAAG,IAAA,6CAA4B,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;KACpE;IAED,OAAO,cAAc,CAAC;AAC1B,CAAC;AAxBD,4EAwBC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
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';
|
|
@@ -14,15 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./useAlgoliaSettings"), exports);
|
|
18
|
-
__exportStar(require("./useCategories"), exports);
|
|
19
|
-
__exportStar(require("./useCompanyInformation"), exports);
|
|
20
|
-
__exportStar(require("./useCurrentCategory"), exports);
|
|
21
|
-
__exportStar(require("./useCurrentLocale"), exports);
|
|
22
|
-
__exportStar(require("./useCurrentStory"), exports);
|
|
23
|
-
__exportStar(require("./useGetLinkLocaleSlug"), exports);
|
|
24
|
-
__exportStar(require("./useGetTranslationUrl"), exports);
|
|
25
|
-
__exportStar(require("./useLanguages"), exports);
|
|
26
|
-
__exportStar(require("./useNewsroom"), exports);
|
|
27
|
-
__exportStar(require("./useNewsroomContext"), exports);
|
|
17
|
+
__exportStar(require("./useAlgoliaSettings.js"), exports);
|
|
18
|
+
__exportStar(require("./useCategories.js"), exports);
|
|
19
|
+
__exportStar(require("./useCompanyInformation.js"), exports);
|
|
20
|
+
__exportStar(require("./useCurrentCategory.js"), exports);
|
|
21
|
+
__exportStar(require("./useCurrentLocale.js"), exports);
|
|
22
|
+
__exportStar(require("./useCurrentStory.js"), exports);
|
|
23
|
+
__exportStar(require("./useGetLinkLocaleSlug.js"), exports);
|
|
24
|
+
__exportStar(require("./useGetTranslationUrl.js"), exports);
|
|
25
|
+
__exportStar(require("./useLanguages.js"), exports);
|
|
26
|
+
__exportStar(require("./useNewsroom.js"), exports);
|
|
27
|
+
__exportStar(require("./useNewsroomContext.js"), exports);
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,qDAAmC;AACnC,6DAA2C;AAC3C,0DAAwC;AACxC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C;AAC1C,4DAA0C;AAC1C,oDAAkC;AAClC,mDAAiC;AACjC,0DAAwC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useAlgoliaSettings = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useAlgoliaSettings() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.algoliaSettings;
|
|
8
8
|
}
|
|
9
9
|
exports.useAlgoliaSettings = useAlgoliaSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlgoliaSettings.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useAlgoliaSettings.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useAlgoliaSettings.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useAlgoliaSettings.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,kBAAkB;IAC9B,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC;AAJD,gDAIC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCategories = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useCategories() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.categories;
|
|
8
8
|
}
|
|
9
9
|
exports.useCategories = useCategories;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCategories.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCategories.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useCategories.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCategories.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,aAAa;IACzB,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,UAAU,CAAC;AAC9B,CAAC;AAJD,sCAIC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCompanyInformation = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useCompanyInformation() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.companyInformation;
|
|
8
8
|
}
|
|
9
9
|
exports.useCompanyInformation = useCompanyInformation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompanyInformation.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCompanyInformation.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useCompanyInformation.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCompanyInformation.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,qBAAqB;IACjC,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,kBAAkB,CAAC;AACtC,CAAC;AAJD,sDAIC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCurrentCategory = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useCurrentCategory() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.currentCategory;
|
|
8
8
|
}
|
|
9
9
|
exports.useCurrentCategory = useCurrentCategory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentCategory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentCategory.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useCurrentCategory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentCategory.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,kBAAkB;IAC9B,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC;AAJD,gDAIC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCurrentLocale = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useCurrentLocale() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.locale;
|
|
8
8
|
}
|
|
9
9
|
exports.useCurrentLocale = useCurrentLocale;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentLocale.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentLocale.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useCurrentLocale.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentLocale.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,gBAAgB;IAC5B,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC;AAJD,4CAIC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCurrentStory = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useCurrentStory() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.currentStory;
|
|
8
8
|
}
|
|
9
9
|
exports.useCurrentStory = useCurrentStory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentStory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentStory.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useCurrentStory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentStory.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,eAAe;IAC3B,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,YAAY,CAAC;AAChC,CAAC;AAJD,0CAIC"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useGetLinkLocaleSlug = void 0;
|
|
4
4
|
const theme_kit_core_1 = require("@prezly/theme-kit-core");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const useCurrentLocale_js_1 = require("./useCurrentLocale.js");
|
|
7
|
+
const useLanguages_js_1 = require("./useLanguages.js");
|
|
8
8
|
/**
|
|
9
9
|
* Determines correct locale slug for the link (trying to shorten the locale code if possible).
|
|
10
10
|
* E.g. if newsroom has a single locale for Dutch (`nl_BE`), it will be shortened to `nl`.
|
|
@@ -20,8 +20,8 @@ function getLinkLocaleSlug(languages, locale) {
|
|
|
20
20
|
return theme_kit_core_1.LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug();
|
|
21
21
|
}
|
|
22
22
|
function useGetLinkLocaleSlug() {
|
|
23
|
-
const currentLocale = (0,
|
|
24
|
-
const languages = (0,
|
|
23
|
+
const currentLocale = (0, useCurrentLocale_js_1.useCurrentLocale)();
|
|
24
|
+
const languages = (0, useLanguages_js_1.useLanguages)();
|
|
25
25
|
// The `locale` parameter is mainly used for Language Dropdown
|
|
26
26
|
return (0, react_1.useCallback)((locale) => getLinkLocaleSlug(languages, locale || currentLocale), [languages, currentLocale]);
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetLinkLocaleSlug.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useGetLinkLocaleSlug.ts"],"names":[],"mappings":";;;AACA,2DAA6E;AAC7E,iCAAoC;AAEpC
|
|
1
|
+
{"version":3,"file":"useGetLinkLocaleSlug.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useGetLinkLocaleSlug.ts"],"names":[],"mappings":";;;AACA,2DAA6E;AAC7E,iCAAoC;AAEpC,+DAAyD;AACzD,uDAAiD;AAEjD;;;;;GAKG;AACH,SAAS,iBAAiB,CACtB,SAAqC,EACrC,MAAoB;IAEpB,MAAM,kBAAkB,GAAG,IAAA,sCAAqB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpE,8EAA8E;IAC9E,IAAI,CAAC,kBAAkB,EAAE;QACrB,OAAO,kBAAkB,CAAC;KAC7B;IAED,OAAO,6BAAY,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,SAAS,EAAE,CAAC;AACpE,CAAC;AAED,SAAgB,oBAAoB;IAChC,MAAM,aAAa,GAAG,IAAA,sCAAgB,GAAE,CAAC;IACzC,MAAM,SAAS,GAAG,IAAA,8BAAY,GAAE,CAAC;IAEjC,8DAA8D;IAC9D,OAAO,IAAA,mBAAW,EACd,CAAC,MAAqB,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,IAAI,aAAa,CAAC,EAChF,CAAC,SAAS,EAAE,aAAa,CAAC,CAC7B,CAAC;AACN,CAAC;AATD,oDASC"}
|
|
@@ -5,8 +5,8 @@ const sdk_1 = require("@prezly/sdk");
|
|
|
5
5
|
const theme_kit_core_1 = require("@prezly/theme-kit-core");
|
|
6
6
|
const router_1 = require("next/router");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const useCurrentCategory_js_1 = require("./useCurrentCategory.js");
|
|
9
|
+
const useCurrentStory_js_1 = require("./useCurrentStory.js");
|
|
10
10
|
// Pulled from SDK types to not leak the `@prezly/sdk` dependency into the client bundle
|
|
11
11
|
// It looks like a hack, but the name of enum must be the same as in SDK
|
|
12
12
|
var Visibility;
|
|
@@ -67,8 +67,8 @@ function getTranslationUrl(locale, path, currentCategory, currentStory, noFallba
|
|
|
67
67
|
*/
|
|
68
68
|
function useGetTranslationUrl() {
|
|
69
69
|
const { asPath } = (0, router_1.useRouter)();
|
|
70
|
-
const currentCategory = (0,
|
|
71
|
-
const currentStory = (0,
|
|
70
|
+
const currentCategory = (0, useCurrentCategory_js_1.useCurrentCategory)();
|
|
71
|
+
const currentStory = (0, useCurrentStory_js_1.useCurrentStory)();
|
|
72
72
|
return (0, react_1.useCallback)((locale, noFallback) => getTranslationUrl(locale, asPath, currentCategory, currentStory, noFallback), [asPath, currentCategory, currentStory]);
|
|
73
73
|
}
|
|
74
74
|
exports.useGetTranslationUrl = useGetTranslationUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetTranslationUrl.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useGetTranslationUrl.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAEpC,2DAAmF;AACnF,wCAAwC;AACxC,iCAAoC;AAEpC,
|
|
1
|
+
{"version":3,"file":"useGetTranslationUrl.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useGetTranslationUrl.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAEpC,2DAAmF;AACnF,wCAAwC;AACxC,iCAAoC;AAEpC,mEAA6D;AAC7D,6DAAuD;AAEvD,wFAAwF;AACxF,wEAAwE;AACxE,IAAK,UAKJ;AALD,WAAK,UAAU;IACX,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,2CAA6B,CAAA;AACjC,CAAC,EALI,UAAU,KAAV,UAAU,QAKd;AAED,SAAS,qCAAqC,CAAC,KAAoB;IAC/D,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7B,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,OAAO;YACnB,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QACnD,KAAK,UAAU,CAAC,OAAO;YACnB,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QACnD,KAAK,UAAU,CAAC,YAAY;YACxB,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5E;YACI,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;KAClC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CACtB,MAAoB,EACpB,IAAY,EACZ,eAA0B,EAC1B,YAA4B,EAC5B,UAAoB;IAEpB,IAAI,eAAe,EAAE;QACjB,IAAI,IAAA,0CAAyB,EAAC,eAAe,EAAE,MAAM,CAAC,EAAE;YACpD,OAAO,IAAA,+BAAc,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC;SAClD;QAED,IAAI,UAAU,EAAE;YACZ,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC;KACd;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAE7C,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE;QAC5D,MAAM,uBAAuB,GAAG,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAEpF,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAClD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,EAAE,EAAE,CAC1C,OAAO,CAAC,MAAM,KAAK,UAAU;YAC7B,WAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;YACnC,uBAAuB,CAAC,QAAQ,CAAC,UAAU,CAAC,CACnD,CAAC;QACF,IAAI,eAAe,EAAE;YACjB,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC;SACrC;QAED,IAAI,UAAU,EAAE;YACZ,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB;IAChC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kBAAS,GAAE,CAAC;IAC/B,MAAM,eAAe,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAC7C,MAAM,YAAY,GAAG,IAAA,oCAAe,GAAE,CAAC;IAEvC,OAAO,IAAA,mBAAW,EACd,CAAC,MAAoB,EAAE,UAAoB,EAAE,EAAE,CAC3C,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,CAAC,EAChF,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,CAAC,CAC1C,CAAC;AACN,CAAC;AAVD,oDAUC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLanguages = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useLanguages() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.languages;
|
|
8
8
|
}
|
|
9
9
|
exports.useLanguages = useLanguages;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLanguages.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useLanguages.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useLanguages.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useLanguages.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,YAAY;IACxB,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,SAAS,CAAC;AAC7B,CAAC;AAJD,oCAIC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useNewsroom = void 0;
|
|
4
|
-
const
|
|
4
|
+
const useNewsroomContext_js_1 = require("./useNewsroomContext.js");
|
|
5
5
|
function useNewsroom() {
|
|
6
|
-
const context = (0,
|
|
6
|
+
const context = (0, useNewsroomContext_js_1.useNewsroomContext)();
|
|
7
7
|
return context.newsroom;
|
|
8
8
|
}
|
|
9
9
|
exports.useNewsroom = useNewsroom;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNewsroom.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useNewsroom.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"useNewsroom.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useNewsroom.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAE7D,SAAgB,WAAW;IACvB,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC5B,CAAC;AAJD,kCAIC"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useNewsroomContext = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const context_js_1 = require("../context.js");
|
|
6
6
|
function useNewsroomContext() {
|
|
7
7
|
// TS Compiler is having a hard time figuring this type implicitly, so we have to set it explicitly
|
|
8
8
|
// See https://github.com/microsoft/TypeScript/issues/5711#issuecomment-340283439
|
|
9
|
-
const newsroomContext = (0, react_1.useContext)(
|
|
9
|
+
const newsroomContext = (0, react_1.useContext)(context_js_1.NewsroomContext);
|
|
10
10
|
if (!newsroomContext) {
|
|
11
11
|
throw new Error('No `NewsroomContextProvider` found when calling `useNewsroomContext`');
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNewsroomContext.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useNewsroomContext.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAGnC,
|
|
1
|
+
{"version":3,"file":"useNewsroomContext.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useNewsroomContext.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAGnC,8CAAgD;AAEhD,SAAgB,kBAAkB;IAC9B,mGAAmG;IACnG,iFAAiF;IACjF,MAAM,eAAe,GAAoC,IAAA,kBAAU,EAAC,4BAAe,CAAC,CAAC;IACrF,IAAI,CAAC,eAAe,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KAC3F;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC;AATD,gDASC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { NewsroomContext, NewsroomContextProvider, type NewsroomContextProps } from './context';
|
|
2
|
-
export * from './hooks';
|
|
1
|
+
export { NewsroomContext, NewsroomContextProvider, type NewsroomContextProps } from './context.js';
|
|
2
|
+
export * from './hooks/index.js';
|
|
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.NewsroomContextProvider = exports.NewsroomContext = void 0;
|
|
18
|
-
var
|
|
19
|
-
Object.defineProperty(exports, "NewsroomContext", { enumerable: true, get: function () { return
|
|
20
|
-
Object.defineProperty(exports, "NewsroomContextProvider", { enumerable: true, get: function () { return
|
|
21
|
-
__exportStar(require("./hooks"), exports);
|
|
18
|
+
var context_js_1 = require("./context.js");
|
|
19
|
+
Object.defineProperty(exports, "NewsroomContext", { enumerable: true, get: function () { return context_js_1.NewsroomContext; } });
|
|
20
|
+
Object.defineProperty(exports, "NewsroomContextProvider", { enumerable: true, get: function () { return context_js_1.NewsroomContextProvider; } });
|
|
21
|
+
__exportStar(require("./hooks/index.js"), exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/newsroom-context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/newsroom-context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAmG;AAA1F,6GAAA,eAAe,OAAA;AAAE,qHAAA,uBAAuB,OAAA;AACjD,mDAAiC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSentryClientOptions = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_js_1 = require("./common.js");
|
|
5
5
|
function getSentryClientOptions(dsn, themeName) {
|
|
6
|
-
return (0,
|
|
6
|
+
return (0, common_js_1.getCommonClientOptions)(dsn, themeName);
|
|
7
7
|
}
|
|
8
8
|
exports.getSentryClientOptions = getSentryClientOptions;
|
|
9
9
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/sentry/client.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/sentry/client.ts"],"names":[],"mappings":";;;AAEA,2CAAqD;AAErD,SAAgB,sBAAsB,CAClC,GAAW,EACX,SAAwB;IAExB,OAAO,IAAA,kCAAsB,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC;AALD,wDAKC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getSentryClientOptions } from './client';
|
|
2
|
-
export { getSentryServerOptions } from './server';
|
|
1
|
+
export { getSentryClientOptions } from './client.js';
|
|
2
|
+
export { getSentryServerOptions } from './server.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSentryServerOptions = exports.getSentryClientOptions = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "getSentryClientOptions", { enumerable: true, get: function () { return
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "getSentryServerOptions", { enumerable: true, get: function () { return
|
|
4
|
+
var client_js_1 = require("./client.js");
|
|
5
|
+
Object.defineProperty(exports, "getSentryClientOptions", { enumerable: true, get: function () { return client_js_1.getSentryClientOptions; } });
|
|
6
|
+
var server_js_1 = require("./server.js");
|
|
7
|
+
Object.defineProperty(exports, "getSentryServerOptions", { enumerable: true, get: function () { return server_js_1.getSentryServerOptions; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sentry/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sentry/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqD;AAA5C,mHAAA,sBAAsB,OAAA;AAC/B,yCAAqD;AAA5C,mHAAA,sBAAsB,OAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSentryServerOptions = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_js_1 = require("./common.js");
|
|
5
5
|
function getSentryServerOptions(dsn, themeName) {
|
|
6
|
-
return (0,
|
|
6
|
+
return (0, common_js_1.getCommonClientOptions)(dsn, themeName);
|
|
7
7
|
}
|
|
8
8
|
exports.getSentryServerOptions = getSentryServerOptions;
|
|
9
9
|
//# sourceMappingURL=server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/sentry/server.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/sentry/server.ts"],"names":[],"mappings":";;;AAEA,2CAAqD;AAErD,SAAgB,sBAAsB,CAClC,GAAW,EACX,SAAwB;IAExB,OAAO,IAAA,kCAAsB,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC;AALD,wDAKC"}
|
package/build/cjs/server.d.ts
CHANGED
package/build/cjs/server.js
CHANGED
|
@@ -19,6 +19,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
__exportStar(require("./adapter-nextjs"), exports);
|
|
23
|
-
__exportStar(require("./data-fetching"), exports);
|
|
22
|
+
__exportStar(require("./adapter-nextjs/index.js"), exports);
|
|
23
|
+
__exportStar(require("./data-fetching/index.js"), exports);
|
|
24
24
|
//# sourceMappingURL=server.js.map
|
package/build/cjs/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,4DAA0C;AAC1C,2DAAyC"}
|
package/build/cjs/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NewsroomContextProps } from './newsroom-context';
|
|
1
|
+
import type { NewsroomContextProps } from './newsroom-context/index.js';
|
|
2
2
|
export interface ServerSidePageProps {
|
|
3
3
|
/**
|
|
4
4
|
* Indicates whether the locale requested by the Next application was correctly resolved to an active newsroom locale.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,CAAC,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,gBAAgB,CAAC,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,CAAC,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,gBAAgB,CAAC,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../data-fetching.js';
|
|
1
|
+
import { getNextPrezlyApi } from '../data-fetching/index.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAO7D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC5C,OAAkC,EAClC,UAAmB,EAAE;IAErB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEzC,MAAM,GAAG,GAAG,gBAAgB,CAAC,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNextPrezlyApi } from '../data-fetching.js';
|
|
1
|
+
import { getNextPrezlyApi } from '../data-fetching/index.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.
|