@financial-times/cp-content-pipeline-ui 6.14.1 → 6.15.1
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 +21 -0
- package/lib/components/ArticleBody/index.d.ts +2 -1
- package/lib/components/ArticleBody/index.js +2 -2
- package/lib/components/ArticleBody/index.js.map +1 -1
- package/lib/components/ArticleInfo/index.d.ts +3 -3
- package/lib/components/ArticleInfo/index.js +7 -3
- package/lib/components/ArticleInfo/index.js.map +1 -1
- package/lib/components/BackToTopButton/client/index.d.ts +4 -2
- package/lib/components/BackToTopButton/client/index.js +2 -11
- package/lib/components/BackToTopButton/client/index.js.map +1 -1
- package/lib/components/BackToTopButton/client/utils.js +1 -2
- package/lib/components/BackToTopButton/client/utils.js.map +1 -1
- package/lib/components/BigNumber/index.d.ts +2 -1
- package/lib/components/BigNumber/index.js +2 -2
- package/lib/components/BigNumber/index.js.map +1 -1
- package/lib/components/Body/index.d.ts +2 -1
- package/lib/components/Body/index.js +2 -2
- package/lib/components/Body/index.js.map +1 -1
- package/lib/components/Byline/index.d.ts +2 -2
- package/lib/components/Byline/index.js +2 -2
- package/lib/components/Byline/index.js.map +1 -1
- package/lib/components/Clip/client/index.js.map +1 -1
- package/lib/components/Clip/client/progressBar.js.map +1 -1
- package/lib/components/Clip/client/utils.js +4 -5
- package/lib/components/Clip/client/utils.js.map +1 -1
- package/lib/components/Clip/components/Caption.d.ts +1 -1
- package/lib/components/Clip/components/Caption.js.map +1 -1
- package/lib/components/Clip/components/ClipTag.d.ts +1 -1
- package/lib/components/Clip/components/ClipTag.js.map +1 -1
- package/lib/components/Clip/components/ClosedCaptions.d.ts +2 -2
- package/lib/components/Clip/components/ClosedCaptions.js +1 -1
- package/lib/components/Clip/components/ClosedCaptions.js.map +1 -1
- package/lib/components/Clip/components/Container.d.ts +2 -3
- package/lib/components/Clip/components/Container.js +1 -1
- package/lib/components/Clip/components/Container.js.map +1 -1
- package/lib/components/Clip/components/ContentLayout.d.ts +2 -3
- package/lib/components/Clip/components/ContentLayout.js.map +1 -1
- package/lib/components/Clip/components/Credit.d.ts +1 -1
- package/lib/components/Clip/components/Credit.js.map +1 -1
- package/lib/components/Clip/components/VideoDescription.d.ts +1 -1
- package/lib/components/Clip/components/VideoDescription.js.map +1 -1
- package/lib/components/Clip/components/VideoInfoBox.d.ts +1 -1
- package/lib/components/Clip/components/VideoInfoBox.js.map +1 -1
- package/lib/components/Clip/template/component.d.ts +2 -2
- package/lib/components/Clip/template/component.js +2 -2
- package/lib/components/Clip/template/component.js.map +1 -1
- package/lib/components/Clip/template/index.js +1 -1
- package/lib/components/Clip/template/index.js.map +1 -1
- package/lib/components/Clip/test/fixtures.js.map +1 -1
- package/lib/components/Clip/test/index.spec.js.map +1 -1
- package/lib/components/Clip/test/snapshot.spec.js +2 -2
- package/lib/components/Clip/test/snapshot.spec.js.map +1 -1
- package/lib/components/ContentPackageBody/index.d.ts +2 -2
- package/lib/components/ContentPackageBody/index.js +9 -9
- package/lib/components/ContentPackageBody/index.js.map +1 -1
- package/lib/components/Expander/client/index.js.map +1 -1
- package/lib/components/Expander/test/client/index.spec.js.map +1 -1
- package/lib/components/FixedAspectRatio/FixedAspectRatio.d.ts +3 -1622
- package/lib/components/FixedAspectRatio/FixedAspectRatio.js +3 -3
- package/lib/components/FixedAspectRatio/FixedAspectRatio.js.map +1 -1
- package/lib/components/Flourish/client/index.js.map +1 -1
- package/lib/components/Flourish/index.d.ts +2 -2
- package/lib/components/Flourish/index.js +2 -2
- package/lib/components/Flourish/index.js.map +1 -1
- package/lib/components/Heading/index.d.ts +2 -5
- package/lib/components/Heading/index.js +2 -1
- package/lib/components/Heading/index.js.map +1 -1
- package/lib/components/Headshot/index.d.ts +2 -2
- package/lib/components/Headshot/index.js +2 -2
- package/lib/components/Headshot/index.js.map +1 -1
- package/lib/components/ImageSet/index.d.ts +8 -6
- package/lib/components/ImageSet/index.js +11 -11
- package/lib/components/ImageSet/index.js.map +1 -1
- package/lib/components/Layout/index.d.ts +4 -10
- package/lib/components/Layout/index.js +7 -7
- package/lib/components/Layout/index.js.map +1 -1
- package/lib/components/LiveBlogBody/index.d.ts +2 -2
- package/lib/components/LiveBlogBody/index.js +2 -2
- package/lib/components/LiveBlogBody/index.js.map +1 -1
- package/lib/components/LiveBlogPost/ShareButtons.d.ts +4 -3
- package/lib/components/LiveBlogPost/ShareButtons.js +2 -1
- package/lib/components/LiveBlogPost/ShareButtons.js.map +1 -1
- package/lib/components/LiveBlogPost/Timestamp.d.ts +2 -2
- package/lib/components/LiveBlogPost/Timestamp.js +2 -1
- package/lib/components/LiveBlogPost/Timestamp.js.map +1 -1
- package/lib/components/LiveBlogPost/index.d.ts +1 -1
- package/lib/components/LiveBlogPost/index.js +1 -1
- package/lib/components/LiveBlogPost/index.js.map +1 -1
- package/lib/components/LiveBlogPost/svgIcons.d.ts +3 -3
- package/lib/components/LiveBlogPost/svgIcons.js +6 -6
- package/lib/components/LiveBlogPost/svgIcons.js.map +1 -1
- package/lib/components/LiveBlogWrapper/dispatchEvent.js.map +1 -1
- package/lib/components/LiveBlogWrapper/index.js.map +1 -1
- package/lib/components/LiveBlogWrapper/normalisePost.js.map +1 -1
- package/lib/components/LiveBlogWrapper/post-tracker.js +2 -2
- package/lib/components/LiveBlogWrapper/post-tracker.js.map +1 -1
- package/lib/components/MainImage/index.d.ts +2 -2
- package/lib/components/MainImage/index.js +2 -2
- package/lib/components/MainImage/index.js.map +1 -1
- package/lib/components/Paragraph/index.d.ts +2 -1
- package/lib/components/Paragraph/index.js +3 -3
- package/lib/components/Paragraph/index.js.map +1 -1
- package/lib/components/PodcastBody/index.d.ts +4 -2
- package/lib/components/PodcastBody/index.js +2 -2
- package/lib/components/PodcastBody/index.js.map +1 -1
- package/lib/components/Pullquote/index.d.ts +2 -2
- package/lib/components/Pullquote/index.js +2 -1
- package/lib/components/Pullquote/index.js.map +1 -1
- package/lib/components/Recommended/index.d.ts +2 -1
- package/lib/components/Recommended/index.js +2 -2
- package/lib/components/Recommended/index.js.map +1 -1
- package/lib/components/RichText/BasicComponents.d.ts +13 -13
- package/lib/components/RichText/BasicComponents.js +2 -2
- package/lib/components/RichText/BasicComponents.js.map +1 -1
- package/lib/components/RichText/index.d.ts +2 -2
- package/lib/components/RichText/index.js +2 -2
- package/lib/components/RichText/index.js.map +1 -1
- package/lib/components/Scrollytelling/ScrollyImage.d.ts +1 -1
- package/lib/components/Scrollytelling/ScrollyImage.js +2 -2
- package/lib/components/Scrollytelling/ScrollyImage.js.map +1 -1
- package/lib/components/Scrollytelling/index.d.ts +5 -5
- package/lib/components/Scrollytelling/index.js +1 -1
- package/lib/components/Scrollytelling/index.js.map +1 -1
- package/lib/components/Table/TableBody.d.ts +2 -1
- package/lib/components/Table/TableBody.js +2 -2
- package/lib/components/Table/TableBody.js.map +1 -1
- package/lib/components/Table/TableCell.d.ts +4 -2
- package/lib/components/Table/TableCell.js.map +1 -1
- package/lib/components/Table/index.d.ts +2 -1
- package/lib/components/Table/index.js +2 -2
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Topper/Columnist.d.ts +2 -2
- package/lib/components/Topper/Columnist.js +2 -2
- package/lib/components/Topper/Columnist.js.map +1 -1
- package/lib/components/Topper/FollowButtonSlot.d.ts +0 -1
- package/lib/components/Topper/Headline.d.ts +2 -2
- package/lib/components/Topper/Headline.js +2 -2
- package/lib/components/Topper/Headline.js.map +1 -1
- package/lib/components/Topper/Intro.d.ts +2 -1
- package/lib/components/Topper/Intro.js +2 -2
- package/lib/components/Topper/Intro.js.map +1 -1
- package/lib/components/Topper/LiveBlogIndicator.d.ts +2 -2
- package/lib/components/Topper/LiveBlogIndicator.js +2 -2
- package/lib/components/Topper/LiveBlogIndicator.js.map +1 -1
- package/lib/components/Topper/Picture.d.ts +2 -2
- package/lib/components/Topper/Picture.js +2 -2
- package/lib/components/Topper/Picture.js.map +1 -1
- package/lib/components/Topper/Tags.d.ts +2 -2
- package/lib/components/Topper/Tags.js +7 -7
- package/lib/components/Topper/Tags.js.map +1 -1
- package/lib/components/Topper/Wrapper.d.ts +3 -4
- package/lib/components/Topper/Wrapper.js +2 -2
- package/lib/components/Topper/Wrapper.js.map +1 -1
- package/lib/components/Topper/client/tracking.js.map +1 -1
- package/lib/components/Topper/index.d.ts +2 -1
- package/lib/components/Topper/index.js +2 -2
- package/lib/components/Topper/index.js.map +1 -1
- package/lib/components/Tweet/index.d.ts +2 -1
- package/lib/components/Tweet/index.js +2 -2
- package/lib/components/Tweet/index.js.map +1 -1
- package/lib/components/Video/index.d.ts +2 -1
- package/lib/components/Video/index.js +2 -2
- package/lib/components/Video/index.js.map +1 -1
- package/lib/components/YoutubeVideo/index.d.ts +2 -1
- package/lib/components/YoutubeVideo/index.js +2 -2
- package/lib/components/YoutubeVideo/index.js.map +1 -1
- package/lib/context.d.ts +0 -1
- package/lib/extensions/scrollIntoView.js +1 -1
- package/lib/extensions/scrollIntoView.js.map +1 -1
- package/lib/stories/BackToTop.stories.d.ts +5 -2
- package/lib/stories/BackToTop.stories.js.map +1 -1
- package/lib/stories/Clip.stories.d.ts +1 -2
- package/lib/stories/Clip.stories.js +1 -1
- package/lib/stories/Clip.stories.js.map +1 -1
- package/lib/stories/Expander.stories.d.ts +37 -25
- package/lib/stories/Expander.stories.js +207 -36
- package/lib/stories/Expander.stories.js.map +1 -1
- package/lib/stories/LiveBlogPost.stories.d.ts +1 -1
- package/lib/stories/LiveBlogPost.stories.js +6 -6
- package/lib/stories/LiveBlogPost.stories.js.map +1 -1
- package/lib/stories/Topper.stories.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/ArticleBody/index.tsx +3 -4
- package/src/components/ArticleInfo/index.tsx +20 -8
- package/src/components/BackToTopButton/client/index.tsx +11 -6
- package/src/components/BigNumber/index.tsx +6 -9
- package/src/components/Body/index.tsx +4 -2
- package/src/components/Byline/index.tsx +3 -4
- package/src/components/Clip/components/Caption.tsx +1 -1
- package/src/components/Clip/components/ClipTag.tsx +2 -2
- package/src/components/Clip/components/ClosedCaptions.tsx +4 -2
- package/src/components/Clip/components/Container.tsx +5 -3
- package/src/components/Clip/components/ContentLayout.tsx +4 -3
- package/src/components/Clip/components/Credit.tsx +1 -1
- package/src/components/Clip/components/VideoDescription.tsx +2 -2
- package/src/components/Clip/components/VideoInfoBox.tsx +1 -1
- package/src/components/Clip/template/component.tsx +4 -2
- package/src/components/ContentPackageBody/index.tsx +9 -7
- package/src/components/Expander/client/main.scss +27 -17
- package/src/components/FixedAspectRatio/FixedAspectRatio.tsx +6 -5
- package/src/components/Flourish/index.tsx +4 -2
- package/src/components/Heading/index.tsx +5 -2
- package/src/components/Headshot/index.tsx +4 -2
- package/src/components/ImageSet/index.tsx +25 -21
- package/src/components/Layout/index.tsx +8 -15
- package/src/components/LiveBlogBody/index.tsx +4 -2
- package/src/components/LiveBlogPost/ShareButtons.tsx +10 -5
- package/src/components/LiveBlogPost/Timestamp.tsx +6 -1
- package/src/components/LiveBlogPost/index.tsx +6 -4
- package/src/components/LiveBlogPost/svgIcons.tsx +3 -3
- package/src/components/MainImage/index.tsx +3 -1
- package/src/components/Paragraph/index.tsx +5 -3
- package/src/components/PodcastBody/index.tsx +9 -2
- package/src/components/Pullquote/index.tsx +5 -3
- package/src/components/Recommended/index.tsx +5 -2
- package/src/components/RichText/BasicComponents.tsx +35 -30
- package/src/components/RichText/index.tsx +12 -8
- package/src/components/Scrollytelling/ScrollyImage.tsx +4 -4
- package/src/components/Scrollytelling/index.tsx +10 -10
- package/src/components/Table/TableBody.tsx +5 -3
- package/src/components/Table/TableCell.tsx +3 -3
- package/src/components/Table/index.tsx +6 -2
- package/src/components/Topper/Columnist.tsx +4 -2
- package/src/components/Topper/Headline.tsx +4 -2
- package/src/components/Topper/Intro.tsx +3 -1
- package/src/components/Topper/LiveBlogIndicator.tsx +4 -2
- package/src/components/Topper/Picture.tsx +8 -6
- package/src/components/Topper/Tags.tsx +6 -4
- package/src/components/Topper/Wrapper.tsx +5 -4
- package/src/components/Topper/index.tsx +4 -2
- package/src/components/Tweet/index.tsx +3 -1
- package/src/components/Video/index.tsx +4 -2
- package/src/components/YoutubeVideo/index.tsx +4 -2
- package/src/stories/Clip.stories.tsx +2 -6
- package/src/stories/Expander.stories.tsx +231 -51
- package/src/stories/article-page.scss +21 -1
- package/src/stories/tsconfig.json +7 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -26,56 +26,218 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.OnlyMobileServer = exports.OnlyMobileWithClient = exports.WithClient = exports.OnlyServer = void 0;
|
|
29
|
+
exports.NoMoreElements = exports.OnlyMobileServer = exports.OnlyMobileWithClient = exports.WithClient = exports.OnlyServer = void 0;
|
|
30
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
30
31
|
const Expander_1 = require("../components/Expander");
|
|
31
32
|
const client_1 = require("../components/Expander/client");
|
|
32
33
|
const react_1 = __importStar(require("react"));
|
|
33
34
|
const main_1 = __importDefault(require("@financial-times/o-tracking/main"));
|
|
34
35
|
require("./Expander.stories.scss");
|
|
35
36
|
const client_2 = __importDefault(require("../components/Clip/client"));
|
|
36
|
-
require("./Clip.stories.scss");
|
|
37
37
|
const RichText_1 = __importDefault(require("../components/RichText"));
|
|
38
38
|
const structuredContent = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
tree: {
|
|
40
|
+
type: 'body',
|
|
41
|
+
version: 1,
|
|
42
|
+
children: [
|
|
43
|
+
{
|
|
44
|
+
type: 'image-set',
|
|
45
|
+
id: 'http://api.ft.com/content/57b3150f-434e-4463-a863-3311d53bf5c2',
|
|
46
|
+
data: {
|
|
47
|
+
referenceIndex: 0,
|
|
48
48
|
},
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'paragraph',
|
|
52
|
+
children: [
|
|
53
|
+
{
|
|
54
|
+
type: 'text',
|
|
55
|
+
value: 'Mike Johnson has survived an attempt to oust him as speaker of the House of Representatives by Marjorie Taylor Greene, a hardline Republican congresswoman from Georgia. ',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'paragraph',
|
|
61
|
+
children: [
|
|
62
|
+
{
|
|
63
|
+
type: 'text',
|
|
64
|
+
value: 'In a vote on Wednesday night, the lower chamber of Congress rejected Greene’s bid with overwhelming support from Democrats as well as Republicans. ',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
,
|
|
69
|
+
{
|
|
70
|
+
type: 'paragraph',
|
|
71
|
+
children: [
|
|
72
|
+
{
|
|
73
|
+
type: 'text',
|
|
74
|
+
value: 'The vote all but ensures that Johnson will remain in his post until after the November election, and will put a lid on a debate over his political future that has lasted for weeks among Republicans in Congress. ',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'http://api.ft.com/content/02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
80
|
+
type: 'recommended',
|
|
81
|
+
heading: 'Recommended',
|
|
82
|
+
teaserTitleOverride: 'Hargreaves Lansdown backs £5.4bn private equity takeover ',
|
|
83
|
+
data: {
|
|
84
|
+
referenceIndex: 1,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
references: [
|
|
51
90
|
{
|
|
52
|
-
type: '
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
91
|
+
type: 'image-set',
|
|
92
|
+
picture: {
|
|
93
|
+
__typename: 'PictureStandard',
|
|
94
|
+
alt: 'A Waitrose shop in London ',
|
|
95
|
+
caption: 'Staff at the Waitrose on King William street in London, which is taking cash only payments, said that disruption caused by the IT outage was ‘everywhere’',
|
|
96
|
+
credit: '© Ian Smith/FT',
|
|
97
|
+
imageType: 'image',
|
|
98
|
+
layoutWidth: 'standard',
|
|
99
|
+
fallbackImage: {
|
|
100
|
+
__typename: 'ImageStandardInline',
|
|
101
|
+
height: 1368,
|
|
102
|
+
width: 1600,
|
|
103
|
+
caption: 'Staff at the Waitrose on King William street in London, which is taking cash only payments, said that disruption caused by the IT outage was ‘everywhere’',
|
|
104
|
+
credit: '© Ian Smith/FT',
|
|
105
|
+
format: 'standard-inline',
|
|
106
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F5a89fdc8-323b-4cf2-a317-794074a1adae.png?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
107
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
57
108
|
},
|
|
58
|
-
|
|
109
|
+
images: [
|
|
110
|
+
{
|
|
111
|
+
__typename: 'ImageStandardInline',
|
|
112
|
+
height: 1368,
|
|
113
|
+
width: 1600,
|
|
114
|
+
caption: 'Staff at the Waitrose on King William street in London, which is taking cash only payments, said that disruption caused by the IT outage was ‘everywhere’',
|
|
115
|
+
credit: '© Ian Smith/FT',
|
|
116
|
+
format: 'standard-inline',
|
|
117
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F5a89fdc8-323b-4cf2-a317-794074a1adae.png?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
118
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
119
|
+
sourceSet: [
|
|
120
|
+
{
|
|
121
|
+
dpr: 1,
|
|
122
|
+
width: 700,
|
|
123
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3A5a89fdc8-323b-4cf2-a317-794074a1adae?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
dpr: 2,
|
|
127
|
+
width: 700,
|
|
128
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3A5a89fdc8-323b-4cf2-a317-794074a1adae?source=next-article&fit=scale-down&quality=highest&width=700&dpr=2',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
59
134
|
},
|
|
60
|
-
,
|
|
61
135
|
{
|
|
62
|
-
type: '
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
136
|
+
type: 'recommended',
|
|
137
|
+
isInLiveBlog: true,
|
|
138
|
+
teaser: {
|
|
139
|
+
title: 'Hargreaves Lansdown backs £5.4bn private equity takeover ',
|
|
140
|
+
id: '02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
141
|
+
url: 'https://www.ft.com/content/02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
142
|
+
relativeUrl: '/content/02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
143
|
+
type: 'article',
|
|
144
|
+
publishedDate: '2024-06-18T15:25:49.739Z',
|
|
145
|
+
firstPublishedDate: '2024-06-18T13:49:35.049Z',
|
|
146
|
+
metaPrefixText: null,
|
|
147
|
+
metaSuffixText: null,
|
|
148
|
+
metaLink: {
|
|
149
|
+
id: '4d1b8529-f8a3-4740-97e6-4a6f68214092',
|
|
150
|
+
url: 'https://www.ft.com/stream/4d1b8529-f8a3-4740-97e6-4a6f68214092',
|
|
151
|
+
relativeUrl: '/stream/4d1b8529-f8a3-4740-97e6-4a6f68214092',
|
|
152
|
+
prefLabel: 'Hargreaves Lansdown PLC',
|
|
153
|
+
},
|
|
154
|
+
metaAltLink: null,
|
|
155
|
+
image: {
|
|
156
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F409586da-1e01-42d8-b4e6-cd99b82923b3.jpg?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
157
|
+
width: 2266,
|
|
158
|
+
height: 1275,
|
|
159
|
+
altText: 'Hargreaves Lansdown logo',
|
|
67
160
|
},
|
|
68
|
-
|
|
161
|
+
indicators: {
|
|
162
|
+
accessLevel: 'subscribed',
|
|
163
|
+
isOpinion: false,
|
|
164
|
+
isColumn: false,
|
|
165
|
+
isPodcast: false,
|
|
166
|
+
isEditorsChoice: false,
|
|
167
|
+
isExclusive: false,
|
|
168
|
+
isScoop: false,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
69
171
|
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
174
|
+
const structuredContentNoMoreElements = {
|
|
175
|
+
tree: {
|
|
176
|
+
type: 'body',
|
|
177
|
+
version: 1,
|
|
178
|
+
children: [
|
|
179
|
+
{
|
|
180
|
+
type: 'image-set',
|
|
181
|
+
id: 'http://api.ft.com/content/57b3150f-434e-4463-a863-3311d53bf5c2',
|
|
182
|
+
data: {
|
|
183
|
+
referenceIndex: 0,
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: 'paragraph',
|
|
188
|
+
children: [
|
|
189
|
+
{
|
|
190
|
+
type: 'text',
|
|
191
|
+
value: 'Mike Johnson has survived an attempt to oust him as speaker of the House of Representatives by Marjorie Taylor Greene, a hardline Republican congresswoman from Georgia. ',
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
references: [
|
|
70
198
|
{
|
|
71
|
-
type: '
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
199
|
+
type: 'image-set',
|
|
200
|
+
picture: {
|
|
201
|
+
__typename: 'PictureStandard',
|
|
202
|
+
alt: 'A Waitrose shop in London ',
|
|
203
|
+
caption: 'Staff at the Waitrose on King William street in London, which is taking cash only payments, said that disruption caused by the IT outage was ‘everywhere’',
|
|
204
|
+
credit: '© Ian Smith/FT',
|
|
205
|
+
imageType: 'image',
|
|
206
|
+
layoutWidth: 'standard',
|
|
207
|
+
fallbackImage: {
|
|
208
|
+
__typename: 'ImageStandardInline',
|
|
209
|
+
height: 1368,
|
|
210
|
+
width: 1600,
|
|
211
|
+
caption: 'Staff at the Waitrose on King William street in London, which is taking cash only payments, said that disruption caused by the IT outage was ‘everywhere’',
|
|
212
|
+
credit: '© Ian Smith/FT',
|
|
213
|
+
format: 'standard-inline',
|
|
214
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F5a89fdc8-323b-4cf2-a317-794074a1adae.png?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
215
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
216
|
+
},
|
|
217
|
+
images: [
|
|
218
|
+
{
|
|
219
|
+
__typename: 'ImageStandardInline',
|
|
220
|
+
height: 1368,
|
|
221
|
+
width: 1600,
|
|
222
|
+
caption: 'Staff at the Waitrose on King William street in London, which is taking cash only payments, said that disruption caused by the IT outage was ‘everywhere’',
|
|
223
|
+
credit: '© Ian Smith/FT',
|
|
224
|
+
format: 'standard-inline',
|
|
225
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F5a89fdc8-323b-4cf2-a317-794074a1adae.png?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
226
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
227
|
+
sourceSet: [
|
|
228
|
+
{
|
|
229
|
+
dpr: 1,
|
|
230
|
+
width: 700,
|
|
231
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3A5a89fdc8-323b-4cf2-a317-794074a1adae?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
dpr: 2,
|
|
235
|
+
width: 700,
|
|
236
|
+
url: 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3A5a89fdc8-323b-4cf2-a317-794074a1adae?source=next-article&fit=scale-down&quality=highest&width=700&dpr=2',
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
],
|
|
79
241
|
},
|
|
80
242
|
},
|
|
81
243
|
],
|
|
@@ -85,6 +247,7 @@ const storyArgs = {
|
|
|
85
247
|
collapseLabel: 'Close',
|
|
86
248
|
onlyMobile: false,
|
|
87
249
|
id: '111232323-12123-2323',
|
|
250
|
+
structuredContent: structuredContent,
|
|
88
251
|
};
|
|
89
252
|
exports.default = {
|
|
90
253
|
title: 'Expander',
|
|
@@ -101,6 +264,7 @@ const LiveBLogWrapper = (args) => {
|
|
|
101
264
|
react_1.default.createElement("div", { className: "article__right " }))));
|
|
102
265
|
};
|
|
103
266
|
const LiveBlogPostWrapper = (args) => {
|
|
267
|
+
const { structuredContent, ...expanderProps } = args;
|
|
104
268
|
(0, react_1.useEffect)(() => {
|
|
105
269
|
main_1.default.init({
|
|
106
270
|
context: { product: 'next' },
|
|
@@ -114,8 +278,8 @@ const LiveBlogPostWrapper = (args) => {
|
|
|
114
278
|
return (react_1.default.createElement("article", { id: args.id },
|
|
115
279
|
react_1.default.createElement("div", { className: "n-content-body" },
|
|
116
280
|
react_1.default.createElement("div", { "data-trackable": "truncated-post", "data-trackable-context-post": "1234", "data-component": "example-boundary" },
|
|
117
|
-
react_1.default.createElement(Expander_1.ExpanderServer, { ...
|
|
118
|
-
react_1.default.createElement(RichText_1.default, { structuredContent:
|
|
281
|
+
react_1.default.createElement(Expander_1.ExpanderServer, { ...expanderProps, id: `${args.id}_expander` },
|
|
282
|
+
react_1.default.createElement(RichText_1.default, { structuredContent: structuredContent }))))));
|
|
119
283
|
};
|
|
120
284
|
const OnlyServer = (args) => {
|
|
121
285
|
return react_1.default.createElement(LiveBLogWrapper, { ...args });
|
|
@@ -139,4 +303,11 @@ exports.OnlyMobileWithClient = exports.WithClient;
|
|
|
139
303
|
exports.OnlyMobileWithClient.args = { ...storyArgs, onlyMobile: true };
|
|
140
304
|
exports.OnlyMobileServer = exports.OnlyServer;
|
|
141
305
|
exports.OnlyMobileServer.args = { ...storyArgs, onlyMobile: true };
|
|
306
|
+
const NoMoreElements = (args) => {
|
|
307
|
+
return (0, exports.WithClient)({
|
|
308
|
+
...args,
|
|
309
|
+
structuredContent: structuredContentNoMoreElements,
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
exports.NoMoreElements = NoMoreElements;
|
|
142
313
|
//# sourceMappingURL=Expander.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expander.stories.js","sourceRoot":"","sources":["../../src/stories/Expander.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAsE;AACtE,0DAA8D;AAC9D,+CAAwC;AACxC,4EAAwD;AACxD,mCAAgC;AAChC,uEAAkD;AAClD
|
|
1
|
+
{"version":3,"file":"Expander.stories.js","sourceRoot":"","sources":["../../src/stories/Expander.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,qDAAsE;AACtE,0DAA8D;AAC9D,+CAAwC;AACxC,4EAAwD;AACxD,mCAAgC;AAChC,uEAAkD;AAClD,sEAA6C;AAK7C,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,WAAW;gBACjB,EAAE,EAAE,gEAAgE;gBACpE,IAAI,EAAE;oBACJ,cAAc,EAAE,CAAC;iBAClB;aACsB;YACzB;gBACE,IAAI,EAAE,WAAW;gB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AoB,GAAG,kBAAU,CAAA;AAC9C,4BAAoB,CAAC,IAAI,GAAG,EAAE,GAAG,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;AAEjD,QAAA,gBAAgB,GAAG,kBAAU,CAAA;AAC1C,wBAAgB,CAAC,IAAI,GAAG,EAAE,GAAG,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;AAEnD,MAAM,cAAc,GAAG,CAAC,IAAS,EAAE,EAAE;IAC1C,OAAO,IAAA,kBAAU,EAAC;QAChB,GAAG,IAAI;QACP,iBAAiB,EAAE,+BAA+B;KACnD,CAAC,CAAA;AACJ,CAAC,CAAA;AALY,QAAA,cAAc,kBAK1B"}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import './LiveBlogPost.stories.scss';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component:
|
|
6
|
+
component: React.FC<LiveBlogPostProps>;
|
|
7
7
|
content: {};
|
|
8
8
|
argTypes: {
|
|
9
9
|
'indicators.isOpinion': {
|
|
@@ -20,14 +20,14 @@ exports.default = {
|
|
|
20
20
|
};
|
|
21
21
|
const args = {
|
|
22
22
|
id: '',
|
|
23
|
-
postId: '',
|
|
23
|
+
postId: '', // Remove once wordpress is no longer in use
|
|
24
24
|
title: 'Ukraine hails new security architecture after German accord',
|
|
25
|
-
content: '',
|
|
26
|
-
bodyHTML: '',
|
|
27
|
-
body: '',
|
|
28
|
-
publishedTimestamp: '',
|
|
25
|
+
content: '', // Remove once wordpress is no longer in use
|
|
26
|
+
bodyHTML: '', //ElasticSearch
|
|
27
|
+
body: '', // cp-content-pipeline
|
|
28
|
+
publishedTimestamp: '', // Remove once wordpress is no longer in use
|
|
29
29
|
publishedDate: '2024-02-16T14:24:00',
|
|
30
|
-
isBreakingNews: false,
|
|
30
|
+
isBreakingNews: false, // Remove once wordpress is no longer in use
|
|
31
31
|
articleUrl: '',
|
|
32
32
|
showShareButtons: true,
|
|
33
33
|
ad: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveBlogPost.stories.js","sourceRoot":"","sources":["../../src/stories/LiveBlogPost.stories.tsx"],"names":[],"mappings":";;;;;;AAAA,6DAAyD;AAEzD,kDAAyB;AACzB,uCAAoC;AAEpC,kBAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,2BAAY;IACvB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE;QACR,sBAAsB,EAAE;YACtB,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,YAAY;SACnB;KACF;CACF,CAAA;AAED,MAAM,IAAI,GAAsC;IAC9C,EAAE,EAAE,EAAE;IACN,MAAM,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"LiveBlogPost.stories.js","sourceRoot":"","sources":["../../src/stories/LiveBlogPost.stories.tsx"],"names":[],"mappings":";;;;;;AAAA,6DAAyD;AAEzD,kDAAyB;AACzB,uCAAoC;AAEpC,kBAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,2BAAY;IACvB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE;QACR,sBAAsB,EAAE;YACtB,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,YAAY;SACnB;KACF;CACF,CAAA;AAED,MAAM,IAAI,GAAsC;IAC9C,EAAE,EAAE,EAAE;IACN,MAAM,EAAE,EAAE,EAAE,4CAA4C;IACxD,KAAK,EAAE,6DAA6D;IACpE,OAAO,EAAE,EAAE,EAAE,4CAA4C;IACzD,QAAQ,EAAE,EAAE,EAAE,eAAe;IAC7B,IAAI,EAAE,EAAE,EAAE,sBAAsB;IAChC,kBAAkB,EAAE,EAAE,EAAE,4CAA4C;IACpE,aAAa,EAAE,qBAAqB;IACpC,cAAc,EAAE,KAAK,EAAE,4CAA4C;IACnE,UAAU,EAAE,EAAE;IACd,gBAAgB,EAAE,IAAI;IACtB,EAAE,EAAE,EAAE;IACN,UAAU,EAAE;QACV,SAAS,EAAE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,EAAE,gEAAgE;oBACtE,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,YAAY;yBACpB;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,IAAI;iBACZ;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,gEAAgE;oBACtE,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,aAAa;yBACrB;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,OAAO;iBACf;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,gEAAgE;oBACtE,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,iBAAiB;yBACzB;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,mBAAmB;iBAC3B;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,gEAAgE;oBACtE,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,cAAc;yBACtB;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,aAAa;iBACrB;aACF;SACF;KACF;CACF,CAAA;AAEM,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,CACvC,8BAAC,2BAAY,OAAK,IAAI,KAAM,qBAAqB,GAAI,CACtD,CAAA;AAFY,QAAA,mBAAmB,uBAE/B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { TopperProps } from "../components/Topper";
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: React.FC<TopperProps>;
|
|
6
6
|
content: {};
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
package/package.json
CHANGED
|
@@ -2,10 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import RichText, { ComponentsContext } from '../RichText'
|
|
3
3
|
import type { BodyProps } from '../Body'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
content,
|
|
7
|
-
richTextComponents,
|
|
8
|
-
}: BodyProps) {
|
|
5
|
+
const ArticleBody: React.FC<BodyProps> = ({ content, richTextComponents }) => {
|
|
9
6
|
if (!content?.body?.structured) {
|
|
10
7
|
return null
|
|
11
8
|
}
|
|
@@ -21,3 +18,5 @@ export default function ArticleBody({
|
|
|
21
18
|
</ComponentsContext.Provider>
|
|
22
19
|
)
|
|
23
20
|
}
|
|
21
|
+
|
|
22
|
+
export default ArticleBody
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import Byline from '../Byline'
|
|
3
3
|
import type { ArticleQuery } from '@financial-times/cp-content-pipeline-client'
|
|
4
|
+
import ftDateFormat from '@financial-times/ft-date-format'
|
|
4
5
|
|
|
5
6
|
type ArticleInfoProps = {
|
|
6
7
|
content: ArticleQuery['content']
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
const ArticleInfo: React.FC<React.PropsWithChildren<ArticleInfoProps>> = ({
|
|
10
11
|
children,
|
|
11
12
|
content,
|
|
12
|
-
}
|
|
13
|
+
}) => {
|
|
13
14
|
const isLiveBlogPackage = content.__typename === 'LiveBlogPackage'
|
|
15
|
+
const formattedPublishedDate = ftDateFormat.format(
|
|
16
|
+
new Date(content.publishedTimestamp),
|
|
17
|
+
'date'
|
|
18
|
+
)
|
|
14
19
|
|
|
15
20
|
return (
|
|
16
21
|
<div className="article-info">
|
|
@@ -22,14 +27,21 @@ export default function ArticleInfo({
|
|
|
22
27
|
/>
|
|
23
28
|
)}
|
|
24
29
|
{content.publishedDate && !isLiveBlogPackage && (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
<>
|
|
31
|
+
{' '}
|
|
32
|
+
<time
|
|
33
|
+
data-o-component="o-date"
|
|
34
|
+
className="article-info__timestamp o-date"
|
|
35
|
+
dateTime={content.publishedDate}
|
|
36
|
+
>
|
|
37
|
+
{formattedPublishedDate}
|
|
38
|
+
</time>
|
|
39
|
+
</>
|
|
30
40
|
)}
|
|
31
41
|
</div>
|
|
32
42
|
{children}
|
|
33
43
|
</div>
|
|
34
44
|
)
|
|
35
45
|
}
|
|
46
|
+
|
|
47
|
+
export default ArticleInfo
|
|
@@ -12,15 +12,18 @@ import { throttle } from './utils'
|
|
|
12
12
|
* @description Component that renders a button that scrolls users to the top of the page when clicked
|
|
13
13
|
* and is only visible when the user has scrolled down at least to the startSelector element and then scrolls up
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
attributes = {},
|
|
18
|
-
scrollableElement = window,
|
|
19
|
-
}: {
|
|
15
|
+
|
|
16
|
+
type BackToTopProps = {
|
|
20
17
|
startSelector?: string
|
|
21
18
|
attributes?: Record<string, string>
|
|
22
19
|
scrollableElement?: Window | HTMLElement
|
|
23
|
-
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const BackToTop: React.FC<BackToTopProps> = ({
|
|
23
|
+
startSelector,
|
|
24
|
+
attributes = {},
|
|
25
|
+
scrollableElement = window,
|
|
26
|
+
}) => {
|
|
24
27
|
const [visible, setVisible] = useState(false)
|
|
25
28
|
const [scrolledDownFirstTime, setScrolledDownFirstTime] = useState(false)
|
|
26
29
|
const lastScroll = useRef(0)
|
|
@@ -126,3 +129,5 @@ export default function BackToTop({
|
|
|
126
129
|
</div>
|
|
127
130
|
)
|
|
128
131
|
}
|
|
132
|
+
|
|
133
|
+
export default BackToTop
|
|
@@ -5,19 +5,16 @@ import { ContentTree } from '@financial-times/content-tree'
|
|
|
5
5
|
/**
|
|
6
6
|
* Renders a BigNumber component
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
const BigNumber: React.FC<ContentTree.BigNumber> = ({
|
|
9
9
|
description,
|
|
10
10
|
number,
|
|
11
|
-
}
|
|
12
|
-
|
|
11
|
+
}) => {
|
|
13
12
|
return (
|
|
14
13
|
<div className="n-content-big-number">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</span>
|
|
18
|
-
<span className="n-content-big-number__content">
|
|
19
|
-
{description}
|
|
20
|
-
</span>
|
|
14
|
+
<span className="n-content-big-number__title">{number}</span>
|
|
15
|
+
<span className="n-content-big-number__content">{description}</span>
|
|
21
16
|
</div>
|
|
22
17
|
)
|
|
23
18
|
}
|
|
19
|
+
|
|
20
|
+
export default BigNumber
|
|
@@ -50,11 +50,11 @@ export type BodyProps = {
|
|
|
50
50
|
[key: string]: unknown
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
const Body: React.FC<BodyProps> = ({
|
|
54
54
|
content,
|
|
55
55
|
bodyComponents,
|
|
56
56
|
...extraProps
|
|
57
|
-
}
|
|
57
|
+
}) => {
|
|
58
58
|
if (!content?.body?.structured) {
|
|
59
59
|
return null
|
|
60
60
|
}
|
|
@@ -76,3 +76,5 @@ export default function Body({
|
|
|
76
76
|
|
|
77
77
|
return <BodyComponent content={content} {...extraProps} />
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
export default Body
|
|
@@ -24,10 +24,7 @@ const bylineComponents = {
|
|
|
24
24
|
'author-link': AuthorLink,
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
structuredContent,
|
|
29
|
-
showEditedBy,
|
|
30
|
-
}: BylineProps) {
|
|
27
|
+
const Byline: React.FC<BylineProps> = ({ structuredContent, showEditedBy }) => {
|
|
31
28
|
return (
|
|
32
29
|
<p className="article-info__byline">
|
|
33
30
|
{showEditedBy && (
|
|
@@ -46,3 +43,5 @@ export default function Byline({
|
|
|
46
43
|
</p>
|
|
47
44
|
)
|
|
48
45
|
}
|
|
46
|
+
|
|
47
|
+
export default Byline
|
|
@@ -6,7 +6,7 @@ interface CaptionProps {
|
|
|
6
6
|
credits?: string
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const Caption = ({ caption, credits }
|
|
9
|
+
export const Caption: React.FC<CaptionProps> = ({ caption, credits }) => {
|
|
10
10
|
if (!caption && !credits) return <></>
|
|
11
11
|
const separator = caption && credits ? ' ' : null
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ interface ClipTagProps {
|
|
|
32
32
|
preload?: string
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export const ClipTag = ({
|
|
35
|
+
export const ClipTag: React.FC<ClipTagProps> = ({
|
|
36
36
|
id,
|
|
37
37
|
dataLayout,
|
|
38
38
|
description,
|
|
@@ -50,7 +50,7 @@ export const ClipTag = ({
|
|
|
50
50
|
noInfoBox = false,
|
|
51
51
|
noCaption = false,
|
|
52
52
|
dataTrackable,
|
|
53
|
-
}
|
|
53
|
+
}) => {
|
|
54
54
|
const { pixelWidth, pixelHeight } = clip?.dataSource?.[0]
|
|
55
55
|
? clip.dataSource[0]
|
|
56
56
|
: { pixelWidth: 0, pixelHeight: 0 }
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Accessibility } from '@financial-times/cp-content-pipeline-client'
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface ClosedCaptionsProps {
|
|
5
5
|
accessibility?: Accessibility
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export const ClosedCaptions = ({
|
|
8
|
+
export const ClosedCaptions: React.FC<ClosedCaptionsProps> = ({
|
|
9
|
+
accessibility,
|
|
10
|
+
}) => {
|
|
9
11
|
if (!accessibility?.captions?.[0]?.url) return <></>
|
|
10
12
|
|
|
11
13
|
return (
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
interface ContainerProps {
|
|
4
|
-
children: ReactNode
|
|
5
4
|
dataLayout: string
|
|
6
5
|
}
|
|
7
6
|
|
|
8
|
-
export const Container
|
|
7
|
+
export const Container: React.FC<React.PropsWithChildren<ContainerProps>> = ({
|
|
8
|
+
dataLayout,
|
|
9
|
+
children,
|
|
10
|
+
}) => {
|
|
9
11
|
return dataLayout === 'full-grid' ? (
|
|
10
12
|
<div className="n-content-layout__container" data-component="clip-set">
|
|
11
13
|
{children}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
interface ContentLayoutProps {
|
|
4
4
|
dataLayout: string
|
|
5
|
-
children: ReactNode
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
// data-layout-width='full-grid' prevent clashes with ads and share bar
|
|
9
|
-
export const ContentLayout
|
|
8
|
+
export const ContentLayout: React.FC<
|
|
9
|
+
React.PropsWithChildren<ContentLayoutProps>
|
|
10
|
+
> = ({ dataLayout, children }) => {
|
|
10
11
|
return dataLayout !== 'in-line' ? (
|
|
11
12
|
<div className="n-content-layout" data-layout-width="full-grid">
|
|
12
13
|
{children}
|