@times-components/ssr 2.62.32-efee292987f933a77af7da60a3032530c468392b.3 → 2.62.33

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@times-components/ssr",
3
3
  "main": "src",
4
- "version": "2.62.32-efee292987f933a77af7da60a3032530c468392b.3+efee292987",
4
+ "version": "2.62.33",
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.17",
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.17",
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.19.20-efee292987f933a77af7da60a3032530c468392b.3+efee292987",
56
- "@times-components/author-profile": "^6.20.9",
57
- "@times-components/context": "^1.25.11",
58
- "@times-components/provider": "^1.45.1",
59
- "@times-components/schema": "^0.7.5",
60
- "@times-components/tealium": "^1.15.3",
61
- "@times-components/ts-styleguide": "^1.54.1",
62
- "@times-components/utils": "^6.31.9",
55
+ "@times-components/article": "7.19.21",
56
+ "@times-components/author-profile": "6.20.11",
57
+ "@times-components/context": "1.25.13",
58
+ "@times-components/provider": "1.46.0",
59
+ "@times-components/schema": "0.7.5",
60
+ "@times-components/tealium": "1.15.3",
61
+ "@times-components/ts-styleguide": "1.55.1",
62
+ "@times-components/utils": "6.31.11",
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": "efee292987f933a77af7da60a3032530c468392b"
82
+ "gitHead": "63351111a0373995135d30e1a5edb354aff8257d"
83
83
  }
@@ -57,27 +57,6 @@ module.exports = (client, analyticsStream, data, helmetContext) => {
57
57
  : providerData.article;
58
58
  const articleTemplate = article ? article.template : null;
59
59
 
60
- const sectionPath = article ? getSectionNameForAnalytics(article) : "";
61
-
62
-
63
- // --- Inline section transformation ---
64
- const sectionData = {};
65
- if (sectionPath) {
66
- const cleanRoute = sectionPath.replace(/^\/|\/$/g, '');
67
- const parts = cleanRoute
68
- .split('/')
69
- .filter(Boolean)
70
- .map(part => part.charAt(0).toUpperCase() + part.slice(1));
71
-
72
- let cumulative = '';
73
- parts.forEach((part, index) => {
74
- cumulative = cumulative ? `${cumulative}:${part}` : part;
75
- const key = index === 0 ? 'page_section' : `page_section_${index + 1}`;
76
- sectionData[key] = cumulative;
77
- });
78
- }
79
-
80
-
81
60
  return React.createElement(
82
61
  ContextProviderWithDefaults,
83
62
  {
@@ -99,9 +78,10 @@ if (sectionPath) {
99
78
  analyticsStream,
100
79
  article: {
101
80
  ...article,
102
- section: sectionPath || "unknown section",
103
- isPreview,
104
- ...sectionData // ✅ Add page_section/page_section_2/etc. here
81
+ section: article
82
+ ? getSectionNameForAnalytics(article)
83
+ : "unknown section",
84
+ isPreview
105
85
  },
106
86
  error,
107
87
  isLoading,