@ndla/ui 45.0.8 → 45.0.10
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/BannerCard/BannerCard.js +20 -10
- package/es/Embed/ConceptEmbed.js +44 -22
- package/es/Embed/ConceptListEmbed.js +5 -4
- package/es/Embed/conceptComponents.js +54 -41
- package/es/FrontpageArticle/FrontpageArticle.js +3 -2
- package/es/Gloss/Gloss.js +12 -11
- package/es/LicenseByline/EmbedByline.js +5 -5
- package/es/Notion/NotionImage.js +2 -2
- package/es/locale/messages-en.js +5 -3
- package/es/locale/messages-nb.js +4 -2
- package/es/locale/messages-nn.js +5 -3
- package/es/locale/messages-se.js +5 -3
- package/es/locale/messages-sma.js +5 -3
- package/lib/BannerCard/BannerCard.d.ts +1 -1
- package/lib/BannerCard/BannerCard.js +21 -12
- package/lib/Embed/ConceptEmbed.d.ts +1 -1
- package/lib/Embed/ConceptEmbed.js +44 -22
- package/lib/Embed/ConceptListEmbed.js +5 -4
- package/lib/Embed/conceptComponents.d.ts +5 -2
- package/lib/Embed/conceptComponents.js +53 -41
- package/lib/Figure/FigureOpenDialogButton.d.ts +1 -1
- package/lib/FrontpageArticle/FrontpageArticle.js +3 -2
- package/lib/Gloss/Gloss.js +12 -11
- package/lib/LicenseByline/EmbedByline.d.ts +2 -2
- package/lib/LicenseByline/EmbedByline.js +5 -5
- package/lib/Notion/NotionImage.d.ts +1 -1
- package/lib/Notion/NotionImage.js +2 -2
- package/lib/locale/messages-en.d.ts +3 -1
- package/lib/locale/messages-en.js +5 -3
- package/lib/locale/messages-nb.d.ts +3 -1
- package/lib/locale/messages-nb.js +4 -2
- package/lib/locale/messages-nn.d.ts +3 -1
- package/lib/locale/messages-nn.js +5 -3
- package/lib/locale/messages-se.d.ts +3 -1
- package/lib/locale/messages-se.js +5 -3
- package/lib/locale/messages-sma.d.ts +3 -1
- package/lib/locale/messages-sma.js +5 -3
- package/lib/types.d.ts +1 -0
- package/package.json +5 -5
- package/src/BannerCard/BannerCard.tsx +2 -2
- package/src/ContactBlock/Contactblock.stories.tsx +1 -0
- package/src/Embed/AudioEmbed.stories.tsx +3 -0
- package/src/Embed/ConceptEmbed.stories.tsx +3 -0
- package/src/Embed/ConceptEmbed.tsx +96 -69
- package/src/Embed/ConceptListEmbed.tsx +2 -1
- package/src/Embed/IframeEmbed.stories.tsx +1 -0
- package/src/Embed/ImageEmbed.stories.tsx +1 -0
- package/src/Embed/conceptComponents.tsx +58 -37
- package/src/Figure/FigureOpenDialogButton.tsx +1 -1
- package/src/FrontpageArticle/FrontpageArticle.tsx +1 -1
- package/src/Gloss/Gloss.tsx +5 -5
- package/src/LicenseByline/EmbedByline.tsx +2 -2
- package/src/Notion/NotionImage.tsx +1 -1
- package/src/locale/messages-en.ts +3 -1
- package/src/locale/messages-nb.ts +3 -1
- package/src/locale/messages-nn.ts +3 -1
- package/src/locale/messages-se.ts +3 -1
- package/src/locale/messages-sma.ts +3 -1
- package/src/types.ts +1 -0
|
@@ -23,13 +23,13 @@ var StyledImageWrapper = /*#__PURE__*/(0, _base.default)("div", {
|
|
|
23
23
|
label: "StyledImageWrapper"
|
|
24
24
|
})("overflow:hidden;width:260px;padding-top:", _core.spacing.small, ";", _core.mq.range({
|
|
25
25
|
until: _core.breakpoints.tabletWide
|
|
26
|
-
}), "{margin:0 auto;}&:hover{img{transform:scale(1.1);opacity:1.1;transition-duration:0.5s;}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
26
|
+
}), "{margin:0 auto;}&:hover{img{transform:scale(1.1);opacity:1.1;transition-duration:0.5s;}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk5vdGlvbkltYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhcUMiLCJmaWxlIjoiTm90aW9uSW1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CdXR0b25MYWJlbDogdCgnbGljZW5zZS5pbWFnZXMuaXRlbUltYWdlLnpvb21JbWFnZUJ1dHRvbkxhYmVsJyksXG4gICAgICAgICAgICAgICAgem9vbU91dEltYWdlQnV0dG9uTGFiZWw6IHQoJ2xpY2Vuc2UuaW1hZ2UuaXRlbUltYWdlLnpvb21PdXRJbWFnZUJ1dHRvbkxhYmVsJyksXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIH1cbiAgICAgICAgLz5cbiAgICAgIDwvU3R5bGVkSW1hZ2VXcmFwcGVyPlxuICAgIDwvRmlndXJlPlxuICApO1xufTtcbiJdfQ== */"));
|
|
27
27
|
var StyledImage = /*#__PURE__*/(0, _base.default)(_Image.default, {
|
|
28
28
|
target: "e1beccco0",
|
|
29
29
|
label: "StyledImage"
|
|
30
30
|
})("object-fit:cover;max-height:162px;transition:transform ", _core.animations.durations.fast, ";", _core.mq.range({
|
|
31
31
|
until: _core.breakpoints.tabletWide
|
|
32
|
-
}), "{min-width:260px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
32
|
+
}), "{min-width:260px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk5vdGlvbkltYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QmlDIiwiZmlsZSI6Ik5vdGlvbkltYWdlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDIyLXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2Ygd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AgICB9XG4gICAgICAgIC8+XG4gICAgICA8L1N0eWxlZEltYWdlV3JhcHBlcj5cbiAgICA8L0ZpZ3VyZT5cbiAgKTtcbn07XG4iXX0= */"));
|
|
33
33
|
var NotionImage = function NotionImage(_ref) {
|
|
34
34
|
var id = _ref.id,
|
|
35
35
|
src = _ref.src,
|
|
@@ -287,6 +287,7 @@ declare const messages: {
|
|
|
287
287
|
concept: string;
|
|
288
288
|
h5p: string;
|
|
289
289
|
external: string;
|
|
290
|
+
gloss: string;
|
|
290
291
|
};
|
|
291
292
|
};
|
|
292
293
|
gloss: {
|
|
@@ -496,9 +497,10 @@ declare const messages: {
|
|
|
496
497
|
notionsHeading: string;
|
|
497
498
|
notionsRemove: string;
|
|
498
499
|
showVideo: string;
|
|
499
|
-
|
|
500
|
+
concept: string;
|
|
500
501
|
gridView: string;
|
|
501
502
|
listView: string;
|
|
503
|
+
gloss: string;
|
|
502
504
|
};
|
|
503
505
|
contextModal: {
|
|
504
506
|
button: string;
|
|
@@ -215,9 +215,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
215
215
|
notionsHeading: 'Explanations',
|
|
216
216
|
notionsRemove: 'Remove',
|
|
217
217
|
showVideo: 'Watch video',
|
|
218
|
-
|
|
218
|
+
concept: 'Show notion',
|
|
219
219
|
gridView: 'Grid-view',
|
|
220
|
-
listView: 'List-view'
|
|
220
|
+
listView: 'List-view',
|
|
221
|
+
gloss: 'Show gloss'
|
|
221
222
|
},
|
|
222
223
|
contextModal: {
|
|
223
224
|
button: '+ {{count}} more contexts',
|
|
@@ -1291,7 +1292,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1291
1292
|
podcast: 'Podcast',
|
|
1292
1293
|
concept: 'Concept',
|
|
1293
1294
|
h5p: 'H5P',
|
|
1294
|
-
external: 'External resource'
|
|
1295
|
+
external: 'External resource',
|
|
1296
|
+
gloss: 'Gloss'
|
|
1295
1297
|
}
|
|
1296
1298
|
},
|
|
1297
1299
|
gloss: {
|
|
@@ -287,6 +287,7 @@ declare const messages: {
|
|
|
287
287
|
concept: string;
|
|
288
288
|
h5p: string;
|
|
289
289
|
external: string;
|
|
290
|
+
gloss: string;
|
|
290
291
|
};
|
|
291
292
|
};
|
|
292
293
|
gloss: {
|
|
@@ -496,7 +497,8 @@ declare const messages: {
|
|
|
496
497
|
notionsHeading: string;
|
|
497
498
|
notionsRemove: string;
|
|
498
499
|
showVideo: string;
|
|
499
|
-
|
|
500
|
+
concept: string;
|
|
501
|
+
gloss: string;
|
|
500
502
|
gridView: string;
|
|
501
503
|
listView: string;
|
|
502
504
|
};
|
|
@@ -213,7 +213,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
213
213
|
notionsHeading: 'Begrepsforklaring',
|
|
214
214
|
notionsRemove: 'Fjern',
|
|
215
215
|
showVideo: 'Se video',
|
|
216
|
-
|
|
216
|
+
concept: 'Se forklaring',
|
|
217
|
+
gloss: 'Se glose',
|
|
217
218
|
gridView: 'Gallerivisning',
|
|
218
219
|
listView: 'Listevisning'
|
|
219
220
|
},
|
|
@@ -1289,7 +1290,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1289
1290
|
podcast: 'Podkast',
|
|
1290
1291
|
concept: 'Forklaring',
|
|
1291
1292
|
h5p: 'H5P',
|
|
1292
|
-
external: 'Ekstern ressurs'
|
|
1293
|
+
external: 'Ekstern ressurs',
|
|
1294
|
+
gloss: 'Glose'
|
|
1293
1295
|
}
|
|
1294
1296
|
},
|
|
1295
1297
|
gloss: {
|
|
@@ -287,6 +287,7 @@ declare const messages: {
|
|
|
287
287
|
concept: string;
|
|
288
288
|
h5p: string;
|
|
289
289
|
external: string;
|
|
290
|
+
gloss: string;
|
|
290
291
|
};
|
|
291
292
|
};
|
|
292
293
|
gloss: {
|
|
@@ -496,9 +497,10 @@ declare const messages: {
|
|
|
496
497
|
notionsHeading: string;
|
|
497
498
|
notionsRemove: string;
|
|
498
499
|
showVideo: string;
|
|
499
|
-
|
|
500
|
+
concept: string;
|
|
500
501
|
gridView: string;
|
|
501
502
|
listView: string;
|
|
503
|
+
gloss: string;
|
|
502
504
|
};
|
|
503
505
|
contextModal: {
|
|
504
506
|
button: string;
|
|
@@ -213,9 +213,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
213
213
|
notionsHeading: 'Begrepsforklaring',
|
|
214
214
|
notionsRemove: 'Fjern',
|
|
215
215
|
showVideo: 'Sjå video',
|
|
216
|
-
|
|
216
|
+
concept: 'Sjå forklaring',
|
|
217
217
|
gridView: 'Gallerivisning',
|
|
218
|
-
listView: 'Listevisning'
|
|
218
|
+
listView: 'Listevisning',
|
|
219
|
+
gloss: 'Sjå glose'
|
|
219
220
|
},
|
|
220
221
|
contextModal: {
|
|
221
222
|
button: '+ {{count}} fleire stader',
|
|
@@ -1289,7 +1290,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1289
1290
|
podcast: 'Podkast',
|
|
1290
1291
|
concept: 'Forklaring',
|
|
1291
1292
|
h5p: 'H5P',
|
|
1292
|
-
external: 'Ekstern ressurs'
|
|
1293
|
+
external: 'Ekstern ressurs',
|
|
1294
|
+
gloss: 'Glose'
|
|
1293
1295
|
}
|
|
1294
1296
|
},
|
|
1295
1297
|
gloss: {
|
|
@@ -287,6 +287,7 @@ declare const messages: {
|
|
|
287
287
|
concept: string;
|
|
288
288
|
h5p: string;
|
|
289
289
|
external: string;
|
|
290
|
+
gloss: string;
|
|
290
291
|
};
|
|
291
292
|
};
|
|
292
293
|
gloss: {
|
|
@@ -496,9 +497,10 @@ declare const messages: {
|
|
|
496
497
|
notionsHeading: string;
|
|
497
498
|
notionsRemove: string;
|
|
498
499
|
showVideo: string;
|
|
499
|
-
|
|
500
|
+
concept: string;
|
|
500
501
|
gridView: string;
|
|
501
502
|
listView: string;
|
|
503
|
+
gloss: string;
|
|
502
504
|
};
|
|
503
505
|
contextModal: {
|
|
504
506
|
button: string;
|
|
@@ -213,9 +213,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
213
213
|
notionsHeading: 'Doabačilgehus',
|
|
214
214
|
notionsRemove: 'Sihko',
|
|
215
215
|
showVideo: 'Geahča video',
|
|
216
|
-
|
|
216
|
+
concept: 'Geahča čilgehusa',
|
|
217
217
|
gridView: 'Galleriijačájáhus',
|
|
218
|
-
listView: 'Čájáhus listtu vuođul'
|
|
218
|
+
listView: 'Čájáhus listtu vuođul',
|
|
219
|
+
gloss: 'Se glose'
|
|
219
220
|
},
|
|
220
221
|
contextModal: {
|
|
221
222
|
button: '+ {{count}} eanet sajiin',
|
|
@@ -1289,7 +1290,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1289
1290
|
podcast: 'Podkast',
|
|
1290
1291
|
concept: 'Forklaring',
|
|
1291
1292
|
h5p: 'H5P',
|
|
1292
|
-
external: 'Ekstern ressurs'
|
|
1293
|
+
external: 'Ekstern ressurs',
|
|
1294
|
+
gloss: 'Glose'
|
|
1293
1295
|
}
|
|
1294
1296
|
},
|
|
1295
1297
|
gloss: {
|
|
@@ -287,6 +287,7 @@ declare const messages: {
|
|
|
287
287
|
concept: string;
|
|
288
288
|
h5p: string;
|
|
289
289
|
external: string;
|
|
290
|
+
gloss: string;
|
|
290
291
|
};
|
|
291
292
|
};
|
|
292
293
|
gloss: {
|
|
@@ -496,9 +497,10 @@ declare const messages: {
|
|
|
496
497
|
notionsHeading: string;
|
|
497
498
|
notionsRemove: string;
|
|
498
499
|
showVideo: string;
|
|
499
|
-
|
|
500
|
+
concept: string;
|
|
500
501
|
gridView: string;
|
|
501
502
|
listView: string;
|
|
503
|
+
gloss: string;
|
|
502
504
|
};
|
|
503
505
|
contextModal: {
|
|
504
506
|
button: string;
|
|
@@ -213,9 +213,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
213
213
|
notionsHeading: 'Baakoebuerkiestimmie',
|
|
214
214
|
notionsRemove: 'Skubph',
|
|
215
215
|
showVideo: 'Gïehtjh videjovem',
|
|
216
|
-
|
|
216
|
+
concept: 'Gïehtjh buerkiestimmiem ',
|
|
217
217
|
gridView: 'Gallerivisning',
|
|
218
|
-
listView: 'Listevisning'
|
|
218
|
+
listView: 'Listevisning',
|
|
219
|
+
gloss: 'Se glose'
|
|
219
220
|
},
|
|
220
221
|
contextModal: {
|
|
221
222
|
button: '+ {{count}} jieniebinie sijjine',
|
|
@@ -1289,7 +1290,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1289
1290
|
podcast: 'Podkast',
|
|
1290
1291
|
concept: 'Forklaring',
|
|
1291
1292
|
h5p: 'H5P',
|
|
1292
|
-
external: 'Ekstern ressurs'
|
|
1293
|
+
external: 'Ekstern ressurs',
|
|
1294
|
+
gloss: 'Glose'
|
|
1293
1295
|
}
|
|
1294
1296
|
},
|
|
1295
1297
|
gloss: {
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "45.0.
|
|
3
|
+
"version": "45.0.10",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@ndla/icons": "^4.0.6",
|
|
43
43
|
"@ndla/licenses": "^7.1.4",
|
|
44
44
|
"@ndla/modal": "^4.0.7",
|
|
45
|
-
"@ndla/notion": "^5.0.
|
|
45
|
+
"@ndla/notion": "^5.0.25",
|
|
46
46
|
"@ndla/safelink": "^4.1.21",
|
|
47
47
|
"@ndla/select": "^2.4.12",
|
|
48
48
|
"@ndla/switch": "^1.1.12",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
|
|
75
|
-
"@ndla/types-backend": "^0.2.
|
|
76
|
-
"@ndla/types-embed": "^4.0.
|
|
75
|
+
"@ndla/types-backend": "^0.2.21",
|
|
76
|
+
"@ndla/types-embed": "^4.0.1",
|
|
77
77
|
"css-loader": "^6.7.3",
|
|
78
78
|
"mini-css-extract-plugin": "^2.7.5",
|
|
79
79
|
"sass-loader": "^13.2.2",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "8abb4a1a790af81f4a4eb14e6c355817160c938d"
|
|
87
87
|
}
|
|
@@ -79,9 +79,9 @@ type BannerProps = {
|
|
|
79
79
|
content: { content: string; lang?: string };
|
|
80
80
|
linkText: { text: string; lang?: string };
|
|
81
81
|
};
|
|
82
|
-
export const BannerCard = ({ link, title, content, linkText, image }: BannerProps) => {
|
|
82
|
+
export const BannerCard = ({ link, title, content, linkText, image, ...rest }: BannerProps) => {
|
|
83
83
|
return (
|
|
84
|
-
<BannerWrapper>
|
|
84
|
+
<BannerWrapper {...rest}>
|
|
85
85
|
<ImageWrapper>
|
|
86
86
|
<StyledImage alt={image.altText} src={image.imageSrc} />
|
|
87
87
|
</ImageWrapper>
|
|
@@ -39,6 +39,7 @@ const successData: AudioMeta = {
|
|
|
39
39
|
creators: [{ type: 'originator', name: 'Radio Metro AS' }],
|
|
40
40
|
processors: [],
|
|
41
41
|
rightsholders: [],
|
|
42
|
+
processed: false,
|
|
42
43
|
},
|
|
43
44
|
tags: { tags: ["Ain't I a Woman?", 'Sojourner Truth', 'speech', 'abolitionist'], language: 'nb' },
|
|
44
45
|
supportedLanguages: ['nb'],
|
|
@@ -79,6 +80,7 @@ const podcastSuccessData: AudioMeta = {
|
|
|
79
80
|
{ type: 'editorial', name: 'Maren Aftret-Sandal' },
|
|
80
81
|
],
|
|
81
82
|
rightsholders: [{ type: 'rightsholder', name: 'Både Og' }],
|
|
83
|
+
processed: false,
|
|
82
84
|
},
|
|
83
85
|
tags: { tags: ['reklame', 'radio', 'lyddesign'], language: 'nb' },
|
|
84
86
|
supportedLanguages: ['nb', 'nn'],
|
|
@@ -148,6 +150,7 @@ const podcastSuccessData: AudioMeta = {
|
|
|
148
150
|
},
|
|
149
151
|
],
|
|
150
152
|
rightsholders: [],
|
|
153
|
+
processed: false,
|
|
151
154
|
},
|
|
152
155
|
tags: {
|
|
153
156
|
tags: ['lytt gjennom mediefaget', 'podcastserie', 'podcast', 'mediefaget', 'medier', 'podkastserie', 'podkast'],
|
|
@@ -47,6 +47,7 @@ const conceptMetaData: ConceptData['concept'] = {
|
|
|
47
47
|
{ type: 'Correction', name: 'Arbeidets art' },
|
|
48
48
|
],
|
|
49
49
|
rightsholders: [],
|
|
50
|
+
processed: false,
|
|
50
51
|
},
|
|
51
52
|
source: '',
|
|
52
53
|
metaImage: {
|
|
@@ -67,6 +68,7 @@ const conceptMetaData: ConceptData['concept'] = {
|
|
|
67
68
|
'<ndlaembed data-resource="image" data-resource_id="52863" data-alt="Eksempel på hvordan borevæsken kan trenge ut i formasjonen fra borehullet og skade formasjonens permeabilitet. Illustrasjon." data-size="full" data-align="" data-url="https://api.test.ndla.no/image-api/v2/images/52863"></ndlaembed>',
|
|
68
69
|
language: 'nb',
|
|
69
70
|
},
|
|
71
|
+
conceptType: 'standard',
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
const visualElementData: ConceptData['visualElement'] = {
|
|
@@ -106,6 +108,7 @@ const visualElementData: ConceptData['visualElement'] = {
|
|
|
106
108
|
],
|
|
107
109
|
processors: [],
|
|
108
110
|
rightsholders: [],
|
|
111
|
+
processed: false,
|
|
109
112
|
},
|
|
110
113
|
tags: {
|
|
111
114
|
tags: ['skin', 'formasjonsskade', 'nærbrønn', 'permeabilitet'],
|
|
@@ -14,16 +14,17 @@ import { Root, Trigger, Content, Anchor, Close, Portal } from '@radix-ui/react-p
|
|
|
14
14
|
import { IconButtonV2 } from '@ndla/button';
|
|
15
15
|
import { Cross } from '@ndla/icons/action';
|
|
16
16
|
import { breakpoints, colors, mq, spacing } from '@ndla/core';
|
|
17
|
-
import { ConceptMetaData } from '@ndla/types-embed';
|
|
17
|
+
import { AudioMeta, ConceptMetaData } from '@ndla/types-embed';
|
|
18
18
|
import Tooltip from '@ndla/tooltip';
|
|
19
19
|
import { COPYRIGHTED } from '@ndla/licenses';
|
|
20
20
|
import { Notion as UINotion } from '../Notion';
|
|
21
21
|
import { Figure } from '../Figure';
|
|
22
22
|
import { NotionImage } from '../Notion/NotionImage';
|
|
23
|
-
import { ConceptNotionV2, ConceptNotionData } from './conceptComponents';
|
|
23
|
+
import { ConceptNotionV2, ConceptNotionData, ConceptType } from './conceptComponents';
|
|
24
24
|
import { EmbedByline } from '../LicenseByline';
|
|
25
25
|
import EmbedErrorPlaceholder from './EmbedErrorPlaceholder';
|
|
26
26
|
import { HeartButtonType } from './types';
|
|
27
|
+
import { Gloss } from '../Gloss';
|
|
27
28
|
|
|
28
29
|
const BottomBorder = styled.div`
|
|
29
30
|
margin-top: ${spacing.normal};
|
|
@@ -110,7 +111,7 @@ export const ConceptEmbed = ({ embed, fullWidth, heartButton: HeartButton }: Pro
|
|
|
110
111
|
return (
|
|
111
112
|
<BlockConcept
|
|
112
113
|
fullWidth={fullWidth}
|
|
113
|
-
title={concept.title
|
|
114
|
+
title={concept.title}
|
|
114
115
|
content={concept.content?.content}
|
|
115
116
|
metaImage={concept.metaImage}
|
|
116
117
|
copyright={concept.copyright}
|
|
@@ -118,12 +119,14 @@ export const ConceptEmbed = ({ embed, fullWidth, heartButton: HeartButton }: Pro
|
|
|
118
119
|
visualElement={visualElement}
|
|
119
120
|
heartButton={HeartButton}
|
|
120
121
|
conceptHeartButton={HeartButton && <HeartButton embed={embed} />}
|
|
122
|
+
conceptType={concept.conceptType}
|
|
123
|
+
glossData={concept.glossData}
|
|
121
124
|
/>
|
|
122
125
|
);
|
|
123
126
|
} else if (embed.embedData.type === 'inline') {
|
|
124
127
|
return (
|
|
125
128
|
<InlineConcept
|
|
126
|
-
title={concept.title
|
|
129
|
+
title={concept.title}
|
|
127
130
|
content={concept.content?.content}
|
|
128
131
|
metaImage={concept.metaImage}
|
|
129
132
|
copyright={concept.copyright}
|
|
@@ -132,12 +135,14 @@ export const ConceptEmbed = ({ embed, fullWidth, heartButton: HeartButton }: Pro
|
|
|
132
135
|
linkText={embed.embedData.linkText}
|
|
133
136
|
heartButton={HeartButton}
|
|
134
137
|
conceptHeartButton={HeartButton && <HeartButton embed={embed} />}
|
|
138
|
+
conceptType={concept.conceptType}
|
|
139
|
+
glossData={concept.glossData}
|
|
135
140
|
/>
|
|
136
141
|
);
|
|
137
142
|
} else {
|
|
138
143
|
return (
|
|
139
144
|
<ConceptNotionV2
|
|
140
|
-
title={concept.title
|
|
145
|
+
title={concept.title}
|
|
141
146
|
content={concept.content?.content}
|
|
142
147
|
metaImage={concept.metaImage}
|
|
143
148
|
copyright={concept.copyright}
|
|
@@ -145,6 +150,8 @@ export const ConceptEmbed = ({ embed, fullWidth, heartButton: HeartButton }: Pro
|
|
|
145
150
|
visualElement={visualElement}
|
|
146
151
|
heartButton={HeartButton}
|
|
147
152
|
conceptHeartButton={HeartButton && <HeartButton embed={embed} />}
|
|
153
|
+
conceptType={concept.conceptType}
|
|
154
|
+
glossData={concept.glossData}
|
|
148
155
|
/>
|
|
149
156
|
);
|
|
150
157
|
}
|
|
@@ -223,6 +230,8 @@ const InlineConcept = ({
|
|
|
223
230
|
linkText,
|
|
224
231
|
heartButton,
|
|
225
232
|
conceptHeartButton,
|
|
233
|
+
glossData,
|
|
234
|
+
conceptType,
|
|
226
235
|
}: InlineConceptProps) => {
|
|
227
236
|
const { t } = useTranslation();
|
|
228
237
|
const anchorRef = useRef<HTMLDivElement>(null);
|
|
@@ -270,6 +279,8 @@ const InlineConcept = ({
|
|
|
270
279
|
</IconButtonV2>
|
|
271
280
|
</Close>
|
|
272
281
|
}
|
|
282
|
+
conceptType={conceptType}
|
|
283
|
+
glossData={glossData}
|
|
273
284
|
/>
|
|
274
285
|
</Content>
|
|
275
286
|
</PopoverWrapper>
|
|
@@ -294,6 +305,8 @@ export const BlockConcept = ({
|
|
|
294
305
|
fullWidth,
|
|
295
306
|
heartButton,
|
|
296
307
|
conceptHeartButton,
|
|
308
|
+
glossData,
|
|
309
|
+
conceptType,
|
|
297
310
|
}: ConceptProps) => {
|
|
298
311
|
const { t } = useTranslation();
|
|
299
312
|
const anchorRef = useRef<HTMLDivElement>(null);
|
|
@@ -318,71 +331,85 @@ export const BlockConcept = ({
|
|
|
318
331
|
<Root modal={isMobile} onOpenChange={onOpenChange}>
|
|
319
332
|
<StyledAnchor ref={anchorRef} />
|
|
320
333
|
<Figure resizeIframe type={fullWidth ? 'full' : 'full-column'}>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
visualElement
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
<
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
<
|
|
360
|
-
<
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
<
|
|
372
|
-
<
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
334
|
+
{conceptType === 'concept' ? (
|
|
335
|
+
<UINotion
|
|
336
|
+
id=""
|
|
337
|
+
title={title.title}
|
|
338
|
+
text={content}
|
|
339
|
+
visualElement={
|
|
340
|
+
visualElement?.status === 'success' && (
|
|
341
|
+
<>
|
|
342
|
+
<ImageWrapper>
|
|
343
|
+
<Tooltip tooltip={t(`searchPage.resultType.${conceptType}`)}>
|
|
344
|
+
<Trigger asChild>
|
|
345
|
+
<StyledButton type="button" aria-label={t('concept.showDescription', { title: title })}>
|
|
346
|
+
{visualElement.resource === 'image' ? (
|
|
347
|
+
<NotionImage
|
|
348
|
+
type={visualElementType}
|
|
349
|
+
id={''}
|
|
350
|
+
src={visualElement.data.image.imageUrl}
|
|
351
|
+
alt={visualElement.data.alttext.alttext}
|
|
352
|
+
/>
|
|
353
|
+
) : metaImage ? (
|
|
354
|
+
<NotionImage
|
|
355
|
+
type={visualElementType}
|
|
356
|
+
id={''}
|
|
357
|
+
src={metaImage?.url ?? ''}
|
|
358
|
+
alt={metaImage?.alt ?? ''}
|
|
359
|
+
/>
|
|
360
|
+
) : undefined}
|
|
361
|
+
</StyledButton>
|
|
362
|
+
</Trigger>
|
|
363
|
+
</Tooltip>
|
|
364
|
+
</ImageWrapper>
|
|
365
|
+
<Portal
|
|
366
|
+
container={
|
|
367
|
+
typeof document !== 'undefined'
|
|
368
|
+
? (document.querySelector('.c-article') as HTMLElement | null) || undefined
|
|
369
|
+
: undefined
|
|
370
|
+
}
|
|
371
|
+
>
|
|
372
|
+
<PopoverWrapper top={modalPos}>
|
|
373
|
+
<Content avoidCollisions={false} asChild side="bottom">
|
|
374
|
+
<ConceptNotionV2
|
|
375
|
+
title={title}
|
|
376
|
+
content={content}
|
|
377
|
+
copyright={copyright}
|
|
378
|
+
source={source}
|
|
379
|
+
visualElement={visualElement}
|
|
380
|
+
heartButton={heartButton}
|
|
381
|
+
conceptHeartButton={conceptHeartButton}
|
|
382
|
+
inPopover
|
|
383
|
+
closeButton={
|
|
384
|
+
<Close asChild>
|
|
385
|
+
<IconButtonV2 aria-label={t('close')} variant="ghost">
|
|
386
|
+
<Cross />
|
|
387
|
+
</IconButtonV2>
|
|
388
|
+
</Close>
|
|
389
|
+
}
|
|
390
|
+
conceptType={conceptType}
|
|
391
|
+
glossData={glossData}
|
|
392
|
+
/>
|
|
393
|
+
</Content>
|
|
394
|
+
</PopoverWrapper>
|
|
395
|
+
</Portal>
|
|
396
|
+
</>
|
|
397
|
+
)
|
|
398
|
+
}
|
|
399
|
+
/>
|
|
400
|
+
) : (
|
|
401
|
+
<Gloss
|
|
402
|
+
glossData={glossData!}
|
|
403
|
+
title={title}
|
|
404
|
+
audio={
|
|
405
|
+
visualElement?.status === 'success' && visualElement.resource === 'audio'
|
|
406
|
+
? { src: visualElement.data.audioFile.url, title: visualElement.data.title.title }
|
|
407
|
+
: undefined
|
|
408
|
+
}
|
|
409
|
+
/>
|
|
410
|
+
)}
|
|
384
411
|
{copyright ? (
|
|
385
|
-
<EmbedByline copyright={copyright} bottomRounded topRounded type=
|
|
412
|
+
<EmbedByline copyright={copyright} bottomRounded topRounded type={conceptType as ConceptType}>
|
|
386
413
|
{copyright.license?.license.toLowerCase() !== COPYRIGHTED && conceptHeartButton}
|
|
387
414
|
</EmbedByline>
|
|
388
415
|
) : (
|
|
@@ -45,12 +45,13 @@ const ConceptListEmbed = ({ embed }: Props) => {
|
|
|
45
45
|
{data.concepts.map(({ concept, visualElement }) => (
|
|
46
46
|
<li key={concept.id}>
|
|
47
47
|
<BlockConcept
|
|
48
|
-
title={concept.title
|
|
48
|
+
title={concept.title}
|
|
49
49
|
content={concept.content.content}
|
|
50
50
|
metaImage={concept.metaImage}
|
|
51
51
|
copyright={concept.copyright}
|
|
52
52
|
source={concept.source}
|
|
53
53
|
visualElement={visualElement}
|
|
54
|
+
conceptType={concept.conceptType}
|
|
54
55
|
/>
|
|
55
56
|
</li>
|
|
56
57
|
))}
|