@twreporter/react-article-components 1.7.0-rc.4 → 1.7.0-rc.5

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,14 @@
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
+ # [1.7.0-rc.5](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-article-components@1.7.0-rc.4...@twreporter/react-article-components@1.7.0-rc.5) (2022-10-26)
7
+
8
+ **Note:** Version bump only for package @twreporter/react-article-components
9
+
10
+
11
+
12
+
13
+
6
14
  # [1.7.0-rc.4](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-article-components@1.7.0-rc.3...@twreporter/react-article-components@1.7.0-rc.4) (2022-10-25)
7
15
 
8
16
  **Note:** Version bump only for package @twreporter/react-article-components
@@ -238,8 +238,7 @@ var Img = /*#__PURE__*/function (_React$PureComponent) {
238
238
  defaultImage = _this$props2.defaultImage,
239
239
  objectFit = _this$props2.objectFit,
240
240
  objectPosition = _this$props2.objectPosition,
241
- sizes = _this$props2.sizes,
242
- isLazyLoaded = _this$props2.isLazyLoaded;
241
+ sizes = _this$props2.sizes;
243
242
  var appendedClassName = className + ' avoid-break';
244
243
 
245
244
  var defaultImageOriginalUrl = _.get(defaultImage, 'url');
@@ -277,8 +276,7 @@ var Img = /*#__PURE__*/function (_React$PureComponent) {
277
276
  sizes: this._supportObjectFit ? sizes : '',
278
277
  src: defaultImageSrc,
279
278
  srcSet: this._supportObjectFit ? srcset : '',
280
- hide: !this._supportObjectFit,
281
- loading: isLazyLoaded ? 'lazy' : 'eager'
279
+ hide: !this._supportObjectFit
282
280
  }, imgProps)), this._supportObjectFit ? null : /*#__PURE__*/_react["default"].createElement(FallbackObjectFitImg, {
283
281
  url: _.get(defaultImage, 'url'),
284
282
  objectFit: objectFit,
@@ -289,8 +287,7 @@ var Img = /*#__PURE__*/function (_React$PureComponent) {
289
287
  ref: this._img,
290
288
  sizes: sizes,
291
289
  src: defaultImageSrc,
292
- srcSet: srcset,
293
- loading: isLazyLoaded ? 'lazy' : 'eager'
290
+ srcSet: srcset
294
291
  }, imgProps))));
295
292
  }
296
293
  }]);
@@ -316,8 +313,7 @@ _defineProperty(Img, "propTypes", {
316
313
  imageSet: _propTypes["default"].arrayOf(_imgWithPlaceholder["default"].imagePropType),
317
314
  objectFit: _propTypes["default"].oneOf([objectFitConsts.cover, objectFitConsts.contain]),
318
315
  objectPosition: _propTypes["default"].string,
319
- sizes: _propTypes["default"].string.isRequired,
320
- isLazyLoaded: _propTypes["default"].bool
316
+ sizes: _propTypes["default"].string.isRequired
321
317
  });
322
318
 
323
319
  _defineProperty(Img, "defaultProps", {
@@ -329,6 +325,5 @@ _defineProperty(Img, "defaultProps", {
329
325
  imgProps: {},
330
326
  placeholderNoBlur: false,
331
327
  noImgPlaceholder: false,
332
- sizes: '',
333
- isLazyLoaded: true
328
+ sizes: ''
334
329
  });
@@ -147,8 +147,7 @@ var FullScreenLeading = /*#__PURE__*/function (_React$PureComponent) {
147
147
  defaultImage: poster.mobile,
148
148
  objectFit: "cover",
149
149
  objectPostion: "center center",
150
- sizes: "(max-width: 800px) 800px, (max-width: 1200px) 1200px, 2000px",
151
- isLazyLoaded: false
150
+ sizes: "(max-width: 800px) 800px, (max-width: 1200px) 1200px, 2000px"
152
151
  }));
153
152
 
154
153
  if (!this.isEmptyPortraitPoster(portraitPoster)) {
@@ -158,8 +157,7 @@ var FullScreenLeading = /*#__PURE__*/function (_React$PureComponent) {
158
157
  imageSet: [portraitPoster.mobile],
159
158
  defaultImage: portraitPoster.mobile,
160
159
  objectFit: "cover",
161
- objectPostion: "center center",
162
- isLazyLoaded: false
160
+ objectPostion: "center center"
163
161
  })));
164
162
  }
165
163
 
@@ -163,8 +163,7 @@ var NormalLeading = /*#__PURE__*/function (_React$PureComponent) {
163
163
  imgPlaceholderSrc: _.get(poster, 'tiny.url', ''),
164
164
  imageSet: [poster.mobile, poster.tablet, poster.desktop],
165
165
  defaultImage: poster.mobile,
166
- sizes: "(max-width: 800px) 800px, (max-width: 1200px) 1200px, 2000px",
167
- isLazyLoaded: false
166
+ sizes: "(max-width: 800px) 800px, (max-width: 1200px) 1200px, 2000px"
168
167
  }), figureCaption ? /*#__PURE__*/_react["default"].createElement(FigCaption, null, figureCaption) : null)));
169
168
  }
170
169
  }]);
@@ -157,8 +157,7 @@ var LeadingBlock = /*#__PURE__*/function (_PureComponent) {
157
157
  defaultImage: poster.mobile,
158
158
  objectFit: "cover",
159
159
  objectPostion: "center center",
160
- sizes: "(max-width: 800px) 800px, (max-width: 1200px) 1200px, 2000px",
161
- isLazyLoaded: false
160
+ sizes: "(max-width: 800px) 800px, (max-width: 1200px) 1200px, 2000px"
162
161
  }))));
163
162
  }
164
163
  }]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter/react-article-components",
3
- "version": "1.7.0-rc.4",
3
+ "version": "1.7.0-rc.5",
4
4
  "description": "The Reporter react article components, which are used in article page",
5
5
  "main": "lib/components/article-page.js",
6
6
  "repository": "https://github.com/twreporter/twreporter-npm-packages.git",
@@ -40,5 +40,5 @@
40
40
  "files": [
41
41
  "lib"
42
42
  ],
43
- "gitHead": "b21fabf303948f309fe4d1cce92fd0af3371ff91"
43
+ "gitHead": "106b538158beb11beb359cc901e6dc6649b0bcc8"
44
44
  }