luna-one 3.1.593 → 3.1.595
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +15 -294
- package/dist/luna/components/2x2/2x2.stories.js +456 -0
- package/dist/luna/components/2x2/2x2Documentation.mdx +77 -0
- package/dist/luna/components/Accordion/Accordion.stories.js +100 -0
- package/dist/luna/components/Accordion/AccordionDocumentation.mdx +46 -0
- package/dist/luna/components/AdminCategoryData/AdminCategoryData.stories.js +43 -0
- package/dist/luna/components/AdminCategoryData/CategoryTranslationData.js +4 -4
- package/dist/luna/components/AdminProductData/AdminProductData.js +4 -4
- package/dist/luna/components/AdminProductData/AdminProductData.stories.js +44 -0
- package/dist/luna/components/BlockListItems/BlockListItem.stories.js +2381 -0
- package/dist/luna/components/BlockListItems/BlockListItemsDocumentation.mdx +339 -0
- package/dist/luna/components/BrowserSupportBanner/BrowserSupportBrowser.stories.js +19 -0
- package/dist/luna/components/CTAButtons/CTAButtons.stories.js +142 -0
- package/dist/luna/components/CTAButtons/CTAButtonsDocumentation.mdx +33 -0
- package/dist/luna/components/Carousel/Carousel.stories.js +257 -0
- package/dist/luna/components/Carousel/CarouselDocumentation.mdx +161 -0
- package/dist/luna/components/ComparisonTable/ComparisonTable.stories.js +608 -0
- package/dist/luna/components/ComparisonTable/ComparisonTableDocumentation.mdx +159 -0
- package/dist/luna/components/CtaWithHeader/CTAHeaderText.stories.js +192 -0
- package/dist/luna/components/CtaWithHeader/CTAHeaderTextDocumentation.mdx +45 -0
- package/dist/luna/components/DataPoint/DataPoint.stories.js +235 -0
- package/dist/luna/components/DataPoint/DataPointDocumentation.mdx +40 -0
- package/dist/luna/components/EventCard/EventCard.js +3 -3
- package/dist/luna/components/EventCard/EventCard.stories.js +56 -0
- package/dist/luna/components/EventCard/EventCardDocumentation.mdx +46 -0
- package/dist/luna/components/FilterHero/FilterHero.stories.js +129 -0
- package/dist/luna/components/FilterSection/FilterSection.stories.js +174 -0
- package/dist/luna/{other-organisms → components}/Flyout/Flyout.js +4 -5
- package/dist/luna/components/Flyout/Flyout.stories.js +216 -0
- package/dist/luna/components/Flyout/FlyoutDocumentation.mdx +60 -0
- package/dist/luna/components/Footer/Footer.stories.js +418 -0
- package/dist/luna/components/Footer/FooterDocumentation.mdx +133 -0
- package/dist/{application → luna}/components/FooterHandler/FooterHandler.js +1 -1
- package/dist/luna/components/FullBackgroundHero/FullBackgroundHero.stories.js +574 -0
- package/dist/luna/components/FullBackgroundHero/FullBackgroundHeroDocumentation.mdx +94 -0
- package/dist/luna/components/HTMLEmbed/HTMLEmbed.stories.js +136 -0
- package/dist/luna/components/HTMLEmbed/HTMLEmbedDocumentation.mdx +31 -0
- package/dist/luna/components/Header/Header.stories.js +75 -0
- package/dist/luna/components/Header/HeaderDocumentation.mdx +24 -0
- package/dist/luna/components/IconTextList/IconTextList.stories.js +100 -0
- package/dist/luna/components/IconTextList/IconTextListDocumentation.mdx +46 -0
- package/dist/luna/components/ImageGallery/ImageGallery.stories.js +194 -0
- package/dist/luna/components/ImageGallery/ImageGalleryDocumentation.mdx +90 -0
- package/dist/luna/components/InPageJumpNav/InPageJumpNav.stories.js +104 -0
- package/dist/luna/components/InPageJumpNav/InPageJumpNavDocumentation.mdx +23 -0
- package/dist/luna/components/JobPosting/JobPosting.stories.js +76 -0
- package/dist/luna/components/JobPosting/JobPostingDocumentation.mdx +69 -0
- package/dist/luna/{other-organisms → components}/LanguageSelector/LanguageSelector.js +3 -4
- package/dist/luna/components/LanguageSelector/LanguageSelector.stories.js +128 -0
- package/dist/luna/components/LanguageSelector/LanguageSelectorDocumentation.mdx +120 -0
- package/dist/luna/components/LinkList/LinkList.stories.js +170 -0
- package/dist/luna/components/LinkList/LinkListDocumentation.mdx +54 -0
- package/dist/luna/components/LoadingSpinner/LoadingSpinner.stories.js +53 -0
- package/dist/luna/components/Login/Login.js +3 -4
- package/dist/luna/components/Login/Login.stories.js +86 -0
- package/dist/luna/components/MarketoForm/MarketoForm.stories.js +65 -0
- package/dist/luna/components/MarketoForm/MarketoFormDocumentation.mdx +1 -0
- package/dist/luna/components/MegaMenu/MegaMenu.js +6 -7
- package/dist/luna/components/MegaMenu/menu-generators/FullSubMenu.js +1 -1
- package/dist/luna/components/MegaMenu/menu-generators/PartialSubMenu.js +4 -5
- package/dist/luna/components/MegaMenu/menu-generators/SubMenu.js +16 -14
- package/dist/luna/components/MegaMenu/menu-generators/TertiaryMenu.js +13 -11
- package/dist/luna/components/MegaMenu/menu-generators/UncollapsedLinks.js +4 -5
- package/dist/luna/components/MobileLogin/MobileLogin.js +3 -4
- package/dist/luna/components/MobileMegaMenu/MobileMegaMenu.js +6 -6
- package/dist/luna/components/MobileMegaMenu/MobileMegaMenuCategory.js +9 -9
- package/dist/luna/components/MobileMegaMenu/MobileMegaMenuPartialCategory.js +3 -3
- package/dist/luna/components/MobileMegaMenu/MobileMegaMenuSubCategory.js +8 -9
- package/dist/luna/components/MobileNav/MobileNav.js +3 -4
- package/dist/luna/{other-organisms → components}/NavBar/NavMiniMenu.js +3 -4
- package/dist/luna/components/NavBar/NavigationBar.stories.js +2297 -0
- package/dist/luna/components/NavBar/NavigationBarDocumentation.mdx +245 -0
- package/dist/luna/{other-organisms → components}/NavBar/UtilityNav.js +5 -5
- package/dist/{application → luna}/components/NavBarHandler/NavBarHandler.js +1 -1
- package/dist/luna/components/NavBarTop/NavBarTop.js +9 -10
- package/dist/luna/components/NavSearch/NavSearch.js +1 -1
- package/dist/luna/components/NonTimeBasedListEntries/NonTimeBasedListEntries.stories.js +118 -0
- package/dist/luna/components/NonTimeBasedListEntries/NonTimeBasedListEntriesDocumentation.mdx +89 -0
- package/dist/luna/components/NonTimeBasedListEntries/NonTimeBasedListEntriesMethods.js +1 -1
- package/dist/luna/components/OverlayNotice/OverlayNotice.stories.js +96 -0
- package/dist/luna/components/OverlayNotice/OverlayNoticeDocumentation.mdx +45 -0
- package/dist/luna/components/ProductSummary/ProductSummary.stories.js +163 -0
- package/dist/luna/components/ProductsPackage/ProductsPackage.stories.js +384 -0
- package/dist/luna/components/ProseLayout/ProseLayout.stories.js +187 -0
- package/dist/luna/components/ProseLayout/ProseLayoutDocumentation.mdx +93 -0
- package/dist/luna/components/PullQuote/PullQuote.stories.js +556 -0
- package/dist/luna/components/PullQuote/PullQuoteDocumentation.mdx +60 -0
- package/dist/luna/components/RegionCard/RegionCard.js +4 -4
- package/dist/luna/components/ResourceGrid/ResourceGrid.stories.js +765 -0
- package/dist/luna/components/ResourceGrid/ResourceGridDocumentation.mdx +102 -0
- package/dist/luna/components/ScrollInPlace/ScrollInPlace.stories.js +171 -0
- package/dist/luna/components/ScrollInPlace/ScrollInPlaceDocumentation.mdx +123 -0
- package/dist/luna/components/SketchUpPricingCard/SketchUpPricingCard.stories.js +91 -0
- package/dist/luna/components/SlideOutFeat/SlideOutFeat.stories.js +32 -0
- package/dist/luna/components/StoreFrontCard/StoreFrontCard.js +1 -2
- package/dist/luna/components/StoreFrontCard/StoreFrontCard.stories.js +46 -0
- package/dist/luna/{other-organisms → components}/SubNav/SiblingsMenu.js +3 -3
- package/dist/luna/{other-organisms → components}/SubNav/SubNav.js +6 -7
- package/dist/luna/components/SuperHero/SuperHero.stories.js +806 -0
- package/dist/luna/components/SuperHero/SuperHeroDocumentation.mdx +57 -0
- package/dist/luna/components/SupportCard/SupportCard.stories.js +76 -0
- package/dist/luna/components/Tabs/Tabs.js +1 -2
- package/dist/luna/components/Tabs/Tabs.stories.js +585 -0
- package/dist/luna/components/Tabs/TabsDocumentation.mdx +94 -0
- package/dist/luna/components/TimeBasedList/TimeBasedList.stories.js +297 -0
- package/dist/luna/components/TimeBasedList/TimeBasedListDocumentation.mdx +123 -0
- package/dist/luna/components/TrainerCard/TrainerCard.stories.js +39 -0
- package/dist/luna/components/TrialForm/TrialFormStart/TrialFormStart.stories.js +69 -0
- package/dist/luna/components/VariableContentCard/VariableContentCard.js +4 -4
- package/dist/luna/components/Video/Video.stories.js +135 -0
- package/dist/luna/components/Video/VideoDocumentation.mdx +56 -0
- package/dist/luna/components/WaffleMenu/WaffleMenu.js +1 -1
- package/package.json +3 -3
- package/dist/application/components/HelmetHandler/HelmetHandler.js +0 -40
- package/dist/application/components/Loading/Loading.js +0 -22
- package/dist/application/components/Loading/Loading.scss +0 -10
- package/dist/application/components/Stack/Stack.js +0 -413
- package/dist/application/hooks/tests/useErrorPageData.test.js +0 -74
- package/dist/application/hooks/tests/useFetch.test.js +0 -70
- package/dist/application/hooks/tests/useFooterData.test.js +0 -106
- package/dist/application/hooks/tests/useFooterResponse.test.js +0 -70
- package/dist/application/hooks/tests/useFooterURL.test.js +0 -46
- package/dist/application/hooks/tests/useInnerPageNav.test.js +0 -36
- package/dist/application/hooks/tests/useLanguage.test.js +0 -57
- package/dist/application/hooks/tests/useLanguages.test.js +0 -133
- package/dist/application/hooks/tests/useMetadata.test.js +0 -33
- package/dist/application/hooks/tests/useNavResponse.test.js +0 -136
- package/dist/application/hooks/tests/useNavURL.test.js +0 -49
- package/dist/application/hooks/tests/usePageFetch.test.js +0 -203
- package/dist/application/hooks/tests/useRegions.test.js +0 -234
- package/dist/application/hooks/tests/useRoutes.test.js +0 -116
- package/dist/application/hooks/tests/useSiteData.test.js +0 -86
- package/dist/application/hooks/useErrorPageData.js +0 -59
- package/dist/application/hooks/useFetch.js +0 -67
- package/dist/application/hooks/useFooterData.js +0 -45
- package/dist/application/hooks/useFooterResponse.js +0 -56
- package/dist/application/hooks/useFooterURL.js +0 -32
- package/dist/application/hooks/useLanguage.js +0 -44
- package/dist/application/hooks/useLanguages.js +0 -66
- package/dist/application/hooks/useMetadata.js +0 -23
- package/dist/application/hooks/useNavData.js +0 -45
- package/dist/application/hooks/useNavResponse.js +0 -59
- package/dist/application/hooks/useNavURL.js +0 -41
- package/dist/application/hooks/usePageFetch.js +0 -109
- package/dist/application/hooks/useRegions.js +0 -149
- package/dist/application/hooks/useRoutes.js +0 -59
- package/dist/application/hooks/useScrollTo.js +0 -60
- package/dist/application/hooks/useSiteData.js +0 -58
- package/dist/application/methods/__mocks__/formatFooterDataMethods.js +0 -54
- package/dist/application/methods/formatContentSections.js +0 -130
- package/dist/application/methods/formatFooterDataMethods.js +0 -82
- package/dist/application/methods/formatMenuSiteData.js +0 -45
- package/dist/application/methods/formatMenus.js +0 -120
- package/dist/application/methods/locationRedirect.js +0 -16
- package/dist/application/methods/organismFormat/__mocks__/formatAnchors.js +0 -11
- package/dist/application/methods/organismFormat/__mocks__/formatCTAs.js +0 -10
- package/dist/application/methods/organismFormat/__mocks__/formatTheme.js +0 -15
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatFive.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatFour.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatOne.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatSeven.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatThree.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatTwoA.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatTwoB.js +0 -12
- package/dist/application/methods/organismFormat/feats/__mocks__/formatFeatTwoBIcons.js +0 -14
- package/dist/application/methods/organismFormat/feats/__mocks__/formatPullQuote.js +0 -12
- package/dist/application/methods/organismFormat/feats/formatFeatFive.js +0 -39
- package/dist/application/methods/organismFormat/feats/formatFeatFour.js +0 -36
- package/dist/application/methods/organismFormat/feats/formatFeatOne.js +0 -52
- package/dist/application/methods/organismFormat/feats/formatFeatSeven.js +0 -193
- package/dist/application/methods/organismFormat/feats/formatFeatThree.js +0 -41
- package/dist/application/methods/organismFormat/feats/formatFeatTwoA.js +0 -37
- package/dist/application/methods/organismFormat/feats/formatFeatTwoAFolds.js +0 -27
- package/dist/application/methods/organismFormat/feats/formatFeatTwoB.js +0 -40
- package/dist/application/methods/organismFormat/feats/formatFeatTwoBIcons.js +0 -20
- package/dist/application/methods/organismFormat/feats/formatPullQuote.js +0 -49
- package/dist/application/methods/organismFormat/feats/tests/formatFeatFive.test.js +0 -173
- package/dist/application/methods/organismFormat/feats/tests/formatFeatFour.test.js +0 -140
- package/dist/application/methods/organismFormat/feats/tests/formatFeatOne.test.js +0 -204
- package/dist/application/methods/organismFormat/feats/tests/formatFeatSeven.test.js +0 -680
- package/dist/application/methods/organismFormat/feats/tests/formatFeatThree.test.js +0 -142
- package/dist/application/methods/organismFormat/feats/tests/formatFeatTwoA.test.js +0 -342
- package/dist/application/methods/organismFormat/feats/tests/formatFeatTwoAFolds.test.js +0 -99
- package/dist/application/methods/organismFormat/feats/tests/formatFeatTwoB.test.js +0 -293
- package/dist/application/methods/organismFormat/feats/tests/formatFeatTwoBIcons.test.js +0 -78
- package/dist/application/methods/organismFormat/feats/tests/formatPullQuote.test.js +0 -178
- package/dist/application/methods/organismFormat/formatAnchors.js +0 -16
- package/dist/application/methods/organismFormat/formatCTAs.js +0 -34
- package/dist/application/methods/organismFormat/formatTheme.js +0 -29
- package/dist/application/methods/organismFormat/heroes/__mocks__/formatHeroFour.js +0 -12
- package/dist/application/methods/organismFormat/heroes/__mocks__/formatHeroOne.js +0 -12
- package/dist/application/methods/organismFormat/heroes/__mocks__/formatHeroSix.js +0 -12
- package/dist/application/methods/organismFormat/heroes/__mocks__/formatHeroThree.js +0 -12
- package/dist/application/methods/organismFormat/heroes/__mocks__/formatHeroTwo.js +0 -12
- package/dist/application/methods/organismFormat/heroes/formatHeroFour.js +0 -39
- package/dist/application/methods/organismFormat/heroes/formatHeroOne.js +0 -56
- package/dist/application/methods/organismFormat/heroes/formatHeroSeven.js +0 -56
- package/dist/application/methods/organismFormat/heroes/formatHeroSix.js +0 -51
- package/dist/application/methods/organismFormat/heroes/formatHeroThree.js +0 -58
- package/dist/application/methods/organismFormat/heroes/formatHeroTwo.js +0 -42
- package/dist/application/methods/organismFormat/heroes/tests/formatHeroFour.test.js +0 -245
- package/dist/application/methods/organismFormat/heroes/tests/formatHeroOne.test.js +0 -165
- package/dist/application/methods/organismFormat/heroes/tests/formatHeroSeven.test.js +0 -198
- package/dist/application/methods/organismFormat/heroes/tests/formatHeroSix.test.js +0 -196
- package/dist/application/methods/organismFormat/heroes/tests/formatHeroThree.test.js +0 -185
- package/dist/application/methods/organismFormat/heroes/tests/formatHeroTwo.test.js +0 -205
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatFive.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatFour.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatFourCards.js +0 -10
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatOne.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatOneCards.js +0 -17
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatOneV2Cards.js +0 -27
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatSeven.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatSevenCards.js +0 -10
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatSix.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatSixCards.js +0 -10
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatThree.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatThreeCards.js +0 -10
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatThreeV2Cards.js +0 -32
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatTopSection.js +0 -23
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatTwo.js +0 -12
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatTwoCards.js +0 -10
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatTwoV2Cards.js +0 -34
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatType.js +0 -10
- package/dist/application/methods/organismFormat/listFeats/__mocks__/formatListFeatV2.js +0 -33
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFive.js +0 -53
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFiveItemsV2.js +0 -32
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFiveV2.js +0 -39
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFour.js +0 -35
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFourCards.js +0 -24
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFourDumplingsV2.js +0 -36
- package/dist/application/methods/organismFormat/listFeats/formatListFeatFourV2.js +0 -38
- package/dist/application/methods/organismFormat/listFeats/formatListFeatOne.js +0 -46
- package/dist/application/methods/organismFormat/listFeats/formatListFeatOneCards.js +0 -36
- package/dist/application/methods/organismFormat/listFeats/formatListFeatOneV2.js +0 -41
- package/dist/application/methods/organismFormat/listFeats/formatListFeatOneV2Cards.js +0 -64
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSeven.js +0 -37
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSevenCards.js +0 -46
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSevenCardsV2.js +0 -48
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSevenV2.js +0 -39
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSix.js +0 -36
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSixCards.js +0 -15
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSixCardsV2.js +0 -16
- package/dist/application/methods/organismFormat/listFeats/formatListFeatSixV2.js +0 -38
- package/dist/application/methods/organismFormat/listFeats/formatListFeatThree.js +0 -40
- package/dist/application/methods/organismFormat/listFeats/formatListFeatThreeCards.js +0 -48
- package/dist/application/methods/organismFormat/listFeats/formatListFeatThreeV2.js +0 -40
- package/dist/application/methods/organismFormat/listFeats/formatListFeatThreeV2Cards.js +0 -39
- package/dist/application/methods/organismFormat/listFeats/formatListFeatTopSection.js +0 -33
- package/dist/application/methods/organismFormat/listFeats/formatListFeatTwo.js +0 -36
- package/dist/application/methods/organismFormat/listFeats/formatListFeatTwoCards.js +0 -34
- package/dist/application/methods/organismFormat/listFeats/formatListFeatTwoV2.js +0 -40
- package/dist/application/methods/organismFormat/listFeats/formatListFeatTwoV2Cards.js +0 -46
- package/dist/application/methods/organismFormat/listFeats/formatListFeatType.js +0 -27
- package/dist/application/methods/organismFormat/listFeats/formatListFeatV2.js +0 -21
- package/dist/application/methods/organismFormat/listFeats/tests/formatFeatSevenV2.test.js +0 -463
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatFive.test.js +0 -89
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatFiveV2.test.js +0 -238
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatFour.test.js +0 -75
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatFourCards.test.js +0 -65
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatFourV2.test.js +0 -358
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatOne.test.js +0 -98
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatOneCards.test.js +0 -67
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatOneV2.test.js +0 -191
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatOneV2Cards.test.js +0 -87
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatSeven.test.js +0 -120
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatSevenCards.test.js +0 -111
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatSix.test.js +0 -67
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatSixCards.test.js +0 -25
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatSixV2.test.js +0 -242
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatThree.test.js +0 -96
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatThreeCards.test.js +0 -94
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatThreeV2.test.js +0 -242
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatThreeV2Cards.test.js +0 -96
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatTopSection.test.js +0 -63
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatTwo.test.js +0 -86
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatTwoCards.test.js +0 -81
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatTwoV2.test.js +0 -299
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatTwoV2Cards.test.js +0 -159
- package/dist/application/methods/organismFormat/listFeats/tests/formatListFeatV2.test.js +0 -69
- package/dist/application/methods/organismFormat/listFeats/tests/mockData/listFeatOneV2MockData.js +0 -125
- package/dist/application/methods/organismFormat/tests/formatAnchors.test.js +0 -20
- package/dist/application/methods/organismFormat/tests/formatCTAs.test.js +0 -109
- package/dist/application/methods/organismFormat/tests/formatTheme.test.js +0 -54
- package/dist/application/methods/tests/formatContentSections.test.js +0 -237
- package/dist/application/methods/tests/formatFooterDataMethods.test.js +0 -138
- package/dist/luna/components/MiniFeatDropdown/MiniFeatDropdown.js +0 -78
- package/dist/luna/components/MiniFeatDropdown/MiniFeatDropdown.scss +0 -107
- package/dist/luna/featurettes/CustomFeat/CustomFeat.js +0 -157
- package/dist/luna/featurettes/CustomFeat/CustomFeat.scss +0 -18
- package/dist/luna/featurettes/Feat1/Feat1.js +0 -122
- package/dist/luna/featurettes/Feat1/Feat1.scss +0 -110
- package/dist/luna/featurettes/Feat1/feat1Methods.js +0 -18
- package/dist/luna/featurettes/Feat1/feat1Methods.test.js +0 -21
- package/dist/luna/featurettes/Feat2A/Feat2A.js +0 -101
- package/dist/luna/featurettes/Feat2A/Feat2A.scss +0 -132
- package/dist/luna/featurettes/Feat2B/Feat2B.js +0 -131
- package/dist/luna/featurettes/Feat2B/Feat2B.scss +0 -231
- package/dist/luna/featurettes/Feat2B/Feat2BMethods.js +0 -75
- package/dist/luna/featurettes/Feat2B/Feat2BMethods.test.js +0 -38
- package/dist/luna/featurettes/Feat3/Feat3.js +0 -89
- package/dist/luna/featurettes/Feat3/Feat3.scss +0 -49
- package/dist/luna/featurettes/Feat4/Feat4.js +0 -95
- package/dist/luna/featurettes/Feat4/Feat4.scss +0 -86
- package/dist/luna/featurettes/Feat5/Feat5.js +0 -194
- package/dist/luna/featurettes/Feat5/Feat5.scss +0 -235
- package/dist/luna/featurettes/Feat5/Feat5Methods.js +0 -19
- package/dist/luna/featurettes/Feat5/Feat5Methods.test.js +0 -23
- package/dist/luna/featurettes/Feat7/Feat7.js +0 -79
- package/dist/luna/featurettes/Feat7/Feat7.scss +0 -49
- package/dist/luna/featurettes/Feat7/Feat7Methods.js +0 -41
- package/dist/luna/featurettes/Feat8/Feat8.js +0 -75
- package/dist/luna/featurettes/Feat8/Feat8.scss +0 -103
- package/dist/luna/featurettes/Feat8/feat8Methods.js +0 -18
- package/dist/luna/featurettes/Feat8/feat8Methods.test.js +0 -21
- package/dist/luna/heroes/Hero1/Hero1.js +0 -111
- package/dist/luna/heroes/Hero1/Hero1.scss +0 -223
- package/dist/luna/heroes/Hero1/Hero1Methods.js +0 -84
- package/dist/luna/heroes/Hero1/useWindowSize.js +0 -47
- package/dist/luna/heroes/Hero2/Hero2.js +0 -130
- package/dist/luna/heroes/Hero2/Hero2.scss +0 -165
- package/dist/luna/heroes/Hero3/Hero3.js +0 -246
- package/dist/luna/heroes/Hero3/Hero3.scss +0 -250
- package/dist/luna/heroes/Hero3/Hero3Methods.js +0 -37
- package/dist/luna/heroes/Hero4/Hero4.js +0 -175
- package/dist/luna/heroes/Hero4/Hero4.scss +0 -112
- package/dist/luna/heroes/Hero4/hero4Methods.js +0 -18
- package/dist/luna/heroes/Hero6/Hero6.js +0 -179
- package/dist/luna/heroes/Hero6/Hero6.scss +0 -127
- package/dist/luna/heroes/Hero7/Hero7.js +0 -118
- package/dist/luna/heroes/Hero7/Hero7.scss +0 -193
- package/dist/luna/heroes/Hero7/Hero7Methods.js +0 -39
- package/dist/luna/heroes/Hero7/Hero7Methods.test.js +0 -109
- package/dist/luna/heroes/Hero7/useWindowWidth.js +0 -40
- package/dist/luna/list-feats/ListFeat/ListFeat.js +0 -149
- package/dist/luna/list-feats/ListFeat/ListFeat.scss +0 -112
- package/dist/luna/list-feats/ListFeat1/ListFeat1.js +0 -91
- package/dist/luna/list-feats/ListFeat1/ListFeat1.scss +0 -94
- package/dist/luna/list-feats/ListFeat1/listFeat1Methods.js +0 -14
- package/dist/luna/list-feats/ListFeat1/listFeat1Methods.test.js +0 -17
- package/dist/luna/list-feats/ListFeat2/ListFeat2.js +0 -30
- package/dist/luna/list-feats/ListFeat2/ListFeat2.scss +0 -20
- package/dist/luna/list-feats/ListFeat2/ListFeat2Methods.js +0 -33
- package/dist/luna/list-feats/ListFeat2/ListFeat2Methods.test.js +0 -11
- package/dist/luna/list-feats/ListFeat4/ListFeat4.js +0 -34
- package/dist/luna/list-feats/ListFeat4/ListFeat4.scss +0 -32
- package/dist/luna/list-feats/ListFeat5/ListFeat5.js +0 -28
- package/dist/luna/list-feats/ListFeat5/ListFeat5.scss +0 -27
- package/dist/luna/list-feats/ListFeat5/ListFeat5Methods.js +0 -24
- package/dist/luna/list-feats/ListFeat6/ListFeat6.js +0 -59
- package/dist/luna/list-feats/ListFeat6/ListFeat6.scss +0 -34
- package/dist/luna/list-feats/ListFeat7/ListFeat7.js +0 -51
- package/dist/luna/list-feats/ListFeat7/ListFeat7.scss +0 -14
- package/dist/luna/list-feats/ListFeat7/ListFeat7Methods.js +0 -49
- package/dist/luna/list-feats/ListFeatCustom/ListFeatCustom.js +0 -25
- package/dist/luna/list-feats/ListFeatCustom/ListFeatCustom.scss +0 -8
- package/dist/luna/list-feats/methods/listFeatMethods.js +0 -119
- /package/dist/luna/{featurettes → components}/Accordion/Accordion.js +0 -0
- /package/dist/luna/{featurettes → components}/Accordion/Accordion.scss +0 -0
- /package/dist/luna/{featurettes → components}/Accordion/AccordionItem.js +0 -0
- /package/dist/luna/{other-organisms → components}/Carousel/Carousel.js +0 -0
- /package/dist/luna/{other-organisms → components}/Carousel/Carousel.scss +0 -0
- /package/dist/luna/{heroes → components}/FilterHero/FilterHero.js +0 -0
- /package/dist/luna/{heroes → components}/FilterHero/FilterHero.scss +0 -0
- /package/dist/luna/{heroes → components}/FilterHero/FilterHeroMethods.js +0 -0
- /package/dist/luna/{other-organisms → components}/Flyout/Flyout.scss +0 -0
- /package/dist/luna/{other-organisms → components}/Footer/ExportedFooter.js +0 -0
- /package/dist/luna/{other-organisms → components}/Footer/Footer.js +0 -0
- /package/dist/luna/{other-organisms → components}/Footer/Footer.scss +0 -0
- /package/dist/luna/{other-organisms → components}/Footer/GlobalFooter.js +0 -0
- /package/dist/luna/{other-organisms → components}/Footer/SectorFooter.js +0 -0
- /package/dist/luna/{heroes → components}/FullBackgroundHero/FullBackgroundHero.js +0 -0
- /package/dist/luna/{heroes → components}/FullBackgroundHero/FullBackgroundHero.scss +0 -0
- /package/dist/luna/{heroes → components}/FullBackgroundHero/FullBackgroundHeroMethods.js +0 -0
- /package/dist/luna/{featurettes → components}/IconTextList/IconTextList.js +0 -0
- /package/dist/luna/{featurettes → components}/IconTextList/IconTextList.scss +0 -0
- /package/dist/luna/{other-organisms → components}/LanguageSelector/LanguageSelector.scss +0 -0
- /package/dist/luna/{other-organisms → components}/MarketoForm/MarketoForm.js +0 -0
- /package/dist/luna/{other-organisms → components}/MarketoForm/MarketoForm.scss +0 -0
- /package/dist/luna/{other-organisms → components}/NavBar/NavBar.js +0 -0
- /package/dist/luna/{other-organisms → components}/NavBar/NavBar.scss +0 -0
- /package/dist/luna/{other-organisms → components}/NavBar/NavOption.js +0 -0
- /package/dist/luna/{other-organisms → components}/NavBar/useNavPosition.js +0 -0
- /package/dist/luna/{featurettes → components}/ProductsPackage/ProductsPackage.js +0 -0
- /package/dist/luna/{featurettes → components}/ProductsPackage/ProductsPackage.scss +0 -0
- /package/dist/luna/{featurettes → components}/ProductsPackage/ProductsPackageMethods.js +0 -0
- /package/dist/luna/{featurettes → components}/PullQuote/PullQuote.js +0 -0
- /package/dist/luna/{featurettes → components}/PullQuote/PullQuote.scss +0 -0
- /package/dist/luna/{featurettes → components}/PullQuote/ico-quote-white.svg +0 -0
- /package/dist/luna/{featurettes → components}/PullQuote/ico-quote.svg +0 -0
- /package/dist/luna/{other-organisms → components}/SubNav/SubNav.scss +0 -0
- /package/dist/luna/{heroes → components}/SuperHero/SuperHero.js +0 -0
- /package/dist/luna/{heroes → components}/SuperHero/SuperHero.scss +0 -0
- /package/dist/luna/{heroes → components}/SuperHero/SuperHeroMethods.js +0 -0
- /package/dist/luna/{heroes → components}/SuperHero/useCompareContainerHeights.js +0 -0
- /package/dist/{application/assets → luna}/images/carat-down.svg +0 -0
- /package/dist/{application/assets → luna}/images/carat-up.svg +0 -0
- /package/dist/{application/assets → luna}/images/close-blue.svg +0 -0
- /package/dist/{application/assets → luna}/images/close.svg +0 -0
- /package/dist/{application/assets → luna}/images/ellipses.svg +0 -0
- /package/dist/{application/assets → luna}/images/facebook.svg +0 -0
- /package/dist/{application/assets → luna}/images/favicon.ico +0 -0
- /package/dist/{application/assets → luna}/images/fpoBox.png +0 -0
- /package/dist/{application/assets → luna}/images/fpoSquare.png +0 -0
- /package/dist/{application/assets → luna}/images/instagram.svg +0 -0
- /package/dist/{application/assets → luna}/images/linkedin.svg +0 -0
- /package/dist/{application/assets → luna}/images/loading-mini.gif +0 -0
- /package/dist/{application/assets → luna}/images/trimble_logo.png +0 -0
- /package/dist/{application/assets → luna}/images/twitter.svg +0 -0
- /package/dist/{application/assets → luna}/images/youtube.svg +0 -0
- /package/dist/{application → luna/utils}/hooks/useInnerPageNav.js +0 -0
@@ -1,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
var useErrorPageData = function useErrorPageData(data) {
|
11
|
-
// Responsible for formatting the 404/500 page data that is set into state by useSiteData
|
12
|
-
var _useState = (0, _react.useState)({}),
|
13
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
14
|
-
errorPageData = _useState2[0],
|
15
|
-
setErrorPageData = _useState2[1];
|
16
|
-
(0, _react.useEffect)(function () {
|
17
|
-
var formatErrorPageData = function formatErrorPageData() {
|
18
|
-
var _data$fourOhFourFiveH;
|
19
|
-
var fourOhFourData = {
|
20
|
-
header: data.fourOhFourHeader,
|
21
|
-
text: data.fourOhFourText,
|
22
|
-
image: {
|
23
|
-
url: data.fourOhFourFiveHundredImage,
|
24
|
-
altText: "404"
|
25
|
-
},
|
26
|
-
ctas: {
|
27
|
-
ctaOne: {
|
28
|
-
url: "/",
|
29
|
-
text: data.homeButtonText
|
30
|
-
}
|
31
|
-
}
|
32
|
-
};
|
33
|
-
var fiveHundredData = {
|
34
|
-
header: data.fiveHundredHeader,
|
35
|
-
text: data.fiveHundredText,
|
36
|
-
image: {
|
37
|
-
url: (_data$fourOhFourFiveH = data.fourOhFourFiveHundredImage) === null || _data$fourOhFourFiveH === void 0 ? void 0 : _data$fourOhFourFiveH.source,
|
38
|
-
altText: "500"
|
39
|
-
},
|
40
|
-
ctas: {
|
41
|
-
ctaOne: {
|
42
|
-
url: "/",
|
43
|
-
text: data.homeButtonText
|
44
|
-
}
|
45
|
-
}
|
46
|
-
};
|
47
|
-
setErrorPageData({
|
48
|
-
fourOhFourData: fourOhFourData,
|
49
|
-
fiveHundredData: fiveHundredData
|
50
|
-
});
|
51
|
-
};
|
52
|
-
if (data && data.fourOhFourHeader) {
|
53
|
-
formatErrorPageData();
|
54
|
-
}
|
55
|
-
}, [data]);
|
56
|
-
return errorPageData;
|
57
|
-
};
|
58
|
-
var _default = useErrorPageData;
|
59
|
-
exports["default"] = _default;
|
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
-
var _react = require("react");
|
12
|
-
var _axios = _interopRequireDefault(require("axios"));
|
13
|
-
var useFetch = function useFetch(url) {
|
14
|
-
// Responsible for fetching and formatting the footer data
|
15
|
-
var _useState = (0, _react.useState)(null),
|
16
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
17
|
-
response = _useState2[0],
|
18
|
-
setResponse = _useState2[1];
|
19
|
-
var _useState3 = (0, _react.useState)("loading"),
|
20
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
21
|
-
status = _useState4[0],
|
22
|
-
setStatus = _useState4[1];
|
23
|
-
(0, _react.useEffect)(function () {
|
24
|
-
// set response
|
25
|
-
var getData = /*#__PURE__*/function () {
|
26
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
27
|
-
var _response;
|
28
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
29
|
-
while (1) switch (_context.prev = _context.next) {
|
30
|
-
case 0:
|
31
|
-
_context.prev = 0;
|
32
|
-
setStatus("loading");
|
33
|
-
_context.next = 4;
|
34
|
-
return _axios["default"].get(url);
|
35
|
-
case 4:
|
36
|
-
_response = _context.sent;
|
37
|
-
setResponse(_response.data);
|
38
|
-
setStatus("success");
|
39
|
-
_context.next = 13;
|
40
|
-
break;
|
41
|
-
case 9:
|
42
|
-
_context.prev = 9;
|
43
|
-
_context.t0 = _context["catch"](0);
|
44
|
-
setStatus("error");
|
45
|
-
console.log(_context.t0);
|
46
|
-
case 13:
|
47
|
-
case "end":
|
48
|
-
return _context.stop();
|
49
|
-
}
|
50
|
-
}, _callee, null, [[0, 9]]);
|
51
|
-
}));
|
52
|
-
return function getData() {
|
53
|
-
return _ref.apply(this, arguments);
|
54
|
-
};
|
55
|
-
}();
|
56
|
-
if (url) {
|
57
|
-
getData();
|
58
|
-
}
|
59
|
-
}, [url]);
|
60
|
-
return {
|
61
|
-
response: response,
|
62
|
-
setResponse: setResponse,
|
63
|
-
status: status
|
64
|
-
};
|
65
|
-
};
|
66
|
-
var _default = useFetch;
|
67
|
-
exports["default"] = _default;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
var _formatFooterDataMethods = require("../methods/formatFooterDataMethods");
|
11
|
-
var useFooterData = function useFooterData(language, footerResponse, setFooterURL, setFooterResponse) {
|
12
|
-
// Responsible for fetching and formatting the footer data
|
13
|
-
var _useState = (0, _react.useState)(null),
|
14
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
15
|
-
footerData = _useState2[0],
|
16
|
-
setFooterData = _useState2[1];
|
17
|
-
(0, _react.useEffect)(function () {
|
18
|
-
var formatData = function formatData() {
|
19
|
-
var languageCode = language && typeof language === "string" ? language.substring(0, 2) : "en";
|
20
|
-
var formattedData = {
|
21
|
-
logo: (0, _formatFooterDataMethods.formatLogo)(footerResponse.logo),
|
22
|
-
trimbleText: footerResponse.trimble_specific_text,
|
23
|
-
trimbleLink: (0, _formatFooterDataMethods.formatLink)(footerResponse.trimble_specific_link),
|
24
|
-
siteLink: (0, _formatFooterDataMethods.formatLink)(footerResponse.site_specific_link),
|
25
|
-
siteText: footerResponse.site_specific_text,
|
26
|
-
linksOne: (0, _formatFooterDataMethods.formatLinksList)(footerResponse.link_list_1, languageCode),
|
27
|
-
linksTwo: (0, _formatFooterDataMethods.formatLinksList)(footerResponse.link_list_2, languageCode),
|
28
|
-
socialLinks: (0, _formatFooterDataMethods.formatSocialLinks)(footerResponse.social),
|
29
|
-
legalStuff: (0, _formatFooterDataMethods.formatLegalStuff)(footerResponse.trimble_bar)
|
30
|
-
};
|
31
|
-
setFooterData(formattedData);
|
32
|
-
setFooterResponse(null);
|
33
|
-
setFooterURL(null);
|
34
|
-
};
|
35
|
-
if (footerResponse && !footerData) {
|
36
|
-
formatData();
|
37
|
-
}
|
38
|
-
}, [language, footerResponse, setFooterURL, setFooterResponse]);
|
39
|
-
return {
|
40
|
-
footerData: footerData,
|
41
|
-
setFooterData: setFooterData
|
42
|
-
};
|
43
|
-
};
|
44
|
-
var _default = useFooterData;
|
45
|
-
exports["default"] = _default;
|
@@ -1,56 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
-
var _react = require("react");
|
12
|
-
var _axios = _interopRequireDefault(require("axios"));
|
13
|
-
var useFooterResponse = function useFooterResponse(url) {
|
14
|
-
// Responsible for fetching and formatting the footer data
|
15
|
-
var _useState = (0, _react.useState)(null),
|
16
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
17
|
-
footerResponse = _useState2[0],
|
18
|
-
setFooterResponse = _useState2[1];
|
19
|
-
(0, _react.useEffect)(function () {
|
20
|
-
// set response
|
21
|
-
try {
|
22
|
-
var getData = /*#__PURE__*/function () {
|
23
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
24
|
-
var response;
|
25
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
26
|
-
while (1) switch (_context.prev = _context.next) {
|
27
|
-
case 0:
|
28
|
-
_context.next = 2;
|
29
|
-
return _axios["default"].get(url);
|
30
|
-
case 2:
|
31
|
-
response = _context.sent;
|
32
|
-
setFooterResponse(response.data);
|
33
|
-
case 4:
|
34
|
-
case "end":
|
35
|
-
return _context.stop();
|
36
|
-
}
|
37
|
-
}, _callee);
|
38
|
-
}));
|
39
|
-
return function getData() {
|
40
|
-
return _ref.apply(this, arguments);
|
41
|
-
};
|
42
|
-
}();
|
43
|
-
if (url) {
|
44
|
-
getData();
|
45
|
-
}
|
46
|
-
} catch (e) {
|
47
|
-
console.log(e);
|
48
|
-
}
|
49
|
-
}, [url]);
|
50
|
-
return {
|
51
|
-
footerResponse: footerResponse,
|
52
|
-
setFooterResponse: setFooterResponse
|
53
|
-
};
|
54
|
-
};
|
55
|
-
var _default = useFooterResponse;
|
56
|
-
exports["default"] = _default;
|
@@ -1,32 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
var useFooterURL = function useFooterURL(language, languageEnabled, backendURL) {
|
11
|
-
// Responsible for fetching and formatting the footer data
|
12
|
-
var _useState = (0, _react.useState)(null),
|
13
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
14
|
-
footerURL = _useState2[0],
|
15
|
-
setFooterURL = _useState2[1];
|
16
|
-
(0, _react.useEffect)(function () {
|
17
|
-
// set url
|
18
|
-
var determineURL = function determineURL() {
|
19
|
-
var footerURL = "".concat(backendURL, "/").concat(languageEnabled ? "".concat(language, "/") : "", "api-v1/FetchBlockByMachineName/luna_drupal_c_footer");
|
20
|
-
setFooterURL(footerURL);
|
21
|
-
};
|
22
|
-
if (language && backendURL) {
|
23
|
-
determineURL();
|
24
|
-
}
|
25
|
-
}, [language, languageEnabled, backendURL]);
|
26
|
-
return {
|
27
|
-
footerURL: footerURL,
|
28
|
-
setFooterURL: setFooterURL
|
29
|
-
};
|
30
|
-
};
|
31
|
-
var _default = useFooterURL;
|
32
|
-
exports["default"] = _default;
|
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
var useLanguage = function useLanguage(languages) {
|
11
|
-
var _useState = (0, _react.useState)(null),
|
12
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
13
|
-
language = _useState2[0],
|
14
|
-
setLanguage = _useState2[1];
|
15
|
-
(0, _react.useEffect)(function () {
|
16
|
-
var checkForBrowserLanguage = function checkForBrowserLanguage() {
|
17
|
-
if (typeof window !== "undefined") {
|
18
|
-
var _window, _window$navigator, _window$navigator$use, _window2, _window2$navigator, _window2$navigator$la;
|
19
|
-
var browserLanguage = ((_window = window) === null || _window === void 0 ? void 0 : (_window$navigator = _window.navigator) === null || _window$navigator === void 0 ? void 0 : (_window$navigator$use = _window$navigator.userLanguage) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.substring(0, 2)) || ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$navigator = _window2.navigator) === null || _window2$navigator === void 0 ? void 0 : (_window2$navigator$la = _window2$navigator.language) === null || _window2$navigator$la === void 0 ? void 0 : _window2$navigator$la.substring(0, 2));
|
20
|
-
if (
|
21
|
-
// check the languages array for the browser's lanugageCode and return true if it's present
|
22
|
-
languages.reduce(function (bool, lang) {
|
23
|
-
if (browserLanguage === lang.id) {
|
24
|
-
bool = true;
|
25
|
-
}
|
26
|
-
return bool;
|
27
|
-
}, false)) {
|
28
|
-
setLanguage(browserLanguage);
|
29
|
-
} else {
|
30
|
-
setLanguage("en");
|
31
|
-
}
|
32
|
-
}
|
33
|
-
};
|
34
|
-
if (languages) {
|
35
|
-
checkForBrowserLanguage();
|
36
|
-
}
|
37
|
-
}, [languages]);
|
38
|
-
return {
|
39
|
-
language: language,
|
40
|
-
setLanguage: setLanguage
|
41
|
-
};
|
42
|
-
};
|
43
|
-
var _default = useLanguage;
|
44
|
-
exports["default"] = _default;
|
@@ -1,66 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
-
var _react = require("react");
|
12
|
-
var _axios = _interopRequireDefault(require("axios"));
|
13
|
-
var useLanguages = function useLanguages(backendURL) {
|
14
|
-
// Fetches the data for all available translations for the site
|
15
|
-
// Sets the active language translation into state
|
16
|
-
var _useState = (0, _react.useState)(null),
|
17
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
18
|
-
languages = _useState2[0],
|
19
|
-
setLanguages = _useState2[1];
|
20
|
-
(0, _react.useEffect)(function () {
|
21
|
-
var getData = /*#__PURE__*/function () {
|
22
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
23
|
-
var url, _response$data, response, formattedData;
|
24
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
25
|
-
while (1) switch (_context.prev = _context.next) {
|
26
|
-
case 0:
|
27
|
-
url = "".concat(backendURL, "/api-v1/GetLanguages");
|
28
|
-
_context.prev = 1;
|
29
|
-
_context.next = 4;
|
30
|
-
return _axios["default"].get(url);
|
31
|
-
case 4:
|
32
|
-
response = _context.sent;
|
33
|
-
formattedData = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (language) {
|
34
|
-
return {
|
35
|
-
id: language.id,
|
36
|
-
name: language.name
|
37
|
-
};
|
38
|
-
});
|
39
|
-
setLanguages(formattedData);
|
40
|
-
_context.next = 12;
|
41
|
-
break;
|
42
|
-
case 9:
|
43
|
-
_context.prev = 9;
|
44
|
-
_context.t0 = _context["catch"](1);
|
45
|
-
console.log(_context.t0);
|
46
|
-
case 12:
|
47
|
-
case "end":
|
48
|
-
return _context.stop();
|
49
|
-
}
|
50
|
-
}, _callee, null, [[1, 9]]);
|
51
|
-
}));
|
52
|
-
return function getData() {
|
53
|
-
return _ref.apply(this, arguments);
|
54
|
-
};
|
55
|
-
}();
|
56
|
-
if (backendURL) {
|
57
|
-
getData();
|
58
|
-
}
|
59
|
-
}, [backendURL]);
|
60
|
-
return {
|
61
|
-
languages: languages,
|
62
|
-
setLanguages: setLanguages
|
63
|
-
};
|
64
|
-
};
|
65
|
-
var _default = useLanguages;
|
66
|
-
exports["default"] = _default;
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
var useMetadata = function useMetadata() {
|
11
|
-
// Sets the metadata that is passed into React Helmet
|
12
|
-
// TODO update metadata initial state
|
13
|
-
var _useState = (0, _react.useState)({}),
|
14
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
15
|
-
metadata = _useState2[0],
|
16
|
-
setMetadata = _useState2[1];
|
17
|
-
return {
|
18
|
-
metadata: metadata,
|
19
|
-
setMetadata: setMetadata
|
20
|
-
};
|
21
|
-
};
|
22
|
-
var _default = useMetadata;
|
23
|
-
exports["default"] = _default;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
10
|
-
var _react = require("react");
|
11
|
-
var _formatMenus = _interopRequireDefault(require("../methods/formatMenus"));
|
12
|
-
var _formatMenuSiteData = _interopRequireDefault(require("../methods/formatMenuSiteData"));
|
13
|
-
// import logo
|
14
|
-
|
15
|
-
var useNavData = function useNavData(mainNavResponse, setMainNavResponse, setNavURLs, applicationData, language) {
|
16
|
-
// Fetches and formats the data for the navbar
|
17
|
-
var _useState = (0, _react.useState)(null),
|
18
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
19
|
-
navData = _useState2[0],
|
20
|
-
setNavData = _useState2[1];
|
21
|
-
(0, _react.useEffect)(function () {
|
22
|
-
// format main and nav site data
|
23
|
-
var formatNav = function formatNav() {
|
24
|
-
var navOptions = (0, _formatMenus["default"])(mainNavResponse, language, applicationData === null || applicationData === void 0 ? void 0 : applicationData.languageEnabled);
|
25
|
-
var menuSiteData = (0, _formatMenuSiteData["default"])(applicationData, language);
|
26
|
-
var newNavData = (0, _objectSpread2["default"])({
|
27
|
-
navOptions: navOptions
|
28
|
-
}, menuSiteData);
|
29
|
-
setNavData(newNavData);
|
30
|
-
setMainNavResponse(null);
|
31
|
-
if (setNavURLs) {
|
32
|
-
setNavURLs(null);
|
33
|
-
}
|
34
|
-
};
|
35
|
-
if (mainNavResponse && applicationData !== null && applicationData !== void 0 && applicationData.globalCTAText && applicationData !== null && applicationData !== void 0 && applicationData.globalCTAURL) {
|
36
|
-
formatNav();
|
37
|
-
}
|
38
|
-
}, [mainNavResponse, setMainNavResponse, setNavURLs, _formatMenus["default"], _formatMenuSiteData["default"], applicationData]);
|
39
|
-
return {
|
40
|
-
navData: navData,
|
41
|
-
setNavData: setNavData
|
42
|
-
};
|
43
|
-
};
|
44
|
-
var _default = useNavData;
|
45
|
-
exports["default"] = _default;
|
@@ -1,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
-
var _react = require("react");
|
12
|
-
var _axios = _interopRequireDefault(require("axios"));
|
13
|
-
var useNavResponse = function useNavResponse(urls, setUrls) {
|
14
|
-
// Fetches and formats the data for the navbar
|
15
|
-
var _useState = (0, _react.useState)(null),
|
16
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
17
|
-
mainNavResponse = _useState2[0],
|
18
|
-
setMainNavResponse = _useState2[1];
|
19
|
-
(0, _react.useEffect)(function () {
|
20
|
-
// fetch main nav data
|
21
|
-
|
22
|
-
var fetchData = function fetchData() {
|
23
|
-
fetchMainNavData();
|
24
|
-
if (setUrls && typeof setUrls === "function") {
|
25
|
-
setUrls(null);
|
26
|
-
}
|
27
|
-
};
|
28
|
-
var fetchMainNavData = /*#__PURE__*/function () {
|
29
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
30
|
-
var response;
|
31
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
32
|
-
while (1) switch (_context.prev = _context.next) {
|
33
|
-
case 0:
|
34
|
-
_context.next = 2;
|
35
|
-
return _axios["default"].get(urls.navURL);
|
36
|
-
case 2:
|
37
|
-
response = _context.sent;
|
38
|
-
setMainNavResponse(response === null || response === void 0 ? void 0 : response.data);
|
39
|
-
case 4:
|
40
|
-
case "end":
|
41
|
-
return _context.stop();
|
42
|
-
}
|
43
|
-
}, _callee);
|
44
|
-
}));
|
45
|
-
return function fetchMainNavData() {
|
46
|
-
return _ref.apply(this, arguments);
|
47
|
-
};
|
48
|
-
}();
|
49
|
-
if (urls && urls.navURL) {
|
50
|
-
fetchData();
|
51
|
-
}
|
52
|
-
}, [urls]);
|
53
|
-
return {
|
54
|
-
mainNavResponse: mainNavResponse,
|
55
|
-
setMainNavResponse: setMainNavResponse
|
56
|
-
};
|
57
|
-
};
|
58
|
-
var _default = useNavResponse;
|
59
|
-
exports["default"] = _default;
|
@@ -1,41 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
// import logo
|
11
|
-
|
12
|
-
var useNavURL = function useNavURL(language, languageEnabled, backendURL) {
|
13
|
-
// Fetches and formats the data for the navbar
|
14
|
-
var _useState = (0, _react.useState)(null),
|
15
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
16
|
-
navURLs = _useState2[0],
|
17
|
-
setNavURLs = _useState2[1];
|
18
|
-
(0, _react.useEffect)(function () {
|
19
|
-
// set urls for main nav data
|
20
|
-
// TODO - Create URL
|
21
|
-
var getURL = function getURL() {
|
22
|
-
var urlPrefix = backendURL;
|
23
|
-
|
24
|
-
// determines if the language should be a part of the endpoint string
|
25
|
-
var languagePrefix = languageEnabled ? "/".concat(language) : "";
|
26
|
-
var navURL = "".concat(urlPrefix).concat(languagePrefix, "/api-v1/FetchMenuByName/main");
|
27
|
-
setNavURLs({
|
28
|
-
navURL: navURL
|
29
|
-
});
|
30
|
-
};
|
31
|
-
if (language && backendURL) {
|
32
|
-
getURL();
|
33
|
-
}
|
34
|
-
}, [language, backendURL]);
|
35
|
-
return {
|
36
|
-
navURLs: navURLs,
|
37
|
-
setNavURLs: setNavURLs
|
38
|
-
};
|
39
|
-
};
|
40
|
-
var _default = useNavURL;
|
41
|
-
exports["default"] = _default;
|
@@ -1,109 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports["default"] = void 0;
|
8
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
-
var _react = require("react");
|
12
|
-
var _locationRedirect = _interopRequireDefault(require("../methods/locationRedirect"));
|
13
|
-
var usePageFetch = function usePageFetch(url, setStatus, setURL) {
|
14
|
-
// Fetches the data for normal pages
|
15
|
-
var _useState = (0, _react.useState)(null),
|
16
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
17
|
-
response = _useState2[0],
|
18
|
-
setResponse = _useState2[1];
|
19
|
-
var _useState3 = (0, _react.useState)(false),
|
20
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
21
|
-
error = _useState4[0],
|
22
|
-
setError = _useState4[1];
|
23
|
-
// the 'error' state is used only for testing purposes
|
24
|
-
|
25
|
-
(0, _react.useEffect)(function () {
|
26
|
-
// FETCH THE DATA
|
27
|
-
var getData = /*#__PURE__*/function () {
|
28
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
29
|
-
var _response, data, _data$redirect_destin, _data$redirect_destin2, redirect;
|
30
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
31
|
-
while (1) switch (_context.prev = _context.next) {
|
32
|
-
case 0:
|
33
|
-
setStatus("loading");
|
34
|
-
_context.prev = 1;
|
35
|
-
_context.next = 4;
|
36
|
-
return fetch(url);
|
37
|
-
case 4:
|
38
|
-
_response = _context.sent;
|
39
|
-
if (!((_response === null || _response === void 0 ? void 0 : _response.status) === 200)) {
|
40
|
-
_context.next = 10;
|
41
|
-
break;
|
42
|
-
}
|
43
|
-
_context.next = 8;
|
44
|
-
return _response.json();
|
45
|
-
case 8:
|
46
|
-
data = _context.sent;
|
47
|
-
// after parsing with a status of 200, redirects and 404s will be labeled with a status_code property - odd but servicable
|
48
|
-
if ((data === null || data === void 0 ? void 0 : data.status_code) === "301") {
|
49
|
-
// This is responsible for handling external redirects
|
50
|
-
_data$redirect_destin = data === null || data === void 0 ? void 0 : data.redirect_destination, _data$redirect_destin2 = (0, _slicedToArray2["default"])(_data$redirect_destin, 1), redirect = _data$redirect_destin2[0];
|
51
|
-
if (redirect) {
|
52
|
-
(0, _locationRedirect["default"])(redirect);
|
53
|
-
setError(true);
|
54
|
-
|
55
|
-
// setError used only for test purposes
|
56
|
-
} else {
|
57
|
-
// if we get a 301, but there's no redirect address, set an error
|
58
|
-
setResponse(null);
|
59
|
-
setURL(null);
|
60
|
-
setStatus("error");
|
61
|
-
setError(true);
|
62
|
-
// setError used only for test purposes
|
63
|
-
}
|
64
|
-
} else if ((data === null || data === void 0 ? void 0 : data.status_code) === "404") {
|
65
|
-
// After parsing, if you get a response from Drupal but there was no matching node, you'll get a status code of 404 - it's weird IDK
|
66
|
-
setStatus("404");
|
67
|
-
setURL(null);
|
68
|
-
setResponse(null);
|
69
|
-
setError(true);
|
70
|
-
// setError used only for test purposes
|
71
|
-
} else if (data) {
|
72
|
-
// parsed data that is from a valid endpoint doesn't have a status code like with 301/404
|
73
|
-
setResponse(data);
|
74
|
-
setURL(null);
|
75
|
-
}
|
76
|
-
case 10:
|
77
|
-
_context.next = 18;
|
78
|
-
break;
|
79
|
-
case 12:
|
80
|
-
_context.prev = 12;
|
81
|
-
_context.t0 = _context["catch"](1);
|
82
|
-
console.log(_context.t0);
|
83
|
-
setStatus("error");
|
84
|
-
setURL(null);
|
85
|
-
setError(true);
|
86
|
-
|
87
|
-
// setError used only for test purposes
|
88
|
-
case 18:
|
89
|
-
case "end":
|
90
|
-
return _context.stop();
|
91
|
-
}
|
92
|
-
}, _callee, null, [[1, 12]]);
|
93
|
-
}));
|
94
|
-
return function getData() {
|
95
|
-
return _ref.apply(this, arguments);
|
96
|
-
};
|
97
|
-
}();
|
98
|
-
if (url) {
|
99
|
-
getData();
|
100
|
-
}
|
101
|
-
}, [url, _locationRedirect["default"]]);
|
102
|
-
return {
|
103
|
-
response: response,
|
104
|
-
setResponse: setResponse,
|
105
|
-
error: error
|
106
|
-
};
|
107
|
-
};
|
108
|
-
var _default = usePageFetch;
|
109
|
-
exports["default"] = _default;
|