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,149 +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 useRegions = function useRegions(backendURL) {
|
14
|
-
// Fetch data for site regions and set the active region
|
15
|
-
var _useState = (0, _react.useState)(null),
|
16
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
17
|
-
regions = _useState2[0],
|
18
|
-
setRegions = _useState2[1];
|
19
|
-
var _useState3 = (0, _react.useState)(null),
|
20
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
21
|
-
region = _useState4[0],
|
22
|
-
setRegion = _useState4[1];
|
23
|
-
var _useState5 = (0, _react.useState)(null),
|
24
|
-
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
25
|
-
userLocation = _useState6[0],
|
26
|
-
setUserLocation = _useState6[1];
|
27
|
-
var _useState7 = (0, _react.useState)(false),
|
28
|
-
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
29
|
-
done = _useState8[0],
|
30
|
-
setDone = _useState8[1];
|
31
|
-
(0, _react.useEffect)(function () {
|
32
|
-
// Retrive the region list from Drupal and set into state
|
33
|
-
var getRegions = /*#__PURE__*/function () {
|
34
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
35
|
-
var url, response, data, regionsData;
|
36
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
37
|
-
while (1) switch (_context.prev = _context.next) {
|
38
|
-
case 0:
|
39
|
-
url = "".concat(backendURL, "/api-v1/FetchTaxonomyByMachineName/region_list");
|
40
|
-
_context.prev = 1;
|
41
|
-
_context.next = 4;
|
42
|
-
return _axios["default"].get(url);
|
43
|
-
case 4:
|
44
|
-
response = _context.sent;
|
45
|
-
data = response.data;
|
46
|
-
if (data && data.length) {
|
47
|
-
regionsData = data.map(function (region) {
|
48
|
-
return {
|
49
|
-
name: region.name,
|
50
|
-
isoCode: region.iso_code,
|
51
|
-
children: region.children.map(function (child) {
|
52
|
-
return {
|
53
|
-
name: child.name,
|
54
|
-
isoCode: child.iso_code
|
55
|
-
};
|
56
|
-
})
|
57
|
-
};
|
58
|
-
});
|
59
|
-
setRegions(regionsData);
|
60
|
-
} else {
|
61
|
-
setDone(true);
|
62
|
-
}
|
63
|
-
_context.next = 12;
|
64
|
-
break;
|
65
|
-
case 9:
|
66
|
-
_context.prev = 9;
|
67
|
-
_context.t0 = _context["catch"](1);
|
68
|
-
setDone(true);
|
69
|
-
// for testing purposes
|
70
|
-
case 12:
|
71
|
-
case "end":
|
72
|
-
return _context.stop();
|
73
|
-
}
|
74
|
-
}, _callee, null, [[1, 9]]);
|
75
|
-
}));
|
76
|
-
return function getRegions() {
|
77
|
-
return _ref.apply(this, arguments);
|
78
|
-
};
|
79
|
-
}();
|
80
|
-
if (backendURL) {
|
81
|
-
getRegions();
|
82
|
-
}
|
83
|
-
}, [backendURL]);
|
84
|
-
(0, _react.useEffect)(function () {
|
85
|
-
var shhhh = "5FeeMMNq0pC4YNt";
|
86
|
-
// Retrieves the user's location for automatic region assignment and set to state
|
87
|
-
var fetchUserLocation = /*#__PURE__*/function () {
|
88
|
-
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
|
89
|
-
var data;
|
90
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
|
91
|
-
while (1) switch (_context2.prev = _context2.next) {
|
92
|
-
case 0:
|
93
|
-
_context2.next = 2;
|
94
|
-
return _axios["default"].get("https://pro.ip-api.com/json/?key=".concat(shhhh, "&fields=status,countryCode,query&lang="));
|
95
|
-
case 2:
|
96
|
-
data = _context2.sent;
|
97
|
-
if (data !== null && data !== void 0 && data.countryCode) {
|
98
|
-
setUserLocation(data.countryCode);
|
99
|
-
} else {
|
100
|
-
setDone(true);
|
101
|
-
}
|
102
|
-
case 4:
|
103
|
-
case "end":
|
104
|
-
return _context2.stop();
|
105
|
-
}
|
106
|
-
}, _callee2);
|
107
|
-
}));
|
108
|
-
return function fetchUserLocation() {
|
109
|
-
return _ref2.apply(this, arguments);
|
110
|
-
};
|
111
|
-
}();
|
112
|
-
if (regions) {
|
113
|
-
fetchUserLocation();
|
114
|
-
}
|
115
|
-
}, [regions]);
|
116
|
-
(0, _react.useEffect)(function () {
|
117
|
-
// compare the user's location to the available site regions and set if matching
|
118
|
-
var checkForRegionMatch = function checkForRegionMatch() {
|
119
|
-
var match = regions.reduce(function (match, region) {
|
120
|
-
region.children.forEach(function (child) {
|
121
|
-
if ((child === null || child === void 0 ? void 0 : child.isoCode) === userLocation) {
|
122
|
-
match = region.isoCode;
|
123
|
-
}
|
124
|
-
});
|
125
|
-
return match;
|
126
|
-
}, null);
|
127
|
-
if (match) {
|
128
|
-
setRegion(match);
|
129
|
-
} else {
|
130
|
-
setDone(true);
|
131
|
-
}
|
132
|
-
};
|
133
|
-
if (userLocation, regions) {
|
134
|
-
checkForRegionMatch();
|
135
|
-
}
|
136
|
-
}, [userLocation, regions]);
|
137
|
-
return {
|
138
|
-
region: region,
|
139
|
-
regions: regions,
|
140
|
-
setRegion: setRegion,
|
141
|
-
setRegions: setRegions,
|
142
|
-
userLocation: userLocation,
|
143
|
-
setUserLocation: setUserLocation,
|
144
|
-
done: done,
|
145
|
-
setDone: setDone
|
146
|
-
};
|
147
|
-
};
|
148
|
-
var _default = useRegions;
|
149
|
-
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 useRoutes = function useRoutes(backendURL) {
|
14
|
-
// Fetches data for routing
|
15
|
-
// This is used for setting up custom routes (see Routing.js) as well as helping to setup custom fetching, formatting, and url setting for said pages
|
16
|
-
var _useState = (0, _react.useState)(null),
|
17
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
18
|
-
routesData = _useState2[0],
|
19
|
-
setRoutesData = _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;
|
24
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
25
|
-
while (1) switch (_context.prev = _context.next) {
|
26
|
-
case 0:
|
27
|
-
_context.prev = 0;
|
28
|
-
url = "".concat(backendURL, "/api-v1/FetchAllURLandType?_format=json");
|
29
|
-
_context.next = 4;
|
30
|
-
return _axios["default"].get(url);
|
31
|
-
case 4:
|
32
|
-
response = _context.sent;
|
33
|
-
// TODO - Format this data per site requirements
|
34
|
-
setRoutesData(response.data);
|
35
|
-
_context.next = 12;
|
36
|
-
break;
|
37
|
-
case 8:
|
38
|
-
_context.prev = 8;
|
39
|
-
_context.t0 = _context["catch"](0);
|
40
|
-
console.log(_context.t0);
|
41
|
-
setRoutesData("error");
|
42
|
-
case 12:
|
43
|
-
case "end":
|
44
|
-
return _context.stop();
|
45
|
-
}
|
46
|
-
}, _callee, null, [[0, 8]]);
|
47
|
-
}));
|
48
|
-
return function getData() {
|
49
|
-
return _ref.apply(this, arguments);
|
50
|
-
};
|
51
|
-
}();
|
52
|
-
if (!routesData) {
|
53
|
-
getData();
|
54
|
-
}
|
55
|
-
}, [backendURL]);
|
56
|
-
return routesData;
|
57
|
-
};
|
58
|
-
var _default = useRoutes;
|
59
|
-
exports["default"] = _default;
|
@@ -1,60 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports["default"] = void 0;
|
7
|
-
var _react = require("react");
|
8
|
-
var _reactScroll = require("react-scroll");
|
9
|
-
var useScrollTo = function useScrollTo() {
|
10
|
-
(0, _react.useEffect)(function () {
|
11
|
-
if (typeof window !== "undefined") {
|
12
|
-
var registerScrollTo = function registerScrollTo() {
|
13
|
-
// This tracks movement from react-scroll and determines whether or not to add an extra 100px of distance between the scrollY and the element we're scrolling to so that when the navbar expands during upward scrolling it doesn't cover up the top of the container we've sxrolled to.
|
14
|
-
|
15
|
-
// Determines whether or not the scroll action is going up or down the page based on current scrollY and destination offsetTop
|
16
|
-
var scrollUp = false;
|
17
|
-
|
18
|
-
// Determines if the scroll event is a function of react-scroll by clicking a navbar link or is artificially created during the 'end' function when scrolling up
|
19
|
-
var scrollEvent;
|
20
|
-
|
21
|
-
// This action occurs at the beginning of the scroll action, after the link click but before the scroll happens
|
22
|
-
// It determines if we are scrolling up/down and sets scrollEvent to true or false so that we aren't repeatedly moving up the DOM over and over
|
23
|
-
_reactScroll.Events.scrollEvent.register("begin", function (to, element) {
|
24
|
-
if (element && element.offsetTop) {
|
25
|
-
if (element.offsetTop < window.scrollY) {
|
26
|
-
scrollEvent = true;
|
27
|
-
scrollUp = true;
|
28
|
-
} else {
|
29
|
-
scrollUp = false;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
});
|
33
|
-
|
34
|
-
// This action occurs at the end of the scroll action
|
35
|
-
// Checks to see if we're scrolling up and if the scrollEvent is kicked off by a non-artificial scroll event and moves view up an extra 150px
|
36
|
-
_reactScroll.Events.scrollEvent.register("end", function (to, element) {
|
37
|
-
if (scrollUp && scrollEvent) {
|
38
|
-
scrollEvent = false;
|
39
|
-
_reactScroll.animateScroll.scrollTo(window.scrollY - 100, {
|
40
|
-
duration: 500,
|
41
|
-
delay: 0,
|
42
|
-
smooth: false,
|
43
|
-
offset: 0
|
44
|
-
});
|
45
|
-
}
|
46
|
-
});
|
47
|
-
};
|
48
|
-
registerScrollTo();
|
49
|
-
return function () {
|
50
|
-
var unregisterScrollTo = function unregisterScrollTo() {
|
51
|
-
_reactScroll.Events.scrollEvent.remove("begin");
|
52
|
-
_reactScroll.Events.scrollEvent.remove("end");
|
53
|
-
};
|
54
|
-
unregisterScrollTo();
|
55
|
-
};
|
56
|
-
}
|
57
|
-
}, []);
|
58
|
-
};
|
59
|
-
var _default = useScrollTo;
|
60
|
-
exports["default"] = _default;
|
@@ -1,58 +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 useSiteData = function useSiteData(language, backendURL) {
|
14
|
-
// Fetches general site data and sets into state
|
15
|
-
// Data usually consists of labels like 'Submit', 'Cancel', 'Learn More', etc.
|
16
|
-
// Data can be found in Drupal at Configuration -> Development -> Luna Variable Settings
|
17
|
-
var _useState = (0, _react.useState)(null),
|
18
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
19
|
-
data = _useState2[0],
|
20
|
-
setData = _useState2[1];
|
21
|
-
(0, _react.useEffect)(function () {
|
22
|
-
var fetchData = /*#__PURE__*/function () {
|
23
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
24
|
-
var url, response;
|
25
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
26
|
-
while (1) switch (_context.prev = _context.next) {
|
27
|
-
case 0:
|
28
|
-
url = "".concat(backendURL, "/api-v1/FetchAppData");
|
29
|
-
_context.prev = 1;
|
30
|
-
_context.next = 4;
|
31
|
-
return _axios["default"].get(url);
|
32
|
-
case 4:
|
33
|
-
response = _context.sent;
|
34
|
-
setData(response.data);
|
35
|
-
_context.next = 11;
|
36
|
-
break;
|
37
|
-
case 8:
|
38
|
-
_context.prev = 8;
|
39
|
-
_context.t0 = _context["catch"](1);
|
40
|
-
console.log(_context.t0);
|
41
|
-
case 11:
|
42
|
-
case "end":
|
43
|
-
return _context.stop();
|
44
|
-
}
|
45
|
-
}, _callee, null, [[1, 8]]);
|
46
|
-
}));
|
47
|
-
return function fetchData() {
|
48
|
-
return _ref.apply(this, arguments);
|
49
|
-
};
|
50
|
-
}();
|
51
|
-
if (language && backendURL) {
|
52
|
-
fetchData();
|
53
|
-
}
|
54
|
-
}, [language, backendURL]);
|
55
|
-
return data;
|
56
|
-
};
|
57
|
-
var _default = useSiteData;
|
58
|
-
exports["default"] = _default;
|
@@ -1,54 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.formatSocialLinks = exports.formatLogo = exports.formatLinksList = exports.formatLink = exports.formatLegalStuff = void 0;
|
7
|
-
var formatLinksList = function formatLinksList() {
|
8
|
-
return ["link one", "link two"];
|
9
|
-
};
|
10
|
-
exports.formatLinksList = formatLinksList;
|
11
|
-
var formatLogo = function formatLogo() {
|
12
|
-
return {
|
13
|
-
url: "mock-url.com",
|
14
|
-
altText: "Trimble Logo"
|
15
|
-
};
|
16
|
-
};
|
17
|
-
exports.formatLogo = formatLogo;
|
18
|
-
var formatLegalStuff = function formatLegalStuff() {
|
19
|
-
return [{
|
20
|
-
text: "one"
|
21
|
-
}, {
|
22
|
-
text: "two"
|
23
|
-
}, {
|
24
|
-
text: "three"
|
25
|
-
}];
|
26
|
-
};
|
27
|
-
exports.formatLegalStuff = formatLegalStuff;
|
28
|
-
var formatSocialLinks = function formatSocialLinks(socialLinkData) {
|
29
|
-
return [{
|
30
|
-
icon: {
|
31
|
-
altText: "icon 1",
|
32
|
-
url: "/icon-1.jpg"
|
33
|
-
},
|
34
|
-
link: {
|
35
|
-
url: "www.link-1.com"
|
36
|
-
}
|
37
|
-
}, {
|
38
|
-
icon: {
|
39
|
-
altText: "icon 2",
|
40
|
-
url: "/icon-2.jpg"
|
41
|
-
},
|
42
|
-
link: {
|
43
|
-
url: "www.link-2.com"
|
44
|
-
}
|
45
|
-
}];
|
46
|
-
};
|
47
|
-
exports.formatSocialLinks = formatSocialLinks;
|
48
|
-
var formatLink = function formatLink(linkData) {
|
49
|
-
return {
|
50
|
-
url: "link-url-mock.com",
|
51
|
-
text: "Test Link"
|
52
|
-
};
|
53
|
-
};
|
54
|
-
exports.formatLink = formatLink;
|
@@ -1,130 +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.formatLinks = exports["default"] = void 0;
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
9
|
-
var _fpoSquare = _interopRequireDefault(require("../assets/images/fpoSquare.png"));
|
10
|
-
var _fpoBox = _interopRequireDefault(require("../assets/images/fpoBox.png"));
|
11
|
-
var _formatHeroOne = _interopRequireDefault(require("./organismFormat/heroes/formatHeroOne"));
|
12
|
-
var _formatHeroTwo = _interopRequireDefault(require("./organismFormat/heroes/formatHeroTwo"));
|
13
|
-
var _formatHeroThree = _interopRequireDefault(require("./organismFormat/heroes/formatHeroThree"));
|
14
|
-
var _formatHeroFour = _interopRequireDefault(require("./organismFormat/heroes/formatHeroFour"));
|
15
|
-
var _formatHeroSix = _interopRequireDefault(require("./organismFormat/heroes/formatHeroSix"));
|
16
|
-
var _formatHeroSeven = _interopRequireDefault(require("./organismFormat/heroes/formatHeroSeven"));
|
17
|
-
var _formatFeatOne = _interopRequireDefault(require("./organismFormat/feats/formatFeatOne"));
|
18
|
-
var _formatFeatTwoA = _interopRequireDefault(require("./organismFormat/feats/formatFeatTwoA"));
|
19
|
-
var _formatFeatTwoB = _interopRequireDefault(require("./organismFormat/feats/formatFeatTwoB"));
|
20
|
-
var _formatFeatThree = _interopRequireDefault(require("./organismFormat/feats/formatFeatThree"));
|
21
|
-
var _formatFeatFour = _interopRequireDefault(require("./organismFormat/feats/formatFeatFour"));
|
22
|
-
var _formatFeatFive = _interopRequireDefault(require("./organismFormat/feats/formatFeatFive"));
|
23
|
-
var _formatPullQuote = _interopRequireDefault(require("./organismFormat/feats/formatPullQuote"));
|
24
|
-
var _formatFeatSeven = _interopRequireDefault(require("./organismFormat/feats/formatFeatSeven"));
|
25
|
-
var _formatListFeatOneV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatOneV2"));
|
26
|
-
var _formatListFeatTwoV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatTwoV2"));
|
27
|
-
var _formatListFeatThreeV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatThreeV2"));
|
28
|
-
var _formatListFeatFourV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatFourV2"));
|
29
|
-
var _formatListFeatFiveV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatFiveV2"));
|
30
|
-
var _formatListFeatSixV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatSixV2"));
|
31
|
-
var _formatListFeatSevenV = _interopRequireDefault(require("./organismFormat/listFeats/formatListFeatSevenV2"));
|
32
|
-
var formatLinks = function formatLinks(link, languageCode, languageEnabled) {
|
33
|
-
if (languageEnabled && link[0] === "/") {
|
34
|
-
return "/".concat(languageCode).concat(link);
|
35
|
-
} else {
|
36
|
-
return link;
|
37
|
-
}
|
38
|
-
};
|
39
|
-
exports.formatLinks = formatLinks;
|
40
|
-
var formatContentSections = function formatContentSections() {
|
41
|
-
var content_sections = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
42
|
-
var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "en";
|
43
|
-
var languageEnabled = arguments.length > 2 ? arguments[2] : undefined;
|
44
|
-
var labels = arguments.length > 3 ? arguments[3] : undefined;
|
45
|
-
var customMethods = arguments.length > 4 ? arguments[4] : undefined;
|
46
|
-
// Iterates over the response data and formats it so that it can be properly consumed by our Luna organisms
|
47
|
-
// All organisms will be returned in objects with content, theme, and type properties
|
48
|
-
// Custom organisms are added here by creating a new file for it in the organismFormat directory, then imported here and added to the methods array leveraging the 'type' value from the JSON to determine the matching formatting method
|
49
|
-
|
50
|
-
var languageCode = language.substring(0, 2) || "en";
|
51
|
-
var sections;
|
52
|
-
var links = [];
|
53
|
-
if (content_sections) {
|
54
|
-
content_sections.forEach(function (sections) {
|
55
|
-
var _sections$field_ancho, _sections$field_ancho2, _sections$field_ancho3, _sections$field_ancho4, _sections$field_ancho5, _sections$field_ancho6;
|
56
|
-
if (sections !== null && sections !== void 0 && (_sections$field_ancho = sections.field_anchor_text) !== null && _sections$field_ancho !== void 0 && (_sections$field_ancho2 = _sections$field_ancho.values) !== null && _sections$field_ancho2 !== void 0 && (_sections$field_ancho3 = _sections$field_ancho2[0]) !== null && _sections$field_ancho3 !== void 0 && _sections$field_ancho3.value && (sections === null || sections === void 0 ? void 0 : (_sections$field_ancho4 = sections.field_anchor_text) === null || _sections$field_ancho4 === void 0 ? void 0 : (_sections$field_ancho5 = _sections$field_ancho4.values) === null || _sections$field_ancho5 === void 0 ? void 0 : (_sections$field_ancho6 = _sections$field_ancho5[0]) === null || _sections$field_ancho6 === void 0 ? void 0 : _sections$field_ancho6.value) !== "") {
|
57
|
-
var _sections$field_ancho7, _sections$field_ancho8, _sections$field_ancho9, _sections$field_ancho10, _sections$field_ancho11, _sections$field_ancho12;
|
58
|
-
links.push({
|
59
|
-
text: sections === null || sections === void 0 ? void 0 : (_sections$field_ancho7 = sections.field_anchor_text) === null || _sections$field_ancho7 === void 0 ? void 0 : (_sections$field_ancho8 = _sections$field_ancho7.values) === null || _sections$field_ancho8 === void 0 ? void 0 : (_sections$field_ancho9 = _sections$field_ancho8[0]) === null || _sections$field_ancho9 === void 0 ? void 0 : _sections$field_ancho9.value,
|
60
|
-
url: sections === null || sections === void 0 ? void 0 : (_sections$field_ancho10 = sections.field_anchor_text) === null || _sections$field_ancho10 === void 0 ? void 0 : (_sections$field_ancho11 = _sections$field_ancho10.values) === null || _sections$field_ancho11 === void 0 ? void 0 : (_sections$field_ancho12 = _sections$field_ancho11[0]) === null || _sections$field_ancho12 === void 0 ? void 0 : _sections$field_ancho12.value
|
61
|
-
});
|
62
|
-
}
|
63
|
-
});
|
64
|
-
// Home page JSON is structured slightly differently at top level
|
65
|
-
sections = content_sections;
|
66
|
-
} else {
|
67
|
-
// For all non-home page data
|
68
|
-
sections = Object.values(content_sections).map(function (section) {
|
69
|
-
return section[0];
|
70
|
-
});
|
71
|
-
sections.forEach(function (section) {
|
72
|
-
var _section$field_anchor, _section$field_anchor2, _section$field_anchor3, _sections, _sections$field_ancho13, _sections$field_ancho14, _sections$field_ancho15;
|
73
|
-
if (section !== null && section !== void 0 && (_section$field_anchor = section.field_anchor_text) !== null && _section$field_anchor !== void 0 && (_section$field_anchor2 = _section$field_anchor.values) !== null && _section$field_anchor2 !== void 0 && (_section$field_anchor3 = _section$field_anchor2[0]) !== null && _section$field_anchor3 !== void 0 && _section$field_anchor3.value && ((_sections = sections) === null || _sections === void 0 ? void 0 : (_sections$field_ancho13 = _sections.field_anchor_text) === null || _sections$field_ancho13 === void 0 ? void 0 : (_sections$field_ancho14 = _sections$field_ancho13.values) === null || _sections$field_ancho14 === void 0 ? void 0 : (_sections$field_ancho15 = _sections$field_ancho14[0]) === null || _sections$field_ancho15 === void 0 ? void 0 : _sections$field_ancho15.value) !== "") {
|
74
|
-
var _section$field_anchor4, _section$field_anchor5, _section$field_anchor6, _section$field_anchor7, _section$field_anchor8, _section$field_anchor9;
|
75
|
-
links.push({
|
76
|
-
text: section === null || section === void 0 ? void 0 : (_section$field_anchor4 = section.field_anchor_text) === null || _section$field_anchor4 === void 0 ? void 0 : (_section$field_anchor5 = _section$field_anchor4.values) === null || _section$field_anchor5 === void 0 ? void 0 : (_section$field_anchor6 = _section$field_anchor5[0]) === null || _section$field_anchor6 === void 0 ? void 0 : _section$field_anchor6.value,
|
77
|
-
url: section === null || section === void 0 ? void 0 : (_section$field_anchor7 = section.field_anchor_text) === null || _section$field_anchor7 === void 0 ? void 0 : (_section$field_anchor8 = _section$field_anchor7.values) === null || _section$field_anchor8 === void 0 ? void 0 : (_section$field_anchor9 = _section$field_anchor8[0]) === null || _section$field_anchor9 === void 0 ? void 0 : _section$field_anchor9.value
|
78
|
-
});
|
79
|
-
}
|
80
|
-
});
|
81
|
-
}
|
82
|
-
var combinedMethods = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, methods), customMethods);
|
83
|
-
// Filter out content sections with missing data (no type or corresponding method to type)
|
84
|
-
var formattedSections = sections
|
85
|
-
// These filters act as progressive null checking
|
86
|
-
.filter(function (section) {
|
87
|
-
return section.type;
|
88
|
-
}).filter(function (section) {
|
89
|
-
return combinedMethods[section.type];
|
90
|
-
}).map(function (section) {
|
91
|
-
return combinedMethods[section.type](section, languageCode, languageEnabled, labels, _fpoBox["default"], formatLinks, _fpoSquare["default"]);
|
92
|
-
});
|
93
|
-
return {
|
94
|
-
formattedSections: formattedSections,
|
95
|
-
links: links
|
96
|
-
};
|
97
|
-
};
|
98
|
-
var formatFeatTwo = function formatFeatTwo(data, languageCode, languageEnabled, labels, fpoBox) {
|
99
|
-
var _data$field_s_list$va, _data$field_s_list$va2;
|
100
|
-
if ((data === null || data === void 0 ? void 0 : (_data$field_s_list$va = data.field_s_list.values) === null || _data$field_s_list$va === void 0 ? void 0 : (_data$field_s_list$va2 = _data$field_s_list$va[0]) === null || _data$field_s_list$va2 === void 0 ? void 0 : _data$field_s_list$va2.type) === "m_icon_list") {
|
101
|
-
return (0, _formatFeatTwoB["default"])(data, languageCode, languageEnabled, labels, fpoBox);
|
102
|
-
} else {
|
103
|
-
return (0, _formatFeatTwoA["default"])(data);
|
104
|
-
}
|
105
|
-
};
|
106
|
-
var methods = {
|
107
|
-
pbo_feat_1: _formatFeatOne["default"],
|
108
|
-
pbo_feat_2: formatFeatTwo,
|
109
|
-
pbo_feat_3: _formatFeatThree["default"],
|
110
|
-
pbo_feat_4: _formatFeatFour["default"],
|
111
|
-
pbo_feat_5: _formatFeatFive["default"],
|
112
|
-
pbo_pull_quote: _formatPullQuote["default"],
|
113
|
-
pbo_feat_7: _formatFeatSeven["default"],
|
114
|
-
pbo_listfeat_1: _formatListFeatOneV["default"],
|
115
|
-
pbo_listfeat_2: _formatListFeatTwoV["default"],
|
116
|
-
pbo_listfeat_3: _formatListFeatThreeV["default"],
|
117
|
-
pbo_listfeat_4: _formatListFeatFourV["default"],
|
118
|
-
pbo_listfeat_5: _formatListFeatFiveV["default"],
|
119
|
-
pbo_listfeat_6: _formatListFeatSixV["default"],
|
120
|
-
pbo_listfeat_7: _formatListFeatSevenV["default"],
|
121
|
-
pbo_hero_1: _formatHeroOne["default"],
|
122
|
-
pbo_hero_2: _formatHeroTwo["default"],
|
123
|
-
pbo_hero_3: _formatHeroThree["default"],
|
124
|
-
pbo_hero_4: _formatHeroFour["default"],
|
125
|
-
pbo_hero_5: _formatHeroFour["default"],
|
126
|
-
pbo_hero_6: _formatHeroSix["default"],
|
127
|
-
pbo_hero_7: _formatHeroSeven["default"]
|
128
|
-
};
|
129
|
-
var _default = formatContentSections;
|
130
|
-
exports["default"] = _default;
|
@@ -1,82 +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.formatSocialLinks = exports.formatLogo = exports.formatLinksList = exports.formatLink = exports.formatLegalStuff = void 0;
|
8
|
-
var _facebook = _interopRequireDefault(require("../assets/images/facebook.svg"));
|
9
|
-
var _twitter = _interopRequireDefault(require("../assets/images/twitter.svg"));
|
10
|
-
var _youtube = _interopRequireDefault(require("../assets/images/youtube.svg"));
|
11
|
-
var _linkedin = _interopRequireDefault(require("../assets/images/linkedin.svg"));
|
12
|
-
var _instagram = _interopRequireDefault(require("../assets/images/instagram.svg"));
|
13
|
-
var formatLinksList = function formatLinksList() {
|
14
|
-
var links = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
15
|
-
var languageCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "en";
|
16
|
-
return links.map(function (link) {
|
17
|
-
return {
|
18
|
-
url: link.url[0] === "/" ? "/".concat(languageCode).concat(link.url) : link.url,
|
19
|
-
text: link.text
|
20
|
-
};
|
21
|
-
});
|
22
|
-
};
|
23
|
-
exports.formatLinksList = formatLinksList;
|
24
|
-
var formatLogo = function formatLogo(data) {
|
25
|
-
if (data) {
|
26
|
-
return {
|
27
|
-
url: data,
|
28
|
-
altText: "Trimble Logo"
|
29
|
-
};
|
30
|
-
} else {
|
31
|
-
return null;
|
32
|
-
}
|
33
|
-
};
|
34
|
-
exports.formatLogo = formatLogo;
|
35
|
-
var formatLegalStuff = function formatLegalStuff(legalStuffData) {
|
36
|
-
var data = legalStuffData || [];
|
37
|
-
return data.map(function (point) {
|
38
|
-
var formattedPoint = {
|
39
|
-
text: point.text
|
40
|
-
};
|
41
|
-
if (point.url !== "<nolink>") {
|
42
|
-
formattedPoint.url = point.url;
|
43
|
-
}
|
44
|
-
return formattedPoint;
|
45
|
-
});
|
46
|
-
};
|
47
|
-
exports.formatLegalStuff = formatLegalStuff;
|
48
|
-
var formatSocialLinks = function formatSocialLinks(socialLinkData) {
|
49
|
-
var socialIcons = {
|
50
|
-
facebook: _facebook["default"],
|
51
|
-
twitter: _twitter["default"],
|
52
|
-
linkedin: _linkedin["default"],
|
53
|
-
youtube: _youtube["default"],
|
54
|
-
instagram: _instagram["default"]
|
55
|
-
};
|
56
|
-
var data = socialLinkData || {};
|
57
|
-
var keys = Object.keys(data);
|
58
|
-
return keys.map(function (key) {
|
59
|
-
return {
|
60
|
-
icon: {
|
61
|
-
altText: "".concat(key, " logo"),
|
62
|
-
url: socialIcons[key]
|
63
|
-
},
|
64
|
-
link: {
|
65
|
-
url: data[key]
|
66
|
-
}
|
67
|
-
};
|
68
|
-
});
|
69
|
-
};
|
70
|
-
exports.formatSocialLinks = formatSocialLinks;
|
71
|
-
var formatLink = function formatLink(linkData) {
|
72
|
-
var data = linkData || {};
|
73
|
-
if (data.url && data.text) {
|
74
|
-
return {
|
75
|
-
url: data.url,
|
76
|
-
text: data.text
|
77
|
-
};
|
78
|
-
} else {
|
79
|
-
return null;
|
80
|
-
}
|
81
|
-
};
|
82
|
-
exports.formatLink = formatLink;
|
@@ -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 _trimble_logo = _interopRequireDefault(require("../assets/images/trimble_logo.png"));
|
9
|
-
var formatMenuSiteData = function formatMenuSiteData(data) {
|
10
|
-
var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "en";
|
11
|
-
var languageCode = language.substring(0, 2) || "en";
|
12
|
-
return formatMenuContent(data, languageCode);
|
13
|
-
};
|
14
|
-
var formatMenuContent = function formatMenuContent(data, languageCode) {
|
15
|
-
var languageEnabled = data.languageEnabled,
|
16
|
-
globalCTAText = data.globalCTAText,
|
17
|
-
globalCTAURL = data.globalCTAURL;
|
18
|
-
var rightLinks = [{
|
19
|
-
url: data.topNavLinkURL[0] === "/" ? "".concat(languageEnabled ? "/".concat(languageCode) : "").concat(data.topNavLinkURL) : data.topNavLinkURL,
|
20
|
-
text: data.topNavLinkText
|
21
|
-
}];
|
22
|
-
var navCTA = {
|
23
|
-
className: "ter-button--primary--1",
|
24
|
-
link: {
|
25
|
-
url: globalCTAURL === "/" ? "".concat(languageEnabled ? "/".concat(languageCode) : "").concat(globalCTAURL) : globalCTAURL,
|
26
|
-
text: globalCTAText
|
27
|
-
}
|
28
|
-
};
|
29
|
-
var logo = {
|
30
|
-
link: {
|
31
|
-
url: "".concat(languageEnabled ? "/".concat(languageCode) : "", "/")
|
32
|
-
},
|
33
|
-
url: _trimble_logo["default"],
|
34
|
-
altText: "Trimble Logo"
|
35
|
-
};
|
36
|
-
return {
|
37
|
-
logo: logo,
|
38
|
-
rightLinks: rightLinks,
|
39
|
-
navCTA: navCTA,
|
40
|
-
divisionName: data.siteTitle,
|
41
|
-
searchPlaceholder: data.searchPlaceholderText
|
42
|
-
};
|
43
|
-
};
|
44
|
-
var _default = formatMenuSiteData;
|
45
|
-
exports["default"] = _default;
|