@times-components/author-profile 6.20.5 → 6.20.7
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 +16 -0
- package/dist/author-profile-head-image.js +1 -2
- package/package.json +5 -5
- package/rnw.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [6.20.7](https://github.com/newsuk/times-components/compare/@times-components/author-profile@6.20.6...@times-components/author-profile@6.20.7) (2025-06-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @times-components/author-profile
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [6.20.6](https://github.com/newsuk/times-components/compare/@times-components/author-profile@6.20.5...@times-components/author-profile@6.20.6) (2025-06-02)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @times-components/author-profile
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [6.20.5](https://github.com/newsuk/times-components/compare/@times-components/author-profile@6.20.4...@times-components/author-profile@6.20.5) (2025-05-20)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @times-components/author-profile
|
|
@@ -21,8 +21,7 @@ var AuthorProfileHeadImage = function AuthorProfileHeadImage(_ref) {
|
|
|
21
21
|
aspectRatio: 1,
|
|
22
22
|
style: _newStyles["default"].authorPhoto,
|
|
23
23
|
uri: uri,
|
|
24
|
-
accessibilityLabel: "author-image"
|
|
25
|
-
isWebPFormatActive: true
|
|
24
|
+
accessibilityLabel: "author-image"
|
|
26
25
|
});
|
|
27
26
|
};
|
|
28
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/author-profile",
|
|
3
|
-
"version": "6.20.
|
|
3
|
+
"version": "6.20.7",
|
|
4
4
|
"description": "Author profile information along with a list of articles they have written ",
|
|
5
5
|
"main": "dist/author-profile",
|
|
6
6
|
"dev": "src/author-profile",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"homepage": "https://github.com/newsuk/times-components#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "7.4.4",
|
|
36
|
-
"@times-components/ad": "2.
|
|
36
|
+
"@times-components/ad": "2.23.0",
|
|
37
37
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
38
38
|
"@times-components/jest-configurator-web": "0.8.2",
|
|
39
39
|
"@times-components/jest-serializer": "3.16.0",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"webpack": "4.30.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@times-components/article-list": "9.20.
|
|
62
|
+
"@times-components/article-list": "9.20.10",
|
|
63
63
|
"@times-components/gradient": "3.5.77",
|
|
64
64
|
"@times-components/icons": "2.23.16",
|
|
65
|
-
"@times-components/image": "6.19.
|
|
65
|
+
"@times-components/image": "6.19.3",
|
|
66
66
|
"@times-components/link": "3.18.1",
|
|
67
67
|
"@times-components/markup": "3.9.16",
|
|
68
68
|
"@times-components/markup-forest": "1.9.2",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "d4bacef922f25d0e11bf6a2e3a260d1912f03edb"
|
|
92
92
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=18)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/markup-forest/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){var r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/,o=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,c=/^\[object .+?Constructor\]$/,u="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,s=u||l||Function("return this")();var p,f=Array.prototype,d=Function.prototype,b=Object.prototype,g=s["__core-js_shared__"],m=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",y=d.toString,h=b.hasOwnProperty,w=b.toString,O=RegExp("^"+y.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=s.Symbol,v=f.splice,P=A(s,"Map"),_=A(Object,"create"),x=j?j.prototype:void 0,T=x?x.toString:void 0;function k(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function S(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function E(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function L(e,t){for(var r,n,o=e.length;o--;)if((r=e[o][0])===(n=t)||r!=r&&n!=n)return o;return-1}function D(e,t){for(var o,i=0,a=(t=function(e,t){if(R(e))return!1;var o=typeof e;if("number"==o||"symbol"==o||"boolean"==o||null==e||B(e))return!0;return n.test(e)||!r.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:R(o=t)?o:q(o)).length;null!=e&&i<a;)e=e[z(t[i++])];return i&&i==a?e:void 0}function C(e){return!(!F(e)||(t=e,m&&m in t))&&(function(e){var t=F(e)?w.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:c).test(function(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function I(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function A(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return C(r)?r:void 0}k.prototype.clear=function(){this.__data__=_?_(null):{}},k.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},k.prototype.get=function(e){var t=this.__data__;if(_){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return h.call(t,e)?t[e]:void 0},k.prototype.has=function(e){var t=this.__data__;return _?void 0!==t[e]:h.call(t,e)},k.prototype.set=function(e,t){return this.__data__[e]=_&&void 0===t?"__lodash_hash_undefined__":t,this},S.prototype.clear=function(){this.__data__=[]},S.prototype.delete=function(e){var t=this.__data__,r=L(t,e);return!(r<0)&&(r==t.length-1?t.pop():v.call(t,r,1),!0)},S.prototype.get=function(e){var t=this.__data__,r=L(t,e);return r<0?void 0:t[r][1]},S.prototype.has=function(e){return L(this.__data__,e)>-1},S.prototype.set=function(e,t){var r=this.__data__,n=L(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},E.prototype.clear=function(){this.__data__={hash:new k,map:new(P||S),string:new k}},E.prototype.delete=function(e){return I(this,e).delete(e)},E.prototype.get=function(e){return I(this,e).get(e)},E.prototype.has=function(e){return I(this,e).has(e)},E.prototype.set=function(e,t){return I(this,e).set(e,t),this};var q=N((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return o.test(e)&&r.push(""),e.replace(i,(function(e,t,n,o){r.push(n?o.replace(a,"$1"):t||e)})),r}));function z(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function N(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(N.Cache||E),r}N.Cache=E;var R=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,r){var n=null==e?void 0:D(e,t);return void 0===n?r:n}},function(e,t){e.exports=require("@times-components/tracking/rnw")},function(e,t){e.exports=require("@times-components/article-list/rnw")},function(e,t){e.exports=require("@times-components/provider/rnw")},function(e,t){e.exports=require("@times-components/pagination/rnw")},function(e,t){e.exports=require("@times-components/responsive/rnw")},function(e,t){e.exports=require("@times-components/gradient/rnw")},function(e,t){e.exports=require("@times-components/icons/rnw")},function(e,t){e.exports=require("@times-components/link/rnw")},function(e,t){e.exports=require("@times-components/markup/rnw")},function(e,t){e.exports=require("@times-components/image/rnw")},function(e,t){e.exports=require("react-helmet-async")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),i=r(6),a=r.n(i),c=r(8),u=r.n(c),l=r(10),s=r(9),p=r(11),f=r.n(p),d=r(3),b=r(2),g=r.n(b),m=r(4),y=r.n(m);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var j=w({},{biography:g.a.arrayOf(m.propTypes),isLoading:g.a.bool,jobTitle:g.a.string,name:g.a.string,twitter:g.a.string,uri:g.a.string,metaDescription:g.a.string,contractualTitle:g.a.string}),v=w({},{biography:[],isLoading:!0,jobTitle:"",name:"",twitter:"",uri:"",metaDescription:"",contractualTitle:""}),P=r(0),_=r(12),x=r.n(_);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E={authorHeadContainer:{alignItems:"center",backgroundColor:P.colours.functional.backgroundPrimary,borderBottomColor:P.colours.functional.border,borderBottomWidth:1,flexDirection:"column",paddingBottom:Object(P.spacing)(8),width:"100%"},authorHeadWrapper:{alignItems:"center",backgroundColor:"transparent",width:"100%"},authorPhoto:{borderColor:P.colours.functional.contrast,borderRadius:50,marginLeft:"auto",marginRight:"auto",overflow:"hidden",width:100},biography:k(k({color:P.colours.functional.primary},Object(P.fontFactory)({font:"body",fontSize:"secondary"})),{},{textAlign:"center"}),biographyContainer:{paddingBottom:Object(P.spacing)(6),paddingLeft:Object(P.spacing)(2),paddingRight:Object(P.spacing)(2),width:"100%"},jobTitle:k({color:P.colours.functional.secondary},Object(P.fontFactory)({font:"bodyRegularSmallCaps",fontSize:"meta"})),loadingContainer:{alignItems:"center",backgroundColor:P.colours.functional.backgroundPrimary,borderBottomColor:P.colours.functional.border,borderBottomWidth:1,minHeight:264,width:"100%"},loadingGradient:{flex:1},loadingRoundImage:{borderColor:P.colours.functional.contrast,borderRadius:50,height:100,overflow:"hidden",position:"absolute",top:Object(P.spacing)(6),width:100},name:k({color:P.colours.functional.brandColour},Object(P.fontFactory)({font:"headline",fontSize:"headline"})),twitter:{flexDirection:"row",paddingTop:Object(P.spacing)(2),paddingBottom:Object(P.spacing)(2)},twitterLink:k(k({color:P.colours.functional.action},Object(P.fontFactory)({font:"supporting",fontSize:"tertiaryTwitter"})),{},{paddingLeft:Object(P.spacing)(1),textDecorationLine:"none"})};function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I=D(D({},E),{},{jobTitle:D(D({},E.jobTitle),{},{WebkitFontSmoothing:"antialiased"}),twitter:D(D({},E.twitter),{},{alignItems:"flex-end",paddingBottom:Object(P.spacing)(2),paddingTop:Object(P.spacing)(3)}),twitterIcon:{alignSelf:"center"},twitterLink:D({},E.twitterLink),jobTitleContainer:{display:"flex",alignItems:"center"}}),A=function(){return o.a.createElement(d.TcView,{style:I.loadingContainer},o.a.createElement(d.TcView,{style:I.loadingRoundImage},o.a.createElement(x.a,{style:I.loadingGradient})))},q=r(5),z=r.n(q),N=z()(d.TcView).withConfig({displayName:"responsive__AuthorHeadWrapper",componentId:"sc-1vsivj7-0"})(["width:100%;padding-top:30px;@media (min-width:","px){padding-top:60px;}"],P.breakpoints.medium),R=z.a.h1.withConfig({displayName:"responsive__AuthorNameWrapper",componentId:"sc-1vsivj7-1"})(["border:0px solid black;box-sizing:border-box;display:inline;margin:0px;margin-bottom:12px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;color:",";font-family:",";font-size:","px;@media (min-width:","px){font-size:","px;margin-bottom:14px;}"],P.colours.functional.brandColour,P.fontsWithFallback.headline,P.fontSizes.headline,P.breakpoints.medium,P.fontSizes.articleHeadline),F=z()(d.TcView).withConfig({displayName:"responsive__BioContainer",componentId:"sc-1vsivj7-2"})(["width:100%;padding-left:",";padding-right:",";padding-top:6px;@media (min-width:","px){padding-left:0;padding-right:0;max-width:680px;padding-top:16px;}@media (min-width:","px){max-width:760px;}"],Object(P.spacing)(2),Object(P.spacing)(2),P.breakpoints.medium,P.breakpoints.huge),B=z()(d.TcView).withConfig({displayName:"responsive__ImageContainer",componentId:"sc-1vsivj7-3"})(["width:100%;margin-bottom:14px;@media (min-width:","px){margin-bottom:23px;}"],P.breakpoints.medium),H=z.a.h2.withConfig({displayName:"responsive__AuthorProfileHeadJobTitleContainer",componentId:"sc-1vsivj7-4"})(["border:0px solid black;box-sizing:border-box;color:rgb(0,0,0);display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;"]),M=function(e){var t=e.jobTitle;return o.a.createElement("div",{style:Object(d.checkStylesForUnits)(I.jobTitleContainer)},o.a.createElement(H,{role:"heading","aria-level":"2",style:Object(d.checkStylesForUnits)(I.jobTitle)},t.toLowerCase()))},W=r(13),$=r(14),V=function(e){var t=e.onTwitterLinkPress,r=e.twitter,n=e.url;return o.a.createElement(d.TcView,{style:I.twitter},o.a.createElement(d.TcView,{style:I.twitterIcon},o.a.createElement(W.IconTwitter,{fillColour:"currentColor",height:12,width:12})),o.a.createElement($.TextLink,{onPress:function(e){return t(e,{twitter:r,url:n})},style:I.twitterLink,testID:"twitterLink",url:n},"@",r))},U=r(7),G=Object(n.memo)((function(e){var t=e.isLoading,r=e.jobTitle,n=e.onTwitterLinkPress,i=e.renderBiography,a=e.renderImage,c=e.renderName,u=e.twitter;if(t)return o.a.createElement(A,null);return o.a.createElement(P.Animations.FadeIn,{style:{width:"100%"}},o.a.createElement(d.TcView,{style:I.authorHeadWrapper,"data-testid":"author-head"},a(),c(),r?o.a.createElement(M,{jobTitle:r}):null,function(){if(!u)return null;var e="https://twitter.com/".concat(u);return o.a.createElement(V,{onTwitterLinkPress:n,twitter:u,url:e})}(),i()))}));G.defaultProps={isLoading:!0,jobTitle:"",onTwitterLinkPress:function(){},twitter:""};var J,Q=(J=G,Object(U.withTrackEvents)(J,{analyticsEvents:[{actionName:"Pressed",eventName:"onTwitterLinkPress",getAttrs:function(e,t){return{twitterHandle:e.twitter,url:t[1]&&t[1].url}},trackingName:"TwitterLink"}]})),K=r(15),X=r.n(K),Y=function(e){var t=e.biography;return o.a.createElement(d.TcText,{style:Object(d.checkStylesForUnits)(I.biography),"data-testid":"author-bio"},y()(t,X.a))},Z=r(16),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ne(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ne(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oe=re(re({},E),{},{jobTitle:re(re({},E.jobTitle),{},{WebkitFontSmoothing:"antialiased"}),twitter:re(re({},E.twitter),{},{alignItems:"flex-end",paddingBottom:Object(P.spacing)(2),paddingTop:Object(P.spacing)(3)}),twitterIcon:{alignSelf:"center"},twitterLink:re({},E.twitterLink)}),ie=function(e){var t=e.uri;return o.a.createElement(ee.a,{aspectRatio:1,style:oe.authorPhoto,uri:t,accessibilityLabel:"author-image",isWebPFormatActive:!0})};ie.defaultProps={uri:""};var ae=ie,ce=function(e){var t=e.biography,r=e.isLoading,n=e.jobTitle,i=e.name,a=e.twitter,c=e.uri,u=e.contractualTitle,l=e.isLargeDevice;return o.a.createElement(N,{style:I.authorHeadContainer},o.a.createElement(Q,{isLoading:r,jobTitle:n,renderBiography:function(){return t?o.a.createElement(F,{style:I.biographyContainer},o.a.createElement(Y,{biography:t})):null},renderImage:function(){return c?o.a.createElement(B,{className:"lcpItem"},o.a.createElement(ae,{uri:c})):null},renderName:function(){return i?o.a.createElement(R,{role:"heading","aria-level":"1","data-testid":"author-name"},i):null},twitter:a,contractualTitle:u,isLargeDevice:l}))};ce.defaultProps=v;var ue=ce;function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}se(se({},{author:g.a.shape({biography:j.biography,image:j.uri,jobTitle:j.jobTitle,name:j.name,twitter:j.twitter,metaDescription:g.a.string}),error:g.a.object,isLoading:j.isLoading,page:g.a.number,pageSize:g.a.number,refetch:g.a.func.isRequired,slug:g.a.string.isRequired}),{},{onNext:g.a.func.isRequired,onPrev:g.a.func.isRequired});var fe=se({},{author:null,error:null,isLoading:!0,page:1,pageSize:10}),de=r(17);function be(e){var t=e.metaDescription,r=e.description,n=e.name,i="Get up to date information and read all the latest articles from ".concat(n,".");return t?i=t:r&&r.length&&(i=Object(m.renderTreeArrayAsText)(r).substring(0,200)),o.a.createElement(de.Helmet,null,o.a.createElement("title",null,n," | The Times & The Sunday Times"),o.a.createElement("meta",{content:i,name:"description"}))}be.defaultProps={metaDescription:null};var ge=be;function me(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ye(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var je=function(e){var t=e.author,r=e.error,n=e.isLoading,i=e.onArticlePress,l=e.onNext,p=e.onPrev,b=e.onTwitterLinkPress,g=e.page,m=e.pageSize,y=e.refetch,h=e.slug,w=e.metaDescription;if(r)return o.a.createElement(c.ArticleListPageError,{refetch:y});var O=n?{articles:[],image:"",jobTitle:"",name:"",twitter:"",contractualTitle:""}:t,j=O.articles,v=O.biography,P=O.hasLeadAssets,_=void 0===P||P,x=O.image,T=O.jobTitle,k=O.name,S=O.twitter,E=O.contractualTitle,L=o.a.createElement(ue,{biography:v,isLoading:n,jobTitle:T,name:k,onTwitterLinkPress:b,twitter:S,uri:x,contractualTitle:E}),D=_?s.AuthorArticlesWithImagesProvider:s.AuthorArticlesNoImagesProvider;return o.a.createElement(D,{articleImageRatio:"3:2",debounceTimeMs:250,page:g,pageSize:m,slug:h},(function(e){var t=e.author,r=e.error,n=e.isLoading,c=e.pageSize,s=e.refetch,b=e.fetchMore,m=e.variables.imageRatio,y=void 0===m?"3:2":m;return o.a.createElement(f.a,null,o.a.createElement(ge,{metaDescription:w,description:v,name:k}),o.a.createElement(u.a,{articleListHeader:L,articles:a()(t,"articles.list",[]),articlesLoading:n,count:a()(j,"count",0),emptyStateMessage:"Unfortunately, there are no articles relating to this author",error:r,fetchMore:function(e){return b({updateQuery:function(e,t){var r=t.fetchMoreResult;return r?{author:we(we({},e.author),{},{articles:we(we({},e.author.articles),{},{list:[].concat(me(e.author.articles.list),me(r.author.articles.list))})})}:e},variables:{skip:e}})},imageRatio:Object(d.ratioTextToFloat)(y),onArticlePress:i,onNext:l,onPrev:p,page:g,pageSize:c,refetch:s,showImages:_}))}))};je.defaultProps=fe;t.default=Object(l.withPageState)(function(e){return Object(U.withTrackingContext)(e,{getAttrs:function(e){var t,r=e.author,n=e.page,o=e.pageSize;return{articlesCount:a()(r,"articles.count",0),authorName:r&&r.name,page:n,pageSize:o,registrationType:(t=global.nuk&&global.nuk.user||{},t&&t.registrationType?t.registrationType:"")}},trackingObjectName:"AuthorProfile"})}(je))}]);
|
|
1
|
+
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=18)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/markup-forest/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){var r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/,o=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,c=/^\[object .+?Constructor\]$/,u="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,s=u||l||Function("return this")();var p,f=Array.prototype,d=Function.prototype,b=Object.prototype,g=s["__core-js_shared__"],m=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",y=d.toString,h=b.hasOwnProperty,w=b.toString,O=RegExp("^"+y.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=s.Symbol,v=f.splice,P=A(s,"Map"),_=A(Object,"create"),x=j?j.prototype:void 0,T=x?x.toString:void 0;function k(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function S(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function E(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function L(e,t){for(var r,n,o=e.length;o--;)if((r=e[o][0])===(n=t)||r!=r&&n!=n)return o;return-1}function D(e,t){for(var o,i=0,a=(t=function(e,t){if(R(e))return!1;var o=typeof e;if("number"==o||"symbol"==o||"boolean"==o||null==e||B(e))return!0;return n.test(e)||!r.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:R(o=t)?o:q(o)).length;null!=e&&i<a;)e=e[z(t[i++])];return i&&i==a?e:void 0}function C(e){return!(!F(e)||(t=e,m&&m in t))&&(function(e){var t=F(e)?w.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:c).test(function(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function I(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function A(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return C(r)?r:void 0}k.prototype.clear=function(){this.__data__=_?_(null):{}},k.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},k.prototype.get=function(e){var t=this.__data__;if(_){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return h.call(t,e)?t[e]:void 0},k.prototype.has=function(e){var t=this.__data__;return _?void 0!==t[e]:h.call(t,e)},k.prototype.set=function(e,t){return this.__data__[e]=_&&void 0===t?"__lodash_hash_undefined__":t,this},S.prototype.clear=function(){this.__data__=[]},S.prototype.delete=function(e){var t=this.__data__,r=L(t,e);return!(r<0)&&(r==t.length-1?t.pop():v.call(t,r,1),!0)},S.prototype.get=function(e){var t=this.__data__,r=L(t,e);return r<0?void 0:t[r][1]},S.prototype.has=function(e){return L(this.__data__,e)>-1},S.prototype.set=function(e,t){var r=this.__data__,n=L(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},E.prototype.clear=function(){this.__data__={hash:new k,map:new(P||S),string:new k}},E.prototype.delete=function(e){return I(this,e).delete(e)},E.prototype.get=function(e){return I(this,e).get(e)},E.prototype.has=function(e){return I(this,e).has(e)},E.prototype.set=function(e,t){return I(this,e).set(e,t),this};var q=N((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return o.test(e)&&r.push(""),e.replace(i,(function(e,t,n,o){r.push(n?o.replace(a,"$1"):t||e)})),r}));function z(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function N(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(N.Cache||E),r}N.Cache=E;var R=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,r){var n=null==e?void 0:D(e,t);return void 0===n?r:n}},function(e,t){e.exports=require("@times-components/tracking/rnw")},function(e,t){e.exports=require("@times-components/article-list/rnw")},function(e,t){e.exports=require("@times-components/provider/rnw")},function(e,t){e.exports=require("@times-components/pagination/rnw")},function(e,t){e.exports=require("@times-components/responsive/rnw")},function(e,t){e.exports=require("@times-components/gradient/rnw")},function(e,t){e.exports=require("@times-components/icons/rnw")},function(e,t){e.exports=require("@times-components/link/rnw")},function(e,t){e.exports=require("@times-components/markup/rnw")},function(e,t){e.exports=require("@times-components/image/rnw")},function(e,t){e.exports=require("react-helmet-async")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),i=r(6),a=r.n(i),c=r(8),u=r.n(c),l=r(10),s=r(9),p=r(11),f=r.n(p),d=r(3),b=r(2),g=r.n(b),m=r(4),y=r.n(m);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var j=w({},{biography:g.a.arrayOf(m.propTypes),isLoading:g.a.bool,jobTitle:g.a.string,name:g.a.string,twitter:g.a.string,uri:g.a.string,metaDescription:g.a.string,contractualTitle:g.a.string}),v=w({},{biography:[],isLoading:!0,jobTitle:"",name:"",twitter:"",uri:"",metaDescription:"",contractualTitle:""}),P=r(0),_=r(12),x=r.n(_);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E={authorHeadContainer:{alignItems:"center",backgroundColor:P.colours.functional.backgroundPrimary,borderBottomColor:P.colours.functional.border,borderBottomWidth:1,flexDirection:"column",paddingBottom:Object(P.spacing)(8),width:"100%"},authorHeadWrapper:{alignItems:"center",backgroundColor:"transparent",width:"100%"},authorPhoto:{borderColor:P.colours.functional.contrast,borderRadius:50,marginLeft:"auto",marginRight:"auto",overflow:"hidden",width:100},biography:k(k({color:P.colours.functional.primary},Object(P.fontFactory)({font:"body",fontSize:"secondary"})),{},{textAlign:"center"}),biographyContainer:{paddingBottom:Object(P.spacing)(6),paddingLeft:Object(P.spacing)(2),paddingRight:Object(P.spacing)(2),width:"100%"},jobTitle:k({color:P.colours.functional.secondary},Object(P.fontFactory)({font:"bodyRegularSmallCaps",fontSize:"meta"})),loadingContainer:{alignItems:"center",backgroundColor:P.colours.functional.backgroundPrimary,borderBottomColor:P.colours.functional.border,borderBottomWidth:1,minHeight:264,width:"100%"},loadingGradient:{flex:1},loadingRoundImage:{borderColor:P.colours.functional.contrast,borderRadius:50,height:100,overflow:"hidden",position:"absolute",top:Object(P.spacing)(6),width:100},name:k({color:P.colours.functional.brandColour},Object(P.fontFactory)({font:"headline",fontSize:"headline"})),twitter:{flexDirection:"row",paddingTop:Object(P.spacing)(2),paddingBottom:Object(P.spacing)(2)},twitterLink:k(k({color:P.colours.functional.action},Object(P.fontFactory)({font:"supporting",fontSize:"tertiaryTwitter"})),{},{paddingLeft:Object(P.spacing)(1),textDecorationLine:"none"})};function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I=D(D({},E),{},{jobTitle:D(D({},E.jobTitle),{},{WebkitFontSmoothing:"antialiased"}),twitter:D(D({},E.twitter),{},{alignItems:"flex-end",paddingBottom:Object(P.spacing)(2),paddingTop:Object(P.spacing)(3)}),twitterIcon:{alignSelf:"center"},twitterLink:D({},E.twitterLink),jobTitleContainer:{display:"flex",alignItems:"center"}}),A=function(){return o.a.createElement(d.TcView,{style:I.loadingContainer},o.a.createElement(d.TcView,{style:I.loadingRoundImage},o.a.createElement(x.a,{style:I.loadingGradient})))},q=r(5),z=r.n(q),N=z()(d.TcView).withConfig({displayName:"responsive__AuthorHeadWrapper",componentId:"sc-1vsivj7-0"})(["width:100%;padding-top:30px;@media (min-width:","px){padding-top:60px;}"],P.breakpoints.medium),R=z.a.h1.withConfig({displayName:"responsive__AuthorNameWrapper",componentId:"sc-1vsivj7-1"})(["border:0px solid black;box-sizing:border-box;display:inline;margin:0px;margin-bottom:12px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;color:",";font-family:",";font-size:","px;@media (min-width:","px){font-size:","px;margin-bottom:14px;}"],P.colours.functional.brandColour,P.fontsWithFallback.headline,P.fontSizes.headline,P.breakpoints.medium,P.fontSizes.articleHeadline),F=z()(d.TcView).withConfig({displayName:"responsive__BioContainer",componentId:"sc-1vsivj7-2"})(["width:100%;padding-left:",";padding-right:",";padding-top:6px;@media (min-width:","px){padding-left:0;padding-right:0;max-width:680px;padding-top:16px;}@media (min-width:","px){max-width:760px;}"],Object(P.spacing)(2),Object(P.spacing)(2),P.breakpoints.medium,P.breakpoints.huge),B=z()(d.TcView).withConfig({displayName:"responsive__ImageContainer",componentId:"sc-1vsivj7-3"})(["width:100%;margin-bottom:14px;@media (min-width:","px){margin-bottom:23px;}"],P.breakpoints.medium),H=z.a.h2.withConfig({displayName:"responsive__AuthorProfileHeadJobTitleContainer",componentId:"sc-1vsivj7-4"})(["border:0px solid black;box-sizing:border-box;color:rgb(0,0,0);display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;"]),M=function(e){var t=e.jobTitle;return o.a.createElement("div",{style:Object(d.checkStylesForUnits)(I.jobTitleContainer)},o.a.createElement(H,{role:"heading","aria-level":"2",style:Object(d.checkStylesForUnits)(I.jobTitle)},t.toLowerCase()))},W=r(13),$=r(14),V=function(e){var t=e.onTwitterLinkPress,r=e.twitter,n=e.url;return o.a.createElement(d.TcView,{style:I.twitter},o.a.createElement(d.TcView,{style:I.twitterIcon},o.a.createElement(W.IconTwitter,{fillColour:"currentColor",height:12,width:12})),o.a.createElement($.TextLink,{onPress:function(e){return t(e,{twitter:r,url:n})},style:I.twitterLink,testID:"twitterLink",url:n},"@",r))},U=r(7),G=Object(n.memo)((function(e){var t=e.isLoading,r=e.jobTitle,n=e.onTwitterLinkPress,i=e.renderBiography,a=e.renderImage,c=e.renderName,u=e.twitter;if(t)return o.a.createElement(A,null);return o.a.createElement(P.Animations.FadeIn,{style:{width:"100%"}},o.a.createElement(d.TcView,{style:I.authorHeadWrapper,"data-testid":"author-head"},a(),c(),r?o.a.createElement(M,{jobTitle:r}):null,function(){if(!u)return null;var e="https://twitter.com/".concat(u);return o.a.createElement(V,{onTwitterLinkPress:n,twitter:u,url:e})}(),i()))}));G.defaultProps={isLoading:!0,jobTitle:"",onTwitterLinkPress:function(){},twitter:""};var J,Q=(J=G,Object(U.withTrackEvents)(J,{analyticsEvents:[{actionName:"Pressed",eventName:"onTwitterLinkPress",getAttrs:function(e,t){return{twitterHandle:e.twitter,url:t[1]&&t[1].url}},trackingName:"TwitterLink"}]})),K=r(15),X=r.n(K),Y=function(e){var t=e.biography;return o.a.createElement(d.TcText,{style:Object(d.checkStylesForUnits)(I.biography),"data-testid":"author-bio"},y()(t,X.a))},Z=r(16),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ne(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ne(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oe=re(re({},E),{},{jobTitle:re(re({},E.jobTitle),{},{WebkitFontSmoothing:"antialiased"}),twitter:re(re({},E.twitter),{},{alignItems:"flex-end",paddingBottom:Object(P.spacing)(2),paddingTop:Object(P.spacing)(3)}),twitterIcon:{alignSelf:"center"},twitterLink:re({},E.twitterLink)}),ie=function(e){var t=e.uri;return o.a.createElement(ee.a,{aspectRatio:1,style:oe.authorPhoto,uri:t,accessibilityLabel:"author-image"})};ie.defaultProps={uri:""};var ae=ie,ce=function(e){var t=e.biography,r=e.isLoading,n=e.jobTitle,i=e.name,a=e.twitter,c=e.uri,u=e.contractualTitle,l=e.isLargeDevice;return o.a.createElement(N,{style:I.authorHeadContainer},o.a.createElement(Q,{isLoading:r,jobTitle:n,renderBiography:function(){return t?o.a.createElement(F,{style:I.biographyContainer},o.a.createElement(Y,{biography:t})):null},renderImage:function(){return c?o.a.createElement(B,{className:"lcpItem"},o.a.createElement(ae,{uri:c})):null},renderName:function(){return i?o.a.createElement(R,{role:"heading","aria-level":"1","data-testid":"author-name"},i):null},twitter:a,contractualTitle:u,isLargeDevice:l}))};ce.defaultProps=v;var ue=ce;function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}se(se({},{author:g.a.shape({biography:j.biography,image:j.uri,jobTitle:j.jobTitle,name:j.name,twitter:j.twitter,metaDescription:g.a.string}),error:g.a.object,isLoading:j.isLoading,page:g.a.number,pageSize:g.a.number,refetch:g.a.func.isRequired,slug:g.a.string.isRequired}),{},{onNext:g.a.func.isRequired,onPrev:g.a.func.isRequired});var fe=se({},{author:null,error:null,isLoading:!0,page:1,pageSize:10}),de=r(17);function be(e){var t=e.metaDescription,r=e.description,n=e.name,i="Get up to date information and read all the latest articles from ".concat(n,".");return t?i=t:r&&r.length&&(i=Object(m.renderTreeArrayAsText)(r).substring(0,200)),o.a.createElement(de.Helmet,null,o.a.createElement("title",null,n," | The Times & The Sunday Times"),o.a.createElement("meta",{content:i,name:"description"}))}be.defaultProps={metaDescription:null};var ge=be;function me(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ye(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var je=function(e){var t=e.author,r=e.error,n=e.isLoading,i=e.onArticlePress,l=e.onNext,p=e.onPrev,b=e.onTwitterLinkPress,g=e.page,m=e.pageSize,y=e.refetch,h=e.slug,w=e.metaDescription;if(r)return o.a.createElement(c.ArticleListPageError,{refetch:y});var O=n?{articles:[],image:"",jobTitle:"",name:"",twitter:"",contractualTitle:""}:t,j=O.articles,v=O.biography,P=O.hasLeadAssets,_=void 0===P||P,x=O.image,T=O.jobTitle,k=O.name,S=O.twitter,E=O.contractualTitle,L=o.a.createElement(ue,{biography:v,isLoading:n,jobTitle:T,name:k,onTwitterLinkPress:b,twitter:S,uri:x,contractualTitle:E}),D=_?s.AuthorArticlesWithImagesProvider:s.AuthorArticlesNoImagesProvider;return o.a.createElement(D,{articleImageRatio:"3:2",debounceTimeMs:250,page:g,pageSize:m,slug:h},(function(e){var t=e.author,r=e.error,n=e.isLoading,c=e.pageSize,s=e.refetch,b=e.fetchMore,m=e.variables.imageRatio,y=void 0===m?"3:2":m;return o.a.createElement(f.a,null,o.a.createElement(ge,{metaDescription:w,description:v,name:k}),o.a.createElement(u.a,{articleListHeader:L,articles:a()(t,"articles.list",[]),articlesLoading:n,count:a()(j,"count",0),emptyStateMessage:"Unfortunately, there are no articles relating to this author",error:r,fetchMore:function(e){return b({updateQuery:function(e,t){var r=t.fetchMoreResult;return r?{author:we(we({},e.author),{},{articles:we(we({},e.author.articles),{},{list:[].concat(me(e.author.articles.list),me(r.author.articles.list))})})}:e},variables:{skip:e}})},imageRatio:Object(d.ratioTextToFloat)(y),onArticlePress:i,onNext:l,onPrev:p,page:g,pageSize:c,refetch:s,showImages:_}))}))};je.defaultProps=fe;t.default=Object(l.withPageState)(function(e){return Object(U.withTrackingContext)(e,{getAttrs:function(e){var t,r=e.author,n=e.page,o=e.pageSize;return{articlesCount:a()(r,"articles.count",0),authorName:r&&r.name,page:n,pageSize:o,registrationType:(t=global.nuk&&global.nuk.user||{},t&&t.registrationType?t.registrationType:"")}},trackingObjectName:"AuthorProfile"})}(je))}]);
|