@ndla/article-converter 6.2.2 → 6.3.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/es/plugins/embed/campaignBlockPlugin.js +2 -8
- package/es/plugins/embed/linkBlockEmbedPlugin.js +2 -1
- package/lib/plugins/embed/campaignBlockPlugin.js +2 -8
- package/lib/plugins/embed/linkBlockEmbedPlugin.js +2 -1
- package/package.json +5 -5
- package/src/plugins/embed/campaignBlockPlugin.tsx +2 -5
- package/src/plugins/embed/linkBlockEmbedPlugin.tsx +1 -1
|
@@ -14,14 +14,8 @@ export const campaignBlockPlugin = (element, _, opts) => {
|
|
|
14
14
|
const data = JSON.parse(props["data-json"]);
|
|
15
15
|
const embed = data.embedData;
|
|
16
16
|
return _jsx(CampaignBlock, {
|
|
17
|
-
title:
|
|
18
|
-
|
|
19
|
-
language: embed.titleLanguage
|
|
20
|
-
},
|
|
21
|
-
description: {
|
|
22
|
-
text: embed.description,
|
|
23
|
-
language: embed.descriptionLanguage
|
|
24
|
-
},
|
|
17
|
+
title: embed.title,
|
|
18
|
+
description: embed.description,
|
|
25
19
|
url: {
|
|
26
20
|
url: embed.url,
|
|
27
21
|
text: embed.urlText
|
|
@@ -20,14 +20,8 @@ const campaignBlockPlugin = (element, _, opts) => {
|
|
|
20
20
|
const data = JSON.parse(props["data-json"]);
|
|
21
21
|
const embed = data.embedData;
|
|
22
22
|
return (0, _jsxRuntime.jsx)(_ui.CampaignBlock, {
|
|
23
|
-
title:
|
|
24
|
-
|
|
25
|
-
language: embed.titleLanguage
|
|
26
|
-
},
|
|
27
|
-
description: {
|
|
28
|
-
text: embed.description,
|
|
29
|
-
language: embed.descriptionLanguage
|
|
30
|
-
},
|
|
23
|
+
title: embed.title,
|
|
24
|
+
description: embed.description,
|
|
31
25
|
url: {
|
|
32
26
|
url: embed.url,
|
|
33
27
|
text: embed.urlText
|
|
@@ -20,7 +20,8 @@ const linkBlockPlugin = (element, _, opts) => {
|
|
|
20
20
|
const data = JSON.parse(props["data-json"]);
|
|
21
21
|
return (0, _jsxRuntime.jsx)(_ui.LinkBlock, {
|
|
22
22
|
...data.embedData,
|
|
23
|
-
path: opts.path
|
|
23
|
+
path: opts.path,
|
|
24
|
+
articleLanguage: opts.articleLanguage
|
|
24
25
|
});
|
|
25
26
|
};
|
|
26
27
|
exports.linkBlockPlugin = linkBlockPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/article-converter",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Transforms NDLA articles into extended html versions",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@ndla/types-backend": "^0.2.64",
|
|
31
|
-
"@ndla/types-embed": "^4.1.
|
|
31
|
+
"@ndla/types-embed": "^4.1.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/code": "^5.0.
|
|
35
|
-
"@ndla/ui": "^50.
|
|
34
|
+
"@ndla/code": "^5.0.51",
|
|
35
|
+
"@ndla/ui": "^50.13.0",
|
|
36
36
|
"html-react-parser": "^5.1.8",
|
|
37
37
|
"lodash": "^4.17.20"
|
|
38
38
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "be1521c3f9ed60089f0a7cc69151945cdbd28a03"
|
|
52
52
|
}
|
|
@@ -18,11 +18,8 @@ export const campaignBlockPlugin: PluginType = (element, _, opts) => {
|
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<CampaignBlock
|
|
21
|
-
title={
|
|
22
|
-
description={
|
|
23
|
-
text: embed.description,
|
|
24
|
-
language: embed.descriptionLanguage,
|
|
25
|
-
}}
|
|
21
|
+
title={embed.title}
|
|
22
|
+
description={embed.description}
|
|
26
23
|
url={{ url: embed.url, text: embed.urlText }}
|
|
27
24
|
path={opts.path}
|
|
28
25
|
imageSide={embed.imageSide}
|
|
@@ -15,5 +15,5 @@ export const linkBlockPlugin: PluginType = (element, _, opts) => {
|
|
|
15
15
|
const props = attributesToProps(element.attribs);
|
|
16
16
|
const data = JSON.parse(props["data-json"] as string) as LinkBlockMetaData;
|
|
17
17
|
|
|
18
|
-
return <LinkBlock {...data.embedData} path={opts.path} />;
|
|
18
|
+
return <LinkBlock {...data.embedData} path={opts.path} articleLanguage={opts.articleLanguage} />;
|
|
19
19
|
};
|