@newskit-render/core 0.0.0-bcf1bb580 → 0.0.0-bd288ac57

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +560 -0
  2. package/Dockerfile.withNewRelic +1 -2
  3. package/__tests__/pages/__snapshots__/home.test.tsx.snap +0 -3
  4. package/components/article/__tests__/__snapshots__/index.test.tsx.snap +0 -3
  5. package/cypress/e2e/account/newsletters-page.cy.js +22 -20
  6. package/cypress/e2e/account/subscription-and-billing.cy.js +10 -38
  7. package/cypress/support/commands.js +0 -5
  8. package/cypress/support/users.js +6 -2
  9. package/helpers/getProviderPropsUtil.ts +17 -0
  10. package/next.config.js +55 -57
  11. package/package.json +12 -13
  12. package/pages/account/add/[field].tsx +11 -2
  13. package/pages/account/{family → bonus-accounts}/index.tsx +9 -4
  14. package/pages/account/cancellation/index.tsx +3 -2
  15. package/pages/account/delete/confirm/index.tsx +3 -5
  16. package/pages/account/delete/error/index.tsx +3 -5
  17. package/pages/account/delete/index.tsx +3 -5
  18. package/pages/account/delete/success/index.tsx +3 -5
  19. package/pages/account/dream-team/index.tsx +3 -2
  20. package/pages/account/edit/[field].tsx +17 -4
  21. package/pages/account/holiday-stop/index.tsx +3 -2
  22. package/pages/account/holiday-stop/previous-holiday-stops.tsx +3 -2
  23. package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +3 -2
  24. package/pages/account/index.tsx +3 -2
  25. package/pages/account/newsletters/index.tsx +3 -2
  26. package/pages/account/newsletters-and-alerts/index.tsx +3 -5
  27. package/pages/account/payment/[paymentMethod].tsx +2 -2
  28. package/pages/account/payment/index.tsx +3 -2
  29. package/pages/account/payment-methods/index.tsx +3 -2
  30. package/pages/account/subscription-and-billing/index.tsx +3 -5
  31. package/pages/account/user-hub/index.tsx +4 -6
  32. package/temp/_document.tsx +1 -0
  33. package/cypress/support/blaizeValues.js +0 -3
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
- import { getProviderProps, HolidayStopList } from '@newskit-render/my-account'
2
+ import { HolidayStopList } from '@newskit-render/my-account'
3
3
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
4
4
  import { holidayStopListContextOverrides } from '../../../context/app-context/holidayStopListContextOverrides'
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
5
6
 
6
7
  const AccountPreviousHolidayStops = (props) => (
7
8
  <HolidayStopList
@@ -15,5 +16,5 @@ export default AccountPreviousHolidayStops
15
16
 
16
17
  export const getServerSideProps = async (context) => {
17
18
  replaceConsoleAndSetTransactionName('Account: Previous Holiday Stops')
18
- return getProviderProps({ ...context, provider: 'HolidayStop' })
19
+ return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
19
20
  }
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
- import { getProviderProps, HolidayStopList } from '@newskit-render/my-account'
2
+ import { HolidayStopList } from '@newskit-render/my-account'
3
3
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
4
4
  import { holidayStopListContextOverrides } from '../../../context/app-context/holidayStopListContextOverrides'
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
5
6
 
6
7
  const AccountUpcomingHolidayStops = (props) => (
7
8
  <HolidayStopList
@@ -15,5 +16,5 @@ export default AccountUpcomingHolidayStops
15
16
 
16
17
  export const getServerSideProps = async (context) => {
17
18
  replaceConsoleAndSetTransactionName('Account: Upcoming Holiday Stops')
18
- return getProviderProps({ ...context, provider: 'HolidayStop' })
19
+ return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
19
20
  }
@@ -1,8 +1,9 @@
1
1
  import React from 'react'
2
- import { PersonalDetails, getProviderProps } from '@newskit-render/my-account'
2
+ import { PersonalDetails } from '@newskit-render/my-account'
3
3
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
4
4
  import { AccountDropdown } from '../../components/AccountDropdown' /* cra-disabled */
5
5
  import { replaceConsoleAndSetTransactionName } from '../../helpers/logger'
6
+ import { getProviderPropsUtil } from '../../helpers/getProviderPropsUtil'
6
7
 
7
8
  const AccountPersonalDetails = (props) => {
8
9
  return (
@@ -24,7 +25,7 @@ export const getServerSideProps = async (context) => {
24
25
 
25
26
  const featureFlags = await getAllFeatureFlags()
26
27
 
27
- return getProviderProps(
28
+ return getProviderPropsUtil(
28
29
  { ...context, provider: 'PersonalDetails' },
29
30
  { featureFlags } /* cra-effected */
30
31
  )
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
- import { Newsletters, getProviderProps } from '@newskit-render/my-account'
2
+ import { Newsletters } from '@newskit-render/my-account'
3
3
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
4
4
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
5
6
 
6
7
  const AccountNewsletters = (props) => <Newsletters {...props} />
7
8
 
@@ -12,7 +13,7 @@ export const getServerSideProps = async (context) => {
12
13
  /* start cra-effected */
13
14
  const featureFlags = await getAllFeatureFlags()
14
15
  /* end cra-effected */
15
- return getProviderProps(
16
+ return getProviderPropsUtil(
16
17
  { ...context, provider: 'Newsletters' },
17
18
  { featureFlags } /* cra-effected */
18
19
  )
@@ -1,10 +1,8 @@
1
1
  import React from 'react'
2
- import {
3
- NewslettersAndAlerts,
4
- getProviderProps,
5
- } from '@newskit-render/my-account'
2
+ import { NewslettersAndAlerts } from '@newskit-render/my-account'
6
3
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
7
4
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
8
6
 
9
7
  const AccountNewslettersAndAlerts = (props) => (
10
8
  <NewslettersAndAlerts {...props} />
@@ -17,7 +15,7 @@ export const getServerSideProps = async (context) => {
17
15
  /* start cra-effected */
18
16
  const featureFlags = await getAllFeatureFlags()
19
17
  /* end cra-effected */
20
- return getProviderProps(
18
+ return getProviderPropsUtil(
21
19
  { ...context, provider: 'NewslettersAndAlerts' },
22
20
  { featureFlags } /* cra-effected */
23
21
  )
@@ -1,12 +1,12 @@
1
1
  import React from 'react'
2
2
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
3
3
  import {
4
- getProviderProps,
5
4
  Payment,
6
5
  paymentMethodsMap,
7
6
  DynamicPage,
8
7
  } from '@newskit-render/my-account'
9
8
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
9
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
10
10
 
11
11
  const PaymentPage = (props) => {
12
12
  return (
@@ -27,7 +27,7 @@ export const getServerSideProps = async (context) => {
27
27
  const featureFlags = await getAllFeatureFlags()
28
28
  /* end cra-effected */
29
29
 
30
- return getProviderProps(
30
+ return getProviderPropsUtil(
31
31
  {
32
32
  ...context,
33
33
  provider: 'Payment',
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
2
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
3
- import { Payment, getProviderProps } from '@newskit-render/my-account'
3
+ import { Payment } from '@newskit-render/my-account'
4
4
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
5
6
 
6
7
  const AccountPayment = (props) => <Payment {...props} />
7
8
 
@@ -13,7 +14,7 @@ export const getServerSideProps = async (context) => {
13
14
  const featureFlags = await getAllFeatureFlags()
14
15
  /* end cra-effected */
15
16
 
16
- return getProviderProps(
17
+ return getProviderPropsUtil(
17
18
  {
18
19
  ...context,
19
20
  provider: 'Payment',
@@ -1,8 +1,9 @@
1
1
  import React from 'react'
2
- import { getProviderProps, PaymentMethods } from '@newskit-render/my-account'
2
+ import { PaymentMethods } from '@newskit-render/my-account'
3
3
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' // create-render-app effected
4
4
  import { paymentMethodContext } from '../../../context/app-context/paymentMethodContext'
5
5
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
6
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
6
7
 
7
8
  const AccountPaymentMethods = (props) => (
8
9
  <PaymentMethods {...props} context={paymentMethodContext} />
@@ -14,7 +15,7 @@ export const getServerSideProps = async (context) => {
14
15
  replaceConsoleAndSetTransactionName('Account: Payment Methods')
15
16
  const featureFlags = await getAllFeatureFlags()
16
17
  // create-render-app effected
17
- return getProviderProps(
18
+ return getProviderPropsUtil(
18
19
  { ...context, provider: 'PaymentMethods' },
19
20
  { featureFlags } // create-render-app effected
20
21
  )
@@ -1,10 +1,8 @@
1
1
  import React from 'react'
2
- import {
3
- SubscriptionAndBilling,
4
- getProviderProps,
5
- } from '@newskit-render/my-account'
2
+ import { SubscriptionAndBilling } from '@newskit-render/my-account'
6
3
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
7
4
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
8
6
 
9
7
  const AccountSubscriptionAndBilling = (props) => (
10
8
  <SubscriptionAndBilling {...props} />
@@ -17,7 +15,7 @@ export const getServerSideProps = async (context) => {
17
15
  /* start cra-effected */
18
16
  const featureFlags = await getAllFeatureFlags()
19
17
  /* end cra-effected */
20
- const result = await getProviderProps(
18
+ const result = await getProviderPropsUtil(
21
19
  {
22
20
  ...context,
23
21
  provider: 'SubscriptionAndBilling',
@@ -1,10 +1,8 @@
1
1
  import React from 'react'
2
- import {
3
- UserHub as UserHubPage,
4
- getProviderProps,
5
- } from '@newskit-render/my-account'
2
+ import { UserHub as UserHubPage } from '@newskit-render/my-account'
6
3
  import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
7
4
  import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
5
+ import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
8
6
 
9
7
  const UserHub = (props) => <UserHubPage {...props} />
10
8
 
@@ -15,8 +13,8 @@ export const getServerSideProps = async (context) => {
15
13
  /* start cra-effected */
16
14
  const featureFlags = await getAllFeatureFlags()
17
15
  /* end cra-effected */
18
- return getProviderProps(
19
- { ...context, provider: 'PersonalDetails' },
16
+ return getProviderPropsUtil(
17
+ { ...context, provider: 'UserHub' },
20
18
  { featureFlags } /* cra-effected */
21
19
  )
22
20
  }
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import React from 'react'
2
3
  import Script from 'next/script'
3
4
  import Document, {
@@ -1,3 +0,0 @@
1
- export const subscription_blaize_jwt = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJjcG5cIjpcIkFBQUEwMjU1OTcwNDVcIixcInByb2R1Y3RzXCI6W1wiVGhlIFRpbWVzIFNpdGUgUHJvZHVjdFwiLFwiVGltZXMgU3BvcnRzIEFwcFwiLFwiVGhlIFRpbWVzIEVQTCBWaWRlbyBQcm9kdWN0XCIsXCJUaGUgU3VuZGF5IFRpbWVzIGlQaG9uZSBhcHAgcHJvZHVjdFwiLFwiRW1haWwgQnVsbGV0aW5zIFByb2R1Y3RcIixcIlRoZSBTdW5kYXkgVGltZXMgTW9iaSBQcm9kdWN0XCIsXCJUaGUgU3VuZGF5IFRpbWVzIGlQYWQgYXBwIHByb2R1Y3RcIixcImUtcGFwZXIgUHJvZHVjdFwiLFwiRGFpbHkgQ3Jvc3N3b3JkIFByb2R1Y3RcIixcIlRoZSBTdW5kYXkgVGltZXMgU2l0ZSBQcm9kdWN0XCIsXCJUaGUgVGltZXMgTW9iaSBQcm9kdWN0XCIsXCJUaGUgVGltZXMgaVBhZCBhcHAgUHJvZHVjdFwiLFwiRGlnaXRhbCBTdWJzY3JpcHRpb24gUHJvZHVjdFwiLFwiVGhlIFRpbWVzIGlQaG9uZSBhcHAgcHJvZHVjdFwiLFwiVGltZXMrIG1lbWJlcnNoaXAgYmVuZWZpdHMgUHJvZHVjdFw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