@financial-times/cp-content-pipeline-ui 6.8.0 → 6.9.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 +27 -0
- package/README.md +30 -8
- package/jest-global-setup.js +1 -0
- package/jest.config.js +17 -16
- package/lib/components/Body/index.d.ts +3 -14
- package/lib/components/Body/index.js +22 -15
- package/lib/components/Body/index.js.map +1 -1
- package/lib/components/Body/index.test.d.ts +1 -0
- package/lib/components/Body/index.test.js +121 -0
- package/lib/components/Body/index.test.js.map +1 -0
- package/lib/components/Byline/index.js +1 -1
- package/lib/components/Byline/index.js.map +1 -1
- package/lib/components/ContentPackageBody/index.d.ts +5 -1
- package/lib/components/ContentPackageBody/index.js.map +1 -1
- package/lib/components/LiveBlogWrapper/index.js +3 -2
- package/lib/components/LiveBlogWrapper/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Body/__snapshots__/index.test.tsx.snap +352 -0
- package/src/components/Body/index.test.tsx +159 -0
- package/src/components/Body/index.tsx +46 -46
- package/src/components/Byline/index.tsx +8 -4
- package/src/components/ContentPackageBody/index.tsx +5 -1
- package/src/components/LiveBlogWrapper/index.tsx +6 -5
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -574,6 +574,32 @@
|
|
|
574
574
|
* @financial-times/cp-content-pipeline-client bumped from ^3.7.2 to ^3.7.3
|
|
575
575
|
* @financial-times/cp-content-pipeline-schema bumped from ^2.10.1 to ^2.10.2
|
|
576
576
|
|
|
577
|
+
## [6.9.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-ui-v6.8.1...cp-content-pipeline-ui-v6.9.0) (2024-06-12)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
### Features
|
|
581
|
+
|
|
582
|
+
* allow overriding body components via the content type directly ([fec8503](https://github.com/Financial-Times/cp-content-pipeline/commit/fec8503e394b4ef803ed534cb36cb29e13419715))
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
### Bug Fixes
|
|
586
|
+
|
|
587
|
+
* move tweet styling from next-article to n-content-body ([72a166d](https://github.com/Financial-Times/cp-content-pipeline/commit/72a166df766b293969a0616690c24d414446e744))
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
### Dependencies
|
|
591
|
+
|
|
592
|
+
* The following workspace dependencies were updated
|
|
593
|
+
* devDependencies
|
|
594
|
+
* @financial-times/cp-content-pipeline-styles bumped from ^2.5.1 to ^2.5.2
|
|
595
|
+
|
|
596
|
+
## [6.8.1](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-ui-v6.8.0...cp-content-pipeline-ui-v6.8.1) (2024-06-10)
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
### Bug Fixes
|
|
600
|
+
|
|
601
|
+
* when string print it on byline component ([8269379](https://github.com/Financial-Times/cp-content-pipeline/commit/82693792582e0b52ff1d6c6b6dce1b8bdcbe2e30))
|
|
602
|
+
|
|
577
603
|
## [6.8.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-ui-v6.7.1...cp-content-pipeline-ui-v6.8.0) (2024-06-06)
|
|
578
604
|
|
|
579
605
|
|
|
@@ -589,6 +615,7 @@
|
|
|
589
615
|
|
|
590
616
|
* **layout:** resolve partner content topper layout issue ([798ad5e](https://github.com/Financial-Times/cp-content-pipeline/commit/798ad5e3ac270c9c3eea491e3e953cd6d871d856))
|
|
591
617
|
* **topper:** restore columnist component ([7b5c97d](https://github.com/Financial-Times/cp-content-pipeline/commit/7b5c97d27de8438a45c3a4dd0d4b4f1993ae12ea))
|
|
618
|
+
* **clip:** fix progress bar 0sec issue ([e5fcbac](https://github.com/Financial-Times/cp-content-pipeline/commit/e5fcbac4ccd279118dd2721289e22a160f84f1de))
|
|
592
619
|
|
|
593
620
|
|
|
594
621
|
### Dependencies
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Content Pipeline UI
|
|
1
|
+
# Content Pipeline UI
|
|
2
2
|
|
|
3
3
|
A library that provides a set of React components that can be used to render content received from the `cp-content-pipeline-api`, including [Content Tree](https://github.com/Financial-Times/content-tree) components.
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ The components can be used independently or alongside the [cp-content-pipeline-c
|
|
|
13
13
|
|
|
14
14
|
## Usage Guide
|
|
15
15
|
|
|
16
|
-
1. Install the `cp-content-pipeline-ui` components
|
|
16
|
+
1. Install the `cp-content-pipeline-ui` components
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm install @financial-times/cp-content-pipeline-ui
|
|
@@ -32,7 +32,7 @@ const articleData = // obtain data by use of cp-content-pipeline-api directly or
|
|
|
32
32
|
|
|
33
33
|
## Components Explained
|
|
34
34
|
|
|
35
|
-
Each Component in this package contains a function which returns a JSX object.
|
|
35
|
+
Each Component in this package contains a function which returns a JSX object.
|
|
36
36
|
|
|
37
37
|
Components can be combined to form content views which can be used on, ft.com, the apps or the edit.
|
|
38
38
|
|
|
@@ -61,13 +61,13 @@ These are components that use the [content-tree](https://github.com/Financial-Ti
|
|
|
61
61
|
|
|
62
62
|
#### The RichText Component
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
The `<RichText>` component renders a `content-tree`
|
|
65
65
|
|
|
66
66
|
It accepts:
|
|
67
|
-
- A structured `content-tree` data object
|
|
67
|
+
- A structured `content-tree` data object
|
|
68
68
|
- An optional list of component overrides
|
|
69
69
|
|
|
70
|
-
This component recursively
|
|
70
|
+
This component recursively walks the tree and renders components for each `tag` in that dataset. The supported components are defined in a [componentMap](./src/components/RichText/index.tsx#L83) and they refer to the set of components which can be rendered.
|
|
71
71
|
|
|
72
72
|
Any component override must be a valid [JSX functional or class constructor](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/24f1d0c82da2d898acd03fbb3e692eba3c431f82/types/react/index.d.ts#L80).
|
|
73
73
|
|
|
@@ -82,7 +82,7 @@ The `Fallback` component is a special instance. This component is used whenever
|
|
|
82
82
|
|
|
83
83
|
##### References
|
|
84
84
|
|
|
85
|
-
The `<RichText>` component will match the `references` (an array of extra external content required to render a component no provided by `content-tree`) for a given node and pass those as a property to the child component.
|
|
85
|
+
The `<RichText>` component will match the `references` (an array of extra external content required to render a component no provided by `content-tree`) for a given node and pass those as a property to the child component.
|
|
86
86
|
|
|
87
87
|
##### Example usage
|
|
88
88
|
|
|
@@ -104,10 +104,32 @@ The `<RichText>` component will match the `references` (an array of extra extern
|
|
|
104
104
|
<RichText structuredContent={structuredContent} components={components} />
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
### Content body components
|
|
108
|
+
|
|
109
|
+
The `Body` component can render different components for different types of content. As well as the fallback `Article` renderer, which just renders the body content with a wrapper element, there are built-in renderers for these content types:
|
|
110
|
+
|
|
111
|
+
- `Audio`, renders an audio player before the actual body content
|
|
112
|
+
- `LiveBlogPackage`, renders the package's live blog posts
|
|
113
|
+
- `ContentPackage`, renders the package's articles
|
|
114
|
+
|
|
115
|
+
To provide a custom renderer, you can pass in an object of `bodyComponents` to `Body`, which maps content types to React components:
|
|
116
|
+
|
|
117
|
+
```js
|
|
118
|
+
<Body bodyComponents={{ Audio: (props) => <CustomPodcastPlayer {...props} /> }} content={...} />
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If no default or override component is provided for a particular content type, the `fallback` body component is rendered. By default, this is the renderer used for `Article` content.
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
<Body bodyComponents={{ fallback: (props) => <CustomFallback {...props} /> }} content={...} />
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Any additional properties passed to `Body` are forwarded to your renderer.
|
|
128
|
+
|
|
107
129
|
## Storybook
|
|
108
130
|
|
|
109
131
|
You can visually test the components on Storybook by running the following command:
|
|
110
132
|
|
|
111
133
|
```
|
|
112
134
|
npm run storybook
|
|
113
|
-
```
|
|
135
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = () => (process.env.TZ = 'UTC')
|
package/jest.config.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
const base = require('../../jest.config.base.js')
|
|
2
|
+
|
|
3
|
+
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
|
2
4
|
module.exports = {
|
|
3
5
|
...base,
|
|
6
|
+
globalSetup: './jest-global-setup.js',
|
|
4
7
|
testEnvironment: 'jsdom',
|
|
5
8
|
transformIgnorePatterns: [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
// Need to transform all node from the FT
|
|
10
|
+
'/node_modules/(?!@financial-times)',
|
|
11
|
+
],
|
|
12
|
+
transform: {
|
|
10
13
|
...base.transform,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
maxWorkers: '50%', // Adjust the number based on your CircleCI resources
|
|
22
|
-
|
|
14
|
+
'.(js)': '@sucrase/jest-plugin',
|
|
15
|
+
},
|
|
16
|
+
moduleNameMapper: {
|
|
17
|
+
...base.moduleNameMapper,
|
|
18
|
+
'^@financial-times/o-expander$':
|
|
19
|
+
'<rootDir>/../../node_modules/@financial-times/o-expander/main.js',
|
|
20
|
+
'^@financial-times/o-viewport$':
|
|
21
|
+
'<rootDir>/../../node_modules/@financial-times/o-viewport/main.js',
|
|
22
|
+
},
|
|
23
|
+
maxWorkers: '50%', // Adjust the number based on your CircleCI resources
|
|
23
24
|
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import React, { JSXElementConstructor } from 'react';
|
|
2
2
|
import type { ArticleQuery } from '@financial-times/cp-content-pipeline-client';
|
|
3
3
|
import type { RichTextComponentMapRecord } from '../RichText';
|
|
4
|
-
|
|
5
|
-
type PostTrackerConfig = {
|
|
6
|
-
usePostTracker: boolean;
|
|
7
|
-
onEntersViewport: () => void;
|
|
8
|
-
onRead: () => void;
|
|
9
|
-
onError: () => void;
|
|
10
|
-
};
|
|
11
|
-
type BodyComponentMapRecord = Partial<Record<'live-blog-body' | 'article-body' | 'podcast-body' | 'content-package-body', JSXElementConstructor<any>>>;
|
|
4
|
+
export type BodyComponentMapRecord = Partial<Record<ArticleQuery['content']['__typename'] | 'live-blog-body' | 'article-body' | 'podcast-body' | 'content-package-body' | 'fallback', JSXElementConstructor<any>>>;
|
|
12
5
|
export type BodyProps = {
|
|
13
6
|
content: ArticleQuery['content'];
|
|
14
7
|
richTextComponents?: RichTextComponentMapRecord;
|
|
15
8
|
bodyComponents?: BodyComponentMapRecord;
|
|
16
|
-
|
|
17
|
-
xInteractionSerialiser?: Serialiser;
|
|
18
|
-
postTrackerConfig?: PostTrackerConfig;
|
|
19
|
-
AdSlot?: React.FC;
|
|
9
|
+
[key: string]: unknown;
|
|
20
10
|
};
|
|
21
|
-
export default function Body({ content,
|
|
22
|
-
export {};
|
|
11
|
+
export default function Body({ content, bodyComponents, ...extraProps }: BodyProps): React.JSX.Element | null;
|
|
@@ -8,24 +8,31 @@ const ArticleBody_1 = __importDefault(require("../ArticleBody"));
|
|
|
8
8
|
const LiveBlogBody_1 = __importDefault(require("../LiveBlogBody"));
|
|
9
9
|
const PodcastBody_1 = __importDefault(require("../PodcastBody"));
|
|
10
10
|
const ContentPackageBody_1 = __importDefault(require("../ContentPackageBody"));
|
|
11
|
-
|
|
11
|
+
const contentTypeLegacyOverrideMap = {
|
|
12
|
+
Audio: 'podcast-body',
|
|
13
|
+
LiveBlogPackage: 'live-blog-body',
|
|
14
|
+
ContentPackage: 'content-package-body',
|
|
15
|
+
};
|
|
16
|
+
const defaultBodyComponents = {
|
|
17
|
+
Audio: PodcastBody_1.default,
|
|
18
|
+
LiveBlogPackage: LiveBlogBody_1.default,
|
|
19
|
+
ContentPackage: ContentPackageBody_1.default,
|
|
20
|
+
fallback: ArticleBody_1.default,
|
|
21
|
+
};
|
|
22
|
+
function Body({ content, bodyComponents, ...extraProps }) {
|
|
12
23
|
if (!content?.body?.structured) {
|
|
13
24
|
return null;
|
|
14
25
|
}
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
else if (content.__typename === 'ContentPackage') {
|
|
26
|
-
return (react_1.default.createElement(ContentPackage, { content: content, richTextComponents: richTextComponents, AdSlot: AdSlot }));
|
|
27
|
-
}
|
|
28
|
-
return react_1.default.createElement(Article, { content: content, richTextComponents: richTextComponents });
|
|
26
|
+
const bodyComponentsWithOverrides = {
|
|
27
|
+
...defaultBodyComponents,
|
|
28
|
+
...bodyComponents,
|
|
29
|
+
};
|
|
30
|
+
const legacyOverrideKey = contentTypeLegacyOverrideMap[content.__typename] ?? 'article-body';
|
|
31
|
+
const overrideComponent = legacyOverrideKey in bodyComponentsWithOverrides
|
|
32
|
+
? bodyComponentsWithOverrides[legacyOverrideKey]
|
|
33
|
+
: bodyComponentsWithOverrides[content.__typename];
|
|
34
|
+
const BodyComponent = overrideComponent ?? bodyComponentsWithOverrides.fallback ?? ArticleBody_1.default;
|
|
35
|
+
return react_1.default.createElement(BodyComponent, { content: content, ...extraProps });
|
|
29
36
|
}
|
|
30
37
|
exports.default = Body;
|
|
31
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Body/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAoD;AACpD,iEAAwC;AACxC,mEAA0C;AAC1C,iEAAwC;AACxC,+EAAsD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Body/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAoD;AACpD,iEAAwC;AACxC,mEAA0C;AAC1C,iEAAwC;AACxC,+EAAsD;AAoBtD,MAAM,4BAA4B,GAQ9B;IACF,KAAK,EAAE,cAAc;IACrB,eAAe,EAAE,gBAAgB;IACjC,cAAc,EAAE,sBAAsB;CACvC,CAAA;AAED,MAAM,qBAAqB,GAAG;IAC5B,KAAK,EAAE,qBAAW;IAClB,eAAe,EAAE,sBAAY;IAC7B,cAAc,EAAE,4BAAkB;IAClC,QAAQ,EAAE,qBAAW;CACW,CAAA;AASlC,SAAwB,IAAI,CAAC,EAC3B,OAAO,EACP,cAAc,EACd,GAAG,UAAU,EACH;IACV,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;QAC9B,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,2BAA2B,GAAG;QAClC,GAAG,qBAAqB;QACxB,GAAG,cAAc;KAClB,CAAA;IAED,MAAM,iBAAiB,GACrB,4BAA4B,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,cAAc,CAAA;IACpE,MAAM,iBAAiB,GACrB,iBAAiB,IAAI,2BAA2B;QAC9C,CAAC,CAAC,2BAA2B,CAAC,iBAAiB,CAAC;QAChD,CAAC,CAAC,2BAA2B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAErD,MAAM,aAAa,GACjB,iBAAiB,IAAI,2BAA2B,CAAC,QAAQ,IAAI,qBAAW,CAAA;IAE1E,OAAO,8BAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,UAAU,GAAI,CAAA;AAC5D,CAAC;AAzBD,uBAyBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_2 = require("@testing-library/react");
|
|
8
|
+
const _1 = __importDefault(require("."));
|
|
9
|
+
const baseContent = {
|
|
10
|
+
__typename: 'Article',
|
|
11
|
+
title: 'title',
|
|
12
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
13
|
+
url: 'https://www.ft.com/content/00000000-0000-0000-0000-000000000000',
|
|
14
|
+
publishedDate: '2024-06-11T14:13:25.527Z',
|
|
15
|
+
publishedTimestamp: 1718115205527,
|
|
16
|
+
firstPublishedDate: '2024-06-11T14:13:25.527Z',
|
|
17
|
+
body: {
|
|
18
|
+
structured: {
|
|
19
|
+
tree: {
|
|
20
|
+
type: 'body',
|
|
21
|
+
version: 1,
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
type: 'paragraph',
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
value: 'Lorem ipsum dolor sit amet',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
references: [],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const extraContentForType = {
|
|
39
|
+
Audio: {
|
|
40
|
+
__typename: 'Audio',
|
|
41
|
+
media: [
|
|
42
|
+
{
|
|
43
|
+
mediaType: 'audio/mpeg',
|
|
44
|
+
url: 'https://open.spotify.com/album/34a7B1mPM7RqlwsjPPmzEg?si=aHxMBJ1zRES6Z0iIrTrwBQ',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
ContentPackage: {
|
|
49
|
+
__typename: 'ContentPackage',
|
|
50
|
+
contains: [
|
|
51
|
+
{
|
|
52
|
+
title: 'teaser',
|
|
53
|
+
url: 'https://www.ft.com/content/00000000-0000-0000-0000-000000000000',
|
|
54
|
+
relativeUrl: '/content/00000000-0000-0000-0000-000000000000',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
LiveBlogPackage: {
|
|
59
|
+
__typename: 'LiveBlogPackage',
|
|
60
|
+
liveBlogPosts: [
|
|
61
|
+
{
|
|
62
|
+
...baseContent,
|
|
63
|
+
__typename: 'LiveBlogPost',
|
|
64
|
+
title: 'live post 1',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
Video: {
|
|
69
|
+
__typename: 'Video',
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
const extraPropsForType = {
|
|
73
|
+
LiveBlogPackage: {
|
|
74
|
+
postTrackerConfig: {
|
|
75
|
+
usePostTracker: false,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
// these are the only content types we currently care about rendering bodies for
|
|
80
|
+
const typesToTest = [
|
|
81
|
+
'Article',
|
|
82
|
+
'Video',
|
|
83
|
+
'Audio',
|
|
84
|
+
'LiveBlogPackage',
|
|
85
|
+
'ContentPackage',
|
|
86
|
+
];
|
|
87
|
+
const legacyOverridesToTest = [
|
|
88
|
+
['Article', 'article-body'],
|
|
89
|
+
['LiveBlogPackage', 'live-blog-body'],
|
|
90
|
+
['ContentPackage', 'content-package-body'],
|
|
91
|
+
['Audio', 'podcast-body'],
|
|
92
|
+
];
|
|
93
|
+
describe('Body', () => {
|
|
94
|
+
describe('default renderers', () => {
|
|
95
|
+
test.each(typesToTest)('renders default renderer for %s', (type) => {
|
|
96
|
+
const { asFragment } = (0, react_2.render)(react_1.default.createElement(_1.default, { content: { ...baseContent, ...(extraContentForType[type] ?? {}) }, ...(extraPropsForType[type] ?? {}) }));
|
|
97
|
+
expect(asFragment()).toMatchSnapshot();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
describe('legacy override renderers', () => {
|
|
101
|
+
test.each(legacyOverridesToTest)('renders override renderer for %s', (type, overrideName) => {
|
|
102
|
+
const { asFragment } = (0, react_2.render)(react_1.default.createElement(_1.default, { content: { ...baseContent, ...(extraContentForType[type] ?? {}) }, ...(extraPropsForType[type] ?? {}), bodyComponents: {
|
|
103
|
+
[overrideName]: ({ content, }) => react_1.default.createElement(react_1.default.Fragment, null,
|
|
104
|
+
"body override ",
|
|
105
|
+
content.__typename),
|
|
106
|
+
} }));
|
|
107
|
+
expect(asFragment()).toMatchSnapshot();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
describe('content type override renderers', () => {
|
|
111
|
+
test.each(typesToTest)('renders override renderer for %s', (type) => {
|
|
112
|
+
const { asFragment } = (0, react_2.render)(react_1.default.createElement(_1.default, { content: { ...baseContent, ...(extraContentForType[type] ?? {}) }, ...(extraPropsForType[type] ?? {}), bodyComponents: {
|
|
113
|
+
[type]: ({ content }) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
114
|
+
"body override ",
|
|
115
|
+
content.__typename)),
|
|
116
|
+
} }));
|
|
117
|
+
expect(asFragment()).toMatchSnapshot();
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/components/Body/index.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,kDAA+C;AAC/C,yCAAgD;AAGhD,MAAM,WAAW,GAA4B;IAC3C,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,sCAAsC;IAC1C,GAAG,EAAE,iEAAiE;IACtE,aAAa,EAAE,0BAA0B;IACzC,kBAAkB,EAAE,aAAa;IACjC,kBAAkB,EAAE,0BAA0B;IAC9C,IAAI,EAAE;QACJ,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,WAAW;wBACjB,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE,4BAA4B;6BACpC;yBACF;qBACF;iBACF;aACF;YACD,UAAU,EAAE,EAAE;SACf;KACF;CACF,CAAA;AAED,MAAM,mBAAmB,GAKrB;IACF,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IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,EAAwC,EAAE,EAAE,CAAC,CAC7D;;wBAAiB,OAAO,CAAC,UAAU,CAAI,CACxC;iBACF,GACD,CACH,CAAA;YAED,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,eAAe,EAAE,CAAA;QACxC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -14,7 +14,7 @@ function Byline({ structuredContent, showEditedBy, }) {
|
|
|
14
14
|
showEditedBy && (react_1.default.createElement("span", null,
|
|
15
15
|
"Edited by ",
|
|
16
16
|
react_1.default.createElement("br", null))),
|
|
17
|
-
react_1.default.createElement(RichText_1.default, { structuredContent: structuredContent, components: bylineComponents })));
|
|
17
|
+
typeof structuredContent === 'string' ? (react_1.default.createElement(react_1.default.Fragment, null, structuredContent)) : (react_1.default.createElement(RichText_1.default, { structuredContent: structuredContent, components: bylineComponents }))));
|
|
18
18
|
}
|
|
19
19
|
exports.default = Byline;
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Byline/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAgD;AAGhD,2DAAkC;AAOlC,MAAM,UAAU,GAAG,CAAC,KAA0C,EAAE,EAAE,CAChE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACX,qCACE,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAE,KAAK,CAAC,IAAI,oBACD,QAAQ,EACvB,MAAM,EAAC,QAAQ,IAEd,KAAK,CAAC,QAAQ,CACb,CACL,CAAC,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,gBAAgB,GAAG;IACvB,aAAa,EAAE,UAAU;CAC1B,CAAA;AAED,SAAwB,MAAM,CAAC,EAC7B,iBAAiB,EACjB,YAAY,GACA;IACZ,OAAO,CACL,qCAAG,SAAS,EAAC,sBAAsB;QAChC,YAAY,IAAI,CACf;;YACY,yCAAM,CACX,CACR;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Byline/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAgD;AAGhD,2DAAkC;AAOlC,MAAM,UAAU,GAAG,CAAC,KAA0C,EAAE,EAAE,CAChE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACX,qCACE,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAE,KAAK,CAAC,IAAI,oBACD,QAAQ,EACvB,MAAM,EAAC,QAAQ,IAEd,KAAK,CAAC,QAAQ,CACb,CACL,CAAC,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,gBAAgB,GAAG;IACvB,aAAa,EAAE,UAAU;CAC1B,CAAA;AAED,SAAwB,MAAM,CAAC,EAC7B,iBAAiB,EACjB,YAAY,GACA;IACZ,OAAO,CACL,qCAAG,SAAS,EAAC,sBAAsB;QAChC,YAAY,IAAI,CACf;;YACY,yCAAM,CACX,CACR;QACA,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,CACvC,8DAAG,iBAAiB,CAAI,CACzB,CAAC,CAAC,CAAC,CACF,8BAAC,kBAAQ,IACP,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,gBAAgB,GAC5B,CACH,CACC,CACL,CAAA;AACH,CAAC;AArBD,yBAqBC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BodyProps } from '../Body';
|
|
3
|
-
|
|
3
|
+
type ContentPackageBodyProps = BodyProps & {
|
|
4
|
+
AdSlot?: React.FC;
|
|
5
|
+
};
|
|
6
|
+
export default function ContentPackageBody({ content, richTextComponents, AdSlot, }: ContentPackageBodyProps): React.JSX.Element | null;
|
|
7
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ContentPackageBody/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,0CAA+C;AAE/C,0EAGkD;AAElD,4DAAmC;AAInC,SAAS,YAAY,CAAC,OAAkC;IACtD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAA4B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AACvE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ContentPackageBody/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,0CAA+C;AAE/C,0EAGkD;AAElD,4DAAmC;AAInC,SAAS,YAAY,CAAC,OAAkC;IACtD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAA4B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AACvE,CAAC;AAyBD,SAAwB,kBAAkB,CAAC,EACzC,OAAO,EACP,kBAAkB,EAClB,MAAM,GACkB;IACxB,IAAI,OAAO,CAAC,UAAU,KAAK,gBAAgB,EAAE;QAC3C,OAAO,IAAI,CAAA;KACZ;IACD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;IAE7C,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,cAAc,GAAqB,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAC1E,MAAM,gBAAgB,GAAqB,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAEzE,MAAM,oBAAoB,GACxB,MAAM,EAAE,KAAK,KAAK,gBAAgB;QAChC,CAAC,CAAC,+BAA+B;QACjC,CAAC,CAAC,uBAAuB,CAAA;IAE7B,MAAM,mBAAmB,GAAG,MAAM,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAExE,OAAO,CACL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E,EAAE,CAChC,MAAM,IAAI,CACR,sCACE,GAAG,EAAE,MAAM,CAAC,EAAE,EACd,SAAS,EAAC,uFAAuF;YAEjG,8BAAC,mBAAe,OACV,MAAM,KACN,oBAAO,CAAC,IAAI,EAChB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,EAClC,QAAQ,EAAE,KAAK,EACf,cAAc,EAAE,IAAI,GACpB,CACC,CACN,CACJ,CACE,CACD,CACP,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,WAAW,EACX,OAAO,EACP,UAAU,GACY;IACtB,OAAO,CACL,uCAAK,SAAS,EAAC,kCAAkC;QAC9C,WAAW,IAAI,CACd,sCAAI,SAAS,EAAC,8BAA8B,IAAE,WAAW,CAAM,CAChE;QACD,0CACG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAsB,EAAE,EAAE,CAAC,CACvC,sCAAI,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAC,2BAA2B;YACvD,8BAAC,mBAAe,OACV,MAAM,KACN,oBAAO,CAAC,UAAU,EACtB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,KAAK,GACf,CACC,CACN,CAAC,CACC,CACD,CACP,CAAA;AACH,CAAC"}
|
|
@@ -50,8 +50,9 @@ const withLiveBlogWrapperActions = (0, x_interaction_1.withActions)({
|
|
|
50
50
|
},
|
|
51
51
|
});
|
|
52
52
|
class BaseLiveBlogWrapper extends react_1.Component {
|
|
53
|
-
constructor(
|
|
54
|
-
super(
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
this.state = {};
|
|
55
56
|
}
|
|
56
57
|
componentDidUpdate() {
|
|
57
58
|
if (this.props.posts && this.props.posts.length && !this.state.tracker) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LiveBlogWrapper/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AACxC,kEAA+E;AAC/E,mDAA+C;AAC/C,mDAA+C;AAC/C,iDAA4C;AAC5C,kDAA8C;AAE9C,uDAAuD;AACvD,kCAAkC;AAClC,kHAAkH;AAElH,4FAA4F;AAC5F,MAAM,0BAA0B,GAAG,IAAA,2BAAW,EAAC;IAC7C,UAAU,CAAC,OAAY,EAAE,OAAY;QACnC,OAAO,CAAC,KAAU,EAAE,EAAE;YACpB,MAAM,iBAAiB,GAAG,IAAA,6BAAa,EAAC,OAAO,CAAC,CAAA;YAChD,MAAM,oBAAoB,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAC3C,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,iBAAiB,CAAC,EAAE,CAChD,CAAA;YACD,IAAI,CAAC,oBAAoB,EAAE;gBACzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBACtC,IAAA,6BAAa,EAAC,OAAO,EAAE,6BAA6B,EAAE;oBACpD,IAAI,EAAE,iBAAiB;iBACxB,CAAC,CAAA;aACH;YAED,OAAO,KAAK,CAAA;QACd,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAeF,MAAM,mBAAoB,SAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LiveBlogWrapper/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AACxC,kEAA+E;AAC/E,mDAA+C;AAC/C,mDAA+C;AAC/C,iDAA4C;AAC5C,kDAA8C;AAE9C,uDAAuD;AACvD,kCAAkC;AAClC,kHAAkH;AAElH,4FAA4F;AAC5F,MAAM,0BAA0B,GAAG,IAAA,2BAAW,EAAC;IAC7C,UAAU,CAAC,OAAY,EAAE,OAA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AO,CACL,uCACE,SAAS,EAAC,qBAAqB,+BACJ,EAAE,EAC7B,GAAG,EAAE,yBAAyB,IAE7B,YAAY,CACT,CACP,CAAA;IACH,CAAC;CACF;AAED,MAAM,eAAe,GAAG,0BAA0B,CAAC,mBAAmB,CAAC,CAAA;AAI9D,0CAAe;AAHxB,kEAAkE;AAClE,IAAA,iCAAiB,EAAC,eAAe,EAAE,iBAAiB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/cp-content-pipeline-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@financial-times/content-tree": "github:financial-times/content-tree#14370e3",
|
|
20
20
|
"@financial-times/cp-content-pipeline-client": "^3.8.0",
|
|
21
21
|
"@financial-times/cp-content-pipeline-schema": "^2.11.0",
|
|
22
|
-
"@financial-times/cp-content-pipeline-styles": "^2.5.
|
|
22
|
+
"@financial-times/cp-content-pipeline-styles": "^2.5.2",
|
|
23
23
|
"@financial-times/n-scrollytelling-image": "^1.1.0",
|
|
24
24
|
"@financial-times/o-colors": "^6.6.2",
|
|
25
25
|
"@financial-times/o-grid": "^6.1.5",
|