@ndla/ui 55.0.12-alpha.0 → 55.0.13-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.
Files changed (192) hide show
  1. package/dist/all-aout.js +0 -0
  2. package/dist/all.css +1 -0
  3. package/dist/panda.buildinfo.json +170 -0
  4. package/dist/styles.css +686 -0
  5. package/es/Article/Article.js +3 -4
  6. package/es/Article/ArticleByline.js +9 -9
  7. package/es/Article/ArticleFootNotes.js +4 -4
  8. package/es/AudioPlayer/AudioPlayer.js +142 -163
  9. package/es/AudioPlayer/Controls.js +187 -203
  10. package/es/AudioPlayer/SpeechControl.js +13 -11
  11. package/es/BlogPost/BlogPost.js +85 -23
  12. package/es/CampaignBlock/CampaignBlock.js +3 -4
  13. package/es/CodeBlock/CodeBlock.js +88 -96
  14. package/es/ContactBlock/ContactBlock.js +54 -40
  15. package/es/ContentLoader/index.js +7 -7
  16. package/es/CopyParagraphButton/CopyParagraphButton.js +4 -4
  17. package/es/Embed/AudioEmbed.js +5 -9
  18. package/es/Embed/BrightcoveEmbed.js +12 -15
  19. package/es/Embed/CodeEmbed.js +58 -10
  20. package/es/Embed/ConceptEmbed.js +15 -20
  21. package/es/Embed/ContentLinkEmbed.js +1 -1
  22. package/es/Embed/EmbedErrorPlaceholder.js +32 -17
  23. package/es/Embed/ExternalEmbed.js +7 -10
  24. package/es/Embed/FootnoteEmbed.js +3 -3
  25. package/es/Embed/H5pEmbed.js +1 -2
  26. package/es/Embed/IframeEmbed.js +8 -9
  27. package/es/Embed/ImageEmbed.js +167 -122
  28. package/es/Embed/RelatedContentEmbed.js +8 -10
  29. package/es/Embed/UuDisclaimerEmbed.js +2 -2
  30. package/es/Embed/conceptComponents.js +9 -9
  31. package/es/ErrorMessage/ErrorMessage.js +1 -1
  32. package/es/FactBox/FactBox.js +2 -2
  33. package/es/FileList/File.js +1 -1
  34. package/es/FileList/Format.js +3 -3
  35. package/es/FrontpageArticle/FrontpageArticle.js +1 -1
  36. package/es/Gloss/Gloss.js +9 -11
  37. package/es/Gloss/GlossExample.js +3 -4
  38. package/es/Grid/Grid.js +1 -1
  39. package/es/Image/Image.js +7 -8
  40. package/es/Image/ImageLink.js +1 -1
  41. package/es/KeyFigure/KeyFigure.js +2 -2
  42. package/es/LanguageSelector/LanguageSelector.js +2 -2
  43. package/es/LetterFilter/LetterFilter.js +1 -1
  44. package/es/LicenseByline/EmbedByline.js +5 -6
  45. package/es/LicenseByline/LicenseDescription.js +1 -1
  46. package/es/LicenseByline/LicenseLink.js +1 -2
  47. package/es/Messages/MessageBox.js +1 -1
  48. package/es/Notion/Notion.js +2 -2
  49. package/es/Notion/NotionImage.js +12 -57
  50. package/es/RelatedArticleList/RelatedArticleList.js +3 -3
  51. package/es/ResourceBox/ResourceBox.js +12 -17
  52. package/es/Search/ActiveFilters.js +1 -1
  53. package/es/Search/ContentTypeResult.js +9 -6
  54. package/es/Search/ContentTypeResultStyles.js +1 -1
  55. package/es/Search/IsPathToHighlight.js +1 -1
  56. package/es/Search/SearchField.js +6 -8
  57. package/es/Search/SearchResult.js +14 -19
  58. package/es/Search/SearchResultSleeve.js +14 -16
  59. package/es/SnackBar/SnackbarProvider.js +8 -11
  60. package/es/TagSelector/TagSelector.js +1 -1
  61. package/es/TagSelector/ariaMessages.js +6 -6
  62. package/es/TreeStructure/AddFolderButton.js +4 -6
  63. package/es/TreeStructure/ComboboxButton.js +4 -7
  64. package/es/TreeStructure/FolderItem.js +12 -15
  65. package/es/TreeStructure/FolderItems.js +3 -3
  66. package/es/TreeStructure/TreeStructure.js +9 -12
  67. package/es/TreeStructure/helperFunctions.js +1 -1
  68. package/es/ZendeskButton/ZendeskButton.js +55 -0
  69. package/es/i18n/formatNestedMessages.js +1 -1
  70. package/es/index.js +2 -1
  71. package/es/locale/messages-en.js +9 -8
  72. package/es/locale/messages-nb.js +9 -8
  73. package/es/locale/messages-nn.js +9 -8
  74. package/es/locale/messages-se.js +9 -8
  75. package/es/locale/messages-sma.js +9 -8
  76. package/es/styles.css +686 -0
  77. package/es/utils/relativeUrl.js +3 -3
  78. package/lib/Article/Article.js +3 -4
  79. package/lib/Article/ArticleByline.js +9 -9
  80. package/lib/Article/ArticleFootNotes.js +4 -4
  81. package/lib/AudioPlayer/AudioPlayer.d.ts +1 -2
  82. package/lib/AudioPlayer/AudioPlayer.js +142 -162
  83. package/lib/AudioPlayer/Controls.js +190 -205
  84. package/lib/AudioPlayer/SpeechControl.js +13 -11
  85. package/lib/BlogPost/BlogPost.d.ts +2 -2
  86. package/lib/BlogPost/BlogPost.js +85 -24
  87. package/lib/CampaignBlock/CampaignBlock.js +3 -4
  88. package/lib/CodeBlock/CodeBlock.d.ts +5 -8
  89. package/lib/CodeBlock/CodeBlock.js +88 -96
  90. package/lib/ContactBlock/ContactBlock.js +55 -43
  91. package/lib/ContentLoader/index.js +7 -7
  92. package/lib/CopyParagraphButton/CopyParagraphButton.js +4 -4
  93. package/lib/Embed/AudioEmbed.js +5 -9
  94. package/lib/Embed/BrightcoveEmbed.js +12 -15
  95. package/lib/Embed/CodeEmbed.js +56 -8
  96. package/lib/Embed/ConceptEmbed.js +15 -20
  97. package/lib/Embed/ContentLinkEmbed.js +1 -1
  98. package/lib/Embed/EmbedErrorPlaceholder.d.ts +4 -3
  99. package/lib/Embed/EmbedErrorPlaceholder.js +32 -18
  100. package/lib/Embed/ExternalEmbed.js +7 -10
  101. package/lib/Embed/FootnoteEmbed.js +3 -3
  102. package/lib/Embed/H5pEmbed.js +1 -2
  103. package/lib/Embed/IframeEmbed.js +8 -9
  104. package/lib/Embed/ImageEmbed.d.ts +1 -2
  105. package/lib/Embed/ImageEmbed.js +167 -123
  106. package/lib/Embed/RelatedContentEmbed.js +8 -10
  107. package/lib/Embed/UuDisclaimerEmbed.js +2 -2
  108. package/lib/Embed/conceptComponents.js +9 -9
  109. package/lib/ErrorMessage/ErrorMessage.js +1 -1
  110. package/lib/FactBox/FactBox.js +2 -2
  111. package/lib/FileList/File.js +1 -1
  112. package/lib/FileList/Format.js +3 -3
  113. package/lib/FrontpageArticle/FrontpageArticle.js +1 -1
  114. package/lib/Gloss/Gloss.js +9 -11
  115. package/lib/Gloss/GlossExample.js +3 -4
  116. package/lib/Grid/Grid.js +1 -1
  117. package/lib/Image/Image.js +7 -8
  118. package/lib/Image/ImageLink.js +1 -1
  119. package/lib/KeyFigure/KeyFigure.js +2 -2
  120. package/lib/LanguageSelector/LanguageSelector.js +2 -2
  121. package/lib/LetterFilter/LetterFilter.js +1 -1
  122. package/lib/LicenseByline/EmbedByline.js +5 -6
  123. package/lib/LicenseByline/LicenseDescription.js +1 -1
  124. package/lib/LicenseByline/LicenseLink.js +1 -2
  125. package/lib/Messages/MessageBox.js +1 -1
  126. package/lib/Notion/Notion.js +2 -2
  127. package/lib/Notion/NotionImage.d.ts +1 -11
  128. package/lib/Notion/NotionImage.js +12 -59
  129. package/lib/RelatedArticleList/RelatedArticleList.js +3 -3
  130. package/lib/ResourceBox/ResourceBox.js +13 -18
  131. package/lib/Search/ActiveFilters.js +1 -1
  132. package/lib/Search/ContentTypeResult.js +9 -6
  133. package/lib/Search/ContentTypeResultStyles.js +1 -1
  134. package/lib/Search/IsPathToHighlight.js +1 -1
  135. package/lib/Search/SearchField.js +6 -8
  136. package/lib/Search/SearchResult.js +14 -19
  137. package/lib/Search/SearchResultSleeve.js +14 -16
  138. package/lib/SnackBar/SnackbarProvider.js +8 -11
  139. package/lib/TagSelector/TagSelector.js +1 -1
  140. package/lib/TagSelector/ariaMessages.js +6 -6
  141. package/lib/TreeStructure/AddFolderButton.js +4 -6
  142. package/lib/TreeStructure/ComboboxButton.js +4 -7
  143. package/lib/TreeStructure/FolderItem.js +12 -15
  144. package/lib/TreeStructure/FolderItems.js +3 -3
  145. package/lib/TreeStructure/TreeStructure.js +9 -12
  146. package/lib/TreeStructure/helperFunctions.js +1 -1
  147. package/lib/ZendeskButton/ZendeskButton.d.ts +19 -0
  148. package/lib/ZendeskButton/ZendeskButton.js +61 -0
  149. package/lib/i18n/formatNestedMessages.js +1 -1
  150. package/lib/index.d.ts +2 -0
  151. package/lib/index.js +7 -0
  152. package/lib/locale/messages-en.d.ts +1 -0
  153. package/lib/locale/messages-en.js +9 -8
  154. package/lib/locale/messages-nb.d.ts +1 -0
  155. package/lib/locale/messages-nb.js +9 -8
  156. package/lib/locale/messages-nn.d.ts +1 -0
  157. package/lib/locale/messages-nn.js +9 -8
  158. package/lib/locale/messages-se.d.ts +1 -0
  159. package/lib/locale/messages-se.js +9 -8
  160. package/lib/locale/messages-sma.d.ts +1 -0
  161. package/lib/locale/messages-sma.js +9 -8
  162. package/lib/styles.css +686 -0
  163. package/lib/types.d.ts +1 -0
  164. package/lib/utils/relativeUrl.js +3 -3
  165. package/package.json +17 -12
  166. package/src/AudioPlayer/AudioPlayer.tsx +139 -176
  167. package/src/AudioPlayer/Controls.tsx +210 -250
  168. package/src/AudioPlayer/SpeechControl.tsx +9 -7
  169. package/src/BlogPost/BlogPost.tsx +82 -58
  170. package/src/CodeBlock/CodeBlock.stories.tsx +0 -43
  171. package/src/CodeBlock/CodeBlock.tsx +91 -202
  172. package/src/ContactBlock/ContactBlock.tsx +10 -2
  173. package/src/Embed/CodeEmbed.stories.tsx +95 -0
  174. package/src/Embed/CodeEmbed.tsx +62 -7
  175. package/src/Embed/ConceptEmbed.tsx +1 -9
  176. package/src/Embed/EmbedErrorPlaceholder.tsx +31 -28
  177. package/src/Embed/ImageEmbed.stories.tsx +53 -11
  178. package/src/Embed/ImageEmbed.tsx +162 -166
  179. package/src/Notion/NotionImage.tsx +4 -54
  180. package/src/ResourceBox/ResourceBox.tsx +3 -15
  181. package/src/Search/ContentTypeResult.tsx +9 -3
  182. package/src/Search/SearchResultSleeve.tsx +5 -2
  183. package/src/ZendeskButton/ZendeskButton.tsx +58 -0
  184. package/src/index.ts +4 -0
  185. package/src/locale/messages-en.ts +1 -0
  186. package/src/locale/messages-nb.ts +1 -0
  187. package/src/locale/messages-nn.ts +1 -0
  188. package/src/locale/messages-se.ts +1 -0
  189. package/src/locale/messages-sma.ts +1 -0
  190. package/src/types.ts +2 -0
  191. package/src/Image/__tests__/Image-test.tsx +0 -66
  192. package/src/Image/__tests__/__snapshots__/Image-test.tsx.snap +0 -194
@@ -26,7 +26,7 @@ const ContentLinkEmbed = _ref => {
26
26
  if (embed.status === "error") {
27
27
  return _jsxs(StyledSpan, {
28
28
  children: [_jsx("span", {
29
- children: "".concat(t("embed.linkError"), ": ")
29
+ children: `${t("embed.linkError")}: `
30
30
  }), children]
31
31
  });
32
32
  }
@@ -1,4 +1,3 @@
1
- import _styled from "@emotion/styled/base";
2
1
  /**
3
2
  * Copyright (c) 2023-present, NDLA.
4
3
  *
@@ -7,35 +6,51 @@ import _styled from "@emotion/styled/base";
7
6
  *
8
7
  */
9
8
 
10
- import { colors, spacing } from "@ndla/core";
11
9
  import { WarningOutline } from "@ndla/icons/common";
12
- import { Figure } from "../Figure";
10
+ import { Figure } from "@ndla/primitives";
11
+ import { styled } from "@ndla/styled-system/jsx";
13
12
  import { EmbedByline } from "../LicenseByline";
14
13
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
15
- const ErrorPlaceholder = /*#__PURE__*/_styled("div", {
16
- target: "etnx1j51",
17
- label: "ErrorPlaceholder"
18
- })("display:flex;align-items:center;justify-content:center;background-color:", colors.brand.greyLighter, ";height:330px;svg{fill:", colors.text.light, ";height:90%;width:90%;}&[data-embed-type=\"audio\"]{height:150px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkVtYmVkRXJyb3JQbGFjZWhvbGRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0JtQyIsImZpbGUiOiJFbWJlZEVycm9yUGxhY2Vob2xkZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGM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GVyfTtcbiAgaGVpZ2h0OiAzMzBweDtcblxuICBzdmcge1xuICAgIGZpbGw6ICR7Y29sb3JzLnRleHQubGlnaHR9O1xuICAgIGhlaWdodDogOTAlO1xuICAgIHdpZHRoOiA5MCU7XG4gIH1cbiAgJltkYXRhLWVtYmVkLXR5cGU9XCJhdWRpb1wiXSB7XG4gICAgaGVpZ2h0OiAxNTBweDtcbiAgfVxuYDtcblxuY29uc3QgU3R5bGVkRmlndXJlID0gc3R5bGVkKEZpZ3VyZSlgXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gIGdhcDogJHtzcGFjaW5nLnhzbWFsbH07XG5gO1xuXG5jb25zdCBFbWJlZEVycm9yUGxhY2Vob2xkZXIgPSAoeyB0eXBlLCBjaGlsZHJlbiwgZmlndXJlVHlwZSB9OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxTdHlsZWRGaWd1cmUgdHlwZT17ZmlndXJlVHlwZX0+XG4gICAgICB7Y2hpbGRyZW4gPz8gKFxuICAgICAgICA8RXJyb3JQbGFjZWhvbGRlciBkYXRhLWVtYmVkLXR5cGU9e3R5cGV9PlxuICAgICAgICAgIDxXYXJuaW5nT3V0bGluZSAvPlxuICAgICAgICA8L0Vycm9yUGxhY2Vob2xkZXI+XG4gICAgICApfVxuICAgICAgPEVtYmVkQnlsaW5lIGVycm9yIHR5cGU9e3R5cGV9IHRvcFJvdW5kZWQgYm90dG9tUm91bmRlZCAvPlxuICAgIDwvU3R5bGVkRmlndXJlPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRW1iZWRFcnJvclBsYWNlaG9sZGVyO1xuIl19 */"));
19
- const StyledFigure = /*#__PURE__*/_styled(Figure, {
20
- target: "etnx1j50",
21
- label: "StyledFigure"
22
- })("display:flex;flex-direction:column;gap:", spacing.xsmall, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;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cblxuZXhwb3J0IGRlZmF1bHQgRW1iZWRFcnJvclBsYWNlaG9sZGVyO1xuIl19 */"));
14
+ const ErrorPlaceholder = styled("div", {
15
+ base: {
16
+ display: "flex",
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ backgroundColor: "surface.disabled",
20
+ height: "surface.xsmall",
21
+ "& svg": {
22
+ fill: "text.subtle",
23
+ height: "90%",
24
+ width: "90%"
25
+ },
26
+ "&[data-embed-type='audio']": {
27
+ height: "surface.3xsmall"
28
+ }
29
+ }
30
+ });
31
+ const StyledFigure = styled(Figure, {
32
+ base: {
33
+ "& > *:not(:first-child)": {
34
+ marginBlockStart: "3xsmall"
35
+ }
36
+ }
37
+ });
23
38
  const EmbedErrorPlaceholder = _ref => {
24
39
  let {
25
40
  type,
26
41
  children,
27
- figureType
42
+ figureType,
43
+ float
28
44
  } = _ref;
29
45
  return _jsxs(StyledFigure, {
30
- type: figureType,
31
- children: [children !== null && children !== void 0 ? children : _jsx(ErrorPlaceholder, {
46
+ size: figureType,
47
+ float: float,
48
+ children: [children ?? _jsx(ErrorPlaceholder, {
32
49
  "data-embed-type": type,
33
50
  children: _jsx(WarningOutline, {})
34
51
  }), _jsx(EmbedByline, {
35
52
  error: true,
36
- type: type,
37
- topRounded: true,
38
- bottomRounded: true
53
+ type: type
39
54
  })]
40
55
  });
41
56
  };
@@ -27,7 +27,6 @@ const StyledFigure = /*#__PURE__*/_styled(Figure, {
27
27
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
28
28
  });
29
29
  const ExternalEmbed = _ref => {
30
- var _data$oembed$html;
31
30
  let {
32
31
  embed,
33
32
  isConcept
@@ -37,11 +36,10 @@ const ExternalEmbed = _ref => {
37
36
  } = useTranslation();
38
37
  const figRef = useRef(null);
39
38
  useEffect(() => {
40
- var _figRef$current;
41
- const iframe = (_figRef$current = figRef.current) === null || _figRef$current === void 0 ? void 0 : _figRef$current.querySelector("iframe");
39
+ const iframe = figRef.current?.querySelector("iframe");
42
40
  if (iframe) {
43
41
  const [width, height] = [Number.parseInt(iframe.width), Number.parseInt(iframe.height)];
44
- iframe.style.aspectRatio = "".concat(width ? width : 16, "/").concat(height ? height : 9);
42
+ iframe.style.aspectRatio = `${width ? width : 16}/${height ? height : 9}`;
45
43
  iframe.width = "";
46
44
  iframe.height = "";
47
45
  }
@@ -56,18 +54,17 @@ const ExternalEmbed = _ref => {
56
54
  data
57
55
  } = embed;
58
56
  if (embedData.type === "fullscreen") {
59
- var _data$iframeImage$ima, _data$iframeImage, _data$iframeImage$alt, _data$iframeImage2, _embedData$title, _embedData$caption;
60
57
  const image = {
61
- src: (_data$iframeImage$ima = (_data$iframeImage = data.iframeImage) === null || _data$iframeImage === void 0 ? void 0 : _data$iframeImage.image.imageUrl) !== null && _data$iframeImage$ima !== void 0 ? _data$iframeImage$ima : "",
62
- alt: embedData.alt !== undefined ? embedData.alt : (_data$iframeImage$alt = (_data$iframeImage2 = data.iframeImage) === null || _data$iframeImage2 === void 0 || (_data$iframeImage2 = _data$iframeImage2.alttext) === null || _data$iframeImage2 === void 0 ? void 0 : _data$iframeImage2.alttext) !== null && _data$iframeImage$alt !== void 0 ? _data$iframeImage$alt : ""
58
+ src: data.iframeImage?.image.imageUrl ?? "",
59
+ alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? ""
63
60
  };
64
61
  return _jsx(Figure, {
65
62
  type: "full",
66
63
  children: _jsx(ResourceBox, {
67
64
  image: image,
68
- title: (_embedData$title = embedData.title) !== null && _embedData$title !== void 0 ? _embedData$title : "",
65
+ title: embedData.title ?? "",
69
66
  url: embedData.url,
70
- caption: (_embedData$caption = embedData.caption) !== null && _embedData$caption !== void 0 ? _embedData$caption : "",
67
+ caption: embedData.caption ?? "",
71
68
  buttonText: t("license.other.itemImage.ariaLabel")
72
69
  })
73
70
  });
@@ -76,7 +73,7 @@ const ExternalEmbed = _ref => {
76
73
  ref: figRef,
77
74
  type: isConcept ? "full-column" : undefined,
78
75
  dangerouslySetInnerHTML: {
79
- __html: (_data$oembed$html = data.oembed.html) !== null && _data$oembed$html !== void 0 ? _data$oembed$html : ""
76
+ __html: data.oembed.html ?? ""
80
77
  }
81
78
  });
82
79
  };
@@ -27,12 +27,12 @@ const FootnoteEmbed = _ref => {
27
27
  });
28
28
  }
29
29
  return _jsx(FootnoteRef, {
30
- id: "ref".concat(embed.data.entryNum),
30
+ id: `ref${embed.data.entryNum}`,
31
31
  children: _jsx("sup", {
32
32
  children: _jsx("a", {
33
- href: "#note".concat(embed.data.entryNum),
33
+ href: `#note${embed.data.entryNum}`,
34
34
  target: "_self",
35
- children: "[".concat(embed.data.entryNum, "]")
35
+ children: `[${embed.data.entryNum}]`
36
36
  })
37
37
  })
38
38
  });
@@ -34,11 +34,10 @@ const H5pEmbed = _ref => {
34
34
  });
35
35
  }
36
36
  if (embed.data.oembed) {
37
- var _embed$data$oembed$ht;
38
37
  return _jsx(Figure, {
39
38
  type: isConcept ? "full-column" : undefined,
40
39
  dangerouslySetInnerHTML: {
41
- __html: (_embed$data$oembed$ht = embed.data.oembed.html) !== null && _embed$data$oembed$ht !== void 0 ? _embed$data$oembed$ht : ""
40
+ __html: embed.data.oembed.html ?? ""
42
41
  }
43
42
  });
44
43
  }
@@ -25,7 +25,7 @@ const IframeEmbed = _ref => {
25
25
  const iframe = iframeRef.current;
26
26
  if (iframe) {
27
27
  const [width, height] = [Number.parseInt(iframe.width), Number.parseInt(iframe.height)];
28
- iframe.style.aspectRatio = "".concat(width ? width : 16, "/").concat(height ? height : 9);
28
+ iframe.style.aspectRatio = `${width ? width : 16}/${height ? height : 9}`;
29
29
  iframe.width = "";
30
30
  iframe.height = "";
31
31
  }
@@ -40,20 +40,19 @@ const IframeEmbed = _ref => {
40
40
  data
41
41
  } = embed;
42
42
  if (embedData.type === "fullscreen") {
43
- var _iframeImage$image$im, _embedData$title, _embedData$caption;
44
43
  const iframeImage = embed.status === "success" ? data.iframeImage : undefined;
45
- const alt = embedData.alt !== undefined ? embedData.alt : iframeImage === null || iframeImage === void 0 ? void 0 : iframeImage.alttext.alttext;
44
+ const alt = embedData.alt !== undefined ? embedData.alt : iframeImage?.alttext.alttext;
46
45
  const image = {
47
- src: (_iframeImage$image$im = iframeImage === null || iframeImage === void 0 ? void 0 : iframeImage.image.imageUrl) !== null && _iframeImage$image$im !== void 0 ? _iframeImage$image$im : "",
48
- alt: alt !== null && alt !== void 0 ? alt : ""
46
+ src: iframeImage?.image.imageUrl ?? "",
47
+ alt: alt ?? ""
49
48
  };
50
49
  return _jsx(Figure, {
51
50
  type: "full",
52
51
  children: _jsx(ResourceBox, {
53
52
  image: image,
54
- title: (_embedData$title = embedData.title) !== null && _embedData$title !== void 0 ? _embedData$title : "",
53
+ title: embedData.title ?? "",
55
54
  url: embedData.url,
56
- caption: (_embedData$caption = embedData.caption) !== null && _embedData$caption !== void 0 ? _embedData$caption : "",
55
+ caption: embedData.caption ?? "",
57
56
  buttonText: t("license.other.itemImage.ariaLabel")
58
57
  })
59
58
  });
@@ -64,8 +63,8 @@ const IframeEmbed = _ref => {
64
63
  title,
65
64
  url
66
65
  } = embedData;
67
- const strippedWidth = typeof width === "number" ? width : width === null || width === void 0 ? void 0 : width.replace(/\s*px/, "");
68
- const strippedHeight = typeof height === "number" ? height : height === null || height === void 0 ? void 0 : height.replace(/\s*px/, "");
66
+ const strippedWidth = typeof width === "number" ? width : width?.replace(/\s*px/, "");
67
+ const strippedHeight = typeof height === "number" ? height : height?.replace(/\s*px/, "");
69
68
  const urlOrTitle = title || url;
70
69
  return _jsx(Figure, {
71
70
  type: isConcept ? "full-column" : undefined,