@financial-times/cp-content-pipeline-ui 6.14.1 → 6.15.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 +13 -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 +2 -2
- 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 +5 -3
- 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
|
@@ -1,67 +1,241 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { ExpanderServer, ExpanderProps } from '../components/Expander'
|
|
2
3
|
import { ExpanderClient } from '../components/Expander/client'
|
|
3
4
|
import React, { useEffect } from 'react'
|
|
4
5
|
import oTracking from '@financial-times/o-tracking/main'
|
|
5
6
|
import './Expander.stories.scss'
|
|
6
7
|
import ClipClient from '../components/Clip/client'
|
|
7
|
-
import './Clip.stories.scss'
|
|
8
8
|
import RichText from '../components/RichText'
|
|
9
9
|
import { ContentTree } from '@financial-times/content-tree'
|
|
10
|
-
import { ClipSet } from '@financial-times/cp-content-pipeline-schema/src/resolvers/content-tree/Workarounds'
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
type ArgsType = ExpanderProps & { structuredContent: any; classNames?: string }
|
|
12
|
+
|
|
13
|
+
const structuredContent = {
|
|
14
|
+
tree: {
|
|
15
|
+
type: 'body',
|
|
16
|
+
version: 1,
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
type: 'image-set',
|
|
20
|
+
id: 'http://api.ft.com/content/57b3150f-434e-4463-a863-3311d53bf5c2',
|
|
21
|
+
data: {
|
|
22
|
+
referenceIndex: 0,
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
} as ContentTree.ImageSet,
|
|
25
|
+
{
|
|
26
|
+
type: 'paragraph',
|
|
27
|
+
children: [
|
|
28
|
+
{
|
|
29
|
+
type: 'text',
|
|
30
|
+
value:
|
|
31
|
+
'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. ',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
} as ContentTree.Paragraph,
|
|
35
|
+
{
|
|
36
|
+
type: 'paragraph',
|
|
37
|
+
children: [
|
|
38
|
+
{
|
|
39
|
+
type: 'text',
|
|
40
|
+
value:
|
|
41
|
+
'In a vote on Wednesday night, the lower chamber of Congress rejected Greene’s bid with overwhelming support from Democrats as well as Republicans. ',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
} as ContentTree.Paragraph,
|
|
45
|
+
,
|
|
46
|
+
{
|
|
47
|
+
type: 'paragraph',
|
|
48
|
+
children: [
|
|
49
|
+
{
|
|
50
|
+
type: 'text',
|
|
51
|
+
value:
|
|
52
|
+
'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. ',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
} as ContentTree.Paragraph,
|
|
56
|
+
{
|
|
57
|
+
id: 'http://api.ft.com/content/02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
58
|
+
type: 'recommended',
|
|
59
|
+
heading: 'Recommended',
|
|
60
|
+
teaserTitleOverride:
|
|
61
|
+
'Hargreaves Lansdown backs £5.4bn private equity takeover ',
|
|
62
|
+
data: {
|
|
63
|
+
referenceIndex: 1,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
] as ContentTree.Body['children'],
|
|
67
|
+
},
|
|
68
|
+
references: [
|
|
26
69
|
{
|
|
27
|
-
type: '
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
70
|
+
type: 'image-set',
|
|
71
|
+
picture: {
|
|
72
|
+
__typename: 'PictureStandard',
|
|
73
|
+
alt: 'A Waitrose shop in London ',
|
|
74
|
+
caption:
|
|
75
|
+
'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’',
|
|
76
|
+
credit: '© Ian Smith/FT',
|
|
77
|
+
imageType: 'image',
|
|
78
|
+
layoutWidth: 'standard',
|
|
79
|
+
fallbackImage: {
|
|
80
|
+
__typename: 'ImageStandardInline',
|
|
81
|
+
height: 1368,
|
|
82
|
+
width: 1600,
|
|
83
|
+
caption:
|
|
84
|
+
'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’',
|
|
85
|
+
credit: '© Ian Smith/FT',
|
|
86
|
+
format: 'standard-inline',
|
|
87
|
+
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',
|
|
88
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
33
89
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
90
|
+
images: [
|
|
91
|
+
{
|
|
92
|
+
__typename: 'ImageStandardInline',
|
|
93
|
+
height: 1368,
|
|
94
|
+
width: 1600,
|
|
95
|
+
caption:
|
|
96
|
+
'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’',
|
|
97
|
+
credit: '© Ian Smith/FT',
|
|
98
|
+
format: 'standard-inline',
|
|
99
|
+
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',
|
|
100
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
101
|
+
sourceSet: [
|
|
102
|
+
{
|
|
103
|
+
dpr: 1,
|
|
104
|
+
width: 700,
|
|
105
|
+
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',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
dpr: 2,
|
|
109
|
+
width: 700,
|
|
110
|
+
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',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
37
117
|
{
|
|
38
|
-
type: '
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
118
|
+
type: 'recommended',
|
|
119
|
+
isInLiveBlog: true,
|
|
120
|
+
teaser: {
|
|
121
|
+
title: 'Hargreaves Lansdown backs £5.4bn private equity takeover ',
|
|
122
|
+
id: '02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
123
|
+
url: 'https://www.ft.com/content/02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
124
|
+
relativeUrl: '/content/02e03dda-165c-40ec-89e3-c2ba502fe9b0',
|
|
125
|
+
type: 'article',
|
|
126
|
+
publishedDate: '2024-06-18T15:25:49.739Z',
|
|
127
|
+
firstPublishedDate: '2024-06-18T13:49:35.049Z',
|
|
128
|
+
metaPrefixText: null,
|
|
129
|
+
metaSuffixText: null,
|
|
130
|
+
metaLink: {
|
|
131
|
+
id: '4d1b8529-f8a3-4740-97e6-4a6f68214092',
|
|
132
|
+
url: 'https://www.ft.com/stream/4d1b8529-f8a3-4740-97e6-4a6f68214092',
|
|
133
|
+
relativeUrl: '/stream/4d1b8529-f8a3-4740-97e6-4a6f68214092',
|
|
134
|
+
prefLabel: 'Hargreaves Lansdown PLC',
|
|
135
|
+
},
|
|
136
|
+
metaAltLink: null,
|
|
137
|
+
image: {
|
|
138
|
+
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',
|
|
139
|
+
width: 2266,
|
|
140
|
+
height: 1275,
|
|
141
|
+
altText: 'Hargreaves Lansdown logo',
|
|
44
142
|
},
|
|
45
|
-
|
|
46
|
-
|
|
143
|
+
indicators: {
|
|
144
|
+
accessLevel: 'subscribed',
|
|
145
|
+
isOpinion: false,
|
|
146
|
+
isColumn: false,
|
|
147
|
+
isPodcast: false,
|
|
148
|
+
isEditorsChoice: false,
|
|
149
|
+
isExclusive: false,
|
|
150
|
+
isScoop: false,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const structuredContentNoMoreElements = {
|
|
158
|
+
tree: {
|
|
159
|
+
type: 'body',
|
|
160
|
+
version: 1,
|
|
161
|
+
children: [
|
|
162
|
+
{
|
|
163
|
+
type: 'image-set',
|
|
164
|
+
id: 'http://api.ft.com/content/57b3150f-434e-4463-a863-3311d53bf5c2',
|
|
165
|
+
data: {
|
|
166
|
+
referenceIndex: 0,
|
|
167
|
+
},
|
|
168
|
+
} as ContentTree.ImageSet,
|
|
169
|
+
{
|
|
170
|
+
type: 'paragraph',
|
|
171
|
+
children: [
|
|
172
|
+
{
|
|
173
|
+
type: 'text',
|
|
174
|
+
value:
|
|
175
|
+
'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. ',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
} as ContentTree.Paragraph,
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
references: [
|
|
47
182
|
{
|
|
48
|
-
type: '
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
183
|
+
type: 'image-set',
|
|
184
|
+
picture: {
|
|
185
|
+
__typename: 'PictureStandard',
|
|
186
|
+
alt: 'A Waitrose shop in London ',
|
|
187
|
+
caption:
|
|
188
|
+
'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’',
|
|
189
|
+
credit: '© Ian Smith/FT',
|
|
190
|
+
imageType: 'image',
|
|
191
|
+
layoutWidth: 'standard',
|
|
192
|
+
fallbackImage: {
|
|
193
|
+
__typename: 'ImageStandardInline',
|
|
194
|
+
height: 1368,
|
|
195
|
+
width: 1600,
|
|
196
|
+
caption:
|
|
197
|
+
'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’',
|
|
198
|
+
credit: '© Ian Smith/FT',
|
|
199
|
+
format: 'standard-inline',
|
|
200
|
+
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',
|
|
201
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
202
|
+
},
|
|
203
|
+
images: [
|
|
204
|
+
{
|
|
205
|
+
__typename: 'ImageStandardInline',
|
|
206
|
+
height: 1368,
|
|
207
|
+
width: 1600,
|
|
208
|
+
caption:
|
|
209
|
+
'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’',
|
|
210
|
+
credit: '© Ian Smith/FT',
|
|
211
|
+
format: 'standard-inline',
|
|
212
|
+
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',
|
|
213
|
+
id: '5a89fdc8-323b-4cf2-a317-794074a1adae',
|
|
214
|
+
sourceSet: [
|
|
215
|
+
{
|
|
216
|
+
dpr: 1,
|
|
217
|
+
width: 700,
|
|
218
|
+
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',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
dpr: 2,
|
|
222
|
+
width: 700,
|
|
223
|
+
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',
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
],
|
|
56
228
|
},
|
|
57
|
-
}
|
|
58
|
-
]
|
|
229
|
+
},
|
|
230
|
+
],
|
|
59
231
|
}
|
|
60
|
-
|
|
232
|
+
|
|
233
|
+
const storyArgs: ArgsType = {
|
|
61
234
|
expandLabel: 'Open',
|
|
62
235
|
collapseLabel: 'Close',
|
|
63
236
|
onlyMobile: false,
|
|
64
237
|
id: '111232323-12123-2323',
|
|
238
|
+
structuredContent: structuredContent,
|
|
65
239
|
}
|
|
66
240
|
|
|
67
241
|
export default {
|
|
@@ -70,9 +244,7 @@ export default {
|
|
|
70
244
|
tags: ['autodocs'],
|
|
71
245
|
}
|
|
72
246
|
|
|
73
|
-
const LiveBLogWrapper: React.FC<
|
|
74
|
-
args
|
|
75
|
-
) => {
|
|
247
|
+
const LiveBLogWrapper: React.FC<ArgsType> = (args) => {
|
|
76
248
|
const { classNames } = args
|
|
77
249
|
|
|
78
250
|
return (
|
|
@@ -102,7 +274,8 @@ const LiveBLogWrapper: React.FC<ExpanderProps & { classNames?: string }> = (
|
|
|
102
274
|
)
|
|
103
275
|
}
|
|
104
276
|
|
|
105
|
-
const LiveBlogPostWrapper = (args:
|
|
277
|
+
const LiveBlogPostWrapper = (args: ArgsType) => {
|
|
278
|
+
const { structuredContent, ...expanderProps } = args
|
|
106
279
|
useEffect(() => {
|
|
107
280
|
oTracking.init({
|
|
108
281
|
context: { product: 'next' },
|
|
@@ -123,8 +296,8 @@ const LiveBlogPostWrapper = (args: ExpanderProps) => {
|
|
|
123
296
|
data-trackable-context-post="1234"
|
|
124
297
|
data-component="example-boundary"
|
|
125
298
|
>
|
|
126
|
-
<ExpanderServer {...
|
|
127
|
-
<RichText structuredContent={
|
|
299
|
+
<ExpanderServer {...expanderProps} id={`${args.id}_expander`}>
|
|
300
|
+
<RichText structuredContent={structuredContent} />
|
|
128
301
|
</ExpanderServer>
|
|
129
302
|
</div>
|
|
130
303
|
</div>
|
|
@@ -132,13 +305,13 @@ const LiveBlogPostWrapper = (args: ExpanderProps) => {
|
|
|
132
305
|
)
|
|
133
306
|
}
|
|
134
307
|
|
|
135
|
-
export const OnlyServer = (args:
|
|
308
|
+
export const OnlyServer = (args: ArgsType) => {
|
|
136
309
|
return <LiveBLogWrapper {...args} />
|
|
137
310
|
}
|
|
138
311
|
|
|
139
312
|
OnlyServer.args = { ...storyArgs }
|
|
140
313
|
|
|
141
|
-
export const WithClient = (args:
|
|
314
|
+
export const WithClient = (args: ArgsType) => {
|
|
142
315
|
useEffect(() => {
|
|
143
316
|
const clips = ClipClient.init(null, {})
|
|
144
317
|
const expanders = ExpanderClient.init()
|
|
@@ -157,3 +330,10 @@ OnlyMobileWithClient.args = { ...storyArgs, onlyMobile: true }
|
|
|
157
330
|
|
|
158
331
|
export const OnlyMobileServer = OnlyServer
|
|
159
332
|
OnlyMobileServer.args = { ...storyArgs, onlyMobile: true }
|
|
333
|
+
|
|
334
|
+
export const NoMoreElements = (args: any) => {
|
|
335
|
+
return WithClient({
|
|
336
|
+
...args,
|
|
337
|
+
structuredContent: structuredContentNoMoreElements,
|
|
338
|
+
})
|
|
339
|
+
}
|
|
@@ -18,6 +18,7 @@ $o-typography-load-fonts: false;
|
|
|
18
18
|
@import '@financial-times/o-icons/main';
|
|
19
19
|
@import "@financial-times/o-colors/main";
|
|
20
20
|
@import "@financial-times/o-spacing/main";
|
|
21
|
+
@import "@financial-times/o-teaser/main";
|
|
21
22
|
// HACK: n-content-body _should not_ include n-ui-foundations
|
|
22
23
|
$n-ui-foundations-is-silent: true;
|
|
23
24
|
@import '@financial-times/cp-content-pipeline-styles/main';
|
|
@@ -321,4 +322,23 @@ $desktop-breakpoint: 980px;
|
|
|
321
322
|
display: none;
|
|
322
323
|
}
|
|
323
324
|
|
|
324
|
-
@include oIcons($opts: ('icons': ('warning-alt')));
|
|
325
|
+
@include oIcons($opts: ('icons': ('warning-alt')));
|
|
326
|
+
@include oTeaser(
|
|
327
|
+
$opts: (
|
|
328
|
+
'elements': (
|
|
329
|
+
'default',
|
|
330
|
+
'images',
|
|
331
|
+
'timestamp',
|
|
332
|
+
'syndication',
|
|
333
|
+
'promoted'
|
|
334
|
+
),
|
|
335
|
+
'themes': (
|
|
336
|
+
'standard',
|
|
337
|
+
'small',
|
|
338
|
+
'audio',
|
|
339
|
+
'large',
|
|
340
|
+
'hero',
|
|
341
|
+
'package'
|
|
342
|
+
)
|
|
343
|
+
)
|
|
344
|
+
);
|