@prezly/theme-kit-nextjs 2.0.1-1 → 2.0.1-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/global.d.js +1 -1
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js +3 -9
- package/build/adapter-nextjs/api-handlers/fetchStories.js +3 -9
- package/build/adapter-nextjs/api-handlers/index.js +2 -19
- package/build/adapter-nextjs/getNewsroomServerSideProps.js +3 -9
- package/build/adapter-nextjs/getNewsroomStaticProps.js +3 -9
- package/build/adapter-nextjs/index.js +6 -71
- package/build/adapter-nextjs/page-props/category.js +19 -27
- package/build/adapter-nextjs/page-props/gallery.js +13 -20
- package/build/adapter-nextjs/page-props/galleryAlbum.js +13 -21
- package/build/adapter-nextjs/page-props/home.js +13 -20
- package/build/adapter-nextjs/page-props/index.js +8 -138
- package/build/adapter-nextjs/page-props/lib/types.js +1 -1
- package/build/adapter-nextjs/page-props/search.js +10 -17
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +2 -9
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js +1 -7
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js +7 -13
- package/build/adapter-nextjs/page-props/sitemap/index.js +4 -43
- package/build/adapter-nextjs/page-props/sitemap/types.js +1 -1
- package/build/adapter-nextjs/page-props/story.js +17 -25
- package/build/adapter-nextjs/page-props/storyPreview.js +7 -13
- package/build/adapter-nextjs/processRequest.js +5 -11
- package/build/adapter-nextjs/processStaticRequest.js +1 -7
- package/build/components-nextjs/PageSeo/PageSeo.js +24 -30
- package/build/components-nextjs/PageSeo/index.js +2 -27
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +1 -7
- package/build/components-nextjs/PageSeo/lib/types.js +1 -1
- package/build/components-nextjs/StorySeo/StorySeo.js +6 -12
- package/build/components-nextjs/StorySeo/index.js +1 -12
- package/build/components-nextjs/document.d.ts +4 -2
- package/build/components-nextjs/document.js +13 -19
- package/build/components-nextjs/document.js.map +1 -1
- package/build/components-nextjs/index.js +3 -26
- package/build/data-fetching/api/PrezlyApi.js +30 -37
- package/build/data-fetching/api/getPrezlyApi.js +5 -11
- package/build/data-fetching/api/index.js +1 -16
- package/build/data-fetching/api/queries.js +5 -15
- package/build/data-fetching/index.js +3 -38
- package/build/data-fetching/lib/getAlgoliaSettings.js +3 -9
- package/build/data-fetching/lib/getEnvVariables.js +3 -10
- package/build/data-fetching/lib/index.js +4 -33
- package/build/data-fetching/lib/isSdkError.js +1 -7
- package/build/data-fetching/lib/isUuid.js +1 -7
- package/build/data-fetching/types.js +1 -1
- package/build/index.js +9 -104
- package/build/infinite-loading/index.js +4 -43
- package/build/infinite-loading/types.js +1 -1
- package/build/infinite-loading/useInfiniteGalleriesLoading.js +3 -9
- package/build/infinite-loading/useInfiniteLoading.js +9 -15
- package/build/infinite-loading/useInfiniteStoriesLoading.js +7 -13
- package/build/intl/index.js +4 -49
- package/build/intl/languages.js +23 -39
- package/build/intl/locale.js +10 -20
- package/build/intl/localeConfig.js +5 -14
- package/build/intl/localeList.js +1 -8
- package/build/intl/localeObject.js +4 -11
- package/build/newsroom-context/context.js +5 -13
- package/build/newsroom-context/hooks/index.js +11 -126
- package/build/newsroom-context/hooks/useAlgoliaSettings.js +3 -9
- package/build/newsroom-context/hooks/useCategories.js +3 -9
- package/build/newsroom-context/hooks/useCompanyInformation.js +3 -9
- package/build/newsroom-context/hooks/useCurrentCategory.js +3 -9
- package/build/newsroom-context/hooks/useCurrentLocale.js +3 -9
- package/build/newsroom-context/hooks/useCurrentStory.js +3 -9
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +10 -16
- package/build/newsroom-context/hooks/useGetTranslationUrl.js +20 -26
- package/build/newsroom-context/hooks/useLanguages.js +3 -9
- package/build/newsroom-context/hooks/useNewsroom.js +3 -9
- package/build/newsroom-context/hooks/useNewsroomContext.js +4 -10
- package/build/newsroom-context/index.js +2 -34
- package/build/sentry/client.js +3 -9
- package/build/sentry/common.js +1 -7
- package/build/sentry/index.js +2 -19
- package/build/sentry/server.js +3 -9
- package/build/types.js +1 -1
- package/build/utils/boilerplate.js +3 -11
- package/build/utils/constants.js +3 -12
- package/build/utils/getAssetsUrl.js +3 -9
- package/build/utils/getDataRequestLink.js +3 -9
- package/build/utils/getLocalizedCategoryData.js +3 -11
- package/build/utils/getNewsroomLogoUrl.js +5 -12
- package/build/utils/getPrivacyPortalUrl.js +1 -7
- package/build/utils/getStoryPublicationDate.js +1 -7
- package/build/utils/getUploadcareGroupUrl.js +3 -9
- package/build/utils/index.js +10 -115
- package/build/utils/isEmbargoStory.js +1 -7
- package/package.json +3 -2
package/build/utils/index.js
CHANGED
|
@@ -1,115 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _boilerplate[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _constants = require("./constants.js");
|
|
18
|
-
Object.keys(_constants).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _constants[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _constants[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _getAssetsUrl = require("./getAssetsUrl.js");
|
|
29
|
-
Object.keys(_getAssetsUrl).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _getAssetsUrl[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _getAssetsUrl[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _getDataRequestLink = require("./getDataRequestLink.js");
|
|
40
|
-
Object.keys(_getDataRequestLink).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _getDataRequestLink[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _getDataRequestLink[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _getLocalizedCategoryData = require("./getLocalizedCategoryData.js");
|
|
51
|
-
Object.keys(_getLocalizedCategoryData).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _getLocalizedCategoryData[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _getLocalizedCategoryData[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _getNewsroomLogoUrl = require("./getNewsroomLogoUrl.js");
|
|
62
|
-
Object.keys(_getNewsroomLogoUrl).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _getNewsroomLogoUrl[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _getNewsroomLogoUrl[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _getPrivacyPortalUrl = require("./getPrivacyPortalUrl.js");
|
|
73
|
-
Object.keys(_getPrivacyPortalUrl).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _getPrivacyPortalUrl[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _getPrivacyPortalUrl[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _getStoryPublicationDate = require("./getStoryPublicationDate.js");
|
|
84
|
-
Object.keys(_getStoryPublicationDate).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _getStoryPublicationDate[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _getStoryPublicationDate[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _getUploadcareGroupUrl = require("./getUploadcareGroupUrl.js");
|
|
95
|
-
Object.keys(_getUploadcareGroupUrl).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _getUploadcareGroupUrl[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _getUploadcareGroupUrl[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _isEmbargoStory = require("./isEmbargoStory.js");
|
|
106
|
-
Object.keys(_isEmbargoStory).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _isEmbargoStory[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return _isEmbargoStory[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
1
|
+
export * from "./boilerplate.js";
|
|
2
|
+
export * from "./constants.js";
|
|
3
|
+
export * from "./getAssetsUrl.js";
|
|
4
|
+
export * from "./getDataRequestLink.js";
|
|
5
|
+
export * from "./getLocalizedCategoryData.js";
|
|
6
|
+
export * from "./getNewsroomLogoUrl.js";
|
|
7
|
+
export * from "./getPrivacyPortalUrl.js";
|
|
8
|
+
export * from "./getStoryPublicationDate.js";
|
|
9
|
+
export * from "./getUploadcareGroupUrl.js";
|
|
10
|
+
export * from "./isEmbargoStory.js";
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isEmbargoStory = isEmbargoStory;
|
|
7
|
-
function isEmbargoStory(story) {
|
|
1
|
+
export function isEmbargoStory(story) {
|
|
8
2
|
return story.is_embargo && Boolean(story.published_at);
|
|
9
3
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "2.0.1-
|
|
3
|
+
"version": "2.0.1-2",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with NextJS",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "build/index.js",
|
|
6
7
|
"types": "build/index.d.ts",
|
|
7
8
|
"exports": {
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"build:types": "tsc --project .",
|
|
41
42
|
"build:es": "babel ./src --ignore='**/*.test.ts','**/__mocks__/**' --config-file=./babel.config.json --extensions=.ts,.tsx --source-root=./src --out-dir=./build",
|
|
42
43
|
"watch": "tsc --watch --preserveWatchOutput --project .",
|
|
43
|
-
"test": "jest",
|
|
44
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
44
45
|
"typecheck": "tsc --noEmit --incremental --project .",
|
|
45
46
|
"lint": "eslint src",
|
|
46
47
|
"lint:fix": "npm run lint -- --fix",
|