@times-components/article 7.17.11 → 7.17.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/article.js +4 -0
- package/package.json +9 -9
- 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
|
+
## [7.17.12](https://github.com/newsuk/times-components/compare/@times-components/article@7.17.11...@times-components/article@7.17.12) (2024-09-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **TMRS-427:** refactor 410 error logic tc ([#3934](https://github.com/newsuk/times-components/issues/3934)) ([d715f97](https://github.com/newsuk/times-components/commit/d715f9716462d76bf92f0c2258c23714d5919196))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [7.17.11](https://github.com/newsuk/times-components/compare/@times-components/article@7.17.10...@times-components/article@7.17.11) (2024-09-16)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @times-components/article
|
package/dist/article.js
CHANGED
|
@@ -69,6 +69,10 @@ const Article = props => {
|
|
|
69
69
|
throw new TakeoverBailout("Aborted react render: Takeover page");
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
if (article && !article.tiles.length && !content.length) {
|
|
73
|
+
throw new Error("ENOCONTENT");
|
|
74
|
+
}
|
|
75
|
+
|
|
72
76
|
let onImagePressArticle = null;
|
|
73
77
|
|
|
74
78
|
if (onImagePress) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/article",
|
|
3
|
-
"version": "7.17.
|
|
3
|
+
"version": "7.17.12",
|
|
4
4
|
"description": "The article",
|
|
5
5
|
"main": "dist/article",
|
|
6
6
|
"dev": "src/article",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@babel/core": "7.4.4",
|
|
36
36
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
37
37
|
"@times-components/jest-configurator-web": "0.8.2",
|
|
38
|
-
"@times-components/provider-test-tools": "1.30.
|
|
38
|
+
"@times-components/provider-test-tools": "1.30.4",
|
|
39
39
|
"@times-components/storybook": "4.12.34",
|
|
40
40
|
"@times-components/tealium-utils": "0.9.1",
|
|
41
41
|
"@times-components/user-state": "0.5.51",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@times-components/ad": "2.22.23",
|
|
56
|
-
"@times-components/article-in-depth": "3.89.
|
|
57
|
-
"@times-components/article-magazine-comment": "3.85.
|
|
58
|
-
"@times-components/article-magazine-standard": "3.85.
|
|
59
|
-
"@times-components/article-main-comment": "2.88.
|
|
60
|
-
"@times-components/article-main-standard": "3.97.
|
|
56
|
+
"@times-components/article-in-depth": "3.89.8",
|
|
57
|
+
"@times-components/article-magazine-comment": "3.85.8",
|
|
58
|
+
"@times-components/article-magazine-standard": "3.85.8",
|
|
59
|
+
"@times-components/article-main-comment": "2.88.8",
|
|
60
|
+
"@times-components/article-main-standard": "3.97.8",
|
|
61
61
|
"@times-components/context": "1.24.0",
|
|
62
62
|
"@times-components/message-bar": "0.7.85",
|
|
63
|
-
"@times-components/provider": "1.41.
|
|
63
|
+
"@times-components/provider": "1.41.4",
|
|
64
64
|
"@times-components/responsive": "0.27.0",
|
|
65
65
|
"@times-components/ts-styleguide": "1.50.34"
|
|
66
66
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "84322b64e4bc8d5c462bf94770068949d79d437c"
|
|
79
79
|
}
|
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=9)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/article-main-standard/rnw")},function(e,t){e.exports=require("@times-components/article-magazine-comment/rnw")},function(e,t){e.exports=require("@times-components/article-in-depth/rnw")},function(e,t){e.exports=require("@times-components/article-magazine-standard/rnw")},function(e,t){e.exports=require("@times-components/article-main-comment/rnw")},function(e,t){e.exports=require("@times-components/responsive/rnw")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/message-bar/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(2),i=n.n(a),c=n(3),s=n.n(c),u=n(4),l=n.n(u),m=n(1),p=n.n(m),f=n(5),d=n.n(f),b=n(6),g=n.n(b),
|
|
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=9)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/article-main-standard/rnw")},function(e,t){e.exports=require("@times-components/article-magazine-comment/rnw")},function(e,t){e.exports=require("@times-components/article-in-depth/rnw")},function(e,t){e.exports=require("@times-components/article-magazine-standard/rnw")},function(e,t){e.exports=require("@times-components/article-main-comment/rnw")},function(e,t){e.exports=require("@times-components/responsive/rnw")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/message-bar/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(2),i=n.n(a),c=n(3),s=n.n(c),u=n(4),l=n.n(u),m=n(1),p=n.n(m),f=n(5),d=n.n(f),b=n(6),g=n.n(b),O=n(7),y=n(8);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}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){x(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 x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"templates",(function(){return h})),n.d(t,"TakeoverBailout",(function(){return P}));const h={indepth:s.a,magazinecomment:i.a,magazinestandard:l.a,maincomment:d.a,mainstandard:p.a};class P extends Error{constructor(e){super(e),this.name="TakeoverBailout"}}t.default=e=>{const t=e.article,n=e.onImagePress,r=t||{},a=r.leadAsset,i=r.template;let c=(t||{}).content;if("takeoverpage"===i)throw new P("Aborted react render: Takeover page");if(t&&!t.tiles.length&&!c.length)throw new Error("ENOCONTENT");let s=null;if(n){c=((e,t)=>{const n=e||[];let r=t?1:0;return n.forEach(e=>{const t=e;"image"!==t.name&&"video"!==t.name||(t.attributes.imageIndex=r,r+=1)}),n})(c,a);const e=((e,t)=>{const n=e||[];let r=0;const o=[];t&&(r+=1,o.push({index:0,name:"leadAsset",value:t}));return n.filter(e=>"image"===e.name||"video"===e.name).forEach(e=>{let t;if("video"===e.name){const n=e.attributes,o=n.caption,a=n.posterImageUrl;t={index:r,name:"inlineVideo",value:{caption:o,posterImageUrl:a}}}else t={index:r,name:"inlineImage",value:e.attributes};r+=1,o.push(t)}),o})(c,a);s=t=>n(t,e)}const u=h[i]||p.a,l=w(w({},e),{},{article:w(w({},t),{},{template:t&&t.template?t.template:"mainstandard"})});return o.a.createElement(g.a,null,o.a.createElement(y.MessageManager,{delay:3e3,scale:O.scales.medium},o.a.createElement(u,v({},l,{onImagePress:s}))))}}]);
|