@times-components/article-extras 0.32.5-alpha.2 → 0.32.5-alpha.3
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/dist/article-extras.js +10 -10
- package/dist/styles/index.js +4 -4
- package/package.json +3 -3
- package/rnw.js +1 -1
package/dist/article-extras.js
CHANGED
|
@@ -5,28 +5,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _userState = _interopRequireDefault(require("@times-components/user-state"));
|
|
13
|
-
|
|
14
8
|
var _articleComments = _interopRequireDefault(require("@times-components/article-comments"));
|
|
15
9
|
|
|
16
|
-
var _relatedArticles = _interopRequireDefault(require("@times-components/related-articles"));
|
|
17
|
-
|
|
18
10
|
var _messageBar = require("@times-components/message-bar");
|
|
19
11
|
|
|
12
|
+
var _relatedArticles = _interopRequireDefault(require("@times-components/related-articles"));
|
|
13
|
+
|
|
20
14
|
var _saveAndShareBar = _interopRequireDefault(require("@times-components/save-and-share-bar"));
|
|
21
15
|
|
|
22
16
|
var _tsComponents = require("@times-components/ts-components");
|
|
23
17
|
|
|
24
|
-
var
|
|
18
|
+
var _userState = _interopRequireDefault(require("@times-components/user-state"));
|
|
25
19
|
|
|
26
|
-
var
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
+
|
|
22
|
+
var _react = _interopRequireDefault(require("react"));
|
|
23
|
+
|
|
24
|
+
var _articleTopics = _interopRequireDefault(require("./article-topics"));
|
|
27
25
|
|
|
28
26
|
var _styles = require("./styles");
|
|
29
27
|
|
|
28
|
+
var _responsive = require("./styles/responsive");
|
|
29
|
+
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
32
32
|
const clearingStyle = {
|
package/dist/styles/index.js
CHANGED
|
@@ -80,28 +80,28 @@ const styles = {
|
|
|
80
80
|
const PromotedContentContainer = _styledComponents.default.div.withConfig({
|
|
81
81
|
displayName: "styles__PromotedContentContainer",
|
|
82
82
|
componentId: "sc-1ul3b7n-3"
|
|
83
|
-
})(["border-top:2px solid #1d1d1b;background-color:#f5f5f5;padding:
|
|
83
|
+
})(["border-top:2px solid #1d1d1b;background-color:#f5f5f5;padding:20px 20px 24px 20px;margin-block-start:20px;&:not(:last-child){margin-block-end:32px;}@media (min-width:", "px){padding:16px;margin-block-start:28px;margin-block-end:32px;margin-inline:20px;}"], _tsStyleguide.breakpoints.wide);
|
|
84
84
|
|
|
85
85
|
exports.PromotedContentContainer = PromotedContentContainer;
|
|
86
86
|
|
|
87
87
|
const PromotedContentTitle = _styledComponents.default.span.withConfig({
|
|
88
88
|
displayName: "styles__PromotedContentTitle",
|
|
89
89
|
componentId: "sc-1ul3b7n-4"
|
|
90
|
-
})(["display:block;font-family:\"Roboto\";font-weight:500;font-size:12px;line-height:16px;color:#
|
|
90
|
+
})(["display:block;font-family:\"Roboto\";font-weight:500;font-size:12px;line-height:16px;color:#3b3b3b;margin-block:16px;"]);
|
|
91
91
|
|
|
92
92
|
exports.PromotedContentTitle = PromotedContentTitle;
|
|
93
93
|
|
|
94
94
|
const PromotedContentGrid = _styledComponents.default.div.withConfig({
|
|
95
95
|
displayName: "styles__PromotedContentGrid",
|
|
96
96
|
componentId: "sc-1ul3b7n-5"
|
|
97
|
-
})(["display:grid;grid-template-columns:repeat(2,1fr);gap:16px 32px
|
|
97
|
+
})(["display:grid;grid-template-columns:repeat(2,1fr);gap:16px 32px;@media (min-width:", "px){grid-template-columns:repeat(4,1fr);}"], _tsStyleguide.breakpoints.wide);
|
|
98
98
|
|
|
99
99
|
exports.PromotedContentGrid = PromotedContentGrid;
|
|
100
100
|
|
|
101
101
|
const PromotedContentAd = _styledComponents.default.div.withConfig({
|
|
102
102
|
displayName: "styles__PromotedContentAd",
|
|
103
103
|
componentId: "sc-1ul3b7n-6"
|
|
104
|
-
})(["position:relative;min-height:150px;&:nth-child(1)::after,&:nth-child(4)::after{position:absolute;content:\"\";top:0;right:-16px;width:1px;height:100%;background-color:#
|
|
104
|
+
})(["position:relative;min-height:150px;&:nth-child(1)::after,&:nth-child(4)::after{position:absolute;content:\"\";top:0;right:-16px;width:1px;height:100%;background-color:#c2c2c2;}@media (min-width:", "px){&:not(:last-child)::after{position:absolute;content:\"\";top:0;right:-16px;width:1px;height:100%;background-color:#c2c2c2;}}"], _tsStyleguide.breakpoints.wide);
|
|
105
105
|
|
|
106
106
|
exports.PromotedContentAd = PromotedContentAd;
|
|
107
107
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/article-extras",
|
|
3
|
-
"version": "0.32.5-alpha.
|
|
3
|
+
"version": "0.32.5-alpha.3+f23b02a8a8",
|
|
4
4
|
"description": "Extra information components at the bottom of the articles, such as topics, related articles and comments ",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"dev": "src/index",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@times-components/context": "^1.24.0",
|
|
56
56
|
"@times-components/message-bar": "^0.7.85",
|
|
57
57
|
"@times-components/related-articles": "^6.17.85",
|
|
58
|
-
"@times-components/save-and-share-bar": "^0.23.
|
|
58
|
+
"@times-components/save-and-share-bar": "^0.23.2",
|
|
59
59
|
"@times-components/ts-components": "^1.103.3",
|
|
60
60
|
"@times-components/ts-styleguide": "^1.50.34",
|
|
61
61
|
"@times-components/user-state": "^0.5.51",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "f23b02a8a823e81c322298ff318f065f1d582eb9"
|
|
78
78
|
}
|
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=12)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/user-state/rnw")},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/article-comments/rnw")},function(e,t){e.exports=require("@times-components/
|
|
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=12)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/user-state/rnw")},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/article-comments/rnw")},function(e,t){e.exports=require("@times-components/message-bar/rnw")},function(e,t){e.exports=require("@times-components/related-articles/rnw")},function(e,t){e.exports=require("@times-components/save-and-share-bar/rnw")},function(e,t){e.exports=require("@times-components/article-topics/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(6),i=n.n(r),o=n(7),a=n(8),l=n.n(a),c=n(9),s=n.n(c),d=n(4),p=n(3),m=n.n(p),u=(n(5),n(1)),b=n.n(u),f=n(10),g=n.n(f),h=n(11),y=n(2),w=n.n(y),x=n(0),v=w()(h.TcView).withConfig({displayName:"responsive",componentId:"rerzrc-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%;}"],Object(x.spacing)(2),Object(x.spacing)(2),x.breakpoints.medium,x.breakpoints.wide);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 E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=function(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){E(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}({},{topicsContainer:{borderTopColor:x.colours.functional.keyline,borderTopWidth:1},topicsContainerTablet:{alignSelf:"center",width:x.tabletWidth},topicsMetaContainer:{justifyContent:"flex-start"}});const C=e=>{let t=e.topics;return t&&t.length>0?b.a.createElement(v,null,b.a.createElement("nav",{"data-cy":"topic-tags"},b.a.createElement(g.a,{style:j.topicsContainer,topics:t}))):null};C.defaultProps={topics:null};var P=C;function S(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(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}w.a.div.withConfig({displayName:"styles__NativeAd",componentId:"sc-1ul3b7n-0"})(["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;}"],x.breakpoints.wide),w.a.h2.withConfig({displayName:"styles__NativeAdTitle",componentId:"sc-1ul3b7n-1"})(["border-bottom:1px solid #dbdbdb;color:#333;flex:1 1 100%;font:normal ","px / 17px ",";margin-bottom:10px;padding:5px 0;text-transform:uppercase;"],x.fontSizes.teaser,x.fontsWithFallback.bodyRegular),w.a.div.withConfig({displayName:"styles__Ad",componentId:"sc-1ul3b7n-2"})(["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%;}}"]),k(k({},Object(x.fontFactory)({font:"supporting",fontSize:"tertiary"})),{},{color:x.colours.functional.secondary,maxWidth:330,textAlign:"center"}),Object(x.spacing)(0),Object(x.spacing)(5),x.colours.functional.keyline,Object(x.spacing)(10),k(k({color:x.colours.functional.primary},Object(x.fontFactory)({font:"headline",fontSize:"commentsHeadline"})),{},{maxWidth:315,paddingBottom:Object(x.spacing)(2),paddingTop:Object(x.spacing)(6),textAlign:"center"}),x.tabletWidth;const q=w.a.div.withConfig({displayName:"styles__PromotedContentContainer",componentId:"sc-1ul3b7n-3"})(["border-top:2px solid #1d1d1b;background-color:#f5f5f5;padding:20px 20px 24px 20px;margin-block-start:20px;&:not(:last-child){margin-block-end:32px;}@media (min-width:","px){padding:16px;margin-block-start:28px;margin-block-end:32px;margin-inline:20px;}"],x.breakpoints.wide),N=w.a.span.withConfig({displayName:"styles__PromotedContentTitle",componentId:"sc-1ul3b7n-4"})(['display:block;font-family:"Roboto";font-weight:500;font-size:12px;line-height:16px;color:#3b3b3b;margin-block:16px;']),I=w.a.div.withConfig({displayName:"styles__PromotedContentGrid",componentId:"sc-1ul3b7n-5"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:16px 32px;@media (min-width:","px){grid-template-columns:repeat(4,1fr);}"],x.breakpoints.wide),A=w.a.div.withConfig({displayName:"styles__PromotedContentAd",componentId:"sc-1ul3b7n-6"})(['position:relative;min-height:150px;&:nth-child(1)::after,&:nth-child(4)::after{position:absolute;content:"";top:0;right:-16px;width:1px;height:100%;background-color:#c2c2c2;}@media (min-width:','px){&:not(:last-child)::after{position:absolute;content:"";top:0;right:-16px;width:1px;height:100%;background-color:#c2c2c2;}}'],x.breakpoints.wide),T=w.a.div.withConfig({displayName:"styles__PromotedContentSectionDivider",componentId:"sc-1ul3b7n-7"})(["border-top:1px solid #e4e4e4;grid-column:1 / 3;@media (min-width:","px){display:none;}"],x.breakpoints.wide);const B=w.a.div.withConfig({displayName:"responsive__ShareAndSaveContainer",componentId:"hqs3q1-0"})(["border-top-color:",";border-top-style:solid;border-top-width:1px;width:56.2%;margin:0 auto;@media (max-width:","px){display:none;}",";"],x.colours.functional.keyline,x.breakpoints.huge,e=>e.showBottomBorder&&"border-bottom-color: ".concat(x.colours.functional.keyline,";\n border-bottom-style: solid;\n border-bottom-width: 1px;")),D=w.a.div.withConfig({displayName:"responsive__BreadcrumbContainer",componentId:"hqs3q1-1"})(["display:flex;justify-content:center;margin:0 auto;padding-bottom:8px;",";@media (min-width:","px){width:80.8%;}@media (min-width:","px){width:56.2%;}"],e=>e.$border?"\n border-bottom-color: ".concat(x.colours.functional.keyline,";\n border-bottom-style: solid;\n border-bottom-width: 1px;\n "):"",x.breakpoints.medium,x.breakpoints.wide),M={clear:"both"},F=e=>{let t=e.analyticsStream,n=e.articleId,r=e.commentsEnabled,a=e.registerNode,c=e.savingEnabled,p=e.sharingEnabled,u=e.articleUrl,f=e.section,g=e.articleHeadline,h=e.relatedArticleSlice,y=e.relatedArticlesVisible,w=e.commentingConfig,x=e.topics,v=e.isSharingSavingEnabled,O=e.isCommentEnabled,E=e.storefrontConfig,j=e.breadcrumbs,C=e.domainSpecificUrl,S=e.isEntitlementFeatureEnabled;const k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{showBorder:!1},t=e.showBorder;return j&&j.length>0?b.a.createElement(D,{$border:t},b.a.createElement(d.Breadcrumb,{data:j})):null},_=(e,r)=>b.a.createElement(b.a.Fragment,null,b.a.createElement("div",{id:"related-articles",ref:e=>a(e)},r&&k({showBorder:!1}),b.a.createElement(l.a,{analyticsStream:t,isVisible:y,slice:h}),e&&b.a.createElement(d.RecommendedFetch,{articleId:n,articleHeadline:g,articleSection:f})),b.a.createElement(q,null,b.a.createElement(N,null,"PROMOTED CONTENT"),b.a.createElement(I,null,b.a.createElement(A,{id:"advert-inarticle-native-1"}),b.a.createElement(A,{id:"advert-inarticle-native-2"}),b.a.createElement(T,null),b.a.createElement(A,{id:"advert-inarticle-native-3"}),b.a.createElement(A,{id:"advert-inarticle-native-4"}))));return b.a.createElement(m.a,{state:m.a.showArticleExtras,fallback:_(!1,!0)},b.a.createElement("div",{style:M}),k({showBorder:x&&x.length>0}),b.a.createElement(P,{topics:x}),v&&b.a.createElement(m.a,{state:m.a.showSaveAndShareBar},b.a.createElement(o.MessageContext.Consumer,null,e=>{let t=e.showMessage;return b.a.createElement(B,{showBottomBorder:!h},b.a.createElement(s.a,{articleId:n,articleHeadline:g,articleUrl:u,onCopyLink:()=>t("Article link copied"),onSaveToMyArticles:()=>{},onShareOnEmail:()=>{},savingEnabled:c,sharingEnabled:p}))})),_(!0,!1),b.a.createElement(i.a,{articleId:n,isEnabled:r,commentingConfig:w,isCommentEnabled:O,storefrontConfig:E,domainSpecificUrl:C,isEntitlementFeatureEnabled:S}))};F.defaultProps={relatedArticleSlice:null,topics:null,isSharingSavingEnabled:!0,isCommentEnabled:!0,breadcrumbs:[]};var W=F;t.default=W}]);
|