@codecademy/brand 2.0.0-alpha.4e24057d69.0 → 2.0.0-alpha.5000e6813b.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/dist/AbbreviatedCommunityEventCard/index.js +98 -0
- package/dist/AppBar/AppBarSection.js +41 -0
- package/dist/AppBar/index.js +20 -0
- package/dist/AppBarDeprecated/AppBarSectionDeprecated.js +25 -0
- package/dist/AppBarDeprecated/index.js +26 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.js +98 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.js +63 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +440 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.js +157 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderDropdownLink.js +25 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderMenuItem.js +26 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/types.js +1 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/index.js +2 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownProvider/index.js +26 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js +70 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +53 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.js +32 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.js +57 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderMenuProvider/index.js +88 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderDropdownNavButton.js +50 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderMenuNavButton.js +38 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.js +36 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderProvider/index.js +19 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +113 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesSection/index.js +194 -0
- package/dist/AppHeader/Search/DefaultResults.js +112 -0
- package/dist/AppHeader/Search/QuizAndHelpCenterLinks.js +80 -0
- package/dist/AppHeader/Search/SearchButton.js +58 -0
- package/dist/AppHeader/Search/SearchPane.js +518 -0
- package/dist/AppHeader/Search/SearchWorker/PromiseLookup.js +35 -0
- package/dist/AppHeader/Search/SearchWorker/index.js +24 -0
- package/dist/AppHeader/Search/SearchWorker/src.js +307 -0
- package/dist/AppHeader/Search/SearchWorker/types.js +5 -0
- package/dist/AppHeader/Search/SearchWorker/worker.js +31 -0
- package/dist/AppHeader/Search/consts.js +40 -0
- package/dist/AppHeader/Search/hooks/useUrlChangeDetection.js +14 -0
- package/dist/AppHeader/Search/safelyRedirect.js +49 -0
- package/dist/AppHeader/Search/types.js +1 -0
- package/dist/AppHeader/Search/useHeaderSearch.js +39 -0
- package/dist/AppHeader/index.js +77 -0
- package/dist/AppHeader/shared/elements.js +151 -0
- package/dist/AppHeader/shared/index.js +4 -0
- package/dist/AppHeader/shared/keyboardNav.js +67 -0
- package/dist/AppHeader/shared/mockAppHeaderItems.js +10 -0
- package/dist/AppHeader/shared/testTypes.js +0 -0
- package/dist/AppHeader/shared/types.js +1 -0
- package/dist/AppHeader/shared/utils.js +103 -0
- package/dist/AppHeader/utils/types.js +1 -0
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/MobileSearchBar.js +77 -0
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +111 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/elements.js +30 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +104 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuTarget/index.js +60 -0
- package/dist/AppHeaderMobile/index.js +226 -0
- package/dist/Avatar/Avatar.stories.js +15 -0
- package/dist/Avatar/index.js +45 -0
- package/dist/AvatarChooser/index.js +105 -0
- package/dist/BackToTopAnchor/index.js +38 -0
- package/dist/Banner/index.js +102 -0
- package/dist/BetaSticker/index.js +57 -0
- package/dist/CareerPathCard/index.js +41 -0
- package/dist/Carousel/elements.js +14 -0
- package/dist/Carousel/index.js +242 -0
- package/dist/CertificationPathCard/index.js +42 -0
- package/dist/CommunityEventCard/EventTypeIcon.js +59 -0
- package/dist/CommunityEventCard/index.js +305 -0
- package/dist/CommunityEventToast/index.js +32 -0
- package/dist/ContentGroupBaseCard/helpers.js +12 -0
- package/dist/ContentGroupBaseCard/index.js +178 -0
- package/dist/ContentGroupBaseCard/shared.js +76 -0
- package/dist/ContentGroupBaseCard/types.js +12 -0
- package/dist/CourseCard/index.js +47 -0
- package/dist/CurriculumCard/BottomTag/index.js +26 -0
- package/dist/CurriculumCard/Difficulty/helpers.js +13 -0
- package/dist/CurriculumCard/Difficulty/index.js +47 -0
- package/dist/CurriculumCard/Difficulty/types.js +20 -0
- package/dist/CurriculumCard/Footer/index.js +54 -0
- package/dist/CurriculumCard/Image/index.js +56 -0
- package/dist/CurriculumCard/Subtitle/helpers.js +8 -0
- package/dist/CurriculumCard/Subtitle/index.js +34 -0
- package/dist/CurriculumCard/index.js +129 -0
- package/dist/DropdownButton/DropdownList.js +73 -0
- package/dist/DropdownButton/index.js +169 -0
- package/dist/DropdownButton/useDynamicPopoverPosition.js +55 -0
- package/dist/DropdownButton/useDynamicPopoverPosition.test.js +85 -0
- package/dist/EditorialImage/index.js +22 -0
- package/dist/EmptySection/index.js +183 -0
- package/dist/ErrorContents/index.js +48 -0
- package/dist/FeatureList/index.js +41 -0
- package/dist/GlobalFooter/FooterHeading.js +30 -0
- package/dist/GlobalFooter/FooterLegal/LegalLinks.js +43 -0
- package/dist/GlobalFooter/FooterLegal/MadeIn.js +64 -0
- package/dist/GlobalFooter/FooterLegal/index.js +22 -0
- package/dist/GlobalFooter/FooterLinks.js +53 -0
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +298 -0
- package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +299 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +268 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralFields.js +29 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralForm.js +74 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralLinkSocialMediaSharing.js +86 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/types.js +1 -0
- package/dist/GlobalFooter/FooterNavLinks/SocialMediaLinks.js +50 -0
- package/dist/GlobalFooter/FooterNavLinks/index.js +45 -0
- package/dist/GlobalFooter/FooterSubHeading.js +22 -0
- package/dist/GlobalFooter/index.js +39 -0
- package/dist/GlobalFooter/types.js +1 -0
- package/dist/GlobalHeader/GlobalHeaderItems.js +405 -0
- package/dist/GlobalHeader/GlobalHeaderVariants.js +211 -0
- package/dist/GlobalHeader/index.js +101 -0
- package/dist/GlobalHeader/types.js +1 -0
- package/dist/GlobalHeader/urlHelpers.js +21 -0
- package/dist/GlobalPage/index.js +53 -0
- package/dist/Grid/GridCollapse.js +199 -0
- package/dist/Grid/GridCollapse.test.js +96 -0
- package/dist/Grid/Subgrid.js +37 -0
- package/dist/Grid/getCSSFromColumnCount.js +7 -0
- package/dist/Grid/index.js +3 -0
- package/dist/HeaderHeightArea/index.js +40 -0
- package/dist/HeaderHeightArea/useIsInHeaderRegion.js +15 -0
- package/dist/HorizontalScrollMenu/index.js +75 -0
- package/dist/HubCard/index.js +38 -0
- package/dist/InfoCard/index.js +157 -0
- package/dist/Konamimojisplosion/Konamimojisplosion.js +7 -0
- package/dist/Konamimojisplosion/index.js +2 -0
- package/dist/Konamimojisplosion/useKonamimojisplosion.js +34 -0
- package/dist/LandingPage/CTA.js +11 -0
- package/dist/LandingPage/Description.js +14 -0
- package/dist/LandingPage/Feature.js +96 -0
- package/dist/LandingPage/PageFAQs.js +42 -0
- package/dist/LandingPage/PageFeatures.js +112 -0
- package/dist/LandingPage/PageFeaturesEnhanced.js +159 -0
- package/dist/LandingPage/PageFeaturesWithReferences.js +136 -0
- package/dist/LandingPage/PageHero.js +22 -0
- package/dist/LandingPage/PagePrefooter.js +74 -0
- package/dist/LandingPage/PageSingleFeature.js +128 -0
- package/dist/LandingPage/PageTestimonials.js +113 -0
- package/dist/LandingPage/PageVideoGallery.js +49 -0
- package/dist/LandingPage/Title.js +28 -0
- package/dist/LandingPage/TitleWithEyebrow.js +40 -0
- package/dist/LandingPage/index.js +14 -0
- package/dist/LandingPage/types.js +1 -0
- package/dist/LayoutMenu/AccordionMenu.js +68 -0
- package/dist/LayoutMenu/LayoutMenu.js +96 -0
- package/dist/LayoutMenu/LayoutMenuSection.js +34 -0
- package/dist/LayoutMenu/SectionItemLink.js +16 -0
- package/dist/LayoutMenu/SelectedSectionItem.js +17 -0
- package/dist/LayoutMenu/index.js +3 -0
- package/dist/LayoutMenuVariant/AccordionMenu.js +85 -0
- package/dist/LayoutMenuVariant/LayoutMenu.js +92 -0
- package/dist/LayoutMenuVariant/LayoutMenuSection.js +42 -0
- package/dist/LayoutMenuVariant/SectionItemLink.js +17 -0
- package/dist/LayoutMenuVariant/index.js +2 -0
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
- package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.js +57 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.js +35 -0
- package/dist/LearningOutcomeBadges/index.js +2 -0
- package/dist/LearningOutcomeCard/index.js +178 -0
- package/dist/LearningOutcomeFlyout/index.js +168 -0
- package/dist/LearningOutcomePopover/index.js +125 -0
- package/dist/LearningOutcomeTile/Tile.js +79 -0
- package/dist/LearningOutcomeTile/index.js +114 -0
- package/dist/LearningOutcomeTile/types.js +11 -0
- package/dist/ListSection/index.js +64 -0
- package/dist/Loading/index.js +82 -0
- package/dist/LoadingCurriculumCard/index.js +82 -0
- package/dist/Logo/CodecademyLogo.js +19 -0
- package/dist/Logo/CodecademyPremiumLogo.js +35 -0
- package/dist/Logo/CodecademyProAltLogo.js +19 -0
- package/dist/Logo/CodecademyProLockupLogo.js +13 -0
- package/dist/Logo/CodecademyProLogo.js +21 -0
- package/dist/Logo/CodecademyProMonoLogo.js +22 -0
- package/dist/Logo/CodecademyProgramLogo.js +14 -0
- package/dist/Logo/CodecademyTeamsLogo.js +41 -0
- package/dist/Logo/index.js +30 -0
- package/dist/LogoFromSkillsoft/index.js +55 -0
- package/dist/LogoLXStudio/index.js +47 -0
- package/dist/LogoProCutout/index.js +31 -0
- package/dist/LogoProCutoutTransparent/index.js +31 -0
- package/dist/MarketingToaster/index.js +67 -0
- package/dist/NotFoundContent/index.js +55 -0
- package/dist/NotificationList/EmptyNotification/emptyNotificationContents.js +23 -0
- package/dist/NotificationList/EmptyNotification/index.js +38 -0
- package/dist/NotificationList/NotificationItem.js +151 -0
- package/dist/NotificationList/index.js +46 -0
- package/dist/NotificationList/typings.js +1 -0
- package/dist/Notifications/NotificationBell.js +72 -0
- package/dist/Notifications/NotificationsContents.js +85 -0
- package/dist/Notifications/NotificationsDropdown.js +25 -0
- package/dist/Notifications/__fixtures__/NotificationTestComponent.js +12 -0
- package/dist/Notifications/__fixtures__/stubs.js +8 -0
- package/dist/Notifications/constants.js +4 -0
- package/dist/Notifications/elements.js +21 -0
- package/dist/Notifications/types.js +1 -0
- package/dist/Notifications/useHeaderNotifications.js +37 -0
- package/dist/Notifications/useNotificationButtons.js +56 -0
- package/dist/PageAlerts/PageAlerts.js +75 -0
- package/dist/PageAlerts/PageAlertsProvider.js +34 -0
- package/dist/PageAlerts/index.js +3 -0
- package/dist/PageAlerts/types.js +1 -0
- package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.js +53 -0
- package/dist/PageLayoutWithSidebarMenu/index.js +1 -0
- package/dist/PageSection/index.js +67 -0
- package/dist/PastDue/PastDueModalContents/index.js +30 -0
- package/dist/PastDue/index.js +2 -0
- package/dist/PastDue/pastDueMessages.js +48 -0
- package/dist/PausableImage/BaseImage/index.js +54 -0
- package/dist/PausableImage/index.js +37 -0
- package/dist/PlanCard/PlanCardBanner.js +28 -0
- package/dist/PlanCard/PlanFeature.js +83 -0
- package/dist/PlanCard/PopularBadge.js +13 -0
- package/dist/PlanCard/PricingAmount.js +117 -0
- package/dist/PlanCard/RecommendedBadge.js +24 -0
- package/dist/PlanCard/consts.js +135 -0
- package/dist/PlanCard/index.js +370 -0
- package/dist/PlanCard/types.js +62 -0
- package/dist/PlanCardTeams/consts.js +8 -0
- package/dist/PlanCardTeams/index.js +167 -0
- package/dist/PricingSection/PlanFeature.js +88 -0
- package/dist/PricingSection/PricingCard/PricingAmount.js +84 -0
- package/dist/PricingSection/PricingCard/RecommendedBadge.js +24 -0
- package/dist/PricingSection/PricingCard/consts.js +85 -0
- package/dist/PricingSection/PricingCard/index.js +241 -0
- package/dist/PricingSection/ProductCTA.js +44 -0
- package/dist/PricingSection/Products.js +74 -0
- package/dist/PricingSection/config.js +36 -0
- package/dist/PricingSection/index.js +58 -0
- package/dist/PricingSection/types.js +8 -0
- package/dist/ProLabel/index.js +59 -0
- package/dist/ProLogo/index.js +27 -0
- package/dist/ProLogoAlt/index.js +26 -0
- package/dist/ProductFeatureShowcase/index.js +120 -0
- package/dist/QuizScore/index.js +84 -0
- package/dist/RatingsBar/index.js +32 -0
- package/dist/ResourceCard/index.js +59 -0
- package/dist/ScoreSummary/SubScores.js +165 -0
- package/dist/ScoreSummary/helpers.js +20 -0
- package/dist/ScoreSummary/index.js +108 -0
- package/dist/ScoreSummary/types.js +1 -0
- package/dist/SkillPathCard/index.js +38 -0
- package/dist/SocialMediaSharing/SocialShareIconLink.js +49 -0
- package/dist/SocialMediaSharing/index.js +116 -0
- package/dist/SocialMediaSharingDropdown/index.js +111 -0
- package/dist/Testimonial/index.js +163 -0
- package/dist/index.js +87 -0
- package/dist/lib/breakpointHooks/index.js +60 -0
- package/dist/lib/catalogList/index.js +173 -0
- package/dist/lib/resourcesList/index.js +232 -0
- package/dist/remoteAssets/components.js +1 -0
- package/dist/stories/Atoms/Avatar.stories.js +16 -0
- package/dist/stories/Atoms/BetaSticker.stories.js +22 -0
- package/dist/stories/Atoms/Logos/Logo.stories.js +78 -0
- package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.js +15 -0
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.js +11 -0
- package/dist/stories/Atoms/Logos/ProLabel.stories.js +16 -0
- package/dist/stories/Atoms/Logos/ProLogoAlt.stories.js +24 -0
- package/dist/stories/Atoms/RatingsBar.stories.js +16 -0
- package/dist/stories/Atoms/Subgrid.stories.js +87 -0
- package/dist/stories/Molecules/AppBar.stories.js +32 -0
- package/dist/stories/Molecules/AppHeader/AppHeader.stories.js +84 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderDropdown.stories.js +67 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderLink.stories.js +52 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderLogo.stories.js +44 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderMainMenuMobile.stories.js +34 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderMobile.stories.js +40 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderSubMenuMobile.stories.js +25 -0
- package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.js +176 -0
- package/dist/stories/Molecules/AppHeader/LXStudioMobileHeader.stories.js +84 -0
- package/dist/stories/Molecules/AppHeader/MockAppHeaderElements.js +90 -0
- package/dist/stories/Molecules/AvatarChooser.stories.js +22 -0
- package/dist/stories/Molecules/BackToTopAnchor.stories.js +51 -0
- package/dist/stories/Molecules/Banner.stories.js +115 -0
- package/dist/stories/Molecules/Carousel.stories.js +47 -0
- package/dist/stories/Molecules/ContentGroupBaseCard.stories.js +173 -0
- package/dist/stories/Molecules/CurriculumCard.stories.js +208 -0
- package/dist/stories/Molecules/CurriculumCards/CareerPathCard.stories.js +92 -0
- package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.js +65 -0
- package/dist/stories/Molecules/CurriculumCards/CourseCard.stories.js +83 -0
- package/dist/stories/Molecules/CurriculumCards/LoadingCurriculumCard.stories.js +20 -0
- package/dist/stories/Molecules/CurriculumCards/SkillPathCard.stories.js +90 -0
- package/dist/stories/Molecules/DropdownButton.stories.js +207 -0
- package/dist/stories/Molecules/EditorialImage.stories.js +17 -0
- package/dist/stories/Molecules/EmptySection.stories.js +168 -0
- package/dist/stories/Molecules/ErrorContents.stories.js +19 -0
- package/dist/stories/Molecules/GridCollapse.stories.js +42 -0
- package/dist/stories/Molecules/HorizontalScrollMenu.examples.js +67 -0
- package/dist/stories/Molecules/HorizontalScrollMenu.stories.js +11 -0
- package/dist/stories/Molecules/HubCard.stories.js +28 -0
- package/dist/stories/Molecules/InfoCard.stories.js +30 -0
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +23 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +75 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +35 -0
- package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.js +20 -0
- package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.js +10 -0
- package/dist/stories/Molecules/LearningOutcomePopover.stories.js +39 -0
- package/dist/stories/Molecules/LearningOutcomeTile.stories.js +276 -0
- package/dist/stories/Molecules/ListSection.stories.js +97 -0
- package/dist/stories/Molecules/Loading.stories.js +10 -0
- package/dist/stories/Molecules/NotificationList.stories.js +100 -0
- package/dist/stories/Molecules/PageSection.stories.js +67 -0
- package/dist/stories/Molecules/PastDueModalContents.stories.js +62 -0
- package/dist/stories/Molecules/PausableImage.stories.js +16 -0
- package/dist/stories/Molecules/ResourceCard.stories.js +18 -0
- package/dist/stories/Molecules/SocialMediaSharing.stories.js +20 -0
- package/dist/stories/Molecules/SocialMediaSharingDropdown.stories.js +20 -0
- package/dist/stories/Molecules/Testimonial.stories.js +63 -0
- package/dist/stories/Organisms/GlobalFooter.stories.js +29 -0
- package/dist/stories/Organisms/GlobalHeader/About.stories.js +136 -0
- package/dist/stories/Organisms/GlobalHeader/Anon.stories.js +73 -0
- package/dist/stories/Organisms/GlobalHeader/Bootcamp.stories.js +32 -0
- package/dist/stories/Organisms/GlobalHeader/Enterprise.stories.js +108 -0
- package/dist/stories/Organisms/GlobalHeader/Free.stories.js +133 -0
- package/dist/stories/Organisms/GlobalHeader/Pro.stories.js +199 -0
- package/dist/stories/Organisms/GlobalHeader/Simple.stories.js +31 -0
- package/dist/stories/Organisms/GlobalPage.stories.js +142 -0
- package/dist/stories/Organisms/LayoutMenu.stories.js +242 -0
- package/dist/stories/Organisms/LayoutMenuVariant.stories.js +224 -0
- package/dist/stories/Organisms/PageAlerts.example.js +42 -0
- package/dist/stories/Organisms/PageAlerts.stories.js +15 -0
- package/dist/stories/Organisms/PageFeatures.stories.js +183 -0
- package/dist/stories/Organisms/PageHero.stories.js +145 -0
- package/dist/stories/Organisms/PageLayoutWithSidebarMenu.stories.js +34 -0
- package/dist/stories/Organisms/PagePrefooter.stories.js +62 -0
- package/dist/stories/Organisms/PageSingleFeature.stories.js +158 -0
- package/dist/stories/Organisms/PageVideoGallery.stories.js +70 -0
- package/dist/stories/Organisms/PlanCard.stories.js +98 -0
- package/dist/stories/Organisms/PlanCardTeams.stories.js +27 -0
- package/dist/stories/Organisms/ScoreSummary.stories.js +299 -0
- package/package.json +2 -2
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { Shimmer, Text } from '@codecademy/gamut';
|
|
2
|
+
import { AccountingCoinsIcon, ArrowThickCircleUpIcon, ArticleIcon, BookFlipPageIcon, BriefcaseIcon, CalendarIcon, ChatIcon, CommunityIcon, EarthIcon, GearIcon, HouseEntranceIcon, MiniArrowRightIcon, NotebookIcon, OfficeBuildingDoubleIcon, OnlineClassStudentIcon, PersonIcon, PersonPonytailIcon, PieLineGraphIcon, SupportIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { renderNewBadge } from '../lib/resourcesList';
|
|
4
|
+
import { formatEnterpriseUrl } from './urlHelpers';
|
|
5
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const shouldShowBusinessDashboardLink = user => {
|
|
7
|
+
return (user?.isAccountManager || user?.isBusinessAdmin) && !user?.isSkillsoftUser;
|
|
8
|
+
};
|
|
9
|
+
export const loading = {
|
|
10
|
+
id: 'header-loading',
|
|
11
|
+
type: 'render-element',
|
|
12
|
+
renderElement: () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Shimmer, {
|
|
14
|
+
"aria-hidden": true,
|
|
15
|
+
height: 36,
|
|
16
|
+
width: 128
|
|
17
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
18
|
+
screenreader: true,
|
|
19
|
+
children: "Loading menu bar"
|
|
20
|
+
})]
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
export const logo = {
|
|
24
|
+
dataTestId: 'header-logo',
|
|
25
|
+
id: 'logo',
|
|
26
|
+
href: '/',
|
|
27
|
+
enterprise: false,
|
|
28
|
+
pro: false,
|
|
29
|
+
trackingTarget: 'topnav_logo',
|
|
30
|
+
type: 'logo'
|
|
31
|
+
};
|
|
32
|
+
export const enterpriseLogo = (user, removeAnchorLink) => {
|
|
33
|
+
return {
|
|
34
|
+
dataTestId: 'header-logo',
|
|
35
|
+
id: 'logo',
|
|
36
|
+
href: formatEnterpriseUrl(user?.enterpriseUrl) ?? 'https://www.skillsoft.com/login-skillsoft',
|
|
37
|
+
enterprise: true,
|
|
38
|
+
pro: false,
|
|
39
|
+
trackingTarget: 'topnav_enterprise_logo',
|
|
40
|
+
type: 'logo',
|
|
41
|
+
removeAnchorLink
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export const myHome = {
|
|
45
|
+
dataTestId: 'header-home',
|
|
46
|
+
icon: HouseEntranceIcon,
|
|
47
|
+
id: 'my-home',
|
|
48
|
+
text: 'My Home',
|
|
49
|
+
href: '/learn',
|
|
50
|
+
trackingTarget: 'topnav_home',
|
|
51
|
+
type: 'link'
|
|
52
|
+
};
|
|
53
|
+
export const liveLearningHub = {
|
|
54
|
+
dataTestId: 'header-live-learning-hub',
|
|
55
|
+
icon: OnlineClassStudentIcon,
|
|
56
|
+
id: 'live-learning-hub',
|
|
57
|
+
text: 'Live Learning',
|
|
58
|
+
href: '/live-learning',
|
|
59
|
+
trackingTarget: 'topnav_live_learning_hub',
|
|
60
|
+
type: 'link',
|
|
61
|
+
badge: renderNewBadge(4)
|
|
62
|
+
};
|
|
63
|
+
export const myPercipioHome = (user, customTitle) => {
|
|
64
|
+
return {
|
|
65
|
+
dataTestId: 'header-percihome',
|
|
66
|
+
icon: HouseEntranceIcon,
|
|
67
|
+
id: 'my-home',
|
|
68
|
+
text: customTitle || 'Home',
|
|
69
|
+
ariaLabel: 'Home, opens in a new tab',
|
|
70
|
+
href: formatEnterpriseUrl(user?.enterpriseUrl) ?? 'https://www.skillsoft.com/login-skillsoft',
|
|
71
|
+
newTab: true,
|
|
72
|
+
trackingTarget: 'topnav_enterprise_home',
|
|
73
|
+
type: 'link'
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export const catalogDropdown = hideCareerPaths => ({
|
|
77
|
+
dataTestId: 'header-catalog',
|
|
78
|
+
icon: BookFlipPageIcon,
|
|
79
|
+
id: 'catalog-dropdown',
|
|
80
|
+
text: 'Catalog',
|
|
81
|
+
trackingTarget: 'topnav_catalog',
|
|
82
|
+
type: 'catalog-dropdown',
|
|
83
|
+
hideCareerPaths
|
|
84
|
+
});
|
|
85
|
+
export const resourcesDropdown = () => ({
|
|
86
|
+
dataTestId: 'header-resources',
|
|
87
|
+
icon: NotebookIcon,
|
|
88
|
+
id: 'resources-dropdown',
|
|
89
|
+
text: 'Resources',
|
|
90
|
+
trackingTarget: 'topnav_resources',
|
|
91
|
+
type: 'resources-dropdown'
|
|
92
|
+
});
|
|
93
|
+
export const simpleResourcesDropdown = {
|
|
94
|
+
dataTestId: 'header-resources',
|
|
95
|
+
icon: NotebookIcon,
|
|
96
|
+
id: 'resources-simple-dropdown',
|
|
97
|
+
text: 'Resources',
|
|
98
|
+
popover: [{
|
|
99
|
+
id: 'articles',
|
|
100
|
+
href: '/articles',
|
|
101
|
+
trackingTarget: 'topnav_enterprise_articles',
|
|
102
|
+
text: 'Articles',
|
|
103
|
+
type: 'link'
|
|
104
|
+
}, {
|
|
105
|
+
id: 'docs',
|
|
106
|
+
href: '/resources/docs',
|
|
107
|
+
trackingTarget: 'topnav_enterprise_docs',
|
|
108
|
+
text: 'Docs',
|
|
109
|
+
type: 'link'
|
|
110
|
+
}, {
|
|
111
|
+
id: 'workspaces',
|
|
112
|
+
href: '/users/me/workspaces',
|
|
113
|
+
trackingTarget: 'topnav_enterprise_workspaces',
|
|
114
|
+
text: 'Workspaces',
|
|
115
|
+
type: 'link'
|
|
116
|
+
}],
|
|
117
|
+
trackingTarget: 'topnav_resources',
|
|
118
|
+
type: 'resources-simple-dropdown'
|
|
119
|
+
};
|
|
120
|
+
export const communityDropdown = () => ({
|
|
121
|
+
icon: CommunityIcon,
|
|
122
|
+
id: 'community',
|
|
123
|
+
text: 'Community',
|
|
124
|
+
popover: [{
|
|
125
|
+
id: 'visit-community',
|
|
126
|
+
href: 'https://community.codecademy.com/c/start-here/',
|
|
127
|
+
newTab: true,
|
|
128
|
+
trackingTarget: 'topnav_visit_community',
|
|
129
|
+
text: 'Visit Community',
|
|
130
|
+
type: 'link',
|
|
131
|
+
icon: EarthIcon
|
|
132
|
+
}, {
|
|
133
|
+
id: 'events',
|
|
134
|
+
href: '/events',
|
|
135
|
+
trackingTarget: 'topnav_community_events',
|
|
136
|
+
text: 'Events',
|
|
137
|
+
type: 'link',
|
|
138
|
+
icon: CalendarIcon
|
|
139
|
+
}, {
|
|
140
|
+
id: 'learner-stories',
|
|
141
|
+
href: '/resources/blog/category/learner-stories/',
|
|
142
|
+
trackingTarget: 'topnav_learner_stories_hub',
|
|
143
|
+
text: 'Learner Stories',
|
|
144
|
+
type: 'link',
|
|
145
|
+
icon: ArticleIcon
|
|
146
|
+
}, {
|
|
147
|
+
id: 'code-crew',
|
|
148
|
+
href: 'https://try.codecademy.com/code-crew/',
|
|
149
|
+
newTab: true,
|
|
150
|
+
trackingTarget: 'topnav_code_crew',
|
|
151
|
+
text: 'Code Crew',
|
|
152
|
+
type: 'link',
|
|
153
|
+
icon: PersonPonytailIcon
|
|
154
|
+
}],
|
|
155
|
+
trackingTarget: 'topnav_community',
|
|
156
|
+
type: 'dropdown'
|
|
157
|
+
});
|
|
158
|
+
export const pricingDropdown = {
|
|
159
|
+
icon: AccountingCoinsIcon,
|
|
160
|
+
id: 'pricing',
|
|
161
|
+
text: 'Pricing',
|
|
162
|
+
popover: [{
|
|
163
|
+
id: 'pro-membership',
|
|
164
|
+
href: '/pricing',
|
|
165
|
+
trackingTarget: 'topnav_pro_membership',
|
|
166
|
+
text: 'For Individuals',
|
|
167
|
+
type: 'link'
|
|
168
|
+
}, {
|
|
169
|
+
id: 'for-students',
|
|
170
|
+
href: '/student-center',
|
|
171
|
+
trackingTarget: 'topnav_pricing_students',
|
|
172
|
+
text: 'For Students',
|
|
173
|
+
type: 'link'
|
|
174
|
+
}, {
|
|
175
|
+
id: 'for-teams',
|
|
176
|
+
href: '/business#section-pricing-table',
|
|
177
|
+
trackingTarget: 'topnav_pricing_business',
|
|
178
|
+
text: 'For Business',
|
|
179
|
+
type: 'link'
|
|
180
|
+
}],
|
|
181
|
+
trackingTarget: 'topnav_pricing',
|
|
182
|
+
type: 'dropdown'
|
|
183
|
+
};
|
|
184
|
+
export const upgradePlan = {
|
|
185
|
+
icon: ArrowThickCircleUpIcon,
|
|
186
|
+
id: 'upgrade-plan',
|
|
187
|
+
trackingTarget: 'topnav_upgrade_plan',
|
|
188
|
+
text: 'Upgrade',
|
|
189
|
+
href: '/pricing',
|
|
190
|
+
type: 'link'
|
|
191
|
+
};
|
|
192
|
+
export const businessSolutions = {
|
|
193
|
+
icon: OfficeBuildingDoubleIcon,
|
|
194
|
+
id: 'business-solutions',
|
|
195
|
+
trackingTarget: 'topnav_business',
|
|
196
|
+
text: 'For Business',
|
|
197
|
+
href: '/business',
|
|
198
|
+
type: 'link'
|
|
199
|
+
};
|
|
200
|
+
export const careerCenter = {
|
|
201
|
+
icon: BriefcaseIcon,
|
|
202
|
+
id: 'career-center',
|
|
203
|
+
trackingTarget: 'topnav_career_center',
|
|
204
|
+
text: 'Career Center',
|
|
205
|
+
href: '/career-center',
|
|
206
|
+
type: 'link'
|
|
207
|
+
};
|
|
208
|
+
const profileMyProfile = {
|
|
209
|
+
id: 'my-profile',
|
|
210
|
+
icon: PersonIcon,
|
|
211
|
+
href: '/profiles/me',
|
|
212
|
+
trackingTarget: 'avatar_my_profile',
|
|
213
|
+
text: 'Profile',
|
|
214
|
+
type: 'link'
|
|
215
|
+
};
|
|
216
|
+
const profileAccount = {
|
|
217
|
+
id: 'account',
|
|
218
|
+
icon: GearIcon,
|
|
219
|
+
href: '/account',
|
|
220
|
+
trackingTarget: 'avatar_settings',
|
|
221
|
+
text: 'Account + Billing',
|
|
222
|
+
type: 'link'
|
|
223
|
+
};
|
|
224
|
+
const profileMyHome = {
|
|
225
|
+
id: 'my-home',
|
|
226
|
+
icon: HouseEntranceIcon,
|
|
227
|
+
href: '/learn',
|
|
228
|
+
trackingTarget: 'avatar_dashboard',
|
|
229
|
+
text: 'My Home',
|
|
230
|
+
type: 'link'
|
|
231
|
+
};
|
|
232
|
+
const profileBusinessAccount = {
|
|
233
|
+
id: 'business',
|
|
234
|
+
icon: PieLineGraphIcon,
|
|
235
|
+
href: '/business/plans',
|
|
236
|
+
trackingTarget: 'avatar_business',
|
|
237
|
+
text: 'Admin Dashboard',
|
|
238
|
+
type: 'link'
|
|
239
|
+
};
|
|
240
|
+
const profileHelpCenter = {
|
|
241
|
+
id: 'help-center',
|
|
242
|
+
icon: SupportIcon,
|
|
243
|
+
href: '/help',
|
|
244
|
+
newTab: true,
|
|
245
|
+
trackingTarget: 'avatar_help',
|
|
246
|
+
text: 'Help Center',
|
|
247
|
+
type: 'link'
|
|
248
|
+
};
|
|
249
|
+
const profileFeedback = {
|
|
250
|
+
id: 'give_feedback',
|
|
251
|
+
icon: ChatIcon,
|
|
252
|
+
href: 'https://a.sprig.com/ZTFvMkttQTI0fnNpZDo4YzNkNDBiYS0zZDBmLTQyZDktOGQ3Yy00YzRhZWUxYzZkOGU=',
|
|
253
|
+
newTab: true,
|
|
254
|
+
trackingTarget: 'avatar_give_feedback',
|
|
255
|
+
text: 'Give Feedback',
|
|
256
|
+
type: 'link'
|
|
257
|
+
};
|
|
258
|
+
const profileAdmin = {
|
|
259
|
+
id: 'admin',
|
|
260
|
+
dataTestId: 'admin-link',
|
|
261
|
+
href: '/admin',
|
|
262
|
+
trackingTarget: 'avatar_admin',
|
|
263
|
+
text: 'Admin',
|
|
264
|
+
type: 'link'
|
|
265
|
+
};
|
|
266
|
+
const profileCustomerSupport = {
|
|
267
|
+
id: 'customer-support',
|
|
268
|
+
href: '/admin/concessions',
|
|
269
|
+
trackingTarget: 'avatar_customer_support',
|
|
270
|
+
text: 'Customer Support',
|
|
271
|
+
type: 'link'
|
|
272
|
+
};
|
|
273
|
+
const profileReportBug = {
|
|
274
|
+
id: 'report-bug',
|
|
275
|
+
href: 'https://codecademy.atlassian.net/servicedesk/customer/portal/9',
|
|
276
|
+
newTab: true,
|
|
277
|
+
trackingTarget: 'avatar_report_bug',
|
|
278
|
+
text: 'Report a Bug [ADMIN]',
|
|
279
|
+
type: 'link'
|
|
280
|
+
};
|
|
281
|
+
const profileLogOut = {
|
|
282
|
+
id: 'log-out',
|
|
283
|
+
href: '/sign_out',
|
|
284
|
+
trackingTarget: 'avatar_log_out',
|
|
285
|
+
text: 'Log Out',
|
|
286
|
+
type: 'link'
|
|
287
|
+
};
|
|
288
|
+
export const freeProfile = user => {
|
|
289
|
+
const topSection = [profileMyProfile];
|
|
290
|
+
if (user?.isBusinessAdmin || !user?.isBusinessSsoUser) {
|
|
291
|
+
topSection.push(profileAccount);
|
|
292
|
+
}
|
|
293
|
+
topSection.push(profileMyHome);
|
|
294
|
+
if (shouldShowBusinessDashboardLink(user)) {
|
|
295
|
+
topSection.push(profileBusinessAccount);
|
|
296
|
+
}
|
|
297
|
+
topSection.push(profileHelpCenter);
|
|
298
|
+
topSection.push(profileFeedback);
|
|
299
|
+
const bottomSection = [profileLogOut];
|
|
300
|
+
const popover = [topSection, bottomSection];
|
|
301
|
+
return {
|
|
302
|
+
avatar: user.avatar,
|
|
303
|
+
userDisplayName: user.displayName,
|
|
304
|
+
id: 'profile',
|
|
305
|
+
text: 'Profile',
|
|
306
|
+
popover,
|
|
307
|
+
trackingTarget: 'topnav_profile',
|
|
308
|
+
type: 'profile-dropdown'
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
export const proProfile = user => {
|
|
312
|
+
const topSection = [profileMyProfile];
|
|
313
|
+
if (user.isBusinessAdmin || !user.isBusinessSsoUser) {
|
|
314
|
+
topSection.push(profileAccount);
|
|
315
|
+
}
|
|
316
|
+
topSection.push(profileMyHome);
|
|
317
|
+
topSection.push(profileHelpCenter);
|
|
318
|
+
topSection.push(profileFeedback);
|
|
319
|
+
const teamsAdminSection = [];
|
|
320
|
+
if (shouldShowBusinessDashboardLink(user)) {
|
|
321
|
+
teamsAdminSection.push(profileBusinessAccount);
|
|
322
|
+
}
|
|
323
|
+
const middleSection = [];
|
|
324
|
+
if (user.isAdmin) {
|
|
325
|
+
middleSection.push(profileAdmin);
|
|
326
|
+
}
|
|
327
|
+
if (user.isCustomerSupport) {
|
|
328
|
+
middleSection.push(profileCustomerSupport);
|
|
329
|
+
}
|
|
330
|
+
if (user.isAdmin) {
|
|
331
|
+
middleSection.push(profileReportBug);
|
|
332
|
+
}
|
|
333
|
+
const bottomSection = [profileLogOut];
|
|
334
|
+
const popover = [topSection, teamsAdminSection, middleSection, bottomSection];
|
|
335
|
+
return {
|
|
336
|
+
avatar: user.avatar,
|
|
337
|
+
userDisplayName: user.displayName,
|
|
338
|
+
id: 'profile',
|
|
339
|
+
text: 'Profile',
|
|
340
|
+
popover,
|
|
341
|
+
trackingTarget: 'topnav_profile',
|
|
342
|
+
type: 'profile-dropdown'
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
export const addPayment = {
|
|
346
|
+
dataTestId: 'add-payment-link',
|
|
347
|
+
id: 'add-payment',
|
|
348
|
+
text: 'Add payment',
|
|
349
|
+
href: '/business/checkout?plan_type=upgrade',
|
|
350
|
+
trackingTarget: 'topnav_add_payment',
|
|
351
|
+
type: 'fill-button'
|
|
352
|
+
};
|
|
353
|
+
export const tryProForFree = checkoutUrl => ({
|
|
354
|
+
dataTestId: 'upgrade-link',
|
|
355
|
+
id: 'try-pro',
|
|
356
|
+
text: 'Start free trial',
|
|
357
|
+
href: checkoutUrl || '/pages/pro',
|
|
358
|
+
trackingTarget: 'topnav_pro_trial',
|
|
359
|
+
type: 'fill-button'
|
|
360
|
+
});
|
|
361
|
+
export const upgradeToPro = checkoutUrl => ({
|
|
362
|
+
dataTestId: 'upgrade-link',
|
|
363
|
+
id: 'upgrade-to-pro',
|
|
364
|
+
text: 'Upgrade plan',
|
|
365
|
+
href: checkoutUrl || '/pages/pro',
|
|
366
|
+
trackingTarget: 'topnav_pro_upgrade',
|
|
367
|
+
type: 'fill-button'
|
|
368
|
+
});
|
|
369
|
+
export const unpausePro = {
|
|
370
|
+
dataTestId: 'unpause-link',
|
|
371
|
+
id: 'unpause-pro',
|
|
372
|
+
text: 'Unpause Now',
|
|
373
|
+
href: '/account/billing',
|
|
374
|
+
trackingTarget: 'topnav_pro_unpause',
|
|
375
|
+
type: 'fill-button'
|
|
376
|
+
};
|
|
377
|
+
export const login = {
|
|
378
|
+
dataTestId: 'header-sign-in',
|
|
379
|
+
id: 'login',
|
|
380
|
+
text: 'Log In',
|
|
381
|
+
href: '/login',
|
|
382
|
+
trackingTarget: 'topnav_login',
|
|
383
|
+
type: 'text-button',
|
|
384
|
+
redirect: true
|
|
385
|
+
};
|
|
386
|
+
export const signUp = {
|
|
387
|
+
dataTestId: 'header-sign-up',
|
|
388
|
+
id: 'signup',
|
|
389
|
+
text: 'Sign Up',
|
|
390
|
+
href: '/register',
|
|
391
|
+
trackingTarget: 'topnav_signup',
|
|
392
|
+
type: 'fill-button',
|
|
393
|
+
redirect: true
|
|
394
|
+
};
|
|
395
|
+
export const bootcampCta = bootcampSlug => ({
|
|
396
|
+
dataTestId: 'bootcamp-header-cta',
|
|
397
|
+
id: 'bootcamp-header-cta',
|
|
398
|
+
text: 'Register Now',
|
|
399
|
+
href: `/pay/bootcamp/${bootcampSlug}`,
|
|
400
|
+
trackingTarget: 'topnav_bootcamp_cta',
|
|
401
|
+
type: 'fill-button',
|
|
402
|
+
variant: 'secondary',
|
|
403
|
+
icon: MiniArrowRightIcon,
|
|
404
|
+
iconPosition: 'right'
|
|
405
|
+
});
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { addPayment, bootcampCta, businessSolutions, catalogDropdown, communityDropdown, enterpriseLogo, freeProfile, liveLearningHub, loading, login, logo, myHome, myPercipioHome, pricingDropdown, proProfile, resourcesDropdown, signUp, simpleResourcesDropdown, tryProForFree, unpausePro, upgradePlan, upgradeToPro } from './GlobalHeaderItems';
|
|
2
|
+
const transformSimpleResourcesDropdownlabels = resourcesLabel => ({
|
|
3
|
+
...simpleResourcesDropdown,
|
|
4
|
+
text: resourcesLabel?.title || simpleResourcesDropdown.text,
|
|
5
|
+
popover: simpleResourcesDropdown.popover.map(item => ({
|
|
6
|
+
...item,
|
|
7
|
+
text: resourcesLabel?.[item.id] || item.text
|
|
8
|
+
}))
|
|
9
|
+
});
|
|
10
|
+
const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
|
|
11
|
+
const specialLogo = {
|
|
12
|
+
...logo,
|
|
13
|
+
checkMini: true
|
|
14
|
+
};
|
|
15
|
+
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
16
|
+
const rightItems = [];
|
|
17
|
+
if (renderLogin) {
|
|
18
|
+
rightItems.push(login);
|
|
19
|
+
}
|
|
20
|
+
if (renderSignUp) {
|
|
21
|
+
rightItems.push(signUp);
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
left: leftItems,
|
|
25
|
+
right: rightItems
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
|
|
29
|
+
const specialLogo = {
|
|
30
|
+
...logo,
|
|
31
|
+
checkMini: true
|
|
32
|
+
};
|
|
33
|
+
const leftItems = [specialLogo];
|
|
34
|
+
const rightItems = [];
|
|
35
|
+
if (renderLogin) {
|
|
36
|
+
rightItems.push(login);
|
|
37
|
+
}
|
|
38
|
+
if (renderSignUp) {
|
|
39
|
+
rightItems.push(signUp);
|
|
40
|
+
}
|
|
41
|
+
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
42
|
+
return {
|
|
43
|
+
left: leftItems,
|
|
44
|
+
right: rightItems,
|
|
45
|
+
mainMenu: mainMenuItems
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export const anonDefaultHeaderItems = (hidePricing, user) => {
|
|
49
|
+
return anonHeaderItems(true, true, hidePricing, user);
|
|
50
|
+
};
|
|
51
|
+
export const anonDefaultMobileHeaderItems = (hidePricing, user) => {
|
|
52
|
+
return anonMobileHeaderItems(true, true, hidePricing, user);
|
|
53
|
+
};
|
|
54
|
+
export const anonLandingHeaderItems = (hidePricing, user) => {
|
|
55
|
+
return anonHeaderItems(true, false, hidePricing, user);
|
|
56
|
+
};
|
|
57
|
+
export const anonLandingMobileHeaderItems = (hidePricing, user) => {
|
|
58
|
+
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
59
|
+
};
|
|
60
|
+
export const anonLoginHeaderItems = (hidePricing, user) => {
|
|
61
|
+
return anonHeaderItems(false, true, hidePricing, user);
|
|
62
|
+
};
|
|
63
|
+
export const anonLoginMobileHeaderItems = (hidePricing, user) => {
|
|
64
|
+
return anonMobileHeaderItems(false, true, hidePricing, user);
|
|
65
|
+
};
|
|
66
|
+
export const anonSignupHeaderItems = (hidePricing, user) => {
|
|
67
|
+
return anonHeaderItems(true, false, hidePricing, user);
|
|
68
|
+
};
|
|
69
|
+
export const anonSignupMobileHeaderItems = (hidePricing, user) => {
|
|
70
|
+
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
71
|
+
};
|
|
72
|
+
export const freeHeaderItems = (user, hidePricing) => {
|
|
73
|
+
const specialLogo = {
|
|
74
|
+
...logo,
|
|
75
|
+
checkMini: true
|
|
76
|
+
};
|
|
77
|
+
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
78
|
+
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
79
|
+
const rightItems = [];
|
|
80
|
+
rightItems.push(freeProfile(user));
|
|
81
|
+
rightItems.push(user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl));
|
|
82
|
+
return {
|
|
83
|
+
left: leftItems,
|
|
84
|
+
right: rightItems
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export const freeMobileHeaderItems = (user, hidePricing) => {
|
|
88
|
+
const specialLogo = {
|
|
89
|
+
...logo,
|
|
90
|
+
checkMini: true
|
|
91
|
+
};
|
|
92
|
+
const leftItems = [specialLogo];
|
|
93
|
+
const rightItems = [];
|
|
94
|
+
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
95
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions, freeProfile(user, true), user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl)];
|
|
96
|
+
return {
|
|
97
|
+
left: leftItems,
|
|
98
|
+
right: rightItems,
|
|
99
|
+
mainMenu: mainMenuItems
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export const enterpriseHeaderItems = (user, props) => {
|
|
103
|
+
const {
|
|
104
|
+
hideHeaderLinksInChromeless,
|
|
105
|
+
hideHeaderResourcesDropdown,
|
|
106
|
+
localizedLabels
|
|
107
|
+
} = props;
|
|
108
|
+
const leftItems = hideHeaderLinksInChromeless ? [enterpriseLogo(user, true)] : [enterpriseLogo(user, true), myPercipioHome(user, localizedLabels?.enterpriseFormattedHomeLabel)];
|
|
109
|
+
if (!hideHeaderResourcesDropdown) leftItems.push(transformSimpleResourcesDropdownlabels(localizedLabels?.resourcesDropdown));
|
|
110
|
+
return {
|
|
111
|
+
left: leftItems,
|
|
112
|
+
right: []
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export const proHeaderItems = user => {
|
|
116
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), liveLearningHub, businessSolutions];
|
|
117
|
+
const rightItems = [];
|
|
118
|
+
rightItems.push(proProfile(user));
|
|
119
|
+
if (user.isPaused) {
|
|
120
|
+
rightItems.push(unpausePro);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
left: leftItems,
|
|
124
|
+
right: rightItems
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export const teamsHeaderItems = user => {
|
|
128
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub];
|
|
129
|
+
const rightItems = [];
|
|
130
|
+
if (user.isAccountManager && user.inBusinessTrial && !user.hasBusinessSubscription) {
|
|
131
|
+
rightItems.push(addPayment);
|
|
132
|
+
}
|
|
133
|
+
rightItems.push(proProfile(user));
|
|
134
|
+
return {
|
|
135
|
+
left: leftItems,
|
|
136
|
+
right: rightItems
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export const enterpriseMobileHeaderItems = (user, props) => {
|
|
140
|
+
const {
|
|
141
|
+
hideHeaderLinksInChromeless,
|
|
142
|
+
hideHeaderResourcesDropdown,
|
|
143
|
+
localizedLabels
|
|
144
|
+
} = props;
|
|
145
|
+
const leftItems = [enterpriseLogo(user, true)];
|
|
146
|
+
const rightItems = [];
|
|
147
|
+
const mainMenuItems = hideHeaderLinksInChromeless ? [] : [myPercipioHome(user, localizedLabels?.enterpriseFormattedHomeLabel)];
|
|
148
|
+
if (!hideHeaderResourcesDropdown) mainMenuItems.push(transformSimpleResourcesDropdownlabels(localizedLabels?.resourcesDropdown));
|
|
149
|
+
return {
|
|
150
|
+
left: leftItems,
|
|
151
|
+
right: rightItems,
|
|
152
|
+
mainMenu: mainMenuItems
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export const proMobileHeaderItems = user => {
|
|
156
|
+
const leftItems = [logo];
|
|
157
|
+
const rightItems = [];
|
|
158
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), liveLearningHub, businessSolutions, proProfile(user)];
|
|
159
|
+
if (user.isPaused) {
|
|
160
|
+
mainMenuItems.push(unpausePro);
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
left: leftItems,
|
|
164
|
+
right: rightItems,
|
|
165
|
+
mainMenu: mainMenuItems
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
export const teamsMobileHeaderItems = user => {
|
|
169
|
+
const leftItems = [logo];
|
|
170
|
+
const rightItems = [];
|
|
171
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub, proProfile(user)];
|
|
172
|
+
if (user.isAccountManager && user.inBusinessTrial && !user.hasBusinessSubscription) {
|
|
173
|
+
mainMenuItems.push(addPayment);
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
left: leftItems,
|
|
177
|
+
right: rightItems,
|
|
178
|
+
mainMenu: mainMenuItems
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
export const loadingHeaderItems = {
|
|
182
|
+
left: [loading],
|
|
183
|
+
right: []
|
|
184
|
+
};
|
|
185
|
+
export const loadingMobileHeaderItems = {
|
|
186
|
+
left: [loading],
|
|
187
|
+
right: [],
|
|
188
|
+
mainMenu: []
|
|
189
|
+
};
|
|
190
|
+
export const simpleHeaderItems = {
|
|
191
|
+
left: [logo],
|
|
192
|
+
right: []
|
|
193
|
+
};
|
|
194
|
+
export const simpleMobileHeaderItems = {
|
|
195
|
+
left: [logo],
|
|
196
|
+
right: [],
|
|
197
|
+
mainMenu: []
|
|
198
|
+
};
|
|
199
|
+
export const simpleBootcampHeaderItems = bootcampSlug => {
|
|
200
|
+
return {
|
|
201
|
+
left: [logo],
|
|
202
|
+
right: [bootcampCta(bootcampSlug)]
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
export const simpleBootcampMobileHeaderItems = bootcampSlug => {
|
|
206
|
+
return {
|
|
207
|
+
left: [logo],
|
|
208
|
+
right: [bootcampCta(bootcampSlug)],
|
|
209
|
+
mainMenu: []
|
|
210
|
+
};
|
|
211
|
+
};
|