@times-components/article-skeleton 1.85.42 → 1.86.2
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-body/article-body-paragraph.js +101 -1
- package/dist/article-body/article-body.js +657 -1
- package/dist/article-body/article-link-tracking-events.js +28 -1
- package/dist/article-body/article-link.js +51 -1
- package/dist/article-body/drop-cap.js +70 -1
- package/dist/article-body/inline-paragraph.js +142 -1
- package/dist/article-body/inset-caption.js +44 -1
- package/dist/article-body/simple-paragraph.js +99 -1
- package/dist/article-skeleton-prop-types.js +38 -1
- package/dist/article-skeleton.js +265 -1
- package/dist/article-topics/index.js +43 -1
- package/dist/body-utils.js +81 -1
- package/dist/contentModifiers/dropcap-util-common.js +117 -1
- package/dist/contentModifiers/dropcap-util.js +28 -1
- package/dist/contentModifiers/inline-ad.js +46 -1
- package/dist/contentModifiers/inline-related-article.js +71 -1
- package/dist/contentModifiers/native-ad.js +56 -1
- package/dist/contentModifiers/newsletter-puff.js +143 -1
- package/dist/data-helper.js +106 -1
- package/dist/gutter.js +43 -1
- package/dist/head.js +472 -1
- package/dist/keylines.js +24 -1
- package/dist/paywall-portal.js +47 -1
- package/dist/sticky-save-and-share-bar.js +60 -1
- package/dist/styles/article-body/article-link.js +18 -1
- package/dist/styles/article-body/index.js +41 -1
- package/dist/styles/article-body/responsive.js +143 -1
- package/dist/styles/article-body/shared.js +124 -1
- package/dist/styles/article-topics/index.js +21 -1
- package/dist/styles/article-topics/responsive.js +21 -1
- package/dist/styles/article-topics/shared.js +24 -1
- package/dist/styles/responsive.js +45 -1
- package/dist/styles/shared.js +20 -1
- package/dist/tracking/article-tracking-context.js +71 -1
- package/dist/tracking/article-tracking-last-paragraph.js +33 -1
- package/package.json +36 -44
- package/rnw.js +1 -1
- package/tsconfig.jest.json +11 -0
|
@@ -1 +1,41 @@
|
|
|
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
|
+
var _shared = _interopRequireDefault(require("./shared"));
|
|
11
|
+
|
|
12
|
+
var _shared2 = _interopRequireDefault(require("../shared"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
const sharedStyles = (0, _shared.default)();
|
|
23
|
+
|
|
24
|
+
const webStyles = _objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
25
|
+
ad: _objectSpread(_objectSpread({}, sharedStyles.ad), {}, {
|
|
26
|
+
marginBottom: (0, _tsStyleguide.spacing)(6),
|
|
27
|
+
marginTop: (0, _tsStyleguide.spacing)(6),
|
|
28
|
+
width: "100%"
|
|
29
|
+
}),
|
|
30
|
+
articleTextElement: _objectSpread(_objectSpread({}, sharedStyles.articleTextElement), {}, {
|
|
31
|
+
marginTop: 0
|
|
32
|
+
}),
|
|
33
|
+
adMarginStyle: {
|
|
34
|
+
marginBottom: 0
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const styles = _objectSpread(_objectSpread({}, _shared2.default), webStyles);
|
|
39
|
+
|
|
40
|
+
var _default = styles;
|
|
41
|
+
exports.default = _default;
|
|
@@ -1 +1,143 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.InlineAdTitle=exports.InlineAdWrapper=exports.Ad=exports.NativeAdTitle=exports.NativeAd=exports.Heading6=exports.Heading5=exports.Heading4=exports.Heading3=exports.Heading2=exports.PullQuoteContainer=exports.PullQuoteResp=exports.InlineImg=exports.SecondaryImg=exports.FullWidthImg=exports.PrimaryImg=exports.InteractiveContainer=exports.Paragraph=exports.ParagraphContainer=void 0;var _utils=require("@times-components/utils");var _styledComponents=_interopRequireWildcard(require("styled-components"));var _tsStyleguide=require("@times-components/ts-styleguide");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);}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;}var ParagraphContainer=_styledComponents.default.div.withConfig({displayName:"responsive__ParagraphContainer",componentId:"sc-4v1r4q-0"})(["padding-left:",";padding-right:",";@media (min-width:","px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:","px){width:56.2%;}"],(0,_tsStyleguide.spacing)(2),(0,_tsStyleguide.spacing)(2),_tsStyleguide.breakpoints.medium,_tsStyleguide.breakpoints.wide);exports.ParagraphContainer=ParagraphContainer;var Paragraph=_styledComponents.default.p.withConfig({displayName:"responsive__Paragraph",componentId:"sc-4v1r4q-1"})(["color:",";font-family:\"","\";line-height:26px;font-size:","px;margin-bottom:",";margin-top:0;display:block;@media (min-width:","px){font-size:","px;line-height:30px;}"],_tsStyleguide.colours.functional.primary,_tsStyleguide.fonts.bodyRegular,_tsStyleguide.fontSizes.bodyMobile,(0,_tsStyleguide.spacing)(5),_tsStyleguide.breakpoints.medium,_tsStyleguide.fontSizes.body);exports.Paragraph=Paragraph;var InteractiveContainer=_styledComponents.default.div.withConfig({displayName:"responsive__InteractiveContainer",componentId:"sc-4v1r4q-2"})(["margin-bottom:",";",";"],(0,_tsStyleguide.spacing)(4),function(props){return props.fullWidth?(0,_styledComponents.css)(["width:100%;"]):(0,_styledComponents.css)(["padding:0 ",";@media (min-width:","px){width:80.8%;margin-left:auto;margin-right:auto;padding:0;}@media (min-width:","px){width:56.2%;}"],(0,_tsStyleguide.spacing)(2),_tsStyleguide.breakpoints.medium,_tsStyleguide.breakpoints.wide);});exports.InteractiveContainer=InteractiveContainer;var PrimaryImg=(0,_styledComponents.default)(_utils.TcView).withConfig({displayName:"responsive__PrimaryImg",componentId:"sc-4v1r4q-3"})(["width:100%;flex-direction:column;padding-bottom:",";@media (min-width:","px){width:80.8%;margin:0 auto;}@media (min-width:","px){width:56.2%;}"],(0,_tsStyleguide.spacing)(5),_tsStyleguide.breakpoints.medium,_tsStyleguide.breakpoints.wide);exports.PrimaryImg=PrimaryImg;var FullWidthImg=(0,_styledComponents.default)(_utils.TcView).withConfig({displayName:"responsive__FullWidthImg",componentId:"sc-4v1r4q-4"})(["padding-bottom:",";"],(0,_tsStyleguide.spacing)(4));exports.FullWidthImg=FullWidthImg;var SecondaryImg=(0,_styledComponents.default)(_utils.TcView).withConfig({displayName:"responsive__SecondaryImg",componentId:"sc-4v1r4q-5"})(["width:100%;flex-direction:row;flex-wrap:nowrap;padding-left:",";padding-right:",";padding-bottom:",";@media (min-width:","px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:","px){width:56.2%;}"],(0,_tsStyleguide.spacing)(2),(0,_tsStyleguide.spacing)(2),(0,_tsStyleguide.spacing)(5),_tsStyleguide.breakpoints.medium,_tsStyleguide.breakpoints.wide);exports.SecondaryImg=SecondaryImg;var InlineImg=(0,_styledComponents.default)(_utils.TcView).withConfig({displayName:"responsive__InlineImg",componentId:"sc-4v1r4q-6"})(["width:100%;flex-direction:row;flex-wrap:nowrap;padding-left:",";padding-right:",";padding-bottom:0;display:block;@media (min-width:","px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:","px){width:56.2%;}"],(0,_tsStyleguide.spacing)(2),(0,_tsStyleguide.spacing)(2),_tsStyleguide.breakpoints.medium,_tsStyleguide.breakpoints.wide);exports.InlineImg=InlineImg;var PullQuoteResp=(0,_styledComponents.default)(_utils.TcView).withConfig({displayName:"responsive__PullQuoteResp",componentId:"sc-4v1r4q-7"})(["padding-left:",";padding-right:",";margin-bottom:",";@media (min-width:","px){width:50%;float:left;margin-right:",";margin-bottom:0px;margin-top:",";padding-left:0px;padding-right:0px;}"],(0,_tsStyleguide.spacing)(2),(0,_tsStyleguide.spacing)(2),(0,_tsStyleguide.spacing)(2),_tsStyleguide.breakpoints.medium,(0,_tsStyleguide.spacing)(4),(0,_tsStyleguide.spacing)(1));exports.PullQuoteResp=PullQuoteResp;var PullQuoteContainer=(0,_styledComponents.default)(_utils.TcView).withConfig({displayName:"responsive__PullQuoteContainer",componentId:"sc-4v1r4q-8"})(["display:block;@media (min-width:","px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:","px){width:56.2%;}"],_tsStyleguide.breakpoints.medium,_tsStyleguide.breakpoints.wide);exports.PullQuoteContainer=PullQuoteContainer;var sharedHeadingStyles="color: "+_tsStyleguide.colours.functional.primary+";\n font-family: \""+_tsStyleguide.fonts.headline+"\";\n font-weight: 400;\n margin: 0 auto "+(0,_tsStyleguide.spacing)(2)+";\n padding-right: "+(0,_tsStyleguide.spacing)(2)+";\n padding-left: "+(0,_tsStyleguide.spacing)(2)+";\n\n @media (min-width: "+_tsStyleguide.breakpoints.medium+"px) {\n padding-left: 0;\n padding-right: 0;\n width: 80.8%;\n }\n\n @media (min-width: "+_tsStyleguide.breakpoints.wide+"px) {\n width: 56.2%;\n }";var Heading2=_styledComponents.default.h2.withConfig({displayName:"responsive__Heading2",componentId:"sc-4v1r4q-9"})([""," font-size:","px;line-height:","px;@media (min-width:","px){font-size:","px;line-height:","px;}"],sharedHeadingStyles,_tsStyleguide.fontSizes.heading2Mobile,_tsStyleguide.fontSizes.heading2Mobile,_tsStyleguide.breakpoints.medium,_tsStyleguide.fontSizes.heading2,_tsStyleguide.fontSizes.heading2);exports.Heading2=Heading2;var Heading3=_styledComponents.default.h3.withConfig({displayName:"responsive__Heading3",componentId:"sc-4v1r4q-10"})([""," font-size:","px;line-height:","px;@media (min-width:","px){font-size:","px;line-height:","px;}"],sharedHeadingStyles,_tsStyleguide.fontSizes.heading3Mobile,_tsStyleguide.fontSizes.heading3Mobile,_tsStyleguide.breakpoints.medium,_tsStyleguide.fontSizes.heading3,_tsStyleguide.fontSizes.heading3);exports.Heading3=Heading3;var Heading4=_styledComponents.default.h4.withConfig({displayName:"responsive__Heading4",componentId:"sc-4v1r4q-11"})([""," font-size:","px;line-height:","px;@media (min-width:","px){font-size:","px;line-height:","px;}"],sharedHeadingStyles,_tsStyleguide.fontSizes.heading4Mobile,_tsStyleguide.fontSizes.heading4Mobile,_tsStyleguide.breakpoints.medium,_tsStyleguide.fontSizes.heading4,_tsStyleguide.fontSizes.heading4);exports.Heading4=Heading4;var Heading5=_styledComponents.default.h5.withConfig({displayName:"responsive__Heading5",componentId:"sc-4v1r4q-12"})([""," font-size:","px;line-height:","px;@media (min-width:","px){font-size:","px;line-height:","px;}"],sharedHeadingStyles,_tsStyleguide.fontSizes.heading5Mobile,_tsStyleguide.fontSizes.heading5Mobile,_tsStyleguide.breakpoints.medium,_tsStyleguide.fontSizes.heading5,_tsStyleguide.fontSizes.heading5);exports.Heading5=Heading5;var Heading6=_styledComponents.default.h6.withConfig({displayName:"responsive__Heading6",componentId:"sc-4v1r4q-13"})([""," font-size:","px;line-height:","px;@media (min-width:","px){font-size:","px;line-height:","px;}"],sharedHeadingStyles,_tsStyleguide.fontSizes.heading5Mobile,_tsStyleguide.fontSizes.heading5Mobile,_tsStyleguide.breakpoints.medium,_tsStyleguide.fontSizes.heading5,_tsStyleguide.fontSizes.heading5);exports.Heading6=Heading6;var NativeAd=_styledComponents.default.div.withConfig({displayName:"responsive__NativeAd",componentId:"sc-4v1r4q-14"})(["clear:both;display:flex;flex-wrap:wrap;margin:0 auto 30px;width:80.8%;min-height:210px;@media (min-width:768px){min-height:120px;}@media (min-width:","px){width:56.2%;}&.hidden{visibility:hidden;}"],_tsStyleguide.breakpoints.wide);exports.NativeAd=NativeAd;var NativeAdTitle=_styledComponents.default.h2.withConfig({displayName:"responsive__NativeAdTitle",componentId:"sc-4v1r4q-15"})(["border-bottom:1px solid #dbdbdb;color:#333;flex:1 1 100%;font:normal ","px / 17px ",";margin-bottom:10px;padding:5px 0;text-transform:uppercase;"],_tsStyleguide.fontSizes.teaser,_tsStyleguide.fonts.bodyRegular);exports.NativeAdTitle=NativeAdTitle;var Ad=_styledComponents.default.div.withConfig({displayName:"responsive__Ad",componentId:"sc-4v1r4q-16"})(["flex:1 1 50%;@media (max-width:767px){flex:1 1 46%;&:first-of-type{margin-right:1.5%;}&:last-child{margin-left:1.5%;}}"]);exports.Ad=Ad;var InlineAdWrapper=_styledComponents.default.div.withConfig({displayName:"responsive__InlineAdWrapper",componentId:"sc-4v1r4q-17"})(["clear:both;min-height:283px;margin:30px 0;box-sizing:content-box;padding:0 0 10px;border-bottom:1px solid rgb(219,219,219);@media (min-width:768px){min-height:123px;}@media (min-width:970px){min-height:283px;}"]);exports.InlineAdWrapper=InlineAdWrapper;var InlineAdTitle=_styledComponents.default.h2.withConfig({displayName:"responsive__InlineAdTitle",componentId:"sc-4v1r4q-18"})(["border-bottom:1px solid rgb(219,219,219);color:#696969;flex:1 1 100%;font:normal ","px / 17px ",";letter-spacing:0.6px;margin:0 0 10px;padding:0 0 5px;text-align:center;text-transform:uppercase;"],_tsStyleguide.fontSizes.teaser,_tsStyleguide.fonts.bodyRegular);exports.InlineAdTitle=InlineAdTitle;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InlineAdTitle = exports.InlineAdWrapper = exports.Ad = exports.NativeAdTitle = exports.NativeAd = exports.Heading6 = exports.Heading5 = exports.Heading4 = exports.Heading3 = exports.Heading2 = exports.PullQuoteContainer = exports.PullQuoteResp = exports.InlineImg = exports.SecondaryImg = exports.FullWidthImg = exports.PrimaryImg = exports.InteractiveContainer = exports.Paragraph = exports.ParagraphContainer = void 0;
|
|
7
|
+
|
|
8
|
+
var _utils = require("@times-components/utils");
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
/* --- Body --- */
|
|
19
|
+
const ParagraphContainer = _styledComponents.default.div.withConfig({
|
|
20
|
+
displayName: "responsive__ParagraphContainer",
|
|
21
|
+
componentId: "sc-4v1r4q-0"
|
|
22
|
+
})(["padding-left:", ";padding-right:", ";@media (min-width:", "px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:", "px){width:56.2%;}"], (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(2), _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
23
|
+
|
|
24
|
+
exports.ParagraphContainer = ParagraphContainer;
|
|
25
|
+
|
|
26
|
+
const Paragraph = _styledComponents.default.p.withConfig({
|
|
27
|
+
displayName: "responsive__Paragraph",
|
|
28
|
+
componentId: "sc-4v1r4q-1"
|
|
29
|
+
})(["color:", ";font-family:\"", "\";line-height:26px;font-size:", "px;margin-bottom:", ";margin-top:0;display:block;@media (min-width:", "px){font-size:", "px;line-height:30px;}"], _tsStyleguide.colours.functional.primary, _tsStyleguide.fonts.bodyRegular, _tsStyleguide.fontSizes.bodyMobile, (0, _tsStyleguide.spacing)(5), _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.body);
|
|
30
|
+
|
|
31
|
+
exports.Paragraph = Paragraph;
|
|
32
|
+
|
|
33
|
+
const InteractiveContainer = _styledComponents.default.div.withConfig({
|
|
34
|
+
displayName: "responsive__InteractiveContainer",
|
|
35
|
+
componentId: "sc-4v1r4q-2"
|
|
36
|
+
})(["margin-bottom:", ";", ";"], (0, _tsStyleguide.spacing)(4), props => props.fullWidth ? (0, _styledComponents.css)(["width:100%;"]) : (0, _styledComponents.css)(["padding:0 ", ";@media (min-width:", "px){width:80.8%;margin-left:auto;margin-right:auto;padding:0;}@media (min-width:", "px){width:56.2%;}"], (0, _tsStyleguide.spacing)(2), _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide));
|
|
37
|
+
/* --- Article Images --- */
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.InteractiveContainer = InteractiveContainer;
|
|
41
|
+
const PrimaryImg = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
42
|
+
displayName: "responsive__PrimaryImg",
|
|
43
|
+
componentId: "sc-4v1r4q-3"
|
|
44
|
+
})(["width:100%;flex-direction:column;padding-bottom:", ";@media (min-width:", "px){width:80.8%;margin:0 auto;}@media (min-width:", "px){width:56.2%;}"], (0, _tsStyleguide.spacing)(5), _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
45
|
+
exports.PrimaryImg = PrimaryImg;
|
|
46
|
+
const FullWidthImg = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
47
|
+
displayName: "responsive__FullWidthImg",
|
|
48
|
+
componentId: "sc-4v1r4q-4"
|
|
49
|
+
})(["padding-bottom:", ";"], (0, _tsStyleguide.spacing)(4));
|
|
50
|
+
exports.FullWidthImg = FullWidthImg;
|
|
51
|
+
const SecondaryImg = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
52
|
+
displayName: "responsive__SecondaryImg",
|
|
53
|
+
componentId: "sc-4v1r4q-5"
|
|
54
|
+
})(["width:100%;flex-direction:row;flex-wrap:nowrap;padding-left:", ";padding-right:", ";padding-bottom:", ";@media (min-width:", "px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:", "px){width:56.2%;}"], (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(5), _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
55
|
+
exports.SecondaryImg = SecondaryImg;
|
|
56
|
+
const InlineImg = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
57
|
+
displayName: "responsive__InlineImg",
|
|
58
|
+
componentId: "sc-4v1r4q-6"
|
|
59
|
+
})(["width:100%;flex-direction:row;flex-wrap:nowrap;padding-left:", ";padding-right:", ";padding-bottom:0;display:block;@media (min-width:", "px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:", "px){width:56.2%;}"], (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(2), _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
60
|
+
/* --- Pull Quotes --- */
|
|
61
|
+
|
|
62
|
+
exports.InlineImg = InlineImg;
|
|
63
|
+
const PullQuoteResp = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
64
|
+
displayName: "responsive__PullQuoteResp",
|
|
65
|
+
componentId: "sc-4v1r4q-7"
|
|
66
|
+
})(["padding-left:", ";padding-right:", ";margin-bottom:", ";@media (min-width:", "px){width:50%;float:left;margin-right:", ";margin-bottom:0px;margin-top:", ";padding-left:0px;padding-right:0px;}"], (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(2), _tsStyleguide.breakpoints.medium, (0, _tsStyleguide.spacing)(4), (0, _tsStyleguide.spacing)(1));
|
|
67
|
+
exports.PullQuoteResp = PullQuoteResp;
|
|
68
|
+
const PullQuoteContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
69
|
+
displayName: "responsive__PullQuoteContainer",
|
|
70
|
+
componentId: "sc-4v1r4q-8"
|
|
71
|
+
})(["display:block;@media (min-width:", "px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}@media (min-width:", "px){width:56.2%;}"], _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
72
|
+
exports.PullQuoteContainer = PullQuoteContainer;
|
|
73
|
+
const sharedHeadingStyles = "color: ".concat(_tsStyleguide.colours.functional.primary, ";\n font-family: \"").concat(_tsStyleguide.fonts.headline, "\";\n font-weight: 400;\n margin: 0 auto ").concat((0, _tsStyleguide.spacing)(2), ";\n padding-right: ").concat((0, _tsStyleguide.spacing)(2), ";\n padding-left: ").concat((0, _tsStyleguide.spacing)(2), ";\n\n @media (min-width: ").concat(_tsStyleguide.breakpoints.medium, "px) {\n padding-left: 0;\n padding-right: 0;\n width: 80.8%;\n }\n\n @media (min-width: ").concat(_tsStyleguide.breakpoints.wide, "px) {\n width: 56.2%;\n }");
|
|
74
|
+
|
|
75
|
+
const Heading2 = _styledComponents.default.h2.withConfig({
|
|
76
|
+
displayName: "responsive__Heading2",
|
|
77
|
+
componentId: "sc-4v1r4q-9"
|
|
78
|
+
})(["", " font-size:", "px;line-height:", "px;@media (min-width:", "px){font-size:", "px;line-height:", "px;}"], sharedHeadingStyles, _tsStyleguide.fontSizes.heading2Mobile, _tsStyleguide.fontSizes.heading2Mobile, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.heading2, _tsStyleguide.fontSizes.heading2);
|
|
79
|
+
|
|
80
|
+
exports.Heading2 = Heading2;
|
|
81
|
+
|
|
82
|
+
const Heading3 = _styledComponents.default.h3.withConfig({
|
|
83
|
+
displayName: "responsive__Heading3",
|
|
84
|
+
componentId: "sc-4v1r4q-10"
|
|
85
|
+
})(["", " font-size:", "px;line-height:", "px;@media (min-width:", "px){font-size:", "px;line-height:", "px;}"], sharedHeadingStyles, _tsStyleguide.fontSizes.heading3Mobile, _tsStyleguide.fontSizes.heading3Mobile, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.heading3, _tsStyleguide.fontSizes.heading3);
|
|
86
|
+
|
|
87
|
+
exports.Heading3 = Heading3;
|
|
88
|
+
|
|
89
|
+
const Heading4 = _styledComponents.default.h4.withConfig({
|
|
90
|
+
displayName: "responsive__Heading4",
|
|
91
|
+
componentId: "sc-4v1r4q-11"
|
|
92
|
+
})(["", " font-size:", "px;line-height:", "px;@media (min-width:", "px){font-size:", "px;line-height:", "px;}"], sharedHeadingStyles, _tsStyleguide.fontSizes.heading4Mobile, _tsStyleguide.fontSizes.heading4Mobile, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.heading4, _tsStyleguide.fontSizes.heading4);
|
|
93
|
+
|
|
94
|
+
exports.Heading4 = Heading4;
|
|
95
|
+
|
|
96
|
+
const Heading5 = _styledComponents.default.h5.withConfig({
|
|
97
|
+
displayName: "responsive__Heading5",
|
|
98
|
+
componentId: "sc-4v1r4q-12"
|
|
99
|
+
})(["", " font-size:", "px;line-height:", "px;@media (min-width:", "px){font-size:", "px;line-height:", "px;}"], sharedHeadingStyles, _tsStyleguide.fontSizes.heading5Mobile, _tsStyleguide.fontSizes.heading5Mobile, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.heading5, _tsStyleguide.fontSizes.heading5);
|
|
100
|
+
|
|
101
|
+
exports.Heading5 = Heading5;
|
|
102
|
+
|
|
103
|
+
const Heading6 = _styledComponents.default.h6.withConfig({
|
|
104
|
+
displayName: "responsive__Heading6",
|
|
105
|
+
componentId: "sc-4v1r4q-13"
|
|
106
|
+
})(["", " font-size:", "px;line-height:", "px;@media (min-width:", "px){font-size:", "px;line-height:", "px;}"], sharedHeadingStyles, _tsStyleguide.fontSizes.heading5Mobile, _tsStyleguide.fontSizes.heading5Mobile, _tsStyleguide.breakpoints.medium, _tsStyleguide.fontSizes.heading5, _tsStyleguide.fontSizes.heading5);
|
|
107
|
+
|
|
108
|
+
exports.Heading6 = Heading6;
|
|
109
|
+
|
|
110
|
+
const NativeAd = _styledComponents.default.div.withConfig({
|
|
111
|
+
displayName: "responsive__NativeAd",
|
|
112
|
+
componentId: "sc-4v1r4q-14"
|
|
113
|
+
})(["clear:both;display:flex;flex-wrap:wrap;margin:0 auto 30px;width:80.8%;min-height:210px;@media (min-width:768px){min-height:120px;}@media (min-width:", "px){width:56.2%;}&.hidden{visibility:hidden;}"], _tsStyleguide.breakpoints.wide);
|
|
114
|
+
|
|
115
|
+
exports.NativeAd = NativeAd;
|
|
116
|
+
|
|
117
|
+
const NativeAdTitle = _styledComponents.default.h2.withConfig({
|
|
118
|
+
displayName: "responsive__NativeAdTitle",
|
|
119
|
+
componentId: "sc-4v1r4q-15"
|
|
120
|
+
})(["border-bottom:1px solid #dbdbdb;color:#333;flex:1 1 100%;font:normal ", "px / 17px ", ";margin-bottom:10px;padding:5px 0;text-transform:uppercase;"], _tsStyleguide.fontSizes.teaser, _tsStyleguide.fonts.bodyRegular);
|
|
121
|
+
|
|
122
|
+
exports.NativeAdTitle = NativeAdTitle;
|
|
123
|
+
|
|
124
|
+
const Ad = _styledComponents.default.div.withConfig({
|
|
125
|
+
displayName: "responsive__Ad",
|
|
126
|
+
componentId: "sc-4v1r4q-16"
|
|
127
|
+
})(["flex:1 1 50%;@media (max-width:767px){flex:1 1 46%;&:first-of-type{margin-right:1.5%;}&:last-child{margin-left:1.5%;}}"]);
|
|
128
|
+
|
|
129
|
+
exports.Ad = Ad;
|
|
130
|
+
|
|
131
|
+
const InlineAdWrapper = _styledComponents.default.div.withConfig({
|
|
132
|
+
displayName: "responsive__InlineAdWrapper",
|
|
133
|
+
componentId: "sc-4v1r4q-17"
|
|
134
|
+
})(["clear:both;min-height:283px;margin:30px 0;box-sizing:content-box;padding:0 0 10px;border-bottom:1px solid rgb(219,219,219);@media (min-width:768px){min-height:123px;}@media (min-width:970px){min-height:283px;}"]);
|
|
135
|
+
|
|
136
|
+
exports.InlineAdWrapper = InlineAdWrapper;
|
|
137
|
+
|
|
138
|
+
const InlineAdTitle = _styledComponents.default.h2.withConfig({
|
|
139
|
+
displayName: "responsive__InlineAdTitle",
|
|
140
|
+
componentId: "sc-4v1r4q-18"
|
|
141
|
+
})(["border-bottom:1px solid rgb(219,219,219);color:#696969;flex:1 1 100%;font:normal ", "px / 17px ", ";letter-spacing:0.6px;margin:0 0 10px;padding:0 0 5px;text-align:center;text-transform:uppercase;"], _tsStyleguide.fontSizes.teaser, _tsStyleguide.fonts.bodyRegular);
|
|
142
|
+
|
|
143
|
+
exports.InlineAdTitle = InlineAdTitle;
|
|
@@ -1 +1,124 @@
|
|
|
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 = scale => {
|
|
17
|
+
const _styleguide = (0, _tsStyleguide.styleguide)({
|
|
18
|
+
scale
|
|
19
|
+
}),
|
|
20
|
+
colours = _styleguide.colours,
|
|
21
|
+
fontFactory = _styleguide.fontFactory,
|
|
22
|
+
spacing = _styleguide.spacing,
|
|
23
|
+
lineHeight = _styleguide.lineHeight;
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
ad: {
|
|
27
|
+
borderBottomColor: colours.functional.keyline,
|
|
28
|
+
borderBottomWidth: 1,
|
|
29
|
+
borderTopColor: colours.functional.keyline,
|
|
30
|
+
borderTopWidth: 1,
|
|
31
|
+
marginBottom: spacing(4),
|
|
32
|
+
paddingHorizontal: spacing(2),
|
|
33
|
+
paddingVertical: spacing(2)
|
|
34
|
+
},
|
|
35
|
+
articleLink: _objectSpread(_objectSpread({
|
|
36
|
+
color: colours.functional.action
|
|
37
|
+
}, fontFactory({
|
|
38
|
+
font: "body",
|
|
39
|
+
fontSize: "bodyMobile"
|
|
40
|
+
})), {}, {
|
|
41
|
+
lineHeight: lineHeight({
|
|
42
|
+
font: "body",
|
|
43
|
+
fontSize: "bodyMobile"
|
|
44
|
+
}),
|
|
45
|
+
marginBottom: spacing(5),
|
|
46
|
+
marginTop: 0
|
|
47
|
+
}),
|
|
48
|
+
articleMainContentRow: {
|
|
49
|
+
paddingLeft: spacing(2),
|
|
50
|
+
paddingRight: spacing(2)
|
|
51
|
+
},
|
|
52
|
+
articleTextElement: _objectSpread(_objectSpread({}, fontFactory({
|
|
53
|
+
font: "body",
|
|
54
|
+
fontSize: "bodyMobile"
|
|
55
|
+
})), {}, {
|
|
56
|
+
color: colours.functional.primary,
|
|
57
|
+
marginBottom: spacing(5)
|
|
58
|
+
}),
|
|
59
|
+
containerTablet: {
|
|
60
|
+
alignSelf: "center"
|
|
61
|
+
},
|
|
62
|
+
imageContainerTablet: {
|
|
63
|
+
alignSelf: "center"
|
|
64
|
+
},
|
|
65
|
+
interactiveContainer: {
|
|
66
|
+
marginBottom: spacing(4),
|
|
67
|
+
paddingHorizontal: spacing(2)
|
|
68
|
+
},
|
|
69
|
+
interactiveContainerTablet: {
|
|
70
|
+
alignSelf: "center",
|
|
71
|
+
width: _tsStyleguide.tabletWidth
|
|
72
|
+
},
|
|
73
|
+
interactiveContainerFullWidth: {
|
|
74
|
+
width: "100%",
|
|
75
|
+
paddingHorizontal: 0
|
|
76
|
+
},
|
|
77
|
+
leadAsset: {
|
|
78
|
+
marginBottom: spacing(2)
|
|
79
|
+
},
|
|
80
|
+
primaryContainer: {
|
|
81
|
+
flexDirection: "column",
|
|
82
|
+
paddingBottom: spacing(5),
|
|
83
|
+
width: "100%"
|
|
84
|
+
},
|
|
85
|
+
heading2: _objectSpread(_objectSpread({}, fontFactory({
|
|
86
|
+
font: "headline",
|
|
87
|
+
fontSize: "heading2Mobile"
|
|
88
|
+
})), {}, {
|
|
89
|
+
marginBottom: spacing(2),
|
|
90
|
+
color: colours.functional.black
|
|
91
|
+
}),
|
|
92
|
+
heading3: _objectSpread(_objectSpread({}, fontFactory({
|
|
93
|
+
font: "headline",
|
|
94
|
+
fontSize: "heading3Mobile"
|
|
95
|
+
})), {}, {
|
|
96
|
+
marginBottom: spacing(2),
|
|
97
|
+
color: colours.functional.black
|
|
98
|
+
}),
|
|
99
|
+
heading4: _objectSpread(_objectSpread({}, fontFactory({
|
|
100
|
+
font: "headline",
|
|
101
|
+
fontSize: "heading4Mobile"
|
|
102
|
+
})), {}, {
|
|
103
|
+
marginBottom: spacing(2),
|
|
104
|
+
color: colours.functional.black
|
|
105
|
+
}),
|
|
106
|
+
heading5: _objectSpread(_objectSpread({}, fontFactory({
|
|
107
|
+
font: "headline",
|
|
108
|
+
fontSize: "heading5Mobile"
|
|
109
|
+
})), {}, {
|
|
110
|
+
marginBottom: spacing(2),
|
|
111
|
+
color: colours.functional.black
|
|
112
|
+
}),
|
|
113
|
+
heading6: _objectSpread(_objectSpread({}, fontFactory({
|
|
114
|
+
font: "headline",
|
|
115
|
+
fontSize: "heading5Mobile"
|
|
116
|
+
})), {}, {
|
|
117
|
+
marginBottom: spacing(2),
|
|
118
|
+
color: colours.functional.black
|
|
119
|
+
})
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var _default = sharedStyles;
|
|
124
|
+
exports.default = _default;
|
|
@@ -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 topicStyles = _objectSpread({}, _shared.default);
|
|
19
|
+
|
|
20
|
+
var _default = topicStyles;
|
|
21
|
+
exports.default = _default;
|
|
@@ -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 _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
11
|
+
|
|
12
|
+
var _utils = require("@times-components/utils");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
17
|
+
displayName: "responsive",
|
|
18
|
+
componentId: "sc-1ulgmfl-0"
|
|
19
|
+
})(["padding-left:", ";padding-right:", ";@media (min-width:", "px){width:80.8%;margin:0 auto;padding-left:0;padding-right:0;}"], (0, _tsStyleguide.spacing)(2), (0, _tsStyleguide.spacing)(2), _tsStyleguide.breakpoints.medium);
|
|
20
|
+
|
|
21
|
+
exports.default = _default;
|
|
@@ -1 +1,24 @@
|
|
|
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
|
+
const sharedStyles = {
|
|
11
|
+
topicsContainer: {
|
|
12
|
+
borderTopColor: _tsStyleguide.colours.functional.keyline,
|
|
13
|
+
borderTopWidth: 1
|
|
14
|
+
},
|
|
15
|
+
topicsContainerTablet: {
|
|
16
|
+
alignSelf: "center",
|
|
17
|
+
width: _tsStyleguide.tabletWidth
|
|
18
|
+
},
|
|
19
|
+
topicsMetaContainer: {
|
|
20
|
+
justifyContent: "flex-start"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var _default = sharedStyles;
|
|
24
|
+
exports.default = _default;
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BodyContainer = exports.HeaderContainer = exports.MainContainer = exports.getHeaderAdStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _utils = require("@times-components/utils");
|
|
11
|
+
|
|
12
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
13
|
+
|
|
14
|
+
var _keylines = require("../keylines");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const getHeaderAdStyles = template => {
|
|
19
|
+
const hideKeylines = template === "indepth";
|
|
20
|
+
return (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
21
|
+
displayName: "responsive",
|
|
22
|
+
componentId: "sc-15gvuj2-0"
|
|
23
|
+
})(["box-sizing:content-box;justify-content:center;min-height:50px;display:flex;border-top-color:", ";border-bottom-color:", ";border-bottom-width:", ";padding-top:", ";padding-bottom:", ";@media (min-width:768px){min-height:90px;}@media (min-width:970px){min-height:250px;}"], _tsStyleguide.colours.functional.keyline, _tsStyleguide.colours.functional.keyline, hideKeylines ? "0" : "1px", (0, _tsStyleguide.spacing)(2), hideKeylines ? "0" : (0, _tsStyleguide.spacing)(2));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.getHeaderAdStyles = getHeaderAdStyles;
|
|
27
|
+
|
|
28
|
+
const MainContainer = _styledComponents.default.main.withConfig({
|
|
29
|
+
displayName: "responsive__MainContainer",
|
|
30
|
+
componentId: "sc-15gvuj2-1"
|
|
31
|
+
})(["@media (min-width:", "px){padding-top:", ";margin:0 auto;}"], _tsStyleguide.breakpoints.wide, (0, _tsStyleguide.spacing)(4));
|
|
32
|
+
|
|
33
|
+
exports.MainContainer = MainContainer;
|
|
34
|
+
const HeaderContainer = (0, _styledComponents.default)(_utils.TcView).withConfig({
|
|
35
|
+
displayName: "responsive__HeaderContainer",
|
|
36
|
+
componentId: "sc-15gvuj2-2"
|
|
37
|
+
})(["display:flex;> ", "{order:3;}"], _keylines.ArticleKeylineItem);
|
|
38
|
+
exports.HeaderContainer = HeaderContainer;
|
|
39
|
+
|
|
40
|
+
const BodyContainer = _styledComponents.default.article.withConfig({
|
|
41
|
+
displayName: "responsive__BodyContainer",
|
|
42
|
+
componentId: "sc-15gvuj2-3"
|
|
43
|
+
})(["display:block;order:4;"]);
|
|
44
|
+
|
|
45
|
+
exports.BodyContainer = BodyContainer;
|
package/dist/styles/shared.js
CHANGED
|
@@ -1 +1,20 @@
|
|
|
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
|
+
const globalStyle = {
|
|
11
|
+
articleContainer: {
|
|
12
|
+
backgroundColor: _tsStyleguide.colours.functional.gutter
|
|
13
|
+
},
|
|
14
|
+
articleMainContentRow: {
|
|
15
|
+
paddingLeft: (0, _tsStyleguide.spacing)(2),
|
|
16
|
+
paddingRight: (0, _tsStyleguide.spacing)(2)
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var _default = globalStyle;
|
|
20
|
+
exports.default = _default;
|
|
@@ -1 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _lodash = _interopRequireDefault(require("lodash.get"));
|
|
9
|
+
|
|
10
|
+
var _tracking = require("@times-components/tracking");
|
|
11
|
+
|
|
12
|
+
var _dataHelper = require("../data-helper");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = Component => (0, _tracking.withTrackingContext)(Component, {
|
|
17
|
+
getAttrs: _ref => {
|
|
18
|
+
let data = _ref.data,
|
|
19
|
+
pageSection = _ref.pageSection,
|
|
20
|
+
navigationMode = _ref.navigationMode,
|
|
21
|
+
_ref$referralUrl = _ref.referralUrl,
|
|
22
|
+
referralUrl = _ref$referralUrl === void 0 ? "" : _ref$referralUrl;
|
|
23
|
+
let editionType = "";
|
|
24
|
+
let hasAccessViaTimes = false;
|
|
25
|
+
const flags = data.expirableFlags;
|
|
26
|
+
|
|
27
|
+
if (window) {
|
|
28
|
+
// eslint-disable-next-line
|
|
29
|
+
if (window.__TIMES_ACCESS_AND_IDENTITY__) {
|
|
30
|
+
// eslint-disable-next-line
|
|
31
|
+
if (window.__TIMES_ACCESS_AND_IDENTITY__.hasAccess) {
|
|
32
|
+
hasAccessViaTimes = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (navigationMode) {
|
|
38
|
+
const isMyArticles = navigationMode.isMyArticles,
|
|
39
|
+
isPastSixDays = navigationMode.isPastSixDays;
|
|
40
|
+
|
|
41
|
+
if (isMyArticles) {
|
|
42
|
+
editionType = "my articles";
|
|
43
|
+
} else {
|
|
44
|
+
editionType = isPastSixDays ? "past 6 days" : "current edition";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
articleId: (0, _lodash.default)(data, "id", ""),
|
|
50
|
+
article_topic_tags: data.topics ? data.topics.map(topic => topic.name) : [],
|
|
51
|
+
isLocked: hasAccessViaTimes ? "unlocked" : "locked",
|
|
52
|
+
bylines: (0, _lodash.default)(data, "bylines[0].byline[0].children[0].attributes.value", ""),
|
|
53
|
+
headline: (0, _lodash.default)(data, "headline", ""),
|
|
54
|
+
label: (0, _lodash.default)(data, "label", ""),
|
|
55
|
+
pageName: "".concat((0, _lodash.default)(data, "slug", ""), "-").concat((0, _lodash.default)(data, "shortIdentifier", "")),
|
|
56
|
+
edition_type: editionType,
|
|
57
|
+
publishedTime: (0, _lodash.default)(data, "publishedTime", ""),
|
|
58
|
+
parent_site: (0, _lodash.default)(data, "publicationName", ""),
|
|
59
|
+
referralUrl,
|
|
60
|
+
section: pageSection || (0, _lodash.default)(data, "section", ""),
|
|
61
|
+
template: (0, _lodash.default)(data, "template", "Default"),
|
|
62
|
+
registrationType: (0, _dataHelper.getRegistrationType)(),
|
|
63
|
+
shared: (0, _dataHelper.getSharedStatus)(),
|
|
64
|
+
article_flag: (0, _dataHelper.getActiveArticleFlags)(flags) ? (0, _dataHelper.getActiveArticleFlags)(flags) : "no flag",
|
|
65
|
+
article_template_name: (0, _dataHelper.getIsLiveOrBreakingFlag)(flags) ? "live template" : "standard template"
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
trackingObjectName: "Article"
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
exports.default = _default;
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
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; }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
const tagLastParagraph = content => {
|
|
15
|
+
const paywall = content.find(item => item.name === "paywall");
|
|
16
|
+
if (!paywall) return content;
|
|
17
|
+
const lastPaywallParagraph = paywall.children.filter(_ref => {
|
|
18
|
+
let name = _ref.name;
|
|
19
|
+
return name === "paragraph";
|
|
20
|
+
}).pop();
|
|
21
|
+
const lastParagraphIndex = paywall.children.indexOf(lastPaywallParagraph);
|
|
22
|
+
const paywallChildren = paywall.children.map((child, index) => index === lastParagraphIndex ? _objectSpread(_objectSpread({}, child), {}, {
|
|
23
|
+
attributes: _objectSpread(_objectSpread({}, child.attributes), {}, {
|
|
24
|
+
id: "last-paragraph"
|
|
25
|
+
})
|
|
26
|
+
}) : child);
|
|
27
|
+
return content.map(child => child.name === "paywall" ? _objectSpread(_objectSpread({}, child), {}, {
|
|
28
|
+
children: paywallChildren
|
|
29
|
+
}) : child);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var _default = tagLastParagraph;
|
|
33
|
+
exports.default = _default;
|