@financial-times/x-teaser 18.1.0 → 18.2.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.
|
@@ -55,7 +55,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with article data 1`] = `
|
|
|
55
55
|
<img
|
|
56
56
|
alt=""
|
|
57
57
|
className="o-teaser__image"
|
|
58
|
-
src="https://
|
|
58
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=340"
|
|
59
59
|
/>
|
|
60
60
|
</div>
|
|
61
61
|
</a>
|
|
@@ -218,7 +218,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with contentPackage data 1`]
|
|
|
218
218
|
<img
|
|
219
219
|
alt=""
|
|
220
220
|
className="o-teaser__image"
|
|
221
|
-
src="https://
|
|
221
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F7e97f5b6-578d-11e8-b8b2-d6ceb45fa9d0?source=next&fit=scale-down&dpr=2&width=340"
|
|
222
222
|
/>
|
|
223
223
|
</div>
|
|
224
224
|
</a>
|
|
@@ -264,7 +264,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with opinion data 1`] = `
|
|
|
264
264
|
aria-hidden="true"
|
|
265
265
|
className="o-teaser__headshot"
|
|
266
266
|
height={75}
|
|
267
|
-
src="https://
|
|
267
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
268
268
|
width={75}
|
|
269
269
|
/>
|
|
270
270
|
</div>
|
|
@@ -331,7 +331,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with packageItem data 1`] =
|
|
|
331
331
|
<img
|
|
332
332
|
alt=""
|
|
333
333
|
className="o-teaser__image"
|
|
334
|
-
src="https://
|
|
334
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=340"
|
|
335
335
|
/>
|
|
336
336
|
</div>
|
|
337
337
|
</a>
|
|
@@ -400,7 +400,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with podcast data 1`] = `
|
|
|
400
400
|
<img
|
|
401
401
|
alt=""
|
|
402
402
|
className="o-teaser__image"
|
|
403
|
-
src="https://www.ft.com/__origami/service/image/v2/images/raw/
|
|
403
|
+
src="https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F5d1a54aa-f49b-11e8-ae55-df4bf40f9d0d?source=next&fit=scale-down&compression=best&width=340&dpr=2"
|
|
404
404
|
/>
|
|
405
405
|
</div>
|
|
406
406
|
</a>
|
|
@@ -465,7 +465,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with promoted data 1`] = `
|
|
|
465
465
|
<img
|
|
466
466
|
alt=""
|
|
467
467
|
className="o-teaser__image"
|
|
468
|
-
src="https://
|
|
468
|
+
src="https://images.ft.com/v3/image/raw/https%3A%2F%2Ftpc.googlesyndication.com%2Fpagead%2Fimgad%3Fid%3DCICAgKCrm_3yahABGAEyCMx3RoLss603?source=next&fit=scale-down&dpr=2&width=340"
|
|
469
469
|
/>
|
|
470
470
|
</div>
|
|
471
471
|
</a>
|
|
@@ -529,7 +529,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with topStory data 1`] = `
|
|
|
529
529
|
<img
|
|
530
530
|
alt=""
|
|
531
531
|
className="o-teaser__image"
|
|
532
|
-
src="https://
|
|
532
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=340"
|
|
533
533
|
/>
|
|
534
534
|
</div>
|
|
535
535
|
</a>
|
|
@@ -598,7 +598,7 @@ exports[`x-teaser / snapshots renders a Hero teaser with video data 1`] = `
|
|
|
598
598
|
<img
|
|
599
599
|
alt="Image alt text"
|
|
600
600
|
className="o-teaser__image"
|
|
601
|
-
src="https://
|
|
601
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fa27ce49b-85b8-445b-b883-db6e2f533194?source=next&fit=scale-down&dpr=2&width=340"
|
|
602
602
|
/>
|
|
603
603
|
</div>
|
|
604
604
|
</a>
|
|
@@ -857,7 +857,7 @@ exports[`x-teaser / snapshots renders a HeroNarrow teaser with opinion data 1`]
|
|
|
857
857
|
aria-hidden="true"
|
|
858
858
|
className="o-teaser__headshot"
|
|
859
859
|
height={75}
|
|
860
|
-
src="https://
|
|
860
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
861
861
|
width={75}
|
|
862
862
|
/>
|
|
863
863
|
</div>
|
|
@@ -1189,7 +1189,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with article data 1`]
|
|
|
1189
1189
|
<img
|
|
1190
1190
|
alt=""
|
|
1191
1191
|
className="o-teaser__image"
|
|
1192
|
-
src="https://
|
|
1192
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=640"
|
|
1193
1193
|
/>
|
|
1194
1194
|
</div>
|
|
1195
1195
|
</a>
|
|
@@ -1352,7 +1352,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with contentPackage d
|
|
|
1352
1352
|
<img
|
|
1353
1353
|
alt=""
|
|
1354
1354
|
className="o-teaser__image"
|
|
1355
|
-
src="https://
|
|
1355
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F7e97f5b6-578d-11e8-b8b2-d6ceb45fa9d0?source=next&fit=scale-down&dpr=2&width=640"
|
|
1356
1356
|
/>
|
|
1357
1357
|
</div>
|
|
1358
1358
|
</a>
|
|
@@ -1398,7 +1398,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with opinion data 1`]
|
|
|
1398
1398
|
aria-hidden="true"
|
|
1399
1399
|
className="o-teaser__headshot"
|
|
1400
1400
|
height={75}
|
|
1401
|
-
src="https://
|
|
1401
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
1402
1402
|
width={75}
|
|
1403
1403
|
/>
|
|
1404
1404
|
</div>
|
|
@@ -1465,7 +1465,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with packageItem data
|
|
|
1465
1465
|
<img
|
|
1466
1466
|
alt=""
|
|
1467
1467
|
className="o-teaser__image"
|
|
1468
|
-
src="https://
|
|
1468
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=640"
|
|
1469
1469
|
/>
|
|
1470
1470
|
</div>
|
|
1471
1471
|
</a>
|
|
@@ -1534,7 +1534,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with podcast data 1`]
|
|
|
1534
1534
|
<img
|
|
1535
1535
|
alt=""
|
|
1536
1536
|
className="o-teaser__image"
|
|
1537
|
-
src="https://www.ft.com/__origami/service/image/v2/images/raw/
|
|
1537
|
+
src="https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F5d1a54aa-f49b-11e8-ae55-df4bf40f9d0d?source=next&fit=scale-down&compression=best&width=640&dpr=2"
|
|
1538
1538
|
/>
|
|
1539
1539
|
</div>
|
|
1540
1540
|
</a>
|
|
@@ -1599,7 +1599,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with promoted data 1`
|
|
|
1599
1599
|
<img
|
|
1600
1600
|
alt=""
|
|
1601
1601
|
className="o-teaser__image"
|
|
1602
|
-
src="https://
|
|
1602
|
+
src="https://images.ft.com/v3/image/raw/https%3A%2F%2Ftpc.googlesyndication.com%2Fpagead%2Fimgad%3Fid%3DCICAgKCrm_3yahABGAEyCMx3RoLss603?source=next&fit=scale-down&dpr=2&width=640"
|
|
1603
1603
|
/>
|
|
1604
1604
|
</div>
|
|
1605
1605
|
</a>
|
|
@@ -1663,7 +1663,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with topStory data 1`
|
|
|
1663
1663
|
<img
|
|
1664
1664
|
alt=""
|
|
1665
1665
|
className="o-teaser__image"
|
|
1666
|
-
src="https://
|
|
1666
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=640"
|
|
1667
1667
|
/>
|
|
1668
1668
|
</div>
|
|
1669
1669
|
</a>
|
|
@@ -1732,7 +1732,7 @@ exports[`x-teaser / snapshots renders a HeroOverlay teaser with video data 1`] =
|
|
|
1732
1732
|
<img
|
|
1733
1733
|
alt="Image alt text"
|
|
1734
1734
|
className="o-teaser__image"
|
|
1735
|
-
src="https://
|
|
1735
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fa27ce49b-85b8-445b-b883-db6e2f533194?source=next&fit=scale-down&dpr=2&width=640"
|
|
1736
1736
|
/>
|
|
1737
1737
|
</div>
|
|
1738
1738
|
</a>
|
|
@@ -1926,7 +1926,7 @@ exports[`x-teaser / snapshots renders a HeroVideo teaser with opinion data 1`] =
|
|
|
1926
1926
|
aria-hidden="true"
|
|
1927
1927
|
className="o-teaser__headshot"
|
|
1928
1928
|
height={75}
|
|
1929
|
-
src="https://
|
|
1929
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
1930
1930
|
width={75}
|
|
1931
1931
|
/>
|
|
1932
1932
|
</div>
|
|
@@ -2171,7 +2171,7 @@ exports[`x-teaser / snapshots renders a HeroVideo teaser with video data 1`] = `
|
|
|
2171
2171
|
<img
|
|
2172
2172
|
alt="Image alt text"
|
|
2173
2173
|
className="o-teaser__image"
|
|
2174
|
-
src="https://
|
|
2174
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fa27ce49b-85b8-445b-b883-db6e2f533194?source=next&fit=scale-down&dpr=2&width=420"
|
|
2175
2175
|
/>
|
|
2176
2176
|
</div>
|
|
2177
2177
|
</a>
|
|
@@ -2263,7 +2263,7 @@ exports[`x-teaser / snapshots renders a Large teaser with article data 1`] = `
|
|
|
2263
2263
|
<img
|
|
2264
2264
|
alt=""
|
|
2265
2265
|
className="o-teaser__image"
|
|
2266
|
-
src="https://
|
|
2266
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=340"
|
|
2267
2267
|
/>
|
|
2268
2268
|
</div>
|
|
2269
2269
|
</a>
|
|
@@ -2465,7 +2465,7 @@ exports[`x-teaser / snapshots renders a Large teaser with contentPackage data 1`
|
|
|
2465
2465
|
<img
|
|
2466
2466
|
alt=""
|
|
2467
2467
|
className="o-teaser__image"
|
|
2468
|
-
src="https://
|
|
2468
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F7e97f5b6-578d-11e8-b8b2-d6ceb45fa9d0?source=next&fit=scale-down&dpr=2&width=340"
|
|
2469
2469
|
/>
|
|
2470
2470
|
</div>
|
|
2471
2471
|
</a>
|
|
@@ -2524,7 +2524,7 @@ exports[`x-teaser / snapshots renders a Large teaser with opinion data 1`] = `
|
|
|
2524
2524
|
aria-hidden="true"
|
|
2525
2525
|
className="o-teaser__headshot"
|
|
2526
2526
|
height={75}
|
|
2527
|
-
src="https://
|
|
2527
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
2528
2528
|
width={75}
|
|
2529
2529
|
/>
|
|
2530
2530
|
</div>
|
|
@@ -2604,7 +2604,7 @@ exports[`x-teaser / snapshots renders a Large teaser with packageItem data 1`] =
|
|
|
2604
2604
|
<img
|
|
2605
2605
|
alt=""
|
|
2606
2606
|
className="o-teaser__image"
|
|
2607
|
-
src="https://
|
|
2607
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=340"
|
|
2608
2608
|
/>
|
|
2609
2609
|
</div>
|
|
2610
2610
|
</a>
|
|
@@ -2686,7 +2686,7 @@ exports[`x-teaser / snapshots renders a Large teaser with podcast data 1`] = `
|
|
|
2686
2686
|
<img
|
|
2687
2687
|
alt=""
|
|
2688
2688
|
className="o-teaser__image"
|
|
2689
|
-
src="https://www.ft.com/__origami/service/image/v2/images/raw/
|
|
2689
|
+
src="https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F5d1a54aa-f49b-11e8-ae55-df4bf40f9d0d?source=next&fit=scale-down&compression=best&width=340&dpr=2"
|
|
2690
2690
|
/>
|
|
2691
2691
|
</div>
|
|
2692
2692
|
</a>
|
|
@@ -2764,7 +2764,7 @@ exports[`x-teaser / snapshots renders a Large teaser with promoted data 1`] = `
|
|
|
2764
2764
|
<img
|
|
2765
2765
|
alt=""
|
|
2766
2766
|
className="o-teaser__image"
|
|
2767
|
-
src="https://
|
|
2767
|
+
src="https://images.ft.com/v3/image/raw/https%3A%2F%2Ftpc.googlesyndication.com%2Fpagead%2Fimgad%3Fid%3DCICAgKCrm_3yahABGAEyCMx3RoLss603?source=next&fit=scale-down&dpr=2&width=340"
|
|
2768
2768
|
/>
|
|
2769
2769
|
</div>
|
|
2770
2770
|
</a>
|
|
@@ -2841,7 +2841,7 @@ exports[`x-teaser / snapshots renders a Large teaser with topStory data 1`] = `
|
|
|
2841
2841
|
<img
|
|
2842
2842
|
alt=""
|
|
2843
2843
|
className="o-teaser__image"
|
|
2844
|
-
src="https://
|
|
2844
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=340"
|
|
2845
2845
|
/>
|
|
2846
2846
|
</div>
|
|
2847
2847
|
</a>
|
|
@@ -2923,7 +2923,7 @@ exports[`x-teaser / snapshots renders a Large teaser with video data 1`] = `
|
|
|
2923
2923
|
<img
|
|
2924
2924
|
alt="Image alt text"
|
|
2925
2925
|
className="o-teaser__image"
|
|
2926
|
-
src="https://
|
|
2926
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fa27ce49b-85b8-445b-b883-db6e2f533194?source=next&fit=scale-down&dpr=2&width=340"
|
|
2927
2927
|
/>
|
|
2928
2928
|
</div>
|
|
2929
2929
|
</a>
|
|
@@ -3117,7 +3117,7 @@ exports[`x-teaser / snapshots renders a Small teaser with opinion data 1`] = `
|
|
|
3117
3117
|
aria-hidden="true"
|
|
3118
3118
|
className="o-teaser__headshot"
|
|
3119
3119
|
height={75}
|
|
3120
|
-
src="https://
|
|
3120
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
3121
3121
|
width={75}
|
|
3122
3122
|
/>
|
|
3123
3123
|
</div>
|
|
@@ -3397,7 +3397,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with article data 1`]
|
|
|
3397
3397
|
<img
|
|
3398
3398
|
alt=""
|
|
3399
3399
|
className="o-teaser__image"
|
|
3400
|
-
src="https://
|
|
3400
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=240"
|
|
3401
3401
|
/>
|
|
3402
3402
|
</div>
|
|
3403
3403
|
</a>
|
|
@@ -3599,7 +3599,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with contentPackage da
|
|
|
3599
3599
|
<img
|
|
3600
3600
|
alt=""
|
|
3601
3601
|
className="o-teaser__image"
|
|
3602
|
-
src="https://
|
|
3602
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F7e97f5b6-578d-11e8-b8b2-d6ceb45fa9d0?source=next&fit=scale-down&dpr=2&width=240"
|
|
3603
3603
|
/>
|
|
3604
3604
|
</div>
|
|
3605
3605
|
</a>
|
|
@@ -3658,7 +3658,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with opinion data 1`]
|
|
|
3658
3658
|
aria-hidden="true"
|
|
3659
3659
|
className="o-teaser__headshot"
|
|
3660
3660
|
height={75}
|
|
3661
|
-
src="https://
|
|
3661
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
3662
3662
|
width={75}
|
|
3663
3663
|
/>
|
|
3664
3664
|
</div>
|
|
@@ -3738,7 +3738,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with packageItem data
|
|
|
3738
3738
|
<img
|
|
3739
3739
|
alt=""
|
|
3740
3740
|
className="o-teaser__image"
|
|
3741
|
-
src="https://
|
|
3741
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=240"
|
|
3742
3742
|
/>
|
|
3743
3743
|
</div>
|
|
3744
3744
|
</a>
|
|
@@ -3820,7 +3820,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with podcast data 1`]
|
|
|
3820
3820
|
<img
|
|
3821
3821
|
alt=""
|
|
3822
3822
|
className="o-teaser__image"
|
|
3823
|
-
src="https://www.ft.com/__origami/service/image/v2/images/raw/
|
|
3823
|
+
src="https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F5d1a54aa-f49b-11e8-ae55-df4bf40f9d0d?source=next&fit=scale-down&compression=best&width=240&dpr=2"
|
|
3824
3824
|
/>
|
|
3825
3825
|
</div>
|
|
3826
3826
|
</a>
|
|
@@ -3898,7 +3898,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with promoted data 1`]
|
|
|
3898
3898
|
<img
|
|
3899
3899
|
alt=""
|
|
3900
3900
|
className="o-teaser__image"
|
|
3901
|
-
src="https://
|
|
3901
|
+
src="https://images.ft.com/v3/image/raw/https%3A%2F%2Ftpc.googlesyndication.com%2Fpagead%2Fimgad%3Fid%3DCICAgKCrm_3yahABGAEyCMx3RoLss603?source=next&fit=scale-down&dpr=2&width=240"
|
|
3902
3902
|
/>
|
|
3903
3903
|
</div>
|
|
3904
3904
|
</a>
|
|
@@ -3975,7 +3975,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with topStory data 1`]
|
|
|
3975
3975
|
<img
|
|
3976
3976
|
alt=""
|
|
3977
3977
|
className="o-teaser__image"
|
|
3978
|
-
src="https://
|
|
3978
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=240"
|
|
3979
3979
|
/>
|
|
3980
3980
|
</div>
|
|
3981
3981
|
</a>
|
|
@@ -4057,7 +4057,7 @@ exports[`x-teaser / snapshots renders a SmallHeavy teaser with video data 1`] =
|
|
|
4057
4057
|
<img
|
|
4058
4058
|
alt="Image alt text"
|
|
4059
4059
|
className="o-teaser__image"
|
|
4060
|
-
src="https://
|
|
4060
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fa27ce49b-85b8-445b-b883-db6e2f533194?source=next&fit=scale-down&dpr=2&width=240"
|
|
4061
4061
|
/>
|
|
4062
4062
|
</div>
|
|
4063
4063
|
</a>
|
|
@@ -4316,7 +4316,7 @@ exports[`x-teaser / snapshots renders a TopStory teaser with opinion data 1`] =
|
|
|
4316
4316
|
aria-hidden="true"
|
|
4317
4317
|
className="o-teaser__headshot"
|
|
4318
4318
|
height={75}
|
|
4319
|
-
src="https://
|
|
4319
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
4320
4320
|
width={75}
|
|
4321
4321
|
/>
|
|
4322
4322
|
</div>
|
|
@@ -4698,7 +4698,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with article da
|
|
|
4698
4698
|
<img
|
|
4699
4699
|
alt=""
|
|
4700
4700
|
className="o-teaser__image"
|
|
4701
|
-
src="https://
|
|
4701
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=640"
|
|
4702
4702
|
/>
|
|
4703
4703
|
</div>
|
|
4704
4704
|
</a>
|
|
@@ -4900,7 +4900,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with contentPac
|
|
|
4900
4900
|
<img
|
|
4901
4901
|
alt=""
|
|
4902
4902
|
className="o-teaser__image"
|
|
4903
|
-
src="https://
|
|
4903
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F7e97f5b6-578d-11e8-b8b2-d6ceb45fa9d0?source=next&fit=scale-down&dpr=2&width=640"
|
|
4904
4904
|
/>
|
|
4905
4905
|
</div>
|
|
4906
4906
|
</a>
|
|
@@ -4959,7 +4959,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with opinion da
|
|
|
4959
4959
|
aria-hidden="true"
|
|
4960
4960
|
className="o-teaser__headshot"
|
|
4961
4961
|
height={75}
|
|
4962
|
-
src="https://
|
|
4962
|
+
src="https://images.ft.com/v3/image/raw/fthead-v1%3Agideon-rachman?source=next&fit=scale-down&dpr=2&tint=054593%2Cd6d5d3&width=75"
|
|
4963
4963
|
width={75}
|
|
4964
4964
|
/>
|
|
4965
4965
|
</div>
|
|
@@ -5039,7 +5039,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with packageIte
|
|
|
5039
5039
|
<img
|
|
5040
5040
|
alt=""
|
|
5041
5041
|
className="o-teaser__image"
|
|
5042
|
-
src="https://
|
|
5042
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=640"
|
|
5043
5043
|
/>
|
|
5044
5044
|
</div>
|
|
5045
5045
|
</a>
|
|
@@ -5121,7 +5121,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with podcast da
|
|
|
5121
5121
|
<img
|
|
5122
5122
|
alt=""
|
|
5123
5123
|
className="o-teaser__image"
|
|
5124
|
-
src="https://www.ft.com/__origami/service/image/v2/images/raw/
|
|
5124
|
+
src="https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2F5d1a54aa-f49b-11e8-ae55-df4bf40f9d0d?source=next&fit=scale-down&compression=best&width=640&dpr=2"
|
|
5125
5125
|
/>
|
|
5126
5126
|
</div>
|
|
5127
5127
|
</a>
|
|
@@ -5199,7 +5199,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with promoted d
|
|
|
5199
5199
|
<img
|
|
5200
5200
|
alt=""
|
|
5201
5201
|
className="o-teaser__image"
|
|
5202
|
-
src="https://
|
|
5202
|
+
src="https://images.ft.com/v3/image/raw/https%3A%2F%2Ftpc.googlesyndication.com%2Fpagead%2Fimgad%3Fid%3DCICAgKCrm_3yahABGAEyCMx3RoLss603?source=next&fit=scale-down&dpr=2&width=640"
|
|
5203
5203
|
/>
|
|
5204
5204
|
</div>
|
|
5205
5205
|
</a>
|
|
@@ -5276,7 +5276,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with topStory d
|
|
|
5276
5276
|
<img
|
|
5277
5277
|
alt=""
|
|
5278
5278
|
className="o-teaser__image"
|
|
5279
|
-
src="https://
|
|
5279
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fprod-upp-image-read.ft.com%2Fa25832ea-0053-11e8-9650-9c0ad2d7c5b5?source=next&fit=scale-down&dpr=2&width=640"
|
|
5280
5280
|
/>
|
|
5281
5281
|
</div>
|
|
5282
5282
|
</a>
|
|
@@ -5395,7 +5395,7 @@ exports[`x-teaser / snapshots renders a TopStoryLandscape teaser with video data
|
|
|
5395
5395
|
<img
|
|
5396
5396
|
alt="Image alt text"
|
|
5397
5397
|
className="o-teaser__image"
|
|
5398
|
-
src="https://
|
|
5398
|
+
src="https://images.ft.com/v3/image/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fa27ce49b-85b8-445b-b883-db6e2f533194?source=next&fit=scale-down&dpr=2&width=640"
|
|
5399
5399
|
/>
|
|
5400
5400
|
</div>
|
|
5401
5401
|
</a>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import imageService from '../src/concerns/image-service'
|
|
2
|
+
|
|
3
|
+
describe('image-service', () => {
|
|
4
|
+
it('wraps an image in a v3 URL', () => {
|
|
5
|
+
expect(imageService('https://example.com/image.jpg', 100)).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&fit=scale-down&dpr=2&width=100');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('allows setting the source param', () => {
|
|
9
|
+
expect(imageService('https://example.com/image.jpg', 100, {source: 'system-code'})).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=system-code&fit=scale-down&dpr=2&width=100');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
describe('double wrapping v2 URLs', () => {
|
|
13
|
+
it('does not double wrap an image service v2 URL', () => {
|
|
14
|
+
const result = imageService('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=test&width=100', 100);
|
|
15
|
+
expect(result).toEqual('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&width=100&fit=scale-down&dpr=2');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('preserves example-query-param=1234 from the original URL', () => {
|
|
19
|
+
const result = imageService('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?example-query-param=1234', 100);
|
|
20
|
+
expect(result).toEqual('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?example-query-param=1234&source=next&fit=scale-down&dpr=2&width=100');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('overrides the "source" query param using default OPTIONS', () => {
|
|
24
|
+
const result = imageService('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=original-source', 100);
|
|
25
|
+
expect(result).toEqual('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&fit=scale-down&dpr=2&width=100');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('overrides the "width" query param when passed in', () => {
|
|
29
|
+
const result = imageService('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=original-source&width=100', 200);
|
|
30
|
+
expect(result).toEqual('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&width=200&fit=scale-down&dpr=2');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('overrides the "source" query param when passed in', () => {
|
|
34
|
+
const result = imageService('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=original-source&width=100', 200, {source: 'latest-source'});
|
|
35
|
+
expect(result).toEqual('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=latest-source&width=200&fit=scale-down&dpr=2');
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('double wrapping v3 URLs', () => {
|
|
40
|
+
it('does not double wrap an image service v3 URL', () => {
|
|
41
|
+
const result = imageService('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=test&width=100', 100);
|
|
42
|
+
expect(result).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&width=100&fit=scale-down&dpr=2');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('preserves example-query-param=1234 from the original URL', () => {
|
|
46
|
+
const result = imageService('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?example-query-param=1234', 100);
|
|
47
|
+
expect(result).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?example-query-param=1234&source=next&fit=scale-down&dpr=2&width=100');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('overrides the "source" query param using default OPTIONS', () => {
|
|
51
|
+
const result = imageService('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=original-source', 100);
|
|
52
|
+
expect(result).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&fit=scale-down&dpr=2&width=100');
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('overrides the "width" query param when passed in', () => {
|
|
56
|
+
const result = imageService('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=original-source&width=100', 200);
|
|
57
|
+
expect(result).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=next&width=200&fit=scale-down&dpr=2');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('overrides the "source" query param when passed in', () => {
|
|
61
|
+
const result = imageService('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=original-source&width=100', 200, {source: 'latest-source'});
|
|
62
|
+
expect(result).toEqual('https://images.ft.com/v3/image/raw/https%3A%2F%2Fexample.com%2Fimage.jpg?source=latest-source&width=200&fit=scale-down&dpr=2');
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
package/dist/Teaser.cjs.js
CHANGED
|
@@ -134,7 +134,8 @@ const Layouts = {
|
|
|
134
134
|
const Newish = 1000 * 60 * 60;
|
|
135
135
|
const Recent = 1000 * 60 * 60 * 4;
|
|
136
136
|
|
|
137
|
-
const
|
|
137
|
+
const BASE_URL_V2 = 'https://www.ft.com/__origami/service/image/v2/images/raw';
|
|
138
|
+
const BASE_URL_V3 = 'https://images.ft.com/v3/image/raw';
|
|
138
139
|
const OPTIONS = {
|
|
139
140
|
source: 'next',
|
|
140
141
|
fit: 'scale-down',
|
|
@@ -148,7 +149,19 @@ const OPTIONS = {
|
|
|
148
149
|
* @param {String} options
|
|
149
150
|
*/
|
|
150
151
|
function imageService(url, width, options) {
|
|
151
|
-
|
|
152
|
+
if (url.startsWith(BASE_URL_V2) || url.startsWith(BASE_URL_V3)) {
|
|
153
|
+
const parsedUrl = new URL(url);
|
|
154
|
+
parsedUrl.search = new URLSearchParams({
|
|
155
|
+
...Object.fromEntries(parsedUrl.searchParams),
|
|
156
|
+
...OPTIONS,
|
|
157
|
+
...options
|
|
158
|
+
});
|
|
159
|
+
if (width) {
|
|
160
|
+
parsedUrl.searchParams.set('width', width);
|
|
161
|
+
}
|
|
162
|
+
return parsedUrl.toString();
|
|
163
|
+
}
|
|
164
|
+
const imageSrc = new URL(`${BASE_URL_V3}/${encodeURIComponent(url)}`);
|
|
152
165
|
imageSrc.search = new URLSearchParams({
|
|
153
166
|
...OPTIONS,
|
|
154
167
|
...options
|
package/dist/Teaser.es5.js
CHANGED
|
@@ -220,7 +220,8 @@ function _toPropertyKey(arg) {
|
|
|
220
220
|
return typeof key === "symbol" ? key : String(key);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
var
|
|
223
|
+
var BASE_URL_V2 = 'https://www.ft.com/__origami/service/image/v2/images/raw';
|
|
224
|
+
var BASE_URL_V3 = 'https://images.ft.com/v3/image/raw';
|
|
224
225
|
var OPTIONS = {
|
|
225
226
|
source: 'next',
|
|
226
227
|
fit: 'scale-down',
|
|
@@ -234,7 +235,15 @@ var OPTIONS = {
|
|
|
234
235
|
* @param {String} options
|
|
235
236
|
*/
|
|
236
237
|
function imageService(url, width, options) {
|
|
237
|
-
|
|
238
|
+
if (url.startsWith(BASE_URL_V2) || url.startsWith(BASE_URL_V3)) {
|
|
239
|
+
var parsedUrl = new URL(url);
|
|
240
|
+
parsedUrl.search = new URLSearchParams(_objectSpread2(_objectSpread2(_objectSpread2({}, Object.fromEntries(parsedUrl.searchParams)), OPTIONS), options));
|
|
241
|
+
if (width) {
|
|
242
|
+
parsedUrl.searchParams.set('width', width);
|
|
243
|
+
}
|
|
244
|
+
return parsedUrl.toString();
|
|
245
|
+
}
|
|
246
|
+
var imageSrc = new URL("".concat(BASE_URL_V3, "/").concat(encodeURIComponent(url)));
|
|
238
247
|
imageSrc.search = new URLSearchParams(_objectSpread2(_objectSpread2({}, OPTIONS), options));
|
|
239
248
|
imageSrc.searchParams.set('width', width);
|
|
240
249
|
return imageSrc.href;
|
package/dist/Teaser.esm.js
CHANGED
|
@@ -128,7 +128,8 @@ const Layouts = {
|
|
|
128
128
|
const Newish = 1000 * 60 * 60;
|
|
129
129
|
const Recent = 1000 * 60 * 60 * 4;
|
|
130
130
|
|
|
131
|
-
const
|
|
131
|
+
const BASE_URL_V2 = 'https://www.ft.com/__origami/service/image/v2/images/raw';
|
|
132
|
+
const BASE_URL_V3 = 'https://images.ft.com/v3/image/raw';
|
|
132
133
|
const OPTIONS = {
|
|
133
134
|
source: 'next',
|
|
134
135
|
fit: 'scale-down',
|
|
@@ -142,7 +143,19 @@ const OPTIONS = {
|
|
|
142
143
|
* @param {String} options
|
|
143
144
|
*/
|
|
144
145
|
function imageService(url, width, options) {
|
|
145
|
-
|
|
146
|
+
if (url.startsWith(BASE_URL_V2) || url.startsWith(BASE_URL_V3)) {
|
|
147
|
+
const parsedUrl = new URL(url);
|
|
148
|
+
parsedUrl.search = new URLSearchParams({
|
|
149
|
+
...Object.fromEntries(parsedUrl.searchParams),
|
|
150
|
+
...OPTIONS,
|
|
151
|
+
...options
|
|
152
|
+
});
|
|
153
|
+
if (width) {
|
|
154
|
+
parsedUrl.searchParams.set('width', width);
|
|
155
|
+
}
|
|
156
|
+
return parsedUrl.toString();
|
|
157
|
+
}
|
|
158
|
+
const imageSrc = new URL(`${BASE_URL_V3}/${encodeURIComponent(url)}`);
|
|
146
159
|
imageSrc.search = new URLSearchParams({
|
|
147
160
|
...OPTIONS,
|
|
148
161
|
...options
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/x-teaser",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"description": "This module provides templates for use with o-teaser. Teasers are used to present content.",
|
|
5
5
|
"source": "src/Teaser.jsx",
|
|
6
6
|
"main": "dist/Teaser.cjs.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"author": "",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@financial-times/x-engine": "^18.
|
|
21
|
+
"@financial-times/x-engine": "^18.2.0",
|
|
22
22
|
"date-fns": "^2.30.0",
|
|
23
23
|
"dateformat": "^3.0.3"
|
|
24
24
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const BASE_URL_V2 = 'https://www.ft.com/__origami/service/image/v2/images/raw'
|
|
2
|
+
const BASE_URL_V3 = 'https://images.ft.com/v3/image/raw'
|
|
2
3
|
const OPTIONS = { source: 'next', fit: 'scale-down', dpr: 2 }
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -8,7 +9,23 @@ const OPTIONS = { source: 'next', fit: 'scale-down', dpr: 2 }
|
|
|
8
9
|
* @param {String} options
|
|
9
10
|
*/
|
|
10
11
|
export default function imageService(url, width, options) {
|
|
11
|
-
|
|
12
|
+
if (url.startsWith(BASE_URL_V2) || url.startsWith(BASE_URL_V3)) {
|
|
13
|
+
const parsedUrl = new URL(url);
|
|
14
|
+
|
|
15
|
+
parsedUrl.search = new URLSearchParams({
|
|
16
|
+
...Object.fromEntries(parsedUrl.searchParams),
|
|
17
|
+
...OPTIONS,
|
|
18
|
+
...options,
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
if (width) {
|
|
22
|
+
parsedUrl.searchParams.set('width', width);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return parsedUrl.toString();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const imageSrc = new URL(`${BASE_URL_V3}/${encodeURIComponent(url)}`)
|
|
12
29
|
imageSrc.search = new URLSearchParams({ ...OPTIONS, ...options })
|
|
13
30
|
imageSrc.searchParams.set('width', width)
|
|
14
31
|
return imageSrc.href
|