@ndla/ui 56.0.122-alpha.0 → 56.0.124-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.
- package/README.md +1 -1
- package/es/Article/Article.js +127 -0
- package/es/Article/Article.js.map +1 -0
- package/es/Article/ArticleByline.js +133 -0
- package/es/Article/ArticleByline.js.map +1 -0
- package/es/Article/ArticleFootNotes.js +40 -0
- package/es/Article/ArticleFootNotes.js.map +1 -0
- package/es/AudioPlayer/AudioPlayer.js +157 -0
- package/es/AudioPlayer/AudioPlayer.js.map +1 -0
- package/es/AudioPlayer/Controls.js +254 -0
- package/es/AudioPlayer/Controls.js.map +1 -0
- package/es/AudioPlayer/SpeechControl.js +40 -0
- package/es/AudioPlayer/SpeechControl.js.map +1 -0
- package/es/AudioPlayer/index.js +8 -0
- package/es/AudioPlayer/index.js.map +1 -0
- package/es/Breadcrumb/Breadcrumb.js +44 -0
- package/es/Breadcrumb/Breadcrumb.js.map +1 -0
- package/es/Breadcrumb/BreadcrumbItem.js +36 -0
- package/es/Breadcrumb/BreadcrumbItem.js.map +1 -0
- package/es/Breadcrumb/HomeBreadcrumb.js +44 -0
- package/es/Breadcrumb/HomeBreadcrumb.js.map +1 -0
- package/es/Breadcrumb/index.js +9 -0
- package/es/Breadcrumb/index.js.map +1 -0
- package/es/CampaignBlock/CampaignBlock.js +131 -0
- package/es/CampaignBlock/CampaignBlock.js.map +1 -0
- package/es/CodeBlock/CodeBlock.js +25 -0
- package/es/CodeBlock/CodeBlock.js.map +1 -0
- package/es/CodeBlock/codeLanguageOptions.js +114 -0
- package/es/CodeBlock/codeLanguageOptions.js.map +1 -0
- package/es/Concept/Concept.js +50 -0
- package/es/Concept/Concept.js.map +1 -0
- package/es/ContactBlock/ContactBlock.js +145 -0
- package/es/ContactBlock/ContactBlock.js.map +1 -0
- package/es/ContentTypeBadge/ContentTypeBadge.js +41 -0
- package/es/ContentTypeBadge/ContentTypeBadge.js.map +1 -0
- package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.js +25 -0
- package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.js.map +1 -0
- package/es/ContentTypeFramedContent/ContentTypeFramedContent.js +25 -0
- package/es/ContentTypeFramedContent/ContentTypeFramedContent.js.map +1 -0
- package/es/ContentTypeHero/ContentTypeHero.js +39 -0
- package/es/ContentTypeHero/ContentTypeHero.js.map +1 -0
- package/es/CopyParagraphButton/CopyParagraphButton.js +62 -0
- package/es/CopyParagraphButton/CopyParagraphButton.js.map +1 -0
- package/es/CopyParagraphButton/index.js +8 -0
- package/es/CopyParagraphButton/index.js.map +1 -0
- package/es/Embed/AudioEmbed.js +52 -0
- package/es/Embed/AudioEmbed.js.map +1 -0
- package/es/Embed/BrightcoveEmbed.js +96 -0
- package/es/Embed/BrightcoveEmbed.js.map +1 -0
- package/es/Embed/CodeEmbed.js +61 -0
- package/es/Embed/CodeEmbed.js.map +1 -0
- package/es/Embed/ConceptEmbed.js +78 -0
- package/es/Embed/ConceptEmbed.js.map +1 -0
- package/es/Embed/ConceptInlineTriggerButton.js +40 -0
- package/es/Embed/ConceptInlineTriggerButton.js.map +1 -0
- package/es/Embed/ContentLinkEmbed.js +31 -0
- package/es/Embed/ContentLinkEmbed.js.map +1 -0
- package/es/Embed/CopyrightEmbed.js +23 -0
- package/es/Embed/CopyrightEmbed.js.map +1 -0
- package/es/Embed/EmbedErrorPlaceholder.js +43 -0
- package/es/Embed/EmbedErrorPlaceholder.js.map +1 -0
- package/es/Embed/EmbedWrapper.js +26 -0
- package/es/Embed/EmbedWrapper.js.map +1 -0
- package/es/Embed/ExternalEmbed.js +54 -0
- package/es/Embed/ExternalEmbed.js.map +1 -0
- package/es/Embed/FootnoteEmbed.js +27 -0
- package/es/Embed/FootnoteEmbed.js.map +1 -0
- package/es/Embed/GlossEmbed.js +52 -0
- package/es/Embed/GlossEmbed.js.map +1 -0
- package/es/Embed/H5pEmbed.js +38 -0
- package/es/Embed/H5pEmbed.js.map +1 -0
- package/es/Embed/IframeEmbed.js +69 -0
- package/es/Embed/IframeEmbed.js.map +1 -0
- package/es/Embed/ImageEmbed.js +180 -0
- package/es/Embed/ImageEmbed.js.map +1 -0
- package/es/Embed/InlineTriggerButton.js +25 -0
- package/es/Embed/InlineTriggerButton.js.map +1 -0
- package/es/Embed/RelatedContentEmbed.js +38 -0
- package/es/Embed/RelatedContentEmbed.js.map +1 -0
- package/es/Embed/UnknownEmbed.js +20 -0
- package/es/Embed/UnknownEmbed.js.map +1 -0
- package/es/Embed/UuDisclaimerEmbed.js +54 -0
- package/es/Embed/UuDisclaimerEmbed.js.map +1 -0
- package/es/ErrorMessage/ErrorMessage.js +54 -0
- package/es/ErrorMessage/ErrorMessage.js.map +1 -0
- package/es/ErrorMessage/index.js +8 -0
- package/es/ErrorMessage/index.js.map +1 -0
- package/es/FactBox/FactBox.js +121 -0
- package/es/FactBox/FactBox.js.map +1 -0
- package/es/FactBox/index.js +8 -0
- package/es/FactBox/index.js.map +1 -0
- package/es/FileList/File.js +76 -0
- package/es/FileList/File.js.map +1 -0
- package/es/FileList/FileList.js +32 -0
- package/es/FileList/FileList.js.map +1 -0
- package/es/FileList/PdfFile.js +28 -0
- package/es/FileList/PdfFile.js.map +1 -0
- package/es/Gloss/Gloss.js +142 -0
- package/es/Gloss/Gloss.js.map +1 -0
- package/es/Gloss/GlossExample.js +46 -0
- package/es/Gloss/GlossExample.js.map +1 -0
- package/es/Grid/Grid.js +66 -0
- package/es/Grid/Grid.js.map +1 -0
- package/es/Grid/GridParallaxItem.js +21 -0
- package/es/Grid/GridParallaxItem.js.map +1 -0
- package/es/KeyFigure/KeyFigure.js +46 -0
- package/es/KeyFigure/KeyFigure.js.map +1 -0
- package/es/LicenseByline/EmbedByline.js +132 -0
- package/es/LicenseByline/EmbedByline.js.map +1 -0
- package/es/LicenseByline/LicenseLink.js +31 -0
- package/es/LicenseByline/LicenseLink.js.map +1 -0
- package/es/LinkBlock/LinkBlock.js +74 -0
- package/es/LinkBlock/LinkBlock.js.map +1 -0
- package/es/LinkBlock/LinkBlockSection.js +23 -0
- package/es/LinkBlock/LinkBlockSection.js.map +1 -0
- package/es/Pitch/Pitch.js +62 -0
- package/es/Pitch/Pitch.js.map +1 -0
- package/es/RelatedArticleList/RelatedArticleList.js +97 -0
- package/es/RelatedArticleList/RelatedArticleList.js.map +1 -0
- package/es/RelatedArticleList/index.js +8 -0
- package/es/RelatedArticleList/index.js.map +1 -0
- package/es/ResourceBox/ResourceBox.js +74 -0
- package/es/ResourceBox/ResourceBox.js.map +1 -0
- package/es/TagSelector/TagSelector.js +100 -0
- package/es/TagSelector/TagSelector.js.map +1 -0
- package/es/ZendeskButton/ZendeskButton.js +41 -0
- package/es/ZendeskButton/ZendeskButton.js.map +1 -0
- package/es/_virtual/rolldown_runtime.js +11 -0
- package/es/i18n/formatNestedMessages.js +17 -0
- package/es/i18n/formatNestedMessages.js.map +1 -0
- package/es/i18n/i18n.js +29 -0
- package/es/i18n/i18n.js.map +1 -0
- package/es/i18n/useComponentTranslations.js +155 -0
- package/es/i18n/useComponentTranslations.js.map +1 -0
- package/es/index.js +65 -0
- package/es/locale/messages-en.js +438 -0
- package/es/locale/messages-en.js.map +1 -0
- package/es/locale/messages-nb.js +438 -0
- package/es/locale/messages-nb.js.map +1 -0
- package/es/locale/messages-nn.js +438 -0
- package/es/locale/messages-nn.js.map +1 -0
- package/es/locale/messages-se.js +438 -0
- package/es/locale/messages-se.js.map +1 -0
- package/es/model/ContentType.js +72 -0
- package/es/model/ContentType.js.map +1 -0
- package/es/model/SubjectCategories.js +25 -0
- package/es/model/SubjectCategories.js.map +1 -0
- package/es/model/SubjectTypes.js +23 -0
- package/es/model/SubjectTypes.js.map +1 -0
- package/es/model/WordClass.js +53 -0
- package/es/model/WordClass.js.map +1 -0
- package/es/model/index.js +19 -0
- package/es/model/index.js.map +1 -0
- package/es/utils/licenseAttributes.js +16 -0
- package/es/utils/licenseAttributes.js.map +1 -0
- package/es/utils/relativeUrl.js +26 -0
- package/es/utils/relativeUrl.js.map +1 -0
- package/lib/Article/Article.js +134 -0
- package/lib/Article/Article.js.map +1 -0
- package/lib/Article/ArticleByline.js +135 -0
- package/lib/Article/ArticleByline.js.map +1 -0
- package/lib/Article/ArticleFootNotes.js +41 -0
- package/lib/Article/ArticleFootNotes.js.map +1 -0
- package/lib/AudioPlayer/AudioPlayer.js +158 -0
- package/lib/AudioPlayer/AudioPlayer.js.map +1 -0
- package/lib/AudioPlayer/Controls.js +255 -0
- package/lib/AudioPlayer/Controls.js.map +1 -0
- package/lib/AudioPlayer/SpeechControl.js +41 -0
- package/lib/AudioPlayer/SpeechControl.js.map +1 -0
- package/lib/AudioPlayer/index.js +8 -0
- package/lib/AudioPlayer/index.js.map +1 -0
- package/lib/Breadcrumb/Breadcrumb.js +45 -0
- package/lib/Breadcrumb/Breadcrumb.js.map +1 -0
- package/lib/Breadcrumb/BreadcrumbItem.js +37 -0
- package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -0
- package/lib/Breadcrumb/HomeBreadcrumb.js +45 -0
- package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -0
- package/lib/Breadcrumb/index.js +9 -0
- package/lib/Breadcrumb/index.js.map +1 -0
- package/lib/CampaignBlock/CampaignBlock.js +132 -0
- package/lib/CampaignBlock/CampaignBlock.js.map +1 -0
- package/lib/CodeBlock/CodeBlock.js +26 -0
- package/lib/CodeBlock/CodeBlock.js.map +1 -0
- package/lib/CodeBlock/codeLanguageOptions.js +115 -0
- package/lib/CodeBlock/codeLanguageOptions.js.map +1 -0
- package/lib/Concept/Concept.js +51 -0
- package/lib/Concept/Concept.js.map +1 -0
- package/lib/ContactBlock/ContactBlock.js +147 -0
- package/lib/ContactBlock/ContactBlock.js.map +1 -0
- package/lib/ContentTypeBadge/ContentTypeBadge.js +43 -0
- package/lib/ContentTypeBadge/ContentTypeBadge.js.map +1 -0
- package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js +26 -0
- package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js.map +1 -0
- package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js +26 -0
- package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js.map +1 -0
- package/lib/ContentTypeHero/ContentTypeHero.js +40 -0
- package/lib/ContentTypeHero/ContentTypeHero.js.map +1 -0
- package/lib/CopyParagraphButton/CopyParagraphButton.js +63 -0
- package/lib/CopyParagraphButton/CopyParagraphButton.js.map +1 -0
- package/lib/CopyParagraphButton/index.js +8 -0
- package/lib/CopyParagraphButton/index.js.map +1 -0
- package/lib/Embed/AudioEmbed.js +53 -0
- package/lib/Embed/AudioEmbed.js.map +1 -0
- package/lib/Embed/BrightcoveEmbed.js +97 -0
- package/lib/Embed/BrightcoveEmbed.js.map +1 -0
- package/lib/Embed/CodeEmbed.js +62 -0
- package/lib/Embed/CodeEmbed.js.map +1 -0
- package/lib/Embed/ConceptEmbed.js +81 -0
- package/lib/Embed/ConceptEmbed.js.map +1 -0
- package/lib/Embed/ConceptInlineTriggerButton.js +41 -0
- package/lib/Embed/ConceptInlineTriggerButton.js.map +1 -0
- package/lib/Embed/ContentLinkEmbed.js +32 -0
- package/lib/Embed/ContentLinkEmbed.js.map +1 -0
- package/lib/Embed/CopyrightEmbed.js +24 -0
- package/lib/Embed/CopyrightEmbed.js.map +1 -0
- package/lib/Embed/EmbedErrorPlaceholder.js +44 -0
- package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -0
- package/lib/Embed/EmbedWrapper.js +27 -0
- package/lib/Embed/EmbedWrapper.js.map +1 -0
- package/lib/Embed/ExternalEmbed.js +55 -0
- package/lib/Embed/ExternalEmbed.js.map +1 -0
- package/lib/Embed/FootnoteEmbed.js +28 -0
- package/lib/Embed/FootnoteEmbed.js.map +1 -0
- package/lib/Embed/GlossEmbed.js +53 -0
- package/lib/Embed/GlossEmbed.js.map +1 -0
- package/lib/Embed/H5pEmbed.js +39 -0
- package/lib/Embed/H5pEmbed.js.map +1 -0
- package/lib/Embed/IframeEmbed.js +70 -0
- package/lib/Embed/IframeEmbed.js.map +1 -0
- package/lib/Embed/ImageEmbed.js +183 -0
- package/lib/Embed/ImageEmbed.js.map +1 -0
- package/lib/Embed/InlineTriggerButton.js +26 -0
- package/lib/Embed/InlineTriggerButton.js.map +1 -0
- package/lib/Embed/RelatedContentEmbed.js +39 -0
- package/lib/Embed/RelatedContentEmbed.js.map +1 -0
- package/lib/Embed/UnknownEmbed.js +21 -0
- package/lib/Embed/UnknownEmbed.js.map +1 -0
- package/lib/Embed/UuDisclaimerEmbed.js +55 -0
- package/lib/Embed/UuDisclaimerEmbed.js.map +1 -0
- package/lib/ErrorMessage/ErrorMessage.js +55 -0
- package/lib/ErrorMessage/ErrorMessage.js.map +1 -0
- package/lib/ErrorMessage/index.js +8 -0
- package/lib/ErrorMessage/index.js.map +1 -0
- package/lib/FactBox/FactBox.js +122 -0
- package/lib/FactBox/FactBox.js.map +1 -0
- package/lib/FactBox/index.js +8 -0
- package/lib/FactBox/index.js.map +1 -0
- package/lib/FileList/File.js +78 -0
- package/lib/FileList/File.js.map +1 -0
- package/lib/FileList/FileList.js +35 -0
- package/lib/FileList/FileList.js.map +1 -0
- package/lib/FileList/PdfFile.js +29 -0
- package/lib/FileList/PdfFile.js.map +1 -0
- package/lib/Gloss/Gloss.js +143 -0
- package/lib/Gloss/Gloss.js.map +1 -0
- package/lib/Gloss/GlossExample.js +47 -0
- package/lib/Gloss/GlossExample.js.map +1 -0
- package/lib/Grid/Grid.js +67 -0
- package/lib/Grid/Grid.js.map +1 -0
- package/lib/Grid/GridParallaxItem.js +22 -0
- package/lib/Grid/GridParallaxItem.js.map +1 -0
- package/lib/KeyFigure/KeyFigure.js +47 -0
- package/lib/KeyFigure/KeyFigure.js.map +1 -0
- package/lib/LicenseByline/EmbedByline.js +134 -0
- package/lib/LicenseByline/EmbedByline.js.map +1 -0
- package/lib/LicenseByline/LicenseLink.js +32 -0
- package/lib/LicenseByline/LicenseLink.js.map +1 -0
- package/lib/LinkBlock/LinkBlock.js +75 -0
- package/lib/LinkBlock/LinkBlock.js.map +1 -0
- package/lib/LinkBlock/LinkBlockSection.js +24 -0
- package/lib/LinkBlock/LinkBlockSection.js.map +1 -0
- package/lib/Pitch/Pitch.js +63 -0
- package/lib/Pitch/Pitch.js.map +1 -0
- package/lib/RelatedArticleList/RelatedArticleList.js +99 -0
- package/lib/RelatedArticleList/RelatedArticleList.js.map +1 -0
- package/lib/RelatedArticleList/index.js +8 -0
- package/lib/RelatedArticleList/index.js.map +1 -0
- package/lib/ResourceBox/ResourceBox.js +75 -0
- package/lib/ResourceBox/ResourceBox.js.map +1 -0
- package/lib/TagSelector/TagSelector.js +108 -0
- package/lib/TagSelector/TagSelector.js.map +1 -0
- package/lib/ZendeskButton/ZendeskButton.js +42 -0
- package/lib/ZendeskButton/ZendeskButton.js.map +1 -0
- package/lib/_virtual/rolldown_runtime.js +42 -0
- package/lib/i18n/formatNestedMessages.js +18 -0
- package/lib/i18n/formatNestedMessages.js.map +1 -0
- package/lib/i18n/i18n.js +31 -0
- package/lib/i18n/i18n.js.map +1 -0
- package/lib/i18n/useComponentTranslations.js +163 -0
- package/lib/i18n/useComponentTranslations.js.map +1 -0
- package/lib/index.js +157 -0
- package/lib/locale/messages-en.js +439 -0
- package/lib/locale/messages-en.js.map +1 -0
- package/lib/locale/messages-nb.js +439 -0
- package/lib/locale/messages-nb.js.map +1 -0
- package/lib/locale/messages-nn.js +439 -0
- package/lib/locale/messages-nn.js.map +1 -0
- package/lib/locale/messages-se.js +439 -0
- package/lib/locale/messages-se.js.map +1 -0
- package/lib/model/ContentType.js +94 -0
- package/lib/model/ContentType.js.map +1 -0
- package/lib/model/SubjectCategories.js +30 -0
- package/lib/model/SubjectCategories.js.map +1 -0
- package/lib/model/SubjectTypes.js +28 -0
- package/lib/model/SubjectTypes.js.map +1 -0
- package/lib/model/WordClass.js +58 -0
- package/lib/model/WordClass.js.map +1 -0
- package/lib/model/index.js +19 -0
- package/lib/model/index.js.map +1 -0
- package/lib/utils/licenseAttributes.js +17 -0
- package/lib/utils/licenseAttributes.js.map +1 -0
- package/lib/utils/relativeUrl.js +26 -0
- package/lib/utils/relativeUrl.js.map +1 -0
- package/package.json +12 -11
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/i18n/formatNestedMessages.ts
|
|
3
|
+
const formatNestedMessages = (phrases, formattedMessages = {}, prefix = "") => {
|
|
4
|
+
const messages = formattedMessages;
|
|
5
|
+
Object.keys(phrases).forEach((key) => {
|
|
6
|
+
const value = phrases[key];
|
|
7
|
+
if ({}.hasOwnProperty.call(phrases, key)) {
|
|
8
|
+
const keyWithPrefix = prefix ? `${prefix}.${key}` : key;
|
|
9
|
+
if (typeof value === "object") formatNestedMessages(value, formattedMessages, keyWithPrefix);
|
|
10
|
+
else messages[keyWithPrefix] = value;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return messages;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.formatNestedMessages = formatNestedMessages;
|
|
18
|
+
//# sourceMappingURL=formatNestedMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatNestedMessages.js","names":["phrases: Phrases","formattedMessages: FormattedMessages","prefix: string"],"sources":["../../src/i18n/formatNestedMessages.ts"],"sourcesContent":["/**\n * Copyright (c) 2017-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\ninterface Phrases {\n [key: string]: string | Phrases;\n}\n\ninterface FormattedMessages {\n [key: string]: string;\n}\n\nexport const formatNestedMessages = (\n phrases: Phrases,\n formattedMessages: FormattedMessages = {},\n prefix: string = \"\",\n) => {\n const messages = formattedMessages;\n\n Object.keys(phrases).forEach((key) => {\n const value = phrases[key];\n if ({}.hasOwnProperty.call(phrases, key)) {\n const keyWithPrefix = prefix ? `${prefix}.${key}` : key;\n if (typeof value === \"object\") {\n formatNestedMessages(value, formattedMessages, keyWithPrefix);\n } else {\n messages[keyWithPrefix] = value;\n }\n }\n });\n\n return messages;\n};\n"],"mappings":";;AAgBA,MAAa,uBAAuB,CAClCA,SACAC,oBAAuC,CAAE,GACzCC,SAAiB,OACd;CACH,MAAM,WAAW;AAEjB,QAAO,KAAK,QAAQ,CAAC,QAAQ,CAAC,QAAQ;EACpC,MAAM,QAAQ,QAAQ;AACtB,MAAI,CAAE,EAAC,eAAe,KAAK,SAAS,IAAI,EAAE;GACxC,MAAM,gBAAgB,UAAU,EAAE,OAAO,GAAG,IAAI,IAAI;AACpD,cAAW,UAAU,SACnB,sBAAqB,OAAO,mBAAmB,cAAc;OAE7D,UAAS,iBAAiB;EAE7B;CACF,EAAC;AAEF,QAAO;AACR"}
|
package/lib/i18n/i18n.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
+
const require_messages_en = require('../locale/messages-en.js');
|
|
3
|
+
const require_messages_nb = require('../locale/messages-nb.js');
|
|
4
|
+
const require_messages_nn = require('../locale/messages-nn.js');
|
|
5
|
+
const require_messages_se = require('../locale/messages-se.js');
|
|
6
|
+
const react_i18next = require_rolldown_runtime.__toESM(require("react-i18next"));
|
|
7
|
+
const i18next = require_rolldown_runtime.__toESM(require("i18next"));
|
|
8
|
+
|
|
9
|
+
//#region src/i18n/i18n.ts
|
|
10
|
+
const supportedTranslationLanguages = [
|
|
11
|
+
"nb",
|
|
12
|
+
"nn",
|
|
13
|
+
"en",
|
|
14
|
+
"se"
|
|
15
|
+
];
|
|
16
|
+
const i18nInstance = i18next.default.use(react_i18next.initReactI18next);
|
|
17
|
+
i18nInstance.init({
|
|
18
|
+
fallbackLng: "nb",
|
|
19
|
+
supportedLngs: supportedTranslationLanguages,
|
|
20
|
+
resources: {
|
|
21
|
+
en: { translation: require_messages_en.messages_en_default },
|
|
22
|
+
nn: { translation: require_messages_nn.messages_nn_default },
|
|
23
|
+
nb: { translation: require_messages_nb.messages_nb_default },
|
|
24
|
+
se: { translation: require_messages_se.messages_se_default }
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.i18nInstance = i18nInstance;
|
|
30
|
+
exports.supportedTranslationLanguages = supportedTranslationLanguages;
|
|
31
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["initReactI18next","messagesEN","messagesNN","messagesNB","messagesSE"],"sources":["../../src/i18n/i18n.ts"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport messagesEN from \"../locale/messages-en\";\nimport messagesNB from \"../locale/messages-nb\";\nimport messagesNN from \"../locale/messages-nn\";\nimport messagesSE from \"../locale/messages-se\";\n\nexport const supportedTranslationLanguages = [\"nb\", \"nn\", \"en\", \"se\"] as const;\nconst i18nInstance = i18n.use(initReactI18next);\n\ni18nInstance.init({\n fallbackLng: \"nb\",\n supportedLngs: supportedTranslationLanguages,\n resources: {\n en: {\n translation: messagesEN,\n },\n nn: {\n translation: messagesNN,\n },\n nb: {\n translation: messagesNB,\n },\n se: {\n translation: messagesSE,\n },\n },\n});\n\nexport { i18nInstance };\n"],"mappings":";;;;;;;;;AAeA,MAAa,gCAAgC;CAAC;CAAM;CAAM;CAAM;AAAK;AACrE,MAAM,eAAe,gBAAK,IAAIA,+BAAiB;AAE/C,aAAa,KAAK;CAChB,aAAa;CACb,eAAe;CACf,WAAW;EACT,IAAI,EACF,aAAaC,wCACd;EACD,IAAI,EACF,aAAaC,wCACd;EACD,IAAI,EACF,aAAaC,wCACd;EACD,IAAI,EACF,aAAaC,wCACd;CACF;AACF,EAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
+
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
3
|
+
const react_i18next = require_rolldown_runtime.__toESM(require("react-i18next"));
|
|
4
|
+
|
|
5
|
+
//#region src/i18n/useComponentTranslations.ts
|
|
6
|
+
const useTagsInputTranslations = (translations) => {
|
|
7
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.tagsInput" });
|
|
8
|
+
return (0, react.useMemo)(() => ({
|
|
9
|
+
clearTriggerLabel: t("clearTriggerLabel"),
|
|
10
|
+
deleteTagTriggerLabel: (tag) => t("deleteTagTriggerLabel", { tag }),
|
|
11
|
+
tagAdded: (tag) => t("tagAdded", { tag }),
|
|
12
|
+
tagsPasted: (tag) => t("tagsPasted", { length: tag.length }),
|
|
13
|
+
tagEdited: (tag) => t("tagEdited", { tag }),
|
|
14
|
+
tagUpdated: (tag) => t("tagUpdated", { tag }),
|
|
15
|
+
tagDeleted: (tag) => t("tagDeleted", { tag }),
|
|
16
|
+
tagSelected: (tag) => t("tagSelected", { tag }),
|
|
17
|
+
...translations
|
|
18
|
+
}), [t, translations]);
|
|
19
|
+
};
|
|
20
|
+
const useComboboxTranslations = (translations) => {
|
|
21
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.combobox" });
|
|
22
|
+
return (0, react.useMemo)(() => ({
|
|
23
|
+
triggerLabel: t("triggerLabel"),
|
|
24
|
+
clearTriggerLabel: t("clearTriggerLabel"),
|
|
25
|
+
...translations
|
|
26
|
+
}), [t, translations]);
|
|
27
|
+
};
|
|
28
|
+
const useTagSelectorTranslations = (translations) => {
|
|
29
|
+
const tagsInputTranslations = useTagsInputTranslations();
|
|
30
|
+
const comboboxTranslations = useComboboxTranslations();
|
|
31
|
+
return (0, react.useMemo)(() => ({
|
|
32
|
+
...comboboxTranslations,
|
|
33
|
+
...tagsInputTranslations,
|
|
34
|
+
...translations
|
|
35
|
+
}), [
|
|
36
|
+
comboboxTranslations,
|
|
37
|
+
tagsInputTranslations,
|
|
38
|
+
translations
|
|
39
|
+
]);
|
|
40
|
+
};
|
|
41
|
+
const usePaginationTranslations = (translations) => {
|
|
42
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.pagination" });
|
|
43
|
+
return (0, react.useMemo)(() => ({
|
|
44
|
+
rootLabel: t("rootLabel"),
|
|
45
|
+
prevTriggerLabel: t("prevTriggerLabel"),
|
|
46
|
+
nextTriggerLabel: t("nextTriggerLabel"),
|
|
47
|
+
itemLabel: (details) => {
|
|
48
|
+
const lastPage = details.totalPages > 1 && details.page === details.totalPages;
|
|
49
|
+
return lastPage ? t("lastPage", { page: details.page }) : t("page", { page: details.page });
|
|
50
|
+
},
|
|
51
|
+
...translations
|
|
52
|
+
}), [translations, t]);
|
|
53
|
+
};
|
|
54
|
+
const useImageSearchTranslations = (translations = {}) => {
|
|
55
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.imageSearch" });
|
|
56
|
+
const paginationTranslations = usePaginationTranslations();
|
|
57
|
+
const { imagePreview, paginationTranslations: fallbackPaginationTranslations,...remaining } = translations;
|
|
58
|
+
return (0, react.useMemo)(() => ({
|
|
59
|
+
searchPlaceholder: t("searchPlaceholder"),
|
|
60
|
+
searchButtonTitle: t("searchButtonTitle"),
|
|
61
|
+
imagePreview: {
|
|
62
|
+
creatorsLabel: t("imagePreview.creatorsLabel"),
|
|
63
|
+
license: t("imagePreview.license"),
|
|
64
|
+
caption: t("imagePreview.caption"),
|
|
65
|
+
altText: t("imagePreview.altText"),
|
|
66
|
+
modelRelease: t("imagePreview.modelRelease"),
|
|
67
|
+
tags: t("imagePreview.tags"),
|
|
68
|
+
close: t("close"),
|
|
69
|
+
checkboxLabel: t("imagePreview.checkboxLabel"),
|
|
70
|
+
useImageTitle: t("imagePreview.useImageTitle"),
|
|
71
|
+
...imagePreview
|
|
72
|
+
},
|
|
73
|
+
paginationTranslations: {
|
|
74
|
+
...paginationTranslations,
|
|
75
|
+
...fallbackPaginationTranslations
|
|
76
|
+
},
|
|
77
|
+
...remaining
|
|
78
|
+
}), [
|
|
79
|
+
t,
|
|
80
|
+
paginationTranslations,
|
|
81
|
+
imagePreview,
|
|
82
|
+
fallbackPaginationTranslations,
|
|
83
|
+
remaining
|
|
84
|
+
]);
|
|
85
|
+
};
|
|
86
|
+
const useAudioSearchTranslations = (translations = {}) => {
|
|
87
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.audioSearch" });
|
|
88
|
+
const paginationTranslations = usePaginationTranslations();
|
|
89
|
+
const { paginationTranslations: fallbackPaginationTranslations,...remaining } = translations;
|
|
90
|
+
return (0, react.useMemo)(() => ({
|
|
91
|
+
searchPlaceholder: t("searchPlaceholder"),
|
|
92
|
+
searchButtonTitle: t("searchButtonTitle"),
|
|
93
|
+
useAudio: t("useAudio"),
|
|
94
|
+
noResults: t("noResults"),
|
|
95
|
+
paginationTranslations: {
|
|
96
|
+
...paginationTranslations,
|
|
97
|
+
...fallbackPaginationTranslations
|
|
98
|
+
},
|
|
99
|
+
...remaining
|
|
100
|
+
}), [
|
|
101
|
+
t,
|
|
102
|
+
paginationTranslations,
|
|
103
|
+
fallbackPaginationTranslations,
|
|
104
|
+
remaining
|
|
105
|
+
]);
|
|
106
|
+
};
|
|
107
|
+
const useVideoSearchTranslations = (translations) => {
|
|
108
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.videoSearch" });
|
|
109
|
+
return (0, react.useMemo)(() => ({
|
|
110
|
+
searchPlaceholder: t("searchPlaceholder"),
|
|
111
|
+
searchButtonTitle: t("searchButtonTitle"),
|
|
112
|
+
loadMoreVideos: t("loadMoreVideos"),
|
|
113
|
+
noResults: t("noResults"),
|
|
114
|
+
is360Video: t("is360Video"),
|
|
115
|
+
previewVideo: t("previewVideo"),
|
|
116
|
+
addVideo: t("addVideo"),
|
|
117
|
+
close: t("close"),
|
|
118
|
+
...translations
|
|
119
|
+
}), [t, translations]);
|
|
120
|
+
};
|
|
121
|
+
const useDatePickerTranslations = (translations) => {
|
|
122
|
+
const { t } = (0, react_i18next.useTranslation)("translation", { keyPrefix: "component.datePicker" });
|
|
123
|
+
return (0, react.useMemo)(() => ({
|
|
124
|
+
dayCell: (state) => {
|
|
125
|
+
if (state.unavailable) return t("dayCell.unavailable", { date: state.formattedDate });
|
|
126
|
+
else if (state.selected) return t("dayCell.selected", { date: state.formattedDate });
|
|
127
|
+
else return t("dayCell.select", { date: state.formattedDate });
|
|
128
|
+
},
|
|
129
|
+
nextTrigger: (view) => t(`nextTrigger.${view}`),
|
|
130
|
+
prevTrigger: (view) => t(`prevTrigger.${view}`),
|
|
131
|
+
monthSelect: t("monthSelect"),
|
|
132
|
+
yearSelect: t("yearSelect"),
|
|
133
|
+
viewTrigger: (view) => t(`viewTrigger.${view}`),
|
|
134
|
+
presetTrigger: (value) => {
|
|
135
|
+
if (Array.isArray(value)) return t("presetTrigger.range", {
|
|
136
|
+
start: value[0],
|
|
137
|
+
end: value[1]
|
|
138
|
+
});
|
|
139
|
+
else return t("presetTrigger.single", { date: value });
|
|
140
|
+
},
|
|
141
|
+
clearTrigger: t("clearTrigger"),
|
|
142
|
+
trigger: (open) => t(`trigger.${open ? "close" : "open"}`),
|
|
143
|
+
content: t("content"),
|
|
144
|
+
placeholder: (_locale) => {
|
|
145
|
+
return {
|
|
146
|
+
day: "dd",
|
|
147
|
+
month: "mm",
|
|
148
|
+
year: "yyyy"
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}), [t, translations]);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
exports.useAudioSearchTranslations = useAudioSearchTranslations;
|
|
156
|
+
exports.useComboboxTranslations = useComboboxTranslations;
|
|
157
|
+
exports.useDatePickerTranslations = useDatePickerTranslations;
|
|
158
|
+
exports.useImageSearchTranslations = useImageSearchTranslations;
|
|
159
|
+
exports.usePaginationTranslations = usePaginationTranslations;
|
|
160
|
+
exports.useTagSelectorTranslations = useTagSelectorTranslations;
|
|
161
|
+
exports.useTagsInputTranslations = useTagsInputTranslations;
|
|
162
|
+
exports.useVideoSearchTranslations = useVideoSearchTranslations;
|
|
163
|
+
//# sourceMappingURL=useComponentTranslations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComponentTranslations.js","names":["translations?: Partial<TagsInputRootProps[\"translations\"]>","translations?: Partial<ComboboxRootProps<T>[\"translations\"]>","translations?: Partial<TagSelectorRootProps<T>[\"translations\"]>","translations?: Partial<PaginationRootProps[\"translations\"]>","translations: DeepPartial<ImageSearchTranslations>","translations: DeepPartial<AudioSearchTranslations>","translations?: Partial<VideoTranslations>","translations?: Partial<DatePickerRootProps[\"translations\"]>"],"sources":["../../src/i18n/useComponentTranslations.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { useTranslation } from \"react-i18next\";\nimport type { CollectionItem } from \"@ark-ui/react\";\nimport type { ComboboxRootProps, PaginationRootProps, TagsInputRootProps, DatePickerRootProps } from \"@ndla/primitives\";\nimport { type TagSelectorRootProps } from \"../TagSelector/TagSelector\";\nimport { useMemo } from \"react\";\n\ntype DeepPartial<T> = {\n [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];\n};\n\nexport const useTagsInputTranslations = (\n translations?: Partial<TagsInputRootProps[\"translations\"]>,\n): TagsInputRootProps[\"translations\"] => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.tagsInput\" });\n\n return useMemo(\n () => ({\n clearTriggerLabel: t(\"clearTriggerLabel\"),\n deleteTagTriggerLabel: (tag) => t(\"deleteTagTriggerLabel\", { tag }),\n tagAdded: (tag) => t(\"tagAdded\", { tag }),\n tagsPasted: (tag) => t(\"tagsPasted\", { length: tag.length }),\n tagEdited: (tag) => t(\"tagEdited\", { tag }),\n tagUpdated: (tag) => t(\"tagUpdated\", { tag }),\n tagDeleted: (tag) => t(\"tagDeleted\", { tag }),\n tagSelected: (tag) => t(\"tagSelected\", { tag }),\n ...translations,\n }),\n [t, translations],\n );\n};\n\nexport const useComboboxTranslations = <T extends CollectionItem>(\n translations?: Partial<ComboboxRootProps<T>[\"translations\"]>,\n): ComboboxRootProps<T>[\"translations\"] => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.combobox\" });\n\n return useMemo(\n () => ({\n triggerLabel: t(\"triggerLabel\"),\n clearTriggerLabel: t(\"clearTriggerLabel\"),\n ...translations,\n }),\n [t, translations],\n );\n};\n\nexport const useTagSelectorTranslations = <T extends CollectionItem>(\n translations?: Partial<TagSelectorRootProps<T>[\"translations\"]>,\n): TagSelectorRootProps<T>[\"translations\"] => {\n const tagsInputTranslations = useTagsInputTranslations();\n const comboboxTranslations = useComboboxTranslations();\n\n return useMemo(\n () =>\n ({\n ...comboboxTranslations,\n ...tagsInputTranslations,\n ...translations,\n }) as TagSelectorRootProps<T>[\"translations\"],\n [comboboxTranslations, tagsInputTranslations, translations],\n );\n};\n\nexport const usePaginationTranslations = (\n translations?: Partial<PaginationRootProps[\"translations\"]>,\n): PaginationRootProps[\"translations\"] => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.pagination\" });\n\n return useMemo(\n () => ({\n rootLabel: t(\"rootLabel\"),\n prevTriggerLabel: t(\"prevTriggerLabel\"),\n nextTriggerLabel: t(\"nextTriggerLabel\"),\n itemLabel: (details) => {\n const lastPage = details.totalPages > 1 && details.page === details.totalPages;\n return lastPage ? t(\"lastPage\", { page: details.page }) : t(\"page\", { page: details.page });\n },\n ...translations,\n }),\n [translations, t],\n );\n};\n\n// TODO: Deduplicate this and place it somewhere smart. Maybe core?\ninterface AudioSearchTranslations {\n searchPlaceholder: string;\n searchButtonTitle: string;\n useAudio: string;\n noResults: string;\n paginationTranslations: PaginationRootProps[\"translations\"];\n}\n\ninterface VideoTranslations {\n searchPlaceholder: string;\n searchButtonTitle: string;\n loadMoreVideos: string;\n noResults: string;\n is360Video: string;\n previewVideo: string;\n addVideo: string;\n close: string;\n}\ninterface PreviewTranslations {\n creatorsLabel: string;\n license: string;\n caption: string;\n altText: string;\n modelRelease: string;\n tags: string;\n close: string;\n checkboxLabel?: string;\n missingTitleFallback?: string;\n useImageTitle: string;\n}\n\ninterface ImageSearchTranslations {\n searchPlaceholder: string;\n searchButtonTitle: string;\n imagePreview: PreviewTranslations;\n paginationTranslations: PaginationRootProps[\"translations\"];\n}\n\nexport const useImageSearchTranslations = (\n translations: DeepPartial<ImageSearchTranslations> = {},\n): ImageSearchTranslations => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.imageSearch\" });\n const paginationTranslations = usePaginationTranslations();\n\n const { imagePreview, paginationTranslations: fallbackPaginationTranslations, ...remaining } = translations;\n\n return useMemo(\n () => ({\n searchPlaceholder: t(\"searchPlaceholder\"),\n searchButtonTitle: t(\"searchButtonTitle\"),\n imagePreview: {\n creatorsLabel: t(\"imagePreview.creatorsLabel\"),\n license: t(\"imagePreview.license\"),\n caption: t(\"imagePreview.caption\"),\n altText: t(\"imagePreview.altText\"),\n modelRelease: t(\"imagePreview.modelRelease\"),\n tags: t(\"imagePreview.tags\"),\n close: t(\"close\"),\n checkboxLabel: t(\"imagePreview.checkboxLabel\"),\n useImageTitle: t(\"imagePreview.useImageTitle\"),\n ...imagePreview,\n },\n paginationTranslations: { ...paginationTranslations, ...fallbackPaginationTranslations },\n ...remaining,\n }),\n [t, paginationTranslations, imagePreview, fallbackPaginationTranslations, remaining],\n );\n};\n\nexport const useAudioSearchTranslations = (\n translations: DeepPartial<AudioSearchTranslations> = {},\n): AudioSearchTranslations => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.audioSearch\" });\n const paginationTranslations = usePaginationTranslations();\n\n const { paginationTranslations: fallbackPaginationTranslations, ...remaining } = translations;\n\n return useMemo(\n () => ({\n searchPlaceholder: t(\"searchPlaceholder\"),\n searchButtonTitle: t(\"searchButtonTitle\"),\n useAudio: t(\"useAudio\"),\n noResults: t(\"noResults\"),\n paginationTranslations: { ...paginationTranslations, ...fallbackPaginationTranslations },\n ...remaining,\n }),\n [t, paginationTranslations, fallbackPaginationTranslations, remaining],\n );\n};\n\nexport const useVideoSearchTranslations = (translations?: Partial<VideoTranslations>): VideoTranslations => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.videoSearch\" });\n\n return useMemo(\n () => ({\n searchPlaceholder: t(\"searchPlaceholder\"),\n searchButtonTitle: t(\"searchButtonTitle\"),\n loadMoreVideos: t(\"loadMoreVideos\"),\n noResults: t(\"noResults\"),\n is360Video: t(\"is360Video\"),\n previewVideo: t(\"previewVideo\"),\n addVideo: t(\"addVideo\"),\n close: t(\"close\"),\n ...translations,\n }),\n [t, translations],\n );\n};\n\nexport const useDatePickerTranslations = (\n translations?: Partial<DatePickerRootProps[\"translations\"]>,\n): NonNullable<DatePickerRootProps[\"translations\"]> => {\n const { t } = useTranslation(\"translation\", { keyPrefix: \"component.datePicker\" });\n\n return useMemo(\n () => ({\n dayCell: (state) => {\n if (state.unavailable) {\n return t(\"dayCell.unavailable\", { date: state.formattedDate });\n } else if (state.selected) {\n return t(\"dayCell.selected\", { date: state.formattedDate });\n } else return t(\"dayCell.select\", { date: state.formattedDate });\n },\n nextTrigger: (view) => t(`nextTrigger.${view}`),\n prevTrigger: (view) => t(`prevTrigger.${view}`),\n monthSelect: t(\"monthSelect\"),\n yearSelect: t(\"yearSelect\"),\n viewTrigger: (view) => t(`viewTrigger.${view}`),\n presetTrigger: (value) => {\n if (Array.isArray(value)) {\n return t(\"presetTrigger.range\", { start: value[0], end: value[1] });\n } else return t(\"presetTrigger.single\", { date: value });\n },\n clearTrigger: t(\"clearTrigger\"),\n trigger: (open) => t(`trigger.${open ? \"close\" : \"open\"}`),\n content: t(\"content\"),\n placeholder: (_locale) => {\n return { day: \"dd\", month: \"mm\", year: \"yyyy\" };\n },\n }),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uB;IAAE,OAAO,MAAM;IAAI,KAAK,MAAM;GAAI,EAAC;OAC9D,QAAO,EAAE,wBAAwB,EAAE,MAAM,MAAO,EAAC;EACzD;EACD,cAAc,EAAE,eAAe;EAC/B,SAAS,CAAC,SAAS,GAAG,UAAU,OAAO,UAAU,OAAO,EAAE;EAC1D,SAAS,EAAE,UAAU;EACrB,aAAa,CAAC,YAAY;AACxB,UAAO;IAAE,KAAK;IAAM,OAAO;IAAM,MAAM;GAAQ;EAChD;CACF,IACD,CAAC,GAAG,YAAa,EAClB;AACF"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
const require_LicenseLink = require('./LicenseByline/LicenseLink.js');
|
|
2
|
+
const require_EmbedByline = require('./LicenseByline/EmbedByline.js');
|
|
3
|
+
const require_licenseAttributes = require('./utils/licenseAttributes.js');
|
|
4
|
+
const require_ImageEmbed = require('./Embed/ImageEmbed.js');
|
|
5
|
+
const require_InlineTriggerButton = require('./Embed/InlineTriggerButton.js');
|
|
6
|
+
const require_index = require('./AudioPlayer/index.js');
|
|
7
|
+
const require_AudioEmbed = require('./Embed/AudioEmbed.js');
|
|
8
|
+
const require_H5pEmbed = require('./Embed/H5pEmbed.js');
|
|
9
|
+
const require_ResourceBox = require('./ResourceBox/ResourceBox.js');
|
|
10
|
+
const require_ExternalEmbed = require('./Embed/ExternalEmbed.js');
|
|
11
|
+
const require_IframeEmbed = require('./Embed/IframeEmbed.js');
|
|
12
|
+
const require_FootnoteEmbed = require('./Embed/FootnoteEmbed.js');
|
|
13
|
+
const require_BrightcoveEmbed = require('./Embed/BrightcoveEmbed.js');
|
|
14
|
+
const require_ContentLinkEmbed = require('./Embed/ContentLinkEmbed.js');
|
|
15
|
+
const require_ContentTypeBadge = require('./ContentTypeBadge/ContentTypeBadge.js');
|
|
16
|
+
const require_RelatedArticleList = require('./RelatedArticleList/RelatedArticleList.js');
|
|
17
|
+
const require_RelatedContentEmbed = require('./Embed/RelatedContentEmbed.js');
|
|
18
|
+
const require_ConceptInlineTriggerButton = require('./Embed/ConceptInlineTriggerButton.js');
|
|
19
|
+
const require_GlossExample = require('./Gloss/GlossExample.js');
|
|
20
|
+
const require_Gloss = require('./Gloss/Gloss.js');
|
|
21
|
+
const require_ConceptEmbed = require('./Embed/ConceptEmbed.js');
|
|
22
|
+
const require_UnknownEmbed = require('./Embed/UnknownEmbed.js');
|
|
23
|
+
const require_UuDisclaimerEmbed = require('./Embed/UuDisclaimerEmbed.js');
|
|
24
|
+
const require_CopyrightEmbed = require('./Embed/CopyrightEmbed.js');
|
|
25
|
+
const require_CodeBlock = require('./CodeBlock/CodeBlock.js');
|
|
26
|
+
const require_codeLanguageOptions = require('./CodeBlock/codeLanguageOptions.js');
|
|
27
|
+
const require_CodeEmbed = require('./Embed/CodeEmbed.js');
|
|
28
|
+
const require_EmbedWrapper = require('./Embed/EmbedWrapper.js');
|
|
29
|
+
const require_Concept = require('./Concept/Concept.js');
|
|
30
|
+
const require_ArticleFootNotes = require('./Article/ArticleFootNotes.js');
|
|
31
|
+
const require_ArticleByline = require('./Article/ArticleByline.js');
|
|
32
|
+
const require_Article = require('./Article/Article.js');
|
|
33
|
+
const require_index$1 = require('./model/index.js');
|
|
34
|
+
const require_messages_en = require('./locale/messages-en.js');
|
|
35
|
+
const require_messages_nb = require('./locale/messages-nb.js');
|
|
36
|
+
const require_messages_nn = require('./locale/messages-nn.js');
|
|
37
|
+
const require_messages_se = require('./locale/messages-se.js');
|
|
38
|
+
const require_i18n = require('./i18n/i18n.js');
|
|
39
|
+
const require_relativeUrl = require('./utils/relativeUrl.js');
|
|
40
|
+
const require_index$2 = require('./RelatedArticleList/index.js');
|
|
41
|
+
const require_index$3 = require('./ErrorMessage/index.js');
|
|
42
|
+
const require_FileList = require('./FileList/FileList.js');
|
|
43
|
+
const require_File = require('./FileList/File.js');
|
|
44
|
+
const require_PdfFile = require('./FileList/PdfFile.js');
|
|
45
|
+
const require_index$4 = require('./FactBox/index.js');
|
|
46
|
+
const require_ContentTypeHero = require('./ContentTypeHero/ContentTypeHero.js');
|
|
47
|
+
const require_HomeBreadcrumb = require('./Breadcrumb/HomeBreadcrumb.js');
|
|
48
|
+
const require_index$5 = require('./Breadcrumb/index.js');
|
|
49
|
+
const require_formatNestedMessages = require('./i18n/formatNestedMessages.js');
|
|
50
|
+
const require_TagSelector = require('./TagSelector/TagSelector.js');
|
|
51
|
+
const require_useComponentTranslations = require('./i18n/useComponentTranslations.js');
|
|
52
|
+
const require_ContentTypeBlockQuote = require('./ContentTypeBlockQuote/ContentTypeBlockQuote.js');
|
|
53
|
+
const require_ContentTypeFramedContent = require('./ContentTypeFramedContent/ContentTypeFramedContent.js');
|
|
54
|
+
const require_index$6 = require('./CopyParagraphButton/index.js');
|
|
55
|
+
const require_Pitch = require('./Pitch/Pitch.js');
|
|
56
|
+
const require_KeyFigure = require('./KeyFigure/KeyFigure.js');
|
|
57
|
+
const require_ContactBlock = require('./ContactBlock/ContactBlock.js');
|
|
58
|
+
const require_CampaignBlock = require('./CampaignBlock/CampaignBlock.js');
|
|
59
|
+
const require_Grid = require('./Grid/Grid.js');
|
|
60
|
+
const require_GridParallaxItem = require('./Grid/GridParallaxItem.js');
|
|
61
|
+
const require_LinkBlock = require('./LinkBlock/LinkBlock.js');
|
|
62
|
+
const require_LinkBlockSection = require('./LinkBlock/LinkBlockSection.js');
|
|
63
|
+
const require_ZendeskButton = require('./ZendeskButton/ZendeskButton.js');
|
|
64
|
+
|
|
65
|
+
exports.Article = require_Article.Article;
|
|
66
|
+
exports.ArticleByline = require_ArticleByline.ArticleByline;
|
|
67
|
+
exports.ArticleBylineAccordionItem = require_ArticleByline.ArticleBylineAccordionItem;
|
|
68
|
+
exports.ArticleContent = require_Article.ArticleContent;
|
|
69
|
+
exports.ArticleFootNotes = require_ArticleFootNotes.ArticleFootNotes;
|
|
70
|
+
exports.ArticleFooter = require_Article.ArticleFooter;
|
|
71
|
+
exports.ArticleHGroup = require_Article.ArticleHGroup;
|
|
72
|
+
exports.ArticleHeader = require_Article.ArticleHeader;
|
|
73
|
+
exports.ArticleTitle = require_Article.ArticleTitle;
|
|
74
|
+
exports.ArticleWrapper = require_Article.ArticleWrapper;
|
|
75
|
+
exports.AudioEmbed = require_AudioEmbed.AudioEmbed_default;
|
|
76
|
+
exports.AudioPlayer = require_index.AudioPlayer_default;
|
|
77
|
+
exports.BlockConcept = require_ConceptEmbed.BlockConcept;
|
|
78
|
+
exports.Breadcrumb = require_index$5.Breadcrumb_default;
|
|
79
|
+
exports.BrightcoveEmbed = require_BrightcoveEmbed.BrightcoveEmbed_default;
|
|
80
|
+
exports.CampaignBlock = require_CampaignBlock.CampaignBlock_default;
|
|
81
|
+
exports.CodeBlock = require_CodeBlock.CodeBlock_default;
|
|
82
|
+
exports.CodeEmbed = require_CodeEmbed.CodeEmbed_default;
|
|
83
|
+
exports.Concept = require_Concept.Concept;
|
|
84
|
+
exports.ConceptEmbed = require_ConceptEmbed.ConceptEmbed;
|
|
85
|
+
exports.ConceptInlineTriggerButton = require_ConceptInlineTriggerButton.ConceptInlineTriggerButton;
|
|
86
|
+
exports.ContactBlock = require_ContactBlock.ContactBlock;
|
|
87
|
+
exports.ContentLinkEmbed = require_ContentLinkEmbed.ContentLinkEmbed_default;
|
|
88
|
+
exports.ContentTypeBadge = require_ContentTypeBadge.ContentTypeBadge;
|
|
89
|
+
exports.ContentTypeBlockQuote = require_ContentTypeBlockQuote.ContentTypeBlockQuote;
|
|
90
|
+
exports.ContentTypeFramedContent = require_ContentTypeFramedContent.ContentTypeFramedContent;
|
|
91
|
+
exports.ContentTypeHero = require_ContentTypeHero.ContentTypeHero;
|
|
92
|
+
exports.CopyParagraphButton = require_index$6.CopyParagraphButton_default;
|
|
93
|
+
exports.CopyrightEmbed = require_CopyrightEmbed.CopyrightEmbed_default;
|
|
94
|
+
exports.EmbedByline = require_EmbedByline.EmbedByline;
|
|
95
|
+
exports.EmbedWrapper = require_EmbedWrapper.EmbedWrapper;
|
|
96
|
+
exports.ErrorMessage = require_index$3.ErrorMessage_default;
|
|
97
|
+
exports.ExternalEmbed = require_ExternalEmbed.ExternalEmbed_default;
|
|
98
|
+
exports.FactBox = require_index$4.FactBox_default;
|
|
99
|
+
exports.File = require_File.File;
|
|
100
|
+
exports.FileListElement = require_File.FileListElement;
|
|
101
|
+
exports.FileListEmbed = require_FileList.FileListEmbed;
|
|
102
|
+
exports.FileListItem = require_FileList.FileListItem;
|
|
103
|
+
exports.FileListWrapper = require_FileList.FileListWrapper;
|
|
104
|
+
exports.FootnoteEmbed = require_FootnoteEmbed.FootnoteEmbed_default;
|
|
105
|
+
exports.Gloss = require_Gloss.Gloss_default;
|
|
106
|
+
exports.GlossExample = require_GlossExample.GlossExample_default;
|
|
107
|
+
exports.Grid = require_Grid.Grid;
|
|
108
|
+
exports.GridParallaxItem = require_GridParallaxItem.GridParallaxItem;
|
|
109
|
+
exports.H5pEmbed = require_H5pEmbed.H5pEmbed_default;
|
|
110
|
+
exports.HomeBreadcrumb = require_HomeBreadcrumb.HomeBreadcrumb_default;
|
|
111
|
+
exports.IframeEmbed = require_IframeEmbed.IframeEmbed_default;
|
|
112
|
+
exports.ImageEmbed = require_ImageEmbed.ImageEmbed_default;
|
|
113
|
+
exports.InlineConcept = require_ConceptEmbed.InlineConcept;
|
|
114
|
+
exports.InlineTriggerButton = require_InlineTriggerButton.InlineTriggerButton;
|
|
115
|
+
exports.KeyFigure = require_KeyFigure.KeyFigure_default;
|
|
116
|
+
exports.LicenseLink = require_LicenseLink.LicenseLink;
|
|
117
|
+
exports.LinkBlock = require_LinkBlock.LinkBlock_default;
|
|
118
|
+
exports.LinkBlockSection = require_LinkBlockSection.LinkBlockSection_default;
|
|
119
|
+
exports.PdfFile = require_PdfFile.PdfFile;
|
|
120
|
+
exports.Pitch = require_Pitch.Pitch;
|
|
121
|
+
exports.RelatedArticle = require_RelatedArticleList.RelatedArticle;
|
|
122
|
+
exports.RelatedArticleList = require_index$2.RelatedArticleList_default;
|
|
123
|
+
exports.RelatedContentEmbed = require_RelatedContentEmbed.RelatedContentEmbed_default;
|
|
124
|
+
exports.ResourceBox = require_ResourceBox.ResourceBox_default;
|
|
125
|
+
exports.TagSelectorClearTrigger = require_TagSelector.TagSelectorClearTrigger;
|
|
126
|
+
exports.TagSelectorControl = require_TagSelector.TagSelectorControl;
|
|
127
|
+
exports.TagSelectorInput = require_TagSelector.TagSelectorInput;
|
|
128
|
+
exports.TagSelectorInputBase = require_TagSelector.TagSelectorInputBase;
|
|
129
|
+
exports.TagSelectorItemInput = require_TagSelector.TagSelectorItemInput;
|
|
130
|
+
exports.TagSelectorLabel = require_TagSelector.TagSelectorLabel;
|
|
131
|
+
exports.TagSelectorRoot = require_TagSelector.TagSelectorRoot;
|
|
132
|
+
exports.TagSelectorTrigger = require_TagSelector.TagSelectorTrigger;
|
|
133
|
+
exports.UnknownEmbed = require_UnknownEmbed.UnknownEmbed_default;
|
|
134
|
+
exports.UuDisclaimerEmbed = require_UuDisclaimerEmbed.UuDisclaimerEmbed_default;
|
|
135
|
+
exports.ZendeskButton = require_ZendeskButton.ZendeskButton;
|
|
136
|
+
exports.codeLanguageOptions = require_codeLanguageOptions.codeLanguageOptions;
|
|
137
|
+
exports.constants = require_index$1.model_default;
|
|
138
|
+
exports.contactBlockBackgrounds = require_ContactBlock.contactBlockBackgrounds;
|
|
139
|
+
exports.contentTypeToBadgeVariantMap = require_ContentTypeBadge.contentTypeToBadgeVariantMap;
|
|
140
|
+
exports.formatNestedMessages = require_formatNestedMessages.formatNestedMessages;
|
|
141
|
+
exports.getCrop = require_ImageEmbed.getCrop;
|
|
142
|
+
exports.getFocalPoint = require_ImageEmbed.getFocalPoint;
|
|
143
|
+
exports.getPossiblyRelativeUrl = require_relativeUrl.getPossiblyRelativeUrl;
|
|
144
|
+
exports.i18nInstance = require_i18n.i18nInstance;
|
|
145
|
+
exports.licenseAttributes = require_licenseAttributes.licenseAttributes;
|
|
146
|
+
exports.messagesEN = require_messages_en.messages_en_default;
|
|
147
|
+
exports.messagesNB = require_messages_nb.messages_nb_default;
|
|
148
|
+
exports.messagesNN = require_messages_nn.messages_nn_default;
|
|
149
|
+
exports.messagesSE = require_messages_se.messages_se_default;
|
|
150
|
+
exports.useAudioSearchTranslations = require_useComponentTranslations.useAudioSearchTranslations;
|
|
151
|
+
exports.useComboboxTranslations = require_useComponentTranslations.useComboboxTranslations;
|
|
152
|
+
exports.useDatePickerTranslations = require_useComponentTranslations.useDatePickerTranslations;
|
|
153
|
+
exports.useImageSearchTranslations = require_useComponentTranslations.useImageSearchTranslations;
|
|
154
|
+
exports.usePaginationTranslations = require_useComponentTranslations.usePaginationTranslations;
|
|
155
|
+
exports.useTagSelectorTranslations = require_useComponentTranslations.useTagSelectorTranslations;
|
|
156
|
+
exports.useTagsInputTranslations = require_useComponentTranslations.useTagsInputTranslations;
|
|
157
|
+
exports.useVideoSearchTranslations = require_useComponentTranslations.useVideoSearchTranslations;
|