@financial-times/cp-content-pipeline-ui 6.15.6-beta.0 → 7.0.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 +29 -0
- package/lib/components/BigNumber/index.d.ts +4 -1
- package/lib/components/BigNumber/index.js +1 -1
- package/lib/components/BigNumber/index.js.map +1 -1
- package/lib/components/Body/index.test.js +12 -1
- package/lib/components/Body/index.test.js.map +1 -1
- package/lib/components/Byline/index.js +2 -2
- package/lib/components/Byline/index.js.map +1 -1
- package/lib/components/Clip/components/ClipTag.d.ts +3 -3
- 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/VideoDescription.d.ts +2 -2
- package/lib/components/Clip/components/VideoDescription.js.map +1 -1
- package/lib/components/Clip/template/component.d.ts +9 -4
- package/lib/components/Clip/template/component.js +19 -14
- package/lib/components/Clip/template/component.js.map +1 -1
- package/lib/components/Clip/test/fixtures.js +114 -77
- package/lib/components/Clip/test/fixtures.js.map +1 -1
- package/lib/components/Clip/test/snapshot.spec.js +110 -61
- package/lib/components/Clip/test/snapshot.spec.js.map +1 -1
- package/lib/components/Flourish/index.d.ts +4 -12
- package/lib/components/Flourish/index.js +1 -1
- package/lib/components/Flourish/index.js.map +1 -1
- package/lib/components/Flourish/test/snapshot.spec.js +48 -6
- package/lib/components/Flourish/test/snapshot.spec.js.map +1 -1
- package/lib/components/Heading/index.d.ts +2 -1
- package/lib/components/Heading/index.js +2 -2
- package/lib/components/Heading/index.js.map +1 -1
- package/lib/components/ImageOverrideWrappers/index.d.ts +4 -0
- package/lib/components/ImageOverrideWrappers/index.js +44 -0
- package/lib/components/ImageOverrideWrappers/index.js.map +1 -0
- package/lib/components/ImageSet/index.d.ts +12 -8
- package/lib/components/ImageSet/index.js +13 -8
- package/lib/components/ImageSet/index.js.map +1 -1
- package/lib/components/Layout/index.d.ts +3 -13
- package/lib/components/Layout/index.js +1 -1
- package/lib/components/Layout/index.js.map +1 -1
- package/lib/components/MainImage/index.js +2 -2
- package/lib/components/MainImage/index.js.map +1 -1
- package/lib/components/Paragraph/index.d.ts +4 -1
- package/lib/components/Paragraph/index.js.map +1 -1
- package/lib/components/Pullquote/index.d.ts +4 -1
- package/lib/components/Pullquote/index.js +7 -6
- package/lib/components/Pullquote/index.js.map +1 -1
- package/lib/components/Recommended/index.d.ts +5 -8
- package/lib/components/Recommended/index.js +1 -6
- package/lib/components/Recommended/index.js.map +1 -1
- package/lib/components/RichText/BasicComponents.d.ts +12 -11
- package/lib/components/RichText/BasicComponents.js +2 -2
- package/lib/components/RichText/BasicComponents.js.map +1 -1
- package/lib/components/RichText/index.d.ts +10 -3
- package/lib/components/RichText/index.js +8 -2
- package/lib/components/RichText/index.js.map +1 -1
- package/lib/components/Scrollytelling/ScrollyImage.d.ts +6 -3
- package/lib/components/Scrollytelling/ScrollyImage.js +2 -2
- package/lib/components/Scrollytelling/ScrollyImage.js.map +1 -1
- package/lib/components/Scrollytelling/index.d.ts +14 -6
- package/lib/components/Scrollytelling/index.js +3 -3
- package/lib/components/Scrollytelling/index.js.map +1 -1
- package/lib/components/Table/TableBody.d.ts +4 -1
- package/lib/components/Table/TableBody.js +1 -1
- package/lib/components/Table/TableBody.js.map +1 -1
- package/lib/components/Table/TableCell.d.ts +4 -4
- package/lib/components/Table/TableCell.js +2 -2
- package/lib/components/Table/TableCell.js.map +1 -1
- package/lib/components/Table/index.d.ts +4 -1
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Topper/Picture.d.ts +1 -1
- package/lib/components/Topper/Picture.js +6 -3
- package/lib/components/Topper/Picture.js.map +1 -1
- package/lib/components/Topper/index.js +7 -1
- package/lib/components/Topper/index.js.map +1 -1
- package/lib/components/Tweet/index.d.ts +4 -2
- package/lib/components/Tweet/index.js +1 -1
- package/lib/components/Tweet/index.js.map +1 -1
- package/lib/components/Video/index.d.ts +4 -2
- package/lib/components/Video/index.js +1 -1
- package/lib/components/Video/index.js.map +1 -1
- package/lib/components/Workarounds.d.ts +88 -0
- package/lib/components/Workarounds.js +3 -0
- package/lib/components/Workarounds.js.map +1 -0
- package/lib/components/YoutubeVideo/index.d.ts +5 -2
- package/lib/components/YoutubeVideo/index.js +1 -1
- package/lib/components/YoutubeVideo/index.js.map +1 -1
- package/lib/components/types.d.ts +5 -0
- package/lib/components/types.js +3 -0
- package/lib/components/types.js.map +1 -0
- package/lib/context.d.ts +14 -0
- package/lib/context.js +2 -1
- package/lib/context.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/stories/Clip.stories.d.ts +39 -243
- package/lib/stories/Clip.stories.js +320 -307
- package/lib/stories/Clip.stories.js.map +1 -1
- package/package.json +2 -1
- package/src/components/BigNumber/index.tsx +6 -3
- package/src/components/Body/__snapshots__/index.test.tsx.snap +2 -1
- package/src/components/Body/index.test.tsx +12 -1
- package/src/components/Byline/index.tsx +9 -4
- package/src/components/Clip/components/ClipTag.tsx +3 -6
- package/src/components/Clip/components/ClosedCaptions.tsx +2 -2
- package/src/components/Clip/components/VideoDescription.tsx +2 -2
- package/src/components/Clip/template/component.tsx +39 -41
- package/src/components/Clip/test/__snapshots__/snapshot.spec.tsx.snap +4 -8
- package/src/components/Clip/test/fixtures.ts +127 -90
- package/src/components/Clip/test/snapshot.spec.tsx +123 -102
- package/src/components/Flourish/index.tsx +10 -21
- package/src/components/Flourish/test/snapshot.spec.tsx +48 -36
- package/src/components/Heading/index.tsx +6 -5
- package/src/components/ImageOverrideWrappers/index.tsx +34 -0
- package/src/components/ImageSet/index.tsx +75 -55
- package/src/components/Layout/index.tsx +6 -18
- package/src/components/MainImage/index.tsx +10 -8
- package/src/components/Paragraph/index.tsx +4 -1
- package/src/components/Pullquote/index.tsx +15 -8
- package/src/components/Recommended/index.tsx +11 -11
- package/src/components/RichText/BasicComponents.tsx +22 -20
- package/src/components/RichText/index.tsx +35 -12
- package/src/components/Scrollytelling/ScrollyImage.tsx +10 -7
- package/src/components/Scrollytelling/index.tsx +19 -9
- package/src/components/Table/TableBody.tsx +7 -3
- package/src/components/Table/TableCell.tsx +9 -7
- package/src/components/Table/index.tsx +12 -9
- package/src/components/Topper/Picture.tsx +17 -12
- package/src/components/Topper/index.tsx +7 -4
- package/src/components/Tweet/index.tsx +4 -2
- package/src/components/Video/index.tsx +4 -6
- package/src/components/Workarounds.ts +188 -0
- package/src/components/YoutubeVideo/index.tsx +5 -4
- package/src/components/types.ts +6 -0
- package/src/context.ts +22 -1
- package/src/index.ts +4 -1
- package/src/stories/Clip.stories.tsx +357 -341
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -28,72 +28,107 @@ describe('Clip Snapshot', () => {
|
|
|
28
28
|
const poster = 'localhost:8080/fakeposter.jpg';
|
|
29
29
|
it('in-line render', () => {
|
|
30
30
|
const tree = react_test_renderer_1.default
|
|
31
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
31
|
+
.create(react_1.default.createElement(index_1.default, { content: { url, dataLayout: 'in-line' } }))
|
|
32
32
|
.toJSON();
|
|
33
33
|
expect(formatString(tree)).toMatchSnapshot();
|
|
34
34
|
});
|
|
35
35
|
it('full-grid default render', () => {
|
|
36
36
|
const tree = react_test_renderer_1.default
|
|
37
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
37
|
+
.create(react_1.default.createElement(index_1.default, { content: { url, dataLayout: 'full-grid' } }))
|
|
38
38
|
.toJSON();
|
|
39
39
|
expect(formatString(tree)).toMatchSnapshot();
|
|
40
40
|
});
|
|
41
41
|
it('mid-grid default render', () => {
|
|
42
42
|
const tree = react_test_renderer_1.default
|
|
43
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
43
|
+
.create(react_1.default.createElement(index_1.default, { content: { url, dataLayout: 'mid-grid' } }))
|
|
44
44
|
.toJSON();
|
|
45
45
|
expect(formatString(tree)).toMatchSnapshot();
|
|
46
46
|
});
|
|
47
47
|
it('in-line render with attributes', () => {
|
|
48
48
|
const tree = react_test_renderer_1.default
|
|
49
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
49
|
+
.create(react_1.default.createElement(index_1.default, { content: {
|
|
50
|
+
url,
|
|
51
|
+
dataLayout: 'in-line',
|
|
52
|
+
autoplay: true,
|
|
53
|
+
loop: true,
|
|
54
|
+
description: 'Video description',
|
|
55
|
+
caption: 'caption text',
|
|
56
|
+
credits: '@credits',
|
|
57
|
+
poster,
|
|
58
|
+
posterAlt: 'text poster',
|
|
59
|
+
muted: true,
|
|
60
|
+
} }))
|
|
50
61
|
.toJSON();
|
|
51
62
|
expect(formatString(tree)).toMatchSnapshot();
|
|
52
63
|
});
|
|
53
64
|
it('full-grid render with attributes', () => {
|
|
54
65
|
const tree = react_test_renderer_1.default
|
|
55
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
66
|
+
.create(react_1.default.createElement(index_1.default, { content: {
|
|
67
|
+
url,
|
|
68
|
+
dataLayout: 'full-grid',
|
|
69
|
+
autoplay: true,
|
|
70
|
+
loop: true,
|
|
71
|
+
description: 'Video description',
|
|
72
|
+
caption: 'caption text',
|
|
73
|
+
credits: '@credits',
|
|
74
|
+
poster,
|
|
75
|
+
posterAlt: 'text poster',
|
|
76
|
+
muted: true,
|
|
77
|
+
} }))
|
|
56
78
|
.toJSON();
|
|
57
79
|
expect(formatString(tree)).toMatchSnapshot();
|
|
58
80
|
});
|
|
59
81
|
it('mid-grid render with attributes', () => {
|
|
60
82
|
const tree = react_test_renderer_1.default
|
|
61
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
83
|
+
.create(react_1.default.createElement(index_1.default, { content: {
|
|
84
|
+
url,
|
|
85
|
+
dataLayout: 'mid-grid',
|
|
86
|
+
autoplay: true,
|
|
87
|
+
loop: true,
|
|
88
|
+
description: 'Video description',
|
|
89
|
+
caption: 'caption text',
|
|
90
|
+
credits: '@credits',
|
|
91
|
+
poster,
|
|
92
|
+
posterAlt: 'text poster',
|
|
93
|
+
muted: true,
|
|
94
|
+
} }))
|
|
62
95
|
.toJSON();
|
|
63
96
|
expect(formatString(tree)).toMatchSnapshot();
|
|
64
97
|
});
|
|
65
98
|
it('renders multiple video sources', () => {
|
|
66
99
|
const videoWithMultipleSources = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
100
|
+
content: {
|
|
101
|
+
dataLayout: 'in-line',
|
|
102
|
+
id: '84d7e1b0-e8b2-4ffc-a798-306f29dc9d52',
|
|
103
|
+
url: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/optimised-media-files/16968704765960/1080x1920.mp4',
|
|
104
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
105
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
106
|
+
clips: [
|
|
107
|
+
{
|
|
108
|
+
dataSource: [
|
|
109
|
+
{
|
|
110
|
+
binaryUrl: 'https://whatever/1080x1920.mp4',
|
|
111
|
+
mediaType: 'video/mp4',
|
|
112
|
+
pixelHeight: 1080,
|
|
113
|
+
pixelWidth: 1920,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
binaryUrl: 'https://whatever/320x240.mp4',
|
|
117
|
+
mediaType: 'video/mp4',
|
|
118
|
+
pixelHeight: 320,
|
|
119
|
+
pixelWidth: 240,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
binaryUrl: 'https://whatever/640x480.avi',
|
|
123
|
+
mediaType: 'video/avi',
|
|
124
|
+
pixelHeight: 640,
|
|
125
|
+
pixelWidth: 480,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
poster: 'https://whatever/1080x1920.jpg',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
97
132
|
};
|
|
98
133
|
const tree = react_test_renderer_1.default
|
|
99
134
|
.create(react_1.default.createElement(index_1.default, { ...videoWithMultipleSources }))
|
|
@@ -102,30 +137,34 @@ describe('Clip Snapshot', () => {
|
|
|
102
137
|
});
|
|
103
138
|
it('in-line rendered output is the same for CAPI and cp-content-pipeline data', () => {
|
|
104
139
|
const inlineVideo = {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
140
|
+
content: {
|
|
141
|
+
dataLayout: 'in-line',
|
|
142
|
+
url: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/optimised-media-files/16968704765960/1080x1920.mp4',
|
|
143
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
144
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
145
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
146
|
+
},
|
|
110
147
|
};
|
|
111
148
|
const inlineVideoCPPipeline = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
149
|
+
content: {
|
|
150
|
+
dataLayout: 'in-line',
|
|
151
|
+
id: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/optimised-media-files/16968704765960/1080x1920.mp4',
|
|
152
|
+
url: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/optimised-media-files/16968704765960/1080x1920.mp4',
|
|
153
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
154
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
155
|
+
clips: [
|
|
156
|
+
{
|
|
157
|
+
dataSource: [
|
|
158
|
+
{
|
|
159
|
+
binaryUrl: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/optimised-media-files/16968704765960/1080x1920.mp4',
|
|
160
|
+
mediaType: 'video/mp4',
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
id: '22a65f5a-ead3-4a25-bf79-c6b080f00547',
|
|
164
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
129
168
|
};
|
|
130
169
|
const capiContainer = react_test_renderer_1.default
|
|
131
170
|
.create(react_1.default.createElement(index_1.default, { ...inlineVideo }))
|
|
@@ -138,9 +177,19 @@ describe('Clip Snapshot', () => {
|
|
|
138
177
|
// Temporary test to check that the new Origami image is supported.
|
|
139
178
|
it('supports new Origami images, fallbacking to the previous implementation', () => {
|
|
140
179
|
const tree = react_test_renderer_1.default
|
|
141
|
-
.create(react_1.default.createElement(index_1.default, {
|
|
142
|
-
|
|
143
|
-
|
|
180
|
+
.create(react_1.default.createElement(index_1.default, { content: {
|
|
181
|
+
url,
|
|
182
|
+
dataLayout: 'full-grid',
|
|
183
|
+
autoplay: true,
|
|
184
|
+
loop: true,
|
|
185
|
+
description: 'Video description',
|
|
186
|
+
caption: 'caption text',
|
|
187
|
+
credits: '@credits',
|
|
188
|
+
// New Origami image
|
|
189
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2F898c06df-6ffa-4ed6-87a3-48a8edc309ae?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
190
|
+
posterAlt: 'text poster',
|
|
191
|
+
muted: true,
|
|
192
|
+
} }))
|
|
144
193
|
.toJSON();
|
|
145
194
|
expect(formatString(tree)).toMatchSnapshot();
|
|
146
195
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.spec.js","sourceRoot":"","sources":["../../../../src/components/Clip/test/snapshot.spec.tsx"],"names":[],"mappings":";;;;;AAAA,6DAA6D;AAC7D,cAAc;AACd,kDAAyB;AACzB,gFAAgF;AAChF,iDAAiD;AACjD,8EAA0C;AAC1C,wDAA+B;AAC/B,+BAAkC;AAClC,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;IAC9C,MAAM,CAAC,WAAW,GAAG,kBAAW,CAAA;AAClC,CAAC;AACD,8DAA0C;AAE1C,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,EAAE,CAC5B,kBAAQ,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE,EAAE,oCAAoC;IACpD,QAAQ,EAAE,CAAC,EAAE,mCAAmC;IAChD,OAAO,EAAE,KAAK,EAAE,6BAA6B;IAC7C,iCAAiC;CAClC,CAAC,CAAA;AAEJ,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;QAC5C,MAAM,GAAG,GAAG,8BAA8B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,WAAW,GAAG,6BAAQ;iBACzB,MAAM,CAAC,8BAAC,eAAU,OAAK,qBAAqB,GAAI,CAAC;iBACjD,MAAM,EAAE,CAAA;YAEX,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QACF,mEAAmE;QACnE,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;YACjF,MAAM,IAAI,GAAG,6BAAQ;iBAClB,MAAM,CACL,8BAAC,eAAU,IACT,OAAO,EAAE;oBACP,GAAG;oBACH,UAAU,EAAE,WAAW;oBACvB,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,IAAI;oBACV,WAAW,EAAE,mBAAmB;oBAChC,OAAO,EAAE,cAAc;oBACvB,OAAO,EAAE,UAAU;oBACnB,oBAAoB;oBACpB,MAAM,EACJ,qPAAqP;oBACvP,SAAS,EAAE,aAAa;oBACxB,KAAK,EAAE,IAAI;iBACZ,GACW,CACf;iBACA,MAAM,EAAE,CAAA;YACX,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;QAC9C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
flourishType?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
layoutWidth?: string;
|
|
8
|
-
fallbackImage: {
|
|
9
|
-
url?: string | null | undefined;
|
|
10
|
-
width?: number | null | undefined;
|
|
11
|
-
height?: number | null | undefined;
|
|
12
|
-
};
|
|
2
|
+
import { ContentProps } from '../types';
|
|
3
|
+
import { ContentTreeWorkarounds } from '@financial-times/cp-content-pipeline-schema';
|
|
4
|
+
interface FlourishProps extends ContentProps<ContentTreeWorkarounds.Flourish> {
|
|
13
5
|
iFrame?: boolean;
|
|
14
6
|
inArticleBody?: boolean;
|
|
15
|
-
}
|
|
7
|
+
}
|
|
16
8
|
declare const Flourish: React.FC<FlourishProps>;
|
|
17
9
|
export default Flourish;
|
|
@@ -9,7 +9,7 @@ const DisclaimerNotice = ({ id }) => (react_1.default.createElement("div", { id:
|
|
|
9
9
|
react_1.default.createElement("div", { className: "o-message__container" },
|
|
10
10
|
react_1.default.createElement("div", { className: "o-message__content" },
|
|
11
11
|
react_1.default.createElement("p", { className: "o-message__content-main" }, "You are seeing a snapshot of an interactive graphic. This is most likely due to being offline or JavaScript being disabled in your browser.")))));
|
|
12
|
-
const Flourish = ({ id, flourishType, description, layoutWidth, fallbackImage, iFrame = false, inArticleBody = true, }) => {
|
|
12
|
+
const Flourish = ({ content: { id, flourishType, description, layoutWidth, fallbackImage }, iFrame = false, inArticleBody = true, }) => {
|
|
13
13
|
if (!id)
|
|
14
14
|
return null;
|
|
15
15
|
const anchorHref = `#${id}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Flourish/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,4DAAmC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Flourish/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,4DAAmC;AAQnC,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,EAAmB,EAAE,EAAE,CAAC,CACpD,uCACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAC,mEAAmE,sBAC5D,WAAW;IAE5B,uCAAK,SAAS,EAAC,sBAAsB;QACnC,uCAAK,SAAS,EAAC,oBAAoB;YACjC,qCAAG,SAAS,EAAC,yBAAyB,kJAIlC,CACA,CACF,CACF,CACP,CAAA;AAOD,MAAM,QAAQ,GAA4B,CAAC,EACzC,OAAO,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,EACtE,MAAM,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,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,EACxD,SAAS,EAAC,mBAAmB,GACrB,CACX;QACD,0CACE,SAAS,EAAE,gBAAgB,+BACA,QAAQ,CAAC,CAAC,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,gCACrC,QAAQ,CAAC,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI;YAEnE,qCAAG,IAAI,EAAE,UAAU;gBACjB,8DAGmB,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,sBACrC,EAAE,wBACA,YAAY;oBAEhC,8BAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAI;oBAC5B,uCACE,GAAG,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,EAC7B,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,gBAAgB,GACvB,CACM,CACR,CACG,CACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,QAAQ,CAAA"}
|
|
@@ -26,32 +26,74 @@ const anImage = {
|
|
|
26
26
|
};
|
|
27
27
|
describe('Flourish component', () => {
|
|
28
28
|
it('renders with a full-grid layout and fallback image', async () => {
|
|
29
|
-
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, {
|
|
29
|
+
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, { content: {
|
|
30
|
+
type: 'flourish',
|
|
31
|
+
id: '123',
|
|
32
|
+
flourishType: 'bar',
|
|
33
|
+
description: 'foo',
|
|
34
|
+
layoutWidth: 'full-grid',
|
|
35
|
+
fallbackImage: anImage,
|
|
36
|
+
} }));
|
|
30
37
|
expect(container).toMatchSnapshot();
|
|
31
38
|
});
|
|
32
39
|
it('renders ignoring layout different from full-grid', async () => {
|
|
33
|
-
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, {
|
|
40
|
+
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, { content: {
|
|
41
|
+
type: 'flourish',
|
|
42
|
+
id: '123',
|
|
43
|
+
flourishType: 'bar',
|
|
44
|
+
description: 'foo',
|
|
45
|
+
layoutWidth: 'whatever',
|
|
46
|
+
fallbackImage: anImage,
|
|
47
|
+
} }));
|
|
34
48
|
expect(container).toMatchSnapshot();
|
|
35
49
|
});
|
|
36
50
|
it('renders with an iframe rather than using the embed script to insert it', async () => {
|
|
37
51
|
const iFrame = true;
|
|
38
|
-
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, {
|
|
52
|
+
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, { content: {
|
|
53
|
+
type: 'flourish',
|
|
54
|
+
id: '123',
|
|
55
|
+
flourishType: 'bar',
|
|
56
|
+
description: 'foo',
|
|
57
|
+
layoutWidth: 'full-grid',
|
|
58
|
+
fallbackImage: anImage,
|
|
59
|
+
}, iFrame: iFrame }));
|
|
39
60
|
expect(container).toMatchSnapshot();
|
|
40
61
|
});
|
|
41
62
|
it('renders without n-content-layout class for charts not in article body', async () => {
|
|
42
63
|
const inArticleBody = false;
|
|
43
|
-
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, {
|
|
64
|
+
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, { content: {
|
|
65
|
+
type: 'flourish',
|
|
66
|
+
id: '123',
|
|
67
|
+
flourishType: 'bar',
|
|
68
|
+
description: 'foo',
|
|
69
|
+
layoutWidth: 'full-grid',
|
|
70
|
+
fallbackImage: anImage,
|
|
71
|
+
}, inArticleBody: inArticleBody }));
|
|
44
72
|
expect(container).toMatchSnapshot();
|
|
45
73
|
});
|
|
46
74
|
});
|
|
47
75
|
it('sets the hideTitle param in the iframe url to true when not in article body', async () => {
|
|
48
76
|
const inArticleBody = false;
|
|
49
77
|
const iFrame = true;
|
|
50
|
-
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, {
|
|
78
|
+
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, { content: {
|
|
79
|
+
type: 'flourish',
|
|
80
|
+
id: '123',
|
|
81
|
+
flourishType: 'bar',
|
|
82
|
+
description: 'foo',
|
|
83
|
+
layoutWidth: 'full-grid',
|
|
84
|
+
fallbackImage: anImage,
|
|
85
|
+
}, iFrame: iFrame, inArticleBody: inArticleBody }));
|
|
51
86
|
expect(container).toMatchSnapshot();
|
|
52
87
|
});
|
|
53
88
|
it('does not set aspect ratios when in article body', async () => {
|
|
54
|
-
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, {
|
|
89
|
+
const { container } = (0, react_2.render)(react_1.default.createElement(__1.default, { content: {
|
|
90
|
+
type: 'flourish',
|
|
91
|
+
id: '123',
|
|
92
|
+
flourishType: 'bar',
|
|
93
|
+
description: 'foo',
|
|
94
|
+
layoutWidth: 'full-grid',
|
|
95
|
+
fallbackImage: anImage,
|
|
96
|
+
} }));
|
|
55
97
|
expect(container).toMatchSnapshot();
|
|
56
98
|
});
|
|
57
99
|
//# sourceMappingURL=snapshot.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.spec.js","sourceRoot":"","sources":["../../../../src/components/Flourish/test/snapshot.spec.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,kDAA+C;AAC/C,4CAA0B;AAE1B,IAAK,cAEJ;AAFD,WAAK,cAAc;IACjB,uCAAqB,CAAA;AACvB,CAAC,EAFI,cAAc,KAAd,cAAc,QAElB;AAED,MAAM,OAAO,GAAG;IACd,EAAE,EAAE,KAAK;IACT,GAAG,EAAE,+BAA+B;IACpC,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,UAA4B;IACpC,SAAS,EAAE;QACT;YACE,GAAG,EAAE,sCAAsC;YAC3C,KAAK,EAAE,GAAG;YACV,GAAG,EAAE,CAAC;SACP;KACF;CACF,CAAA;AACD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;QAClE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,cAAM,EAC1B,8BAAC,WAAQ,IACP,IAAI,
|
|
1
|
+
{"version":3,"file":"snapshot.spec.js","sourceRoot":"","sources":["../../../../src/components/Flourish/test/snapshot.spec.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,kDAA+C;AAC/C,4CAA0B;AAE1B,IAAK,cAEJ;AAFD,WAAK,cAAc;IACjB,uCAAqB,CAAA;AACvB,CAAC,EAFI,cAAc,KAAd,cAAc,QAElB;AAED,MAAM,OAAO,GAAG;IACd,EAAE,EAAE,KAAK;IACT,GAAG,EAAE,+BAA+B;IACpC,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,UAA4B;IACpC,SAAS,EAAE;QACT;YACE,GAAG,EAAE,sCAAsC;YAC3C,KAAK,EAAE,GAAG;YACV,GAAG,EAAE,CAAC;SACP;KACF;CACF,CAAA;AACD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;QAClE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,cAAM,EAC1B,8BAAC,WAAQ,IACP,OAAO,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,EAAE,EAAE,KAAK;gBACT,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,KAAK;gBAClB,WAAW,EAAE,WAAW;gBACxB,aAAa,EAAE,OAAO;aACvB,GACD,CACH,CAAA;QACD,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kDAAkD,EAAE,KAAK,IAAI,EAAE;QAChE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,cAAM,EAC1B,8BAAC,WAAQ,IACP,OAAO,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,EAAE,EAAE,KAAK;gBACT,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,KAAK;gBAClB,W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C1B,8BAAC,WAAQ,IACP,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,EAAE,EAAE,KAAK;YACT,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,WAAW;YACxB,aAAa,EAAE,OAAO;SACvB,EACD,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,GAC5B,CACH,CAAA;IACD,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAA;AACrC,CAAC,CAAC,CAAA;AAEF,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;IAC/D,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,cAAM,EAC1B,8BAAC,WAAQ,IACP,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,EAAE,EAAE,KAAK;YACT,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,WAAW;YACxB,aAAa,EAAE,OAAO;SACvB,GACD,CACH,CAAA;IACD,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAA;AACrC,CAAC,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ContentTree } from '@financial-times/content-tree';
|
|
3
|
-
|
|
3
|
+
import { ContentProps } from '../types';
|
|
4
|
+
declare const Heading: React.FC<React.PropsWithChildren<ContentProps<ContentTree.Heading>>>;
|
|
4
5
|
export default Heading;
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const Heading = (props) => {
|
|
8
|
-
if (!props.children
|
|
8
|
+
if (!react_1.default.Children.count(props.children))
|
|
9
9
|
return null;
|
|
10
|
-
switch (props.level) {
|
|
10
|
+
switch (props.content.level) {
|
|
11
11
|
case 'chapter':
|
|
12
12
|
return react_1.default.createElement("h2", { className: "n-content-heading-2" }, props.children);
|
|
13
13
|
case 'subheading':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Heading/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Heading/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AAIzB,MAAM,OAAO,GAET,CAAC,KAAK,EAAE,EAAE;IACZ,IAAI,CAAC,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAA;IAEtD,QAAQ,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC5B,KAAK,SAAS;YACZ,OAAO,sCAAI,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAC,QAAQ,CAAM,CAAA;QAClE,KAAK,YAAY;YACf,OAAO,sCAAI,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAC,QAAQ,CAAM,CAAA;QAClE,KAAK,OAAO;YACV,OAAO,sCAAI,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAC,QAAQ,CAAM,CAAA;IACpE,CAAC;AACH,CAAC,CAAA;AAED,kBAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PresentationOverrideTypes } from '../../context';
|
|
2
|
+
export declare const FallbackImageOverrideWrapper: PresentationOverrideTypes['FallbackImage'];
|
|
3
|
+
export declare const ImageSetOverrideWrapper: PresentationOverrideTypes['ImageSet'];
|
|
4
|
+
export declare const PictureOverrideWrapper: PresentationOverrideTypes['Picture'];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PictureOverrideWrapper = exports.ImageSetOverrideWrapper = exports.FallbackImageOverrideWrapper = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const context_1 = require("../../context");
|
|
29
|
+
const FallbackImageOverrideWrapper = ({ children, ...props }) => {
|
|
30
|
+
const { FallbackImage } = (0, react_1.useContext)(context_1.PresentationOverridesContext);
|
|
31
|
+
return FallbackImage ? (react_1.default.createElement(FallbackImage, { ...props }, children)) : (children);
|
|
32
|
+
};
|
|
33
|
+
exports.FallbackImageOverrideWrapper = FallbackImageOverrideWrapper;
|
|
34
|
+
const ImageSetOverrideWrapper = ({ children, ...props }) => {
|
|
35
|
+
const { ImageSet } = (0, react_1.useContext)(context_1.PresentationOverridesContext);
|
|
36
|
+
return ImageSet ? react_1.default.createElement(ImageSet, { ...props }, children) : children;
|
|
37
|
+
};
|
|
38
|
+
exports.ImageSetOverrideWrapper = ImageSetOverrideWrapper;
|
|
39
|
+
const PictureOverrideWrapper = ({ children, ...props }) => {
|
|
40
|
+
const { Picture } = (0, react_1.useContext)(context_1.PresentationOverridesContext);
|
|
41
|
+
return Picture ? react_1.default.createElement(Picture, { ...props }, children) : children;
|
|
42
|
+
};
|
|
43
|
+
exports.PictureOverrideWrapper = PictureOverrideWrapper;
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ImageOverrideWrappers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAEzC,2CAA4D;AAIrD,MAAM,4BAA4B,GACvC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACzB,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,kBAAU,EAAC,sCAA4B,CAAC,CAAA;IAElE,OAAO,aAAa,CAAC,CAAC,CAAC,CACrB,8BAAC,aAAa,OAAK,KAAK,IAAG,QAAQ,CAAiB,CACrD,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAA;AACH,CAAC,CAAA;AATU,QAAA,4BAA4B,gCAStC;AAEI,MAAM,uBAAuB,GAA0C,CAAC,EAC7E,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,kBAAU,EAAC,sCAA4B,CAAC,CAAA;IAE7D,OAAO,QAAQ,CAAC,CAAC,CAAC,8BAAC,QAAQ,OAAK,KAAK,IAAG,QAAQ,CAAY,CAAC,CAAC,CAAC,QAAQ,CAAA;AACzE,CAAC,CAAA;AAPY,QAAA,uBAAuB,2BAOnC;AAEM,MAAM,sBAAsB,GAAyC,CAAC,EAC3E,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,kBAAU,EAAC,sCAA4B,CAAC,CAAA;IAE5D,OAAO,OAAO,CAAC,CAAC,CAAC,8BAAC,OAAO,OAAK,KAAK,IAAG,QAAQ,CAAW,CAAC,CAAC,CAAC,QAAQ,CAAA;AACtE,CAAC,CAAA;AAPY,QAAA,sBAAsB,0BAOlC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ContentProps } from '../types';
|
|
3
|
+
import type * as ComponentWorkarounds from '../Workarounds';
|
|
3
4
|
type Breakpoint = {
|
|
4
5
|
minWidth?: number;
|
|
5
6
|
maxWidth?: number;
|
|
@@ -8,24 +9,27 @@ type Breakpoint = {
|
|
|
8
9
|
export type AliasedBreakpoints = {
|
|
9
10
|
[alias: string]: Breakpoint;
|
|
10
11
|
};
|
|
11
|
-
declare const defaultGetBreakpoints: (image:
|
|
12
|
+
declare const defaultGetBreakpoints: (image: ComponentWorkarounds.Image) => Breakpoint | Array<Breakpoint> | AliasedBreakpoints | undefined;
|
|
12
13
|
export type BreakpointGetter = typeof defaultGetBreakpoints;
|
|
13
14
|
type SourcesProps = {
|
|
14
|
-
images: readonly
|
|
15
|
+
images: readonly ComponentWorkarounds.Image[];
|
|
15
16
|
getBreakpoints?: BreakpointGetter;
|
|
16
17
|
};
|
|
17
18
|
export declare const Sources: React.FC<SourcesProps>;
|
|
18
|
-
type FallbackImageProps = {
|
|
19
|
-
|
|
19
|
+
export type FallbackImageProps = (ContentProps<ComponentWorkarounds.RawImage> | {
|
|
20
|
+
content: {
|
|
21
|
+
image: ComponentWorkarounds.Image;
|
|
22
|
+
};
|
|
23
|
+
}) & {
|
|
20
24
|
imageType?: string;
|
|
21
|
-
picture?:
|
|
25
|
+
picture?: ComponentWorkarounds.ImageSetPicture;
|
|
22
26
|
className?: string;
|
|
23
27
|
inSourceSet?: boolean;
|
|
24
28
|
isMainImage?: boolean;
|
|
25
29
|
};
|
|
26
30
|
export declare const FallbackImage: React.FC<FallbackImageProps>;
|
|
27
|
-
|
|
31
|
+
export interface ImageSetProps extends ContentProps<ComponentWorkarounds.ImageSet> {
|
|
28
32
|
isMainImage?: boolean;
|
|
29
|
-
}
|
|
33
|
+
}
|
|
30
34
|
declare const ImageSet: React.FC<ImageSetProps>;
|
|
31
35
|
export default ImageSet;
|
|
@@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.FallbackImage = exports.Sources = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
+
const ImageOverrideWrappers_1 = require("../ImageOverrideWrappers");
|
|
28
29
|
const context_1 = require("../../context");
|
|
29
30
|
const formatSourceSet = (sourceSet) => sourceSet.map((src) => `${src.url} ${src.dpr}x`).join(',');
|
|
30
31
|
const figureClassNameMap = {
|
|
@@ -96,17 +97,20 @@ const Sources = ({ images, getBreakpoints }) => {
|
|
|
96
97
|
};
|
|
97
98
|
exports.Sources = Sources;
|
|
98
99
|
// TODO should `fallback` be added to content-tree imageset?
|
|
99
|
-
const FallbackImage = (
|
|
100
|
+
const FallbackImage = (props) => {
|
|
101
|
+
const { content: { image }, imageType = 'image', picture, className, inSourceSet = false, isMainImage = false, } = props;
|
|
100
102
|
const Wrapper = inSourceSet
|
|
101
103
|
? react_1.default.Fragment
|
|
102
104
|
: ({ children }) => (react_1.default.createElement("figure", { className: "n-content-image" }, children));
|
|
103
105
|
return (react_1.default.createElement(Wrapper, null,
|
|
104
|
-
react_1.default.createElement(
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
react_1.default.createElement(ImageOverrideWrappers_1.FallbackImageOverrideWrapper, { ...props },
|
|
107
|
+
react_1.default.createElement("img", { src: hasSourceSet(image)
|
|
108
|
+
? image.sourceSet[0]?.url
|
|
109
|
+
: image?.url ?? undefined, srcSet: hasSourceSet(image) ? formatSourceSet(image.sourceSet) : undefined, alt: picture?.alt ?? '', "data-image-type": imageType, width: image.width ?? undefined, height: image.height ?? undefined, className: className, loading: isMainImage ? 'eager' : 'lazy' }))));
|
|
107
110
|
};
|
|
108
111
|
exports.FallbackImage = FallbackImage;
|
|
109
|
-
const ImageSet = (
|
|
112
|
+
const ImageSet = (props) => {
|
|
113
|
+
const { content: imageSet, isMainImage } = props;
|
|
110
114
|
if (!imageSet.picture?.images) {
|
|
111
115
|
return null;
|
|
112
116
|
}
|
|
@@ -121,9 +125,10 @@ const ImageSet = (imageSet) => {
|
|
|
121
125
|
react_1.default.createElement("figure", { className: (imageSet.picture.layoutWidth &&
|
|
122
126
|
figureClassNameMap[imageSet.picture.layoutWidth]) ??
|
|
123
127
|
'n-content-image', style: figureWidth(imageSet.picture), "data-component": "image-set" },
|
|
124
|
-
react_1.default.createElement(
|
|
125
|
-
react_1.default.createElement(
|
|
126
|
-
|
|
128
|
+
react_1.default.createElement(ImageOverrideWrappers_1.ImageSetOverrideWrapper, { ...props },
|
|
129
|
+
react_1.default.createElement("picture", null,
|
|
130
|
+
react_1.default.createElement(exports.Sources, { images: imageSet.picture.images }),
|
|
131
|
+
react_1.default.createElement(exports.FallbackImage, { picture: imageSet.picture, content: { image: imageSet.picture.fallbackImage }, imageType: imageSet.picture.imageType || 'image', inSourceSet: true, isMainImage: isMainImage }))),
|
|
127
132
|
(imageSet.picture.caption || imageSet.picture.credit) && (react_1.default.createElement("figcaption", { className: "n-content-picture__caption" },
|
|
128
133
|
react_1.default.createElement("span", null, imageSet.picture.caption),
|
|
129
134
|
react_1.default.createElement("span", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ImageSet/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ImageSet/index.tsx"],"names":[],"mappings":";;;;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