@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
@@ -33,7 +33,7 @@ const ContentLinkEmbed = _ref => {
33
33
  if (embed.status === "error") {
34
34
  return (0, _jsxRuntime.jsxs)(StyledSpan, {
35
35
  children: [(0, _jsxRuntime.jsx)("span", {
36
- children: "".concat(t("embed.linkError"), ": ")
36
+ children: `${t("embed.linkError")}: `
37
37
  }), children]
38
38
  });
39
39
  }
@@ -6,12 +6,13 @@
6
6
  *
7
7
  */
8
8
  import { ReactNode } from "react";
9
- import { FigureType } from "../Figure";
9
+ import { type FigureFloat, type FigureSize } from "@ndla/primitives";
10
10
  import { EmbedBylineErrorProps } from "../LicenseByline/EmbedByline";
11
11
  interface Props {
12
12
  type: EmbedBylineErrorProps["type"];
13
- figureType?: FigureType;
13
+ figureType?: FigureSize;
14
+ float?: FigureFloat;
14
15
  children?: ReactNode;
15
16
  }
16
- declare const EmbedErrorPlaceholder: ({ type, children, figureType }: Props) => import("react/jsx-runtime").JSX.Element;
17
+ declare const EmbedErrorPlaceholder: ({ type, children, figureType, float }: Props) => import("react/jsx-runtime").JSX.Element;
17
18
  export default EmbedErrorPlaceholder;
@@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
- var _core = require("@ndla/core");
9
7
  var _common = require("@ndla/icons/common");
10
- var _Figure = require("../Figure");
8
+ var _primitives = require("@ndla/primitives");
9
+ var _jsx2 = require("@ndla/styled-system/jsx");
11
10
  var _LicenseByline = require("../LicenseByline");
12
11
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
12
  /**
15
13
  * Copyright (c) 2023-present, NDLA.
16
14
  *
@@ -19,30 +17,46 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
19
17
  *
20
18
  */
21
19
 
22
- const ErrorPlaceholder = /*#__PURE__*/(0, _base.default)("div", {
23
- target: "etnx1j51",
24
- label: "ErrorPlaceholder"
25
- })("display:flex;align-items:center;justify-content:center;background-color:", _core.colors.brand.greyLighter, ";height:330px;svg{fill:", _core.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkVtYmVkRXJyb3JQbGFjZWhvbGRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0JtQyIsImZpbGUiOiJFbWJlZEVycm9yUGxhY2Vob2xkZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjMtcHJlc2VudCwgTkRMQS5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBHUEx2MyBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLlxuICpcbiAqL1xuXG5pbXBvcnQgeyBSZWFjdE5vZGUgfSBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgY29sb3JzLCBzcGFjaW5nIH0gZnJvbSBcIkBuZGxhL2NvcmVcIjtcbmltcG9ydCB7IFdhcm5pbmdPdXRsaW5lIH0gZnJvbSBcIkBuZGxhL2ljb25zL2NvbW1vblwiO1xuaW1wb3J0IHsgRmlndXJlLCBGaWd1cmVUeXBlIH0gZnJvbSBcIi4uL0ZpZ3VyZVw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VHlwZX0+XG4gICAgICB7Y2hpbGRyZW4gPz8gKFxuICAgICAgICA8RXJyb3JQbGFjZWhvbGRlciBkYXRhLWVtYmVkLXR5cGU9e3R5cGV9PlxuICAgICAgICAgIDxXYXJuaW5nT3V0bGluZSAvPlxuICAgICAgICA8L0Vycm9yUGxhY2Vob2xkZXI+XG4gICAgICApfVxuICAgICAgPEVtYmVkQnlsaW5lIGVycm9yIHR5cGU9e3R5cGV9IHRvcFJvdW5kZWQgYm90dG9tUm91bmRlZCAvPlxuICAgIDwvU3R5bGVkRmlndXJlPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRW1iZWRFcnJvclBsYWNlaG9sZGVyO1xuIl19 */"));
26
- const StyledFigure = /*#__PURE__*/(0, _base.default)(_Figure.Figure, {
27
- target: "etnx1j50",
28
- label: "StyledFigure"
29
- })("display:flex;flex-direction:column;gap:", _core.spacing.xsmall, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkVtYmVkRXJyb3JQbGFjZWhvbGRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUNtQyIsImZpbGUiOiJFbWJlZEVycm9yUGxhY2Vob2xkZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjMtcHJlc2VudCwgTkRMQS5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBHUEx2MyBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLlxuICpcbiAqL1xuXG5pbXBvcnQgeyBSZWFjdE5vZGUgfSBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW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tZGlyZWN0aW9uOiBjb2x1bW47XG4gIGdhcDogJHtzcGFjaW5nLnhzbWFsbH07XG5gO1xuXG5jb25zdCBFbWJlZEVycm9yUGxhY2Vob2xkZXIgPSAoeyB0eXBlLCBjaGlsZHJlbiwgZmlndXJlVHlwZSB9OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxTdHlsZWRGaWd1cmUgdHlwZT17ZmlndXJlVHlwZX0+XG4gICAgICB7Y2hpbGRyZW4gPz8gKFxuICAgICAgICA8RXJyb3JQbGFjZWhvbGRlciBkYXRhLWVtYmVkLXR5cGU9e3R5cGV9PlxuICAgICAgICAgIDxXYXJuaW5nT3V0bGluZSAvPlxuICAgICAgICA8L0Vycm9yUGxhY2Vob2xkZXI+XG4gICAgICApfVxuICAgICAgPEVtYmVkQnlsaW5lIGVycm9yIHR5cGU9e3R5cGV9IHRvcFJvdW5kZWQgYm90dG9tUm91bmRlZCAvPlxuICAgIDwvU3R5bGVkRmlndXJlPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRW1iZWRFcnJvclBsYWNlaG9sZGVyO1xuIl19 */"));
20
+ const ErrorPlaceholder = (0, _jsx2.styled)("div", {
21
+ base: {
22
+ display: "flex",
23
+ alignItems: "center",
24
+ justifyContent: "center",
25
+ backgroundColor: "surface.disabled",
26
+ height: "surface.xsmall",
27
+ "& svg": {
28
+ fill: "text.subtle",
29
+ height: "90%",
30
+ width: "90%"
31
+ },
32
+ "&[data-embed-type='audio']": {
33
+ height: "surface.3xsmall"
34
+ }
35
+ }
36
+ });
37
+ const StyledFigure = (0, _jsx2.styled)(_primitives.Figure, {
38
+ base: {
39
+ "& > *:not(:first-child)": {
40
+ marginBlockStart: "3xsmall"
41
+ }
42
+ }
43
+ });
30
44
  const EmbedErrorPlaceholder = _ref => {
31
45
  let {
32
46
  type,
33
47
  children,
34
- figureType
48
+ figureType,
49
+ float
35
50
  } = _ref;
36
51
  return (0, _jsxRuntime.jsxs)(StyledFigure, {
37
- type: figureType,
38
- children: [children !== null && children !== void 0 ? children : (0, _jsxRuntime.jsx)(ErrorPlaceholder, {
52
+ size: figureType,
53
+ float: float,
54
+ children: [children ?? (0, _jsxRuntime.jsx)(ErrorPlaceholder, {
39
55
  "data-embed-type": type,
40
56
  children: (0, _jsxRuntime.jsx)(_common.WarningOutline, {})
41
57
  }), (0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
42
58
  error: true,
43
- type: type,
44
- topRounded: true,
45
- bottomRounded: true
59
+ type: type
46
60
  })]
47
61
  });
48
62
  };
@@ -32,7 +32,6 @@ const StyledFigure = /*#__PURE__*/(0, _base.default)(_Figure.Figure, {
32
32
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
33
  });
34
34
  const ExternalEmbed = _ref => {
35
- var _data$oembed$html;
36
35
  let {
37
36
  embed,
38
37
  isConcept
@@ -42,11 +41,10 @@ const ExternalEmbed = _ref => {
42
41
  } = (0, _reactI18next.useTranslation)();
43
42
  const figRef = (0, _react.useRef)(null);
44
43
  (0, _react.useEffect)(() => {
45
- var _figRef$current;
46
- const iframe = (_figRef$current = figRef.current) === null || _figRef$current === void 0 ? void 0 : _figRef$current.querySelector("iframe");
44
+ const iframe = figRef.current?.querySelector("iframe");
47
45
  if (iframe) {
48
46
  const [width, height] = [Number.parseInt(iframe.width), Number.parseInt(iframe.height)];
49
- iframe.style.aspectRatio = "".concat(width ? width : 16, "/").concat(height ? height : 9);
47
+ iframe.style.aspectRatio = `${width ? width : 16}/${height ? height : 9}`;
50
48
  iframe.width = "";
51
49
  iframe.height = "";
52
50
  }
@@ -61,18 +59,17 @@ const ExternalEmbed = _ref => {
61
59
  data
62
60
  } = embed;
63
61
  if (embedData.type === "fullscreen") {
64
- var _data$iframeImage$ima, _data$iframeImage, _data$iframeImage$alt, _data$iframeImage2, _embedData$title, _embedData$caption;
65
62
  const image = {
66
- 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 : "",
67
- 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 : ""
63
+ src: data.iframeImage?.image.imageUrl ?? "",
64
+ alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? ""
68
65
  };
69
66
  return (0, _jsxRuntime.jsx)(_Figure.Figure, {
70
67
  type: "full",
71
68
  children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
72
69
  image: image,
73
- title: (_embedData$title = embedData.title) !== null && _embedData$title !== void 0 ? _embedData$title : "",
70
+ title: embedData.title ?? "",
74
71
  url: embedData.url,
75
- caption: (_embedData$caption = embedData.caption) !== null && _embedData$caption !== void 0 ? _embedData$caption : "",
72
+ caption: embedData.caption ?? "",
76
73
  buttonText: t("license.other.itemImage.ariaLabel")
77
74
  })
78
75
  });
@@ -81,7 +78,7 @@ const ExternalEmbed = _ref => {
81
78
  ref: figRef,
82
79
  type: isConcept ? "full-column" : undefined,
83
80
  dangerouslySetInnerHTML: {
84
- __html: (_data$oembed$html = data.oembed.html) !== null && _data$oembed$html !== void 0 ? _data$oembed$html : ""
81
+ __html: data.oembed.html ?? ""
85
82
  }
86
83
  });
87
84
  };
@@ -34,12 +34,12 @@ const FootnoteEmbed = _ref => {
34
34
  });
35
35
  }
36
36
  return (0, _jsxRuntime.jsx)(FootnoteRef, {
37
- id: "ref".concat(embed.data.entryNum),
37
+ id: `ref${embed.data.entryNum}`,
38
38
  children: (0, _jsxRuntime.jsx)("sup", {
39
39
  children: (0, _jsxRuntime.jsx)("a", {
40
- href: "#note".concat(embed.data.entryNum),
40
+ href: `#note${embed.data.entryNum}`,
41
41
  target: "_self",
42
- children: "[".concat(embed.data.entryNum, "]")
42
+ children: `[${embed.data.entryNum}]`
43
43
  })
44
44
  })
45
45
  });
@@ -39,11 +39,10 @@ const H5pEmbed = _ref => {
39
39
  });
40
40
  }
41
41
  if (embed.data.oembed) {
42
- var _embed$data$oembed$ht;
43
42
  return (0, _jsxRuntime.jsx)(_Figure.Figure, {
44
43
  type: isConcept ? "full-column" : undefined,
45
44
  dangerouslySetInnerHTML: {
46
- __html: (_embed$data$oembed$ht = embed.data.oembed.html) !== null && _embed$data$oembed$ht !== void 0 ? _embed$data$oembed$ht : ""
45
+ __html: embed.data.oembed.html ?? ""
47
46
  }
48
47
  });
49
48
  }
@@ -32,7 +32,7 @@ const IframeEmbed = _ref => {
32
32
  const iframe = iframeRef.current;
33
33
  if (iframe) {
34
34
  const [width, height] = [Number.parseInt(iframe.width), Number.parseInt(iframe.height)];
35
- iframe.style.aspectRatio = "".concat(width ? width : 16, "/").concat(height ? height : 9);
35
+ iframe.style.aspectRatio = `${width ? width : 16}/${height ? height : 9}`;
36
36
  iframe.width = "";
37
37
  iframe.height = "";
38
38
  }
@@ -47,20 +47,19 @@ const IframeEmbed = _ref => {
47
47
  data
48
48
  } = embed;
49
49
  if (embedData.type === "fullscreen") {
50
- var _iframeImage$image$im, _embedData$title, _embedData$caption;
51
50
  const iframeImage = embed.status === "success" ? data.iframeImage : undefined;
52
- const alt = embedData.alt !== undefined ? embedData.alt : iframeImage === null || iframeImage === void 0 ? void 0 : iframeImage.alttext.alttext;
51
+ const alt = embedData.alt !== undefined ? embedData.alt : iframeImage?.alttext.alttext;
53
52
  const image = {
54
- src: (_iframeImage$image$im = iframeImage === null || iframeImage === void 0 ? void 0 : iframeImage.image.imageUrl) !== null && _iframeImage$image$im !== void 0 ? _iframeImage$image$im : "",
55
- alt: alt !== null && alt !== void 0 ? alt : ""
53
+ src: iframeImage?.image.imageUrl ?? "",
54
+ alt: alt ?? ""
56
55
  };
57
56
  return (0, _jsxRuntime.jsx)(_Figure.Figure, {
58
57
  type: "full",
59
58
  children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
60
59
  image: image,
61
- title: (_embedData$title = embedData.title) !== null && _embedData$title !== void 0 ? _embedData$title : "",
60
+ title: embedData.title ?? "",
62
61
  url: embedData.url,
63
- caption: (_embedData$caption = embedData.caption) !== null && _embedData$caption !== void 0 ? _embedData$caption : "",
62
+ caption: embedData.caption ?? "",
64
63
  buttonText: t("license.other.itemImage.ariaLabel")
65
64
  })
66
65
  });
@@ -71,8 +70,8 @@ const IframeEmbed = _ref => {
71
70
  title,
72
71
  url
73
72
  } = embedData;
74
- const strippedWidth = typeof width === "number" ? width : width === null || width === void 0 ? void 0 : width.replace(/\s*px/, "");
75
- const strippedHeight = typeof height === "number" ? height : height === null || height === void 0 ? void 0 : height.replace(/\s*px/, "");
73
+ const strippedWidth = typeof width === "number" ? width : width?.replace(/\s*px/, "");
74
+ const strippedHeight = typeof height === "number" ? height : height?.replace(/\s*px/, "");
76
75
  const urlOrTitle = title || url;
77
76
  return (0, _jsxRuntime.jsx)(_Figure.Figure, {
78
77
  type: isConcept ? "full-column" : undefined,
@@ -11,7 +11,6 @@ import { RenderContext } from "./types";
11
11
  interface Props {
12
12
  embed: ImageMetaData;
13
13
  previewAlt?: boolean;
14
- inGrid?: boolean;
15
14
  lang?: string;
16
15
  renderContext?: RenderContext;
17
16
  children?: ReactNode;
@@ -40,5 +39,5 @@ export declare const getCrop: (data: ImageEmbedData) => {
40
39
  endX: number;
41
40
  endY: number;
42
41
  } | undefined;
43
- declare const ImageEmbed: ({ embed, previewAlt, inGrid, lang, renderContext, children }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
42
+ declare const ImageEmbed: ({ embed, previewAlt, lang, renderContext, children }: Props) => import("react/jsx-runtime").JSX.Element;
44
43
  export default ImageEmbed;