@prezly/theme-kit-nextjs 2.0.1-1 → 2.1.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 (259) hide show
  1. package/README.md +15 -15
  2. package/build/adapter-nextjs/api-handlers/fetchGalleries.js +21 -31
  3. package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
  4. package/build/adapter-nextjs/api-handlers/fetchStories.js +23 -41
  5. package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
  6. package/build/adapter-nextjs/api-handlers/index.js +7 -18
  7. package/build/adapter-nextjs/api-handlers/index.js.map +1 -1
  8. package/build/adapter-nextjs/getNewsroomServerSideProps.js +13 -20
  9. package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
  10. package/build/adapter-nextjs/getNewsroomStaticProps.js +13 -19
  11. package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
  12. package/build/adapter-nextjs/index.js +21 -69
  13. package/build/adapter-nextjs/index.js.map +1 -1
  14. package/build/adapter-nextjs/page-props/category.js +96 -122
  15. package/build/adapter-nextjs/page-props/category.js.map +1 -1
  16. package/build/adapter-nextjs/page-props/gallery.js +65 -91
  17. package/build/adapter-nextjs/page-props/gallery.js.map +1 -1
  18. package/build/adapter-nextjs/page-props/galleryAlbum.js +49 -68
  19. package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
  20. package/build/adapter-nextjs/page-props/home.js +66 -87
  21. package/build/adapter-nextjs/page-props/home.js.map +1 -1
  22. package/build/adapter-nextjs/page-props/index.js +40 -136
  23. package/build/adapter-nextjs/page-props/index.js.map +1 -1
  24. package/build/adapter-nextjs/page-props/lib/types.js +3 -1
  25. package/build/adapter-nextjs/page-props/search.js +28 -29
  26. package/build/adapter-nextjs/page-props/search.js.map +1 -1
  27. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +46 -32
  28. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -1
  29. package/build/adapter-nextjs/page-props/sitemap/createPaths.js +17 -17
  30. package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -1
  31. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js +33 -37
  32. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
  33. package/build/adapter-nextjs/page-props/sitemap/index.js +23 -41
  34. package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
  35. package/build/adapter-nextjs/page-props/sitemap/types.js +3 -1
  36. package/build/adapter-nextjs/page-props/story.js +60 -81
  37. package/build/adapter-nextjs/page-props/story.js.map +1 -1
  38. package/build/adapter-nextjs/page-props/storyPreview.js +24 -31
  39. package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -1
  40. package/build/adapter-nextjs/processRequest.js +23 -38
  41. package/build/adapter-nextjs/processRequest.js.map +1 -1
  42. package/build/adapter-nextjs/processStaticRequest.js +14 -23
  43. package/build/adapter-nextjs/processStaticRequest.js.map +1 -1
  44. package/build/components-nextjs/PageSeo/PageSeo.js +77 -89
  45. package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
  46. package/build/components-nextjs/PageSeo/index.js +19 -25
  47. package/build/components-nextjs/PageSeo/index.js.map +1 -1
  48. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +8 -9
  49. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
  50. package/build/components-nextjs/PageSeo/lib/types.js +3 -1
  51. package/build/components-nextjs/StorySeo/StorySeo.js +46 -74
  52. package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
  53. package/build/components-nextjs/StorySeo/index.js +5 -11
  54. package/build/components-nextjs/StorySeo/index.js.map +1 -1
  55. package/build/components-nextjs/document.js +44 -36
  56. package/build/components-nextjs/document.js.map +1 -1
  57. package/build/components-nextjs/index.js +9 -25
  58. package/build/components-nextjs/index.js.map +1 -1
  59. package/build/data-fetching/api/PrezlyApi.js +187 -210
  60. package/build/data-fetching/api/PrezlyApi.js.map +1 -1
  61. package/build/data-fetching/api/getPrezlyApi.js +19 -25
  62. package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
  63. package/build/data-fetching/api/index.js +16 -14
  64. package/build/data-fetching/api/index.js.map +1 -1
  65. package/build/data-fetching/api/queries.js +41 -80
  66. package/build/data-fetching/api/queries.js.map +1 -1
  67. package/build/data-fetching/index.js +18 -36
  68. package/build/data-fetching/index.js.map +1 -1
  69. package/build/data-fetching/lib/getAlgoliaSettings.js +20 -26
  70. package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
  71. package/build/data-fetching/lib/getEnvVariables.js +36 -40
  72. package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
  73. package/build/data-fetching/lib/index.js +11 -32
  74. package/build/data-fetching/lib/index.js.map +1 -1
  75. package/build/data-fetching/lib/isSdkError.js +6 -7
  76. package/build/data-fetching/lib/isSdkError.js.map +1 -1
  77. package/build/data-fetching/lib/isUuid.js +6 -7
  78. package/build/data-fetching/lib/isUuid.js.map +1 -1
  79. package/build/data-fetching/types.js +3 -1
  80. package/build/index.js +25 -103
  81. package/build/index.js.map +1 -1
  82. package/build/infinite-loading/index.js +23 -41
  83. package/build/infinite-loading/index.js.map +1 -1
  84. package/build/infinite-loading/types.js +3 -1
  85. package/build/infinite-loading/useInfiniteGalleriesLoading.js +35 -46
  86. package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
  87. package/build/infinite-loading/useInfiniteLoading.js +41 -54
  88. package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
  89. package/build/infinite-loading/useInfiniteStoriesLoading.js +48 -60
  90. package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
  91. package/build/intl/index.d.ts +1 -1
  92. package/build/intl/index.js +24 -47
  93. package/build/intl/index.js.map +1 -1
  94. package/build/intl/languages.js +110 -150
  95. package/build/intl/languages.js.map +1 -1
  96. package/build/intl/locale.d.ts +1 -0
  97. package/build/intl/locale.js +104 -58
  98. package/build/intl/locale.js.map +1 -1
  99. package/build/intl/localeConfig.d.ts +2 -3
  100. package/build/intl/localeConfig.js +13 -28
  101. package/build/intl/localeConfig.js.map +1 -1
  102. package/build/intl/localeList.d.ts +2 -4
  103. package/build/intl/localeList.js +108 -7
  104. package/build/intl/localeList.js.map +1 -1
  105. package/build/intl/localeObject.js +78 -83
  106. package/build/intl/localeObject.js.map +1 -1
  107. package/build/newsroom-context/context.js +24 -42
  108. package/build/newsroom-context/context.js.map +1 -1
  109. package/build/newsroom-context/hooks/index.js +27 -125
  110. package/build/newsroom-context/hooks/index.js.map +1 -1
  111. package/build/newsroom-context/hooks/useAlgoliaSettings.js +8 -9
  112. package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
  113. package/build/newsroom-context/hooks/useCategories.js +8 -9
  114. package/build/newsroom-context/hooks/useCategories.js.map +1 -1
  115. package/build/newsroom-context/hooks/useCompanyInformation.js +8 -9
  116. package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
  117. package/build/newsroom-context/hooks/useCurrentCategory.js +8 -9
  118. package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
  119. package/build/newsroom-context/hooks/useCurrentLocale.js +8 -9
  120. package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
  121. package/build/newsroom-context/hooks/useCurrentStory.js +8 -9
  122. package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
  123. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +19 -21
  124. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
  125. package/build/newsroom-context/hooks/useGetTranslationUrl.js +54 -56
  126. package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
  127. package/build/newsroom-context/hooks/useLanguages.js +8 -9
  128. package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
  129. package/build/newsroom-context/hooks/useNewsroom.js +8 -9
  130. package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
  131. package/build/newsroom-context/hooks/useNewsroomContext.js +14 -15
  132. package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
  133. package/build/newsroom-context/index.d.ts +1 -2
  134. package/build/newsroom-context/index.js +20 -32
  135. package/build/newsroom-context/index.js.map +1 -1
  136. package/build/sentry/client.js +7 -8
  137. package/build/sentry/client.js.map +1 -1
  138. package/build/sentry/common.js +27 -30
  139. package/build/sentry/common.js.map +1 -1
  140. package/build/sentry/index.js +7 -18
  141. package/build/sentry/index.js.map +1 -1
  142. package/build/sentry/server.js +7 -8
  143. package/build/sentry/server.js.map +1 -1
  144. package/build/tsconfig.tsbuildinfo +1 -0
  145. package/build/types.js +3 -1
  146. package/build/utils/boilerplate.js +18 -11
  147. package/build/utils/boilerplate.js.map +1 -1
  148. package/build/utils/constants.js +6 -11
  149. package/build/utils/constants.js.map +1 -1
  150. package/build/utils/getAssetsUrl.js +7 -8
  151. package/build/utils/getAssetsUrl.js.map +1 -1
  152. package/build/utils/getDataRequestLink.js +10 -10
  153. package/build/utils/getDataRequestLink.js.map +1 -1
  154. package/build/utils/getLocalizedCategoryData.js +29 -37
  155. package/build/utils/getLocalizedCategoryData.js.map +1 -1
  156. package/build/utils/getNewsroomLogoUrl.js +18 -19
  157. package/build/utils/getNewsroomLogoUrl.js.map +1 -1
  158. package/build/utils/getPrivacyPortalUrl.js +11 -15
  159. package/build/utils/getPrivacyPortalUrl.js.map +1 -1
  160. package/build/utils/getStoryPublicationDate.js +12 -13
  161. package/build/utils/getStoryPublicationDate.js.map +1 -1
  162. package/build/utils/getUploadcareGroupUrl.js +8 -9
  163. package/build/utils/getUploadcareGroupUrl.js.map +1 -1
  164. package/build/utils/index.js +26 -114
  165. package/build/utils/index.js.map +1 -1
  166. package/build/utils/isEmbargoStory.js +6 -7
  167. package/build/utils/isEmbargoStory.js.map +1 -1
  168. package/package.json +12 -26
  169. package/src/@types/global.d.ts +7 -0
  170. package/src/__mocks__/languages.ts +416 -0
  171. package/src/__mocks__/story.ts +359 -0
  172. package/src/adapter-nextjs/api-handlers/fetchGalleries.ts +24 -0
  173. package/src/adapter-nextjs/api-handlers/fetchStories.ts +26 -0
  174. package/src/adapter-nextjs/api-handlers/index.ts +2 -0
  175. package/src/adapter-nextjs/getNewsroomServerSideProps.ts +29 -0
  176. package/src/adapter-nextjs/getNewsroomStaticProps.ts +29 -0
  177. package/src/adapter-nextjs/index.ts +6 -0
  178. package/src/adapter-nextjs/page-props/category.ts +157 -0
  179. package/src/adapter-nextjs/page-props/gallery.ts +114 -0
  180. package/src/adapter-nextjs/page-props/galleryAlbum.ts +89 -0
  181. package/src/adapter-nextjs/page-props/home.ts +113 -0
  182. package/src/adapter-nextjs/page-props/index.ts +26 -0
  183. package/src/adapter-nextjs/page-props/lib/types.ts +8 -0
  184. package/src/adapter-nextjs/page-props/search.ts +53 -0
  185. package/src/adapter-nextjs/page-props/sitemap/SitemapBuilder.ts +56 -0
  186. package/src/adapter-nextjs/page-props/sitemap/createPaths.ts +21 -0
  187. package/src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts +43 -0
  188. package/src/adapter-nextjs/page-props/sitemap/index.ts +5 -0
  189. package/src/adapter-nextjs/page-props/sitemap/types.ts +5 -0
  190. package/src/adapter-nextjs/page-props/story.ts +94 -0
  191. package/src/adapter-nextjs/page-props/storyPreview.ts +33 -0
  192. package/src/adapter-nextjs/processRequest.ts +49 -0
  193. package/src/adapter-nextjs/processStaticRequest.ts +32 -0
  194. package/src/components-nextjs/PageSeo/PageSeo.tsx +131 -0
  195. package/src/components-nextjs/PageSeo/index.ts +2 -0
  196. package/src/components-nextjs/PageSeo/lib/getAbsoluteUrl.ts +7 -0
  197. package/src/components-nextjs/PageSeo/lib/types.ts +4 -0
  198. package/src/components-nextjs/StorySeo/StorySeo.tsx +80 -0
  199. package/src/components-nextjs/StorySeo/index.ts +1 -0
  200. package/src/components-nextjs/document.tsx +38 -0
  201. package/src/components-nextjs/index.ts +3 -0
  202. package/src/data-fetching/api/PrezlyApi.ts +304 -0
  203. package/src/data-fetching/api/getPrezlyApi.ts +24 -0
  204. package/src/data-fetching/api/index.ts +1 -0
  205. package/src/data-fetching/api/queries.ts +51 -0
  206. package/src/data-fetching/index.ts +3 -0
  207. package/src/data-fetching/lib/getAlgoliaSettings.ts +29 -0
  208. package/src/data-fetching/lib/getEnvVariables.ts +46 -0
  209. package/src/data-fetching/lib/index.ts +4 -0
  210. package/src/data-fetching/lib/isSdkError.ts +5 -0
  211. package/src/data-fetching/lib/isUuid.ts +5 -0
  212. package/src/data-fetching/types.ts +14 -0
  213. package/src/index.ts +9 -0
  214. package/src/infinite-loading/index.ts +4 -0
  215. package/src/infinite-loading/types.ts +5 -0
  216. package/src/infinite-loading/useInfiniteGalleriesLoading.ts +53 -0
  217. package/src/infinite-loading/useInfiniteLoading.ts +66 -0
  218. package/src/infinite-loading/useInfiniteStoriesLoading.ts +81 -0
  219. package/src/intl/index.ts +4 -0
  220. package/src/intl/languages.test.ts +232 -0
  221. package/src/intl/languages.ts +233 -0
  222. package/src/intl/locale.test.ts +95 -0
  223. package/src/intl/locale.ts +140 -0
  224. package/src/intl/localeConfig.js +23 -0
  225. package/src/intl/localeList.js +110 -0
  226. package/src/intl/localeObject.test.ts +81 -0
  227. package/src/intl/localeObject.ts +99 -0
  228. package/src/newsroom-context/context.tsx +115 -0
  229. package/src/newsroom-context/hooks/index.ts +11 -0
  230. package/src/newsroom-context/hooks/useAlgoliaSettings.ts +7 -0
  231. package/src/newsroom-context/hooks/useCategories.ts +7 -0
  232. package/src/newsroom-context/hooks/useCompanyInformation.ts +7 -0
  233. package/src/newsroom-context/hooks/useCurrentCategory.ts +7 -0
  234. package/src/newsroom-context/hooks/useCurrentLocale.ts +7 -0
  235. package/src/newsroom-context/hooks/useCurrentStory.ts +7 -0
  236. package/src/newsroom-context/hooks/useGetLinkLocaleSlug.ts +37 -0
  237. package/src/newsroom-context/hooks/useGetTranslationUrl.ts +97 -0
  238. package/src/newsroom-context/hooks/useLanguages.ts +7 -0
  239. package/src/newsroom-context/hooks/useNewsroom.ts +7 -0
  240. package/src/newsroom-context/hooks/useNewsroomContext.ts +15 -0
  241. package/src/newsroom-context/index.ts +2 -0
  242. package/src/sentry/client.ts +7 -0
  243. package/src/sentry/common.ts +27 -0
  244. package/src/sentry/index.ts +2 -0
  245. package/src/sentry/server.ts +7 -0
  246. package/src/types.ts +51 -0
  247. package/src/utils/boilerplate.ts +27 -0
  248. package/src/utils/constants.ts +3 -0
  249. package/src/utils/getAssetsUrl.test.ts +9 -0
  250. package/src/utils/getAssetsUrl.ts +9 -0
  251. package/src/utils/getDataRequestLink.ts +14 -0
  252. package/src/utils/getLocalizedCategoryData.ts +47 -0
  253. package/src/utils/getNewsroomLogoUrl.ts +22 -0
  254. package/src/utils/getPrivacyPortalUrl.ts +25 -0
  255. package/src/utils/getStoryPublicationDate.tsx +15 -0
  256. package/src/utils/getUploadcareGroupUrl.ts +13 -0
  257. package/src/utils/index.ts +10 -0
  258. package/src/utils/isEmbargoStory.ts +10 -0
  259. package/build/@types/global.d.js +0 -1
@@ -1,91 +1,70 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getHomepageServerSideProps = getHomepageServerSideProps;
7
- exports.getHomepageStaticProps = getHomepageStaticProps;
8
- var _index = require("../../utils/index.js");
9
- var _getNewsroomServerSideProps = require("../getNewsroomServerSideProps.js");
10
- var _getNewsroomStaticProps = require("../getNewsroomStaticProps.js");
11
- var _processRequest = require("../processRequest.js");
12
- var _processStaticRequest = require("../processStaticRequest.js");
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");
13
9
  function getHomepageServerSideProps(customProps, options) {
14
- const {
15
- pageSize = _index.DEFAULT_PAGE_SIZE,
16
- extraStoryFields
17
- } = options || {};
18
- return async function getServerSideProps(context) {
19
- const {
20
- api,
21
- serverSideProps
22
- } = await (0, _getNewsroomServerSideProps.getNewsroomServerSideProps)(context, {
23
- loadHomepageContacts: true
24
- });
25
- const {
26
- query
27
- } = context;
28
- const page = query.page && typeof query.page === 'string' ? Number(query.page) : undefined;
29
- const {
30
- localeCode
31
- } = serverSideProps.newsroomContextProps;
32
- const storiesPaginated = await api.getStories({
33
- page,
34
- pageSize,
35
- include: extraStoryFields,
36
- localeCode
37
- });
38
- const {
39
- stories,
40
- storiesTotal
41
- } = storiesPaginated;
42
- return (0, _processRequest.processRequest)(context, {
43
- ...serverSideProps,
44
- // TODO: This is temporary until return types from API are figured out
45
- stories: stories,
46
- pagination: {
47
- itemsTotal: storiesTotal,
48
- currentPage: page ?? 1,
49
- pageSize
50
- },
51
- ...(typeof customProps === 'function' ? await customProps(context, serverSideProps) : customProps)
52
- }, '/');
53
- };
10
+ const { pageSize = utils_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
11
+ return async function getServerSideProps(context) {
12
+ const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context, {
13
+ loadHomepageContacts: true,
14
+ });
15
+ const { query } = context;
16
+ const page = query.page && typeof query.page === 'string' ? Number(query.page) : undefined;
17
+ const { localeCode } = serverSideProps.newsroomContextProps;
18
+ const storiesPaginated = await api.getStories({
19
+ page,
20
+ pageSize,
21
+ include: extraStoryFields,
22
+ localeCode,
23
+ });
24
+ const { stories, storiesTotal } = storiesPaginated;
25
+ return (0, processRequest_1.processRequest)(context, {
26
+ ...serverSideProps,
27
+ // TODO: This is temporary until return types from API are figured out
28
+ stories: stories,
29
+ pagination: {
30
+ itemsTotal: storiesTotal,
31
+ currentPage: page ?? 1,
32
+ pageSize,
33
+ },
34
+ ...(typeof customProps === 'function'
35
+ ? await customProps(context, serverSideProps)
36
+ : customProps),
37
+ }, '/');
38
+ };
54
39
  }
40
+ exports.getHomepageServerSideProps = getHomepageServerSideProps;
55
41
  function getHomepageStaticProps(customProps, options) {
56
- const {
57
- pageSize = _index.DEFAULT_PAGE_SIZE,
58
- extraStoryFields
59
- } = options || {};
60
- return async function getStaticProps(context) {
61
- const {
62
- api,
63
- staticProps
64
- } = await (0, _getNewsroomStaticProps.getNewsroomStaticProps)(context, {
65
- loadHomepageContacts: true
66
- });
67
- const {
68
- localeCode
69
- } = staticProps.newsroomContextProps;
70
- const storiesPaginated = await api.getStories({
71
- pageSize,
72
- include: extraStoryFields,
73
- localeCode
74
- });
75
- const {
76
- stories,
77
- storiesTotal
78
- } = storiesPaginated;
79
- return (0, _processStaticRequest.processStaticRequest)(context, {
80
- ...staticProps,
81
- // TODO: This is temporary until return types from API are figured out
82
- stories: stories,
83
- pagination: {
84
- itemsTotal: storiesTotal,
85
- currentPage: 1,
86
- pageSize
87
- },
88
- ...(typeof customProps === 'function' ? await customProps(context, staticProps) : customProps)
89
- });
90
- };
91
- }
42
+ const { pageSize = utils_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
43
+ return async function getStaticProps(context) {
44
+ const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context, {
45
+ loadHomepageContacts: true,
46
+ });
47
+ const { localeCode } = staticProps.newsroomContextProps;
48
+ const storiesPaginated = await api.getStories({
49
+ pageSize,
50
+ include: extraStoryFields,
51
+ localeCode,
52
+ });
53
+ const { stories, storiesTotal } = storiesPaginated;
54
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
55
+ ...staticProps,
56
+ // TODO: This is temporary until return types from API are figured out
57
+ stories: stories,
58
+ pagination: {
59
+ itemsTotal: storiesTotal,
60
+ currentPage: 1,
61
+ pageSize,
62
+ },
63
+ ...(typeof customProps === 'function'
64
+ ? await customProps(context, staticProps)
65
+ : customProps),
66
+ });
67
+ };
68
+ }
69
+ exports.getHomepageStaticProps = getHomepageStaticProps;
70
+ //# sourceMappingURL=home.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/home.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAc/D,MAAM,UAAU,0BAA0B,CAGxC,WAAqD,EAAE,OAAiB;IACtE,MAAM,EAAE,QAAQ,GAAG,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEzE,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,0BAA0B,CAAC,OAAO,EAAE;YACvE,oBAAoB,EAAE,IAAI;SAC7B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE3F,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC,oBAAoB,CAAC;QAE5D,MAAM,gBAAgB,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAC1C,IAAI;YACJ,QAAQ;YACR,OAAO,EAAE,gBAAgB;YACzB,UAAU;SACb,CAAC,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;QAEnD,OAAO,cAAc,CACjB,OAAO,EACP;YACI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UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,GAAG,CACN,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AA5CD,gEA4CC;AAED,SAAgB,sBAAsB,CAGpC,WAA4E,EAAE,OAAiB;IAC7F,MAAM,EAAE,QAAQ,GAAG,yBAAiB,EAAE,gBAAgB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEzE,OAAO,KAAK,UAAU,cAAc,CAChC,OAA8B;QAE9B,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,+CAAsB,EAAC,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,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,sEAAsE;YACtE,OAAO,EAAE,OAAsB;YAC/B,UAAU,EAAE;gBACR,UAAU,EAAE,YAAY;gBACxB,WAAW,EAAE,CAAC;gBACd,QAAQ;aACX;YACD,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAvCD,wDAuCC"}
@@ -1,138 +1,42 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- getCategoryPageServerSideProps: true,
8
- getCategoryPageStaticPaths: true,
9
- getCategoryPageStaticProps: true,
10
- getGalleryPageServerSideProps: true,
11
- getGalleryPageStaticProps: true,
12
- getGalleryAlbumPageServerSideProps: true,
13
- getGalleryAlbumPageStaticPaths: true,
14
- getGalleryAlbumPageStaticProps: true,
15
- getHomepageServerSideProps: true,
16
- getHomepageStaticProps: true,
17
- getSearchPageServerSideProps: true,
18
- getSearchPageStaticProps: true,
19
- getStoryPageServerSideProps: true,
20
- getStoryPageStaticPaths: true,
21
- getStoryPageStaticProps: true,
22
- getStoryPreviewPageServerSideProps: true
23
- };
24
- Object.defineProperty(exports, "getCategoryPageServerSideProps", {
25
- enumerable: true,
26
- get: function () {
27
- return _category.getCategoryPageServerSideProps;
28
- }
29
- });
30
- Object.defineProperty(exports, "getCategoryPageStaticPaths", {
31
- enumerable: true,
32
- get: function () {
33
- return _category.getCategoryPageStaticPaths;
34
- }
35
- });
36
- Object.defineProperty(exports, "getCategoryPageStaticProps", {
37
- enumerable: true,
38
- get: function () {
39
- return _category.getCategoryPageStaticProps;
40
- }
41
- });
42
- Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", {
43
- enumerable: true,
44
- get: function () {
45
- return _galleryAlbum.getGalleryAlbumPageServerSideProps;
46
- }
47
- });
48
- Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", {
49
- enumerable: true,
50
- get: function () {
51
- return _galleryAlbum.getGalleryAlbumPageStaticPaths;
52
- }
53
- });
54
- Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", {
55
- enumerable: true,
56
- get: function () {
57
- return _galleryAlbum.getGalleryAlbumPageStaticProps;
58
- }
59
- });
60
- Object.defineProperty(exports, "getGalleryPageServerSideProps", {
61
- enumerable: true,
62
- get: function () {
63
- return _gallery.getGalleryPageServerSideProps;
64
- }
65
- });
66
- Object.defineProperty(exports, "getGalleryPageStaticProps", {
67
- enumerable: true,
68
- get: function () {
69
- return _gallery.getGalleryPageStaticProps;
70
- }
71
- });
72
- Object.defineProperty(exports, "getHomepageServerSideProps", {
73
- enumerable: true,
74
- get: function () {
75
- return _home.getHomepageServerSideProps;
76
- }
77
- });
78
- Object.defineProperty(exports, "getHomepageStaticProps", {
79
- enumerable: true,
80
- get: function () {
81
- return _home.getHomepageStaticProps;
82
- }
83
- });
84
- Object.defineProperty(exports, "getSearchPageServerSideProps", {
85
- enumerable: true,
86
- get: function () {
87
- return _search.getSearchPageServerSideProps;
88
- }
89
- });
90
- Object.defineProperty(exports, "getSearchPageStaticProps", {
91
- enumerable: true,
92
- get: function () {
93
- return _search.getSearchPageStaticProps;
94
- }
95
- });
96
- Object.defineProperty(exports, "getStoryPageServerSideProps", {
97
- enumerable: true,
98
- get: function () {
99
- return _story.getStoryPageServerSideProps;
100
- }
101
- });
102
- Object.defineProperty(exports, "getStoryPageStaticPaths", {
103
- enumerable: true,
104
- get: function () {
105
- return _story.getStoryPageStaticPaths;
106
- }
107
- });
108
- Object.defineProperty(exports, "getStoryPageStaticProps", {
109
- enumerable: true,
110
- get: function () {
111
- return _story.getStoryPageStaticProps;
112
- }
113
- });
114
- Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", {
115
- enumerable: true,
116
- get: function () {
117
- return _storyPreview.getStoryPreviewPageServerSideProps;
118
- }
119
- });
120
- var _category = require("./category.js");
121
- var _gallery = require("./gallery.js");
122
- var _galleryAlbum = require("./galleryAlbum.js");
123
- var _home = require("./home.js");
124
- var _search = require("./search.js");
125
- var _index = require("./sitemap/index.js");
126
- Object.keys(_index).forEach(function (key) {
127
- if (key === "default" || key === "__esModule") return;
128
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
129
- if (key in exports && exports[key] === _index[key]) return;
130
- Object.defineProperty(exports, key, {
131
- enumerable: true,
132
- get: function () {
133
- return _index[key];
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]; } };
134
7
  }
135
- });
136
- });
137
- var _story = require("./story.js");
138
- var _storyPreview = require("./storyPreview.js");
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; } });
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,OAAO,EACH,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,GAE7B,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,6BAA6B,EAC7B,yBAAyB,GAE5B,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,kCAAkC,EAClC,8BAA8B,EAC9B,8BAA8B,GAEjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAsB,MAAM,QAAQ,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAClF,cAAc,WAAW,CAAC;AAC1B,OAAO,EACH,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,GAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,kCAAkC,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAKoB;AAJhB,0HAAA,8BAA8B,OAAA;AAC9B,sHAAA,0BAA0B,OAAA;AAC1B,sHAAA,0BAA0B,OAAA;AAG9B,qCAImB;AAHf,wHAAA,6BAA6B,OAAA;AAC7B,oHAAA,yBAAyB,OAAA;AAG7B,+CAKwB;AAJpB,kIAAA,kCAAkC,OAAA;AAClC,8HAAA,8BAA8B,OAAA;AAC9B,8HAAA,8BAA8B,OAAA;AAGlC,+BAAgG;AAAvF,kHAAA,0BAA0B,OAAA;AAAE,8GAAA,sBAAsB,OAAA;AAC3D,mCAAkF;AAAzE,sHAAA,4BAA4B,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAC/D,4CAA0B;AAC1B,iCAIiB;AAHb,oHAAA,2BAA2B,OAAA;AAC3B,gHAAA,uBAAuB,OAAA;AACvB,gHAAA,uBAAuB,OAAA;AAE3B,+CAAoE;AAA3D,kIAAA,kCAAkC,OAAA"}
@@ -1 +1,3 @@
1
- "use strict";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -1,33 +1,32 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getSearchPageServerSideProps = getSearchPageServerSideProps;
7
- exports.getSearchPageStaticProps = getSearchPageStaticProps;
8
- var _getNewsroomServerSideProps = require("../getNewsroomServerSideProps.js");
9
- var _getNewsroomStaticProps = require("../getNewsroomStaticProps.js");
10
- var _processRequest = require("../processRequest.js");
11
- var _processStaticRequest = require("../processStaticRequest.js");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSearchPageStaticProps = exports.getSearchPageServerSideProps = void 0;
4
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
5
+ const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
6
+ const processRequest_1 = require("../processRequest");
7
+ const processStaticRequest_1 = require("../processStaticRequest");
12
8
  function getSearchPageServerSideProps(customProps) {
13
- return async function getServerSideProps(context) {
14
- const {
15
- serverSideProps
16
- } = await (0, _getNewsroomServerSideProps.getNewsroomServerSideProps)(context);
17
- return (0, _processRequest.processRequest)(context, {
18
- ...serverSideProps,
19
- ...(typeof customProps === 'function' ? await customProps(context, serverSideProps) : customProps)
20
- }, '/search');
21
- };
9
+ return async function getServerSideProps(context) {
10
+ const { serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
11
+ return (0, processRequest_1.processRequest)(context, {
12
+ ...serverSideProps,
13
+ ...(typeof customProps === 'function'
14
+ ? await customProps(context, serverSideProps)
15
+ : customProps),
16
+ }, '/search');
17
+ };
22
18
  }
19
+ exports.getSearchPageServerSideProps = getSearchPageServerSideProps;
23
20
  function getSearchPageStaticProps(customProps) {
24
- return async function getStaticProps(context) {
25
- const {
26
- staticProps
27
- } = await (0, _getNewsroomStaticProps.getNewsroomStaticProps)(context);
28
- return (0, _processStaticRequest.processStaticRequest)(context, {
29
- ...staticProps,
30
- ...(typeof customProps === 'function' ? await customProps(context, staticProps) : customProps)
31
- });
32
- };
33
- }
21
+ return async function getStaticProps(context) {
22
+ const { staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
23
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
24
+ ...staticProps,
25
+ ...(typeof customProps === 'function'
26
+ ? await customProps(context, staticProps)
27
+ : customProps),
28
+ });
29
+ };
30
+ }
31
+ exports.getSearchPageStaticProps = getSearchPageStaticProps;
32
+ //# sourceMappingURL=search.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/search.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAI/D,MAAM,UAAU,4BAA4B,CACxC,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAEtE,OAAO,cAAc,CACjB,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;AAED,MAAM,UAAU,wBAAwB,CACpC,WAA4E;IAE5E,OAAO,KAAK,UAAU,cAAc,CAChC,OAAkC;QAElC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAE9D,OAAO,oBAAoB,CAAC,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"}
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/search.ts"],"names":[],"mappings":";;;AAMA,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAI/D,SAAgB,4BAA4B,CACxC,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAEtE,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,SAAS,CACZ,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAnBD,oEAmBC;AAED,SAAgB,wBAAwB,CACpC,WAA4E;IAE5E,OAAO,KAAK,UAAU,cAAc,CAChC,OAAkC;QAElC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,+CAAsB,EAAC,OAAO,CAAC,CAAC;QAE9D,OAAO,IAAA,2CAAoB,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"}
@@ -1,37 +1,51 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.SitemapBuilder = void 0;
7
4
  class SitemapBuilder {
8
- urls = [];
9
- constructor(baseUrl) {
10
- this.baseUrl = baseUrl;
11
- }
12
- addUrl(location) {
13
- this.urls.push({
14
- location: this.baseUrl + location,
15
- changeFrequency: SitemapBuilder.guessFrequency(location),
16
- priority: SitemapBuilder.guessPriority(location)
17
- });
18
- }
19
- static guessFrequency(location) {
20
- if (location === '/') return 'daily';
21
- return 'weekly';
22
- }
23
- static guessPriority(location) {
24
- if (location === '/') return '0.9';
25
- if (location.startsWith('/category/')) {
26
- return '0.8';
5
+ baseUrl;
6
+ urls = [];
7
+ constructor(baseUrl) {
8
+ this.baseUrl = baseUrl;
9
+ }
10
+ addUrl(location) {
11
+ this.urls.push({
12
+ location: this.baseUrl + location,
13
+ changeFrequency: SitemapBuilder.guessFrequency(location),
14
+ priority: SitemapBuilder.guessPriority(location),
15
+ });
16
+ }
17
+ static guessFrequency(location) {
18
+ if (location === '/')
19
+ return 'daily';
20
+ return 'weekly';
21
+ }
22
+ static guessPriority(location) {
23
+ if (location === '/')
24
+ return '0.9';
25
+ if (location.startsWith('/category/')) {
26
+ return '0.8';
27
+ }
28
+ return '0.7';
29
+ }
30
+ static serializeLocation(url) {
31
+ return [
32
+ '<url>',
33
+ url.location && `\t<loc>${url.location}</loc>`,
34
+ url.changeFrequency && `\t<changefreq>${url.changeFrequency}</changefreq>`,
35
+ url.priority && `\t<priority>${url.priority}</priority>`,
36
+ '</url>',
37
+ ]
38
+ .filter(Boolean)
39
+ .join('\n');
40
+ }
41
+ serialize() {
42
+ return [
43
+ '<?xml version="1.0" encoding="UTF-8" ?>',
44
+ '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">',
45
+ this.urls.map(SitemapBuilder.serializeLocation).join('\n'),
46
+ '</urlset>',
47
+ ].join('\n');
27
48
  }
28
- return '0.7';
29
- }
30
- static serializeLocation(url) {
31
- return ['<url>', url.location && `\t<loc>${url.location}</loc>`, url.changeFrequency && `\t<changefreq>${url.changeFrequency}</changefreq>`, url.priority && `\t<priority>${url.priority}</priority>`, '</url>'].filter(Boolean).join('\n');
32
- }
33
- serialize() {
34
- return ['<?xml version="1.0" encoding="UTF-8" ?>', '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">', this.urls.map(SitemapBuilder.serializeLocation).join('\n'), '</urlset>'].join('\n');
35
- }
36
49
  }
37
- exports.SitemapBuilder = SitemapBuilder;
50
+ exports.SitemapBuilder = SitemapBuilder;
51
+ //# sourceMappingURL=SitemapBuilder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SitemapBuilder.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/SitemapBuilder.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IACf,OAAO,CAAS;IAEhB,IAAI,GAAiB,EAAE,CAAC;IAEhC,YAAY,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEM,MAAM,CAAC,QAAgB;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACX,QAAQ,EAAE,IAAI,CAAC,OAAO,GAAG,QAAQ;YACjC,eAAe,EAAE,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC;YACxD,QAAQ,EAAE,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC;SACnD,CAAC,CAAC;IACP,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,QAAgB;QAC1C,IAAI,QAAQ,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC;QAErC,OAAO,QAAQ,CAAC;IACpB,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,QAAgB;QACzC,IAAI,QAAQ,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QAEnC,IAAI,QAAQ,CAAC,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GAAG;YAAE,OAAO,OAAO,CAAC;QAErC,OAAO,QAAQ,CAAC;IACpB,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,QAAgB;QACzC,IAAI,QAAQ,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QAEnC,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,GAAe;QACpC,OAAO;YACH,OAAO;YACP,GAAG,CAAC,QAAQ,IAAI,UAAU,GAAG,CAAC,QAAQ,QAAQ;YAC9C,GAAG,CAAC,eAAe,IAAI,iBAAiB,GAAG,CAAC,eAAe,eAAe;YAC1E,GAAG,CAAC,QAAQ,IAAI,eAAe,GAAG,CAAC,QAAQ,aAAa;YACxD,QAAQ;SACX;aACI,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,SAAS;QACL,OAAO;YACH,yCAAyC;YACzC,wLAAwL;YACxL,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1D,WAAW;SACd,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;CACJ;AArDD,wCAqDC"}
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createPaths = createPaths;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPaths = void 0;
7
4
  function createPaths(stories, categories) {
8
- const storiesUrls = stories.map(({
9
- slug
10
- }) => `/${slug}`);
11
- const categoriesUrls = categories.map(category => {
12
- const translations = Object.values(category.i18n);
13
- const allSlugs = translations.map(({
14
- slug
15
- }) => slug || '').filter(Boolean).reduce((slugs, slug) => slugs.includes(slug) ? [...slugs] : [...slugs, slug], []);
16
- return allSlugs.map(slug => `/category/${slug}`);
17
- }).flat();
18
- return [...storiesUrls, ...categoriesUrls];
19
- }
5
+ const storiesUrls = stories.map(({ slug }) => `/${slug}`);
6
+ const categoriesUrls = categories
7
+ .map((category) => {
8
+ const translations = Object.values(category.i18n);
9
+ const allSlugs = translations
10
+ .map(({ slug }) => slug || '')
11
+ .filter(Boolean)
12
+ .reduce((slugs, slug) => (slugs.includes(slug) ? [...slugs] : [...slugs, slug]), []);
13
+ return allSlugs.map((slug) => `/category/${slug}`);
14
+ })
15
+ .flat();
16
+ return [...storiesUrls, ...categoriesUrls];
17
+ }
18
+ exports.createPaths = createPaths;
19
+ //# sourceMappingURL=createPaths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createPaths.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/createPaths.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAAC,OAAgB,EAAE,UAAsB;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAC1D,MAAM,cAAc,GAAG,UAAU;SAC5B,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QACd,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,QAAQ,GAAG,YAAY;aACxB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;aAC7B,MAAM,CAAC,OAAO,CAAC;aACf,MAAM,CACH,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,EACvE,EAAE,C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