@times-components/card 6.16.13 → 6.17.0
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/card-content.js +4 -2
- package/dist/card-prop-types.js +4 -2
- package/package.json +7 -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
|
+
# [6.17.0](https://github.com/newsuk/times-components/compare/@times-components/card@6.16.13...@times-components/card@6.17.0) (2025-04-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **TMRP-233:** implement webp images ([#4105](https://github.com/newsuk/times-components/issues/4105)) ([66f0ce5](https://github.com/newsuk/times-components/commit/66f0ce53c4cd8fe101d66fc18c69c758e786af46))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [6.16.13](https://github.com/newsuk/times-components/compare/@times-components/card@6.16.12...@times-components/card@6.16.13) (2025-04-11)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @times-components/card
|
package/dist/card-content.js
CHANGED
|
@@ -95,7 +95,8 @@ var CardContent = /*#__PURE__*/function (_Component) {
|
|
|
95
95
|
lowResSize = _this$props2.lowResSize,
|
|
96
96
|
relatedArticle = _this$props2.relatedArticle,
|
|
97
97
|
showImage = _this$props2.showImage,
|
|
98
|
-
isLcpItem = _this$props2.isLcpItem
|
|
98
|
+
isLcpItem = _this$props2.isLcpItem,
|
|
99
|
+
isWebPFormatActive = _this$props2.isWebPFormatActive;
|
|
99
100
|
var TcCardContainer = (0, _styledComponents["default"])(_utils.TcView).withConfig({
|
|
100
101
|
displayName: "card-content__TcCardContainer",
|
|
101
102
|
componentId: "sc-1w0wvq8-0"
|
|
@@ -117,7 +118,8 @@ var CardContent = /*#__PURE__*/function (_Component) {
|
|
|
117
118
|
lowResQuality: lowResQuality,
|
|
118
119
|
lowResSize: lowResSize,
|
|
119
120
|
uri: imageUri,
|
|
120
|
-
isLcpItem: isLcpItem
|
|
121
|
+
isLcpItem: isLcpItem,
|
|
122
|
+
isWebPFormatActive: isWebPFormatActive
|
|
121
123
|
}));
|
|
122
124
|
};
|
|
123
125
|
|
package/dist/card-prop-types.js
CHANGED
|
@@ -27,7 +27,8 @@ var cardPropTypes = _objectSpread(_objectSpread({}, _cardSharedPropTypes.sharedP
|
|
|
27
27
|
isLoading: _propTypes["default"].bool,
|
|
28
28
|
isLcpItem: _propTypes["default"].bool,
|
|
29
29
|
lowResQuality: _propTypes["default"].number,
|
|
30
|
-
lowResSize: _propTypes["default"].number
|
|
30
|
+
lowResSize: _propTypes["default"].number,
|
|
31
|
+
isWebPFormatActive: _propTypes["default"].bool
|
|
31
32
|
});
|
|
32
33
|
|
|
33
34
|
exports.cardPropTypes = cardPropTypes;
|
|
@@ -42,7 +43,8 @@ var cardDefaultProps = _objectSpread(_objectSpread({}, _cardSharedPropTypes.shar
|
|
|
42
43
|
isLoading: false,
|
|
43
44
|
isLcpItem: false,
|
|
44
45
|
lowResQuality: null,
|
|
45
|
-
lowResSize: null
|
|
46
|
+
lowResSize: null,
|
|
47
|
+
isWebPFormatActive: false
|
|
46
48
|
});
|
|
47
49
|
|
|
48
50
|
exports.cardDefaultProps = cardDefaultProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/card",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.17.0",
|
|
4
4
|
"main": "dist/card",
|
|
5
5
|
"dev": "src/card",
|
|
6
6
|
"scripts": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@babel/core": "7.4.4",
|
|
35
35
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
36
36
|
"@times-components/jest-configurator-web": "0.8.2",
|
|
37
|
-
"@times-components/jest-serializer": "3.
|
|
38
|
-
"@times-components/storybook": "4.13.
|
|
37
|
+
"@times-components/jest-serializer": "3.15.0",
|
|
38
|
+
"@times-components/storybook": "4.13.2",
|
|
39
39
|
"@times-components/test-utils": "2.4.2",
|
|
40
40
|
"@times-components/webpack-configurator": "2.1.1",
|
|
41
41
|
"babel-jest": "24.8.0",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"webpack": "4.30.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@times-components/gradient": "3.5.
|
|
57
|
-
"@times-components/image": "6.
|
|
56
|
+
"@times-components/gradient": "3.5.75",
|
|
57
|
+
"@times-components/image": "6.19.0",
|
|
58
58
|
"@times-components/responsive": "0.28.4",
|
|
59
59
|
"@times-components/ts-styleguide": "1.52.2",
|
|
60
|
-
"@times-components/utils": "6.31.
|
|
60
|
+
"@times-components/utils": "6.31.5",
|
|
61
61
|
"prop-types": "15.7.2",
|
|
62
62
|
"styled-components": "4.3.2"
|
|
63
63
|
},
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "07b292c2f7d20953935b846634c55df093705568"
|
|
76
76
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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=7)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/gradient/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/image/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(2),a=n(1),c=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(s({},{contentContainerClass:c.a.string,imageContainerClass:c.a.string,imageRatio:c.a.number,isReversed:c.a.bool,showImage:c.a.bool}),{},{children:c.a.node,fadeImageIn:c.a.bool,highResSize:c.a.number,imageAccessibilityLabel:c.a.string,imageStyle:c.a.object,imageUri:c.a.string,isLoading:c.a.bool,isLcpItem:c.a.bool,lowResQuality:c.a.number,lowResSize:c.a.number});var f=s(s({},{contentContainerClass:"",imageContainerClass:"",imageRatio:1.5,isReversed:!1,showImage:!1}),{},{children:null,fadeImageIn:!1,highResSize:null,imageRatio:1,imageStyle:{},imageUri:null,isLoading:!1,isLcpItem:!1,lowResQuality:null,lowResSize:null}),p=n(3),m=n(5),b=n.n(m),y=n(6),g=n.n(y),d=n(4),O=n.n(d),h={cardContainer:{alignItems:"flex-start",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end"},cardContainerTablet:{alignItems:"flex-start",flexDirection:"row",flexWrap:"wrap"},contentContainer:{flex:1,marginBottom:0,minWidth:"100%"},contentContainerTablet:{flex:1,marginBottom:0},headerContainer:{height:24,marginBottom:Object(i.spacing)(2),maxWidth:300},imageContainer:{flex:1,marginBottom:Object(i.spacing)(2),minWidth:"100%"},imageContainerTablet:{flex:1,maxWidth:320},lastBar:{marginBottom:0,maxWidth:240},loadingContentContainer:{minHeight:84},reversedCardContainer:{height:"auto"},reversedContentContainer:{marginBottom:Object(i.spacing)(2)},reversedImageContainer:{marginBottom:0},textContainer:{height:10,marginBottom:Object(i.spacing)(2)}};function j(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(){return o.a.createElement(r.Fragment,null,o.a.createElement(O.a,{degrees:264,style:h.headerContainer}),o.a.createElement(O.a,{degrees:267,style:h.textContainer}),o.a.createElement(O.a,{degrees:267,style:h.textContainer}),o.a.createElement(O.a,{degrees:267,style:w(w({},h.textContainer),h.lastBar)}))};function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=z(e);if(t){var o=z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(a,e);var t,n,r,i=D(a);function a(){return E(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.imageUri,r=t.lowResQuality,o=t.lowResSize,i=t.highResSize,a=t.isLoading,c=t.index;return n!==e.imageUri||r!==e.lowResQuality||o!==e.lowResSize||i!==e.highResSize||a!==e.isLoading||c!==e.index}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.contentContainerClass,r=e.fadeImageIn,i=e.highResSize,a=e.imageAccessibilityLabel,c=e.imageContainerClass,l=e.imageRatio,s=e.imageStyle,u=e.imageUri,f=e.isLoading,m=e.isReversed,y=e.lowResQuality,d=e.lowResSize,O=e.relatedArticle,j=e.showImage,w=e.isLcpItem,v=b()(p.TcView).withConfig({displayName:"card-content__TcCardContainer",componentId:"sc-1w0wvq8-0"})(["",";"],(function(e){return e.styles&&e.styles})),
|
|
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=7)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/gradient/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/image/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(2),a=n(1),c=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(s({},{contentContainerClass:c.a.string,imageContainerClass:c.a.string,imageRatio:c.a.number,isReversed:c.a.bool,showImage:c.a.bool}),{},{children:c.a.node,fadeImageIn:c.a.bool,highResSize:c.a.number,imageAccessibilityLabel:c.a.string,imageStyle:c.a.object,imageUri:c.a.string,isLoading:c.a.bool,isLcpItem:c.a.bool,lowResQuality:c.a.number,lowResSize:c.a.number,isWebPFormatActive:c.a.bool});var f=s(s({},{contentContainerClass:"",imageContainerClass:"",imageRatio:1.5,isReversed:!1,showImage:!1}),{},{children:null,fadeImageIn:!1,highResSize:null,imageRatio:1,imageStyle:{},imageUri:null,isLoading:!1,isLcpItem:!1,lowResQuality:null,lowResSize:null,isWebPFormatActive:!1}),p=n(3),m=n(5),b=n.n(m),y=n(6),g=n.n(y),d=n(4),O=n.n(d),h={cardContainer:{alignItems:"flex-start",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end"},cardContainerTablet:{alignItems:"flex-start",flexDirection:"row",flexWrap:"wrap"},contentContainer:{flex:1,marginBottom:0,minWidth:"100%"},contentContainerTablet:{flex:1,marginBottom:0},headerContainer:{height:24,marginBottom:Object(i.spacing)(2),maxWidth:300},imageContainer:{flex:1,marginBottom:Object(i.spacing)(2),minWidth:"100%"},imageContainerTablet:{flex:1,maxWidth:320},lastBar:{marginBottom:0,maxWidth:240},loadingContentContainer:{minHeight:84},reversedCardContainer:{height:"auto"},reversedContentContainer:{marginBottom:Object(i.spacing)(2)},reversedImageContainer:{marginBottom:0},textContainer:{height:10,marginBottom:Object(i.spacing)(2)}};function j(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(){return o.a.createElement(r.Fragment,null,o.a.createElement(O.a,{degrees:264,style:h.headerContainer}),o.a.createElement(O.a,{degrees:267,style:h.textContainer}),o.a.createElement(O.a,{degrees:267,style:h.textContainer}),o.a.createElement(O.a,{degrees:267,style:w(w({},h.textContainer),h.lastBar)}))};function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=z(e);if(t){var o=z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(a,e);var t,n,r,i=D(a);function a(){return E(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.imageUri,r=t.lowResQuality,o=t.lowResSize,i=t.highResSize,a=t.isLoading,c=t.index;return n!==e.imageUri||r!==e.lowResQuality||o!==e.lowResSize||i!==e.highResSize||a!==e.isLoading||c!==e.index}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.contentContainerClass,r=e.fadeImageIn,i=e.highResSize,a=e.imageAccessibilityLabel,c=e.imageContainerClass,l=e.imageRatio,s=e.imageStyle,u=e.imageUri,f=e.isLoading,m=e.isReversed,y=e.lowResQuality,d=e.lowResSize,O=e.relatedArticle,j=e.showImage,w=e.isLcpItem,v=e.isWebPFormatActive,P=b()(p.TcView).withConfig({displayName:"card-content__TcCardContainer",componentId:"sc-1w0wvq8-0"})(["",";"],(function(e){return e.styles&&e.styles})),x=function(){if(!j)return null;var e=O?h.imageContainer:h.imageContainerTablet;return o.a.createElement(p.TcView,{className:c,style:Object(p.checkStylesForUnits)(S(S(S({},e),s),m?h.reversedImageContainer:""))},o.a.createElement(g.a,{accessibilityLabel:a,aspectRatio:l,fadeImageIn:r,highResSize:i,lowResQuality:y,lowResSize:d,uri:u,isLcpItem:w,isWebPFormatActive:v}))},R=O?S(S({},h.cardContainer),{},{display:"block"}):h.cardContainer;return o.a.createElement(p.TcView,{style:Object(p.checkStylesForUnits)(S(S({},R),m?h.reversedCardContainer:""))},m?null:x(),o.a.createElement(P,{className:n,styles:Object(p.checkStylesForUnits)(S(S(S({},h.contentContainer),m?h.reversedContentContainer:""),f?h.loadingContentContainer:""))},f?o.a.createElement(C,null):t),m?x():null)}}])&&I(t.prototype,n),r&&I(t,r),a}(r.Component);B.defaultProps=f;var T=B,W=function(e){return e.isLoading?o.a.createElement(i.Animations.FadeIn,null,o.a.createElement(T,e)):o.a.createElement(T,e)};W.defaultProps=f;t.default=W}]);
|