@prezly/theme-kit-nextjs 1.18.2 → 2.0.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/build/adapter-nextjs/api-handlers/fetchGalleries.js +3 -7
  2. package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
  3. package/build/adapter-nextjs/api-handlers/fetchStories.js +3 -7
  4. package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
  5. package/build/adapter-nextjs/api-handlers/index.js +2 -7
  6. package/build/adapter-nextjs/api-handlers/index.js.map +1 -1
  7. package/build/adapter-nextjs/getNewsroomServerSideProps.js +3 -7
  8. package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
  9. package/build/adapter-nextjs/getNewsroomStaticProps.js +3 -7
  10. package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
  11. package/build/adapter-nextjs/index.js +6 -22
  12. package/build/adapter-nextjs/index.js.map +1 -1
  13. package/build/adapter-nextjs/page-props/category.d.ts +2 -2
  14. package/build/adapter-nextjs/page-props/category.js +19 -25
  15. package/build/adapter-nextjs/page-props/category.js.map +1 -1
  16. package/build/adapter-nextjs/page-props/gallery.js +13 -18
  17. package/build/adapter-nextjs/page-props/gallery.js.map +1 -1
  18. package/build/adapter-nextjs/page-props/galleryAlbum.js +13 -19
  19. package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
  20. package/build/adapter-nextjs/page-props/home.d.ts +2 -2
  21. package/build/adapter-nextjs/page-props/home.js +13 -18
  22. package/build/adapter-nextjs/page-props/home.js.map +1 -1
  23. package/build/adapter-nextjs/page-props/index.js +8 -41
  24. package/build/adapter-nextjs/page-props/index.js.map +1 -1
  25. package/build/adapter-nextjs/page-props/lib/types.js +1 -2
  26. package/build/adapter-nextjs/page-props/search.js +10 -15
  27. package/build/adapter-nextjs/page-props/search.js.map +1 -1
  28. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +1 -5
  29. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -1
  30. package/build/adapter-nextjs/page-props/sitemap/createPaths.js +1 -5
  31. package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -1
  32. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js +7 -11
  33. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
  34. package/build/adapter-nextjs/page-props/sitemap/index.js +4 -24
  35. package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
  36. package/build/adapter-nextjs/page-props/sitemap/types.js +1 -2
  37. package/build/adapter-nextjs/page-props/story.js +17 -23
  38. package/build/adapter-nextjs/page-props/story.js.map +1 -1
  39. package/build/adapter-nextjs/page-props/storyPreview.js +7 -11
  40. package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -1
  41. package/build/adapter-nextjs/processRequest.js +5 -9
  42. package/build/adapter-nextjs/processRequest.js.map +1 -1
  43. package/build/adapter-nextjs/processStaticRequest.js +1 -5
  44. package/build/adapter-nextjs/processStaticRequest.js.map +1 -1
  45. package/build/components-nextjs/PageSeo/PageSeo.js +25 -29
  46. package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
  47. package/build/components-nextjs/PageSeo/index.js +2 -20
  48. package/build/components-nextjs/PageSeo/index.js.map +1 -1
  49. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +1 -5
  50. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
  51. package/build/components-nextjs/PageSeo/lib/types.js +1 -2
  52. package/build/components-nextjs/StorySeo/StorySeo.js +7 -11
  53. package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
  54. package/build/components-nextjs/StorySeo/index.js +1 -5
  55. package/build/components-nextjs/StorySeo/index.js.map +1 -1
  56. package/build/components-nextjs/document.js +8 -35
  57. package/build/components-nextjs/document.js.map +1 -1
  58. package/build/components-nextjs/index.js +3 -9
  59. package/build/components-nextjs/index.js.map +1 -1
  60. package/build/data-fetching/api/PrezlyApi.d.ts +4 -5
  61. package/build/data-fetching/api/PrezlyApi.js +39 -44
  62. package/build/data-fetching/api/PrezlyApi.js.map +1 -1
  63. package/build/data-fetching/api/getPrezlyApi.js +5 -9
  64. package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
  65. package/build/data-fetching/api/index.js +1 -17
  66. package/build/data-fetching/api/index.js.map +1 -1
  67. package/build/data-fetching/api/queries.js +5 -13
  68. package/build/data-fetching/api/queries.js.map +1 -1
  69. package/build/data-fetching/index.js +3 -19
  70. package/build/data-fetching/index.js.map +1 -1
  71. package/build/data-fetching/lib/getAlgoliaSettings.js +3 -7
  72. package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
  73. package/build/data-fetching/lib/getEnvVariables.js +3 -10
  74. package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
  75. package/build/data-fetching/lib/index.js +4 -11
  76. package/build/data-fetching/lib/index.js.map +1 -1
  77. package/build/data-fetching/lib/isSdkError.js +1 -5
  78. package/build/data-fetching/lib/isSdkError.js.map +1 -1
  79. package/build/data-fetching/lib/isUuid.js +1 -5
  80. package/build/data-fetching/lib/isUuid.js.map +1 -1
  81. package/build/data-fetching/types.js +1 -2
  82. package/build/index.js +9 -25
  83. package/build/index.js.map +1 -1
  84. package/build/infinite-loading/index.js +4 -24
  85. package/build/infinite-loading/index.js.map +1 -1
  86. package/build/infinite-loading/types.js +1 -2
  87. package/build/infinite-loading/useInfiniteGalleriesLoading.js +3 -7
  88. package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
  89. package/build/infinite-loading/useInfiniteLoading.js +9 -13
  90. package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
  91. package/build/infinite-loading/useInfiniteStoriesLoading.d.ts +2 -2
  92. package/build/infinite-loading/useInfiniteStoriesLoading.js +7 -11
  93. package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
  94. package/build/intl/index.d.ts +1 -1
  95. package/build/intl/index.js +4 -25
  96. package/build/intl/index.js.map +1 -1
  97. package/build/intl/languages.d.ts +1 -1
  98. package/build/intl/languages.js +23 -37
  99. package/build/intl/languages.js.map +1 -1
  100. package/build/intl/locale.js +11 -17
  101. package/build/intl/locale.js.map +1 -1
  102. package/build/intl/localeConfig.d.ts +1 -2
  103. package/build/intl/localeConfig.js +3 -4
  104. package/build/intl/localeConfig.js.map +1 -1
  105. package/build/intl/localeList.d.ts +4 -2
  106. package/build/intl/localeList.js +1 -2
  107. package/build/intl/localeList.js.map +1 -1
  108. package/build/intl/localeObject.js +3 -10
  109. package/build/intl/localeObject.js.map +1 -1
  110. package/build/newsroom-context/context.js +7 -11
  111. package/build/newsroom-context/context.js.map +1 -1
  112. package/build/newsroom-context/hooks/index.js +11 -27
  113. package/build/newsroom-context/hooks/index.js.map +1 -1
  114. package/build/newsroom-context/hooks/useAlgoliaSettings.js +3 -7
  115. package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
  116. package/build/newsroom-context/hooks/useCategories.js +3 -7
  117. package/build/newsroom-context/hooks/useCategories.js.map +1 -1
  118. package/build/newsroom-context/hooks/useCompanyInformation.js +3 -7
  119. package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
  120. package/build/newsroom-context/hooks/useCurrentCategory.js +3 -7
  121. package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
  122. package/build/newsroom-context/hooks/useCurrentLocale.js +3 -7
  123. package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
  124. package/build/newsroom-context/hooks/useCurrentStory.js +3 -7
  125. package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
  126. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +10 -14
  127. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
  128. package/build/newsroom-context/hooks/useGetTranslationUrl.js +24 -31
  129. package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
  130. package/build/newsroom-context/hooks/useLanguages.js +3 -7
  131. package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
  132. package/build/newsroom-context/hooks/useNewsroom.js +3 -7
  133. package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
  134. package/build/newsroom-context/hooks/useNewsroomContext.js +4 -8
  135. package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
  136. package/build/newsroom-context/index.js +2 -21
  137. package/build/newsroom-context/index.js.map +1 -1
  138. package/build/sentry/client.js +3 -7
  139. package/build/sentry/client.js.map +1 -1
  140. package/build/sentry/common.js +1 -5
  141. package/build/sentry/common.js.map +1 -1
  142. package/build/sentry/index.js +2 -7
  143. package/build/sentry/index.js.map +1 -1
  144. package/build/sentry/server.js +3 -7
  145. package/build/sentry/server.js.map +1 -1
  146. package/build/tsconfig.tsbuildinfo +1 -1
  147. package/build/types.d.ts +2 -2
  148. package/build/types.js +1 -2
  149. package/build/utils/boilerplate.js +3 -9
  150. package/build/utils/boilerplate.js.map +1 -1
  151. package/build/utils/constants.js +3 -6
  152. package/build/utils/constants.js.map +1 -1
  153. package/build/utils/getAssetsUrl.js +3 -7
  154. package/build/utils/getAssetsUrl.js.map +1 -1
  155. package/build/utils/getDataRequestLink.js +3 -7
  156. package/build/utils/getDataRequestLink.js.map +1 -1
  157. package/build/utils/getLocalizedCategoryData.js +3 -9
  158. package/build/utils/getLocalizedCategoryData.js.map +1 -1
  159. package/build/utils/getNewsroomLogoUrl.js +5 -10
  160. package/build/utils/getNewsroomLogoUrl.js.map +1 -1
  161. package/build/utils/getPrivacyPortalUrl.js +1 -5
  162. package/build/utils/getPrivacyPortalUrl.js.map +1 -1
  163. package/build/utils/getStoryPublicationDate.js +1 -5
  164. package/build/utils/getStoryPublicationDate.js.map +1 -1
  165. package/build/utils/getUploadcareGroupUrl.js +3 -7
  166. package/build/utils/getUploadcareGroupUrl.js.map +1 -1
  167. package/build/utils/index.js +10 -26
  168. package/build/utils/index.js.map +1 -1
  169. package/build/utils/isEmbargoStory.js +1 -5
  170. package/build/utils/isEmbargoStory.js.map +1 -1
  171. package/package.json +17 -17
  172. package/src/@types/global.d.ts +0 -7
  173. package/src/__mocks__/languages.ts +0 -417
  174. package/src/__mocks__/story.ts +0 -351
  175. package/src/adapter-nextjs/api-handlers/fetchGalleries.ts +0 -24
  176. package/src/adapter-nextjs/api-handlers/fetchStories.ts +0 -26
  177. package/src/adapter-nextjs/api-handlers/index.ts +0 -2
  178. package/src/adapter-nextjs/getNewsroomServerSideProps.ts +0 -29
  179. package/src/adapter-nextjs/getNewsroomStaticProps.ts +0 -29
  180. package/src/adapter-nextjs/index.ts +0 -6
  181. package/src/adapter-nextjs/page-props/category.ts +0 -157
  182. package/src/adapter-nextjs/page-props/gallery.ts +0 -114
  183. package/src/adapter-nextjs/page-props/galleryAlbum.ts +0 -89
  184. package/src/adapter-nextjs/page-props/home.ts +0 -113
  185. package/src/adapter-nextjs/page-props/index.ts +0 -26
  186. package/src/adapter-nextjs/page-props/lib/types.ts +0 -8
  187. package/src/adapter-nextjs/page-props/search.ts +0 -53
  188. package/src/adapter-nextjs/page-props/sitemap/SitemapBuilder.ts +0 -56
  189. package/src/adapter-nextjs/page-props/sitemap/createPaths.ts +0 -21
  190. package/src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts +0 -43
  191. package/src/adapter-nextjs/page-props/sitemap/index.ts +0 -5
  192. package/src/adapter-nextjs/page-props/sitemap/types.ts +0 -5
  193. package/src/adapter-nextjs/page-props/story.ts +0 -94
  194. package/src/adapter-nextjs/page-props/storyPreview.ts +0 -33
  195. package/src/adapter-nextjs/processRequest.ts +0 -49
  196. package/src/adapter-nextjs/processStaticRequest.ts +0 -32
  197. package/src/components-nextjs/PageSeo/PageSeo.tsx +0 -131
  198. package/src/components-nextjs/PageSeo/index.ts +0 -2
  199. package/src/components-nextjs/PageSeo/lib/getAbsoluteUrl.ts +0 -7
  200. package/src/components-nextjs/PageSeo/lib/types.ts +0 -4
  201. package/src/components-nextjs/StorySeo/StorySeo.tsx +0 -80
  202. package/src/components-nextjs/StorySeo/index.ts +0 -1
  203. package/src/components-nextjs/document.tsx +0 -38
  204. package/src/components-nextjs/index.ts +0 -3
  205. package/src/data-fetching/api/PrezlyApi.ts +0 -302
  206. package/src/data-fetching/api/getPrezlyApi.ts +0 -24
  207. package/src/data-fetching/api/index.ts +0 -1
  208. package/src/data-fetching/api/queries.ts +0 -51
  209. package/src/data-fetching/index.ts +0 -3
  210. package/src/data-fetching/lib/getAlgoliaSettings.ts +0 -29
  211. package/src/data-fetching/lib/getEnvVariables.ts +0 -46
  212. package/src/data-fetching/lib/index.ts +0 -4
  213. package/src/data-fetching/lib/isSdkError.ts +0 -5
  214. package/src/data-fetching/lib/isUuid.ts +0 -5
  215. package/src/data-fetching/types.ts +0 -14
  216. package/src/index.ts +0 -9
  217. package/src/infinite-loading/index.ts +0 -4
  218. package/src/infinite-loading/types.ts +0 -5
  219. package/src/infinite-loading/useInfiniteGalleriesLoading.ts +0 -53
  220. package/src/infinite-loading/useInfiniteLoading.ts +0 -66
  221. package/src/infinite-loading/useInfiniteStoriesLoading.ts +0 -81
  222. package/src/intl/index.ts +0 -4
  223. package/src/intl/languages.test.ts +0 -232
  224. package/src/intl/languages.ts +0 -233
  225. package/src/intl/locale.test.ts +0 -94
  226. package/src/intl/locale.ts +0 -140
  227. package/src/intl/localeConfig.js +0 -23
  228. package/src/intl/localeList.js +0 -110
  229. package/src/intl/localeObject.test.ts +0 -81
  230. package/src/intl/localeObject.ts +0 -99
  231. package/src/newsroom-context/context.tsx +0 -115
  232. package/src/newsroom-context/hooks/index.ts +0 -11
  233. package/src/newsroom-context/hooks/useAlgoliaSettings.ts +0 -7
  234. package/src/newsroom-context/hooks/useCategories.ts +0 -7
  235. package/src/newsroom-context/hooks/useCompanyInformation.ts +0 -7
  236. package/src/newsroom-context/hooks/useCurrentCategory.ts +0 -7
  237. package/src/newsroom-context/hooks/useCurrentLocale.ts +0 -7
  238. package/src/newsroom-context/hooks/useCurrentStory.ts +0 -7
  239. package/src/newsroom-context/hooks/useGetLinkLocaleSlug.ts +0 -37
  240. package/src/newsroom-context/hooks/useGetTranslationUrl.ts +0 -96
  241. package/src/newsroom-context/hooks/useLanguages.ts +0 -7
  242. package/src/newsroom-context/hooks/useNewsroom.ts +0 -7
  243. package/src/newsroom-context/hooks/useNewsroomContext.ts +0 -15
  244. package/src/newsroom-context/index.ts +0 -2
  245. package/src/sentry/client.ts +0 -7
  246. package/src/sentry/common.ts +0 -27
  247. package/src/sentry/index.ts +0 -2
  248. package/src/sentry/server.ts +0 -7
  249. package/src/types.ts +0 -51
  250. package/src/utils/boilerplate.ts +0 -27
  251. package/src/utils/constants.ts +0 -3
  252. package/src/utils/getAssetsUrl.test.ts +0 -9
  253. package/src/utils/getAssetsUrl.ts +0 -9
  254. package/src/utils/getDataRequestLink.ts +0 -14
  255. package/src/utils/getLocalizedCategoryData.ts +0 -47
  256. package/src/utils/getNewsroomLogoUrl.ts +0 -22
  257. package/src/utils/getPrivacyPortalUrl.ts +0 -25
  258. package/src/utils/getStoryPublicationDate.tsx +0 -15
  259. package/src/utils/getUploadcareGroupUrl.ts +0 -13
  260. package/src/utils/index.ts +0 -10
  261. package/src/utils/isEmbargoStory.ts +0 -10
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchGalleries = void 0;
4
- const data_fetching_1 = require("../../data-fetching");
5
- async function fetchGalleries(req, res) {
1
+ import { getPrezlyApi } from '../../data-fetching';
2
+ export async function fetchGalleries(req, res) {
6
3
  if (req.method !== 'POST') {
7
4
  res.status(405);
8
5
  return;
9
6
  }
10
7
  const { page, pageSize } = req.body;
11
8
  try {
12
- const api = (0, data_fetching_1.getPrezlyApi)(req);
9
+ const api = getPrezlyApi(req);
13
10
  const { galleries } = await api.getGalleries({ page, pageSize });
14
11
  res.status(200).json({ galleries });
15
12
  }
@@ -19,5 +16,4 @@ async function fetchGalleries(req, res) {
19
16
  });
20
17
  }
21
18
  }
22
- exports.fetchGalleries = fetchGalleries;
23
19
  //# sourceMappingURL=fetchGalleries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAE5C,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,4BAAY,EAAC,GAAG,CAAC,CAAC;QAE9B,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
+ {"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,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,YAAY,CAAC,GAAG,CAAC,CAAC;QAE9B,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,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchStories = void 0;
4
- const data_fetching_1 = require("../../data-fetching");
5
- async function fetchStories(req, res) {
1
+ import { getPrezlyApi } from '../../data-fetching';
2
+ export async function fetchStories(req, res) {
6
3
  if (req.method !== 'POST') {
7
4
  res.status(405);
8
5
  return;
9
6
  }
10
7
  const { page, pageSize, category, include, localeCode } = req.body;
11
8
  try {
12
- const api = (0, data_fetching_1.getPrezlyApi)(req);
9
+ const api = getPrezlyApi(req);
13
10
  const { stories } = await (category
14
11
  ? api.getStoriesFromCategory(category, { page, pageSize, include, localeCode })
15
12
  : api.getStories({ page, pageSize, include, localeCode }));
@@ -21,5 +18,4 @@ async function fetchStories(req, res) {
21
18
  });
22
19
  }
23
20
  }
24
- exports.fetchStories = fetchStories;
25
21
  //# sourceMappingURL=fetchStories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAE5C,KAAK,UAAU,YAAY,CAAC,GAAmB,EAAE,GAAoB;IACxE,IAAI,GAAG,CAAC,M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AAG,GAAG,CAAC,IAAI,CAAC;IAEnE,IAAI;QACA,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAE9B,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,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;QAE/D,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,8 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchStories = exports.fetchGalleries = void 0;
4
- var fetchGalleries_1 = require("./fetchGalleries");
5
- Object.defineProperty(exports, "fetchGalleries", { enumerable: true, get: function () { return fetchGalleries_1.fetchGalleries; } });
6
- var fetchStories_1 = require("./fetchStories");
7
- Object.defineProperty(exports, "fetchStories", { enumerable: true, get: function () { return fetchStories_1.fetchStories; } });
1
+ export { fetchGalleries } from './fetchGalleries';
2
+ export { fetchStories } from './fetchStories';
8
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,+CAA8C;AAArC,4GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,19 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNewsroomServerSideProps = void 0;
4
- const data_fetching_1 = require("../data-fetching");
1
+ import { getPrezlyApi } from '../data-fetching';
5
2
  /**
6
3
  * Use this function in your `getServerSideProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
7
4
  * See README for usage examples.
8
5
  */
9
- async function getNewsroomServerSideProps(context, options = {}) {
6
+ export async function getNewsroomServerSideProps(context, options = {}) {
10
7
  const { req: request, locale } = context;
11
- const api = (0, data_fetching_1.getPrezlyApi)(request);
8
+ const api = getPrezlyApi(request);
12
9
  const serverSideProps = await api.getNewsroomServerSideProps(request, locale, options.story);
13
10
  if (options.loadHomepageContacts) {
14
11
  serverSideProps.newsroomContextProps.contacts = await api.getNewsroomContacts();
15
12
  }
16
13
  return { api, serverSideProps };
17
14
  }
18
- exports.getNewsroomServerSideProps = getNewsroomServerSideProps;
19
15
  //# sourceMappingURL=getNewsroomServerSideProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":";;;AAGA,oDAAgD;AAOhD;;;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,4BAAY,EAAC,OAAO,CAAC,CAAC;IAClC,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"}
1
+ {"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD;;;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,YAAY,CAAC,OAAO,CAAC,CAAC;IAClC,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,19 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNewsroomStaticProps = void 0;
4
- const data_fetching_1 = require("../data-fetching");
1
+ import { getPrezlyApi } from '../data-fetching';
5
2
  /**
6
3
  * Use this function in your `getNewsroomStaticProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
7
4
  * See README for usage examples.
8
5
  */
9
- async function getNewsroomStaticProps(context, options = {}) {
6
+ export async function getNewsroomStaticProps(context, options = {}) {
10
7
  const { locale } = context;
11
- const api = (0, data_fetching_1.getPrezlyApi)();
8
+ const api = getPrezlyApi();
12
9
  const staticProps = await api.getNewsroomServerSideProps(undefined, locale, options.story);
13
10
  if (options.loadHomepageContacts) {
14
11
  staticProps.newsroomContextProps.contacts = await api.getNewsroomContacts();
15
12
  }
16
13
  return { api, staticProps };
17
14
  }
18
- exports.getNewsroomStaticProps = getNewsroomStaticProps;
19
15
  //# sourceMappingURL=getNewsroomStaticProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNewsroomStaticProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomStaticProps.ts"],"names":[],"mappings":";;;AAGA,oDAAgD;AAOhD;;;GAGG;AACI,KAAK,UAAU,sBAAsB,CACxC,OAA8B,EAC9B,UAAmB,EAAE;IAErB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,MAAM,GAAG,GAAG,IAAA,4BAAY,GAAE,CAAC;IAC3B,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
+ {"version":3,"file":"getNewsroomStaticProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomStaticProps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CACxC,OAA8B,EAC9B,UAAmB,EAAE;IAErB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;IAC3B,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"}
@@ -1,23 +1,7 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
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);
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';
23
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter-nextjs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+DAA6C;AAC7C,2DAAyC;AACzC,+CAA6B;AAC7B,mDAAiC;AACjC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter-nextjs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ExtraStoryFields, Story } from '@prezly/sdk';
1
+ import type { Story } from '@prezly/sdk';
2
2
  import type { GetServerSidePropsContext, GetServerSidePropsResult, GetStaticPathsResult, GetStaticPropsContext, GetStaticPropsResult } from 'next';
3
3
  import type { PaginationProps } from '../../infinite-loading/types';
4
4
  import type { PropsFunction } from './lib/types';
@@ -7,7 +7,7 @@ export interface CategoryPageProps<StoryType extends Story = Story> {
7
7
  pagination: PaginationProps;
8
8
  }
9
9
  interface Options {
10
- extraStoryFields?: (keyof ExtraStoryFields)[];
10
+ extraStoryFields?: (keyof Story.ExtraFields)[];
11
11
  pageSize?: number;
12
12
  }
13
13
  export declare function getCategoryPageServerSideProps<CustomProps extends Record<string, any>, StoryType extends Story = Story>(customProps: CustomProps | PropsFunction<CustomProps>, options?: Options): (context: GetServerSidePropsContext) => Promise<GetServerSidePropsResult<CategoryPageProps<StoryType> & CustomProps>>;
@@ -1,17 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCategoryPageStaticPaths = exports.getCategoryPageStaticProps = exports.getCategoryPageServerSideProps = void 0;
4
- const data_fetching_1 = require("../../data-fetching");
5
- const intl_1 = require("../../intl");
6
- const utils_1 = require("../../utils");
7
- const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
8
- const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
9
- const processRequest_1 = require("../processRequest");
10
- const processStaticRequest_1 = require("../processStaticRequest");
11
- function getCategoryPageServerSideProps(customProps, options) {
12
- const { pageSize = utils_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
1
+ import { getPrezlyApi } from '../../data-fetching';
2
+ import { LocaleObject } from '../../intl';
3
+ import { DEFAULT_PAGE_SIZE, getLocalizedCategoryData } from '../../utils';
4
+ import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
5
+ import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
6
+ import { processRequest } from '../processRequest';
7
+ import { processStaticRequest } from '../processStaticRequest';
8
+ export function getCategoryPageServerSideProps(customProps, options) {
9
+ const { pageSize = DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
13
10
  return async function getServerSideProps(context) {
14
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
11
+ const { api, serverSideProps } = await getNewsroomServerSideProps(context);
15
12
  const { slug } = context.params;
16
13
  const category = await api.getCategoryBySlug(slug);
17
14
  if (!category) {
@@ -29,7 +26,7 @@ function getCategoryPageServerSideProps(customProps, options) {
29
26
  localeCode,
30
27
  });
31
28
  serverSideProps.newsroomContextProps.currentCategory = category;
32
- return (0, processRequest_1.processRequest)(context, {
29
+ return processRequest(context, {
33
30
  ...serverSideProps,
34
31
  // TODO: This is temporary until return types from API are figured out
35
32
  stories: stories,
@@ -44,11 +41,10 @@ function getCategoryPageServerSideProps(customProps, options) {
44
41
  }, `/category/${slug}`);
45
42
  };
46
43
  }
47
- exports.getCategoryPageServerSideProps = getCategoryPageServerSideProps;
48
- function getCategoryPageStaticProps(customProps, options) {
49
- const { pageSize = utils_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
44
+ export function getCategoryPageStaticProps(customProps, options) {
45
+ const { pageSize = DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
50
46
  return async function getStaticProps(context) {
51
- const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
47
+ const { api, staticProps } = await getNewsroomStaticProps(context);
52
48
  const { slug } = context.params;
53
49
  const category = await api.getCategoryBySlug(slug);
54
50
  if (!category) {
@@ -63,7 +59,7 @@ function getCategoryPageStaticProps(customProps, options) {
63
59
  localeCode,
64
60
  });
65
61
  staticProps.newsroomContextProps.currentCategory = category;
66
- return (0, processStaticRequest_1.processStaticRequest)(context, {
62
+ return processStaticRequest(context, {
67
63
  ...staticProps,
68
64
  // TODO: This is temporary until return types from API are figured out
69
65
  stories: stories,
@@ -78,17 +74,16 @@ function getCategoryPageStaticProps(customProps, options) {
78
74
  });
79
75
  };
80
76
  }
81
- exports.getCategoryPageStaticProps = getCategoryPageStaticProps;
82
- async function getCategoryPageStaticPaths() {
83
- const api = (0, data_fetching_1.getPrezlyApi)();
77
+ export async function getCategoryPageStaticPaths() {
78
+ const api = getPrezlyApi();
84
79
  const [categories, defaultLanguage] = await Promise.all([
85
80
  api.getCategories(),
86
81
  api.getNewsroomDefaultLanguage(),
87
82
  ]);
88
- const locale = intl_1.LocaleObject.fromAnyCode(defaultLanguage.code);
83
+ const locale = LocaleObject.fromAnyCode(defaultLanguage.code);
89
84
  const paths = categories
90
85
  .map((category) => {
91
- const { slug } = (0, utils_1.getLocalizedCategoryData)(category, locale);
86
+ const { slug } = getLocalizedCategoryData(category, locale);
92
87
  if (!slug) {
93
88
  return undefined;
94
89
  }
@@ -100,5 +95,4 @@ async function getCategoryPageStaticPaths() {
100
95
  fallback: 'blocking',
101
96
  };
102
97
  }
103
- exports.getCategoryPageStaticPaths = getCategoryPageStaticPaths;
104
98
  //# sourceMappingURL=category.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"category.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/category.ts"],"names":[],"mappings":";;;AASA,uDAAmD;AAEnD,qCAA0C;AAC1C,uCAA0E;AAC1E,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAc/D,SAAgB,8BAA8B,CAG5C,WAAqD,EAAE,OAAiB;IACtE,MAAM,EAAE,QAAQ,G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,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,0BAA0B;IAC5C,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;IAC3B,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpD,GAAG,CAAC,aAAa,EAAE;QACnB,GAAG,CAAC,0BAA0B,EAAE;KACnC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,YAAY,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,wBAAwB,CAAC,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"}
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGalleryPageStaticProps = exports.getGalleryPageServerSideProps = void 0;
4
- const utils_1 = require("../../utils");
5
- const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
- const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
7
- const processRequest_1 = require("../processRequest");
8
- const processStaticRequest_1 = require("../processStaticRequest");
9
- function getGalleryPageServerSideProps(customProps, options) {
10
- const { pageSize = utils_1.DEFAULT_GALLERY_PAGE_SIZE } = options || {};
1
+ import { DEFAULT_GALLERY_PAGE_SIZE } from '../../utils';
2
+ import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
3
+ import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
4
+ import { processRequest } from '../processRequest';
5
+ import { processStaticRequest } from '../processStaticRequest';
6
+ export function getGalleryPageServerSideProps(customProps, options) {
7
+ const { pageSize = DEFAULT_GALLERY_PAGE_SIZE } = options || {};
11
8
  return async function getServerSideProps(context) {
12
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
9
+ const { api, serverSideProps } = await getNewsroomServerSideProps(context);
13
10
  const { query } = context;
14
11
  const page = query.page && typeof query.page === 'string' ? Number(query.page) : undefined;
15
12
  const { galleries, pagination } = await api.getGalleries({ page, pageSize });
@@ -23,7 +20,7 @@ function getGalleryPageServerSideProps(customProps, options) {
23
20
  },
24
21
  };
25
22
  }
26
- return (0, processRequest_1.processRequest)(context, {
23
+ return processRequest(context, {
27
24
  ...serverSideProps,
28
25
  galleries,
29
26
  pagination: {
@@ -37,11 +34,10 @@ function getGalleryPageServerSideProps(customProps, options) {
37
34
  }, '/media');
38
35
  };
39
36
  }
40
- exports.getGalleryPageServerSideProps = getGalleryPageServerSideProps;
41
- function getGalleryPageStaticProps(customProps, options) {
42
- const { pageSize = utils_1.DEFAULT_GALLERY_PAGE_SIZE } = options || {};
37
+ export function getGalleryPageStaticProps(customProps, options) {
38
+ const { pageSize = DEFAULT_GALLERY_PAGE_SIZE } = options || {};
43
39
  return async function getStaticProps(context) {
44
- const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
40
+ const { api, staticProps } = await getNewsroomStaticProps(context);
45
41
  const { galleries, pagination } = await api.getGalleries({ pageSize });
46
42
  // If there's only one gallery, redirect to it immediately
47
43
  if (galleries.length === 1) {
@@ -53,7 +49,7 @@ function getGalleryPageStaticProps(customProps, options) {
53
49
  },
54
50
  };
55
51
  }
56
- return (0, processStaticRequest_1.processStaticRequest)(context, {
52
+ return processStaticRequest(context, {
57
53
  ...staticProps,
58
54
  galleries,
59
55
  pagination: {
@@ -67,5 +63,4 @@ function getGalleryPageStaticProps(customProps, options) {
67
63
  });
68
64
  };
69
65
  }
70
- exports.getGalleryPageStaticProps = getGalleryPageStaticProps;
71
66
  //# sourceMappingURL=gallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/gallery.ts"],"names":[],"mappings":";;;AASA,uCAAwD;AACxD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAa/D,SAAgB,6BAA6B,CACzC,WAAqD,EACrD,OAAiB;IAEjB,MAAM,EAAE,QAAQ,GAAG,iCAAyB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAE/D,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAC3E,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3F,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAE7E,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,+B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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"}
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGalleryAlbumPageStaticPaths = exports.getGalleryAlbumPageStaticProps = exports.getGalleryAlbumPageServerSideProps = void 0;
4
- const data_fetching_1 = require("../../data-fetching");
5
- const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
- const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
7
- const processRequest_1 = require("../processRequest");
8
- const processStaticRequest_1 = require("../processStaticRequest");
9
- function getGalleryAlbumPageServerSideProps(customProps) {
1
+ import { getPrezlyApi } from '../../data-fetching';
2
+ import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
3
+ import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
4
+ import { processRequest } from '../processRequest';
5
+ import { processStaticRequest } from '../processStaticRequest';
6
+ export function getGalleryAlbumPageServerSideProps(customProps) {
10
7
  return async function getServerSideProps(context) {
11
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
8
+ const { api, serverSideProps } = await getNewsroomServerSideProps(context);
12
9
  const { uuid } = context.params;
13
10
  const gallery = await api.getGallery(uuid);
14
11
  if (!gallery || !gallery.images_number) {
15
12
  return { notFound: true };
16
13
  }
17
- return (0, processRequest_1.processRequest)(context, {
14
+ return processRequest(context, {
18
15
  ...serverSideProps,
19
16
  gallery,
20
17
  ...(typeof customProps === 'function'
@@ -23,16 +20,15 @@ function getGalleryAlbumPageServerSideProps(customProps) {
23
20
  }, `/media/album/${uuid}`);
24
21
  };
25
22
  }
26
- exports.getGalleryAlbumPageServerSideProps = getGalleryAlbumPageServerSideProps;
27
- function getGalleryAlbumPageStaticProps(customProps) {
23
+ export function getGalleryAlbumPageStaticProps(customProps) {
28
24
  return async function getStaticProps(context) {
29
- const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
25
+ const { api, staticProps } = await getNewsroomStaticProps(context);
30
26
  const { uuid } = context.params;
31
27
  const gallery = await api.getGallery(uuid);
32
28
  if (!gallery || !gallery.images_number) {
33
29
  return { notFound: true };
34
30
  }
35
- return (0, processStaticRequest_1.processStaticRequest)(context, {
31
+ return processStaticRequest(context, {
36
32
  ...staticProps,
37
33
  gallery,
38
34
  ...(typeof customProps === 'function'
@@ -41,9 +37,8 @@ function getGalleryAlbumPageStaticProps(customProps) {
41
37
  });
42
38
  };
43
39
  }
44
- exports.getGalleryAlbumPageStaticProps = getGalleryAlbumPageStaticProps;
45
- async function getGalleryAlbumPageStaticPaths() {
46
- const api = (0, data_fetching_1.getPrezlyApi)();
40
+ export async function getGalleryAlbumPageStaticPaths() {
41
+ const api = getPrezlyApi();
47
42
  const { galleries } = await api.getGalleries({});
48
43
  const paths = galleries.map(({ uuid }) => ({ params: { uuid } }));
49
44
  return {
@@ -51,5 +46,4 @@ async function getGalleryAlbumPageStaticPaths() {
51
46
  fallback: 'blocking',
52
47
  };
53
48
  }
54
- exports.getGalleryAlbumPageStaticPaths = getGalleryAlbumPageStaticPaths;
55
49
  //# sourceMappingURL=galleryAlbum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AASA,uDAAmD;AACnD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAQ/D,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO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AElE,OAAO;QACH,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ExtraStoryFields, Story } from '@prezly/sdk';
1
+ import type { Story } from '@prezly/sdk';
2
2
  import type { GetServerSidePropsContext, GetServerSidePropsResult, GetStaticPropsContext, GetStaticPropsResult } from 'next';
3
3
  import type { PaginationProps } from '../../infinite-loading/types';
4
4
  import type { PropsFunction } from './lib/types';
@@ -7,7 +7,7 @@ export interface HomePageProps<StoryType extends Story = Story> {
7
7
  pagination: PaginationProps;
8
8
  }
9
9
  interface Options {
10
- extraStoryFields?: (keyof ExtraStoryFields)[];
10
+ extraStoryFields?: (keyof Story.ExtraFields)[];
11
11
  pageSize?: number;
12
12
  }
13
13
  export declare function getHomepageServerSideProps<CustomProps extends Record<string, any>, StoryType extends Story = Story>(customProps: CustomProps | PropsFunction<CustomProps>, options?: Options): (context: GetServerSidePropsContext) => Promise<GetServerSidePropsResult<HomePageProps<StoryType> & CustomProps>>;
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHomepageStaticProps = exports.getHomepageServerSideProps = void 0;
4
- const utils_1 = require("../../utils");
5
- const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
- const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
7
- const processRequest_1 = require("../processRequest");
8
- const processStaticRequest_1 = require("../processStaticRequest");
9
- function getHomepageServerSideProps(customProps, options) {
10
- const { pageSize = utils_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
1
+ import { DEFAULT_PAGE_SIZE } from '../../utils';
2
+ import { getNewsroomServerSideProps } from '../getNewsroomServerSideProps';
3
+ import { getNewsroomStaticProps } from '../getNewsroomStaticProps';
4
+ import { processRequest } from '../processRequest';
5
+ import { processStaticRequest } from '../processStaticRequest';
6
+ export function getHomepageServerSideProps(customProps, options) {
7
+ const { pageSize = DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
11
8
  return async function getServerSideProps(context) {
12
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context, {
9
+ const { api, serverSideProps } = await getNewsroomServerSideProps(context, {
13
10
  loadHomepageContacts: true,
14
11
  });
15
12
  const { query } = context;
@@ -22,7 +19,7 @@ function getHomepageServerSideProps(customProps, options) {
22
19
  localeCode,
23
20
  });
24
21
  const { stories, storiesTotal } = storiesPaginated;
25
- return (0, processRequest_1.processRequest)(context, {
22
+ return processRequest(context, {
26
23
  ...serverSideProps,
27
24
  // TODO: This is temporary until return types from API are figured out
28
25
  stories: stories,
@@ -37,11 +34,10 @@ function getHomepageServerSideProps(customProps, options) {
37
34
  }, '/');
38
35
  };
39
36
  }
40
- exports.getHomepageServerSideProps = getHomepageServerSideProps;
41
- function getHomepageStaticProps(customProps, options) {
42
- const { pageSize = utils_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
37
+ export function getHomepageStaticProps(customProps, options) {
38
+ const { pageSize = DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
43
39
  return async function getStaticProps(context) {
44
- const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context, {
40
+ const { api, staticProps } = await getNewsroomStaticProps(context, {
45
41
  loadHomepageContacts: true,
46
42
  });
47
43
  const { localeCode } = staticProps.newsroomContextProps;
@@ -51,7 +47,7 @@ function getHomepageStaticProps(customProps, options) {
51
47
  localeCode,
52
48
  });
53
49
  const { stories, storiesTotal } = storiesPaginated;
54
- return (0, processStaticRequest_1.processStaticRequest)(context, {
50
+ return processStaticRequest(context, {
55
51
  ...staticProps,
56
52
  // TODO: This is temporary until return types from API are figured out
57
53
  stories: stories,
@@ -66,5 +62,4 @@ function getHomepageStaticProps(customProps, options) {
66
62
  });
67
63
  };
68
64
  }
69
- exports.getHomepageStaticProps = getHomepageStaticProps;
70
65
  //# sourceMappingURL=home.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"home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WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,GAAG,CACN,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,sBAAsB,CAGpC,WAA4E,EAAE,OAAiB;IAC7F,MAAM,EAAE,QAAQ,GAAG,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEzE,OAAO,KAAK,UAAU,cAAc,CAChC,OAA8B;QAE9B,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,sBAAsB,CAAC,OAAO,EAAE;YAC/D,oBAAoB,EAAE,IAAI;SAC7B,CAAC,CAAC;QAEH,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,oBAAoB,CAAC;QAExD,MAAM,gBAAgB,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAC1C,QAAQ;YACR,OAAO,EAAE,gBAAgB;YACzB,UAAU;SACb,CAAC,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;QAEnD,OAAO,oBAAoB,CAAC,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"}
@@ -1,42 +1,9 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
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 category_1 = require("./category");
19
- Object.defineProperty(exports, "getCategoryPageServerSideProps", { enumerable: true, get: function () { return category_1.getCategoryPageServerSideProps; } });
20
- Object.defineProperty(exports, "getCategoryPageStaticPaths", { enumerable: true, get: function () { return category_1.getCategoryPageStaticPaths; } });
21
- Object.defineProperty(exports, "getCategoryPageStaticProps", { enumerable: true, get: function () { return category_1.getCategoryPageStaticProps; } });
22
- var gallery_1 = require("./gallery");
23
- Object.defineProperty(exports, "getGalleryPageServerSideProps", { enumerable: true, get: function () { return gallery_1.getGalleryPageServerSideProps; } });
24
- Object.defineProperty(exports, "getGalleryPageStaticProps", { enumerable: true, get: function () { return gallery_1.getGalleryPageStaticProps; } });
25
- var galleryAlbum_1 = require("./galleryAlbum");
26
- Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageServerSideProps; } });
27
- Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageStaticPaths; } });
28
- Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageStaticProps; } });
29
- var home_1 = require("./home");
30
- Object.defineProperty(exports, "getHomepageServerSideProps", { enumerable: true, get: function () { return home_1.getHomepageServerSideProps; } });
31
- Object.defineProperty(exports, "getHomepageStaticProps", { enumerable: true, get: function () { return home_1.getHomepageStaticProps; } });
32
- var search_1 = require("./search");
33
- Object.defineProperty(exports, "getSearchPageServerSideProps", { enumerable: true, get: function () { return search_1.getSearchPageServerSideProps; } });
34
- Object.defineProperty(exports, "getSearchPageStaticProps", { enumerable: true, get: function () { return search_1.getSearchPageStaticProps; } });
35
- __exportStar(require("./sitemap"), exports);
36
- var story_1 = require("./story");
37
- Object.defineProperty(exports, "getStoryPageServerSideProps", { enumerable: true, get: function () { return story_1.getStoryPageServerSideProps; } });
38
- Object.defineProperty(exports, "getStoryPageStaticPaths", { enumerable: true, get: function () { return story_1.getStoryPageStaticPaths; } });
39
- Object.defineProperty(exports, "getStoryPageStaticProps", { enumerable: true, get: function () { return story_1.getStoryPageStaticProps; } });
40
- var storyPreview_1 = require("./storyPreview");
41
- Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", { enumerable: true, get: function () { return storyPreview_1.getStoryPreviewPageServerSideProps; } });
1
+ export { getCategoryPageServerSideProps, getCategoryPageStaticPaths, getCategoryPageStaticProps, } from './category';
2
+ export { getGalleryPageServerSideProps, getGalleryPageStaticProps, } from './gallery';
3
+ export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, } from './galleryAlbum';
4
+ export { getHomepageServerSideProps, getHomepageStaticProps } from './home';
5
+ export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search';
6
+ export * from './sitemap';
7
+ export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story';
8
+ export { getStoryPreviewPageServerSideProps } from './storyPreview';
42
9
  //# sourceMappingURL=index.js.map