@prezly/theme-kit-nextjs 4.3.0 → 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 +2 -2
- 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 +6 -6
- package/build/esm/adapter-nextjs/index.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/category.js +5 -5
- package/build/esm/adapter-nextjs/page-props/category.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/gallery.js +4 -4
- package/build/esm/adapter-nextjs/page-props/gallery.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +5 -5
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/home.js +4 -4
- package/build/esm/adapter-nextjs/page-props/home.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/index.js +8 -8
- package/build/esm/adapter-nextjs/page-props/index.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/search.js +4 -4
- package/build/esm/adapter-nextjs/page-props/search.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +3 -3
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js +4 -4
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/story.js +6 -6
- package/build/esm/adapter-nextjs/page-props/story.js.map +1 -1
- package/build/esm/adapter-nextjs/page-props/storyPreview.js +3 -3
- 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 +1 -1
- package/build/esm/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/esm/components-nextjs/PageSeo/lib/index.js +1 -1
- package/build/esm/components-nextjs/PageSeo/lib/index.js.map +1 -1
- package/build/esm/components-nextjs/StorySeo/index.js +1 -1
- package/build/esm/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/esm/components-nextjs/index.js +3 -3
- 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 +1 -1
- package/build/esm/data-fetching/getNextPrezlyApi.js.map +1 -1
- package/build/esm/data-fetching/index.js +1 -1
- package/build/esm/data-fetching/index.js.map +1 -1
- package/build/esm/index.js +8 -8
- package/build/esm/index.js.map +1 -1
- package/build/esm/infinite-loading/index.js +4 -4
- package/build/esm/infinite-loading/index.js.map +1 -1
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js +1 -1
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +2 -2
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/esm/intl/index.js +2 -2
- package/build/esm/intl/index.js.map +1 -1
- package/build/esm/intl/languages.js +1 -1
- package/build/esm/intl/languages.js.map +1 -1
- package/build/esm/newsroom-context/hooks/index.js +11 -11
- package/build/esm/newsroom-context/hooks/index.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js +1 -1
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCategories.js +1 -1
- package/build/esm/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js +1 -1
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentStory.js +1 -1
- package/build/esm/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js +2 -2
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js +2 -2
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useLanguages.js +1 -1
- package/build/esm/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroom.js +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js +1 -1
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/esm/newsroom-context/index.js +2 -2
- package/build/esm/newsroom-context/index.js.map +1 -1
- package/build/esm/sentry/client.js +1 -1
- package/build/esm/sentry/client.js.map +1 -1
- package/build/esm/sentry/index.js +2 -2
- package/build/esm/sentry/index.js.map +1 -1
- package/build/esm/sentry/server.js +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 +3 -3
|
@@ -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 index_js_1 = require("../../data-fetching/index.js");
|
|
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, index_js_1.getNextPrezlyApi)(req);
|
|
13
13
|
const { galleries } = await api.getGalleries({ page, pageSize });
|
|
14
14
|
res.status(200).json({ galleries });
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":";;;AAEA,2DAAgE;AAEzD,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,2BAAgB,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 index_js_1 = require("../../data-fetching/index.js");
|
|
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, index_js_1.getNextPrezlyApi)(req);
|
|
13
13
|
const { stories } = await (category
|
|
14
14
|
? api.getStoriesFromCategory(category, { page, pageSize, include, localeCode })
|
|
15
15
|
: api.getStories({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":";;;AAEA,2DAAgE;AAEzD,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,2BAAgB,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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { fetchGalleries } from './fetchGalleries';
|
|
2
|
-
export { fetchStories } from './fetchStories';
|
|
1
|
+
export { fetchGalleries } from './fetchGalleries.js';
|
|
2
|
+
export { fetchStories } from './fetchStories.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fetchStories = exports.fetchGalleries = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "fetchGalleries", { enumerable: true, get: function () { return
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "fetchStories", { enumerable: true, get: function () { return
|
|
4
|
+
var fetchGalleries_js_1 = require("./fetchGalleries.js");
|
|
5
|
+
Object.defineProperty(exports, "fetchGalleries", { enumerable: true, get: function () { return fetchGalleries_js_1.fetchGalleries; } });
|
|
6
|
+
var fetchStories_js_1 = require("./fetchStories.js");
|
|
7
|
+
Object.defineProperty(exports, "fetchStories", { enumerable: true, get: function () { return fetchStories_js_1.fetchStories; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":";;;AAAA,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,qDAAiD;AAAxC,+GAAA,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").NextPrezlyApi;
|
|
13
|
-
serverSideProps: import("
|
|
12
|
+
api: import("../data-fetching/NextPrezlyApi.js").NextPrezlyApi;
|
|
13
|
+
serverSideProps: import("../types.js").PageProps & import("../types.js").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 index_js_1 = require("../data-fetching/index.js");
|
|
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, index_js_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();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":";;;AAGA,wDAA6D;AAO7D;;;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,2BAAgB,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").NextPrezlyApi;
|
|
13
|
-
staticProps: import("
|
|
12
|
+
api: import("../data-fetching/NextPrezlyApi.js").NextPrezlyApi;
|
|
13
|
+
staticProps: import("../types.js").PageProps & import("../types.js").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 index_js_1 = require("../data-fetching/index.js");
|
|
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, index_js_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();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNewsroomStaticProps.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/getNewsroomStaticProps.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"getNewsroomStaticProps.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/getNewsroomStaticProps.ts"],"names":[],"mappings":";;;AAGA,wDAA6D;AAO7D;;;GAGG;AACI,KAAK,UAAU,sBAAsB,CACxC,OAA8B,EAC9B,UAAmB,EAAE;IAErB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,MAAM,GAAG,GAAG,IAAA,2BAAgB,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,6 +1,6 @@
|
|
|
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/index.js';
|
|
2
|
+
export * from './getNewsroomServerSideProps.js';
|
|
3
|
+
export * from './getNewsroomStaticProps.js';
|
|
4
|
+
export * from './page-props/index.js';
|
|
5
|
+
export * from './processRequest.js';
|
|
6
|
+
export * from './processStaticRequest.js';
|
|
@@ -14,10 +14,10 @@ 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("./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);
|
|
17
|
+
__exportStar(require("./api-handlers/index.js"), exports);
|
|
18
|
+
__exportStar(require("./getNewsroomServerSideProps.js"), exports);
|
|
19
|
+
__exportStar(require("./getNewsroomStaticProps.js"), exports);
|
|
20
|
+
__exportStar(require("./page-props/index.js"), exports);
|
|
21
|
+
__exportStar(require("./processRequest.js"), exports);
|
|
22
|
+
__exportStar(require("./processStaticRequest.js"), exports);
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,kEAAgD;AAChD,8DAA4C;AAC5C,wDAAsC;AACtC,sDAAoC;AACpC,4DAA0C"}
|
|
@@ -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 index_js_1 = require("../../data-fetching/index.js");
|
|
6
|
+
const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
|
|
7
|
+
const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
|
|
8
|
+
const processRequest_js_1 = require("../processRequest.js");
|
|
9
|
+
const processStaticRequest_js_1 = require("../processStaticRequest.js");
|
|
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_js_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_js_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_js_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_js_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, index_js_1.getNextPrezlyApi)();
|
|
83
83
|
const [categories, defaultLanguage] = await Promise.all([
|
|
84
84
|
api.getCategories(),
|
|
85
85
|
api.getNewsroomDefaultLanguage(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/category.ts"],"names":[],"mappings":";;;AACA,2DAAmG;AASnG,
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/category.ts"],"names":[],"mappings":";;;AACA,2DAAmG;AASnG,2DAAgE;AAEhE,oFAA8E;AAC9E,4EAAsE;AACtE,4DAAsD;AACtD,wEAAkE;AAclE,SAAgB,8BAA8B,CAG5C,WAAqD,EAAE,OAAiB;IACtE,MAAM,EAAE,QAAQ,GAAG,kCAAiB,EAAE,gBAAgB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEzE,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,0DAA0B,EAAC,OAAO,CAAC,CAAC;QAE3E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAA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AE;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_js_1 = require("../getNewsroomServerSideProps.js");
|
|
6
|
+
const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
|
|
7
|
+
const processRequest_js_1 = require("../processRequest.js");
|
|
8
|
+
const processStaticRequest_js_1 = require("../processStaticRequest.js");
|
|
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_js_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_js_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_js_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_js_1.processStaticRequest)(context, {
|
|
57
57
|
...staticProps,
|
|
58
58
|
galleries,
|
|
59
59
|
pagination: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/gallery.ts"],"names":[],"mappings":";;;AACA,2DAAmE;AASnE,
|
|
1
|
+
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/gallery.ts"],"names":[],"mappings":";;;AACA,2DAAmE;AASnE,oFAA8E;AAC9E,4EAAsE;AACtE,4DAAsD;AACtD,wEAAkE;AAalE,SAA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sEA4CC;AAED,SAAgB,yBAAyB,CACrC,WAA4E,EAC5E,OAAiB;IAEjB,MAAM,EAAE,QAAQ,GAAG,0CAAyB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAE/D,OAAO,KAAK,UAAU,cAAc,CAChC,OAA8B;QAE9B,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,kDAAsB,EAAC,OAAO,CAAC,CAAC;QAEnE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEvE,0DAA0D;QAC1D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;YAE9B,OAAO;gBACH,QAAQ,EAAE;oBACN,WAAW,EAAE,gBAAgB,IAAI,EAAE;oBACnC,SAAS,EAAE,KAAK;iBACnB;aACJ,CAAC;SACL;QAED,OAAO,IAAA,8CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,SAAS;YACT,UAAU,EAAE;gBACR,UAAU,EAAE,UAAU,CAAC,sBAAsB;gBAC7C,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;AAzCD,8DAyCC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
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 index_js_1 = require("../../data-fetching/index.js");
|
|
5
|
+
const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
|
|
6
|
+
const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
|
|
7
|
+
const processRequest_js_1 = require("../processRequest.js");
|
|
8
|
+
const processStaticRequest_js_1 = require("../processStaticRequest.js");
|
|
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_js_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_js_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_js_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_js_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, index_js_1.getNextPrezlyApi)();
|
|
47
47
|
const { galleries } = await api.getGalleries({});
|
|
48
48
|
const paths = galleries.map(({ uuid }) => ({ params: { uuid } }));
|
|
49
49
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AASA,
|
|
1
|
+
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AASA,2DAAgE;AAChE,oFAA8E;AAC9E,4EAAsE;AACtE,4DAAsD;AACtD,wEAAkE;AAQlE,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,0DAA0B,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,kCAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,OAAO;YACP,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAA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|
@@ -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_js_1 = require("../getNewsroomServerSideProps.js");
|
|
6
|
+
const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
|
|
7
|
+
const processRequest_js_1 = require("../processRequest.js");
|
|
8
|
+
const processStaticRequest_js_1 = require("../processStaticRequest.js");
|
|
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_js_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_js_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_js_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_js_1.processStaticRequest)(context, {
|
|
60
60
|
...staticProps,
|
|
61
61
|
// TODO: This is temporary until return types from API are figured out
|
|
62
62
|
stories: stories,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/home.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAS3D,
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/home.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAS3D,oFAA8E;AAC9E,4EAAsE;AACtE,4DAAsD;AACtD,wEAAkE;AAqBlE,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,0DAA0B,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,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AAM,gBAAgB,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAC1C,QAAQ;YACR,OAAO;YACP,OAAO,EAAE,gBAAgB;YACzB,UAAU;SACb,CAAC,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;QAEnD,OAAO,IAAA,8CAAoB,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.js';
|
|
2
|
+
export { getGalleryPageServerSideProps, getGalleryPageStaticProps, type GalleryPageProps, } from './gallery.js';
|
|
3
|
+
export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, type GalleryAlbumPageProps, } from './galleryAlbum.js';
|
|
4
|
+
export { getHomepageServerSideProps, getHomepageStaticProps, type HomePageProps } from './home.js';
|
|
5
|
+
export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search.js';
|
|
6
|
+
export * from './sitemap/index.js';
|
|
7
|
+
export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story.js';
|
|
8
|
+
export { getStoryPreviewPageServerSideProps } from './storyPreview.js';
|
|
@@ -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"), exports);
|
|
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_js_1 = require("./category.js");
|
|
19
|
+
Object.defineProperty(exports, "getCategoryPageServerSideProps", { enumerable: true, get: function () { return category_js_1.getCategoryPageServerSideProps; } });
|
|
20
|
+
Object.defineProperty(exports, "getCategoryPageStaticPaths", { enumerable: true, get: function () { return category_js_1.getCategoryPageStaticPaths; } });
|
|
21
|
+
Object.defineProperty(exports, "getCategoryPageStaticProps", { enumerable: true, get: function () { return category_js_1.getCategoryPageStaticProps; } });
|
|
22
|
+
var gallery_js_1 = require("./gallery.js");
|
|
23
|
+
Object.defineProperty(exports, "getGalleryPageServerSideProps", { enumerable: true, get: function () { return gallery_js_1.getGalleryPageServerSideProps; } });
|
|
24
|
+
Object.defineProperty(exports, "getGalleryPageStaticProps", { enumerable: true, get: function () { return gallery_js_1.getGalleryPageStaticProps; } });
|
|
25
|
+
var galleryAlbum_js_1 = require("./galleryAlbum.js");
|
|
26
|
+
Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", { enumerable: true, get: function () { return galleryAlbum_js_1.getGalleryAlbumPageServerSideProps; } });
|
|
27
|
+
Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", { enumerable: true, get: function () { return galleryAlbum_js_1.getGalleryAlbumPageStaticPaths; } });
|
|
28
|
+
Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", { enumerable: true, get: function () { return galleryAlbum_js_1.getGalleryAlbumPageStaticProps; } });
|
|
29
|
+
var home_js_1 = require("./home.js");
|
|
30
|
+
Object.defineProperty(exports, "getHomepageServerSideProps", { enumerable: true, get: function () { return home_js_1.getHomepageServerSideProps; } });
|
|
31
|
+
Object.defineProperty(exports, "getHomepageStaticProps", { enumerable: true, get: function () { return home_js_1.getHomepageStaticProps; } });
|
|
32
|
+
var search_js_1 = require("./search.js");
|
|
33
|
+
Object.defineProperty(exports, "getSearchPageServerSideProps", { enumerable: true, get: function () { return search_js_1.getSearchPageServerSideProps; } });
|
|
34
|
+
Object.defineProperty(exports, "getSearchPageStaticProps", { enumerable: true, get: function () { return search_js_1.getSearchPageStaticProps; } });
|
|
35
|
+
__exportStar(require("./sitemap/index.js"), exports);
|
|
36
|
+
var story_js_1 = require("./story.js");
|
|
37
|
+
Object.defineProperty(exports, "getStoryPageServerSideProps", { enumerable: true, get: function () { return story_js_1.getStoryPageServerSideProps; } });
|
|
38
|
+
Object.defineProperty(exports, "getStoryPageStaticPaths", { enumerable: true, get: function () { return story_js_1.getStoryPageStaticPaths; } });
|
|
39
|
+
Object.defineProperty(exports, "getStoryPageStaticProps", { enumerable: true, get: function () { return story_js_1.getStoryPageStaticProps; } });
|
|
40
|
+
var storyPreview_js_1 = require("./storyPreview.js");
|
|
41
|
+
Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", { enumerable: true, get: function () { return storyPreview_js_1.getStoryPreviewPageServerSideProps; } });
|
|
42
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAKuB;AAJnB,6HAAA,8BAA8B,OAAA;AAC9B,yHAAA,0BAA0B,OAAA;AAC1B,yHAAA,0BAA0B,OAAA;AAG9B,2CAIsB;AAHlB,2HAAA,6BAA6B,OAAA;AAC7B,uHAAA,yBAAyB,OAAA;AAG7B,qDAK2B;AAJvB,qIAAA,kCAAkC,OAAA;AAClC,iIAAA,8BAA8B,OAAA;AAC9B,iIAAA,8BAA8B,OAAA;AAGlC,qCAAmG;AAA1F,qHAAA,0BAA0B,OAAA;AAAE,iHAAA,sBAAsB,OAAA;AAC3D,yCAAqF;AAA5E,yHAAA,4BAA4B,OAAA;AAAE,qHAAA,wBAAwB,OAAA;AAC/D,qDAAmC;AACnC,uCAIoB;AAHhB,uHAAA,2BAA2B,OAAA;AAC3B,mHAAA,uBAAuB,OAAA;AACvB,mHAAA,uBAAuB,OAAA;AAE3B,qDAAuE;AAA9D,qIAAA,kCAAkC,OAAA"}
|
|
@@ -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_js_1 = require("../getNewsroomServerSideProps.js");
|
|
5
|
+
const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
|
|
6
|
+
const processRequest_js_1 = require("../processRequest.js");
|
|
7
|
+
const processStaticRequest_js_1 = require("../processStaticRequest.js");
|
|
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_js_1.getNewsroomServerSideProps)(context);
|
|
11
|
+
return (0, processRequest_js_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_js_1.getNewsroomStaticProps)(context);
|
|
23
|
+
return (0, processStaticRequest_js_1.processStaticRequest)(context, {
|
|
24
24
|
...staticProps,
|
|
25
25
|
...(typeof customProps === 'function'
|
|
26
26
|
? await customProps(context, staticProps)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/search.ts"],"names":[],"mappings":";;;AAMA,
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/search.ts"],"names":[],"mappings":";;;AAMA,oFAA8E;AAC9E,4EAAsE;AACtE,4DAAsD;AACtD,wEAAkE;AAIlE,SAAgB,4BAA4B,CACxC,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,0DAA0B,EAAC,OAAO,CAAC,CAAC;QAEtE,OAAO,IAAA,kCAAc,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,cAAc,CAChC,OAAkC;QAElC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,kDAAsB,EAAC,OAAO,CAAC,CAAC;QAE9D,OAAO,IAAA,8CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;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;AAlBD,4DAkBC"}
|