@times-components/article-magazine-comment 3.86.13 → 3.86.14-alpha.30

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/CHANGELOG.md CHANGED
@@ -3,6 +3,76 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.88.0](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.6...@times-components/article-magazine-comment@3.88.0) (2024-12-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * **TMC-0000:** Implement social embeds ([#3989](https://github.com/newsuk/times-components/issues/3989)) ([4a4e7cd](https://github.com/newsuk/times-components/commit/4a4e7cdceec5fe7402b4403170013f325eec8a84))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.87.6](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.5...@times-components/article-magazine-comment@3.87.6) (2024-12-03)
18
+
19
+ **Note:** Version bump only for package @times-components/article-magazine-comment
20
+
21
+
22
+
23
+
24
+
25
+ ## [3.87.5](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.4...@times-components/article-magazine-comment@3.87.5) (2024-12-02)
26
+
27
+ **Note:** Version bump only for package @times-components/article-magazine-comment
28
+
29
+
30
+
31
+
32
+
33
+ ## [3.87.4](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.3...@times-components/article-magazine-comment@3.87.4) (2024-11-22)
34
+
35
+ **Note:** Version bump only for package @times-components/article-magazine-comment
36
+
37
+
38
+
39
+
40
+
41
+ ## [3.87.3](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.2...@times-components/article-magazine-comment@3.87.3) (2024-11-20)
42
+
43
+ **Note:** Version bump only for package @times-components/article-magazine-comment
44
+
45
+
46
+
47
+
48
+
49
+ ## [3.87.2](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.1...@times-components/article-magazine-comment@3.87.2) (2024-11-19)
50
+
51
+ **Note:** Version bump only for package @times-components/article-magazine-comment
52
+
53
+
54
+
55
+
56
+
57
+ ## [3.87.1](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.87.0...@times-components/article-magazine-comment@3.87.1) (2024-11-14)
58
+
59
+ **Note:** Version bump only for package @times-components/article-magazine-comment
60
+
61
+
62
+
63
+
64
+
65
+ # [3.87.0](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.86.13...@times-components/article-magazine-comment@3.87.0) (2024-11-14)
66
+
67
+
68
+ ### Features
69
+
70
+ * **TMW-000:** Header magazine update ([#3984](https://github.com/newsuk/times-components/issues/3984)) ([9329de0](https://github.com/newsuk/times-components/commit/9329de0f76eae027826ddcd77f6652d70e29ba88))
71
+
72
+
73
+
74
+
75
+
6
76
  ## [3.86.13](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-comment@3.86.12...@times-components/article-magazine-comment@3.86.13) (2024-11-05)
7
77
 
8
78
  **Note:** Version bump only for package @times-components/article-magazine-comment
@@ -83,8 +83,6 @@ const sharedStyles = {
83
83
  })), {}, {
84
84
  color: _tsStyleguide.colours.functional.primary,
85
85
  marginBottom: (0, _tsStyleguide.spacing)(3),
86
- paddingLeft: (0, _tsStyleguide.spacing)(2),
87
- paddingRight: (0, _tsStyleguide.spacing)(2),
88
86
  textAlign: "center"
89
87
  })
90
88
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-components/article-magazine-comment",
3
- "version": "3.86.13",
3
+ "version": "3.86.14-alpha.30+2457d18912",
4
4
  "description": "Magazine Comment Article Template",
5
5
  "main": "dist/article-magazine-comment",
6
6
  "dev": "src/article-magazine-comment",
@@ -9,8 +9,8 @@
9
9
  "fmt": "eslint . --fix && prettier --write '**/*.*'",
10
10
  "prettier:diff": "prettier --list-different '**/*.*'",
11
11
  "lint": "eslint . && yarn prettier:diff && yarn depcheck",
12
- "test:web": "jest --config='./__tests__/jest.config.js'",
13
- "test:web:updatesnapshot": "yarn test:web -u",
12
+ "test:web": "TZ=UTC jest --config='./__tests__/jest.config.js'",
13
+ "test:web:updatesnapshot": "TZ=UTC yarn test:web -u",
14
14
  "prepublishOnly": "yarn transpile && yarn bundle",
15
15
  "watch": "watch 'yarn bundle' ./src --ignoreDotFiles --ignoreUnreadable",
16
16
  "cleanup-dist": "rm -rf dist",
@@ -33,15 +33,15 @@
33
33
  "homepage": "https://github.com/newsuk/times-components#readme",
34
34
  "devDependencies": {
35
35
  "@babel/core": "7.4.4",
36
- "@times-components/eslint-config-thetimes": "0.8.18",
37
- "@times-components/jest-configurator-web": "0.8.2",
38
- "@times-components/jest-serializer": "3.13.20",
39
- "@times-components/provider": "1.41.4",
40
- "@times-components/provider-test-tools": "1.30.4",
41
- "@times-components/storybook": "4.12.34",
42
- "@times-components/tealium-utils": "0.9.1",
43
- "@times-components/test-utils": "2.4.2",
44
- "@times-components/webpack-configurator": "2.1.1",
36
+ "@times-components/eslint-config-thetimes": "^0.8.18",
37
+ "@times-components/jest-configurator-web": "^0.8.2",
38
+ "@times-components/jest-serializer": "^3.13.20",
39
+ "@times-components/provider": "^1.41.4",
40
+ "@times-components/provider-test-tools": "^1.30.4",
41
+ "@times-components/storybook": "^4.12.34",
42
+ "@times-components/tealium-utils": "^0.9.1",
43
+ "@times-components/test-utils": "^2.4.2",
44
+ "@times-components/webpack-configurator": "^2.1.1",
45
45
  "babel-jest": "24.8.0",
46
46
  "eslint": "5.9.0",
47
47
  "jest": "24.8.0",
@@ -53,20 +53,20 @@
53
53
  "webpack": "4.30.0"
54
54
  },
55
55
  "dependencies": {
56
- "@times-components/ad": "2.22.23",
57
- "@times-components/article-byline": "3.13.56",
58
- "@times-components/article-label": "2.18.34",
59
- "@times-components/article-lead-asset": "1.18.45",
60
- "@times-components/article-skeleton": "1.140.9",
61
- "@times-components/caption": "3.8.55",
62
- "@times-components/context": "1.24.0",
63
- "@times-components/date-publication": "0.30.34",
64
- "@times-components/image": "6.18.2",
65
- "@times-components/ts-components": "1.110.1",
66
- "@times-components/ts-styleguide": "1.50.34",
67
- "@times-components/user-state": "0.5.51",
68
- "@times-components/utils": "6.26.0",
69
- "@times-components/video-label": "2.11.62",
56
+ "@times-components/ad": "^2.22.23",
57
+ "@times-components/article-byline": "^3.13.56",
58
+ "@times-components/article-label": "^2.18.34",
59
+ "@times-components/article-lead-asset": "^1.18.46",
60
+ "@times-components/article-skeleton": "^1.140.10-alpha.30+2457d18912",
61
+ "@times-components/caption": "^3.8.55",
62
+ "@times-components/context": "^1.24.0",
63
+ "@times-components/date-publication": "^0.30.34",
64
+ "@times-components/image": "^6.18.2",
65
+ "@times-components/ts-components": "^1.113.0",
66
+ "@times-components/ts-styleguide": "^1.50.34",
67
+ "@times-components/user-state": "^0.5.51",
68
+ "@times-components/utils": "^6.26.0",
69
+ "@times-components/video-label": "^2.11.63",
70
70
  "prop-types": "15.7.2",
71
71
  "styled-components": "4.3.2"
72
72
  },
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "bb3515d038a23326876162447a8770e53bbd5622"
84
+ "gitHead": "2457d189126cc1f1d4f069c9047e38bfb4e04ab8"
85
85
  }
package/rnw.js CHANGED
@@ -1 +1 @@
1
- module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/context/rnw")},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t){e.exports=require("@times-components/article-byline/rnw")},function(e,t){e.exports=require("@times-components/article-skeleton/rnw")},function(e,t){e.exports=require("@times-components/caption/rnw")},function(e,t){e.exports=require("@times-components/image/rnw")},function(e,t){e.exports=require("@times-components/article-label/rnw")},function(e,t){e.exports=require("@times-components/video-label/rnw")},function(e,t){e.exports=require("@times-components/date-publication/rnw")},function(e,t){e.exports=require("@times-components/article-lead-asset/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n.n(r),a=n(8),o=n.n(a),s=n(3),c=n(9),l=n(5),p=n.n(l),d=n(10),u=n.n(d),m=n(6),f=n(0),g=n(11),b=n.n(g),h=n(12),y=n.n(h),O=n(1),w=n.n(O);w.a.bool,w.a.string;function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{articleHeadline:x(x({},Object(f.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:f.colours.functional.brandColour,marginBottom:Object(f.spacing)(2),textAlign:"center"}),authorImage:{marginBottom:Object(f.spacing)(5)},container:{alignItems:"center",marginBottom:Object(f.spacing)(5),marginLeft:Object(f.spacing)(2),marginRight:Object(f.spacing)(2),paddingTop:Object(f.spacing)(7)},containerTablet:{alignSelf:"center",width:f.tabletWidth},datePublication:x(x({},Object(f.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:f.colours.functional.secondary,marginTop:Object(f.spacing)(3)}),datePublicationTablet:{marginTop:"auto"},label:{marginBottom:Object(f.spacing)(2)},leadAssetContainer:{marginBottom:Object(f.spacing)(4)},leadAssetContainerTablet:{alignSelf:"center",width:f.tabletWidth-f.tabletRowPadding},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center"},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},metaTablet:{paddingTop:Object(f.spacing)(1)},separator:{borderRightColor:f.colours.functional.keyline,borderRightWidth:1,height:Object(f.spacing)(3),marginLeft:Object(f.spacing)(2),marginRight:Object(f.spacing)(2)},standFirst:x(x({},Object(f.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:f.colours.functional.primary,marginBottom:Object(f.spacing)(3),paddingLeft:Object(f.spacing)(2),paddingRight:Object(f.spacing)(2),textAlign:"center"})});const q=e=>{let t=e.isVideo,n=e.label;if(!t&&!n)return null;const r=t?y.a:b.a;return i.a.createElement(p.a.Consumer,null,e=>{let t=e.theme.sectionColour;return i.a.createElement(s.TcView,{style:k.label},i.a.createElement(r,{color:t||f.colours.section.default,title:n}))})};q.defaultProps={isVideo:!1,label:null};var E=q,T=n(7),S=n(13),_=n.n(S);w.a.arrayOf(w.a.shape({})).isRequired,w.a.string.isRequired,w.a.string.isRequired;var R=n(4),I=n.n(R),D=n(14),F=n.n(D);const N=I()(s.TcView).withConfig({displayName:"responsive__AuthorImageContainer",componentId:"sc-15qf29k-0"})(["border-radius:50%;height:100px;overflow:hidden;width:100px;@media (min-width:","px){height:118px;width:118px;}"],f.breakpoints.medium),L=I()(s.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"sc-15qf29k-1"})(["",";flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,Object(f.spacing)(3),f.breakpoints.medium),V=I()(s.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"sc-15qf29k-2"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],Object(f.spacing)(1),Object(f.spacing)(3),f.breakpoints.medium),H=I()(s.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"sc-15qf29k-3"})([""," order:2;@media (min-width:","px){width:80.8%;margin-top:0;margin-left:auto;margin-right:auto;margin-bottom:",";}@media (min-width:","px){width:56.2%;}"],e=>e.styles&&e.styles,f.breakpoints.medium,Object(f.spacing)(6),f.breakpoints.wide),z=I.a.h1.withConfig({displayName:"responsive__HeadlineContainer",componentId:"sc-15qf29k-4"})(["border:0px solid black;box-sizing:border-box;display:inline;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;font-weight:400;"," @media (min-width:","px){font-size:","px;line-height:50px;margin-bottom:",";}"],e=>e.styles&&e.styles,f.breakpoints.medium,f.fontSizes.articleHeadline,Object(f.spacing)(1)),A=(I()(s.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"sc-15qf29k-5"})(["@media (min-width:","px){margin-top:0px;}"],f.breakpoints.wide),I()(s.TcView).withConfig({displayName:"responsive__Meta",componentId:"sc-15qf29k-6"})([""," max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,f.breakpoints.medium)),M=I()(s.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"sc-15qf29k-7"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],f.breakpoints.medium),B=I()(s.TcView).withConfig({displayName:"responsive__Separator",componentId:"sc-15qf29k-8"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],f.breakpoints.medium,f.colours.functional.keyline,Object(f.spacing)(3),Object(f.spacing)(2)),U=I.a.h2.withConfig({displayName:"responsive__StandfirstContainer",componentId:"sc-15qf29k-9"})(["border:0px solid black;box-sizing:border-box;display:inline;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;font-weight:400;"," @media (min-width:","px){font-size:","px;line-height:","px;margin-bottom:",";}@media (min-width:","px){margin-bottom:",";}"],e=>e.styles&&e.styles,f.breakpoints.medium,f.fontSizes.infoTitle,Object(f.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),Object(f.spacing)(5),f.breakpoints.wide,Object(f.spacing)(4)),W=I()(F.a).withConfig({displayName:"responsive__LeadAsset",componentId:"sc-15qf29k-10"})(["order:2;@media (min-width:","px){margin-bottom:",";}@media (min-width:","px){width:56.2%;margin-left:auto;margin-right:auto;}"],f.breakpoints.medium,Object(f.spacing)(2),f.breakpoints.wide);var Q=e=>{let t=e.bylines,n=e.publicationName,a=e.publishedTime;return i.a.createElement(M,null,Object(T.hasBylineData)(t)&&i.a.createElement(r.Fragment,null,i.a.createElement(A,{styles:k.meta},i.a.createElement(T.ArticleBylineWithLinks,{ast:t})),i.a.createElement(B,null)),i.a.createElement(A,{styles:k.meta},i.a.createElement(L,{styles:Object(s.checkStylesForUnits)(k.datePublication)},i.a.createElement(_.a,{date:a,publication:n}))))};const G=e=>{let t=e.standfirst;return t?i.a.createElement(U,{role:"heading","aria-level":"2",styles:Object(s.checkStylesForUnits)(k.standFirst),testID:"standfirst"},t):null};G.defaultProps={standfirst:null};var J=G;w.a.string.isRequired,w.a.arrayOf(w.a.shape({})).isRequired,w.a.arrayOf(w.a.shape({expiryTime:w.a.string,type:w.a.string})),w.a.bool,w.a.string.isRequired,w.a.string,w.a.bool,w.a.string.isRequired,w.a.string.isRequired,w.a.string,w.a.string;function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){Y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(e,t)=>Object(s.checkStylesForUnits)(X(X({},k.articleHeadline),{},{fontFamily:e?f.fontsWithFallback[e]:null,textTransform:t||null})),$=e=>{let t=e.authorImage,n=e.bylines,r=e.flags,a=e.hasVideo,o=e.headline,s=e.label,c=e.publicationName,l=e.publishedTime,d=e.standfirst,f=e.updatedTime;return i.a.createElement(p.a.Consumer,null,e=>{let p=e.theme,g=p.headlineFont,b=p.headlineCase;return i.a.createElement(H,{styles:k.container},i.a.createElement(N,{style:k.authorImage},i.a.createElement(u.a,{aspectRatio:1,uri:t,accessibilityLabel:"author-image"})),i.a.createElement(E,{isVideo:a,label:s}),i.a.createElement(z,{role:"heading","aria-level":"1",styles:Z(g,b)},o),i.a.createElement(V,null,i.a.createElement(m.UpdatedTimeProvider,{updatedTime:f},i.a.createElement(m.ArticleFlags,{flags:r}))),i.a.createElement(J,{standfirst:d}),i.a.createElement(Q,{bylines:n,publicationName:c,publishedTime:l}))})};$.defaultProps={flags:[],hasVideo:!1,label:null,longRead:!1,standfirst:null,updatedTime:null};var ee=$;function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ne(ne({},{analyticsStream:w.a.func.isRequired,article:w.a.shape({}),error:w.a.shape({graphQLErrors:w.a.array,message:w.a.string,networkError:w.a.shape({message:w.a.string})}),isLoading:w.a.bool,onImagePress:w.a.func,receiveChildList:w.a.func.isRequired}),{},{commentingConfig:w.a.shape({account:w.a.string.isRequired}).isRequired,navigationMode:w.a.shape({}).isRequired,storefrontConfig:w.a.string.isRequired});const ie=ne({},{article:null,error:null,isLoading:!1,onImagePress:null});function ae(){return(ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}class oe extends r.Component{constructor(e){super(e),this.renderHeader=this.renderHeader.bind(this)}renderHeader(){const e=this.props.article,t=e.bylines,n=e.expirableFlags,a=e.hasVideo,o=e.headline,l=e.label,p=e.publicationName,d=e.publishedTime,u=e.shortHeadline,m=e.standfirst,f=e.updatedTime,g=t&&t.length>0&&t[0].image&&0!==Object.keys(t[0].image).length&&t[0].image.crop?t[0].image.crop.url:null;return i.a.createElement(r.Fragment,null,i.a.createElement(ee,{authorImage:g,bylines:t,flags:n,hasVideo:a,headline:Object(s.getHeadline)(o,u),label:l,publicationName:p,publishedTime:d,standfirst:m,updatedTime:f}),i.a.createElement(W,ae({},Object(s.getLeadAsset)(e),{getImageCrop:s.getStandardTemplateCrop,renderCaption:e=>{let t=e.caption;return i.a.createElement(c.CentredCaption,t)},style:k.leadAssetContainer})))}render(){const e=this.props,t=e.article,n=e.analyticsStream,r=e.error,a=e.isLoading,s=e.logoUrl,c=e.navigationMode,l=e.receiveChildList,p=e.commentingConfig,d=e.articleDataFromRender,u=e.paidContentClassName,m=e.isPreview,f=e.swgProductId,g=e.storefrontConfig;return r||a?null:i.a.createElement(o.a,{analyticsStream:n,data:t,Header:this.renderHeader,logoUrl:s,receiveChildList:l,navigationMode:c,commentingConfig:p,articleDataFromRender:d,paidContentClassName:u,isPreview:m,swgProductId:f,storefrontConfig:g})}}oe.defaultProps=ie;t.default=oe}]);
1
+ module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/context/rnw")},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t){e.exports=require("@times-components/article-byline/rnw")},function(e,t){e.exports=require("@times-components/article-skeleton/rnw")},function(e,t){e.exports=require("@times-components/caption/rnw")},function(e,t){e.exports=require("@times-components/image/rnw")},function(e,t){e.exports=require("@times-components/article-label/rnw")},function(e,t){e.exports=require("@times-components/video-label/rnw")},function(e,t){e.exports=require("@times-components/date-publication/rnw")},function(e,t){e.exports=require("@times-components/article-lead-asset/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n.n(r),a=n(8),o=n.n(a),s=n(3),l=n(9),c=n(5),p=n.n(c),d=n(10),u=n.n(d),m=n(6),f=n(0),b=n(11),g=n.n(b),h=n(12),y=n.n(h),O=n(1),w=n.n(O);w.a.bool,w.a.string;function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{articleHeadline:x(x({},Object(f.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:f.colours.functional.brandColour,marginBottom:Object(f.spacing)(2),textAlign:"center"}),authorImage:{marginBottom:Object(f.spacing)(5)},container:{alignItems:"center",marginBottom:Object(f.spacing)(5),marginLeft:Object(f.spacing)(2),marginRight:Object(f.spacing)(2),paddingTop:Object(f.spacing)(7)},containerTablet:{alignSelf:"center",width:f.tabletWidth},datePublication:x(x({},Object(f.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:f.colours.functional.secondary,marginTop:Object(f.spacing)(3)}),datePublicationTablet:{marginTop:"auto"},label:{marginBottom:Object(f.spacing)(2)},leadAssetContainer:{marginBottom:Object(f.spacing)(4)},leadAssetContainerTablet:{alignSelf:"center",width:f.tabletWidth-f.tabletRowPadding},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center"},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},metaTablet:{paddingTop:Object(f.spacing)(1)},separator:{borderRightColor:f.colours.functional.keyline,borderRightWidth:1,height:Object(f.spacing)(3),marginLeft:Object(f.spacing)(2),marginRight:Object(f.spacing)(2)},standFirst:x(x({},Object(f.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:f.colours.functional.primary,marginBottom:Object(f.spacing)(3),textAlign:"center"})});const q=e=>{let t=e.isVideo,n=e.label;if(!t&&!n)return null;const r=t?y.a:g.a;return i.a.createElement(p.a.Consumer,null,e=>{let t=e.theme.sectionColour;return i.a.createElement(s.TcView,{style:k.label},i.a.createElement(r,{color:t||f.colours.section.default,title:n}))})};q.defaultProps={isVideo:!1,label:null};var E=q,T=n(7),S=n(13),_=n.n(S);w.a.arrayOf(w.a.shape({})).isRequired,w.a.string.isRequired,w.a.string.isRequired;var R=n(4),I=n.n(R),D=n(14),F=n.n(D);const N=I()(s.TcView).withConfig({displayName:"responsive__AuthorImageContainer",componentId:"sc-15qf29k-0"})(["border-radius:50%;height:100px;overflow:hidden;width:100px;@media (min-width:","px){height:118px;width:118px;}"],f.breakpoints.medium),V=I()(s.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"sc-15qf29k-1"})(["",";flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,Object(f.spacing)(3),f.breakpoints.medium),H=I()(s.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"sc-15qf29k-2"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],Object(f.spacing)(1),Object(f.spacing)(3),f.breakpoints.medium),L=I()(s.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"sc-15qf29k-3"})([""," order:2;@media (min-width:","px){width:80.8%;margin-top:0;margin-left:auto;margin-right:auto;margin-bottom:",";}@media (min-width:","px){width:56.2%;}"],e=>e.styles&&e.styles,f.breakpoints.medium,Object(f.spacing)(6),f.breakpoints.wide),z=I.a.h1.withConfig({displayName:"responsive__HeadlineContainer",componentId:"sc-15qf29k-4"})(["border:0px solid black;box-sizing:border-box;display:inline;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;font-weight:400;"," @media (min-width:","px){font-size:","px;line-height:50px;margin-bottom:",";}"],e=>e.styles&&e.styles,f.breakpoints.medium,f.fontSizes.articleHeadline,Object(f.spacing)(1)),A=(I()(s.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"sc-15qf29k-5"})(["@media (min-width:","px){margin-top:0px;}"],f.breakpoints.wide),I()(s.TcView).withConfig({displayName:"responsive__Meta",componentId:"sc-15qf29k-6"})([""," max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,f.breakpoints.medium)),M=I()(s.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"sc-15qf29k-7"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],f.breakpoints.medium),B=I()(s.TcView).withConfig({displayName:"responsive__Separator",componentId:"sc-15qf29k-8"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],f.breakpoints.medium,f.colours.functional.keyline,Object(f.spacing)(3),Object(f.spacing)(2)),U=I.a.h2.withConfig({displayName:"responsive__StandfirstContainer",componentId:"sc-15qf29k-9"})(["border:0px solid black;box-sizing:border-box;display:inline;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;font-weight:400;"," @media (min-width:","px){font-size:","px;line-height:","px;margin-bottom:",";}@media (min-width:","px){margin-bottom:",";}"],e=>e.styles&&e.styles,f.breakpoints.medium,f.fontSizes.infoTitle,Object(f.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),Object(f.spacing)(5),f.breakpoints.wide,Object(f.spacing)(4)),W=I()(F.a).withConfig({displayName:"responsive__LeadAsset",componentId:"sc-15qf29k-10"})(["order:2;@media (min-width:","px){margin-bottom:",";}@media (min-width:","px){width:56.2%;margin-left:auto;margin-right:auto;}"],f.breakpoints.medium,Object(f.spacing)(2),f.breakpoints.wide);var Q=e=>{let t=e.bylines,n=e.publicationName,a=e.publishedTime;return i.a.createElement(M,null,Object(T.hasBylineData)(t)&&i.a.createElement(r.Fragment,null,i.a.createElement(A,{styles:k.meta},i.a.createElement(T.ArticleBylineWithLinks,{ast:t})),i.a.createElement(B,null)),i.a.createElement(A,{styles:k.meta},i.a.createElement(V,{styles:Object(s.checkStylesForUnits)(k.datePublication)},i.a.createElement(_.a,{date:a,publication:n}))))};const G=e=>{let t=e.standfirst;return t?i.a.createElement(U,{role:"heading","aria-level":"2",styles:Object(s.checkStylesForUnits)(k.standFirst),testID:"standfirst"},t):null};G.defaultProps={standfirst:null};var J=G;w.a.string.isRequired,w.a.arrayOf(w.a.shape({})).isRequired,w.a.arrayOf(w.a.shape({expiryTime:w.a.string,type:w.a.string})),w.a.bool,w.a.string.isRequired,w.a.string,w.a.bool,w.a.string.isRequired,w.a.string.isRequired,w.a.string,w.a.string;function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){Y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(e,t)=>Object(s.checkStylesForUnits)(X(X({},k.articleHeadline),{},{fontFamily:e?f.fontsWithFallback[e]:null,textTransform:t||null})),$=e=>{let t=e.authorImage,n=e.bylines,r=e.flags,a=e.hasVideo,o=e.headline,s=e.label,l=e.publicationName,c=e.publishedTime,d=e.standfirst,f=e.updatedTime;return i.a.createElement(p.a.Consumer,null,e=>{let p=e.theme,b=p.headlineFont,g=p.headlineCase;return i.a.createElement(L,{styles:k.container},i.a.createElement(N,{style:k.authorImage},i.a.createElement(u.a,{aspectRatio:1,uri:t,accessibilityLabel:"author-image"})),i.a.createElement(E,{isVideo:a,label:s}),i.a.createElement(z,{role:"heading","aria-level":"1",styles:Z(b,g)},o),i.a.createElement(H,null,i.a.createElement(m.UpdatedTimeProvider,{updatedTime:f},i.a.createElement(m.ArticleFlags,{flags:r}))),i.a.createElement(J,{standfirst:d}),i.a.createElement(Q,{bylines:n,publicationName:l,publishedTime:c}))})};$.defaultProps={flags:[],hasVideo:!1,label:null,longRead:!1,standfirst:null,updatedTime:null};var ee=$;function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ne(ne({},{analyticsStream:w.a.func.isRequired,article:w.a.shape({}),error:w.a.shape({graphQLErrors:w.a.array,message:w.a.string,networkError:w.a.shape({message:w.a.string})}),isLoading:w.a.bool,onImagePress:w.a.func,receiveChildList:w.a.func.isRequired}),{},{commentingConfig:w.a.shape({account:w.a.string.isRequired}).isRequired,navigationMode:w.a.shape({}).isRequired,storefrontConfig:w.a.string.isRequired});const ie=ne({},{article:null,error:null,isLoading:!1,onImagePress:null});function ae(){return(ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}class oe extends r.Component{constructor(e){super(e),this.renderHeader=this.renderHeader.bind(this)}renderHeader(){const e=this.props.article,t=e.bylines,n=e.expirableFlags,a=e.hasVideo,o=e.headline,c=e.label,p=e.publicationName,d=e.publishedTime,u=e.shortHeadline,m=e.standfirst,f=e.updatedTime,b=t&&t.length>0&&t[0].image&&0!==Object.keys(t[0].image).length&&t[0].image.crop?t[0].image.crop.url:null;return i.a.createElement(r.Fragment,null,i.a.createElement(ee,{authorImage:b,bylines:t,flags:n,hasVideo:a,headline:Object(s.getHeadline)(o,u),label:c,publicationName:p,publishedTime:d,standfirst:m,updatedTime:f}),i.a.createElement(W,ae({},Object(s.getLeadAsset)(e),{getImageCrop:s.getStandardTemplateCrop,renderCaption:e=>{let t=e.caption;return i.a.createElement(l.CentredCaption,t)},style:k.leadAssetContainer})))}render(){const e=this.props,t=e.article,n=e.analyticsStream,r=e.error,a=e.isLoading,s=e.logoUrl,l=e.navigationMode,c=e.receiveChildList,p=e.commentingConfig,d=e.articleDataFromRender,u=e.paidContentClassName,m=e.isPreview,f=e.swgProductId,b=e.storefrontConfig;return r||a?null:i.a.createElement(o.a,{analyticsStream:n,data:t,Header:this.renderHeader,logoUrl:s,receiveChildList:c,navigationMode:l,commentingConfig:p,articleDataFromRender:d,paidContentClassName:u,isPreview:m,swgProductId:f,storefrontConfig:b})}}oe.defaultProps=ie;t.default=oe}]);