@times-components/article-magazine-standard 3.53.29 → 3.54.1
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 +27 -0
- package/babel.config.js +13 -2
- package/dist/article-header/article-header-prop-types.js +36 -1
- package/dist/article-header/article-header.js +83 -1
- package/dist/article-label/article-label-prop-types.js +21 -1
- package/dist/article-label/article-label.js +45 -1
- package/dist/article-magazine-standard.js +117 -1
- package/dist/article-meta/article-meta-prop-types.js +18 -1
- package/dist/article-meta/article-meta.js +56 -1
- package/dist/article-prop-types/article-prop-types.base.js +33 -1
- package/dist/article-prop-types/article-prop-types.js +28 -1
- package/dist/article-standfirst/article-standfirst.js +38 -1
- package/dist/newStyles/index.js +21 -1
- package/dist/newStyles/responsive.js +70 -1
- package/dist/newStyles/shared.js +83 -1
- package/dist/styles/index.js +21 -1
- package/dist/styles/responsive.js +74 -1
- package/dist/styles/shared.js +85 -1
- package/package.json +25 -26
- package/rnw.js +1 -1
- package/tsconfig.jest.json +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.54.1](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-standard@3.54.0...@times-components/article-magazine-standard@3.54.1) (2022-08-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @times-components/article-magazine-standard
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.54.0](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-standard@3.53.30...@times-components/article-magazine-standard@3.54.0) (2022-08-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **TDP-1712:** remove react-native foreverrrrr ([#3064](https://github.com/newsuk/times-components/issues/3064)) ([2a20cb5](https://github.com/newsuk/times-components/commit/2a20cb5abc10a4e7ca2d62487967f8fcf4eccb62)), closes [#3037](https://github.com/newsuk/times-components/issues/3037) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3050](https://github.com/newsuk/times-components/issues/3050) [#3056](https://github.com/newsuk/times-components/issues/3056) [#3057](https://github.com/newsuk/times-components/issues/3057) [#3066](https://github.com/newsuk/times-components/issues/3066) [#3065](https://github.com/newsuk/times-components/issues/3065) [#3037](https://github.com/newsuk/times-components/issues/3037) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3056](https://github.com/newsuk/times-components/issues/3056) [#3066](https://github.com/newsuk/times-components/issues/3066) [#3069](https://github.com/newsuk/times-components/issues/3069) [#3068](https://github.com/newsuk/times-components/issues/3068) [#3070](https://github.com/newsuk/times-components/issues/3070) [#3072](https://github.com/newsuk/times-components/issues/3072) [#3073](https://github.com/newsuk/times-components/issues/3073) [#3071](https://github.com/newsuk/times-components/issues/3071) [#3074](https://github.com/newsuk/times-components/issues/3074) [#3076](https://github.com/newsuk/times-components/issues/3076) [#3079](https://github.com/newsuk/times-components/issues/3079) [#3078](https://github.com/newsuk/times-components/issues/3078) [#3083](https://github.com/newsuk/times-components/issues/3083) [#3087](https://github.com/newsuk/times-components/issues/3087) [#3091](https://github.com/newsuk/times-components/issues/3091) [#3096](https://github.com/newsuk/times-components/issues/3096) [#3102](https://github.com/newsuk/times-components/issues/3102) [#3105](https://github.com/newsuk/times-components/issues/3105) [#3108](https://github.com/newsuk/times-components/issues/3108) [#3111](https://github.com/newsuk/times-components/issues/3111) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3113](https://github.com/newsuk/times-components/issues/3113) [#3114](https://github.com/newsuk/times-components/issues/3114) [#3120](https://github.com/newsuk/times-components/issues/3120) [#3119](https://github.com/newsuk/times-components/issues/3119) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3126](https://github.com/newsuk/times-components/issues/3126) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3126](https://github.com/newsuk/times-components/issues/3126) [#3127](https://github.com/newsuk/times-components/issues/3127) [#3116](https://github.com/newsuk/times-components/issues/3116) [#3128](https://github.com/newsuk/times-components/issues/3128) [#3132](https://github.com/newsuk/times-components/issues/3132) [#3133](https://github.com/newsuk/times-components/issues/3133)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [3.53.30](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-standard@3.53.29...@times-components/article-magazine-standard@3.53.30) (2022-08-15)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @times-components/article-magazine-standard
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [3.53.29](https://github.com/newsuk/times-components/compare/@times-components/article-magazine-standard@3.53.28...@times-components/article-magazine-standard@3.53.29) (2022-08-12)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @times-components/article-magazine-standard
|
package/babel.config.js
CHANGED
|
@@ -3,8 +3,19 @@ module.exports = api => {
|
|
|
3
3
|
return {
|
|
4
4
|
plugins: [
|
|
5
5
|
"babel-plugin-styled-components",
|
|
6
|
-
"@babel/plugin-
|
|
6
|
+
"@babel/plugin-proposal-export-default-from"
|
|
7
7
|
],
|
|
8
|
-
presets: [
|
|
8
|
+
presets: [
|
|
9
|
+
[
|
|
10
|
+
"@babel/preset-env",
|
|
11
|
+
{
|
|
12
|
+
targets: {
|
|
13
|
+
esmodules: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"@babel/preset-react",
|
|
18
|
+
"@babel/preset-typescript"
|
|
19
|
+
]
|
|
9
20
|
};
|
|
10
21
|
};
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.articleHeaderDefaultProps = exports.articleHeaderPropTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const articleHeaderPropTypes = {
|
|
13
|
+
bylines: _propTypes.default.arrayOf(_propTypes.default.shape({})).isRequired,
|
|
14
|
+
flags: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
15
|
+
expiryTime: _propTypes.default.string,
|
|
16
|
+
type: _propTypes.default.string
|
|
17
|
+
})),
|
|
18
|
+
hasVideo: _propTypes.default.bool,
|
|
19
|
+
headline: _propTypes.default.string.isRequired,
|
|
20
|
+
label: _propTypes.default.string,
|
|
21
|
+
longRead: _propTypes.default.bool,
|
|
22
|
+
publicationName: _propTypes.default.string.isRequired,
|
|
23
|
+
publishedTime: _propTypes.default.string.isRequired,
|
|
24
|
+
standfirst: _propTypes.default.string,
|
|
25
|
+
updatedTime: _propTypes.default.string
|
|
26
|
+
};
|
|
27
|
+
exports.articleHeaderPropTypes = articleHeaderPropTypes;
|
|
28
|
+
const articleHeaderDefaultProps = {
|
|
29
|
+
flags: [],
|
|
30
|
+
hasVideo: false,
|
|
31
|
+
label: null,
|
|
32
|
+
longRead: false,
|
|
33
|
+
standfirst: null,
|
|
34
|
+
updatedTime: null
|
|
35
|
+
};
|
|
36
|
+
exports.articleHeaderDefaultProps = articleHeaderDefaultProps;
|
|
@@ -1 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _context = _interopRequireDefault(require("@times-components/context"));
|
|
11
|
+
|
|
12
|
+
var _utils = require("@times-components/utils");
|
|
13
|
+
|
|
14
|
+
var _tsComponents = require("@times-components/ts-components");
|
|
15
|
+
|
|
16
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
17
|
+
|
|
18
|
+
var _articleLabel = _interopRequireDefault(require("../article-label/article-label"));
|
|
19
|
+
|
|
20
|
+
var _articleMeta = _interopRequireDefault(require("../article-meta/article-meta"));
|
|
21
|
+
|
|
22
|
+
var _articleStandfirst = _interopRequireDefault(require("../article-standfirst/article-standfirst"));
|
|
23
|
+
|
|
24
|
+
var _articleHeaderPropTypes = require("./article-header-prop-types");
|
|
25
|
+
|
|
26
|
+
var _styles = _interopRequireDefault(require("../styles"));
|
|
27
|
+
|
|
28
|
+
var _responsive = require("../styles/responsive");
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
+
|
|
38
|
+
const headlineContainerStyles = (headlineFont, headlineCase) => (0, _utils.checkStylesForUnits)(_objectSpread(_objectSpread({}, _styles.default.articleHeadline), {}, {
|
|
39
|
+
fontFamily: headlineFont ? _tsStyleguide.fonts[headlineFont] : null,
|
|
40
|
+
textTransform: headlineCase || null
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
const ArticleHeader = _ref => {
|
|
44
|
+
let bylines = _ref.bylines,
|
|
45
|
+
flags = _ref.flags,
|
|
46
|
+
hasVideo = _ref.hasVideo,
|
|
47
|
+
headline = _ref.headline,
|
|
48
|
+
label = _ref.label,
|
|
49
|
+
publicationName = _ref.publicationName,
|
|
50
|
+
publishedTime = _ref.publishedTime,
|
|
51
|
+
standfirst = _ref.standfirst,
|
|
52
|
+
updatedTime = _ref.updatedTime;
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_context.default.Consumer, null, _ref2 => {
|
|
54
|
+
let _ref2$theme = _ref2.theme,
|
|
55
|
+
headlineFont = _ref2$theme.headlineFont,
|
|
56
|
+
headlineCase = _ref2$theme.headlineCase;
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_responsive.HeaderContainer, {
|
|
58
|
+
style: _styles.default.container
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_articleLabel.default, {
|
|
60
|
+
isVideo: hasVideo,
|
|
61
|
+
label: label
|
|
62
|
+
}), /*#__PURE__*/_react.default.createElement(_responsive.HeadlineContainer, {
|
|
63
|
+
role: "heading",
|
|
64
|
+
"aria-level": "1",
|
|
65
|
+
styles: headlineContainerStyles(headlineFont, headlineCase)
|
|
66
|
+
}, headline), /*#__PURE__*/_react.default.createElement(_responsive.FlagsContainer, null, /*#__PURE__*/_react.default.createElement(_tsComponents.UpdatedTimeProvider, {
|
|
67
|
+
updatedTime: updatedTime
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_tsComponents.ArticleFlags, {
|
|
69
|
+
flags: flags
|
|
70
|
+
}))), /*#__PURE__*/_react.default.createElement(_articleStandfirst.default, {
|
|
71
|
+
standfirst: standfirst
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_articleMeta.default, {
|
|
73
|
+
bylines: bylines,
|
|
74
|
+
publicationName: publicationName,
|
|
75
|
+
publishedTime: publishedTime
|
|
76
|
+
}));
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
ArticleHeader.propTypes = _articleHeaderPropTypes.articleHeaderPropTypes;
|
|
81
|
+
ArticleHeader.defaultProps = _articleHeaderPropTypes.articleHeaderDefaultProps;
|
|
82
|
+
var _default = ArticleHeader;
|
|
83
|
+
exports.default = _default;
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.articleLabelDefaultProps = exports.articleLabelPropTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const articleLabelPropTypes = {
|
|
13
|
+
isVideo: _propTypes.default.bool,
|
|
14
|
+
label: _propTypes.default.string
|
|
15
|
+
};
|
|
16
|
+
exports.articleLabelPropTypes = articleLabelPropTypes;
|
|
17
|
+
const articleLabelDefaultProps = {
|
|
18
|
+
isVideo: false,
|
|
19
|
+
label: null
|
|
20
|
+
};
|
|
21
|
+
exports.articleLabelDefaultProps = articleLabelDefaultProps;
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _utils = require("@times-components/utils");
|
|
11
|
+
|
|
12
|
+
var _articleLabel = _interopRequireDefault(require("@times-components/article-label"));
|
|
13
|
+
|
|
14
|
+
var _videoLabel = _interopRequireDefault(require("@times-components/video-label"));
|
|
15
|
+
|
|
16
|
+
var _context = _interopRequireDefault(require("@times-components/context"));
|
|
17
|
+
|
|
18
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
19
|
+
|
|
20
|
+
var _articleLabelPropTypes = require("./article-label-prop-types");
|
|
21
|
+
|
|
22
|
+
var _styles = _interopRequireDefault(require("../styles"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
const HeaderLabel = _ref => {
|
|
27
|
+
let isVideo = _ref.isVideo,
|
|
28
|
+
label = _ref.label;
|
|
29
|
+
if (!isVideo && !label) return null;
|
|
30
|
+
const Label = isVideo ? _videoLabel.default : _articleLabel.default;
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_context.default.Consumer, null, _ref2 => {
|
|
32
|
+
let sectionColour = _ref2.theme.sectionColour;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_utils.TcView, {
|
|
34
|
+
style: _styles.default.label
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
36
|
+
color: sectionColour || _tsStyleguide.colours.section.default,
|
|
37
|
+
title: label
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
HeaderLabel.propTypes = _articleLabelPropTypes.articleLabelPropTypes;
|
|
43
|
+
HeaderLabel.defaultProps = _articleLabelPropTypes.articleLabelDefaultProps;
|
|
44
|
+
var _default = HeaderLabel;
|
|
45
|
+
exports.default = _default;
|
|
@@ -1 +1,117 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _articleSkeleton = _interopRequireDefault(require("@times-components/article-skeleton"));
|
|
11
|
+
|
|
12
|
+
var _utils = require("@times-components/utils");
|
|
13
|
+
|
|
14
|
+
var _caption = require("@times-components/caption");
|
|
15
|
+
|
|
16
|
+
var _articleHeader = _interopRequireDefault(require("./article-header/article-header"));
|
|
17
|
+
|
|
18
|
+
var _articlePropTypes = require("./article-prop-types/article-prop-types");
|
|
19
|
+
|
|
20
|
+
var _newStyles = _interopRequireDefault(require("./newStyles"));
|
|
21
|
+
|
|
22
|
+
var _responsive = require("./newStyles/responsive");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
|
|
32
|
+
class ArticlePage extends _react.Component {
|
|
33
|
+
constructor(props) {
|
|
34
|
+
super(props);
|
|
35
|
+
this.renderHeader = this.renderHeader.bind(this);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
renderHeader() {
|
|
39
|
+
const article = this.props.article;
|
|
40
|
+
const bylines = article.bylines,
|
|
41
|
+
expirableFlags = article.expirableFlags,
|
|
42
|
+
hasVideo = article.hasVideo,
|
|
43
|
+
headline = article.headline,
|
|
44
|
+
label = article.label,
|
|
45
|
+
publicationName = article.publicationName,
|
|
46
|
+
publishedTime = article.publishedTime,
|
|
47
|
+
shortHeadline = article.shortHeadline,
|
|
48
|
+
standfirst = article.standfirst,
|
|
49
|
+
updatedTime = article.updatedTime;
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_articleHeader.default, {
|
|
51
|
+
bylines: bylines,
|
|
52
|
+
flags: expirableFlags,
|
|
53
|
+
hasVideo: hasVideo,
|
|
54
|
+
headline: (0, _utils.getHeadline)(headline, shortHeadline),
|
|
55
|
+
label: label,
|
|
56
|
+
publicationName: publicationName,
|
|
57
|
+
publishedTime: publishedTime,
|
|
58
|
+
standfirst: standfirst,
|
|
59
|
+
updatedTime: updatedTime
|
|
60
|
+
}), /*#__PURE__*/_react.default.createElement(_responsive.LeadAsset, _extends({}, (0, _utils.getLeadAsset)(article), {
|
|
61
|
+
getImageCrop: _utils.getStandardTemplateCrop,
|
|
62
|
+
renderCaption: _ref => {
|
|
63
|
+
let caption = _ref.caption;
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_caption.CentredCaption, caption);
|
|
65
|
+
},
|
|
66
|
+
style: _newStyles.default.leadAssetContainer
|
|
67
|
+
})));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
render() {
|
|
71
|
+
const _this$props = this.props,
|
|
72
|
+
article = _this$props.article,
|
|
73
|
+
analyticsStream = _this$props.analyticsStream,
|
|
74
|
+
error = _this$props.error,
|
|
75
|
+
isLoading = _this$props.isLoading,
|
|
76
|
+
logoUrl = _this$props.logoUrl,
|
|
77
|
+
navigationMode = _this$props.navigationMode,
|
|
78
|
+
receiveChildList = _this$props.receiveChildList,
|
|
79
|
+
commentingConfig = _this$props.commentingConfig,
|
|
80
|
+
paidContentClassName = _this$props.paidContentClassName,
|
|
81
|
+
isPreview = _this$props.isPreview,
|
|
82
|
+
swgProductId = _this$props.swgProductId,
|
|
83
|
+
additionalRelatedArticlesFlag = _this$props.additionalRelatedArticlesFlag,
|
|
84
|
+
algoliaSearchKeys = _this$props.algoliaSearchKeys,
|
|
85
|
+
latestFromSectionFlag = _this$props.latestFromSectionFlag,
|
|
86
|
+
latestFromSection = _this$props.latestFromSection,
|
|
87
|
+
olympicsKeys = _this$props.olympicsKeys;
|
|
88
|
+
|
|
89
|
+
if (error || isLoading) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_articleSkeleton.default, {
|
|
94
|
+
analyticsStream: analyticsStream,
|
|
95
|
+
data: article,
|
|
96
|
+
Header: this.renderHeader,
|
|
97
|
+
logoUrl: logoUrl,
|
|
98
|
+
receiveChildList: receiveChildList,
|
|
99
|
+
navigationMode: navigationMode,
|
|
100
|
+
commentingConfig: commentingConfig,
|
|
101
|
+
paidContentClassName: paidContentClassName,
|
|
102
|
+
isPreview: isPreview,
|
|
103
|
+
swgProductId: swgProductId,
|
|
104
|
+
additionalRelatedArticlesFlag: additionalRelatedArticlesFlag,
|
|
105
|
+
algoliaSearchKeys: algoliaSearchKeys,
|
|
106
|
+
latestFromSectionFlag: latestFromSectionFlag,
|
|
107
|
+
latestFromSection: latestFromSection,
|
|
108
|
+
olympicsKeys: olympicsKeys
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
ArticlePage.propTypes = _articlePropTypes.articlePropTypes;
|
|
115
|
+
ArticlePage.defaultProps = _articlePropTypes.articleDefaultProps;
|
|
116
|
+
var _default = ArticlePage;
|
|
117
|
+
exports.default = _default;
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const metaPropTypes = {
|
|
13
|
+
bylines: _propTypes.default.arrayOf(_propTypes.default.shape({})).isRequired,
|
|
14
|
+
publicationName: _propTypes.default.string.isRequired,
|
|
15
|
+
publishedTime: _propTypes.default.string.isRequired
|
|
16
|
+
};
|
|
17
|
+
var _default = metaPropTypes;
|
|
18
|
+
exports.default = _default;
|
|
@@ -1 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _articleByline = require("@times-components/article-byline");
|
|
11
|
+
|
|
12
|
+
var _context = _interopRequireDefault(require("@times-components/context"));
|
|
13
|
+
|
|
14
|
+
var _utils = require("@times-components/utils");
|
|
15
|
+
|
|
16
|
+
var _datePublication = _interopRequireDefault(require("@times-components/date-publication"));
|
|
17
|
+
|
|
18
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
19
|
+
|
|
20
|
+
var _articleMetaPropTypes = _interopRequireDefault(require("./article-meta-prop-types"));
|
|
21
|
+
|
|
22
|
+
var _responsive = require("../styles/responsive");
|
|
23
|
+
|
|
24
|
+
var _styles = _interopRequireDefault(require("../styles"));
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
32
|
+
const ArticleMeta = _ref => {
|
|
33
|
+
let bylines = _ref.bylines,
|
|
34
|
+
publicationName = _ref.publicationName,
|
|
35
|
+
publishedTime = _ref.publishedTime;
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_responsive.MetaContainer, null, (0, _articleByline.hasBylineData)(bylines) && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_responsive.Meta, {
|
|
37
|
+
style: _styles.default.meta
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_context.default.Consumer, null, _ref2 => {
|
|
39
|
+
let sectionColour = _ref2.theme.sectionColour;
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_articleByline.ArticleBylineWithLinks, {
|
|
41
|
+
ast: bylines,
|
|
42
|
+
color: sectionColour || _tsStyleguide.colours.section.default
|
|
43
|
+
});
|
|
44
|
+
})), /*#__PURE__*/_react.default.createElement(_responsive.Separator, null)), /*#__PURE__*/_react.default.createElement(_responsive.Meta, {
|
|
45
|
+
style: _styles.default.meta
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_responsive.DatePublicationContainer, {
|
|
47
|
+
styles: (0, _utils.checkStylesForUnits)(_styles.default.datePublication)
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_datePublication.default, {
|
|
49
|
+
date: publishedTime,
|
|
50
|
+
publication: publicationName
|
|
51
|
+
}))));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
ArticleMeta.propTypes = _articleMetaPropTypes.default;
|
|
55
|
+
var _default = ArticleMeta;
|
|
56
|
+
exports.default = _default;
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.articlePageDefaultProps = exports.articlePagePropTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const articlePagePropTypes = {
|
|
13
|
+
analyticsStream: _propTypes.default.func.isRequired,
|
|
14
|
+
article: _propTypes.default.shape({}),
|
|
15
|
+
error: _propTypes.default.shape({
|
|
16
|
+
graphQLErrors: _propTypes.default.array,
|
|
17
|
+
message: _propTypes.default.string,
|
|
18
|
+
networkError: _propTypes.default.shape({
|
|
19
|
+
message: _propTypes.default.string
|
|
20
|
+
})
|
|
21
|
+
}),
|
|
22
|
+
isLoading: _propTypes.default.bool,
|
|
23
|
+
onImagePress: _propTypes.default.func,
|
|
24
|
+
receiveChildList: _propTypes.default.func.isRequired
|
|
25
|
+
};
|
|
26
|
+
exports.articlePagePropTypes = articlePagePropTypes;
|
|
27
|
+
const articlePageDefaultProps = {
|
|
28
|
+
article: null,
|
|
29
|
+
error: null,
|
|
30
|
+
isLoading: false,
|
|
31
|
+
onImagePress: null
|
|
32
|
+
};
|
|
33
|
+
exports.articlePageDefaultProps = articlePageDefaultProps;
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.articleDefaultProps = exports.articlePropTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _articlePropTypes = require("./article-prop-types.base");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
+
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
|
+
|
|
18
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
|
|
20
|
+
const articlePropTypes = _objectSpread(_objectSpread({}, _articlePropTypes.articlePagePropTypes), {}, {
|
|
21
|
+
navigationMode: _propTypes.default.shape({}).isRequired
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
exports.articlePropTypes = articlePropTypes;
|
|
25
|
+
|
|
26
|
+
const articleDefaultProps = _objectSpread({}, _articlePropTypes.articlePageDefaultProps);
|
|
27
|
+
|
|
28
|
+
exports.articleDefaultProps = articleDefaultProps;
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _utils = require("@times-components/utils");
|
|
13
|
+
|
|
14
|
+
var _styles = _interopRequireDefault(require("../styles"));
|
|
15
|
+
|
|
16
|
+
var _responsive = require("../styles/responsive");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
const HeaderStandfirst = _ref => {
|
|
21
|
+
let standfirst = _ref.standfirst;
|
|
22
|
+
if (!standfirst) return null;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_responsive.StandfirstContainer, {
|
|
24
|
+
role: "heading",
|
|
25
|
+
"aria-level": "2",
|
|
26
|
+
styles: (0, _utils.checkStylesForUnits)(_styles.default.standFirst),
|
|
27
|
+
testID: "standfirst"
|
|
28
|
+
}, standfirst);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
HeaderStandfirst.propTypes = {
|
|
32
|
+
standfirst: _propTypes.default.string
|
|
33
|
+
};
|
|
34
|
+
HeaderStandfirst.defaultProps = {
|
|
35
|
+
standfirst: null
|
|
36
|
+
};
|
|
37
|
+
var _default = HeaderStandfirst;
|
|
38
|
+
exports.default = _default;
|
package/dist/newStyles/index.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _shared = _interopRequireDefault(require("./shared"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
18
|
+
const newStyles = _objectSpread({}, _shared.default);
|
|
19
|
+
|
|
20
|
+
var _default = newStyles;
|
|
21
|
+
exports.default = _default;
|
|
@@ -1 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LeadAsset = exports.StandfirstContainer = exports.Separator = exports.MetaContainer = exports.Meta = exports.LabelContainer = exports.HeadlineContainer = exports.HeaderContainer = exports.FlagsContainer = exports.DatePublicationContainer = void 0;
|
|
7
|
+
|
|
8
|
+
var _utils = require("@times-components/utils");
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
13
|
+
|
|
14
|
+
var _articleLeadAsset = _interopRequireDefault(require("@times-components/article-lead-asset"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const DatePublicationContainer = (0, _styledComponents.default)(_utils.TcText).withConfig({
|
|
19
|
+
displayName: "responsive__DatePublicationContainer",
|
|
20
|
+
componentId: "bpd0t9-0"
|
|
21
|
+
})(["flex-direction:row;flex-wrap:wrap;margin-top:", ";@media (min-width:", "px){margin-top:0;}"], (0, _tsStyleguide.spacing)(3), _tsStyleguide.breakpoints.medium);
|
|
22
|
+
exports.DatePublicationContainer = DatePublicationContainer;
|
|
23
|
+
const FlagsContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
24
|
+
displayName: "responsive__FlagsContainer",
|
|
25
|
+
componentId: "bpd0t9-1"
|
|
26
|
+
})(["padding-top:", ";padding-bottom:", ";@media (min-width:", "px){padding-top:0;}"], (0, _tsStyleguide.spacing)(1), (0, _tsStyleguide.spacing)(3), _tsStyleguide.breakpoints.medium);
|
|
27
|
+
exports.FlagsContainer = FlagsContainer;
|
|
28
|
+
const HeaderContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
29
|
+
displayName: "responsive__HeaderContainer",
|
|
30
|
+
componentId: "bpd0t9-2"
|
|
31
|
+
})(["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%;}"], _tsStyleguide.breakpoints.medium, (0, _tsStyleguide.spacing)(6), _tsStyleguide.breakpoints.wide);
|
|
32
|
+
exports.HeaderContainer = HeaderContainer;
|
|
33
|
+
const HeadlineContainer = (0, _styledComponents.default)(_utils.TcText).withConfig({
|
|
34
|
+
displayName: "responsive__HeadlineContainer",
|
|
35
|
+
componentId: "bpd0t9-3"
|
|
36
|
+
})(["@media (min-width:", "px){font-size:", "px;line-height:50px;margin-bottom:", ";}"], _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.articleHeadline, (0, _tsStyleguide.spacing)(1));
|
|
37
|
+
exports.HeadlineContainer = HeadlineContainer;
|
|
38
|
+
const LabelContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
39
|
+
displayName: "responsive__LabelContainer",
|
|
40
|
+
componentId: "bpd0t9-4"
|
|
41
|
+
})(["@media (min-width:", "px){margin-top:0px;}"], _tsStyleguide.breakpoints.wide);
|
|
42
|
+
exports.LabelContainer = LabelContainer;
|
|
43
|
+
const Meta = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
44
|
+
displayName: "responsive__Meta",
|
|
45
|
+
componentId: "bpd0t9-5"
|
|
46
|
+
})(["max-width:100%;justify-content:center;@media (min-width:", "px){margin-top:0;}"], _tsStyleguide.breakpoints.medium);
|
|
47
|
+
exports.Meta = Meta;
|
|
48
|
+
const MetaContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
49
|
+
displayName: "responsive__MetaContainer",
|
|
50
|
+
componentId: "bpd0t9-6"
|
|
51
|
+
})(["align-items:center;justify-content:center;@media (min-width:", "px){flex-direction:row;flex-wrap:wrap;}"], _tsStyleguide.breakpoints.medium);
|
|
52
|
+
exports.MetaContainer = MetaContainer;
|
|
53
|
+
const Separator = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
54
|
+
displayName: "responsive__Separator",
|
|
55
|
+
componentId: "bpd0t9-7"
|
|
56
|
+
})(["display:none;@media (min-width:", "px){background-color:", ";display:flex;height:", ";margin:0 ", ";width:1px;}"], _tsStyleguide.breakpoints.medium, _tsStyleguide.colours.functional.keyline, (0, _tsStyleguide.spacing)(3), (0, _tsStyleguide.spacing)(2));
|
|
57
|
+
exports.Separator = Separator;
|
|
58
|
+
const StandfirstContainer = (0, _styledComponents.default)(_utils.TcText).withConfig({
|
|
59
|
+
displayName: "responsive__StandfirstContainer",
|
|
60
|
+
componentId: "bpd0t9-8"
|
|
61
|
+
})(["@media (min-width:", "px){font-size:", "px;line-height:", "px;margin-bottom:", ";}@media (min-width:", "px){margin-bottom:", ";}"], _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.infoTitle, (0, _tsStyleguide.lineHeight)({
|
|
62
|
+
font: "bodyRegular",
|
|
63
|
+
fontSize: "infoTitle"
|
|
64
|
+
}), (0, _tsStyleguide.spacing)(5), _tsStyleguide.breakpoints.wide, (0, _tsStyleguide.spacing)(4));
|
|
65
|
+
exports.StandfirstContainer = StandfirstContainer;
|
|
66
|
+
const LeadAsset = (0, _styledComponents.default)(_articleLeadAsset.default).withConfig({
|
|
67
|
+
displayName: "responsive__LeadAsset",
|
|
68
|
+
componentId: "bpd0t9-9"
|
|
69
|
+
})(["order:2;@media (min-width:", "px){margin-bottom:", ";}@media (min-width:", "px){width:56.2%;margin-left:auto;margin-right:auto;}"], _tsStyleguide.breakpoints.medium, (0, _tsStyleguide.spacing)(6), _tsStyleguide.breakpoints.wide);
|
|
70
|
+
exports.LeadAsset = LeadAsset;
|
package/dist/newStyles/shared.js
CHANGED
|
@@ -1 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
9
|
+
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
|
+
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
16
|
+
const sharedStyles = {
|
|
17
|
+
articleHeadline: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
18
|
+
font: "headline",
|
|
19
|
+
fontSize: "headline"
|
|
20
|
+
})), {}, {
|
|
21
|
+
color: _tsStyleguide.colours.functional.brandColour,
|
|
22
|
+
marginBottom: (0, _tsStyleguide.spacing)(2),
|
|
23
|
+
textAlign: "center"
|
|
24
|
+
}),
|
|
25
|
+
container: {
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
marginBottom: (0, _tsStyleguide.spacing)(5),
|
|
28
|
+
paddingLeft: (0, _tsStyleguide.spacing)(2),
|
|
29
|
+
paddingRight: (0, _tsStyleguide.spacing)(2),
|
|
30
|
+
paddingTop: (0, _tsStyleguide.spacing)(7)
|
|
31
|
+
},
|
|
32
|
+
datePublication: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
33
|
+
font: "supporting",
|
|
34
|
+
fontSize: "cardMeta"
|
|
35
|
+
})), {}, {
|
|
36
|
+
color: _tsStyleguide.colours.functional.secondary,
|
|
37
|
+
marginTop: (0, _tsStyleguide.spacing)(3)
|
|
38
|
+
}),
|
|
39
|
+
datePublicationTablet: {
|
|
40
|
+
marginTop: "auto"
|
|
41
|
+
},
|
|
42
|
+
label: {
|
|
43
|
+
marginBottom: (0, _tsStyleguide.spacing)(2)
|
|
44
|
+
},
|
|
45
|
+
leadAssetContainer: {
|
|
46
|
+
marginBottom: (0, _tsStyleguide.spacing)(4)
|
|
47
|
+
},
|
|
48
|
+
leadAssetContainerTablet: {
|
|
49
|
+
paddingLeft: (0, _tsStyleguide.spacing)(2),
|
|
50
|
+
paddingRight: (0, _tsStyleguide.spacing)(2)
|
|
51
|
+
},
|
|
52
|
+
meta: {
|
|
53
|
+
flexDirection: "row",
|
|
54
|
+
flexWrap: "wrap"
|
|
55
|
+
},
|
|
56
|
+
metaContainer: {
|
|
57
|
+
alignItems: "center"
|
|
58
|
+
},
|
|
59
|
+
metaContainerTablet: {
|
|
60
|
+
flexDirection: "row",
|
|
61
|
+
justifyContent: "center"
|
|
62
|
+
},
|
|
63
|
+
metaTablet: {
|
|
64
|
+
paddingTop: (0, _tsStyleguide.spacing)(1)
|
|
65
|
+
},
|
|
66
|
+
separator: {
|
|
67
|
+
borderRightColor: _tsStyleguide.colours.functional.keyline,
|
|
68
|
+
borderRightWidth: 1,
|
|
69
|
+
height: (0, _tsStyleguide.spacing)(3),
|
|
70
|
+
marginHorizontal: (0, _tsStyleguide.spacing)(2)
|
|
71
|
+
},
|
|
72
|
+
standFirst: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
73
|
+
font: "headlineRegular",
|
|
74
|
+
fontSize: "smallestHeadline"
|
|
75
|
+
})), {}, {
|
|
76
|
+
color: _tsStyleguide.colours.functional.primary,
|
|
77
|
+
marginBottom: (0, _tsStyleguide.spacing)(3),
|
|
78
|
+
paddingHorizontal: (0, _tsStyleguide.spacing)(2),
|
|
79
|
+
textAlign: "center"
|
|
80
|
+
})
|
|
81
|
+
};
|
|
82
|
+
var _default = sharedStyles;
|
|
83
|
+
exports.default = _default;
|
package/dist/styles/index.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _shared = _interopRequireDefault(require("./shared"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
18
|
+
const styles = _objectSpread({}, _shared.default);
|
|
19
|
+
|
|
20
|
+
var _default = styles;
|
|
21
|
+
exports.default = _default;
|
|
@@ -1 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LeadAsset = exports.StandfirstContainer = exports.Separator = exports.MetaContainer = exports.Meta = exports.LabelContainer = exports.HeadlineContainer = exports.HeaderContainer = exports.FlagsContainer = exports.DatePublicationContainer = void 0;
|
|
7
|
+
|
|
8
|
+
var _utils = require("@times-components/utils");
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
13
|
+
|
|
14
|
+
var _articleLeadAsset = _interopRequireDefault(require("@times-components/article-lead-asset"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const DatePublicationContainer = (0, _styledComponents.default)(_utils.TcText).withConfig({
|
|
19
|
+
displayName: "responsive__DatePublicationContainer",
|
|
20
|
+
componentId: "iv7rgu-0"
|
|
21
|
+
})(["", ";flex-direction:row;flex-wrap:wrap;margin-top:", ";@media (min-width:", "px){margin-top:0;}"], props => props.styles && props.styles, (0, _tsStyleguide.spacing)(3), _tsStyleguide.breakpoints.medium);
|
|
22
|
+
exports.DatePublicationContainer = DatePublicationContainer;
|
|
23
|
+
const FlagsContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
24
|
+
displayName: "responsive__FlagsContainer",
|
|
25
|
+
componentId: "iv7rgu-1"
|
|
26
|
+
})(["padding-top:", ";padding-bottom:", ";@media (min-width:", "px){padding-top:0;}"], (0, _tsStyleguide.spacing)(1), (0, _tsStyleguide.spacing)(3), _tsStyleguide.breakpoints.medium);
|
|
27
|
+
exports.FlagsContainer = FlagsContainer;
|
|
28
|
+
const HeaderContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
29
|
+
displayName: "responsive__HeaderContainer",
|
|
30
|
+
componentId: "iv7rgu-2"
|
|
31
|
+
})(["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%;}"], _tsStyleguide.breakpoints.medium, (0, _tsStyleguide.spacing)(6), _tsStyleguide.breakpoints.wide);
|
|
32
|
+
exports.HeaderContainer = HeaderContainer;
|
|
33
|
+
|
|
34
|
+
const HeadlineContainer = _styledComponents.default.h1.withConfig({
|
|
35
|
+
displayName: "responsive__HeadlineContainer",
|
|
36
|
+
componentId: "iv7rgu-3"
|
|
37
|
+
})(["border:0px solid black;box-sizing:border-box;display:inline;font:14px system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Ubuntu,\"Helvetica Neue\",sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;", " @media (min-width:", "px){font-size:", "px;line-height:50px;margin-bottom:", ";}"], props => props.styles && props.styles, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.articleHeadline, (0, _tsStyleguide.spacing)(1));
|
|
38
|
+
|
|
39
|
+
exports.HeadlineContainer = HeadlineContainer;
|
|
40
|
+
const LabelContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
41
|
+
displayName: "responsive__LabelContainer",
|
|
42
|
+
componentId: "iv7rgu-4"
|
|
43
|
+
})(["@media (min-width:", "px){margin-top:0px;}"], _tsStyleguide.breakpoints.wide);
|
|
44
|
+
exports.LabelContainer = LabelContainer;
|
|
45
|
+
const Meta = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
46
|
+
displayName: "responsive__Meta",
|
|
47
|
+
componentId: "iv7rgu-5"
|
|
48
|
+
})(["max-width:100%;justify-content:center;@media (min-width:", "px){margin-top:0;}"], _tsStyleguide.breakpoints.medium);
|
|
49
|
+
exports.Meta = Meta;
|
|
50
|
+
const MetaContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
51
|
+
displayName: "responsive__MetaContainer",
|
|
52
|
+
componentId: "iv7rgu-6"
|
|
53
|
+
})(["align-items:center;justify-content:center;@media (min-width:", "px){flex-direction:row;flex-wrap:wrap;}"], _tsStyleguide.breakpoints.medium);
|
|
54
|
+
exports.MetaContainer = MetaContainer;
|
|
55
|
+
const Separator = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
56
|
+
displayName: "responsive__Separator",
|
|
57
|
+
componentId: "iv7rgu-7"
|
|
58
|
+
})(["display:none;@media (min-width:", "px){background-color:", ";display:flex;height:", ";margin:0 ", ";width:1px;}"], _tsStyleguide.breakpoints.medium, _tsStyleguide.colours.functional.keyline, (0, _tsStyleguide.spacing)(3), (0, _tsStyleguide.spacing)(2));
|
|
59
|
+
exports.Separator = Separator;
|
|
60
|
+
|
|
61
|
+
const StandfirstContainer = _styledComponents.default.h2.withConfig({
|
|
62
|
+
displayName: "responsive__StandfirstContainer",
|
|
63
|
+
componentId: "iv7rgu-8"
|
|
64
|
+
})(["border:0px solid black;box-sizing:border-box;display:inline;font:14px system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Ubuntu,\"Helvetica Neue\",sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;", " @media (min-width:", "px){font-size:", "px;line-height:", "px;margin-bottom:", ";}@media (min-width:", "px){margin-bottom:", ";}"], props => props.styles && props.styles, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.infoTitle, (0, _tsStyleguide.lineHeight)({
|
|
65
|
+
font: "bodyRegular",
|
|
66
|
+
fontSize: "infoTitle"
|
|
67
|
+
}), (0, _tsStyleguide.spacing)(5), _tsStyleguide.breakpoints.wide, (0, _tsStyleguide.spacing)(4));
|
|
68
|
+
|
|
69
|
+
exports.StandfirstContainer = StandfirstContainer;
|
|
70
|
+
const LeadAsset = (0, _styledComponents.default)(_articleLeadAsset.default).withConfig({
|
|
71
|
+
displayName: "responsive__LeadAsset",
|
|
72
|
+
componentId: "iv7rgu-9"
|
|
73
|
+
})(["order:2;@media (min-width:", "px){margin-bottom:", ";}@media (min-width:", "px){width:56.2%;margin-left:auto;margin-right:auto;}"], _tsStyleguide.breakpoints.medium, (0, _tsStyleguide.spacing)(6), _tsStyleguide.breakpoints.wide);
|
|
74
|
+
exports.LeadAsset = LeadAsset;
|
package/dist/styles/shared.js
CHANGED
|
@@ -1 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
9
|
+
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
|
+
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
16
|
+
const sharedStyles = {
|
|
17
|
+
articleHeadline: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
18
|
+
font: "headline",
|
|
19
|
+
fontSize: "headline"
|
|
20
|
+
})), {}, {
|
|
21
|
+
color: _tsStyleguide.colours.functional.brandColour,
|
|
22
|
+
marginBottom: (0, _tsStyleguide.spacing)(2),
|
|
23
|
+
textAlign: "center"
|
|
24
|
+
}),
|
|
25
|
+
container: {
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
marginBottom: (0, _tsStyleguide.spacing)(5),
|
|
28
|
+
paddingLeft: (0, _tsStyleguide.spacing)(2),
|
|
29
|
+
paddingRight: (0, _tsStyleguide.spacing)(2),
|
|
30
|
+
paddingTop: (0, _tsStyleguide.spacing)(7)
|
|
31
|
+
},
|
|
32
|
+
datePublication: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
33
|
+
font: "supporting",
|
|
34
|
+
fontSize: "cardMeta"
|
|
35
|
+
})), {}, {
|
|
36
|
+
color: _tsStyleguide.colours.functional.secondary,
|
|
37
|
+
marginTop: (0, _tsStyleguide.spacing)(3)
|
|
38
|
+
}),
|
|
39
|
+
datePublicationTablet: {
|
|
40
|
+
marginTop: "auto"
|
|
41
|
+
},
|
|
42
|
+
label: {
|
|
43
|
+
marginBottom: (0, _tsStyleguide.spacing)(2)
|
|
44
|
+
},
|
|
45
|
+
leadAssetContainer: {
|
|
46
|
+
marginBottom: (0, _tsStyleguide.spacing)(4)
|
|
47
|
+
},
|
|
48
|
+
leadAssetContainerTablet: {
|
|
49
|
+
paddingLeft: (0, _tsStyleguide.spacing)(2),
|
|
50
|
+
paddingRight: (0, _tsStyleguide.spacing)(2)
|
|
51
|
+
},
|
|
52
|
+
meta: {
|
|
53
|
+
flexDirection: "row",
|
|
54
|
+
flexWrap: "wrap"
|
|
55
|
+
},
|
|
56
|
+
metaContainer: {
|
|
57
|
+
alignItems: "center"
|
|
58
|
+
},
|
|
59
|
+
metaContainerTablet: {
|
|
60
|
+
flexDirection: "row",
|
|
61
|
+
justifyContent: "center"
|
|
62
|
+
},
|
|
63
|
+
metaTablet: {
|
|
64
|
+
paddingTop: (0, _tsStyleguide.spacing)(1)
|
|
65
|
+
},
|
|
66
|
+
separator: {
|
|
67
|
+
borderRightColor: _tsStyleguide.colours.functional.keyline,
|
|
68
|
+
borderRightWidth: 1,
|
|
69
|
+
height: (0, _tsStyleguide.spacing)(3),
|
|
70
|
+
marginLeft: (0, _tsStyleguide.spacing)(2),
|
|
71
|
+
marginRight: (0, _tsStyleguide.spacing)(2)
|
|
72
|
+
},
|
|
73
|
+
standFirst: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
74
|
+
font: "headlineRegular",
|
|
75
|
+
fontSize: "smallestHeadline"
|
|
76
|
+
})), {}, {
|
|
77
|
+
color: _tsStyleguide.colours.functional.primary,
|
|
78
|
+
marginBottom: (0, _tsStyleguide.spacing)(3),
|
|
79
|
+
paddingLeft: (0, _tsStyleguide.spacing)(2),
|
|
80
|
+
paddingRight: (0, _tsStyleguide.spacing)(2),
|
|
81
|
+
textAlign: "center"
|
|
82
|
+
})
|
|
83
|
+
};
|
|
84
|
+
var _default = sharedStyles;
|
|
85
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/article-magazine-standard",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.54.1",
|
|
4
4
|
"description": "Magazine Standard Article Template",
|
|
5
5
|
"main": "dist/article-magazine-standard",
|
|
6
6
|
"dev": "src/article-magazine-standard",
|
|
@@ -9,7 +9,7 @@
|
|
|
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__/
|
|
12
|
+
"test:web": "jest --config='./__tests__/jest.config.js'",
|
|
13
13
|
"prepublishOnly": "yarn transpile && yarn bundle",
|
|
14
14
|
"watch": "watch 'yarn bundle' ./src --ignoreDotFiles --ignoreUnreadable",
|
|
15
15
|
"cleanup-dist": "rm -rf dist",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/core": "7.4.4",
|
|
35
35
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
36
|
-
"@times-components/jest-configurator": "
|
|
37
|
-
"@times-components/jest-serializer": "3.
|
|
38
|
-
"@times-components/provider": "1.
|
|
39
|
-
"@times-components/provider-test-tools": "1.
|
|
40
|
-
"@times-components/storybook": "4.
|
|
41
|
-
"@times-components/tealium-utils": "0.
|
|
42
|
-
"@times-components/test-utils": "2.
|
|
43
|
-
"@times-components/webpack-configurator": "2.0
|
|
36
|
+
"@times-components/jest-configurator-web": "0.8.0",
|
|
37
|
+
"@times-components/jest-serializer": "3.4.0",
|
|
38
|
+
"@times-components/provider": "1.33.0",
|
|
39
|
+
"@times-components/provider-test-tools": "1.27.0",
|
|
40
|
+
"@times-components/storybook": "4.5.0",
|
|
41
|
+
"@times-components/tealium-utils": "0.8.0",
|
|
42
|
+
"@times-components/test-utils": "2.4.0",
|
|
43
|
+
"@times-components/webpack-configurator": "2.1.0",
|
|
44
44
|
"babel-jest": "24.8.0",
|
|
45
45
|
"eslint": "5.9.0",
|
|
46
46
|
"jest": "24.8.0",
|
|
@@ -49,23 +49,22 @@
|
|
|
49
49
|
"react": "16.9.0",
|
|
50
50
|
"react-dom": "16.9.0",
|
|
51
51
|
"react-test-renderer": "16.9.0",
|
|
52
|
-
"webpack": "4.30.0"
|
|
53
|
-
"webpack-cli": "3.3.1"
|
|
52
|
+
"webpack": "4.30.0"
|
|
54
53
|
},
|
|
55
54
|
"dependencies": {
|
|
56
|
-
"@times-components/ad": "2.
|
|
57
|
-
"@times-components/article-byline": "3.
|
|
58
|
-
"@times-components/article-label": "2.
|
|
59
|
-
"@times-components/article-lead-asset": "1.
|
|
60
|
-
"@times-components/article-skeleton": "1.
|
|
61
|
-
"@times-components/caption": "3.
|
|
62
|
-
"@times-components/context": "1.
|
|
63
|
-
"@times-components/date-publication": "0.
|
|
64
|
-
"@times-components/ts-components": "1.
|
|
65
|
-
"@times-components/ts-styleguide": "1.
|
|
66
|
-
"@times-components/user-state": "0.
|
|
67
|
-
"@times-components/utils": "6.
|
|
68
|
-
"@times-components/video-label": "2.
|
|
55
|
+
"@times-components/ad": "2.21.0",
|
|
56
|
+
"@times-components/article-byline": "3.9.1",
|
|
57
|
+
"@times-components/article-label": "2.10.0",
|
|
58
|
+
"@times-components/article-lead-asset": "1.11.0",
|
|
59
|
+
"@times-components/article-skeleton": "1.86.1",
|
|
60
|
+
"@times-components/caption": "3.3.0",
|
|
61
|
+
"@times-components/context": "1.10.0",
|
|
62
|
+
"@times-components/date-publication": "0.24.0",
|
|
63
|
+
"@times-components/ts-components": "1.52.1",
|
|
64
|
+
"@times-components/ts-styleguide": "1.37.0",
|
|
65
|
+
"@times-components/user-state": "0.4.0",
|
|
66
|
+
"@times-components/utils": "6.15.0",
|
|
67
|
+
"@times-components/video-label": "2.7.0",
|
|
69
68
|
"prop-types": "15.7.2",
|
|
70
69
|
"styled-components": "4.3.2"
|
|
71
70
|
},
|
|
@@ -80,5 +79,5 @@
|
|
|
80
79
|
"publishConfig": {
|
|
81
80
|
"access": "public"
|
|
82
81
|
},
|
|
83
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "078d38afd0c7be38fa2d1196d5056b4d53d859f4"
|
|
84
83
|
}
|
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=11)}([function(e,t){e.exports=require("@babel/runtime/helpers/interopRequireDefault")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(3));function a(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}var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r(n(27)).default);t.default=o},function(e,t){e.exports=require("@times-components/context/rnw")},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.LeadAsset=t.StandfirstContainer=t.Separator=t.MetaContainer=t.Meta=t.LabelContainer=t.HeadlineContainer=t.HeaderContainer=t.FlagsContainer=t.DatePublicationContainer=void 0;var i=n(1),a=r(n(9)),o=n(2),l=r(n(10)),s=(0,a.default)(i.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"iv7rgu-0"})(["",";flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],(function(e){return e.styles&&e.styles}),(0,o.spacing)(3),o.breakpoints.medium);t.DatePublicationContainer=s;var d=(0,a.default)(i.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"iv7rgu-1"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],(0,o.spacing)(1),(0,o.spacing)(3),o.breakpoints.medium);t.FlagsContainer=d;var u=(0,a.default)(i.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"iv7rgu-2"})(["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%;}"],o.breakpoints.medium,(0,o.spacing)(6),o.breakpoints.wide);t.HeaderContainer=u;var c=a.default.h1.withConfig({displayName:"responsive__HeadlineContainer",componentId:"iv7rgu-3"})(['border:0px solid black;box-sizing:border-box;display:inline;font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;'," @media (min-width:","px){font-size:","px;line-height:50px;margin-bottom:",";}"],(function(e){return e.styles&&e.styles}),o.breakpoints.medium,o.fontSizes.articleHeadline,(0,o.spacing)(1));t.HeadlineContainer=c;var p=(0,a.default)(i.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"iv7rgu-4"})(["@media (min-width:","px){margin-top:0px;}"],o.breakpoints.wide);t.LabelContainer=p;var f=(0,a.default)(i.TcView).withConfig({displayName:"responsive__Meta",componentId:"iv7rgu-5"})(["max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],o.breakpoints.medium);t.Meta=f;var m=(0,a.default)(i.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"iv7rgu-6"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],o.breakpoints.medium);t.MetaContainer=m;var g=(0,a.default)(i.TcView).withConfig({displayName:"responsive__Separator",componentId:"iv7rgu-7"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],o.breakpoints.medium,o.colours.functional.keyline,(0,o.spacing)(3),(0,o.spacing)(2));t.Separator=g;var b=a.default.h2.withConfig({displayName:"responsive__StandfirstContainer",componentId:"iv7rgu-8"})(['border:0px solid black;box-sizing:border-box;display:inline;font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;'," @media (min-width:","px){font-size:","px;line-height:","px;margin-bottom:",";}@media (min-width:","px){margin-bottom:",";}"],(function(e){return e.styles&&e.styles}),o.breakpoints.medium,o.fontSizes.infoTitle,(0,o.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),(0,o.spacing)(5),o.breakpoints.wide,(0,o.spacing)(4));t.StandfirstContainer=b;var y=(0,a.default)(l.default).withConfig({displayName:"responsive__LeadAsset",componentId:"iv7rgu-9"})(["order:2;@media (min-width:","px){margin-bottom:",";}@media (min-width:","px){width:56.2%;margin-left:auto;margin-right:auto;}"],o.breakpoints.medium,(0,o.spacing)(6),o.breakpoints.wide);t.LeadAsset=y},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/article-lead-asset/rnw")},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(12)),a=r(n(13)),o=r(n(14)),l=r(n(15)),s=r(n(16)),d=r(n(17)),u=r(n(18)),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(5)),p=r(n(19)),f=n(1),m=n(20),g=r(n(21)),b=n(34),y=r(n(36)),v=n(38);function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,d.default)(this,n)}}var O=function(e){(0,s.default)(n,e);var t=w(n);function n(e){var r;return(0,a.default)(this,n),(r=t.call(this,e)).renderHeader=r.renderHeader.bind((0,l.default)(r)),r}return(0,o.default)(n,[{key:"renderHeader",value:function(){var e=this.props.article,t=e.bylines,n=e.expirableFlags,r=e.hasVideo,a=e.headline,o=e.label,l=e.publicationName,s=e.publishedTime,d=e.shortHeadline,u=e.standfirst,p=e.updatedTime;return c.default.createElement(c.Fragment,null,c.default.createElement(g.default,{bylines:t,flags:n,hasVideo:r,headline:(0,f.getHeadline)(a,d),label:o,publicationName:l,publishedTime:s,standfirst:u,updatedTime:p}),c.default.createElement(v.LeadAsset,(0,i.default)({},(0,f.getLeadAsset)(e),{getImageCrop:f.getStandardTemplateCrop,renderCaption:function(e){var t=e.caption;return c.default.createElement(m.CentredCaption,t)},style:y.default.leadAssetContainer})))}},{key:"render",value:function(){var e=this.props,t=e.article,n=e.analyticsStream,r=e.error,i=e.isLoading,a=e.logoUrl,o=e.navigationMode,l=e.receiveChildList,s=e.commentingConfig,d=e.paidContentClassName,u=e.isPreview,f=e.swgProductId,m=e.additionalRelatedArticlesFlag,g=e.algoliaSearchKeys,b=e.latestFromSectionFlag,y=e.latestFromSection,v=e.olympicsKeys;return r||i?null:c.default.createElement(p.default,{analyticsStream:n,data:t,Header:this.renderHeader,logoUrl:a,receiveChildList:l,navigationMode:o,commentingConfig:s,paidContentClassName:d,isPreview:u,swgProductId:f,additionalRelatedArticlesFlag:m,algoliaSearchKeys:g,latestFromSectionFlag:b,latestFromSection:y,olympicsKeys:v})}}]),n}(c.Component);O.defaultProps=b.articleDefaultProps;var P=O;t.default=P},function(e,t){e.exports=require("@babel/runtime/helpers/extends")},function(e,t){e.exports=require("@babel/runtime/helpers/classCallCheck")},function(e,t){e.exports=require("@babel/runtime/helpers/createClass")},function(e,t){e.exports=require("@babel/runtime/helpers/assertThisInitialized")},function(e,t){e.exports=require("@babel/runtime/helpers/inherits")},function(e,t){e.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("@babel/runtime/helpers/getPrototypeOf")},function(e,t){e.exports=require("@times-components/article-skeleton/rnw")},function(e,t){e.exports=require("@times-components/caption/rnw")},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(3)),a=r(n(5)),o=r(n(7)),l=n(1),s=n(22),d=n(2),u=r(n(23)),c=r(n(28)),p=r(n(32)),f=n(33),m=r(n(6)),g=n(8);function b(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?b(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e,t){return(0,l.checkStylesForUnits)(y(y({},m.default.articleHeadline),{},{fontFamily:e?d.fonts[e]:null,textTransform:t||null}))},h=function(e){var t=e.bylines,n=e.flags,r=e.hasVideo,i=e.headline,l=e.label,d=e.publicationName,f=e.publishedTime,b=e.standfirst,y=e.updatedTime;return a.default.createElement(o.default.Consumer,null,(function(e){var o=e.theme,h=o.headlineFont,w=o.headlineCase;return a.default.createElement(g.HeaderContainer,{style:m.default.container},a.default.createElement(u.default,{isVideo:r,label:l}),a.default.createElement(g.HeadlineContainer,{role:"heading","aria-level":"1",styles:v(h,w)},i),a.default.createElement(g.FlagsContainer,null,a.default.createElement(s.UpdatedTimeProvider,{updatedTime:y},a.default.createElement(s.ArticleFlags,{flags:n}))),a.default.createElement(p.default,{standfirst:b}),a.default.createElement(c.default,{bylines:t,publicationName:d,publishedTime:f}))}))};h.defaultProps=f.articleHeaderDefaultProps;var w=h;t.default=w},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(5)),a=n(1),o=r(n(24)),l=r(n(25)),s=r(n(7)),d=n(2),u=n(26),c=r(n(6)),p=function(e){var t=e.isVideo,n=e.label;if(!t&&!n)return null;var r=t?l.default:o.default;return i.default.createElement(s.default.Consumer,null,(function(e){var t=e.theme.sectionColour;return i.default.createElement(a.TcView,{style:c.default.label},i.default.createElement(r,{color:t||d.colours.section.default,title:n}))}))};p.defaultProps=u.articleLabelDefaultProps;var f=p;t.default=f},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,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.articleLabelDefaultProps=t.articleLabelPropTypes=void 0;var i=r(n(4)),a={isVideo:i.default.bool,label:i.default.string};t.articleLabelPropTypes=a;t.articleLabelDefaultProps={isVideo:!1,label:null}},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(3)),a=n(2);function o(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={articleHeadline:l(l({},(0,a.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:a.colours.functional.brandColour,marginBottom:(0,a.spacing)(2),textAlign:"center"}),container:{alignItems:"center",marginBottom:(0,a.spacing)(5),paddingLeft:(0,a.spacing)(2),paddingRight:(0,a.spacing)(2),paddingTop:(0,a.spacing)(7)},datePublication:l(l({},(0,a.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:a.colours.functional.secondary,marginTop:(0,a.spacing)(3)}),datePublicationTablet:{marginTop:"auto"},label:{marginBottom:(0,a.spacing)(2)},leadAssetContainer:{marginBottom:(0,a.spacing)(4)},leadAssetContainerTablet:{paddingLeft:(0,a.spacing)(2),paddingRight:(0,a.spacing)(2)},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center"},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},metaTablet:{paddingTop:(0,a.spacing)(1)},separator:{borderRightColor:a.colours.functional.keyline,borderRightWidth:1,height:(0,a.spacing)(3),marginLeft:(0,a.spacing)(2),marginRight:(0,a.spacing)(2)},standFirst:l(l({},(0,a.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:a.colours.functional.primary,marginBottom:(0,a.spacing)(3),paddingLeft:(0,a.spacing)(2),paddingRight:(0,a.spacing)(2),textAlign:"center"})};t.default=s},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(5)),a=n(29),o=r(n(7)),l=n(1),s=r(n(30)),d=n(2),u=(r(n(31)),n(8)),c=r(n(6));function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}var f=function(e){var t=e.bylines,n=e.publicationName,r=e.publishedTime;return i.default.createElement(u.MetaContainer,null,(0,a.hasBylineData)(t)&&i.default.createElement(i.Fragment,null,i.default.createElement(u.Meta,{style:c.default.meta},i.default.createElement(o.default.Consumer,null,(function(e){var n=e.theme.sectionColour;return i.default.createElement(a.ArticleBylineWithLinks,{ast:t,color:n||d.colours.section.default})}))),i.default.createElement(u.Separator,null)),i.default.createElement(u.Meta,{style:c.default.meta},i.default.createElement(u.DatePublicationContainer,{styles:(0,l.checkStylesForUnits)(c.default.datePublication)},i.default.createElement(s.default,{date:r,publication:n}))))};t.default=f},function(e,t){e.exports=require("@times-components/article-byline/rnw")},function(e,t){e.exports=require("@times-components/date-publication/rnw")},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(4)),a={bylines:i.default.arrayOf(i.default.shape({})).isRequired,publicationName:i.default.string.isRequired,publishedTime:i.default.string.isRequired};t.default=a},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(5)),a=(r(n(4)),n(1)),o=r(n(6)),l=n(8),s=function(e){var t=e.standfirst;return t?i.default.createElement(l.StandfirstContainer,{role:"heading","aria-level":"2",styles:(0,a.checkStylesForUnits)(o.default.standFirst),testID:"standfirst"},t):null};s.defaultProps={standfirst:null};var d=s;t.default=d},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.articleHeaderDefaultProps=t.articleHeaderPropTypes=void 0;var i=r(n(4)),a={bylines:i.default.arrayOf(i.default.shape({})).isRequired,flags:i.default.arrayOf(i.default.shape({expiryTime:i.default.string,type:i.default.string})),hasVideo:i.default.bool,headline:i.default.string.isRequired,label:i.default.string,longRead:i.default.bool,publicationName:i.default.string.isRequired,publishedTime:i.default.string.isRequired,standfirst:i.default.string,updatedTime:i.default.string};t.articleHeaderPropTypes=a;t.articleHeaderDefaultProps={flags:[],hasVideo:!1,label:null,longRead:!1,standfirst:null,updatedTime:null}},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.articleDefaultProps=t.articlePropTypes=void 0;var i=r(n(3)),a=r(n(4)),o=n(35);function l(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=s(s({},o.articlePagePropTypes),{},{navigationMode:a.default.shape({}).isRequired});t.articlePropTypes=d;var u=s({},o.articlePageDefaultProps);t.articleDefaultProps=u},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.articlePageDefaultProps=t.articlePagePropTypes=void 0;var i=r(n(4)),a={analyticsStream:i.default.func.isRequired,article:i.default.shape({}),error:i.default.shape({graphQLErrors:i.default.array,message:i.default.string,networkError:i.default.shape({message:i.default.string})}),isLoading:i.default.bool,onImagePress:i.default.func,receiveChildList:i.default.func.isRequired};t.articlePagePropTypes=a;t.articlePageDefaultProps={article:null,error:null,isLoading:!1,onImagePress:null}},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(3));function a(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}var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r(n(37)).default);t.default=o},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(3)),a=n(2);function o(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={articleHeadline:l(l({},(0,a.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:a.colours.functional.brandColour,marginBottom:(0,a.spacing)(2),textAlign:"center"}),container:{alignItems:"center",marginBottom:(0,a.spacing)(5),paddingLeft:(0,a.spacing)(2),paddingRight:(0,a.spacing)(2),paddingTop:(0,a.spacing)(7)},datePublication:l(l({},(0,a.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:a.colours.functional.secondary,marginTop:(0,a.spacing)(3)}),datePublicationTablet:{marginTop:"auto"},label:{marginBottom:(0,a.spacing)(2)},leadAssetContainer:{marginBottom:(0,a.spacing)(4)},leadAssetContainerTablet:{paddingLeft:(0,a.spacing)(2),paddingRight:(0,a.spacing)(2)},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center"},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},metaTablet:{paddingTop:(0,a.spacing)(1)},separator:{borderRightColor:a.colours.functional.keyline,borderRightWidth:1,height:(0,a.spacing)(3),marginHorizontal:(0,a.spacing)(2)},standFirst:l(l({},(0,a.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:a.colours.functional.primary,marginBottom:(0,a.spacing)(3),paddingHorizontal:(0,a.spacing)(2),textAlign:"center"})};t.default=s},function(e,t,n){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.LeadAsset=t.StandfirstContainer=t.Separator=t.MetaContainer=t.Meta=t.LabelContainer=t.HeadlineContainer=t.HeaderContainer=t.FlagsContainer=t.DatePublicationContainer=void 0;var i=n(1),a=r(n(9)),o=n(2),l=r(n(10)),s=(0,a.default)(i.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"bpd0t9-0"})(["flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],(0,o.spacing)(3),o.breakpoints.medium);t.DatePublicationContainer=s;var d=(0,a.default)(i.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"bpd0t9-1"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],(0,o.spacing)(1),(0,o.spacing)(3),o.breakpoints.medium);t.FlagsContainer=d;var u=(0,a.default)(i.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"bpd0t9-2"})(["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%;}"],o.breakpoints.medium,(0,o.spacing)(6),o.breakpoints.wide);t.HeaderContainer=u;var c=(0,a.default)(i.TcText).withConfig({displayName:"responsive__HeadlineContainer",componentId:"bpd0t9-3"})(["@media (min-width:","px){font-size:","px;line-height:50px;margin-bottom:",";}"],o.breakpoints.medium,o.fontSizes.articleHeadline,(0,o.spacing)(1));t.HeadlineContainer=c;var p=(0,a.default)(i.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"bpd0t9-4"})(["@media (min-width:","px){margin-top:0px;}"],o.breakpoints.wide);t.LabelContainer=p;var f=(0,a.default)(i.TcView).withConfig({displayName:"responsive__Meta",componentId:"bpd0t9-5"})(["max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],o.breakpoints.medium);t.Meta=f;var m=(0,a.default)(i.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"bpd0t9-6"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],o.breakpoints.medium);t.MetaContainer=m;var g=(0,a.default)(i.TcView).withConfig({displayName:"responsive__Separator",componentId:"bpd0t9-7"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],o.breakpoints.medium,o.colours.functional.keyline,(0,o.spacing)(3),(0,o.spacing)(2));t.Separator=g;var b=(0,a.default)(i.TcText).withConfig({displayName:"responsive__StandfirstContainer",componentId:"bpd0t9-8"})(["@media (min-width:","px){font-size:","px;line-height:","px;margin-bottom:",";}@media (min-width:","px){margin-bottom:",";}"],o.breakpoints.medium,o.fontSizes.infoTitle,(0,o.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),(0,o.spacing)(5),o.breakpoints.wide,(0,o.spacing)(4));t.StandfirstContainer=b;var y=(0,a.default)(l.default).withConfig({displayName:"responsive__LeadAsset",componentId:"bpd0t9-9"})(["order:2;@media (min-width:","px){margin-bottom:",";}@media (min-width:","px){width:56.2%;margin-left:auto;margin-right:auto;}"],o.breakpoints.medium,(0,o.spacing)(6),o.breakpoints.wide);t.LeadAsset=y}]);
|
|
1
|
+
module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},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=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/context/rnw")},function(e,t){e.exports=require("@times-components/article-lead-asset/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/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,n){"use strict";n.r(t);var i=n(2),r=n.n(i),a=n(9),o=n.n(a),c=n(3),s=n(10),l=n(5),p=n.n(l),d=n(7),m=n(0),u=n(11),b=n.n(u),g=n(12),f=n.n(g),O=n(1),y=n.n(O);y.a.bool,y.a.string;function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}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}var P=function(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){v(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}({},{articleHeadline:w(w({},Object(m.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:m.colours.functional.brandColour,marginBottom:Object(m.spacing)(2),textAlign:"center"}),container:{alignItems:"center",marginBottom:Object(m.spacing)(5),paddingLeft:Object(m.spacing)(2),paddingRight:Object(m.spacing)(2),paddingTop:Object(m.spacing)(7)},datePublication:w(w({},Object(m.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:m.colours.functional.secondary,marginTop:Object(m.spacing)(3)}),datePublicationTablet:{marginTop:"auto"},label:{marginBottom:Object(m.spacing)(2)},leadAssetContainer:{marginBottom:Object(m.spacing)(4)},leadAssetContainerTablet:{paddingLeft:Object(m.spacing)(2),paddingRight:Object(m.spacing)(2)},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center"},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},metaTablet:{paddingTop:Object(m.spacing)(1)},separator:{borderRightColor:m.colours.functional.keyline,borderRightWidth:1,height:Object(m.spacing)(3),marginLeft:Object(m.spacing)(2),marginRight:Object(m.spacing)(2)},standFirst:w(w({},Object(m.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:m.colours.functional.primary,marginBottom:Object(m.spacing)(3),paddingLeft:Object(m.spacing)(2),paddingRight:Object(m.spacing)(2),textAlign:"center"})});const C=e=>{let t=e.isVideo,n=e.label;if(!t&&!n)return null;const i=t?f.a:b.a;return r.a.createElement(p.a.Consumer,null,e=>{let t=e.theme.sectionColour;return r.a.createElement(c.TcView,{style:P.label},r.a.createElement(i,{color:t||m.colours.section.default,title:n}))})};C.defaultProps={isVideo:!1,label:null};var T=C,k=n(8),S=n(13),_=n.n(S);y.a.arrayOf(y.a.shape({})).isRequired,y.a.string.isRequired,y.a.string.isRequired;var E=n(4),D=n.n(E),I=n(6),F=n.n(I);const N=D()(c.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"iv7rgu-0"})(["",";flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],e=>e.styles&&e.styles,Object(m.spacing)(3),m.breakpoints.medium),R=D()(c.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"iv7rgu-1"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],Object(m.spacing)(1),Object(m.spacing)(3),m.breakpoints.medium),q=D()(c.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"iv7rgu-2"})(["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%;}"],m.breakpoints.medium,Object(m.spacing)(6),m.breakpoints.wide),H=D.a.h1.withConfig({displayName:"responsive__HeadlineContainer",componentId:"iv7rgu-3"})(['border:0px solid black;box-sizing:border-box;display:inline;font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;'," @media (min-width:","px){font-size:","px;line-height:50px;margin-bottom:",";}"],e=>e.styles&&e.styles,m.breakpoints.medium,m.fontSizes.articleHeadline,Object(m.spacing)(1)),z=(D()(c.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"iv7rgu-4"})(["@media (min-width:","px){margin-top:0px;}"],m.breakpoints.wide),D()(c.TcView).withConfig({displayName:"responsive__Meta",componentId:"iv7rgu-5"})(["max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],m.breakpoints.medium)),V=D()(c.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"iv7rgu-6"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],m.breakpoints.medium),L=D()(c.TcView).withConfig({displayName:"responsive__Separator",componentId:"iv7rgu-7"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],m.breakpoints.medium,m.colours.functional.keyline,Object(m.spacing)(3),Object(m.spacing)(2)),A=D.a.h2.withConfig({displayName:"responsive__StandfirstContainer",componentId:"iv7rgu-8"})(['border:0px solid black;box-sizing:border-box;display:inline;font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;'," @media (min-width:","px){font-size:","px;line-height:","px;margin-bottom:",";}@media (min-width:","px){margin-bottom:",";}"],e=>e.styles&&e.styles,m.breakpoints.medium,m.fontSizes.infoTitle,Object(m.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),Object(m.spacing)(5),m.breakpoints.wide,Object(m.spacing)(4));D()(F.a).withConfig({displayName:"responsive__LeadAsset",componentId:"iv7rgu-9"})(["order:2;@media (min-width:","px){margin-bottom:",";}@media (min-width:","px){width:56.2%;margin-left:auto;margin-right:auto;}"],m.breakpoints.medium,Object(m.spacing)(6),m.breakpoints.wide);var M=e=>{let t=e.bylines,n=e.publicationName,a=e.publishedTime;return r.a.createElement(V,null,Object(k.hasBylineData)(t)&&r.a.createElement(i.Fragment,null,r.a.createElement(z,{style:P.meta},r.a.createElement(p.a.Consumer,null,e=>{let n=e.theme.sectionColour;return r.a.createElement(k.ArticleBylineWithLinks,{ast:t,color:n||m.colours.section.default})})),r.a.createElement(L,null)),r.a.createElement(z,{style:P.meta},r.a.createElement(N,{styles:Object(c.checkStylesForUnits)(P.datePublication)},r.a.createElement(_.a,{date:a,publication:n}))))};const B=e=>{let t=e.standfirst;return t?r.a.createElement(A,{role:"heading","aria-level":"2",styles:Object(c.checkStylesForUnits)(P.standFirst),testID:"standfirst"},t):null};B.defaultProps={standfirst:null};var U=B;y.a.arrayOf(y.a.shape({})).isRequired,y.a.arrayOf(y.a.shape({expiryTime:y.a.string,type:y.a.string})),y.a.bool,y.a.string.isRequired,y.a.string,y.a.bool,y.a.string.isRequired,y.a.string.isRequired,y.a.string,y.a.string;function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function K(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){Q(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 Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const G=(e,t)=>Object(c.checkStylesForUnits)(K(K({},P.articleHeadline),{},{fontFamily:e?m.fonts[e]:null,textTransform:t||null})),J=e=>{let t=e.bylines,n=e.flags,i=e.hasVideo,a=e.headline,o=e.label,c=e.publicationName,s=e.publishedTime,l=e.standfirst,m=e.updatedTime;return r.a.createElement(p.a.Consumer,null,e=>{let p=e.theme,u=p.headlineFont,b=p.headlineCase;return r.a.createElement(q,{style:P.container},r.a.createElement(T,{isVideo:i,label:o}),r.a.createElement(H,{role:"heading","aria-level":"1",styles:G(u,b)},a),r.a.createElement(R,null,r.a.createElement(d.UpdatedTimeProvider,{updatedTime:m},r.a.createElement(d.ArticleFlags,{flags:n}))),r.a.createElement(U,{standfirst:l}),r.a.createElement(M,{bylines:t,publicationName:c,publishedTime:s}))})};J.defaultProps={flags:[],hasVideo:!1,label:null,longRead:!1,standfirst:null,updatedTime:null};var X=J;function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Z(Z({},{analyticsStream:y.a.func.isRequired,article:y.a.shape({}),error:y.a.shape({graphQLErrors:y.a.array,message:y.a.string,networkError:y.a.shape({message:y.a.string})}),isLoading:y.a.bool,onImagePress:y.a.func,receiveChildList:y.a.func.isRequired}),{},{navigationMode:y.a.shape({}).isRequired});const ee=Z({},{article:null,error:null,isLoading:!1,onImagePress:null});function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}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){ie(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 ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{articleHeadline:ne(ne({},Object(m.fontFactory)({font:"headline",fontSize:"headline"})),{},{color:m.colours.functional.brandColour,marginBottom:Object(m.spacing)(2),textAlign:"center"}),container:{alignItems:"center",marginBottom:Object(m.spacing)(5),paddingLeft:Object(m.spacing)(2),paddingRight:Object(m.spacing)(2),paddingTop:Object(m.spacing)(7)},datePublication:ne(ne({},Object(m.fontFactory)({font:"supporting",fontSize:"cardMeta"})),{},{color:m.colours.functional.secondary,marginTop:Object(m.spacing)(3)}),datePublicationTablet:{marginTop:"auto"},label:{marginBottom:Object(m.spacing)(2)},leadAssetContainer:{marginBottom:Object(m.spacing)(4)},leadAssetContainerTablet:{paddingLeft:Object(m.spacing)(2),paddingRight:Object(m.spacing)(2)},meta:{flexDirection:"row",flexWrap:"wrap"},metaContainer:{alignItems:"center"},metaContainerTablet:{flexDirection:"row",justifyContent:"center"},metaTablet:{paddingTop:Object(m.spacing)(1)},separator:{borderRightColor:m.colours.functional.keyline,borderRightWidth:1,height:Object(m.spacing)(3),marginHorizontal:Object(m.spacing)(2)},standFirst:ne(ne({},Object(m.fontFactory)({font:"headlineRegular",fontSize:"smallestHeadline"})),{},{color:m.colours.functional.primary,marginBottom:Object(m.spacing)(3),paddingHorizontal:Object(m.spacing)(2),textAlign:"center"})});D()(c.TcText).withConfig({displayName:"responsive__DatePublicationContainer",componentId:"bpd0t9-0"})(["flex-direction:row;flex-wrap:wrap;margin-top:",";@media (min-width:","px){margin-top:0;}"],Object(m.spacing)(3),m.breakpoints.medium),D()(c.TcView).withConfig({displayName:"responsive__FlagsContainer",componentId:"bpd0t9-1"})(["padding-top:",";padding-bottom:",";@media (min-width:","px){padding-top:0;}"],Object(m.spacing)(1),Object(m.spacing)(3),m.breakpoints.medium),D()(c.TcView).withConfig({displayName:"responsive__HeaderContainer",componentId:"bpd0t9-2"})(["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%;}"],m.breakpoints.medium,Object(m.spacing)(6),m.breakpoints.wide),D()(c.TcText).withConfig({displayName:"responsive__HeadlineContainer",componentId:"bpd0t9-3"})(["@media (min-width:","px){font-size:","px;line-height:50px;margin-bottom:",";}"],m.breakpoints.medium,m.fontSizes.articleHeadline,Object(m.spacing)(1)),D()(c.TcView).withConfig({displayName:"responsive__LabelContainer",componentId:"bpd0t9-4"})(["@media (min-width:","px){margin-top:0px;}"],m.breakpoints.wide),D()(c.TcView).withConfig({displayName:"responsive__Meta",componentId:"bpd0t9-5"})(["max-width:100%;justify-content:center;@media (min-width:","px){margin-top:0;}"],m.breakpoints.medium),D()(c.TcView).withConfig({displayName:"responsive__MetaContainer",componentId:"bpd0t9-6"})(["align-items:center;justify-content:center;@media (min-width:","px){flex-direction:row;flex-wrap:wrap;}"],m.breakpoints.medium),D()(c.TcView).withConfig({displayName:"responsive__Separator",componentId:"bpd0t9-7"})(["display:none;@media (min-width:","px){background-color:",";display:flex;height:",";margin:0 ",";width:1px;}"],m.breakpoints.medium,m.colours.functional.keyline,Object(m.spacing)(3),Object(m.spacing)(2)),D()(c.TcText).withConfig({displayName:"responsive__StandfirstContainer",componentId:"bpd0t9-8"})(["@media (min-width:","px){font-size:","px;line-height:","px;margin-bottom:",";}@media (min-width:","px){margin-bottom:",";}"],m.breakpoints.medium,m.fontSizes.infoTitle,Object(m.lineHeight)({font:"bodyRegular",fontSize:"infoTitle"}),Object(m.spacing)(5),m.breakpoints.wide,Object(m.spacing)(4));const ce=D()(F.a).withConfig({displayName:"responsive__LeadAsset",componentId:"bpd0t9-9"})(["order:2;@media (min-width:","px){margin-bottom:",";}@media (min-width:","px){width:56.2%;margin-left:auto;margin-right:auto;}"],m.breakpoints.medium,Object(m.spacing)(6),m.breakpoints.wide);function se(){return(se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}class le extends i.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,m=e.shortHeadline,u=e.standfirst,b=e.updatedTime;return r.a.createElement(i.Fragment,null,r.a.createElement(X,{bylines:t,flags:n,hasVideo:a,headline:Object(c.getHeadline)(o,m),label:l,publicationName:p,publishedTime:d,standfirst:u,updatedTime:b}),r.a.createElement(ce,se({},Object(c.getLeadAsset)(e),{getImageCrop:c.getStandardTemplateCrop,renderCaption:e=>{let t=e.caption;return r.a.createElement(s.CentredCaption,t)},style:oe.leadAssetContainer})))}render(){const e=this.props,t=e.article,n=e.analyticsStream,i=e.error,a=e.isLoading,c=e.logoUrl,s=e.navigationMode,l=e.receiveChildList,p=e.commentingConfig,d=e.paidContentClassName,m=e.isPreview,u=e.swgProductId,b=e.additionalRelatedArticlesFlag,g=e.algoliaSearchKeys,f=e.latestFromSectionFlag,O=e.latestFromSection,y=e.olympicsKeys;return i||a?null:r.a.createElement(o.a,{analyticsStream:n,data:t,Header:this.renderHeader,logoUrl:c,receiveChildList:l,navigationMode:s,commentingConfig:p,paidContentClassName:d,isPreview:m,swgProductId:u,additionalRelatedArticlesFlag:b,algoliaSearchKeys:g,latestFromSectionFlag:f,latestFromSection:O,olympicsKeys:y})}}le.defaultProps=ee;t.default=le}]);
|