@ndla/article-converter 10.0.28-alpha.0 → 10.0.30-alpha.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.
@@ -12,7 +12,6 @@ import { brightcoveEmbedPlugin } from "./brightcoveEmbedPlugin";
12
12
  import { campaignBlockPlugin } from "./campaignBlockPlugin";
13
13
  import { codeEmbedPlugin } from "./codeEmbedPlugin";
14
14
  import { conceptEmbedPlugin } from "./conceptEmbedPlugin";
15
- import { conceptListEmbedPlugin } from "./conceptListEmbedPlugin";
16
15
  import { contactBlockEmbedPlugin } from "./contactBlockEmbedPlugin";
17
16
  import { contentLinkEmbedPlugin } from "./contentLinkEmbedPlugin";
18
17
  import { copyrightEmbedPlugin } from "./copyrightEmbedPlugin";
@@ -38,7 +37,6 @@ export const embedPlugins = {
38
37
  "related-content": relatedContentEmbedPlugin,
39
38
  "content-link": contentLinkEmbedPlugin,
40
39
  concept: conceptEmbedPlugin,
41
- "concept-list": conceptListEmbedPlugin,
42
40
  "blog-post": blogPostEmbedPlugin,
43
41
  file: fileEmbedPlugin,
44
42
  "key-figure": keyFigureEmbedPlugin,
@@ -10,7 +10,6 @@ var _brightcoveEmbedPlugin = require("./brightcoveEmbedPlugin");
10
10
  var _campaignBlockPlugin = require("./campaignBlockPlugin");
11
11
  var _codeEmbedPlugin = require("./codeEmbedPlugin");
12
12
  var _conceptEmbedPlugin = require("./conceptEmbedPlugin");
13
- var _conceptListEmbedPlugin = require("./conceptListEmbedPlugin");
14
13
  var _contactBlockEmbedPlugin = require("./contactBlockEmbedPlugin");
15
14
  var _contentLinkEmbedPlugin = require("./contentLinkEmbedPlugin");
16
15
  var _copyrightEmbedPlugin = require("./copyrightEmbedPlugin");
@@ -44,7 +43,6 @@ const embedPlugins = exports.embedPlugins = {
44
43
  "related-content": _relatedContentEmbedPlugin.relatedContentEmbedPlugin,
45
44
  "content-link": _contentLinkEmbedPlugin.contentLinkEmbedPlugin,
46
45
  concept: _conceptEmbedPlugin.conceptEmbedPlugin,
47
- "concept-list": _conceptListEmbedPlugin.conceptListEmbedPlugin,
48
46
  "blog-post": _blogPostEmbedPlugin.blogPostEmbedPlugin,
49
47
  file: _fileEmbedPlugin.fileEmbedPlugin,
50
48
  "key-figure": _KeyFigureEmbedPlugin.keyFigureEmbedPlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/article-converter",
3
- "version": "10.0.28-alpha.0",
3
+ "version": "10.0.30-alpha.0",
4
4
  "description": "Transforms NDLA articles into extended html versions",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -28,16 +28,14 @@
28
28
  ],
29
29
  "devDependencies": {
30
30
  "@ndla/types-backend": "^0.2.86",
31
- "@ndla/types-embed": "^5.0.1-alpha.0"
31
+ "@ndla/types-embed": "^5.0.2-alpha.0"
32
32
  },
33
33
  "dependencies": {
34
- "@ndla/primitives": "^1.0.25-alpha.0",
35
- "@ndla/ui": "^56.0.28-alpha.0",
34
+ "@ndla/primitives": "^1.0.26-alpha.0",
35
+ "@ndla/ui": "^56.0.29-alpha.0",
36
36
  "html-react-parser": "^5.1.8"
37
37
  },
38
38
  "peerDependencies": {
39
- "@emotion/react": "^11.10.4",
40
- "@emotion/styled": "^11.10.4",
41
39
  "i18next": ">= 23.11.5",
42
40
  "react": ">= 16.8.0",
43
41
  "react-dom": ">= 16.8.0",
@@ -47,5 +45,5 @@
47
45
  "publishConfig": {
48
46
  "access": "public"
49
47
  },
50
- "gitHead": "d97a2f9c0e8bc60c499000bb27c8fe4441740381"
48
+ "gitHead": "7bbe84105cb0514b4741be547e0f2c298274d4f4"
51
49
  }
@@ -12,7 +12,6 @@ import { brightcoveEmbedPlugin } from "./brightcoveEmbedPlugin";
12
12
  import { campaignBlockPlugin } from "./campaignBlockPlugin";
13
13
  import { codeEmbedPlugin } from "./codeEmbedPlugin";
14
14
  import { conceptEmbedPlugin } from "./conceptEmbedPlugin";
15
- import { conceptListEmbedPlugin } from "./conceptListEmbedPlugin";
16
15
  import { contactBlockEmbedPlugin } from "./contactBlockEmbedPlugin";
17
16
  import { contentLinkEmbedPlugin } from "./contentLinkEmbedPlugin";
18
17
  import { copyrightEmbedPlugin } from "./copyrightEmbedPlugin";
@@ -40,7 +39,6 @@ export const embedPlugins: Record<string, PluginType> = {
40
39
  "related-content": relatedContentEmbedPlugin,
41
40
  "content-link": contentLinkEmbedPlugin,
42
41
  concept: conceptEmbedPlugin,
43
- "concept-list": conceptListEmbedPlugin,
44
42
  "blog-post": blogPostEmbedPlugin,
45
43
  file: fileEmbedPlugin,
46
44
  "key-figure": keyFigureEmbedPlugin,
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright (c) 2023-present, NDLA.
3
- *
4
- * This source code is licensed under the GPLv3 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import { attributesToProps } from "html-react-parser";
10
- import { ConceptListEmbed } from "@ndla/ui";
11
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
12
- export const conceptListEmbedPlugin = (element, _, opts) => {
13
- const props = attributesToProps(element.attribs);
14
- const data = JSON.parse(props["data-json"]);
15
- return _jsx(ConceptListEmbed, {
16
- embed: data,
17
- lang: opts.articleLanguage
18
- });
19
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * Copyright (c) 2023-present, NDLA.
3
- *
4
- * This source code is licensed under the GPLv3 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { PluginType } from "../types";
9
- export declare const conceptListEmbedPlugin: PluginType;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.conceptListEmbedPlugin = void 0;
7
- var _htmlReactParser = require("html-react-parser");
8
- var _ui = require("@ndla/ui");
9
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
- /**
11
- * Copyright (c) 2023-present, NDLA.
12
- *
13
- * This source code is licensed under the GPLv3 license found in the
14
- * LICENSE file in the root directory of this source tree.
15
- *
16
- */
17
-
18
- const conceptListEmbedPlugin = (element, _, opts) => {
19
- const props = (0, _htmlReactParser.attributesToProps)(element.attribs);
20
- const data = JSON.parse(props["data-json"]);
21
- return (0, _jsxRuntime.jsx)(_ui.ConceptListEmbed, {
22
- embed: data,
23
- lang: opts.articleLanguage
24
- });
25
- };
26
- exports.conceptListEmbedPlugin = conceptListEmbedPlugin;
@@ -1,18 +0,0 @@
1
- /**
2
- * Copyright (c) 2023-present, NDLA.
3
- *
4
- * This source code is licensed under the GPLv3 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import { attributesToProps } from "html-react-parser";
10
- import { ConceptListMetaData } from "@ndla/types-embed";
11
- import { ConceptListEmbed } from "@ndla/ui";
12
- import { PluginType } from "../types";
13
-
14
- export const conceptListEmbedPlugin: PluginType = (element, _, opts) => {
15
- const props = attributesToProps(element.attribs);
16
- const data = JSON.parse(props["data-json"] as string) as ConceptListMetaData;
17
- return <ConceptListEmbed embed={data} lang={opts.articleLanguage} />;
18
- };