@times-components/ssr 2.64.1 → 2.64.2-26a834cb0944a7221dc8b2f7581bf2458983b920.10
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/dist/article.react.bundle.js +4 -4
- package/dist/article.react.bundle.js.map +1 -1
- package/dist/author-profile.react.bundle.js +1 -1
- package/dist/author-profile.react.bundle.js.map +1 -1
- package/dist/common.react.bundle.js +9 -9
- package/dist/common.react.bundle.js.map +1 -1
- package/package.json +13 -13
- package/src/component/article.js +8 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/ssr",
|
|
3
3
|
"main": "src",
|
|
4
|
-
"version": "2.64.
|
|
4
|
+
"version": "2.64.2-26a834cb0944a7221dc8b2f7581bf2458983b920.10+26a834cb09",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"bundle:dev": "yarn cleanup-dist && webpack --config=webpack.config.js",
|
|
7
7
|
"bundle:prod": "yarn cleanup-dist && NODE_ENV=production webpack --config=webpack.config.js -p",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/newsuk/times-components#readme",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
39
|
-
"@times-components/fixture-generator": "0.36.0",
|
|
40
|
-
"@times-components/mock-tpa-server": "0.4.18",
|
|
38
|
+
"@times-components/eslint-config-thetimes": "^0.8.18",
|
|
39
|
+
"@times-components/fixture-generator": "^0.36.0",
|
|
40
|
+
"@times-components/mock-tpa-server": "^0.4.18",
|
|
41
41
|
"axe-core": "3.3.1",
|
|
42
42
|
"cypress-axe": "0.13.0",
|
|
43
43
|
"cypress-failed-log": "2.5.1",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"webpack": "4.30.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@times-components/article": "7.20.
|
|
56
|
-
"@times-components/author-profile": "6.22.7",
|
|
57
|
-
"@times-components/context": "1.27.0",
|
|
58
|
-
"@times-components/provider": "1.48.7",
|
|
59
|
-
"@times-components/schema": "0.7.5",
|
|
60
|
-
"@times-components/tealium": "1.15.3",
|
|
61
|
-
"@times-components/ts-styleguide": "1.56.8",
|
|
62
|
-
"@times-components/utils": "6.34.1",
|
|
55
|
+
"@times-components/article": "^7.20.2-26a834cb0944a7221dc8b2f7581bf2458983b920.10+26a834cb09",
|
|
56
|
+
"@times-components/author-profile": "^6.22.7",
|
|
57
|
+
"@times-components/context": "^1.27.0",
|
|
58
|
+
"@times-components/provider": "^1.48.7",
|
|
59
|
+
"@times-components/schema": "^0.7.5",
|
|
60
|
+
"@times-components/tealium": "^1.15.3",
|
|
61
|
+
"@times-components/ts-styleguide": "^1.56.8",
|
|
62
|
+
"@times-components/utils": "^6.34.1",
|
|
63
63
|
"apollo-cache-inmemory": "1.5.1",
|
|
64
64
|
"apollo-client": "2.5.1",
|
|
65
65
|
"apollo-link": "1.2.4",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "26a834cb0944a7221dc8b2f7581bf2458983b920"
|
|
83
83
|
}
|
package/src/component/article.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable import/no-unresolved */
|
|
2
2
|
|
|
3
|
+
import { createPageSectionsHelper } from "../../../article-skeleton/src/data-helper";
|
|
4
|
+
|
|
3
5
|
const React = require("react");
|
|
4
6
|
const { ApolloProvider } = require("react-apollo");
|
|
5
7
|
const { HelmetProvider } = require("react-helmet-async");
|
|
6
|
-
const { getSectionNameForAnalytics } = require("@times-components/utils/rnw");
|
|
7
8
|
const { getSectionFromTiles } = require("@times-components/utils/rnw");
|
|
8
9
|
const { ArticleProvider } = require("@times-components/provider/rnw");
|
|
9
10
|
const { DraftArticleProvider } = require("@times-components/provider/rnw");
|
|
@@ -38,6 +39,11 @@ module.exports = (client, analyticsStream, data, helmetContext) => {
|
|
|
38
39
|
removeTeaserContent
|
|
39
40
|
} = data;
|
|
40
41
|
|
|
42
|
+
const enhancedArticleData = {
|
|
43
|
+
...articleDataFromRender,
|
|
44
|
+
pageSections: createPageSectionsHelper(articleDataFromRender)
|
|
45
|
+
};
|
|
46
|
+
|
|
41
47
|
return React.createElement(
|
|
42
48
|
HelmetProvider,
|
|
43
49
|
{ context: helmetContext },
|
|
@@ -79,9 +85,6 @@ module.exports = (client, analyticsStream, data, helmetContext) => {
|
|
|
79
85
|
analyticsStream,
|
|
80
86
|
article: {
|
|
81
87
|
...article,
|
|
82
|
-
section: article
|
|
83
|
-
? getSectionNameForAnalytics(article)
|
|
84
|
-
: "unknown section",
|
|
85
88
|
isPreview
|
|
86
89
|
},
|
|
87
90
|
error,
|
|
@@ -93,7 +96,7 @@ module.exports = (client, analyticsStream, data, helmetContext) => {
|
|
|
93
96
|
onTopicPress: () => {},
|
|
94
97
|
refetch,
|
|
95
98
|
commentingConfig,
|
|
96
|
-
articleDataFromRender,
|
|
99
|
+
articleDataFromRender: enhancedArticleData,
|
|
97
100
|
paidContentClassName,
|
|
98
101
|
swgProductId,
|
|
99
102
|
getFallbackThumbnailUrl169,
|