@times-components/article-main-comment 2.73.31-alpha.11 → 2.73.31-alpha.19
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 +75 -0
- package/dist/article-header/article-header-prop-types.js +0 -1
- package/dist/article-header/article-header.js +1 -18
- package/dist/article-main-comment.js +16 -21
- package/dist/article-prop-types/article-prop-types.base.js +2 -4
- package/package.json +3 -4
- package/rnw.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,81 @@
|
|
|
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
|
+
## [2.73.41](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.40...@times-components/article-main-comment@2.73.41) (2024-01-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.73.40](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.39...@times-components/article-main-comment@2.73.40) (2024-01-09)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [2.73.39](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.38...@times-components/article-main-comment@2.73.39) (2024-01-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.73.38](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.37...@times-components/article-main-comment@2.73.38) (2024-01-08)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [2.73.37](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.36...@times-components/article-main-comment@2.73.37) (2024-01-08)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [2.73.36](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.35...@times-components/article-main-comment@2.73.36) (2024-01-08)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [2.73.35](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.34...@times-components/article-main-comment@2.73.35) (2024-01-08)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [2.73.34](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.33...@times-components/article-main-comment@2.73.34) (2024-01-08)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* **TMRX-1782:** Remove inArticleAudio integration for now until ready to productionise ([#3704](https://github.com/newsuk/times-components/issues/3704)) ([139c9bd](https://github.com/newsuk/times-components/commit/139c9bd8f032a4eda60004fb457b0b6cc698598e))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [2.73.33](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.32...@times-components/article-main-comment@2.73.33) (2024-01-08)
|
|
74
|
+
|
|
75
|
+
**Note:** Version bump only for package @times-components/article-main-comment
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
6
81
|
## [2.73.32](https://github.com/newsuk/times-components/compare/@times-components/article-main-comment@2.73.31...@times-components/article-main-comment@2.73.32) (2024-01-02)
|
|
7
82
|
|
|
8
83
|
|
|
@@ -22,7 +22,6 @@ const articleHeaderPropTypes = {
|
|
|
22
22
|
longRead: _propTypes.default.bool,
|
|
23
23
|
publicationName: _propTypes.default.string.isRequired,
|
|
24
24
|
publishedTime: _propTypes.default.string.isRequired,
|
|
25
|
-
showAudioPlayer: _propTypes.default.bool,
|
|
26
25
|
standfirst: _propTypes.default.string,
|
|
27
26
|
updatedTime: _propTypes.default.string
|
|
28
27
|
};
|
|
@@ -9,10 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _tsComponents = require("@times-components/ts-components");
|
|
11
11
|
|
|
12
|
-
var _tsNewskit = require("@times-components/ts-newskit");
|
|
13
|
-
|
|
14
|
-
var _articleByline = require("@times-components/article-byline");
|
|
15
|
-
|
|
16
12
|
var _image = _interopRequireDefault(require("@times-components/image"));
|
|
17
13
|
|
|
18
14
|
var _utils = require("@times-components/utils");
|
|
@@ -45,7 +41,6 @@ const ArticleHeader = _ref => {
|
|
|
45
41
|
headline = _ref.headline,
|
|
46
42
|
label = _ref.label,
|
|
47
43
|
publicationName = _ref.publicationName,
|
|
48
|
-
showAudioPlayer = _ref.showAudioPlayer,
|
|
49
44
|
publishedTime = _ref.publishedTime,
|
|
50
45
|
standfirst = _ref.standfirst,
|
|
51
46
|
updatedTime = _ref.updatedTime;
|
|
@@ -74,19 +69,7 @@ const ArticleHeader = _ref => {
|
|
|
74
69
|
bylines: bylines,
|
|
75
70
|
publicationName: publicationName,
|
|
76
71
|
publishedTime: publishedTime
|
|
77
|
-
})
|
|
78
|
-
showAudioPlayer: showAudioPlayer,
|
|
79
|
-
src: "",
|
|
80
|
-
readyToPlayText: "Listen to article",
|
|
81
|
-
playingText: "Playing",
|
|
82
|
-
narrator: (0, _articleByline.hasBylineData)(bylines) ? bylines[0].byline[0].children[0].attributes.value : "",
|
|
83
|
-
headline: headline,
|
|
84
|
-
feedback: {
|
|
85
|
-
requestFeedback: true,
|
|
86
|
-
feedbackMessage: "Want to listen to more articles? Give your feedback below or email",
|
|
87
|
-
thankyouMessage: "Thank you for your feedback. We're always trying to give you the best possible experience – your feedback helps us do this."
|
|
88
|
-
}
|
|
89
|
-
})));
|
|
72
|
+
}));
|
|
90
73
|
};
|
|
91
74
|
|
|
92
75
|
ArticleHeader.propTypes = _articleHeaderPropTypes.articleHeaderPropTypes;
|
|
@@ -28,9 +28,7 @@ class ArticlePage extends _react.Component {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
renderHeader() {
|
|
31
|
-
const
|
|
32
|
-
article = _this$props.article,
|
|
33
|
-
showAudioPlayer = _this$props.showAudioPlayer;
|
|
31
|
+
const article = this.props.article;
|
|
34
32
|
const bylines = article.bylines,
|
|
35
33
|
expirableFlags = article.expirableFlags,
|
|
36
34
|
hasVideo = article.hasVideo,
|
|
@@ -52,27 +50,25 @@ class ArticlePage extends _react.Component {
|
|
|
52
50
|
publicationName: publicationName,
|
|
53
51
|
publishedTime: publishedTime,
|
|
54
52
|
standfirst: standfirst,
|
|
55
|
-
updatedTime: updatedTime
|
|
56
|
-
showAudioPlayer: showAudioPlayer
|
|
53
|
+
updatedTime: updatedTime
|
|
57
54
|
});
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
render() {
|
|
61
|
-
const _this$
|
|
62
|
-
article = _this$
|
|
63
|
-
analyticsStream = _this$
|
|
64
|
-
error = _this$
|
|
65
|
-
isLoading = _this$
|
|
66
|
-
logoUrl = _this$
|
|
67
|
-
navigationMode = _this$
|
|
68
|
-
receiveChildList = _this$
|
|
69
|
-
commentingConfig = _this$
|
|
70
|
-
paidContentClassName = _this$
|
|
71
|
-
isPreview = _this$
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
storefrontConfig = _this$props2.storefrontConfig;
|
|
58
|
+
const _this$props = this.props,
|
|
59
|
+
article = _this$props.article,
|
|
60
|
+
analyticsStream = _this$props.analyticsStream,
|
|
61
|
+
error = _this$props.error,
|
|
62
|
+
isLoading = _this$props.isLoading,
|
|
63
|
+
logoUrl = _this$props.logoUrl,
|
|
64
|
+
navigationMode = _this$props.navigationMode,
|
|
65
|
+
receiveChildList = _this$props.receiveChildList,
|
|
66
|
+
commentingConfig = _this$props.commentingConfig,
|
|
67
|
+
paidContentClassName = _this$props.paidContentClassName,
|
|
68
|
+
isPreview = _this$props.isPreview,
|
|
69
|
+
swgProductId = _this$props.swgProductId,
|
|
70
|
+
zephrDivs = _this$props.zephrDivs,
|
|
71
|
+
storefrontConfig = _this$props.storefrontConfig;
|
|
76
72
|
|
|
77
73
|
if (error || isLoading) {
|
|
78
74
|
return null;
|
|
@@ -90,7 +86,6 @@ class ArticlePage extends _react.Component {
|
|
|
90
86
|
isPreview: isPreview,
|
|
91
87
|
swgProductId: swgProductId,
|
|
92
88
|
zephrDivs: zephrDivs,
|
|
93
|
-
showAudioPlayer: showAudioPlayer,
|
|
94
89
|
storefrontConfig: storefrontConfig
|
|
95
90
|
});
|
|
96
91
|
}
|
|
@@ -22,15 +22,13 @@ const articlePagePropTypes = {
|
|
|
22
22
|
isLoading: _propTypes.default.bool,
|
|
23
23
|
onImagePress: _propTypes.default.func,
|
|
24
24
|
receiveChildList: _propTypes.default.func.isRequired,
|
|
25
|
-
zephrDivs: _propTypes.default.bool
|
|
26
|
-
showAudioPlayer: _propTypes.default.bool
|
|
25
|
+
zephrDivs: _propTypes.default.bool
|
|
27
26
|
};
|
|
28
27
|
exports.articlePagePropTypes = articlePagePropTypes;
|
|
29
28
|
const articlePageDefaultProps = {
|
|
30
29
|
article: null,
|
|
31
30
|
error: null,
|
|
32
31
|
isLoading: false,
|
|
33
|
-
onImagePress: null
|
|
34
|
-
showAudioPlayer: false
|
|
32
|
+
onImagePress: null
|
|
35
33
|
};
|
|
36
34
|
exports.articlePageDefaultProps = articlePageDefaultProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/article-main-comment",
|
|
3
|
-
"version": "2.73.31-alpha.
|
|
3
|
+
"version": "2.73.31-alpha.19+3a585324b4",
|
|
4
4
|
"description": "Main Comment Article Template",
|
|
5
5
|
"main": "dist/article-main-comment",
|
|
6
6
|
"dev": "src/article-main-comment",
|
|
@@ -56,13 +56,12 @@
|
|
|
56
56
|
"@times-components/ad": "^2.21.44",
|
|
57
57
|
"@times-components/article-byline": "^3.13.15",
|
|
58
58
|
"@times-components/article-label": "^2.16.1",
|
|
59
|
-
"@times-components/article-skeleton": "^1.116.15-alpha.
|
|
59
|
+
"@times-components/article-skeleton": "^1.116.15-alpha.19+3a585324b4",
|
|
60
60
|
"@times-components/context": "^1.10.37",
|
|
61
61
|
"@times-components/date-publication": "^0.28.1",
|
|
62
62
|
"@times-components/image": "^6.15.14",
|
|
63
63
|
"@times-components/responsive": "^0.17.1",
|
|
64
64
|
"@times-components/ts-components": "^1.81.7",
|
|
65
|
-
"@times-components/ts-newskit": "^1.146.2-alpha.13+1f0348be0c",
|
|
66
65
|
"@times-components/ts-styleguide": "^1.48.1",
|
|
67
66
|
"@times-components/user-state": "^0.5.11",
|
|
68
67
|
"@times-components/utils": "^6.16.21",
|
|
@@ -81,5 +80,5 @@
|
|
|
81
80
|
"publishConfig": {
|
|
82
81
|
"access": "public"
|
|
83
82
|
},
|
|
84
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "3a585324b44645cc88a416a7d2db8dd79061bb44"
|
|
85
84
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([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/article-byline/rnw")},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t){e.exports=require("@times-components/ts-newskit/rnw")},function(e,t){e.exports=require("@times-components/article-skeleton/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/context/rnw")},function(e,t){e.exports=require("@times-components/date-publication/rnw")},function(e,t,r){"use strict";r.r(t);var n=r(2),i=r.n(n),a=r(8),o=r.n(a),s=r(3),l=r(6),c=r(7),p=r(5),d=r(9),u=r.n(d),b=r(10),m=r.n(b),g=r(11),f=r.n(g),y=r(12),h=r.n(y),O=r(0),w=r(1),j=r.n(w);j.a.bool,j.a.string;function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){P(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},{articleHeadline:v(v({},Object(O.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:O.colours.functional.brandColour,marginBottom:Object(O.spacing)(2),textAlign:"center"}),articleHeadlineTablet:v({},Object(O.fontFactory)({font:"headline",fontSize:"articleHeadline"})),authorImage:{marginBottom:Object(O.spacing)(5)},container:{alignItems:"center",paddingLeft:Object(O.spacing)(2),paddingRight:Object(O.spacing)(2)},datePublication:v(v({},Object(O.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:O.colours.functional.secondary,marginTop:Object(O.spacing)(1)}),datePublicationTablet:{marginTop:"auto"},header:{marginBottom:Object(O.spacing)(3),paddingBottom:Object(O.spacing)(4),paddingTop:Object(O.spacing)(7)},label:{marginBottom:Object(O.spacing)(2)},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center",width:"100%",paddingTop:Object(O.spacing)(2),paddingBottom:Object(O.spacing)(2),borderBottomColor:O.colours.functional.keyline,borderBottomWidth:1,borderTopColor:O.colours.functional.keyline,borderTopWidth:1},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},separator:{borderRightColor:O.colours.functional.keyline,borderRightWidth:1,height:Object(O.spacing)(3),marginLeft:Object(O.spacing)(2),marginRight:Object(O.spacing)(2)},standFirst:v(v({},Object(O.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:O.colours.functional.primary,marginBottom:Object(O.spacing)(3),paddingLeft:Object(O.spacing)(2),paddingRight:Object(O.spacing)(2),textAlign:"center"})});const E=e=>{let t=e.isVideo,r=e.label;if(!t&&!r)return null;const n=t?f.a:m.a;return i.a.createElement(h.a.Consumer,null,e=>{let t=e.theme.sectionColour;return i.a.createElement(s.TcView,{style:T.label},i.a.createElement(n,{color:t||O.colours.section.default,title:r}))})};E.defaultProps={isVideo:!1,label:null};var S=E,q=r(13),_=r.n(q);j.a.arrayOf(j.a.shape({})).isRequired,j.a.string.isRequired,j.a.string.isRequired;var D=r(4),I=r.n(D);const R=I()(s.TcView).withConfig({displayName:"responsive__AuthorImageContainer",componentId:"ba1gpd-0"})(["border-radius:50%;height:100px;overflow:hidden;width:100px;@media (min-width:","px){height:118px;width:118px;}"],O.breakpoints.medium),N=I()(s.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"ba1gpd-1"})(["",";flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,Object(O.spacing)(3),O.breakpoints.medium),H=I()(s.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"ba1gpd-2"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],Object(O.spacing)(1),Object(O.spacing)(3),O.breakpoints.medium),z=I()(s.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"ba1gpd-3"})(["order:2;z-index:1;@media (min-width:","px){width:80.8%;margin:0 auto ",";margin-left:auto;margin-right:auto;}@media (min-width:","px){width:56.2%;}"],O.breakpoints.medium,Object(O.spacing)(2),O.breakpoints.wide),A=I.a.h1.withConfig({displayName:"responsive__HeadlineContainer",componentId:"ba1gpd-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,O.breakpoints.medium,O.fontSizes.articleHeadline,Object(O.spacing)(1)),V=(I()(s.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"ba1gpd-5"})(["@media (min-width:","px){margin-top:0px;}"],O.breakpoints.wide),I()(s.TcView).withConfig({displayName:"responsive__Meta",componentId:"ba1gpd-6"})([""," max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,O.breakpoints.medium)),F=I()(s.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"ba1gpd-7"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],O.breakpoints.medium),L=I()(s.TcView).withConfig({displayName:"responsive__Separator",componentId:"ba1gpd-8"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],O.breakpoints.medium,O.colours.functional.keyline,Object(O.spacing)(3),Object(O.spacing)(2)),B=I.a.h2.withConfig({displayName:"responsive__StandfirstContainer",componentId:"ba1gpd-9"})(["border:0px solid black;box-sizing:border-box;display:inline;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,O.breakpoints.medium,O.fontSizes.infoTitle,Object(O.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),Object(O.spacing)(5),O.breakpoints.wide,Object(O.spacing)(4));var M=e=>{let t=e.bylines,r=e.publicationName,a=e.publishedTime;return i.a.createElement(F,null,Object(p.hasBylineData)(t)&&i.a.createElement(n.Fragment,null,i.a.createElement(V,{styles:T.meta},i.a.createElement(p.ArticleBylineWithLinks,{ast:t})),i.a.createElement(L,null)),i.a.createElement(V,{styles:T.meta},i.a.createElement(N,{styles:Object(s.checkStylesForUnits)(T.datePublication)},i.a.createElement(_.a,{date:a,publication:r}))))};const W=e=>{let t=e.standfirst;return t?i.a.createElement(B,{role:"heading","aria-level":"2",styles:Object(s.checkStylesForUnits)(T.standFirst),testID:"standfirst"},t):null};W.defaultProps={standfirst:null};var U=W;j.a.string.isRequired,j.a.arrayOf(j.a.shape({})).isRequired,j.a.arrayOf(j.a.shape({expiryTime:j.a.string,type:j.a.string})),j.a.bool,j.a.string.isRequired,j.a.string,j.a.bool,j.a.string.isRequired,j.a.string.isRequired,j.a.bool,j.a.string,j.a.string;function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){J(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function J(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const K=e=>{let t=e.authorImage,r=e.bylines,n=e.flags,a=e.hasVideo,o=e.headline,d=e.label,b=e.publicationName,m=e.showAudioPlayer,g=e.publishedTime,f=e.standfirst,y=e.updatedTime;return i.a.createElement(z,{style:Q(Q({},T.header),T.container)},i.a.createElement(R,{style:T.authorImage},i.a.createElement(u.a,{aspectRatio:1,uri:t,accessibilityLabel:"author-image"})),i.a.createElement(S,{isVideo:a,label:d}),i.a.createElement(A,{role:"heading","aria-level":"1",styles:Object(s.checkStylesForUnits)(T.articleHeadline)},o),i.a.createElement(H,null,i.a.createElement(l.UpdatedTimeProvider,{updatedTime:y},i.a.createElement(l.ArticleFlags,{flags:n}))),i.a.createElement(U,{standfirst:f}),i.a.createElement(M,{bylines:r,publicationName:b,publishedTime:g}),i.a.createElement(c.TCThemeProvider,null,i.a.createElement(c.InArticleAudio,{showAudioPlayer:m,src:"",readyToPlayText:"Listen to article",playingText:"Playing",narrator:Object(p.hasBylineData)(r)?r[0].byline[0].children[0].attributes.value:"",headline:o,feedback:{requestFeedback:!0,feedbackMessage:"Want to listen to more articles? Give your feedback below or email",thankyouMessage:"Thank you for your feedback. We're always trying to give you the best possible experience – your feedback helps us do this."}})))};K.defaultProps={flags:[],hasVideo:!1,label:null,longRead:!1,standfirst:null,updatedTime:null};var X=K;function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){$(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Z(Z({},{analyticsStream:j.a.func.isRequired,article:j.a.shape({}),error:j.a.shape({graphQLErrors:j.a.array,message:j.a.string,networkError:j.a.shape({message:j.a.string})}),isLoading:j.a.bool,onImagePress:j.a.func,receiveChildList:j.a.func.isRequired,zephrDivs:j.a.bool,showAudioPlayer:j.a.bool}),{},{navigationMode:j.a.shape({}).isRequired,storefrontConfig:j.a.string.isRequired});const ee=Z({},{article:null,error:null,isLoading:!1,onImagePress:null,showAudioPlayer:!1});class te extends n.Component{constructor(e){super(e),this.renderHeader=this.renderHeader.bind(this)}renderHeader(){const e=this.props,t=e.article,r=e.showAudioPlayer,n=t.bylines,a=t.expirableFlags,o=t.hasVideo,l=t.headline,c=t.label,p=t.publicationName,d=t.publishedTime,u=t.shortHeadline,b=t.standfirst,m=t.updatedTime,g=n&&n.length>0&&n[0].image&&0!==Object.keys(n[0].image).length&&n[0].image.crop?n[0].image.crop.url:null;return i.a.createElement(X,{authorImage:g,bylines:n,flags:a,hasVideo:o,headline:Object(s.getHeadline)(l,u),label:c,publicationName:p,publishedTime:d,standfirst:b,updatedTime:m,showAudioPlayer:r})}render(){const e=this.props,t=e.article,r=e.analyticsStream,n=e.error,a=e.isLoading,s=e.logoUrl,l=e.navigationMode,c=e.receiveChildList,p=e.commentingConfig,d=e.paidContentClassName,u=e.isPreview,b=e.showAudioPlayer,m=e.swgProductId,g=e.zephrDivs,f=e.storefrontConfig;return n||a?null:i.a.createElement(o.a,{analyticsStream:r,data:t,Header:this.renderHeader,logoUrl:s,receiveChildList:c,navigationMode:l,commentingConfig:p,paidContentClassName:d,isPreview:u,swgProductId:m,zephrDivs:g,showAudioPlayer:b,storefrontConfig:f})}}te.defaultProps=ee;t.default=te}]);
|
|
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=13)}([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/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/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/context/rnw")},function(e,t){e.exports=require("@times-components/date-publication/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n.n(r),a=n(7),o=n.n(a),s=n(3),c=n(5),l=n(8),p=n.n(l),d=n(9),u=n.n(d),m=n(10),b=n.n(m),g=n(11),f=n.n(g),h=n(0),y=n(1),O=n.n(y);O.a.bool,O.a.string;function w(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 j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(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 P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{articleHeadline:j(j({},Object(h.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:h.colours.functional.brandColour,marginBottom:Object(h.spacing)(2),textAlign:"center"}),articleHeadlineTablet:j({},Object(h.fontFactory)({font:"headline",fontSize:"articleHeadline"})),authorImage:{marginBottom:Object(h.spacing)(5)},container:{alignItems:"center",paddingLeft:Object(h.spacing)(2),paddingRight:Object(h.spacing)(2)},datePublication:j(j({},Object(h.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:h.colours.functional.secondary,marginTop:Object(h.spacing)(1)}),datePublicationTablet:{marginTop:"auto"},header:{marginBottom:Object(h.spacing)(3),paddingBottom:Object(h.spacing)(4),paddingTop:Object(h.spacing)(7)},label:{marginBottom:Object(h.spacing)(2)},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center",width:"100%",paddingTop:Object(h.spacing)(2),paddingBottom:Object(h.spacing)(2),borderBottomColor:h.colours.functional.keyline,borderBottomWidth:1,borderTopColor:h.colours.functional.keyline,borderTopWidth:1},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},separator:{borderRightColor:h.colours.functional.keyline,borderRightWidth:1,height:Object(h.spacing)(3),marginLeft:Object(h.spacing)(2),marginRight:Object(h.spacing)(2)},standFirst:j(j({},Object(h.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:h.colours.functional.primary,marginBottom:Object(h.spacing)(3),paddingLeft:Object(h.spacing)(2),paddingRight:Object(h.spacing)(2),textAlign:"center"})});const T=e=>{let t=e.isVideo,n=e.label;if(!t&&!n)return null;const r=t?b.a:u.a;return i.a.createElement(f.a.Consumer,null,e=>{let t=e.theme.sectionColour;return i.a.createElement(s.TcView,{style:C.label},i.a.createElement(r,{color:t||h.colours.section.default,title:n}))})};T.defaultProps={isVideo:!1,label:null};var E=T,k=n(6),S=n(12),_=n.n(S);O.a.arrayOf(O.a.shape({})).isRequired,O.a.string.isRequired,O.a.string.isRequired;var q=n(4),D=n.n(q);const I=D()(s.TcView).withConfig({displayName:"responsive__AuthorImageContainer",componentId:"ba1gpd-0"})(["border-radius:50%;height:100px;overflow:hidden;width:100px;@media (min-width:","px){height:118px;width:118px;}"],h.breakpoints.medium),R=D()(s.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"ba1gpd-1"})(["",";flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,Object(h.spacing)(3),h.breakpoints.medium),N=D()(s.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"ba1gpd-2"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],Object(h.spacing)(1),Object(h.spacing)(3),h.breakpoints.medium),H=D()(s.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"ba1gpd-3"})(["order:2;z-index:1;@media (min-width:","px){width:80.8%;margin:0 auto ",";margin-left:auto;margin-right:auto;}@media (min-width:","px){width:56.2%;}"],h.breakpoints.medium,Object(h.spacing)(2),h.breakpoints.wide),z=D.a.h1.withConfig({displayName:"responsive__HeadlineContainer",componentId:"ba1gpd-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,h.breakpoints.medium,h.fontSizes.articleHeadline,Object(h.spacing)(1)),V=(D()(s.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"ba1gpd-5"})(["@media (min-width:","px){margin-top:0px;}"],h.breakpoints.wide),D()(s.TcView).withConfig({displayName:"responsive__Meta",componentId:"ba1gpd-6"})([""," max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,h.breakpoints.medium)),F=D()(s.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"ba1gpd-7"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],h.breakpoints.medium),L=D()(s.TcView).withConfig({displayName:"responsive__Separator",componentId:"ba1gpd-8"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],h.breakpoints.medium,h.colours.functional.keyline,Object(h.spacing)(3),Object(h.spacing)(2)),B=D.a.h2.withConfig({displayName:"responsive__StandfirstContainer",componentId:"ba1gpd-9"})(["border:0px solid black;box-sizing:border-box;display:inline;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,h.breakpoints.medium,h.fontSizes.infoTitle,Object(h.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),Object(h.spacing)(5),h.breakpoints.wide,Object(h.spacing)(4));var M=e=>{let t=e.bylines,n=e.publicationName,a=e.publishedTime;return i.a.createElement(F,null,Object(k.hasBylineData)(t)&&i.a.createElement(r.Fragment,null,i.a.createElement(V,{styles:C.meta},i.a.createElement(k.ArticleBylineWithLinks,{ast:t})),i.a.createElement(L,null)),i.a.createElement(V,{styles:C.meta},i.a.createElement(R,{styles:Object(s.checkStylesForUnits)(C.datePublication)},i.a.createElement(_.a,{date:a,publication:n}))))};const U=e=>{let t=e.standfirst;return t?i.a.createElement(B,{role:"heading","aria-level":"2",styles:Object(s.checkStylesForUnits)(C.standFirst),testID:"standfirst"},t):null};U.defaultProps={standfirst:null};var A=U;O.a.string.isRequired,O.a.arrayOf(O.a.shape({})).isRequired,O.a.arrayOf(O.a.shape({expiryTime:O.a.string,type:O.a.string})),O.a.bool,O.a.string.isRequired,O.a.string,O.a.bool,O.a.string.isRequired,O.a.string.isRequired,O.a.string,O.a.string;function W(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 Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const J=e=>{let t=e.authorImage,n=e.bylines,r=e.flags,a=e.hasVideo,o=e.headline,l=e.label,d=e.publicationName,u=e.publishedTime,m=e.standfirst,b=e.updatedTime;return i.a.createElement(H,{style:Q(Q({},C.header),C.container)},i.a.createElement(I,{style:C.authorImage},i.a.createElement(p.a,{aspectRatio:1,uri:t,accessibilityLabel:"author-image"})),i.a.createElement(E,{isVideo:a,label:l}),i.a.createElement(z,{role:"heading","aria-level":"1",styles:Object(s.checkStylesForUnits)(C.articleHeadline)},o),i.a.createElement(N,null,i.a.createElement(c.UpdatedTimeProvider,{updatedTime:b},i.a.createElement(c.ArticleFlags,{flags:r}))),i.a.createElement(A,{standfirst:m}),i.a.createElement(M,{bylines:n,publicationName:d,publishedTime:u}))};J.defaultProps={flags:[],hasVideo:!1,label:null,longRead:!1,standfirst:null,updatedTime:null};var K=J;function X(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 Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Y(Y({},{analyticsStream:O.a.func.isRequired,article:O.a.shape({}),error:O.a.shape({graphQLErrors:O.a.array,message:O.a.string,networkError:O.a.shape({message:O.a.string})}),isLoading:O.a.bool,onImagePress:O.a.func,receiveChildList:O.a.func.isRequired,zephrDivs:O.a.bool}),{},{navigationMode:O.a.shape({}).isRequired,storefrontConfig:O.a.string.isRequired});const $=Y({},{article:null,error:null,isLoading:!1,onImagePress:null});class ee 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,r=e.hasVideo,a=e.headline,o=e.label,c=e.publicationName,l=e.publishedTime,p=e.shortHeadline,d=e.standfirst,u=e.updatedTime,m=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(K,{authorImage:m,bylines:t,flags:n,hasVideo:r,headline:Object(s.getHeadline)(a,p),label:o,publicationName:c,publishedTime:l,standfirst:d,updatedTime:u})}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.paidContentClassName,u=e.isPreview,m=e.swgProductId,b=e.zephrDivs,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,paidContentClassName:d,isPreview:u,swgProductId:m,zephrDivs:b,storefrontConfig:g})}}ee.defaultProps=$;t.default=ee}]);
|