@ndla/ui 50.1.0 → 50.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Article/Article.js +73 -76
- package/es/Article/ArticleAccessMessage.js +6 -4
- package/es/Article/ArticleByline.js +42 -58
- package/es/Article/ArticleFootNotes.js +17 -17
- package/es/Article/ArticleHeaderWrapper.js +11 -14
- package/es/Article/ArticleNotions.js +13 -10
- package/es/Aside/Aside.js +19 -24
- package/es/AudioPlayer/AudioPlayer.js +40 -53
- package/es/AudioPlayer/Controls.js +74 -97
- package/es/AudioPlayer/SpeechControl.js +11 -8
- package/es/BannerCard/BannerCard.js +19 -25
- package/es/BlogPost/BlogPost.js +18 -17
- package/es/Breadcrumb/Breadcrumb.js +42 -55
- package/es/Breadcrumb/BreadcrumbItem.js +32 -26
- package/es/Breadcrumb/HeaderBreadcrumb.js +15 -12
- package/es/Breadcrumb/HomeBreadcrumb.js +33 -21
- package/es/CampaignBlock/CampaignBlock.js +18 -18
- package/es/CompetenceGoalTab/CompetenceGoalItem.js +22 -21
- package/es/CompetenceGoalTab/CompetenceGoalTab.js +21 -27
- package/es/CompetenceGoalTab/CompetenceItem.js +49 -52
- package/es/CompetenceGoalTab/CoreElementItem.js +11 -8
- package/es/CompetenceGoalTab/SearchButton.js +8 -6
- package/es/CompetenceGoalTab/styles.js +5 -5
- package/es/ContactBlock/ContactBlock.js +46 -45
- package/es/ContentLoader/index.js +26 -40
- package/es/ContentPlaceholder/ContentPlaceholder.js +4 -4
- package/es/ContentTypeBadge/ContentTypeBadge.js +48 -61
- package/es/CopyParagraphButton/CopyParagraphButton.js +24 -33
- package/es/CreatedBy/CreatedBy.js +14 -13
- package/es/DefinitionList/DefinitionDescription.js +10 -17
- package/es/DefinitionList/DefinitionTerm.js +10 -17
- package/es/Embed/AudioEmbed.js +27 -32
- package/es/Embed/BrightcoveEmbed.js +63 -85
- package/es/Embed/ConceptEmbed.js +84 -85
- package/es/Embed/ConceptListEmbed.js +19 -12
- package/es/Embed/ContentLinkEmbed.js +14 -9
- package/es/Embed/EmbedErrorPlaceholder.js +9 -7
- package/es/Embed/ExternalEmbed.js +26 -26
- package/es/Embed/FootnoteEmbed.js +10 -7
- package/es/Embed/H5pEmbed.js +9 -8
- package/es/Embed/IframeEmbed.js +37 -33
- package/es/Embed/ImageEmbed.js +80 -97
- package/es/Embed/RelatedContentEmbed.js +23 -24
- package/es/Embed/UnknownEmbed.js +8 -5
- package/es/Embed/conceptComponents.js +53 -64
- package/es/ErrorMessage/ErrorMessage.js +14 -14
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +8 -5
- package/es/ExpandableBox/ExpandableBox.js +16 -20
- package/es/FactBox/FactBox.js +21 -35
- package/es/Figure/Figure.js +21 -28
- package/es/Figure/FigureOpenDialogButton.js +5 -3
- package/es/FileList/File.js +27 -22
- package/es/FileList/FileList.js +10 -7
- package/es/FileList/PdfFile.js +5 -3
- package/es/Filter/FilterButtons.js +65 -83
- package/es/Filter/FilterCarousel.js +42 -64
- package/es/Filter/FilterList.js +47 -69
- package/es/Filter/FilterListPhone.js +134 -176
- package/es/Filter/ToggleItem.js +25 -26
- package/es/Filter/filterClasses.js +1 -1
- package/es/Footer/EditorName.js +6 -4
- package/es/Footer/Footer.js +23 -22
- package/es/Footer/FooterLinks.js +31 -32
- package/es/Footer/FooterPrivacy.js +17 -17
- package/es/Footer/FooterText.js +5 -3
- package/es/FramedContent/FramedContent.js +12 -19
- package/es/Frontpage/FrontpageAllSubjects.js +65 -76
- package/es/FrontpageArticle/FrontpageArticle.js +22 -20
- package/es/Gloss/Gloss.js +34 -36
- package/es/Grid/Grid.js +24 -29
- package/es/Hero/Hero.js +38 -48
- package/es/Hero/HeroContent.js +1 -1
- package/es/Image/Image.js +37 -51
- package/es/Image/ImageLink.js +12 -19
- package/es/KeyFigure/KeyFigure.js +13 -11
- package/es/LanguageSelector/LanguageSelector.js +32 -33
- package/es/Layout/Content.js +4 -2
- package/es/Layout/LayoutItem.js +10 -17
- package/es/Layout/OneColumn.js +16 -23
- package/es/Layout/PageContainer.js +19 -28
- package/es/LearningPaths/LearningPathContent.js +5 -3
- package/es/LearningPaths/LearningPathInformation.js +17 -14
- package/es/LearningPaths/LearningPathLastStepNavigation.js +15 -12
- package/es/LearningPaths/LearningPathMenu.js +61 -69
- package/es/LearningPaths/LearningPathMenuAside.js +18 -17
- package/es/LearningPaths/LearningPathMenuAsideCopyright.js +12 -11
- package/es/LearningPaths/LearningPathMenuContent.js +86 -50
- package/es/LearningPaths/LearningPathMenuIntro.js +17 -20
- package/es/LearningPaths/LearningPathMenuModalWrapper.js +13 -19
- package/es/LearningPaths/LearningPathMobileHeader.js +6 -5
- package/es/LearningPaths/LearningPathMobileStepInfo.js +9 -6
- package/es/LearningPaths/LearningPathSticky.js +24 -21
- package/es/LearningPaths/LearningPathWrapper.js +6 -4
- package/es/LetterFilter/LetterFilter.js +17 -20
- package/es/LetterFilter/alphabet.js +1 -1
- package/es/LicenseByline/EmbedByline.js +31 -36
- package/es/LicenseByline/LicenseDescription.js +6 -4
- package/es/LicenseByline/LicenseLink.js +7 -6
- package/es/LinkBlock/LinkBlock.js +17 -15
- package/es/LinkBlock/LinkBlockSection.js +12 -20
- package/es/List/OrderedList.js +17 -22
- package/es/List/UnOrderedList.js +10 -17
- package/es/Logo/Logo.js +17 -22
- package/es/Logo/SvgLogo.js +10 -15
- package/es/Masthead/Masthead.js +17 -23
- package/es/Masthead/SkipToMainContent.js +9 -6
- package/es/Masthead/utils.js +12 -24
- package/es/MediaList/MediaList.js +83 -72
- package/es/Messages/MessageBanner.js +14 -10
- package/es/Messages/MessageBox.js +20 -20
- package/es/MyNdla/Resource/Folder.js +35 -30
- package/es/MyNdla/Resource/FolderInput.js +23 -31
- package/es/NDLAFilm/AboutNdlaFilm.js +10 -7
- package/es/NDLAFilm/AllMoviesAlphabetically.js +49 -60
- package/es/NDLAFilm/FilmContentCard.js +28 -40
- package/es/NDLAFilm/FilmContentCardTags.js +14 -16
- package/es/NDLAFilm/FilmMovieList.js +15 -17
- package/es/NDLAFilm/FilmMovieSearch.js +34 -36
- package/es/NDLAFilm/FilmSlideshow.js +32 -51
- package/es/NDLAFilm/MovieGrid.js +23 -26
- package/es/NDLAFilm/VisualElement.js +11 -7
- package/es/NDLAFilm/filmStyles.js +14 -12
- package/es/NDLAFilm/isLetter.js +3 -3
- package/es/Navigation/NavigationBox.js +80 -94
- package/es/NoContentBox/NoContentBox.js +6 -4
- package/es/Notion/Notion.js +24 -26
- package/es/Notion/NotionImage.js +13 -10
- package/es/Programme/Programme.js +39 -21
- package/es/Programme/ProgrammeSubjects.js +19 -25
- package/es/ProgrammeCard/ProgrammeCard.js +10 -8
- package/es/RelatedArticleList/RelatedArticleList.js +51 -69
- package/es/Resource/BlockResource.js +34 -30
- package/es/Resource/ListResource.js +43 -37
- package/es/Resource/resourceComponents.js +69 -78
- package/es/Resource/storyComponents.js +28 -30
- package/es/ResourceBox/ResourceBox.js +14 -12
- package/es/ResourceGroup/ResourceGroup.js +14 -13
- package/es/ResourceGroup/ResourceItem.js +56 -36
- package/es/ResourceGroup/ResourceList.js +23 -31
- package/es/ResourcesWrapper/ResourcesTopicTitle.js +29 -25
- package/es/ResourcesWrapper/ResourcesWrapper.js +10 -16
- package/es/Search/ActiveFilterContent.js +9 -9
- package/es/Search/ActiveFilters.js +31 -24
- package/es/Search/ContentTypeResult.js +49 -66
- package/es/Search/ContentTypeResultStyles.js +19 -27
- package/es/Search/IsPathToHighlight.js +2 -2
- package/es/Search/LoadingWrapper.js +5 -3
- package/es/Search/SearchField.js +42 -48
- package/es/Search/SearchFieldForm.js +9 -9
- package/es/Search/SearchResult.js +53 -59
- package/es/Search/SearchResultSleeve.js +67 -89
- package/es/SearchTypeResult/ActiveFilterContent.js +11 -10
- package/es/SearchTypeResult/ActiveFilters.js +38 -33
- package/es/SearchTypeResult/PopupFilter.js +33 -47
- package/es/SearchTypeResult/ResultNavigation.js +22 -22
- package/es/SearchTypeResult/SearchFieldHeader.js +28 -41
- package/es/SearchTypeResult/SearchFilterContent.js +13 -10
- package/es/SearchTypeResult/SearchHeader.js +47 -57
- package/es/SearchTypeResult/SearchItem.js +30 -29
- package/es/SearchTypeResult/SearchItemList.js +39 -40
- package/es/SearchTypeResult/SearchItems.js +18 -19
- package/es/SearchTypeResult/SearchNotionsResult.js +16 -13
- package/es/SearchTypeResult/SearchSubjectItem.js +23 -14
- package/es/SearchTypeResult/SearchSubjectResult.js +17 -17
- package/es/SearchTypeResult/SearchTypeHeader.js +40 -40
- package/es/SearchTypeResult/SearchTypeResult.js +17 -21
- package/es/SearchTypeResult/SearchViewType.js +16 -19
- package/es/SearchTypeResult/components/ItemContexts.js +39 -38
- package/es/SearchTypeResult/components/ItemResourceHeader.js +24 -30
- package/es/SearchTypeResult/components/ItemTopicHeader.js +14 -11
- package/es/SearchTypeResult/components/SubjectFilters.js +49 -72
- package/es/SectionHeading/SectionHeading.js +11 -11
- package/es/SnackBar/DefaultSnackbar.js +14 -13
- package/es/SnackBar/SnackbarProvider.js +60 -91
- package/es/Subject/SubjectBanner.js +9 -13
- package/es/Subject/SubjectHeader.js +14 -21
- package/es/Table/Table.js +37 -53
- package/es/TagSelector/Control.js +11 -15
- package/es/TagSelector/DropdownIndicator.js +24 -30
- package/es/TagSelector/Input.js +6 -11
- package/es/TagSelector/Menu.js +10 -17
- package/es/TagSelector/MenuList.js +11 -15
- package/es/TagSelector/Option.js +26 -24
- package/es/TagSelector/SelectContainer.js +10 -13
- package/es/TagSelector/TagSelector.js +65 -102
- package/es/TagSelector/ValueButton.js +21 -20
- package/es/TagSelector/ariaMessages.js +83 -81
- package/es/ToolboxPage/ToolboxInfo.js +11 -8
- package/es/Topic/Loader.js +96 -98
- package/es/Topic/Topic.js +50 -52
- package/es/TreeStructure/AddFolderButton.js +22 -21
- package/es/TreeStructure/ComboboxButton.js +27 -28
- package/es/TreeStructure/FolderItem.js +64 -70
- package/es/TreeStructure/FolderItems.js +33 -37
- package/es/TreeStructure/TreeStructure.js +52 -89
- package/es/TreeStructure/arrowNavigation.js +5 -7
- package/es/TreeStructure/helperFunctions.js +19 -24
- package/es/i18n/formatNestedMessages.js +8 -9
- package/es/i18n/i18n.js +3 -3
- package/es/locale/LocaleProvider.js +13 -8
- package/es/locale/messages-en.js +99 -34
- package/es/locale/messages-nb.js +99 -34
- package/es/locale/messages-nn.js +106 -41
- package/es/locale/messages-se.js +98 -33
- package/es/locale/messages-sma.js +103 -38
- package/es/model/ContentType.js +36 -33
- package/es/model/SubjectCategories.js +4 -4
- package/es/model/SubjectTypes.js +3 -3
- package/es/model/WordClass.js +1 -1
- package/es/model/index.js +8 -8
- package/es/types.js +1 -1
- package/es/utils/relativeUrl.js +11 -11
- package/es/utils/resourceTypeColor.js +4 -2
- package/lib/Article/Article.js +80 -85
- package/lib/Article/ArticleAccessMessage.js +15 -15
- package/lib/Article/ArticleByline.js +51 -66
- package/lib/Article/ArticleFootNotes.js +18 -19
- package/lib/Article/ArticleHeaderWrapper.js +20 -22
- package/lib/Article/ArticleNotions.js +20 -18
- package/lib/Article/index.js +9 -11
- package/lib/Aside/Aside.js +28 -32
- package/lib/Aside/index.js +1 -2
- package/lib/AudioPlayer/AudioPlayer.js +47 -61
- package/lib/AudioPlayer/Controls.js +81 -105
- package/lib/AudioPlayer/SpeechControl.js +12 -10
- package/lib/AudioPlayer/index.js +1 -2
- package/lib/BannerCard/BannerCard.js +22 -28
- package/lib/BannerCard/index.js +1 -1
- package/lib/BlogPost/BlogPost.js +19 -19
- package/lib/BlogPost/index.js +1 -1
- package/lib/Breadcrumb/Breadcrumb.js +49 -63
- package/lib/Breadcrumb/BreadcrumbItem.js +39 -34
- package/lib/Breadcrumb/HeaderBreadcrumb.js +16 -14
- package/lib/Breadcrumb/HomeBreadcrumb.js +40 -29
- package/lib/Breadcrumb/index.js +3 -4
- package/lib/CampaignBlock/CampaignBlock.js +25 -26
- package/lib/CampaignBlock/index.js +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalItem.js +23 -23
- package/lib/CompetenceGoalTab/CompetenceGoalTab.js +30 -35
- package/lib/CompetenceGoalTab/CompetenceItem.js +56 -60
- package/lib/CompetenceGoalTab/CoreElementItem.js +12 -10
- package/lib/CompetenceGoalTab/SearchButton.js +9 -8
- package/lib/CompetenceGoalTab/index.js +1 -2
- package/lib/CompetenceGoalTab/styles.js +12 -17
- package/lib/ContactBlock/ContactBlock.js +55 -56
- package/lib/ContactBlock/index.js +1 -2
- package/lib/ContentLoader/index.js +28 -42
- package/lib/ContentPlaceholder/ContentPlaceholder.js +11 -12
- package/lib/ContentPlaceholder/index.js +1 -2
- package/lib/ContentTypeBadge/ContentTypeBadge.js +50 -63
- package/lib/ContentTypeBadge/index.js +8 -9
- package/lib/CopyParagraphButton/CopyParagraphButton.js +31 -41
- package/lib/CopyParagraphButton/index.js +2 -3
- package/lib/CreatedBy/CreatedBy.js +21 -21
- package/lib/CreatedBy/index.js +1 -2
- package/lib/DefinitionList/DefinitionDescription.js +13 -20
- package/lib/DefinitionList/DefinitionTerm.js +13 -20
- package/lib/DefinitionList/index.js +2 -2
- package/lib/Embed/AudioEmbed.js +28 -34
- package/lib/Embed/BrightcoveEmbed.js +70 -93
- package/lib/Embed/ConceptEmbed.js +91 -93
- package/lib/Embed/ConceptListEmbed.js +26 -20
- package/lib/Embed/ContentLinkEmbed.js +15 -11
- package/lib/Embed/EmbedErrorPlaceholder.js +10 -9
- package/lib/Embed/ExternalEmbed.js +33 -34
- package/lib/Embed/FootnoteEmbed.js +11 -9
- package/lib/Embed/H5pEmbed.js +16 -16
- package/lib/Embed/IframeEmbed.js +38 -35
- package/lib/Embed/ImageEmbed.js +91 -109
- package/lib/Embed/RelatedContentEmbed.js +24 -26
- package/lib/Embed/UnknownEmbed.js +9 -7
- package/lib/Embed/conceptComponents.js +56 -67
- package/lib/Embed/index.js +17 -18
- package/lib/ErrorMessage/ErrorMessage.js +15 -16
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +9 -7
- package/lib/ErrorMessage/index.js +2 -3
- package/lib/ExpandableBox/ExpandableBox.js +16 -20
- package/lib/ExpandableBox/index.js +2 -2
- package/lib/FactBox/FactBox.js +28 -43
- package/lib/FactBox/index.js +1 -2
- package/lib/Figure/Figure.js +25 -31
- package/lib/Figure/FigureOpenDialogButton.js +5 -3
- package/lib/Figure/index.js +2 -2
- package/lib/FileList/File.js +34 -30
- package/lib/FileList/FileList.js +17 -15
- package/lib/FileList/PdfFile.js +6 -5
- package/lib/FileList/index.js +3 -4
- package/lib/Filter/FilterButtons.js +72 -91
- package/lib/Filter/FilterCarousel.js +49 -72
- package/lib/Filter/FilterList.js +56 -77
- package/lib/Filter/FilterListPhone.js +143 -184
- package/lib/Filter/ToggleItem.js +34 -34
- package/lib/Filter/filterClasses.js +2 -3
- package/lib/Filter/index.js +5 -5
- package/lib/Footer/EditorName.js +6 -4
- package/lib/Footer/Footer.js +30 -30
- package/lib/Footer/FooterLinks.js +32 -34
- package/lib/Footer/FooterPrivacy.js +24 -25
- package/lib/Footer/FooterText.js +5 -3
- package/lib/Footer/index.js +3 -3
- package/lib/FramedContent/FramedContent.js +14 -21
- package/lib/FramedContent/index.js +1 -2
- package/lib/Frontpage/FrontpageAllSubjects.js +66 -78
- package/lib/FrontpageArticle/FrontpageArticle.js +23 -24
- package/lib/FrontpageArticle/index.js +5 -7
- package/lib/Gloss/Gloss.js +41 -44
- package/lib/Gloss/index.js +1 -1
- package/lib/Grid/Grid.js +31 -37
- package/lib/Grid/index.js +4 -5
- package/lib/Hero/Hero.js +46 -54
- package/lib/Hero/HeroContent.js +2 -3
- package/lib/Hero/index.js +9 -9
- package/lib/Image/Image.js +44 -59
- package/lib/Image/ImageLink.js +18 -25
- package/lib/Image/index.js +5 -7
- package/lib/KeyFigure/KeyFigure.js +20 -19
- package/lib/KeyFigure/index.js +1 -1
- package/lib/LanguageSelector/LanguageSelector.js +39 -41
- package/lib/LanguageSelector/index.js +1 -1
- package/lib/Layout/Content.js +5 -4
- package/lib/Layout/LayoutItem.js +11 -19
- package/lib/Layout/OneColumn.js +19 -26
- package/lib/Layout/PageContainer.js +22 -31
- package/lib/Layout/index.js +4 -5
- package/lib/LearningPaths/LearningPathContent.js +5 -3
- package/lib/LearningPaths/LearningPathInformation.js +17 -14
- package/lib/LearningPaths/LearningPathLastStepNavigation.js +16 -14
- package/lib/LearningPaths/LearningPathMenu.js +70 -77
- package/lib/LearningPaths/LearningPathMenuAside.js +19 -19
- package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +13 -13
- package/lib/LearningPaths/LearningPathMenuContent.js +87 -52
- package/lib/LearningPaths/LearningPathMenuIntro.js +24 -28
- package/lib/LearningPaths/LearningPathMenuModalWrapper.js +22 -27
- package/lib/LearningPaths/LearningPathMobileHeader.js +7 -7
- package/lib/LearningPaths/LearningPathMobileStepInfo.js +10 -8
- package/lib/LearningPaths/LearningPathSticky.js +24 -21
- package/lib/LearningPaths/LearningPathWrapper.js +6 -4
- package/lib/LearningPaths/index.js +10 -10
- package/lib/LetterFilter/LetterFilter.js +18 -22
- package/lib/LetterFilter/alphabet.js +1 -2
- package/lib/LetterFilter/index.js +1 -2
- package/lib/LicenseByline/EmbedByline.js +38 -44
- package/lib/LicenseByline/LicenseDescription.js +7 -6
- package/lib/LicenseByline/LicenseLink.js +8 -8
- package/lib/LicenseByline/index.js +1 -1
- package/lib/LinkBlock/LinkBlock.js +18 -17
- package/lib/LinkBlock/LinkBlockSection.js +15 -23
- package/lib/LinkBlock/index.js +2 -2
- package/lib/List/OrderedList.js +20 -25
- package/lib/List/UnOrderedList.js +13 -20
- package/lib/List/index.js +2 -2
- package/lib/Logo/Logo.js +27 -31
- package/lib/Logo/SvgLogo.js +20 -23
- package/lib/Logo/index.js +1 -2
- package/lib/Masthead/Masthead.js +24 -31
- package/lib/Masthead/SkipToMainContent.js +10 -8
- package/lib/Masthead/index.js +4 -5
- package/lib/Masthead/utils.js +20 -30
- package/lib/MediaList/MediaList.js +91 -78
- package/lib/MediaList/index.js +6 -6
- package/lib/Messages/MessageBanner.js +21 -18
- package/lib/Messages/MessageBox.js +27 -28
- package/lib/Messages/index.js +2 -2
- package/lib/MyNdla/Resource/Folder.js +42 -38
- package/lib/MyNdla/Resource/FolderInput.js +26 -34
- package/lib/MyNdla/Resource/index.js +2 -2
- package/lib/MyNdla/index.js +2 -2
- package/lib/NDLAFilm/AboutNdlaFilm.js +11 -9
- package/lib/NDLAFilm/AllMoviesAlphabetically.js +58 -68
- package/lib/NDLAFilm/FilmContentCard.js +35 -48
- package/lib/NDLAFilm/FilmContentCardTags.js +15 -18
- package/lib/NDLAFilm/FilmMovieList.js +16 -19
- package/lib/NDLAFilm/FilmMovieSearch.js +35 -38
- package/lib/NDLAFilm/FilmSlideshow.js +39 -59
- package/lib/NDLAFilm/MovieGrid.js +24 -28
- package/lib/NDLAFilm/VisualElement.js +18 -15
- package/lib/NDLAFilm/filmStyles.js +14 -14
- package/lib/NDLAFilm/index.js +6 -6
- package/lib/NDLAFilm/isLetter.js +3 -3
- package/lib/Navigation/NavigationBox.js +81 -96
- package/lib/Navigation/index.js +1 -1
- package/lib/NoContentBox/NoContentBox.js +7 -6
- package/lib/NoContentBox/index.js +1 -2
- package/lib/Notion/Notion.js +31 -34
- package/lib/Notion/NotionImage.js +13 -10
- package/lib/Notion/index.js +1 -1
- package/lib/Programme/Programme.js +42 -26
- package/lib/Programme/ProgrammeSubjects.js +20 -27
- package/lib/Programme/index.js +2 -3
- package/lib/ProgrammeCard/ProgrammeCard.js +11 -10
- package/lib/ProgrammeCard/index.js +1 -1
- package/lib/RelatedArticleList/RelatedArticleList.js +57 -75
- package/lib/RelatedArticleList/index.js +2 -3
- package/lib/Resource/BlockResource.js +41 -38
- package/lib/Resource/ListResource.js +50 -45
- package/lib/Resource/index.js +2 -2
- package/lib/Resource/resourceComponents.js +77 -88
- package/lib/Resource/storyComponents.js +28 -31
- package/lib/ResourceBox/ResourceBox.js +15 -14
- package/lib/ResourceBox/index.js +1 -1
- package/lib/ResourceGroup/ResourceGroup.js +15 -15
- package/lib/ResourceGroup/ResourceItem.js +65 -47
- package/lib/ResourceGroup/ResourceList.js +26 -34
- package/lib/ResourceGroup/index.js +1 -2
- package/lib/ResourcesWrapper/ResourcesTopicTitle.js +30 -27
- package/lib/ResourcesWrapper/ResourcesWrapper.js +13 -19
- package/lib/ResourcesWrapper/index.js +2 -3
- package/lib/Search/ActiveFilterContent.js +10 -12
- package/lib/Search/ActiveFilters.js +34 -29
- package/lib/Search/ContentTypeResult.js +50 -68
- package/lib/Search/ContentTypeResultStyles.js +20 -38
- package/lib/Search/IsPathToHighlight.js +2 -2
- package/lib/Search/LoadingWrapper.js +6 -5
- package/lib/Search/SearchField.js +51 -56
- package/lib/Search/SearchFieldForm.js +9 -9
- package/lib/Search/SearchResult.js +53 -59
- package/lib/Search/SearchResultSleeve.js +76 -97
- package/lib/Search/index.js +4 -4
- package/lib/SearchTypeResult/ActiveFilterContent.js +18 -19
- package/lib/SearchTypeResult/ActiveFilters.js +47 -44
- package/lib/SearchTypeResult/PopupFilter.js +40 -55
- package/lib/SearchTypeResult/ResultNavigation.js +23 -24
- package/lib/SearchTypeResult/SearchFieldHeader.js +35 -49
- package/lib/SearchTypeResult/SearchFilterContent.js +20 -18
- package/lib/SearchTypeResult/SearchHeader.js +54 -65
- package/lib/SearchTypeResult/SearchItem.js +37 -37
- package/lib/SearchTypeResult/SearchItemList.js +46 -48
- package/lib/SearchTypeResult/SearchItems.js +25 -27
- package/lib/SearchTypeResult/SearchNotionsResult.js +17 -15
- package/lib/SearchTypeResult/SearchSubjectItem.js +30 -22
- package/lib/SearchTypeResult/SearchSubjectResult.js +18 -19
- package/lib/SearchTypeResult/SearchTypeHeader.js +47 -48
- package/lib/SearchTypeResult/SearchTypeResult.js +26 -29
- package/lib/SearchTypeResult/SearchViewType.js +23 -27
- package/lib/SearchTypeResult/components/ItemContexts.js +46 -46
- package/lib/SearchTypeResult/components/ItemResourceHeader.js +31 -38
- package/lib/SearchTypeResult/components/ItemTopicHeader.js +21 -19
- package/lib/SearchTypeResult/components/SubjectFilters.js +56 -80
- package/lib/SearchTypeResult/index.js +6 -6
- package/lib/SectionHeading/SectionHeading.js +12 -13
- package/lib/SectionHeading/index.js +1 -2
- package/lib/SnackBar/DefaultSnackbar.js +15 -15
- package/lib/SnackBar/SnackbarProvider.js +67 -99
- package/lib/SnackBar/index.js +4 -4
- package/lib/Subject/SubjectBanner.js +10 -15
- package/lib/Subject/SubjectHeader.js +15 -23
- package/lib/Subject/index.js +2 -2
- package/lib/Table/Table.js +44 -62
- package/lib/Table/index.js +4 -6
- package/lib/TagSelector/Control.js +20 -23
- package/lib/TagSelector/DropdownIndicator.js +31 -38
- package/lib/TagSelector/Input.js +15 -19
- package/lib/TagSelector/Menu.js +12 -19
- package/lib/TagSelector/MenuList.js +20 -24
- package/lib/TagSelector/Option.js +35 -32
- package/lib/TagSelector/SelectContainer.js +19 -21
- package/lib/TagSelector/TagSelector.js +65 -103
- package/lib/TagSelector/ValueButton.js +30 -29
- package/lib/TagSelector/ariaMessages.js +83 -81
- package/lib/TagSelector/index.js +1 -1
- package/lib/ToolboxPage/ToolboxInfo.js +12 -10
- package/lib/ToolboxPage/index.js +1 -1
- package/lib/Topic/Loader.js +97 -100
- package/lib/Topic/Topic.js +57 -60
- package/lib/Topic/index.js +1 -2
- package/lib/TreeStructure/AddFolderButton.js +29 -29
- package/lib/TreeStructure/ComboboxButton.js +28 -30
- package/lib/TreeStructure/FolderItem.js +71 -78
- package/lib/TreeStructure/FolderItems.js +40 -45
- package/lib/TreeStructure/TreeStructure.js +59 -98
- package/lib/TreeStructure/arrowNavigation.js +5 -7
- package/lib/TreeStructure/helperFunctions.js +19 -24
- package/lib/TreeStructure/index.js +1 -1
- package/lib/i18n/formatNestedMessages.js +8 -9
- package/lib/i18n/i18n.js +3 -5
- package/lib/i18n/index.js +2 -2
- package/lib/index.js +175 -176
- package/lib/locale/LocaleProvider.js +14 -10
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +108 -41
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +108 -41
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +115 -48
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +107 -40
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +112 -45
- package/lib/model/ContentType.js +37 -53
- package/lib/model/SubjectCategories.js +4 -8
- package/lib/model/SubjectTypes.js +3 -6
- package/lib/model/WordClass.js +2 -3
- package/lib/model/index.js +8 -10
- package/lib/types.js +1 -1
- package/lib/utils/relativeUrl.js +11 -11
- package/lib/utils/resourceTypeColor.js +5 -4
- package/package.json +14 -12
- package/src/Footer/Footer.stories.tsx +3 -3
- package/src/NDLAFilm/filmStyles.ts +9 -2
- package/src/locale/messages-en.ts +2 -1
- package/src/locale/messages-nb.ts +3 -2
- package/src/locale/messages-nn.ts +10 -9
- package/src/locale/messages-se.ts +2 -1
- package/src/locale/messages-sma.ts +7 -6
|
@@ -6,30 +6,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.wordClass = exports.subjectTypes = exports.subjectCategories = exports.default = exports.contentTypes = void 0;
|
|
7
7
|
var _licenses = require("@ndla/licenses");
|
|
8
8
|
var _model = _interopRequireDefault(require("../model"));
|
|
9
|
-
var _subjectCategories, _subjectTypes, _contentTypeResultsSh, _contentTypeResultsSh2, _contentTypeResultsNo, _wordClass;
|
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
subjectTypes = _model.default.subjectTypes,
|
|
26
|
-
wordClass = _model.default.wordClass;
|
|
10
|
+
/**
|
|
11
|
+
* Copyright (c) 2018-present, NDLA.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
contentTypes,
|
|
20
|
+
subjectCategories,
|
|
21
|
+
subjectTypes,
|
|
22
|
+
wordClass
|
|
23
|
+
} = _model.default;
|
|
27
24
|
exports.wordClass = wordClass;
|
|
28
25
|
exports.subjectTypes = subjectTypes;
|
|
29
26
|
exports.subjectCategories = subjectCategories;
|
|
30
27
|
exports.contentTypes = contentTypes;
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const titleTemplate = ' - NDLA';
|
|
29
|
+
const messages = {
|
|
33
30
|
common: {
|
|
34
31
|
subject: 'Fag',
|
|
35
32
|
subject_plural: 'Fag'
|
|
@@ -75,7 +72,7 @@ var messages = _objectSpread(_objectSpread({
|
|
|
75
72
|
onChange: {
|
|
76
73
|
deselect: 'emneknagg {{label}}, fjernet.',
|
|
77
74
|
clear: 'Alle valgte emneknagger fjernet.',
|
|
78
|
-
initialFocus:
|
|
75
|
+
initialFocus: `Emneknagger {{labels}}, valgt.`,
|
|
79
76
|
selectedDisabled: 'Emneknagg {{label}} kan ikke velges. Velg et annet alternativ.',
|
|
80
77
|
selected: 'Emneknagg {{label}}, valgt.'
|
|
81
78
|
},
|
|
@@ -95,12 +92,12 @@ var messages = _objectSpread(_objectSpread({
|
|
|
95
92
|
showTags: 'Vis emneknagger'
|
|
96
93
|
},
|
|
97
94
|
htmlTitles: {
|
|
98
|
-
titleTemplate
|
|
99
|
-
welcomePage:
|
|
95
|
+
titleTemplate,
|
|
96
|
+
welcomePage: `Åvtesæjroe${titleTemplate}`,
|
|
100
97
|
topicPage: 'Teema',
|
|
101
|
-
subjectsPage:
|
|
102
|
-
searchPage:
|
|
103
|
-
notFound:
|
|
98
|
+
subjectsPage: `Veeljh faagem${titleTemplate}`,
|
|
99
|
+
searchPage: `Ohtsh${titleTemplate}`,
|
|
100
|
+
notFound: `Ij sæjroe gååvnesh${titleTemplate}`
|
|
104
101
|
},
|
|
105
102
|
newsLetter: {
|
|
106
103
|
heading: 'Saernieprievie',
|
|
@@ -124,8 +121,18 @@ var messages = _objectSpread(_objectSpread({
|
|
|
124
121
|
embed: 'Lissehth',
|
|
125
122
|
notSupported: 'Idtji gåaredh sisvegem lissiehtidh. Vaeltieh kopijem gaaltijekodeste vuelielistie juktie dam dov sæjrose lissiehtidh.'
|
|
126
123
|
},
|
|
127
|
-
subjectCategories:
|
|
128
|
-
|
|
124
|
+
subjectCategories: {
|
|
125
|
+
[subjectCategories.ACTIVE_SUBJECTS]: 'Aktijve',
|
|
126
|
+
[subjectCategories.ARCHIVE_SUBJECTS]: 'Eah vielie gååvnesh',
|
|
127
|
+
[subjectCategories.BETA_SUBJECTS]: 'Båetije',
|
|
128
|
+
[subjectCategories.OTHER]: 'Andre ressurser',
|
|
129
|
+
[subjectTypes.RESOURCE_COLLECTION]: 'Ressurssamlinger'
|
|
130
|
+
},
|
|
131
|
+
subjectTypes: {
|
|
132
|
+
[subjectTypes.BETA_SUBJECT]: 'Betafag',
|
|
133
|
+
[subjectTypes.SUBJECT]: 'Faagem',
|
|
134
|
+
[subjectTypes.RESOURCE_COLLECTION]: 'Ressurssamling'
|
|
135
|
+
},
|
|
129
136
|
searchPage: {
|
|
130
137
|
noHits: 'Ij naan tjaalegh dov ohtseminie sjïehth: {{query}}',
|
|
131
138
|
noHitsShort: 'Ij naan gaavnedimmieh ohtsemasse: {{query}}',
|
|
@@ -373,9 +380,33 @@ var messages = _objectSpread(_objectSpread({
|
|
|
373
380
|
learningResourcesHeading: 'Lïeremevierhtieh',
|
|
374
381
|
back: 'Bååstede',
|
|
375
382
|
additionalFilterLabel: 'Lissievierhtieh',
|
|
376
|
-
contentTypeResultsShowMore:
|
|
377
|
-
|
|
378
|
-
|
|
383
|
+
contentTypeResultsShowMore: {
|
|
384
|
+
[contentTypes.SUBJECT_MATERIAL]: 'Vuesehth jienebh faage-aamhtesh',
|
|
385
|
+
[contentTypes.TASKS_AND_ACTIVITIES]: 'Vuesehth jienebh laavenjassh jïh darjomh',
|
|
386
|
+
[contentTypes.LEARNING_PATH]: 'Vuesehth jienebh lïeremebaalkah',
|
|
387
|
+
[contentTypes.ASSESSMENT_RESOURCES]: 'Vuesehth jienebh vuarjasjimmievierhtieh',
|
|
388
|
+
[contentTypes.SOURCE_MATERIAL]: 'Vuesehth jienebh gaaltijevierhtieh',
|
|
389
|
+
[contentTypes.EXTERNAL_LEARNING_RESOURCES]: 'Vuesehth jienebh byjngetje lïeremevierhtieh',
|
|
390
|
+
unGrouped: 'Vuesehth jienebh vierhtieh'
|
|
391
|
+
},
|
|
392
|
+
contentTypeResultsShowLess: {
|
|
393
|
+
[contentTypes.SUBJECT_MATERIAL]: 'Vuesehth vaenebh faage-aamhtesh',
|
|
394
|
+
[contentTypes.TASKS_AND_ACTIVITIES]: 'Vuesehth vaenebh laavenjassh jïh darjomh',
|
|
395
|
+
[contentTypes.LEARNING_PATH]: 'Vuesehth vaenebh lïeremebaalkah',
|
|
396
|
+
[contentTypes.ASSESSMENT_RESOURCES]: 'Vuesehth vaenebh vuarjasjimmievierhtieh',
|
|
397
|
+
[contentTypes.SOURCE_MATERIAL]: 'Vuesehth vaenebh gaaltijevierhtieh',
|
|
398
|
+
[contentTypes.EXTERNAL_LEARNING_RESOURCES]: 'Vuesehth vaenebh byjngetje lïeremevierhtieh',
|
|
399
|
+
unGrouped: 'Vuesehth vaenebh vierhtieh'
|
|
400
|
+
},
|
|
401
|
+
contentTypeResultsNoHit: {
|
|
402
|
+
[contentTypes.SUBJECT_MATERIAL]: 'Ij naan faage-aamhtesh',
|
|
403
|
+
[contentTypes.TASKS_AND_ACTIVITIES]: 'Ij naan laavenjassh',
|
|
404
|
+
[contentTypes.LEARNING_PATH]: 'Ij naan lïeremebaalkah',
|
|
405
|
+
[contentTypes.ASSESSMENT_RESOURCES]: 'Ij naan vuarjasjimmievierhtieh',
|
|
406
|
+
[contentTypes.SOURCE_MATERIAL]: 'Ij naan gaaltijevierhtieh',
|
|
407
|
+
[contentTypes.EXTERNAL_LEARNING_RESOURCES]: 'Ij naan byjngetje lïeremevierhtieh',
|
|
408
|
+
unGrouped: 'Ij naan vierhtieh'
|
|
409
|
+
}
|
|
379
410
|
}
|
|
380
411
|
},
|
|
381
412
|
logo: {
|
|
@@ -869,7 +900,7 @@ var messages = _objectSpread(_objectSpread({
|
|
|
869
900
|
previousArrow: 'Gå til førre steg'
|
|
870
901
|
},
|
|
871
902
|
dropdown: {
|
|
872
|
-
numberHits:
|
|
903
|
+
numberHits: `Datne {{hits}} gaavnedimmieh åadtjoejih`,
|
|
873
904
|
searching: 'Ohtseminie...',
|
|
874
905
|
create: 'Darjoeh orre',
|
|
875
906
|
isSelectedItem: 'Lissiehtamme',
|
|
@@ -955,7 +986,7 @@ var messages = _objectSpread(_objectSpread({
|
|
|
955
986
|
title: 'Tihtele',
|
|
956
987
|
cancel: 'Orrejh',
|
|
957
988
|
save: 'Vöörhkh',
|
|
958
|
-
photo: '
|
|
989
|
+
photo: 'Bilde',
|
|
959
990
|
email: 'E-post',
|
|
960
991
|
image: {
|
|
961
992
|
altText: 'Alt-tekst',
|
|
@@ -1037,8 +1068,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1037
1068
|
files: 'Filer',
|
|
1038
1069
|
fileTypesNotSupported: 'Filtypen(e) støttast ikkje: {{fileTypes}}',
|
|
1039
1070
|
download: 'Veedtjh fijlem: ',
|
|
1040
|
-
expandButton: 'Vuesehth stoerre versjovnem'
|
|
1041
|
-
|
|
1071
|
+
expandButton: 'Vuesehth stoerre versjovnem',
|
|
1072
|
+
..._licenses.contributorTypes.nb,
|
|
1042
1073
|
filterButtons: {
|
|
1043
1074
|
removeAllFilters: 'Skubph filterem'
|
|
1044
1075
|
},
|
|
@@ -1137,10 +1168,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1137
1168
|
unShare: 'Når du avsluttar deling, sluttar lenka til den delte mappa og eventuelle undermapper å verke. Dersom du har delt lenka med nokon, kan dei ikkje lenger sjå innhaldet i mappa. Dette gjelder òg lenker til eventuelle undermapper.'
|
|
1138
1169
|
},
|
|
1139
1170
|
button: {
|
|
1140
|
-
share: '
|
|
1141
|
-
preview: '
|
|
1142
|
-
|
|
1143
|
-
|
|
1171
|
+
share: 'Juekieh maabpah',
|
|
1172
|
+
preview: 'Maahpa åvtelhbodti vuartasjidh',
|
|
1173
|
+
goTo: 'Vaedtsieh naemhtie juekedh mappine',
|
|
1174
|
+
unShare: 'Orrijh juekedh',
|
|
1175
|
+
shareLink: 'Lïenghkem kopijeradidh'
|
|
1144
1176
|
}
|
|
1145
1177
|
}
|
|
1146
1178
|
},
|
|
@@ -1276,7 +1308,7 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1276
1308
|
our: ' vår.'
|
|
1277
1309
|
},
|
|
1278
1310
|
privacy: 'personvernerklæringa',
|
|
1279
|
-
privacyLink: 'https://
|
|
1311
|
+
privacyLink: 'https://ndla.no/article/personvernerklaering',
|
|
1280
1312
|
questions: {
|
|
1281
1313
|
question: 'Lurer du på noe?',
|
|
1282
1314
|
ask: 'Spør NDLA'
|
|
@@ -1412,9 +1444,9 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1412
1444
|
embed: {
|
|
1413
1445
|
conceptListError: 'Klarte ikkje å vise forklaringsliste',
|
|
1414
1446
|
linkError: 'Klarte ikkje å vise lenke.',
|
|
1415
|
-
unsupported:
|
|
1447
|
+
unsupported: `Embed {{type}} er ikkje støtta.`,
|
|
1416
1448
|
goTo: 'Gå til {{type}}',
|
|
1417
|
-
embedError:
|
|
1449
|
+
embedError: `Orsak, ein feil oppstod ved lasting av {{type}}. Prøv å laste inn sida på nytt.`,
|
|
1418
1450
|
type: {
|
|
1419
1451
|
image: 'Bilde',
|
|
1420
1452
|
video: 'Video',
|
|
@@ -1434,10 +1466,45 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1434
1466
|
pinyin: 'Pinyin'
|
|
1435
1467
|
}
|
|
1436
1468
|
},
|
|
1437
|
-
wordClass:
|
|
1469
|
+
wordClass: {
|
|
1470
|
+
[wordClass.wordClass.adjective]: 'Adjektiv',
|
|
1471
|
+
[wordClass.wordClass.adverb]: 'Adverb',
|
|
1472
|
+
[wordClass.wordClass.properNoun]: 'Egennavn',
|
|
1473
|
+
[wordClass.wordClass.auxiliary]: 'Hjelpeord',
|
|
1474
|
+
[wordClass.wordClass.complement]: 'Komplement',
|
|
1475
|
+
[wordClass.wordClass.conjunction]: 'Konjunksjon',
|
|
1476
|
+
[wordClass.wordClass.coverb]: 'Koverb',
|
|
1477
|
+
[wordClass.wordClass.determiner]: 'Bestemmerord',
|
|
1478
|
+
[wordClass.wordClass.interjection]: 'Interjeksjon',
|
|
1479
|
+
[wordClass.wordClass.quantifier]: 'Kvantor',
|
|
1480
|
+
[wordClass.wordClass.marker]: 'Markør',
|
|
1481
|
+
[wordClass.wordClass.modalVerb]: 'Modalverb',
|
|
1482
|
+
[wordClass.wordClass.measureWord]: 'Målord',
|
|
1483
|
+
[wordClass.wordClass.noun]: 'Substantiv',
|
|
1484
|
+
[wordClass.wordClass['noun-zh']]: 'Nomen',
|
|
1485
|
+
[wordClass.wordClass.nounPhrase]: 'Nominalfrase',
|
|
1486
|
+
[wordClass.wordClass.onomatopoeia]: 'Onomatopoetikon',
|
|
1487
|
+
[wordClass.wordClass.particle]: 'Partikkel',
|
|
1488
|
+
[wordClass.wordClass.demonstrative]: 'Pekeord',
|
|
1489
|
+
[wordClass.wordClass.personalPronoun]: 'Personlig Pronomen',
|
|
1490
|
+
[wordClass.wordClass.preposition]: 'Preposisjon',
|
|
1491
|
+
[wordClass.wordClass.pronoun]: 'Pronomen',
|
|
1492
|
+
[wordClass.wordClass.questionWord]: 'Spørreord',
|
|
1493
|
+
[wordClass.wordClass.locationWord]: 'Stedsord',
|
|
1494
|
+
[wordClass.wordClass.suffix]: 'Suffiks',
|
|
1495
|
+
[wordClass.wordClass.numeral]: 'Tallord',
|
|
1496
|
+
[wordClass.wordClass.timeWord]: 'Tidsord',
|
|
1497
|
+
[wordClass.wordClass.timeExpression]: 'Tidsuttrykk',
|
|
1498
|
+
[wordClass.wordClass.stativeVerb]: 'Tilstandsverb',
|
|
1499
|
+
[wordClass.wordClass.subordinatingConjunction]: 'Subjunksjon',
|
|
1500
|
+
[wordClass.wordClass.exclamationWord]: 'Utropsord',
|
|
1501
|
+
[wordClass.wordClass.expression]: 'Uttrykk',
|
|
1502
|
+
[wordClass.wordClass.verb]: 'Verb',
|
|
1503
|
+
[wordClass.wordClass.verbComplement]: 'Verb-Komplement',
|
|
1504
|
+
[wordClass.wordClass.verbObject]: 'Verb-Objekt'
|
|
1505
|
+
},
|
|
1438
1506
|
about: {
|
|
1439
1507
|
menuTitle: 'Om NDLA'
|
|
1440
1508
|
}
|
|
1441
|
-
}
|
|
1442
|
-
var _default = messages;
|
|
1443
|
-
exports.default = _default;
|
|
1509
|
+
};
|
|
1510
|
+
var _default = exports.default = messages;
|
package/lib/model/ContentType.js
CHANGED
|
@@ -4,11 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resourceEmbedTypeMapping = exports.contentTypes = exports.contentTypeMapping = exports.TOPIC = exports.TASKS_AND_ACTIVITIES = exports.SUBJECT_MATERIAL = exports.SUBJECT = exports.SOURCE_MATERIAL = exports.RESOURCE_TYPE_TASKS_AND_ACTIVITIES = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SOURCE_MATERIAL = exports.RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES = exports.RESOURCE_TYPE_ASSESSMENT_RESOURCES = exports.MULTIDISCIPLINARY_TOPIC = exports.ListOfContentTypes = exports.LEARNING_PATH = exports.EXTERNAL_LEARNING_RESOURCES = exports.ASSESSMENT_RESOURCES = void 0;
|
|
7
|
-
var _contentTypeMapping;
|
|
8
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
9
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
11
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
7
|
/**
|
|
13
8
|
* Copyright (c) 2017-present, NDLA.
|
|
14
9
|
*
|
|
@@ -17,56 +12,45 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
17
12
|
*
|
|
18
13
|
*/
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
exports.
|
|
22
|
-
|
|
23
|
-
exports.
|
|
24
|
-
|
|
25
|
-
exports.
|
|
26
|
-
|
|
27
|
-
exports.
|
|
28
|
-
|
|
29
|
-
exports.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
SUBJECT_MATERIAL: SUBJECT_MATERIAL,
|
|
40
|
-
TASKS_AND_ACTIVITIES: TASKS_AND_ACTIVITIES,
|
|
41
|
-
ASSESSMENT_RESOURCES: ASSESSMENT_RESOURCES,
|
|
42
|
-
SUBJECT: SUBJECT,
|
|
43
|
-
EXTERNAL_LEARNING_RESOURCES: EXTERNAL_LEARNING_RESOURCES,
|
|
44
|
-
SOURCE_MATERIAL: SOURCE_MATERIAL,
|
|
45
|
-
LEARNING_PATH: LEARNING_PATH,
|
|
46
|
-
TOPIC: TOPIC,
|
|
47
|
-
MULTIDISCIPLINARY_TOPIC: MULTIDISCIPLINARY_TOPIC
|
|
15
|
+
const SUBJECT_MATERIAL = exports.SUBJECT_MATERIAL = 'subject-material';
|
|
16
|
+
const TASKS_AND_ACTIVITIES = exports.TASKS_AND_ACTIVITIES = 'tasks-and-activities';
|
|
17
|
+
const ASSESSMENT_RESOURCES = exports.ASSESSMENT_RESOURCES = 'assessment-resources';
|
|
18
|
+
const SUBJECT = exports.SUBJECT = 'subject';
|
|
19
|
+
const EXTERNAL_LEARNING_RESOURCES = exports.EXTERNAL_LEARNING_RESOURCES = 'external-learning-resources';
|
|
20
|
+
const SOURCE_MATERIAL = exports.SOURCE_MATERIAL = 'source-material';
|
|
21
|
+
const LEARNING_PATH = exports.LEARNING_PATH = 'learning-path';
|
|
22
|
+
const TOPIC = exports.TOPIC = 'topic';
|
|
23
|
+
const MULTIDISCIPLINARY_TOPIC = exports.MULTIDISCIPLINARY_TOPIC = 'multidisciplinary-topic';
|
|
24
|
+
const contentTypes = exports.contentTypes = {
|
|
25
|
+
SUBJECT_MATERIAL,
|
|
26
|
+
TASKS_AND_ACTIVITIES,
|
|
27
|
+
ASSESSMENT_RESOURCES,
|
|
28
|
+
SUBJECT,
|
|
29
|
+
EXTERNAL_LEARNING_RESOURCES,
|
|
30
|
+
SOURCE_MATERIAL,
|
|
31
|
+
LEARNING_PATH,
|
|
32
|
+
TOPIC,
|
|
33
|
+
MULTIDISCIPLINARY_TOPIC
|
|
48
34
|
};
|
|
49
|
-
exports.
|
|
50
|
-
|
|
51
|
-
exports.
|
|
52
|
-
|
|
53
|
-
exports.
|
|
54
|
-
|
|
55
|
-
exports.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
exports.
|
|
66
|
-
var resourceEmbedTypeMapping = {
|
|
35
|
+
const RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_LEARNING_PATH = 'urn:resourcetype:learningPath';
|
|
36
|
+
const RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = 'urn:resourcetype:subjectMaterial';
|
|
37
|
+
const RESOURCE_TYPE_TASKS_AND_ACTIVITIES = exports.RESOURCE_TYPE_TASKS_AND_ACTIVITIES = 'urn:resourcetype:tasksAndActivities';
|
|
38
|
+
const RESOURCE_TYPE_ASSESSMENT_RESOURCES = exports.RESOURCE_TYPE_ASSESSMENT_RESOURCES = 'urn:resourcetype:reviewResource';
|
|
39
|
+
const RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES = exports.RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES = 'urn:resourcetype:externalResource';
|
|
40
|
+
const RESOURCE_TYPE_SOURCE_MATERIAL = exports.RESOURCE_TYPE_SOURCE_MATERIAL = 'urn:resourcetype:SourceMaterial';
|
|
41
|
+
const ListOfContentTypes = exports.ListOfContentTypes = ['SUBJECT_MATERIAL', 'TASKS_AND_ACTIVITIES', 'ASSESSMENT_RESOURCES', 'SUBJECT', 'EXTERNAL_LEARNING_RESOURCES', 'SOURCE_MATERIAL', 'LEARNING_PATH', 'TOPIC', 'MULTIDISIPLINARY_TOPIC'];
|
|
42
|
+
const contentTypeMapping = exports.contentTypeMapping = {
|
|
43
|
+
[RESOURCE_TYPE_LEARNING_PATH]: LEARNING_PATH,
|
|
44
|
+
[RESOURCE_TYPE_SUBJECT_MATERIAL]: SUBJECT_MATERIAL,
|
|
45
|
+
[RESOURCE_TYPE_TASKS_AND_ACTIVITIES]: TASKS_AND_ACTIVITIES,
|
|
46
|
+
[RESOURCE_TYPE_ASSESSMENT_RESOURCES]: ASSESSMENT_RESOURCES,
|
|
47
|
+
[RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES]: EXTERNAL_LEARNING_RESOURCES,
|
|
48
|
+
[RESOURCE_TYPE_SOURCE_MATERIAL]: SOURCE_MATERIAL,
|
|
49
|
+
default: SUBJECT_MATERIAL
|
|
50
|
+
};
|
|
51
|
+
const resourceEmbedTypeMapping = exports.resourceEmbedTypeMapping = {
|
|
67
52
|
image: 'image',
|
|
68
53
|
video: 'video',
|
|
69
54
|
concept: 'concept',
|
|
70
55
|
audio: 'audio'
|
|
71
|
-
};
|
|
72
|
-
exports.resourceEmbedTypeMapping = resourceEmbedTypeMapping;
|
|
56
|
+
};
|
|
@@ -12,11 +12,7 @@ exports.OTHER = exports.BETA_SUBJECTS = exports.ARCHIVE_SUBJECTS = exports.ACTIV
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
exports.
|
|
17
|
-
|
|
18
|
-
exports.
|
|
19
|
-
var BETA_SUBJECTS = 'beta';
|
|
20
|
-
exports.BETA_SUBJECTS = BETA_SUBJECTS;
|
|
21
|
-
var OTHER = 'otherResources';
|
|
22
|
-
exports.OTHER = OTHER;
|
|
15
|
+
const ACTIVE_SUBJECTS = exports.ACTIVE_SUBJECTS = 'active';
|
|
16
|
+
const ARCHIVE_SUBJECTS = exports.ARCHIVE_SUBJECTS = 'archive';
|
|
17
|
+
const BETA_SUBJECTS = exports.BETA_SUBJECTS = 'beta';
|
|
18
|
+
const OTHER = exports.OTHER = 'otherResources';
|
|
@@ -12,9 +12,6 @@ exports.SUBJECT = exports.RESOURCE_COLLECTION = exports.BETA_SUBJECT = void 0;
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
exports.
|
|
17
|
-
|
|
18
|
-
exports.SUBJECT = SUBJECT;
|
|
19
|
-
var RESOURCE_COLLECTION = 'resourceCollection';
|
|
20
|
-
exports.RESOURCE_COLLECTION = RESOURCE_COLLECTION;
|
|
15
|
+
const BETA_SUBJECT = exports.BETA_SUBJECT = 'betaSubject';
|
|
16
|
+
const SUBJECT = exports.SUBJECT = 'subject';
|
|
17
|
+
const RESOURCE_COLLECTION = exports.RESOURCE_COLLECTION = 'resourceCollection';
|
package/lib/model/WordClass.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.wordClass = void 0;
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const wordClass = exports.wordClass = {
|
|
16
16
|
adjective: 'adjective',
|
|
17
17
|
adverb: 'adverb',
|
|
18
18
|
properNoun: 'proper-noun',
|
|
@@ -48,5 +48,4 @@ var wordClass = {
|
|
|
48
48
|
verb: 'verb',
|
|
49
49
|
verbComplement: 'verb-complement',
|
|
50
50
|
verbObject: 'verb-object'
|
|
51
|
-
};
|
|
52
|
-
exports.wordClass = wordClass;
|
|
51
|
+
};
|
package/lib/model/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,8 +9,8 @@ var subjectCategories = _interopRequireWildcard(require("./SubjectCategories"));
|
|
|
10
9
|
var subjectTypes = _interopRequireWildcard(require("./SubjectTypes"));
|
|
11
10
|
var wordClass = _interopRequireWildcard(require("./WordClass"));
|
|
12
11
|
var Transcriptions = _interopRequireWildcard(require("./Transcriptions"));
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
14
|
/**
|
|
16
15
|
* Copyright (c) 2017-present, NDLA.
|
|
17
16
|
*
|
|
@@ -20,14 +19,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
20
19
|
*
|
|
21
20
|
*/
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
const model = {
|
|
24
23
|
contentTypes: _ContentType.contentTypes,
|
|
25
|
-
subjectCategories
|
|
26
|
-
subjectTypes
|
|
24
|
+
subjectCategories,
|
|
25
|
+
subjectTypes,
|
|
27
26
|
contentTypeMapping: _ContentType.contentTypeMapping,
|
|
28
27
|
resourceEmbedTypeMapping: _ContentType.resourceEmbedTypeMapping,
|
|
29
|
-
wordClass
|
|
30
|
-
Transcriptions
|
|
28
|
+
wordClass,
|
|
29
|
+
Transcriptions
|
|
31
30
|
};
|
|
32
|
-
var _default = model;
|
|
33
|
-
exports.default = _default;
|
|
31
|
+
var _default = exports.default = model;
|
package/lib/types.js
CHANGED
package/lib/utils/relativeUrl.js
CHANGED
|
@@ -13,25 +13,25 @@ var _i18n = require("../i18n/i18n");
|
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const ENV_REGEX = /(staging|test)\.?/;
|
|
17
|
+
const LANGUAGE_REGEX = new RegExp(`^\\/((?:${_i18n.supportedTranslationLanguages.join('|')})(?:$|\\/))`, '');
|
|
18
|
+
const NDLA_URL = /(.*\.)?ndla.no.*/;
|
|
19
|
+
const REPLACE_WWW = /^www\./;
|
|
20
|
+
const getPossiblyRelativeUrl = (url, path) => {
|
|
21
21
|
if (!path) return url;
|
|
22
22
|
// If not on NDLA, or if url is not a NDLA url, return url as is
|
|
23
23
|
if (!NDLA_URL.test(url) || !NDLA_URL.test(path)) return url;
|
|
24
24
|
//Remove environment info
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const urlObj = new URL(url.replace(ENV_REGEX, ''));
|
|
26
|
+
const pathObj = new URL(path.replace(ENV_REGEX, ''));
|
|
27
27
|
// If the host is the same, return the relative path
|
|
28
28
|
if (urlObj.hostname.replace(REPLACE_WWW, '') === pathObj.hostname.replace(REPLACE_WWW, '')) {
|
|
29
29
|
// Replace the language part of the url with the language part of the path
|
|
30
30
|
// If the path language part does not exist, remove it.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (urlMatch
|
|
34
|
-
return urlObj.pathname.replace(urlMatch[1],
|
|
31
|
+
const urlMatch = urlObj.pathname.match(LANGUAGE_REGEX);
|
|
32
|
+
const pathMatch = pathObj.pathname.match(LANGUAGE_REGEX);
|
|
33
|
+
if (urlMatch?.[1] && urlMatch?.[1] !== pathMatch?.[1]) {
|
|
34
|
+
return urlObj.pathname.replace(urlMatch[1], pathMatch?.[1] || '');
|
|
35
35
|
}
|
|
36
36
|
return urlObj.pathname;
|
|
37
37
|
}
|
|
@@ -16,8 +16,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const {
|
|
20
|
+
contentTypes
|
|
21
|
+
} = _model.default;
|
|
22
|
+
const resourceTypeColor = type => {
|
|
21
23
|
switch (type) {
|
|
22
24
|
case contentTypes.SUBJECT_MATERIAL:
|
|
23
25
|
return _core.colors.subjectMaterial.light;
|
|
@@ -47,5 +49,4 @@ var resourceTypeColor = function resourceTypeColor(type) {
|
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
51
|
exports.resourceTypeColor = resourceTypeColor;
|
|
50
|
-
var _default = resourceTypeColor;
|
|
51
|
-
exports.default = _default;
|
|
52
|
+
var _default = exports.default = resourceTypeColor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "50.1.
|
|
3
|
+
"version": "50.1.2",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/accordion": "^3.0.
|
|
35
|
-
"@ndla/button": "^12.0.
|
|
34
|
+
"@ndla/accordion": "^3.0.10",
|
|
35
|
+
"@ndla/button": "^12.0.15",
|
|
36
36
|
"@ndla/carousel": "^4.0.16",
|
|
37
37
|
"@ndla/core": "^4.2.7",
|
|
38
|
-
"@ndla/dropdown-menu": "^1.0.
|
|
39
|
-
"@ndla/forms": "^5.2.
|
|
38
|
+
"@ndla/dropdown-menu": "^1.0.17",
|
|
39
|
+
"@ndla/forms": "^5.2.3",
|
|
40
40
|
"@ndla/hooks": "^2.1.2",
|
|
41
41
|
"@ndla/icons": "^4.2.2",
|
|
42
42
|
"@ndla/licenses": "^7.2.2",
|
|
43
|
-
"@ndla/modal": "^5.0.
|
|
43
|
+
"@ndla/modal": "^5.0.14",
|
|
44
44
|
"@ndla/notion": "^6.0.16",
|
|
45
|
-
"@ndla/safelink": "^4.1.
|
|
45
|
+
"@ndla/safelink": "^4.1.40",
|
|
46
46
|
"@ndla/select": "^3.2.2",
|
|
47
|
-
"@ndla/switch": "^1.1.
|
|
48
|
-
"@ndla/tabs": "^3.2.
|
|
49
|
-
"@ndla/tooltip": "^6.0.
|
|
47
|
+
"@ndla/switch": "^1.1.23",
|
|
48
|
+
"@ndla/tabs": "^3.2.3",
|
|
49
|
+
"@ndla/tooltip": "^6.0.5",
|
|
50
50
|
"@ndla/typography": "^0.4.0",
|
|
51
51
|
"@ndla/util": "^4.0.1",
|
|
52
52
|
"@radix-ui/react-popover": "^1.0.7",
|
|
@@ -65,7 +65,9 @@
|
|
|
65
65
|
"i18next": "^23.5.1",
|
|
66
66
|
"lodash": "^4.17.20",
|
|
67
67
|
"react": ">= 16.8.0",
|
|
68
|
-
"react-
|
|
68
|
+
"react-dom": ">= 16.8.0",
|
|
69
|
+
"react-i18next": "^13.3.0",
|
|
70
|
+
"react-router-dom": "> 6.0.0"
|
|
69
71
|
},
|
|
70
72
|
"devDependencies": {
|
|
71
73
|
"@ndla/types-backend": "^0.2.21",
|
|
@@ -79,5 +81,5 @@
|
|
|
79
81
|
"publishConfig": {
|
|
80
82
|
"access": "public"
|
|
81
83
|
},
|
|
82
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "a3aad57d56edabe22d550adb5fda8af5ab6c8b6f"
|
|
83
85
|
}
|
|
@@ -54,7 +54,7 @@ const mockFooterLinks = [
|
|
|
54
54
|
icon: <Youtube />,
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
to: 'https://
|
|
57
|
+
to: 'https://ndla.us6.list-manage.com/subscribe?u=99d41bbb28de0128915adebed&id=9a1d3ad1ea',
|
|
58
58
|
text: 'Meld deg på vårt nyhetsbrev',
|
|
59
59
|
icon: <EmailOutline />,
|
|
60
60
|
},
|
|
@@ -66,8 +66,8 @@ const mockFooterLinks = [
|
|
|
66
66
|
];
|
|
67
67
|
|
|
68
68
|
const privacyLinks = [
|
|
69
|
-
{ label: 'Personvernerklæring', url: 'https://
|
|
70
|
-
{ label: 'Erklæring om informasjonskapsler', url: 'https://
|
|
69
|
+
{ label: 'Personvernerklæring', url: 'https://ndla.no/article/personvernerklaering' },
|
|
70
|
+
{ label: 'Erklæring om informasjonskapsler', url: 'https://ndla.no/article/erklaering-for-informasjonskapsler' },
|
|
71
71
|
];
|
|
72
72
|
|
|
73
73
|
export default {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
import { fonts, spacing, colors, mq, breakpoints, spacingUnit } from '@ndla/core';
|
|
3
4
|
|
|
@@ -11,7 +12,7 @@ export const setAnimations = () => {
|
|
|
11
12
|
return styles;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
const headingStyle = css`
|
|
15
16
|
${fonts.sizes('22px', '26px')};
|
|
16
17
|
font-weight: ${fonts.weight.semibold};
|
|
17
18
|
text-transform: uppercase;
|
|
@@ -31,4 +32,10 @@ export const StyledHeadingH1 = styled.h1`
|
|
|
31
32
|
}
|
|
32
33
|
`;
|
|
33
34
|
|
|
34
|
-
export const
|
|
35
|
+
export const StyledHeadingH1 = styled.h1`
|
|
36
|
+
${headingStyle};
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
export const StyledHeadingH2 = styled.h2`
|
|
40
|
+
${headingStyle};
|
|
41
|
+
`;
|