@times-components/image 6.13.1 → 6.13.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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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.13.3](https://github.com/newsuk/times-components/compare/@times-components/image@6.13.2...@times-components/image@6.13.3) (2022-10-13)
7
+
8
+ **Note:** Version bump only for package @times-components/image
9
+
10
+
11
+
12
+
13
+
14
+ ## [6.13.2](https://github.com/newsuk/times-components/compare/@times-components/image@6.13.1...@times-components/image@6.13.2) (2022-09-06)
15
+
16
+
17
+ ### Reverts
18
+
19
+ * **TDP-000:** Image without resize attribute ([#3141](https://github.com/newsuk/times-components/issues/3141)) ([437d3c9](https://github.com/newsuk/times-components/commit/437d3c919a53a00fa8f2dd5f320b49dcbee7ea0f))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [6.13.1](https://github.com/newsuk/times-components/compare/@times-components/image@6.13.0...@times-components/image@6.13.1) (2022-09-06)
7
26
 
8
27
 
package/dist/image.js CHANGED
@@ -119,11 +119,8 @@ var TimesImage = /*#__PURE__*/function (_Component) {
119
119
  url = _ref.url;
120
120
  var highResIsLoaded = this.state.highResIsLoaded;
121
121
  var accessibilityLabel = this.props.accessibilityLabel;
122
- console.log("ImageRender", url, "highResImage", !lowResSize || highResSize);
123
122
 
124
123
  if (!lowResSize || highResSize) {
125
- console.log("ImageRender", url, "highResImage", highResSize);
126
- console.log("ImageRender", url, "highResImage", (0, _utils.appendToImageURL)(url, "resize", highResSize));
127
124
  return /*#__PURE__*/_react["default"].createElement(_responsive["default"], {
128
125
  alt: accessibilityLabel,
129
126
  ref: this.getHighResImage,
@@ -155,8 +152,6 @@ var TimesImage = /*#__PURE__*/function (_Component) {
155
152
  imageSource = (0, _utils.appendToImageURL)(imageSource, "quality", lowResQuality);
156
153
  }
157
154
 
158
- console.log("ImageRender", url, "lowResImage", lowResSize, lowResQuality);
159
- console.log("ImageRender", url, "lowResImage", imageSource);
160
155
  return /*#__PURE__*/_react["default"].createElement(_responsive["default"], {
161
156
  alt: accessibilityLabel,
162
157
  ref: this.getLowResImage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-components/image",
3
- "version": "6.13.1",
3
+ "version": "6.13.3",
4
4
  "main": "dist/index",
5
5
  "dev": "src/index",
6
6
  "scripts": {
@@ -33,8 +33,8 @@
33
33
  "@babel/core": "7.4.4",
34
34
  "@times-components/eslint-config-thetimes": "0.8.18",
35
35
  "@times-components/jest-configurator-web": "0.8.0",
36
- "@times-components/jest-serializer": "3.4.0",
37
- "@times-components/storybook": "4.5.0",
36
+ "@times-components/jest-serializer": "3.4.1",
37
+ "@times-components/storybook": "4.5.1",
38
38
  "@times-components/test-utils": "2.4.0",
39
39
  "@times-components/webpack-configurator": "2.1.0",
40
40
  "babel-jest": "24.8.0",
@@ -51,8 +51,8 @@
51
51
  "webpack": "4.30.0"
52
52
  },
53
53
  "dependencies": {
54
- "@times-components/ts-styleguide": "1.37.0",
55
- "@times-components/utils": "6.15.0",
54
+ "@times-components/ts-styleguide": "1.37.1",
55
+ "@times-components/utils": "6.15.1",
56
56
  "prop-types": "15.7.2",
57
57
  "styled-components": "4.3.2"
58
58
  },
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "3df88abd59cac767ff875c11dab2eb7cc553af9a"
70
+ "gitHead": "d33c3115e165e09794ffdfd7931e217620f7ce07"
71
71
  }
package/rnw.js CHANGED
@@ -1 +1 @@
1
- module.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=5)}([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/ts-styleguide/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),i=n(2),a=n(1),s=n.n(a),l=n(3),u={placeholder:{alignItems:"center",backgroundColor:l.colours.functional.backgroundSecondary,bottom:0,justifyContent:"center",left:0,position:"absolute",right:0,top:0,zIndex:0}};var c=function(){return r.a.createElement("svg",{height:"auto",version:"1.1",viewBox:"145 50 108 120",width:"100%",style:{maxWidth:"25%",maxHeight:"50%"}},r.a.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},r.a.createElement("path",{d:"M211.26076,54 L211.231367,54 L147.67512,54 L145,85.7081465 L146.922096,86.4489102 C146.922096,86.4489102 164.867589,68.1355181 168.301115,65.0001546 C171.728017,61.8689133 174.237132,61.0885763 176.436179,60.3527593 C180.998206,59.169681 185.977937,59.2150255 185.977937,59.2150255 L186.109581,59.2150255 L186.109581,156.560932 L169.259886,164.473953 L169.259886,166 L228.735147,166 L228.735147,164.473953 L211.889177,156.560932 L211.889177,59.2150255 L212.01751,59.2150255 C212.01751,59.2150255 216.992272,59.169681 221.558854,60.3527593 C223.757072,61.0885763 226.266601,61.8689133 229.691848,65.0001546 C233.130341,68.1355181 251.071695,86.4489102 251.071695,86.4489102 L253,85.7081465 L250.317842,54 L211.270695,54 L211.242545,54",fill:l.colours.functional.contrast})))};function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){var t=e.borderRadius,n=void 0===t?0:t,o=f(f({},u.placeholder),{},{borderRadius:n});return r.a.createElement(i.TcView,{height:"100%",style:o,width:"100%"},r.a.createElement(c,null))},h=(s.a.object,s.a.string,s.a.number,s.a.number,s.a.bool,s.a.bool,s.a.number,s.a.number,s.a.number,s.a.func,s.a.bool,s.a.string,{aspectRatio:void 0,disablePlaceholder:!1,fadeImageIn:!1,highResSize:null,lowResSize:null,rounded:!1,uri:null}),b=n(4),y=n.n(b).a.img.withConfig({displayName:"responsive",componentId:"sc-1nnon4d-0"})(["display:block;opacity:",";position:absolute;transition:opacity 0.3s ease-in-out;width:100%;z-index:",";"],(function(e){return e.isLoaded?1:0}),(function(e){return e.zIndex}));function m(e){return(m="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 R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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,o=P(e);if(t){var r=P(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?j(e):t}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=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&&w(e,t)}(s,e);var t,n,o,a=v(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,e)).state={highResIsLoaded:!1,highResIsVisible:!1,imageIsLoaded:!1,lowResIsLoaded:!e.fadeImageIn},t.handleHighResOnLoad=t.handleHighResOnLoad.bind(j(t)),t.handleLowResOnLoad=t.handleLowResOnLoad.bind(j(t)),t.onHighResTransitionEnd=t.onHighResTransitionEnd.bind(j(t)),t.getLowResImage=t.getLowResImage.bind(j(t)),t.getHighResImage=t.getHighResImage.bind(j(t)),t}return t=s,(n=[{key:"onHighResTransitionEnd",value:function(){this.setState({highResIsVisible:!0})}},{key:"getHighResImage",value:function(e){e&&e.complete&&this.handleHighResOnLoad()}},{key:"getLowResImage",value:function(e){e&&e.complete&&this.handleLowResOnLoad()}},{key:"handleLowResOnLoad",value:function(){this.setState({imageIsLoaded:!0,lowResIsLoaded:!0})}},{key:"handleHighResOnLoad",value:function(){this.setState({highResIsLoaded:!0,imageIsLoaded:!0})}},{key:"highResImage",value:function(e){var t=e.highResSize,n=e.lowResSize,o=e.url,a=this.state.highResIsLoaded,s=this.props.accessibilityLabel;return console.log("ImageRender",o,"highResImage",!n||t),!n||t?(console.log("ImageRender",o,"highResImage",t),console.log("ImageRender",o,"highResImage",Object(i.appendToImageURL)(o,"resize",t)),r.a.createElement(y,{alt:s,ref:this.getHighResImage,isLoaded:a,onLoad:this.handleHighResOnLoad,onTransitionEnd:this.onHighResTransitionEnd,src:Object(i.appendToImageURL)(o,"resize",t),zIndex:2})):null}},{key:"lowResImage",value:function(e){var t=e.lowResQuality,n=e.lowResSize,o=e.url,a=this.state,s=a.highResIsVisible,l=a.lowResIsLoaded,u=this.props.accessibilityLabel;if(n&&!s){var c=Object(i.appendToImageURL)(o,"resize",n);return t&&(c=Object(i.appendToImageURL)(c,"quality",t)),console.log("ImageRender",o,"lowResImage",n,t),console.log("ImageRender",o,"lowResImage",c),r.a.createElement(y,{alt:u,ref:this.getLowResImage,isLoaded:l,onLoad:this.handleLowResOnLoad,src:c,zIndex:1})}return null}},{key:"render",value:function(){var e=this.props,t=e.aspectRatio,n=e.disablePlaceholder,o=e.highResSize,a=e.lowResQuality,s=e.lowResSize,l=e.style,u=e.uri,c=e.onLayout,d=e.rounded,f=this.state.imageIsLoaded,p=Object(i.addMissingProtocol)(u),h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l);return d&&Object.assign(h,{borderRadius:"50%",overflow:"hidden"}),r.a.createElement(i.TcView,{onLayout:c,style:h,testID:"Image"},r.a.createElement("div",{style:{paddingBottom:"".concat(100/t,"%")}},this.highResImage({highResSize:o,lowResSize:s,url:p}),this.lowResImage({lowResQuality:a,lowResSize:s,url:p}),n||f?null:r.a.createElement(g,{borderRadius:d?"50%":0})))}}])&&L(t.prototype,n),o&&L(t,o),s}(o.Component);S.defaultProps=h;var E=S,x=E;n.d(t,"ModalImage",(function(){return x})),n.d(t,"Placeholder",(function(){return g}));t.default=E}]);
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=5)}([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/ts-styleguide/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(2),a=n(1),s=n.n(a),u=n(3),c={placeholder:{alignItems:"center",backgroundColor:u.colours.functional.backgroundSecondary,bottom:0,justifyContent:"center",left:0,position:"absolute",right:0,top:0,zIndex:0}};var l=function(){return o.a.createElement("svg",{height:"auto",version:"1.1",viewBox:"145 50 108 120",width:"100%",style:{maxWidth:"25%",maxHeight:"50%"}},o.a.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},o.a.createElement("path",{d:"M211.26076,54 L211.231367,54 L147.67512,54 L145,85.7081465 L146.922096,86.4489102 C146.922096,86.4489102 164.867589,68.1355181 168.301115,65.0001546 C171.728017,61.8689133 174.237132,61.0885763 176.436179,60.3527593 C180.998206,59.169681 185.977937,59.2150255 185.977937,59.2150255 L186.109581,59.2150255 L186.109581,156.560932 L169.259886,164.473953 L169.259886,166 L228.735147,166 L228.735147,164.473953 L211.889177,156.560932 L211.889177,59.2150255 L212.01751,59.2150255 C212.01751,59.2150255 216.992272,59.169681 221.558854,60.3527593 C223.757072,61.0885763 226.266601,61.8689133 229.691848,65.0001546 C233.130341,68.1355181 251.071695,86.4489102 251.071695,86.4489102 L253,85.7081465 L250.317842,54 L211.270695,54 L211.242545,54",fill:u.colours.functional.contrast})))};function f(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){var t=e.borderRadius,n=void 0===t?0:t,r=d(d({},c.placeholder),{},{borderRadius:n});return o.a.createElement(i.TcView,{height:"100%",style:r,width:"100%"},o.a.createElement(l,null))},h=(s.a.object,s.a.string,s.a.number,s.a.number,s.a.bool,s.a.bool,s.a.number,s.a.number,s.a.number,s.a.func,s.a.bool,s.a.string,{aspectRatio:void 0,disablePlaceholder:!1,fadeImageIn:!1,highResSize:null,lowResSize:null,rounded:!1,uri:null}),g=n(4),y=n.n(g).a.img.withConfig({displayName:"responsive",componentId:"sc-1nnon4d-0"})(["display:block;opacity:",";position:absolute;transition:opacity 0.3s ease-in-out;width:100%;z-index:",";"],(function(e){return e.isLoaded?1:0}),(function(e){return e.zIndex}));function m(e){return(m="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 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 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 L(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 v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(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=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=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&&v(e,t)}(s,e);var t,n,r,a=w(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,e)).state={highResIsLoaded:!1,highResIsVisible:!1,imageIsLoaded:!1,lowResIsLoaded:!e.fadeImageIn},t.handleHighResOnLoad=t.handleHighResOnLoad.bind(I(t)),t.handleLowResOnLoad=t.handleLowResOnLoad.bind(I(t)),t.onHighResTransitionEnd=t.onHighResTransitionEnd.bind(I(t)),t.getLowResImage=t.getLowResImage.bind(I(t)),t.getHighResImage=t.getHighResImage.bind(I(t)),t}return t=s,(n=[{key:"onHighResTransitionEnd",value:function(){this.setState({highResIsVisible:!0})}},{key:"getHighResImage",value:function(e){e&&e.complete&&this.handleHighResOnLoad()}},{key:"getLowResImage",value:function(e){e&&e.complete&&this.handleLowResOnLoad()}},{key:"handleLowResOnLoad",value:function(){this.setState({imageIsLoaded:!0,lowResIsLoaded:!0})}},{key:"handleHighResOnLoad",value:function(){this.setState({highResIsLoaded:!0,imageIsLoaded:!0})}},{key:"highResImage",value:function(e){var t=e.highResSize,n=e.lowResSize,r=e.url,a=this.state.highResIsLoaded,s=this.props.accessibilityLabel;return!n||t?o.a.createElement(y,{alt:s,ref:this.getHighResImage,isLoaded:a,onLoad:this.handleHighResOnLoad,onTransitionEnd:this.onHighResTransitionEnd,src:Object(i.appendToImageURL)(r,"resize",t),zIndex:2}):null}},{key:"lowResImage",value:function(e){var t=e.lowResQuality,n=e.lowResSize,r=e.url,a=this.state,s=a.highResIsVisible,u=a.lowResIsLoaded,c=this.props.accessibilityLabel;if(n&&!s){var l=Object(i.appendToImageURL)(r,"resize",n);return t&&(l=Object(i.appendToImageURL)(l,"quality",t)),o.a.createElement(y,{alt:c,ref:this.getLowResImage,isLoaded:u,onLoad:this.handleLowResOnLoad,src:l,zIndex:1})}return null}},{key:"render",value:function(){var e=this.props,t=e.aspectRatio,n=e.disablePlaceholder,r=e.highResSize,a=e.lowResQuality,s=e.lowResSize,u=e.style,c=e.uri,l=e.onLayout,f=e.rounded,d=this.state.imageIsLoaded,p=Object(i.addMissingProtocol)(c),h=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){R(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}({},u);return f&&Object.assign(h,{borderRadius:"50%",overflow:"hidden"}),o.a.createElement(i.TcView,{onLayout:l,style:h,testID:"Image"},o.a.createElement("div",{style:{paddingBottom:"".concat(100/t,"%")}},this.highResImage({highResSize:r,lowResSize:s,url:p}),this.lowResImage({lowResQuality:a,lowResSize:s,url:p}),n||d?null:o.a.createElement(b,{borderRadius:f?"50%":0})))}}])&&L(t.prototype,n),r&&L(t,r),s}(r.Component);S.defaultProps=h;var E=S,x=E;n.d(t,"ModalImage",(function(){return x})),n.d(t,"Placeholder",(function(){return b}));t.default=E}]);