@newskit-render/core 0.0.0-d55b7d88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ci/trigger-circleci-workflow.sh +37 -0
- package/.eslintignore +23 -0
- package/.eslintrc +74 -0
- package/.prettierignore +19 -0
- package/.prettierrc +7 -0
- package/CHANGELOG.md +7638 -0
- package/Dockerfile +14 -0
- package/Dockerfile.withNewRelic +15 -0
- package/README.md +274 -0
- package/__tests__/pages/__snapshots__/brightcove.test.tsx.snap +20 -0
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +1195 -0
- package/__tests__/pages/brightcove.test.tsx +34 -0
- package/__tests__/pages/empty.test.tsx +10 -0
- package/__tests__/pages/home.test.tsx +16 -0
- package/app-context/InstrumentationContextProvider.tsx +36 -0
- package/assets/fontFamily.ts +416 -0
- package/assets/fonts/Graphik-Black-App.ttf +0 -0
- package/assets/fonts/Graphik-BlackItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Bold-App.ttf +0 -0
- package/assets/fonts/Graphik-BoldItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Extralight-App.ttf +0 -0
- package/assets/fonts/Graphik-ExtralightItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Light-App.ttf +0 -0
- package/assets/fonts/Graphik-LightItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Medium-App.ttf +0 -0
- package/assets/fonts/Graphik-Medium-Web.woff2 +0 -0
- package/assets/fonts/Graphik-MediumItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Regular-App.ttf +0 -0
- package/assets/fonts/Graphik-Regular-Web.woff2 +0 -0
- package/assets/fonts/Graphik-RegularItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Semibold-App.ttf +0 -0
- package/assets/fonts/Graphik-Semibold-Web.woff2 +0 -0
- package/assets/fonts/Graphik-SemiboldItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Super-App.ttf +0 -0
- package/assets/fonts/Graphik-SuperItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Thin-App.ttf +0 -0
- package/assets/fonts/Graphik-ThinItalic-App.ttf +0 -0
- package/assets/fonts/Montserrat-Black.ttf +0 -0
- package/assets/fonts/Montserrat-BlackItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Bold.ttf +0 -0
- package/assets/fonts/Montserrat-BoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraBold.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraLight.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraLightItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Italic.ttf +0 -0
- package/assets/fonts/Montserrat-Light.ttf +0 -0
- package/assets/fonts/Montserrat-LightItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/assets/fonts/Montserrat-MediumItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Regular.ttf +0 -0
- package/assets/fonts/Montserrat-SemiBold.ttf +0 -0
- package/assets/fonts/Montserrat-SemiBoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Thin.ttf +0 -0
- package/assets/fonts/Montserrat-ThinItalic.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Black-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-BlackItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Bold-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Bold-Web.woff2 +0 -0
- package/assets/fonts/PublicoHeadline-BoldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Extrabold-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-ExtraboldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Italic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Light-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-LightItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Medium-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-MediumItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Roman-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Roman-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Bold-App.ttf +0 -0
- package/assets/fonts/PublicoText-BoldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoText-Italic-App.ttf +0 -0
- package/assets/fonts/PublicoText-Italic-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Roman-App.ttf +0 -0
- package/assets/fonts/PublicoText-Roman-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Semibold-App.ttf +0 -0
- package/assets/fonts/PublicoText-SemiboldItalic-App.ttf +0 -0
- package/assets/fonts/Roboto-Bold.ttf +0 -0
- package/assets/fonts/Roboto-Light.ttf +0 -0
- package/assets/fonts/Roboto-Medium.ttf +0 -0
- package/assets/fonts/Roboto-Regular.ttf +0 -0
- package/assets/fonts/TheSun-Bold.ttf +0 -0
- package/assets/fonts/TheSun-BoldItalic.ttf +0 -0
- package/assets/fonts/TheSun-HeavyCondensed.ttf +0 -0
- package/assets/fonts/TheSun-HeavyNarrow.ttf +0 -0
- package/assets/fonts/TheSun-Italic.ttf +0 -0
- package/assets/fonts/TheSun-Medium.ttf +0 -0
- package/assets/fonts/TheSun-MediumItalic.ttf +0 -0
- package/assets/fonts/TheSun-Regular.ttf +0 -0
- package/assets/fonts/TimesDigital-Bold.ttf +0 -0
- package/assets/fonts/TimesDigital-BoldItalic.ttf +0 -0
- package/assets/fonts/TimesDigital-BoldSC.ttf +0 -0
- package/assets/fonts/TimesDigital-Italic.ttf +0 -0
- package/assets/fonts/TimesDigital-Regular.ttf +0 -0
- package/assets/fonts/TimesDigital-RegularSC.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Bold.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-BoldItalic.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-BoldSC.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Italic.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Regular.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-RegularSC.ttf +0 -0
- package/assets/fonts/TimesModern-Regular.otf +0 -0
- package/assets/fonts/attribuitions.mdx +35 -0
- package/assets/fonts/bitter-medium.woff +0 -0
- package/assets/fonts/bitter-medium.woff2 +0 -0
- package/assets/fonts/bitter-mediumitalic.woff +0 -0
- package/assets/fonts/bitter-mediumitalic.woff2 +0 -0
- package/assets/fonts/bitter-regular.woff +0 -0
- package/assets/fonts/bitter-regular.woff2 +0 -0
- package/assets/fonts/bitter-semibold.woff +0 -0
- package/assets/fonts/bitter-semibold.woff2 +0 -0
- package/assets/fonts/dmmono-medium.woff +0 -0
- package/assets/fonts/dmmono-medium.woff2 +0 -0
- package/assets/fonts/dmsans-bold-webfont.woff +0 -0
- package/assets/fonts/dmsans-bold-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-bolditalic-webfont.woff +0 -0
- package/assets/fonts/dmsans-bolditalic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-italic-webfont.woff +0 -0
- package/assets/fonts/dmsans-italic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-medium-webfont.woff +0 -0
- package/assets/fonts/dmsans-medium-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-mediumitalic-webfont.woff +0 -0
- package/assets/fonts/dmsans-mediumitalic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-regular-webfont.woff +0 -0
- package/assets/fonts/dmsans-regular-webfont.woff2 +0 -0
- package/assets/fonts/notosans-bold-webfont.woff +0 -0
- package/assets/fonts/notosans-bold-webfont.woff2 +0 -0
- package/assets/fonts/notosans-italic-webfont.woff +0 -0
- package/assets/fonts/notosans-italic-webfont.woff2 +0 -0
- package/assets/fonts/notosans-medium-webfont.woff +0 -0
- package/assets/fonts/notosans-medium-webfont.woff2 +0 -0
- package/assets/fonts/notosans-regular-webfont.woff +0 -0
- package/assets/fonts/notosans-regular-webfont.woff2 +0 -0
- package/assets/fonts/poppins-bold-webfont.woff +0 -0
- package/assets/fonts/poppins-bold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-bolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-bolditalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-extrabold-webfont.woff +0 -0
- package/assets/fonts/poppins-extrabold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-extrabolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-extrabolditalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-italic-webfont.woff +0 -0
- package/assets/fonts/poppins-italic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-light-webfont.woff +0 -0
- package/assets/fonts/poppins-light-webfont.woff2 +0 -0
- package/assets/fonts/poppins-lightitalic-webfont.woff +0 -0
- package/assets/fonts/poppins-lightitalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-medium-webfont.woff +0 -0
- package/assets/fonts/poppins-medium-webfont.woff2 +0 -0
- package/assets/fonts/poppins-mediumitalic-webfont.woff +0 -0
- package/assets/fonts/poppins-mediumitalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-regular-webfont.woff +0 -0
- package/assets/fonts/poppins-regular-webfont.woff2 +0 -0
- package/assets/fonts/poppins-semibold-webfont.woff +0 -0
- package/assets/fonts/poppins-semibold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-semibolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-semibolditalic-webfont.woff2 +0 -0
- package/assets/fonts/source-serif-pro-600.woff +0 -0
- package/assets/fonts/source-serif-pro-600.woff2 +0 -0
- package/assets/fonts/source-serif-pro-600italic.woff +0 -0
- package/assets/fonts/source-serif-pro-600italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-700.woff +0 -0
- package/assets/fonts/source-serif-pro-700.woff2 +0 -0
- package/assets/fonts/source-serif-pro-700italic.woff +0 -0
- package/assets/fonts/source-serif-pro-700italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-italic.woff +0 -0
- package/assets/fonts/source-serif-pro-italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-regular.woff +0 -0
- package/assets/fonts/source-serif-pro-regular.woff2 +0 -0
- package/components/AccountDropdown/AccountDropdown.tsx +65 -0
- package/components/AccountDropdown/__tests__/AcountDropdown.test.tsx +83 -0
- package/components/AccountDropdown/accounts.ts +47 -0
- package/components/AccountDropdown/index.tsx +2 -0
- package/components/AccountDropdown/utils.ts +21 -0
- package/components/ErrorPage/ErrorPage.tsx +135 -0
- package/components/ad/index.tsx +35 -0
- package/components/article/Highlights.tsx +77 -0
- package/components/article/MetaBox.tsx +50 -0
- package/components/article/RelatedArticles.tsx +53 -0
- package/components/article/RelatedTopics.tsx +59 -0
- package/components/article/ShareBarComponent.tsx +53 -0
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1568 -0
- package/components/article/__tests__/index.test.tsx +171 -0
- package/components/article/__tests__/mocks.ts +105 -0
- package/components/article/index.tsx +320 -0
- package/components/common/BackToHomepage.tsx +37 -0
- package/components/common/NavLink.tsx +26 -0
- package/components/common/NewskitLogo.tsx +52 -0
- package/components/common/NewskitLogoShort.tsx +48 -0
- package/components/common/SectionTitleBar.tsx +57 -0
- package/components/common/ShareButton.tsx +18 -0
- package/components/common/ViewMoreButton.tsx +20 -0
- package/components/common/iconNavLink/IconNavLink.tsx +70 -0
- package/components/common/iconNavLink/__tests__/IconNavLink.test.tsx +35 -0
- package/components/common/iconNavLink/index.ts +3 -0
- package/components/common/iconNavLink/types.ts +24 -0
- package/components/common/icons/IconAccount.tsx +13 -0
- package/components/common/icons/IconFilledTwitter.tsx +14 -0
- package/components/common/icons/StyledIconFilledChevronRight.tsx +12 -0
- package/components/footer/__snapshots__/index.test.tsx.snap +192 -0
- package/components/footer/index.test.tsx +13 -0
- package/components/footer/index.tsx +151 -0
- package/components/header/banner-messages.ts +39 -0
- package/components/header/index.tsx +52 -0
- package/components/header/navigation-links.ts +20 -0
- package/components/layout/Gutter.tsx +11 -0
- package/components/layout/LayoutTemplate.tsx +26 -0
- package/components/layout/MainGrid.tsx +66 -0
- package/components/layout/index.tsx +3 -0
- package/components/layout/layoutTypes.ts +13 -0
- package/components/section/ArticleSlice.tsx +35 -0
- package/components/section/CollectionBlock.tsx +54 -0
- package/components/section/SectionContext.tsx +9 -0
- package/components/section/__tests__/ArticleSlice.test.tsx +128 -0
- package/components/section/__tests__/CollectionBlock.test.tsx +83 -0
- package/components/section/__tests__/pageBlock.test.tsx +24 -0
- package/components/section/__tests__/sectionUtils.test.ts +94 -0
- package/components/section/index.tsx +39 -0
- package/components/section/layouts/Block.tsx +79 -0
- package/components/section/layouts/FallBack.tsx +24 -0
- package/components/section/layouts/Lead.tsx +43 -0
- package/components/section/layouts/Rows.tsx +82 -0
- package/components/section/layouts/SectionTitle.tsx +57 -0
- package/components/section/layouts/__tests__/Lead.test.tsx +37 -0
- package/components/section/layouts/__tests__/Rows.test.tsx +40 -0
- package/components/section/layouts/__tests__/SectionTitle.test.tsx +37 -0
- package/components/section/layouts/__tests__/__snapshots__/Lead.test.tsx.snap +180 -0
- package/components/section/layouts/__tests__/__snapshots__/SectionTitle.test.tsx.snap +354 -0
- package/components/section/layouts/gridUtils.ts +21 -0
- package/components/section/layouts/index.tsx +4 -0
- package/components/section/layouts/types.ts +13 -0
- package/components/section/pageBlock.tsx +23 -0
- package/components/section/sectionUtils.ts +61 -0
- package/components/teaser/index.test.tsx +50 -0
- package/components/teaser/index.tsx +64 -0
- package/components/teaser/teaserVariants.ts +33 -0
- package/components/teaser/variant-types.ts +49 -0
- package/components/teaser/variants/featureVariant.ts +42 -0
- package/components/teaser/variants/horizontal.ts +14 -0
- package/components/teaser/variants/titleTeaserVariant.ts +32 -0
- package/components/teaser/variants/titleVertical.ts +24 -0
- package/components/utils/index.test.ts +12 -0
- package/components/utils/index.ts +6 -0
- package/config/__tests__/index.test.ts +54 -0
- package/config/environment.ts +80 -0
- package/config/index.ts +2 -0
- package/config/multiTenancy.ts +11 -0
- package/constants/index.ts +2 -0
- package/context/app-context/AppContext.test.tsx +56 -0
- package/context/app-context/holidayStopListContextOverrides.ts +18 -0
- package/context/app-context/index.tsx +34 -0
- package/context/app-context/paymentMethodContext.tsx +70 -0
- package/context/index.tsx +2 -0
- package/context/multi-tenancy/MultiTenancy.test.tsx +48 -0
- package/context/multi-tenancy/index.tsx +32 -0
- package/css/index.ts +15 -0
- package/cypress/axe/terminal-log.js +19 -0
- package/cypress/config/visual.config.ts +11 -0
- package/cypress/config/visual.skip.config.ts +10 -0
- package/cypress/e2e/account/accessibility.cy.js +88 -0
- package/cypress/e2e/account/banners.cy.js +169 -0
- package/cypress/e2e/account/cancellation.cy.js +219 -0
- package/cypress/e2e/account/holiday-stops.cy.js +109 -0
- package/cypress/e2e/account/main-api.cy.js +102 -0
- package/cypress/e2e/account/newsletters-and-alerts.cy.js +149 -0
- package/cypress/e2e/account/newsletters-page.cy.js +69 -0
- package/cypress/e2e/account/payment-page.cy.js +98 -0
- package/cypress/e2e/account/personal-details.cy.js +1161 -0
- package/cypress/e2e/account/subscription-and-billing.cy.js +434 -0
- package/cypress/e2e/checkout/account-creation.cy.js +8 -0
- package/cypress/e2e/checkout/payment-details.cy.js +19 -0
- package/cypress/e2e/core/home-page.cy.js +6 -0
- package/cypress/e2e/help-hub/accessibility.cy.js +35 -0
- package/cypress/e2e/help-hub/article-page.cy.js +115 -0
- package/cypress/e2e/help-hub/landing-page.cy.js +94 -0
- package/cypress/e2e/help-hub/result-page.cy.js +117 -0
- package/cypress/fixtures/empty.html +10 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/fixtures/holiday-stops.json +40 -0
- package/cypress/fixtures/paymentFailure.js +24 -0
- package/cypress/fixtures/testDates.js +26 -0
- package/cypress/support/commands.js +125 -0
- package/cypress/support/consentValues.js +5839 -0
- package/cypress/support/e2e.js +22 -0
- package/cypress/support/users.js +58 -0
- package/cypress/visual/account/print-visual-regression.cy.js +9 -0
- package/cypress/visual/account/visual-regression.cy.js +40 -0
- package/cypress/visual/empty/empty.cy.js +5 -0
- package/cypress.config.ts +38 -0
- package/helpers/__tests__/getUser.test.ts +45 -0
- package/helpers/__tests__/logger.test.ts +62 -0
- package/helpers/__tests__/useThemeDropdownObject.test.ts +49 -0
- package/helpers/a11y.ts +7 -0
- package/helpers/addCacheHeaders.ts +8 -0
- package/helpers/getUser.ts +37 -0
- package/helpers/getYear.ts +1 -0
- package/helpers/global-types.ts +186 -0
- package/helpers/logger/getWinstonLogger.ts +19 -0
- package/helpers/logger/index.ts +20 -0
- package/helpers/logger/replaceConsoleWithLogger.ts +14 -0
- package/helpers/mocks/articleMock.ts +50 -0
- package/helpers/mocks/getPageMock.ts +369 -0
- package/helpers/mocks/getRadioPostMock.ts +71 -0
- package/helpers/mocks/getRadioPostsMock.ts +26 -0
- package/helpers/mocks/getRecommendationsMock.ts +20 -0
- package/helpers/mocks/index.ts +7 -0
- package/helpers/multiTenancy.ts +19 -0
- package/helpers/setupTests.ts +5 -0
- package/helpers/test-utils.tsx +33 -0
- package/helpers/useThemeDropdownObject.tsx +73 -0
- package/infrastructure/.circleci/config.yml +1187 -0
- package/infrastructure/INFRASTRUCTURE.md +142 -0
- package/infrastructure/build_and_deploy.png +0 -0
- package/infrastructure/helm/Chart.yaml +21 -0
- package/infrastructure/helm/templates/_helpers.tpl +87 -0
- package/infrastructure/helm/templates/deployment.yaml +45 -0
- package/infrastructure/helm/templates/horizontalpodautoscaler.yaml +21 -0
- package/infrastructure/helm/templates/ingress.yaml +31 -0
- package/infrastructure/helm/templates/networkpolicy.yaml +26 -0
- package/infrastructure/helm/templates/secret.yaml +12 -0
- package/infrastructure/helm/templates/service.yaml +15 -0
- package/infrastructure/helm/values-dev.yaml +39 -0
- package/infrastructure/helm/values-local.yaml +30 -0
- package/infrastructure/helm/values-pr.yaml +40 -0
- package/infrastructure/helm/values-prod.yaml +39 -0
- package/infrastructure/helm/values-staging.yaml +39 -0
- package/infrastructure/helm/values.yaml +44 -0
- package/infrastructure/pull_request.png +0 -0
- package/infrastructure/release-documentation-cli.config.json +18 -0
- package/infrastructure/remove_pr.png +0 -0
- package/infrastructure/terraform-ecr/dev.tfvars +3 -0
- package/infrastructure/terraform-ecr/ecr.tf +69 -0
- package/infrastructure/terraform-ecr/main.tf +3 -0
- package/infrastructure/terraform-ecr/variables.tf +19 -0
- package/infrastructure/terraform-ecr/versions.tf +12 -0
- package/infrastructure/terraform-newrelic/alerts.tf +290 -0
- package/infrastructure/terraform-newrelic/dashboards.tf +347 -0
- package/infrastructure/terraform-newrelic/dev.tfvars +3 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-dev.js +53 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-prod.js +54 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-stage.js +54 -0
- package/infrastructure/terraform-newrelic/main.tf +11 -0
- package/infrastructure/terraform-newrelic/monitors.tf +11 -0
- package/infrastructure/terraform-newrelic/prod.tfvars +3 -0
- package/infrastructure/terraform-newrelic/staging.tfvars +3 -0
- package/infrastructure/terraform-newrelic/variables.tf +33 -0
- package/infrastructure/terraform-newrelic/versions.tf +18 -0
- package/jest.config.js +40 -0
- package/jest.config.pact.js +18 -0
- package/newrelic.js +86 -0
- package/next-env.d.ts +5 -0
- package/next.config.js +95 -0
- package/package.json +127 -0
- package/pages/_app.tsx +117 -0
- package/pages/_document.tsx +112 -0
- package/pages/_error.tsx +68 -0
- package/pages/account/add/[field].tsx +34 -0
- package/pages/account/cancellation/index.tsx +22 -0
- package/pages/account/delete/confirm/index.tsx +16 -0
- package/pages/account/delete/error/index.tsx +16 -0
- package/pages/account/delete/index.tsx +16 -0
- package/pages/account/delete/success/index.tsx +16 -0
- package/pages/account/dream-team/index.tsx +19 -0
- package/pages/account/edit/[field].tsx +45 -0
- package/pages/account/family/index.tsx +19 -0
- package/pages/account/holiday-stop/index.tsx +19 -0
- package/pages/account/holiday-stop/previous-holiday-stops.tsx +19 -0
- package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +19 -0
- package/pages/account/index.tsx +33 -0
- package/pages/account/newsletters/index.tsx +19 -0
- package/pages/account/newsletters-and-alerts/index.tsx +24 -0
- package/pages/account/payment/[paymentMethod].tsx +37 -0
- package/pages/account/payment/index.tsx +23 -0
- package/pages/account/payment-methods/index.tsx +21 -0
- package/pages/account/subscription-and-billing/index.tsx +29 -0
- package/pages/api/account/get-session/index.ts +33 -0
- package/pages/api/account/invoice/index.ts +35 -0
- package/pages/api/account/mutate/index.ts +8 -0
- package/pages/api/account/query/index.ts +7 -0
- package/pages/api/auth/[...nextauth].ts +11 -0
- package/pages/api/competitions-sitemap.ts +19 -0
- package/pages/api/feed.ts +23 -0
- package/pages/api/health-check.ts +7 -0
- package/pages/api/news-sitemap.ts +18 -0
- package/pages/api/pages-sitemap.ts +27 -0
- package/pages/api/robots.ts +19 -0
- package/pages/api/sitemap.ts +24 -0
- package/pages/checkout/account-creation/index.tsx +13 -0
- package/pages/checkout/payment-details/index.tsx +10 -0
- package/pages/empty.tsx +6 -0
- package/pages/help-hub/article/[title]/index.tsx +25 -0
- package/pages/help-hub/error.tsx +23 -0
- package/pages/help-hub/index.tsx +51 -0
- package/pages/help-hub/results.tsx +25 -0
- package/pages/index.tsx +19 -0
- package/pages/player/brightcove.tsx +19 -0
- package/pages/rss/create/index.tsx +18 -0
- package/pages/rss/feed/[feedId]/index.tsx +21 -0
- package/pages/rss/index.tsx +18 -0
- package/public/ads.min.js +8175 -0
- package/public/assets/display-base-header.svg +25 -0
- package/public/assets/display-personalDetails-header-sun.svg +55 -0
- package/public/assets/display-personalDetails-header-times.svg +90 -0
- package/public/assets/display-personalDetails-header-vr.svg +46 -0
- package/public/assets/dream-team.svg +10 -0
- package/public/assets/navigationPrimary-brandMark-sun.svg +9 -0
- package/public/assets/navigationPrimary-brandMark-times.svg +18 -0
- package/public/assets/navigationPrimary-brandMark-vr.svg +10 -0
- package/public/assets/newsletters/bestoftimes-101.png +0 -0
- package/public/assets/newsletters/books-115.png +0 -0
- package/public/assets/newsletters/environment-140.png +0 -0
- package/public/assets/newsletters/fashion-108.png +0 -0
- package/public/assets/newsletters/food-106.png +0 -0
- package/public/assets/newsletters/football-111.png +0 -0
- package/public/assets/newsletters/ireland-152.png +0 -0
- package/public/assets/newsletters/law-121.png +0 -0
- package/public/assets/newsletters/money-107.png +0 -0
- package/public/assets/newsletters/moneymentor-150.png +0 -0
- package/public/assets/newsletters/placeholder.png +0 -0
- package/public/assets/newsletters/politics-119.png +0 -0
- package/public/assets/newsletters/property-113.png +0 -0
- package/public/assets/newsletters/puzzles-125.png +0 -0
- package/public/assets/newsletters/scotland-134.png +0 -0
- package/public/assets/newsletters/theatre-127.png +0 -0
- package/public/assets/newsletters/travel-149.png +0 -0
- package/public/assets/newsletters/tv-133.png +0 -0
- package/public/assets/newsletters/us-153.png +0 -0
- package/public/assets/no-subscription.svg +15 -0
- package/public/assets/pending-activation.svg +16 -0
- package/public/assets/personal-details-header.svg +91 -0
- package/public/assets/plchldr150x100.png +0 -0
- package/public/assets/previous-subscription.svg +15 -0
- package/public/assets/primary-navigation-logo-white.svg +6 -0
- package/public/assets/primary-navigation-logo.svg +6 -0
- package/public/assets/tls-logo-white.svg +3 -0
- package/public/favicon.ico +0 -0
- package/public/icon.png +0 -0
- package/public/prebid.min.js +1 -0
- package/queries/getPage.ts +100 -0
- package/queries/getRadioPost.ts +61 -0
- package/queries/getRadioPosts.ts +16 -0
- package/queries/getUserSubscription.ts +9 -0
- package/queries/index.ts +3 -0
- package/scripts/k8s-local.sh +137 -0
- package/scripts/nr-exports.sh +7 -0
- package/temp/_app.tsx +15 -0
- package/temp/_document.tsx +61 -0
- package/temp/app-context-test.tsx +51 -0
- package/temp/app-context.tsx +25 -0
- package/temp/config-index.ts +1 -0
- package/temp/context-index.tsx +1 -0
- package/temp/header.tsx +45 -0
- package/temp/next.config.js +56 -0
- package/tsconfig.json +51 -0
- package/tsconfig.test.json +6 -0
- package/validation/index.tsx +24 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Lead should render Lead 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="css-mcaqg8"
|
|
7
|
+
data-testid="SUPPLEMENT_LEAD_AND_4_STACK-Grid"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="css-13byt3y"
|
|
11
|
+
data-testid="featureVerticalCell"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="css-1v4r5rv"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="css-x4egtb"
|
|
18
|
+
>
|
|
19
|
+
<figure
|
|
20
|
+
class="css-1ig6h8n"
|
|
21
|
+
>
|
|
22
|
+
<img
|
|
23
|
+
alt=""
|
|
24
|
+
data-nimg="fill"
|
|
25
|
+
decoding="async"
|
|
26
|
+
loading="lazy"
|
|
27
|
+
sizes="(max-width: 768px) 100vw,
|
|
28
|
+
(max-width: 1200px) 50vw,
|
|
29
|
+
33vw"
|
|
30
|
+
src="/_next/image?url=%2Fassets%2Fplchldr150x100.png&w=3840&q=75"
|
|
31
|
+
srcset="/_next/image?url=%2Fassets%2Fplchldr150x100.png&w=256&q=75 256w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=384&q=75 384w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=640&q=75 640w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=750&q=75 750w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=828&q=75 828w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1080&q=75 1080w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1200&q=75 1200w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1920&q=75 1920w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=2048&q=75 2048w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=3840&q=75 3840w"
|
|
32
|
+
style="position: absolute; height: 100%; width: 100%; left: 0px; top: 0px; right: 0px; bottom: 0px; object-fit: contain; color: transparent;"
|
|
33
|
+
/>
|
|
34
|
+
</figure>
|
|
35
|
+
</div>
|
|
36
|
+
<div
|
|
37
|
+
class="css-1shocxe"
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
class="css-l3wl0d"
|
|
41
|
+
>
|
|
42
|
+
<div
|
|
43
|
+
class="css-8oi1su"
|
|
44
|
+
>
|
|
45
|
+
<a
|
|
46
|
+
class="nk-card-link css-c1j6lb"
|
|
47
|
+
href="catagory-one/demo-1/test-headline"
|
|
48
|
+
>
|
|
49
|
+
<section
|
|
50
|
+
class="nk-card-headline css-1jxtwhc"
|
|
51
|
+
>
|
|
52
|
+
<h3
|
|
53
|
+
class="nk-headline-heading css-oeq8ks"
|
|
54
|
+
>
|
|
55
|
+
test headline
|
|
56
|
+
</h3>
|
|
57
|
+
</section>
|
|
58
|
+
</a>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div
|
|
65
|
+
class="css-1gjeojb"
|
|
66
|
+
>
|
|
67
|
+
<div
|
|
68
|
+
class="css-13byt3y"
|
|
69
|
+
data-testid="titleVerticalCell-0"
|
|
70
|
+
>
|
|
71
|
+
<div
|
|
72
|
+
class="css-1z995g"
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
class="css-1rsw0n0"
|
|
76
|
+
>
|
|
77
|
+
<figure
|
|
78
|
+
class="css-1ig6h8n"
|
|
79
|
+
>
|
|
80
|
+
<img
|
|
81
|
+
alt=""
|
|
82
|
+
data-nimg="fill"
|
|
83
|
+
decoding="async"
|
|
84
|
+
loading="lazy"
|
|
85
|
+
sizes="(max-width: 768px) 100vw,
|
|
86
|
+
(max-width: 1200px) 50vw,
|
|
87
|
+
33vw"
|
|
88
|
+
src="/_next/image?url=%2Fassets%2Fplchldr150x100.png&w=3840&q=75"
|
|
89
|
+
srcset="/_next/image?url=%2Fassets%2Fplchldr150x100.png&w=256&q=75 256w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=384&q=75 384w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=640&q=75 640w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=750&q=75 750w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=828&q=75 828w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1080&q=75 1080w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1200&q=75 1200w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1920&q=75 1920w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=2048&q=75 2048w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=3840&q=75 3840w"
|
|
90
|
+
style="position: absolute; height: 100%; width: 100%; left: 0px; top: 0px; right: 0px; bottom: 0px; object-fit: contain; color: transparent;"
|
|
91
|
+
/>
|
|
92
|
+
</figure>
|
|
93
|
+
</div>
|
|
94
|
+
<div
|
|
95
|
+
class="css-1r2lt0d"
|
|
96
|
+
>
|
|
97
|
+
<div
|
|
98
|
+
class="css-13pp6jk"
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
class="css-6vc2ul"
|
|
102
|
+
>
|
|
103
|
+
<a
|
|
104
|
+
class="nk-card-link css-c1j6lb"
|
|
105
|
+
href="catagory-two/demo-2/test-headline-2"
|
|
106
|
+
>
|
|
107
|
+
<section
|
|
108
|
+
class="nk-card-headline css-4kc5mr"
|
|
109
|
+
>
|
|
110
|
+
<h3
|
|
111
|
+
class="nk-headline-heading css-oeq8ks"
|
|
112
|
+
>
|
|
113
|
+
test headline 2
|
|
114
|
+
</h3>
|
|
115
|
+
</section>
|
|
116
|
+
</a>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
<div
|
|
123
|
+
class="css-13byt3y"
|
|
124
|
+
data-testid="titleVerticalCell-1"
|
|
125
|
+
>
|
|
126
|
+
<div
|
|
127
|
+
class="css-1z995g"
|
|
128
|
+
>
|
|
129
|
+
<div
|
|
130
|
+
class="css-1rsw0n0"
|
|
131
|
+
>
|
|
132
|
+
<figure
|
|
133
|
+
class="css-1ig6h8n"
|
|
134
|
+
>
|
|
135
|
+
<img
|
|
136
|
+
alt=""
|
|
137
|
+
data-nimg="fill"
|
|
138
|
+
decoding="async"
|
|
139
|
+
loading="lazy"
|
|
140
|
+
sizes="(max-width: 768px) 100vw,
|
|
141
|
+
(max-width: 1200px) 50vw,
|
|
142
|
+
33vw"
|
|
143
|
+
src="/_next/image?url=%2Fassets%2Fplchldr150x100.png&w=3840&q=75"
|
|
144
|
+
srcset="/_next/image?url=%2Fassets%2Fplchldr150x100.png&w=256&q=75 256w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=384&q=75 384w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=640&q=75 640w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=750&q=75 750w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=828&q=75 828w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1080&q=75 1080w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1200&q=75 1200w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=1920&q=75 1920w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=2048&q=75 2048w, /_next/image?url=%2Fassets%2Fplchldr150x100.png&w=3840&q=75 3840w"
|
|
145
|
+
style="position: absolute; height: 100%; width: 100%; left: 0px; top: 0px; right: 0px; bottom: 0px; object-fit: contain; color: transparent;"
|
|
146
|
+
/>
|
|
147
|
+
</figure>
|
|
148
|
+
</div>
|
|
149
|
+
<div
|
|
150
|
+
class="css-1r2lt0d"
|
|
151
|
+
>
|
|
152
|
+
<div
|
|
153
|
+
class="css-13pp6jk"
|
|
154
|
+
>
|
|
155
|
+
<div
|
|
156
|
+
class="css-6vc2ul"
|
|
157
|
+
>
|
|
158
|
+
<a
|
|
159
|
+
class="nk-card-link css-c1j6lb"
|
|
160
|
+
href="catagory-three/demo-3/test-headline-3"
|
|
161
|
+
>
|
|
162
|
+
<section
|
|
163
|
+
class="nk-card-headline css-4kc5mr"
|
|
164
|
+
>
|
|
165
|
+
<h3
|
|
166
|
+
class="nk-headline-heading css-oeq8ks"
|
|
167
|
+
>
|
|
168
|
+
test headline 3
|
|
169
|
+
</h3>
|
|
170
|
+
</section>
|
|
171
|
+
</a>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</DocumentFragment>
|
|
180
|
+
`;
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`SectionTitle SectionTitle alternative titlebar 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="css-1hrjdv4"
|
|
7
|
+
data-testid="SectionTitleBar"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="css-14v8j6o"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
class="css-16bai6p"
|
|
14
|
+
>
|
|
15
|
+
<section
|
|
16
|
+
class="css-3bvy7k"
|
|
17
|
+
>
|
|
18
|
+
<h3
|
|
19
|
+
class="nk-headline-heading css-b3iww6"
|
|
20
|
+
>
|
|
21
|
+
Section 1
|
|
22
|
+
</h3>
|
|
23
|
+
</section>
|
|
24
|
+
</div>
|
|
25
|
+
<div
|
|
26
|
+
class="css-1h0bvuz"
|
|
27
|
+
>
|
|
28
|
+
<a
|
|
29
|
+
class="css-3gj75m"
|
|
30
|
+
href="/section-one"
|
|
31
|
+
>
|
|
32
|
+
<span
|
|
33
|
+
class="css-1xnclyu"
|
|
34
|
+
>
|
|
35
|
+
<span
|
|
36
|
+
class="css-1o99qvy"
|
|
37
|
+
>
|
|
38
|
+
<span
|
|
39
|
+
class="css-14vfegn"
|
|
40
|
+
>
|
|
41
|
+
Link
|
|
42
|
+
</span>
|
|
43
|
+
</span>
|
|
44
|
+
<span
|
|
45
|
+
class="css-1o99qvy"
|
|
46
|
+
>
|
|
47
|
+
<svg
|
|
48
|
+
aria-hidden="true"
|
|
49
|
+
class="css-19o8to0-EmotionIconBase ex0cdmw0"
|
|
50
|
+
fill="currentColor"
|
|
51
|
+
focusable="false"
|
|
52
|
+
overrides="[object Object]"
|
|
53
|
+
viewBox="0 0 24 24"
|
|
54
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
55
|
+
>
|
|
56
|
+
<path
|
|
57
|
+
d="M0 0h24v24H0z"
|
|
58
|
+
fill="none"
|
|
59
|
+
/>
|
|
60
|
+
<path
|
|
61
|
+
d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
62
|
+
/>
|
|
63
|
+
</svg>
|
|
64
|
+
</span>
|
|
65
|
+
</span>
|
|
66
|
+
</a>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</DocumentFragment>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
exports[`SectionTitle SectionTitle with title 1`] = `
|
|
74
|
+
<DocumentFragment>
|
|
75
|
+
<div
|
|
76
|
+
class="css-1ujfthp"
|
|
77
|
+
data-testid="SectionTitleBar"
|
|
78
|
+
>
|
|
79
|
+
<div
|
|
80
|
+
class="css-14v8j6o"
|
|
81
|
+
>
|
|
82
|
+
<div
|
|
83
|
+
class="css-16bai6p"
|
|
84
|
+
>
|
|
85
|
+
<section
|
|
86
|
+
class="css-3bvy7k"
|
|
87
|
+
>
|
|
88
|
+
<h3
|
|
89
|
+
class="nk-headline-heading css-4eltk5"
|
|
90
|
+
>
|
|
91
|
+
Section 1
|
|
92
|
+
</h3>
|
|
93
|
+
</section>
|
|
94
|
+
</div>
|
|
95
|
+
<div
|
|
96
|
+
class="css-1h0bvuz"
|
|
97
|
+
>
|
|
98
|
+
<a
|
|
99
|
+
class="css-686sn5"
|
|
100
|
+
href="/section-one"
|
|
101
|
+
>
|
|
102
|
+
<span
|
|
103
|
+
class="css-1xnclyu"
|
|
104
|
+
>
|
|
105
|
+
<span
|
|
106
|
+
class="css-1o99qvy"
|
|
107
|
+
>
|
|
108
|
+
<span
|
|
109
|
+
class="css-14vfegn"
|
|
110
|
+
>
|
|
111
|
+
Link
|
|
112
|
+
</span>
|
|
113
|
+
</span>
|
|
114
|
+
<span
|
|
115
|
+
class="css-1o99qvy"
|
|
116
|
+
>
|
|
117
|
+
<svg
|
|
118
|
+
aria-hidden="true"
|
|
119
|
+
class="css-19o8to0-EmotionIconBase ex0cdmw0"
|
|
120
|
+
fill="currentColor"
|
|
121
|
+
focusable="false"
|
|
122
|
+
overrides="[object Object]"
|
|
123
|
+
viewBox="0 0 24 24"
|
|
124
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
125
|
+
>
|
|
126
|
+
<path
|
|
127
|
+
d="M0 0h24v24H0z"
|
|
128
|
+
fill="none"
|
|
129
|
+
/>
|
|
130
|
+
<path
|
|
131
|
+
d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
132
|
+
/>
|
|
133
|
+
</svg>
|
|
134
|
+
</span>
|
|
135
|
+
</span>
|
|
136
|
+
</a>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</DocumentFragment>
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
exports[`SectionTitle SectionTitle without extra space 1`] = `
|
|
144
|
+
{
|
|
145
|
+
"asFragment": [Function],
|
|
146
|
+
"baseElement": <body>
|
|
147
|
+
<div>
|
|
148
|
+
<div
|
|
149
|
+
class="css-1ms0cs2"
|
|
150
|
+
data-testid="addTopSpace"
|
|
151
|
+
>
|
|
152
|
+
<hr
|
|
153
|
+
aria-hidden="true"
|
|
154
|
+
class="css-90bet9"
|
|
155
|
+
data-testid="divider"
|
|
156
|
+
/>
|
|
157
|
+
</div>
|
|
158
|
+
<div
|
|
159
|
+
class="css-1ujfthp"
|
|
160
|
+
data-testid="SectionTitleBar"
|
|
161
|
+
>
|
|
162
|
+
<div
|
|
163
|
+
class="css-14v8j6o"
|
|
164
|
+
>
|
|
165
|
+
<div
|
|
166
|
+
class="css-16bai6p"
|
|
167
|
+
>
|
|
168
|
+
<section
|
|
169
|
+
class="css-3bvy7k"
|
|
170
|
+
>
|
|
171
|
+
<h3
|
|
172
|
+
class="nk-headline-heading css-4eltk5"
|
|
173
|
+
>
|
|
174
|
+
Section 1
|
|
175
|
+
</h3>
|
|
176
|
+
</section>
|
|
177
|
+
</div>
|
|
178
|
+
<div
|
|
179
|
+
class="css-1h0bvuz"
|
|
180
|
+
>
|
|
181
|
+
<a
|
|
182
|
+
class="css-686sn5"
|
|
183
|
+
href="/section-one"
|
|
184
|
+
>
|
|
185
|
+
<span
|
|
186
|
+
class="css-1xnclyu"
|
|
187
|
+
>
|
|
188
|
+
<span
|
|
189
|
+
class="css-1o99qvy"
|
|
190
|
+
>
|
|
191
|
+
<span
|
|
192
|
+
class="css-14vfegn"
|
|
193
|
+
>
|
|
194
|
+
Link
|
|
195
|
+
</span>
|
|
196
|
+
</span>
|
|
197
|
+
<span
|
|
198
|
+
class="css-1o99qvy"
|
|
199
|
+
>
|
|
200
|
+
<svg
|
|
201
|
+
aria-hidden="true"
|
|
202
|
+
class="css-19o8to0-EmotionIconBase ex0cdmw0"
|
|
203
|
+
fill="currentColor"
|
|
204
|
+
focusable="false"
|
|
205
|
+
overrides="[object Object]"
|
|
206
|
+
viewBox="0 0 24 24"
|
|
207
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
208
|
+
>
|
|
209
|
+
<path
|
|
210
|
+
d="M0 0h24v24H0z"
|
|
211
|
+
fill="none"
|
|
212
|
+
/>
|
|
213
|
+
<path
|
|
214
|
+
d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
215
|
+
/>
|
|
216
|
+
</svg>
|
|
217
|
+
</span>
|
|
218
|
+
</span>
|
|
219
|
+
</a>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</body>,
|
|
225
|
+
"container": <div>
|
|
226
|
+
<div
|
|
227
|
+
class="css-1ms0cs2"
|
|
228
|
+
data-testid="addTopSpace"
|
|
229
|
+
>
|
|
230
|
+
<hr
|
|
231
|
+
aria-hidden="true"
|
|
232
|
+
class="css-90bet9"
|
|
233
|
+
data-testid="divider"
|
|
234
|
+
/>
|
|
235
|
+
</div>
|
|
236
|
+
<div
|
|
237
|
+
class="css-1ujfthp"
|
|
238
|
+
data-testid="SectionTitleBar"
|
|
239
|
+
>
|
|
240
|
+
<div
|
|
241
|
+
class="css-14v8j6o"
|
|
242
|
+
>
|
|
243
|
+
<div
|
|
244
|
+
class="css-16bai6p"
|
|
245
|
+
>
|
|
246
|
+
<section
|
|
247
|
+
class="css-3bvy7k"
|
|
248
|
+
>
|
|
249
|
+
<h3
|
|
250
|
+
class="nk-headline-heading css-4eltk5"
|
|
251
|
+
>
|
|
252
|
+
Section 1
|
|
253
|
+
</h3>
|
|
254
|
+
</section>
|
|
255
|
+
</div>
|
|
256
|
+
<div
|
|
257
|
+
class="css-1h0bvuz"
|
|
258
|
+
>
|
|
259
|
+
<a
|
|
260
|
+
class="css-686sn5"
|
|
261
|
+
href="/section-one"
|
|
262
|
+
>
|
|
263
|
+
<span
|
|
264
|
+
class="css-1xnclyu"
|
|
265
|
+
>
|
|
266
|
+
<span
|
|
267
|
+
class="css-1o99qvy"
|
|
268
|
+
>
|
|
269
|
+
<span
|
|
270
|
+
class="css-14vfegn"
|
|
271
|
+
>
|
|
272
|
+
Link
|
|
273
|
+
</span>
|
|
274
|
+
</span>
|
|
275
|
+
<span
|
|
276
|
+
class="css-1o99qvy"
|
|
277
|
+
>
|
|
278
|
+
<svg
|
|
279
|
+
aria-hidden="true"
|
|
280
|
+
class="css-19o8to0-EmotionIconBase ex0cdmw0"
|
|
281
|
+
fill="currentColor"
|
|
282
|
+
focusable="false"
|
|
283
|
+
overrides="[object Object]"
|
|
284
|
+
viewBox="0 0 24 24"
|
|
285
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
286
|
+
>
|
|
287
|
+
<path
|
|
288
|
+
d="M0 0h24v24H0z"
|
|
289
|
+
fill="none"
|
|
290
|
+
/>
|
|
291
|
+
<path
|
|
292
|
+
d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
293
|
+
/>
|
|
294
|
+
</svg>
|
|
295
|
+
</span>
|
|
296
|
+
</span>
|
|
297
|
+
</a>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>,
|
|
302
|
+
"debug": [Function],
|
|
303
|
+
"findAllByAltText": [Function],
|
|
304
|
+
"findAllByDisplayValue": [Function],
|
|
305
|
+
"findAllByLabelText": [Function],
|
|
306
|
+
"findAllByPlaceholderText": [Function],
|
|
307
|
+
"findAllByRole": [Function],
|
|
308
|
+
"findAllByTestId": [Function],
|
|
309
|
+
"findAllByText": [Function],
|
|
310
|
+
"findAllByTitle": [Function],
|
|
311
|
+
"findByAltText": [Function],
|
|
312
|
+
"findByDisplayValue": [Function],
|
|
313
|
+
"findByLabelText": [Function],
|
|
314
|
+
"findByPlaceholderText": [Function],
|
|
315
|
+
"findByRole": [Function],
|
|
316
|
+
"findByTestId": [Function],
|
|
317
|
+
"findByText": [Function],
|
|
318
|
+
"findByTitle": [Function],
|
|
319
|
+
"getAllByAltText": [Function],
|
|
320
|
+
"getAllByDisplayValue": [Function],
|
|
321
|
+
"getAllByLabelText": [Function],
|
|
322
|
+
"getAllByPlaceholderText": [Function],
|
|
323
|
+
"getAllByRole": [Function],
|
|
324
|
+
"getAllByTestId": [Function],
|
|
325
|
+
"getAllByText": [Function],
|
|
326
|
+
"getAllByTitle": [Function],
|
|
327
|
+
"getByAltText": [Function],
|
|
328
|
+
"getByDisplayValue": [Function],
|
|
329
|
+
"getByLabelText": [Function],
|
|
330
|
+
"getByPlaceholderText": [Function],
|
|
331
|
+
"getByRole": [Function],
|
|
332
|
+
"getByTestId": [Function],
|
|
333
|
+
"getByText": [Function],
|
|
334
|
+
"getByTitle": [Function],
|
|
335
|
+
"queryAllByAltText": [Function],
|
|
336
|
+
"queryAllByDisplayValue": [Function],
|
|
337
|
+
"queryAllByLabelText": [Function],
|
|
338
|
+
"queryAllByPlaceholderText": [Function],
|
|
339
|
+
"queryAllByRole": [Function],
|
|
340
|
+
"queryAllByTestId": [Function],
|
|
341
|
+
"queryAllByText": [Function],
|
|
342
|
+
"queryAllByTitle": [Function],
|
|
343
|
+
"queryByAltText": [Function],
|
|
344
|
+
"queryByDisplayValue": [Function],
|
|
345
|
+
"queryByLabelText": [Function],
|
|
346
|
+
"queryByPlaceholderText": [Function],
|
|
347
|
+
"queryByRole": [Function],
|
|
348
|
+
"queryByTestId": [Function],
|
|
349
|
+
"queryByText": [Function],
|
|
350
|
+
"queryByTitle": [Function],
|
|
351
|
+
"rerender": [Function],
|
|
352
|
+
"unmount": [Function],
|
|
353
|
+
}
|
|
354
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// xsMargin="space000" margins on Grid
|
|
2
|
+
// xsColumnGutter="space000" padding on left and right of cells
|
|
3
|
+
// xsRowGutter="space000" margin-top of cells
|
|
4
|
+
|
|
5
|
+
// TODO: figure out column gutters
|
|
6
|
+
|
|
7
|
+
export const outerGridOverride = {
|
|
8
|
+
rowGap: {
|
|
9
|
+
xs: 'space070',
|
|
10
|
+
md: 'space060',
|
|
11
|
+
xl: 'space000',
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const innerGridOverride = {
|
|
16
|
+
rowGap: {
|
|
17
|
+
xs: 'space070',
|
|
18
|
+
md: 'space060',
|
|
19
|
+
xl: 'space050',
|
|
20
|
+
},
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MQ } from 'newskit'
|
|
2
|
+
import { Article } from '@newskit-render/standalone-components'
|
|
3
|
+
import { ArticleSlice } from '../../../helpers/global-types'
|
|
4
|
+
import { VariantsName } from '../../teaser/teaserVariants'
|
|
5
|
+
|
|
6
|
+
export type LayoutProps = {
|
|
7
|
+
slice?: ArticleSlice
|
|
8
|
+
articles?: Article[]
|
|
9
|
+
sectionURL?: string
|
|
10
|
+
variant?: VariantsName
|
|
11
|
+
colums?: MQ<string>
|
|
12
|
+
'data-testid'?: string
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import CollectionBlock from './CollectionBlock'
|
|
3
|
+
import { CollectionBlock as Collection } from '../../helpers/global-types'
|
|
4
|
+
/*
|
|
5
|
+
We are using collections from the page schema but there are other block types that could be implemented (image, paragraph, tweet and more).
|
|
6
|
+
See the schema for the full list
|
|
7
|
+
*/
|
|
8
|
+
// CollectionBlock(collection, i)
|
|
9
|
+
const pageBlock = (type: string) => {
|
|
10
|
+
const blockTypes = {
|
|
11
|
+
collection: (collection: Collection, i: number) => (
|
|
12
|
+
<CollectionBlock collection={collection} index={i} />
|
|
13
|
+
),
|
|
14
|
+
image: () => null,
|
|
15
|
+
paragraph: () => null,
|
|
16
|
+
tweet: () => null,
|
|
17
|
+
default: () => null,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return blockTypes[type] || blockTypes.default
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default pageBlock
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Media,
|
|
3
|
+
ArticleTeaser,
|
|
4
|
+
TeaserCategory,
|
|
5
|
+
} from '../../helpers/global-types'
|
|
6
|
+
|
|
7
|
+
export const ratioMap: Record<string, string> = {
|
|
8
|
+
portrait: '2:3',
|
|
9
|
+
landscape: '3:2',
|
|
10
|
+
hero: '16:9',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const getMedia = (media?: Media) => {
|
|
14
|
+
if (!media) {
|
|
15
|
+
return {
|
|
16
|
+
src: '',
|
|
17
|
+
alt: '',
|
|
18
|
+
loadingAspectRatio: '',
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return 'crops' in media
|
|
22
|
+
? {
|
|
23
|
+
src: media?.crops[0].url || '',
|
|
24
|
+
alt: media?.crops[0].alt || '',
|
|
25
|
+
loadingAspectRatio: ratioMap[media?.crops[0].aspectRatio]
|
|
26
|
+
? ratioMap[media?.crops[0].aspectRatio]
|
|
27
|
+
: media?.crops[0].aspectRatio || '',
|
|
28
|
+
}
|
|
29
|
+
: {
|
|
30
|
+
src: media?.posterImage?.crop?.url || '',
|
|
31
|
+
alt: media?.posterImage?.crop?.alt || '',
|
|
32
|
+
loadingAspectRatio: ratioMap[media?.posterImage?.crop?.aspectRatio]
|
|
33
|
+
? ratioMap[media?.posterImage?.crop?.aspectRatio]
|
|
34
|
+
: media?.posterImage?.crop?.aspectRatio || '',
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const teaserSummary = (summary: { children?: { text?: string }[] }) =>
|
|
39
|
+
summary?.children?.[0]?.text || ''
|
|
40
|
+
|
|
41
|
+
export const generateArticleSlug = (title: string): string =>
|
|
42
|
+
title
|
|
43
|
+
.replace(/[^a-zA-Z0-9 ]/g, '')
|
|
44
|
+
.replace(/\s\s+/g, ' ')
|
|
45
|
+
.toLowerCase()
|
|
46
|
+
.replace(/ /g, '-')
|
|
47
|
+
.trim()
|
|
48
|
+
|
|
49
|
+
export const getCategorySlug = (categories: { slug: string }[]): string => {
|
|
50
|
+
if (!Array.isArray(categories) || categories.length === 0)
|
|
51
|
+
return 'uncategorized'
|
|
52
|
+
return categories[0].slug || 'uncategorized'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const teaserURL = (teaser: ArticleTeaser) => {
|
|
56
|
+
const { id, headline, categories } = teaser
|
|
57
|
+
const catagory = getCategorySlug(categories as TeaserCategory[])
|
|
58
|
+
return id && headline
|
|
59
|
+
? `${catagory}/${id}/${generateArticleSlug(headline)}`
|
|
60
|
+
: catagory
|
|
61
|
+
}
|