@times-components/article-extras 0.30.2-alpha.2 → 0.31.1-alpha.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 +11 -0
- package/dist/article-extras.js +11 -12
- package/dist/styles/index.js +1 -36
- package/package.json +6 -7
- package/rnw.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [0.31.0](https://github.com/newsuk/times-components/compare/@times-components/article-extras@0.30.1...@times-components/article-extras@0.31.0) (2024-08-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **TMD-538-539-540:** Move components from ts-newskit into ts-components ([#3891](https://github.com/newsuk/times-components/issues/3891)) ([9c16e26](https://github.com/newsuk/times-components/commit/9c16e264e074eeed1b63cc597ed7656b917a3402)), closes [#3892](https://github.com/newsuk/times-components/issues/3892) [#3896](https://github.com/newsuk/times-components/issues/3896) [#3892](https://github.com/newsuk/times-components/issues/3892) [#3896](https://github.com/newsuk/times-components/issues/3896)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.30.1](https://github.com/newsuk/times-components/compare/@times-components/article-extras@0.30.0...@times-components/article-extras@0.30.1) (2024-08-08)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @times-components/article-extras
|
package/dist/article-extras.js
CHANGED
|
@@ -21,8 +21,6 @@ var _saveAndShareBar = _interopRequireDefault(require("@times-components/save-an
|
|
|
21
21
|
|
|
22
22
|
var _tsComponents = require("@times-components/ts-components");
|
|
23
23
|
|
|
24
|
-
var _tsNewskit = require("@times-components/ts-newskit");
|
|
25
|
-
|
|
26
24
|
var _articleTopics = _interopRequireDefault(require("./article-topics"));
|
|
27
25
|
|
|
28
26
|
var _responsive = require("./styles/responsive");
|
|
@@ -65,7 +63,7 @@ const ArticleExtras = _ref => {
|
|
|
65
63
|
if (breadcrumbs && breadcrumbs.length > 0) {
|
|
66
64
|
return /*#__PURE__*/_react.default.createElement(_responsive.BreadcrumbContainer, {
|
|
67
65
|
$border: showBorder
|
|
68
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_tsComponents.Breadcrumb, {
|
|
69
67
|
data: breadcrumbs
|
|
70
68
|
}));
|
|
71
69
|
}
|
|
@@ -88,15 +86,16 @@ const ArticleExtras = _ref => {
|
|
|
88
86
|
articleId: articleId,
|
|
89
87
|
articleHeadline: articleHeadline,
|
|
90
88
|
articleSection: section
|
|
91
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.
|
|
98
|
-
id: "advert-inarticle-native-
|
|
99
|
-
|
|
89
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.NativeAd, {
|
|
90
|
+
className: "group-3 hidden",
|
|
91
|
+
key: "1"
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.NativeAdTitle, null, "Sponsored"), /*#__PURE__*/_react.default.createElement(_styles.Ad, {
|
|
93
|
+
id: "advert-inarticle-native-1",
|
|
94
|
+
"data-parent": "group-3"
|
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.Ad, {
|
|
96
|
+
id: "advert-inarticle-native-2",
|
|
97
|
+
"data-parent": "group-3"
|
|
98
|
+
})));
|
|
100
99
|
|
|
101
100
|
return /*#__PURE__*/_react.default.createElement(_userState.default, {
|
|
102
101
|
state: _userState.default.showArticleExtras,
|
package/dist/styles/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.Ad = exports.NativeAdTitle = exports.NativeAd = void 0;
|
|
7
7
|
|
|
8
8
|
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
9
9
|
|
|
@@ -76,40 +76,5 @@ const styles = {
|
|
|
76
76
|
width: "100%"
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
const PromotedContentContainer = _styledComponents.default.div.withConfig({
|
|
81
|
-
displayName: "styles__PromotedContentContainer",
|
|
82
|
-
componentId: "sc-1ul3b7n-3"
|
|
83
|
-
})(["border-top:2px solid #1d1d1b;background-color:#f5f5f5;padding:16px 10px 24px;margin-block-start:20px;&:not(:last-child){margin-block-end:32px;}@media (min-width:", "px){padding:16px 20px 24px;}@media (min-width:", "px){margin-block-start:28px;margin-block-end:32px;margin-inline:20px;}"], _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
84
|
-
|
|
85
|
-
exports.PromotedContentContainer = PromotedContentContainer;
|
|
86
|
-
|
|
87
|
-
const PromotedContentTitle = _styledComponents.default.span.withConfig({
|
|
88
|
-
displayName: "styles__PromotedContentTitle",
|
|
89
|
-
componentId: "sc-1ul3b7n-4"
|
|
90
|
-
})(["display:block;font-family:\"Roboto\";font-weight:500;font-size:12px;line-height:16px;color:#333333;"]);
|
|
91
|
-
|
|
92
|
-
exports.PromotedContentTitle = PromotedContentTitle;
|
|
93
|
-
|
|
94
|
-
const PromotedContentGrid = _styledComponents.default.div.withConfig({
|
|
95
|
-
displayName: "styles__PromotedContentGrid",
|
|
96
|
-
componentId: "sc-1ul3b7n-5"
|
|
97
|
-
})(["display:grid;grid-template-columns:repeat(2,1fr);gap:16px 32px;margin-block-start:16px;@media (min-width:", "px){grid-template-columns:repeat(4,1fr);}"], _tsStyleguide.breakpoints.wide);
|
|
98
|
-
|
|
99
|
-
exports.PromotedContentGrid = PromotedContentGrid;
|
|
100
|
-
|
|
101
|
-
const PromotedContentAd = _styledComponents.default.div.withConfig({
|
|
102
|
-
displayName: "styles__PromotedContentAd",
|
|
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:#e4e4e4;}@media (min-width:", "px){&:not(:last-child)::after{position:absolute;content:\"\";top:0;right:-16px;width:1px;height:100%;background-color:#e4e4e4;}}"], _tsStyleguide.breakpoints.wide);
|
|
105
|
-
|
|
106
|
-
exports.PromotedContentAd = PromotedContentAd;
|
|
107
|
-
|
|
108
|
-
const PromotedContentSectionDivider = _styledComponents.default.div.withConfig({
|
|
109
|
-
displayName: "styles__PromotedContentSectionDivider",
|
|
110
|
-
componentId: "sc-1ul3b7n-7"
|
|
111
|
-
})(["border-top:1px solid #e4e4e4;grid-column:1 / 3;@media (min-width:", "px){display:none;}"], _tsStyleguide.breakpoints.wide);
|
|
112
|
-
|
|
113
|
-
exports.PromotedContentSectionDivider = PromotedContentSectionDivider;
|
|
114
79
|
var _default = styles;
|
|
115
80
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/article-extras",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.1-alpha.2+d3efc8ea47",
|
|
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",
|
|
@@ -49,15 +49,14 @@
|
|
|
49
49
|
"webpack": "4.30.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@times-components/article-comments": "^0.44.
|
|
52
|
+
"@times-components/article-comments": "^0.44.3-alpha.2+d3efc8ea47",
|
|
53
53
|
"@times-components/article-topics": "^4.11.55",
|
|
54
54
|
"@times-components/button": "^2.10.61",
|
|
55
55
|
"@times-components/context": "^1.24.0",
|
|
56
56
|
"@times-components/message-bar": "^0.7.85",
|
|
57
|
-
"@times-components/related-articles": "^6.17.
|
|
58
|
-
"@times-components/save-and-share-bar": "^0.22.
|
|
59
|
-
"@times-components/ts-components": "^1.
|
|
60
|
-
"@times-components/ts-newskit": "^1.189.0",
|
|
57
|
+
"@times-components/related-articles": "^6.17.81-alpha.2+d3efc8ea47",
|
|
58
|
+
"@times-components/save-and-share-bar": "^0.22.5-alpha.2+d3efc8ea47",
|
|
59
|
+
"@times-components/ts-components": "^1.101.1-alpha.2+d3efc8ea47",
|
|
61
60
|
"@times-components/ts-styleguide": "^1.50.34",
|
|
62
61
|
"@times-components/user-state": "^0.5.51",
|
|
63
62
|
"@times-components/utils": "^6.26.0",
|
|
@@ -75,5 +74,5 @@
|
|
|
75
74
|
"publishConfig": {
|
|
76
75
|
"access": "public"
|
|
77
76
|
},
|
|
78
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "d3efc8ea47b340b159eabc6c4fbace8579061140"
|
|
79
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
|
|
1
|
+
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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/related-articles/rnw")},function(e,t){e.exports=require("@times-components/message-bar/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(1),o=n.n(r),i=(n(5),n(3)),a=n.n(i),c=n(6),l=n.n(c),s=n(7),d=n.n(s),p=n(8),u=n(9),m=n.n(u),b=n(4),f=n(10),g=n.n(f),h=n(11),y=n(2),w=n.n(y),x=n(0),O=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 v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{topicsContainer:{borderTopColor:x.colours.functional.keyline,borderTopWidth:1},topicsContainerTablet:{alignSelf:"center",width:x.tabletWidth},topicsMetaContainer:{justifyContent:"flex-start"}});const S=e=>{let t=e.topics;return t&&t.length>0?o.a.createElement(O,null,o.a.createElement("nav",{"data-cy":"topic-tags"},o.a.createElement(g.a,{style:E.topicsContainer,topics:t}))):null};S.defaultProps={topics:null};var P=S;const C=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;")),k=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);function q(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B=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),I=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),N=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%;}}"]);_(_({},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),_(_({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 T={clear:"both"},D=e=>{let t=e.analyticsStream,n=e.articleId,r=e.commentsEnabled,i=e.registerNode,c=e.savingEnabled,s=e.sharingEnabled,u=e.articleUrl,f=e.section,g=e.articleHeadline,h=e.relatedArticleSlice,y=e.relatedArticlesVisible,w=e.commentingConfig,x=e.topics,O=e.isSharingSavingEnabled,v=e.isCommentEnabled,j=e.storefrontConfig,E=e.breadcrumbs,S=e.domainSpecificUrl,q=e.isEntitlementFeatureEnabled;const _=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{showBorder:!1},t=e.showBorder;return E&&E.length>0?o.a.createElement(k,{$border:t},o.a.createElement(b.Breadcrumb,{data:E})):null},A=(e,r)=>o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{id:"related-articles",ref:e=>i(e)},r&&_({showBorder:!1}),o.a.createElement(d.a,{analyticsStream:t,isVisible:y,slice:h}),e&&o.a.createElement(b.RecommendedFetch,{articleId:n,articleHeadline:g,articleSection:f})),o.a.createElement(B,{className:"group-3 hidden",key:"1"},o.a.createElement(I,null,"Sponsored"),o.a.createElement(N,{id:"advert-inarticle-native-1","data-parent":"group-3"}),o.a.createElement(N,{id:"advert-inarticle-native-2","data-parent":"group-3"})));return o.a.createElement(a.a,{state:a.a.showArticleExtras,fallback:A(!1,!0)},o.a.createElement("div",{style:T}),_({showBorder:x&&x.length>0}),o.a.createElement(P,{topics:x}),O&&o.a.createElement(a.a,{state:a.a.showSaveAndShareBar},o.a.createElement(p.MessageContext.Consumer,null,e=>{let t=e.showMessage;return o.a.createElement(C,{showBottomBorder:!h},o.a.createElement(m.a,{articleId:n,articleHeadline:g,articleUrl:u,onCopyLink:()=>t("Article link copied"),onSaveToMyArticles:()=>{},onShareOnEmail:()=>{},savingEnabled:c,sharingEnabled:s}))})),A(!0,!1),o.a.createElement(l.a,{articleId:n,isEnabled:r,commentingConfig:w,isCommentEnabled:v,storefrontConfig:j,domainSpecificUrl:S,isEntitlementFeatureEnabled:q}))};D.defaultProps={relatedArticleSlice:null,topics:null,isSharingSavingEnabled:!0,isCommentEnabled:!0,breadcrumbs:[]};var M=D;t.default=M}]);
|