@newskit-render/core 0.0.0-d55b7d88 → 0.0.0-dacb59508
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/CHANGELOG.md +400 -0
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +1 -4
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1 -4
- package/cypress/e2e/account/newsletters-page.cy.js +21 -2
- package/cypress/e2e/account/personal-details.cy.js +57 -39
- package/cypress/e2e/account/subscription-and-billing.cy.js +6 -5
- package/cypress/support/blaizeJwtValues.js +3 -0
- package/cypress/support/commands.js +8 -3
- package/cypress/support/users.js +7 -7
- package/helpers/getProviderPropsUtil.ts +17 -0
- package/package.json +10 -10
- package/pages/account/add/[field].tsx +11 -2
- package/pages/account/cancellation/index.tsx +5 -4
- package/pages/account/delete/confirm/index.tsx +3 -5
- package/pages/account/delete/error/index.tsx +3 -5
- package/pages/account/delete/index.tsx +3 -5
- package/pages/account/delete/success/index.tsx +3 -5
- package/pages/account/dream-team/index.tsx +5 -4
- package/pages/account/edit/[field].tsx +4 -4
- package/pages/account/family/index.tsx +9 -5
- package/pages/account/holiday-stop/index.tsx +5 -4
- package/pages/account/holiday-stop/previous-holiday-stops.tsx +3 -2
- package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +3 -2
- package/pages/account/index.tsx +5 -6
- package/pages/account/newsletters/index.tsx +5 -4
- package/pages/account/newsletters-and-alerts/index.tsx +5 -7
- package/pages/account/payment/[paymentMethod].tsx +4 -4
- package/pages/account/payment/index.tsx +5 -4
- package/pages/account/payment-methods/index.tsx +5 -4
- package/pages/account/subscription-and-billing/index.tsx +5 -7
- package/pages/account/user-hub/index.tsx +20 -0
|
@@ -134,8 +134,8 @@ describe('Subscription and billing details for Digital user', () => {
|
|
|
134
134
|
cy.contains('[data-testid="ContentListIntroduction"]', 'Billing details')
|
|
135
135
|
cy.contains('Payment method')
|
|
136
136
|
cy.get('[data-testid="visa-icon"]').should('exist')
|
|
137
|
-
cy.contains('************
|
|
138
|
-
cy.contains('expiry date
|
|
137
|
+
cy.contains('************4242')
|
|
138
|
+
cy.contains('expiry date 02/27')
|
|
139
139
|
})
|
|
140
140
|
|
|
141
141
|
it('Should display Invoice history section', () => {
|
|
@@ -213,7 +213,7 @@ describe('Subscription and billing details for Print user', () => {
|
|
|
213
213
|
it('Should display Your deliveries section', () => {
|
|
214
214
|
cy.contains('[data-testid="ContentListIntroduction"]', 'Your deliveries')
|
|
215
215
|
cy.contains('Address')
|
|
216
|
-
cy.contains('Buckingham Palace, London, SW1A
|
|
216
|
+
cy.contains('Buckingham Palace, London, SW1A')
|
|
217
217
|
cy.contains('Delivery instructions')
|
|
218
218
|
cy.contains('On my doorstep')
|
|
219
219
|
cy.contains('Holiday Stops')
|
|
@@ -254,7 +254,7 @@ describe('Subscription and billing details for Print user', () => {
|
|
|
254
254
|
'If your voucher booklet hasn’t arrived within three days of your booklet start date, or you have any issues regarding your vouchers, please contact us.'
|
|
255
255
|
)
|
|
256
256
|
cy.contains('Voucher booklet start date')
|
|
257
|
-
cy.contains('
|
|
257
|
+
cy.contains('20/09/2022')
|
|
258
258
|
cy.contains(
|
|
259
259
|
'Your contact address will be used for any of your deliveries. This can be managed via Personal details'
|
|
260
260
|
)
|
|
@@ -307,7 +307,8 @@ describe('Subscription and billing details for Paypal user', () => {
|
|
|
307
307
|
cy.get('a[href="/account/payment"]').should('be.visible').click()
|
|
308
308
|
cy.contains(
|
|
309
309
|
'[data-testid="Zuora-inline"]',
|
|
310
|
-
'To update your Paypal credentials, please speak to one of our advisors on xxxx-xxx-xxxx or add a new payment method via credit/debit card using the form below.'
|
|
310
|
+
'To update your Paypal credentials, please speak to one of our advisors on xxxx-xxx-xxxx or add a new payment method via credit/debit card using the form below.',
|
|
311
|
+
{ timeout: 15000 }
|
|
311
312
|
)
|
|
312
313
|
})
|
|
313
314
|
})
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const subscription_blaize_jw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|
-
//Note: Check periodically if these consent cookie values
|
|
1
|
+
//Note: Check periodically if these consent cookie values expire
|
|
2
2
|
import _ from 'lodash'
|
|
3
3
|
import {
|
|
4
4
|
consentUUIDValue,
|
|
@@ -31,6 +31,11 @@ Cypress.Commands.add('mockConsent', () => {
|
|
|
31
31
|
setConsentLocalStorage()
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
+
Cypress.Commands.add('mockBlaizeJwtAndVisit', (jwtValue, url) => {
|
|
35
|
+
cy.setCookie('blaize_jwt', jwtValue)
|
|
36
|
+
cy.visit(url)
|
|
37
|
+
})
|
|
38
|
+
|
|
34
39
|
Cypress.Commands.add('GetAcsSession', (user = 'default') => {
|
|
35
40
|
const { username, password } = userMap[user]
|
|
36
41
|
|
|
@@ -60,13 +65,13 @@ Cypress.Commands.add('GetTnlAcsSession', (user = 'tnl') => {
|
|
|
60
65
|
|
|
61
66
|
cy.request({
|
|
62
67
|
method: 'POST',
|
|
63
|
-
url: 'https://login.staging-thetimes.
|
|
68
|
+
url: 'https://login.staging-thetimes.com/services/session',
|
|
64
69
|
headers: {
|
|
65
70
|
'Content-Type': 'application/vnd.newsuk.acs.createsession-v1+json',
|
|
66
71
|
},
|
|
67
72
|
body: {
|
|
68
73
|
rememberMe: false,
|
|
69
|
-
gotoUrl: 'https://login.staging-thetimes.
|
|
74
|
+
gotoUrl: 'https://login.staging-thetimes.com/',
|
|
70
75
|
sso: false,
|
|
71
76
|
authCredentials: {
|
|
72
77
|
username,
|
package/cypress/support/users.js
CHANGED
|
@@ -22,37 +22,37 @@ export const userMap = {
|
|
|
22
22
|
},
|
|
23
23
|
tnl: {
|
|
24
24
|
username: 'cmp1aug2022printstag@yopmail.com', //Print user
|
|
25
|
-
password: '
|
|
25
|
+
password: 'Password123Testing123$',
|
|
26
26
|
},
|
|
27
27
|
digitalCard: {
|
|
28
28
|
//dtc=false
|
|
29
29
|
username: 'cmp-digi-card-20-09-22@yopmail.com',
|
|
30
|
-
password: '
|
|
30
|
+
password: 'Password123Testing123$',
|
|
31
31
|
},
|
|
32
32
|
digitalDirectDebit: {
|
|
33
33
|
//dtc=false
|
|
34
34
|
username: 'cmp-digi-direct-20-09-22@yopmail.com',
|
|
35
|
-
password: '
|
|
35
|
+
password: 'Password123Testing123$',
|
|
36
36
|
},
|
|
37
37
|
print: {
|
|
38
38
|
//dtc=true
|
|
39
39
|
username: 'cmp-dtc-card-20-09-22@yopmail.com',
|
|
40
|
-
password: '
|
|
40
|
+
password: 'Password123Testing123$',
|
|
41
41
|
},
|
|
42
42
|
printVouchers: {
|
|
43
43
|
//dtc=false
|
|
44
44
|
username: 'cmp-test-direct-20-09-22@yopmail.com',
|
|
45
|
-
password: '
|
|
45
|
+
password: 'Password123Testing123$',
|
|
46
46
|
},
|
|
47
47
|
digiprint: {
|
|
48
48
|
//dtc=true
|
|
49
49
|
username: 'digi-print.dtc.test@yopmail.com',
|
|
50
|
-
password: '
|
|
50
|
+
password: 'Password123Testing123$',
|
|
51
51
|
},
|
|
52
52
|
digiprintVouchers: {
|
|
53
53
|
//dtc=false
|
|
54
54
|
username: 'digi-print-card-15-11-22@yopmail.com',
|
|
55
|
-
password: '
|
|
55
|
+
password: 'Password123Testing123$',
|
|
56
56
|
},
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getProviderProps,
|
|
3
|
+
getProviderPropsTimes,
|
|
4
|
+
} from '@newskit-render/my-account'
|
|
5
|
+
import { publisher } from '../config'
|
|
6
|
+
|
|
7
|
+
export const getProviderPropsUtil = (context, options?) => {
|
|
8
|
+
if (process.env.NODE_ENV === 'development' && publisher === 'TIMES') {
|
|
9
|
+
return getProviderPropsTimes(context, {
|
|
10
|
+
...options,
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return getProviderProps(context, {
|
|
15
|
+
...options,
|
|
16
|
+
})
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-dacb59508",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"@emotion/styled": "11.9.3",
|
|
43
43
|
"@newrelic/next": "0.5.2",
|
|
44
44
|
"@newrelic/winston-enricher": "4.0.1",
|
|
45
|
-
"@newskit-render/api": "^1.
|
|
46
|
-
"@newskit-render/auth": "^1.8.
|
|
47
|
-
"@newskit-render/checkout": "^3.
|
|
48
|
-
"@newskit-render/feature-flags": "^1.
|
|
49
|
-
"@newskit-render/feed": "^1.8.
|
|
50
|
-
"@newskit-render/my-account": "^7.
|
|
51
|
-
"@newskit-render/shared-components": "^4.
|
|
52
|
-
"@newskit-render/standalone-components": "^3.
|
|
53
|
-
"@newskit-render/validation": "^1.
|
|
45
|
+
"@newskit-render/api": "^1.14.0",
|
|
46
|
+
"@newskit-render/auth": "^1.8.1",
|
|
47
|
+
"@newskit-render/checkout": "^3.10.18",
|
|
48
|
+
"@newskit-render/feature-flags": "^1.10.0",
|
|
49
|
+
"@newskit-render/feed": "^1.8.13",
|
|
50
|
+
"@newskit-render/my-account": "^7.75.1",
|
|
51
|
+
"@newskit-render/shared-components": "^4.33.1",
|
|
52
|
+
"@newskit-render/standalone-components": "^3.23.1",
|
|
53
|
+
"@newskit-render/validation": "^1.18.0",
|
|
54
54
|
"cross-fetch": "3.1.5",
|
|
55
55
|
"graphql": "16.6.0",
|
|
56
56
|
"lodash.get": "4.4.2",
|
|
@@ -3,6 +3,8 @@ import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
|
3
3
|
import { AddField, addComponentMap } from '@newskit-render/my-account'
|
|
4
4
|
import validation from '../../../validation'
|
|
5
5
|
import { DynamicPage } from '@newskit-render/my-account'
|
|
6
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
7
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
6
8
|
|
|
7
9
|
const AccountAddField = (props) => (
|
|
8
10
|
<DynamicPage
|
|
@@ -28,7 +30,14 @@ export const getServerSideProps = async (context) => {
|
|
|
28
30
|
console.error(`An error ${context.res.statusCode} occurred on server`)
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
const featureFlags = await getAllFeatureFlags()
|
|
34
|
+
const providerProps = (await getProviderPropsUtil(
|
|
35
|
+
{ ...context, provider: 'AddField' },
|
|
36
|
+
{ featureFlags } /* cra-effected */
|
|
37
|
+
)) as unknown as { props: { data: { type: string } } }
|
|
38
|
+
|
|
39
|
+
if (providerProps?.props) {
|
|
40
|
+
providerProps.props = { ...providerProps.props, data: { type: field } }
|
|
33
41
|
}
|
|
42
|
+
return providerProps
|
|
34
43
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Cancellation
|
|
2
|
+
import { Cancellation } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
4
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
5
|
import validation from '../../../validation'
|
|
6
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
6
7
|
|
|
7
8
|
const AccountCancellation = (props) => (
|
|
8
9
|
<Cancellation {...props} validation={validation} />
|
|
@@ -13,9 +14,9 @@ export default AccountCancellation
|
|
|
13
14
|
export const getServerSideProps = async (context) => {
|
|
14
15
|
replaceConsoleAndSetTransactionName('Account: Cancellation')
|
|
15
16
|
/* start cra-effected */
|
|
16
|
-
const featureFlags = await
|
|
17
|
+
const featureFlags = await getAllFeatureFlags()
|
|
17
18
|
/* end cra-effected */
|
|
18
|
-
return
|
|
19
|
+
return getProviderPropsUtil(
|
|
19
20
|
{ ...context, provider: 'Cancellation' },
|
|
20
21
|
{ featureFlags } /* cra-effected */
|
|
21
22
|
)
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
ConfirmAccountDeletion,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { ConfirmAccountDeletion } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const ConfirmDeletion = (props) => <ConfirmAccountDeletion {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default ConfirmDeletion
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion - Confirmation')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
AccountDeletionError,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { AccountDeletionError } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const Error = (props) => <AccountDeletionError {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default Error
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion - Error')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
InitiateAccountDeletion,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { InitiateAccountDeletion } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const AccountDeletion = (props) => <InitiateAccountDeletion {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default AccountDeletion
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
AccountDeletionSuccess,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { AccountDeletionSuccess } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const Success = (props) => <AccountDeletionSuccess {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default Success
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion - Success')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { DreamTeam
|
|
2
|
+
import { DreamTeam } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
4
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountNewslettersAndAlerts = (props) => <DreamTeam {...props} />
|
|
7
8
|
|
|
@@ -10,9 +11,9 @@ export default AccountNewslettersAndAlerts
|
|
|
10
11
|
export const getServerSideProps = async (context) => {
|
|
11
12
|
replaceConsoleAndSetTransactionName('Account: Dream Team')
|
|
12
13
|
/* start cra-effected */
|
|
13
|
-
const featureFlags = await
|
|
14
|
+
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
16
|
+
return getProviderPropsUtil(
|
|
16
17
|
{ ...context, provider: 'DreamTeam' },
|
|
17
18
|
{ featureFlags } /* cra-effected */
|
|
18
19
|
)
|
|
@@ -2,12 +2,12 @@ import React from 'react'
|
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
3
|
import {
|
|
4
4
|
EditField,
|
|
5
|
-
getProviderProps,
|
|
6
5
|
editComponentMap,
|
|
7
6
|
DynamicPage,
|
|
8
7
|
} from '@newskit-render/my-account'
|
|
9
|
-
import {
|
|
8
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
10
9
|
import validation from '../../../validation'
|
|
10
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
11
11
|
|
|
12
12
|
const AccountEditField = (props) => (
|
|
13
13
|
<DynamicPage
|
|
@@ -35,10 +35,10 @@ export const getServerSideProps = async (context) => {
|
|
|
35
35
|
console.error(`An error ${context.res.statusCode} occurred on server`)
|
|
36
36
|
}
|
|
37
37
|
/* start cra-effected */
|
|
38
|
-
const featureFlags = await
|
|
38
|
+
const featureFlags = await getAllFeatureFlags()
|
|
39
39
|
/* end cra-effected */
|
|
40
40
|
|
|
41
|
-
return
|
|
41
|
+
return getProviderPropsUtil(
|
|
42
42
|
{ ...context, provider: 'EditField' },
|
|
43
43
|
{ featureFlags } /* cra-effected */
|
|
44
44
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Family
|
|
2
|
+
import { Family } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
4
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountFamily = (props) => <Family {...props} />
|
|
7
8
|
|
|
@@ -10,10 +11,13 @@ export default AccountFamily
|
|
|
10
11
|
export const getServerSideProps = async (context) => {
|
|
11
12
|
replaceConsoleAndSetTransactionName('Account: Family')
|
|
12
13
|
/* start cra-effected */
|
|
13
|
-
const featureFlags = await
|
|
14
|
+
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
16
|
-
{
|
|
16
|
+
return getProviderPropsUtil(
|
|
17
|
+
{
|
|
18
|
+
...context,
|
|
19
|
+
provider: 'GroupAccounts',
|
|
20
|
+
},
|
|
17
21
|
{ featureFlags } /* cra-effected */
|
|
18
22
|
)
|
|
19
23
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { HolidayStop } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
4
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountHolidayStop = (props) => <HolidayStop {...props} />
|
|
7
8
|
|
|
@@ -10,9 +11,9 @@ export default AccountHolidayStop
|
|
|
10
11
|
export const getServerSideProps = async (context) => {
|
|
11
12
|
replaceConsoleAndSetTransactionName('Account: Book a Holiday Stop')
|
|
12
13
|
/* start cra-effected */
|
|
13
|
-
const featureFlags = await
|
|
14
|
+
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
16
|
+
return getProviderPropsUtil(
|
|
16
17
|
{ ...context, provider: 'HolidayStop' },
|
|
17
18
|
{ featureFlags } /* cra-effected */
|
|
18
19
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
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
|
|
19
|
+
return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
|
|
19
20
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
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
|
|
19
|
+
return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
|
|
19
20
|
}
|
package/pages/account/index.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { PersonalDetails
|
|
3
|
-
import {
|
|
2
|
+
import { PersonalDetails } from '@newskit-render/my-account'
|
|
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 {
|
|
6
|
+
import { getProviderPropsUtil } from '../../helpers/getProviderPropsUtil'
|
|
7
7
|
|
|
8
8
|
const AccountPersonalDetails = (props) => {
|
|
9
9
|
return (
|
|
@@ -23,10 +23,9 @@ export default AccountPersonalDetails
|
|
|
23
23
|
export const getServerSideProps = async (context) => {
|
|
24
24
|
replaceConsoleAndSetTransactionName('Account: Personal details')
|
|
25
25
|
|
|
26
|
-
const featureFlags = await
|
|
27
|
-
await closeFlagsInstance()
|
|
26
|
+
const featureFlags = await getAllFeatureFlags()
|
|
28
27
|
|
|
29
|
-
return
|
|
28
|
+
return getProviderPropsUtil(
|
|
30
29
|
{ ...context, provider: 'PersonalDetails' },
|
|
31
30
|
{ featureFlags } /* cra-effected */
|
|
32
31
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Newsletters
|
|
2
|
+
import { Newsletters } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
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
|
|
|
@@ -10,9 +11,9 @@ export default AccountNewsletters
|
|
|
10
11
|
export const getServerSideProps = async (context) => {
|
|
11
12
|
replaceConsoleAndSetTransactionName('Account: Newsletters')
|
|
12
13
|
/* start cra-effected */
|
|
13
|
-
const featureFlags = await
|
|
14
|
+
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
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
|
-
import {
|
|
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} />
|
|
@@ -15,9 +13,9 @@ export default AccountNewslettersAndAlerts
|
|
|
15
13
|
export const getServerSideProps = async (context) => {
|
|
16
14
|
replaceConsoleAndSetTransactionName('Account: Newsletters and Alerts')
|
|
17
15
|
/* start cra-effected */
|
|
18
|
-
const featureFlags = await
|
|
16
|
+
const featureFlags = await getAllFeatureFlags()
|
|
19
17
|
/* end cra-effected */
|
|
20
|
-
return
|
|
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
|
-
import {
|
|
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 (
|
|
@@ -24,10 +24,10 @@ export default PaymentPage
|
|
|
24
24
|
export const getServerSideProps = async (context) => {
|
|
25
25
|
replaceConsoleAndSetTransactionName('Payment method')
|
|
26
26
|
/* start cra-effected */
|
|
27
|
-
const featureFlags = await
|
|
27
|
+
const featureFlags = await getAllFeatureFlags()
|
|
28
28
|
/* end cra-effected */
|
|
29
29
|
|
|
30
|
-
return
|
|
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
|
|
4
|
-
import {
|
|
3
|
+
import { Payment } from '@newskit-render/my-account'
|
|
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
|
|
|
@@ -10,10 +11,10 @@ export default AccountPayment
|
|
|
10
11
|
export const getServerSideProps = async (context) => {
|
|
11
12
|
replaceConsoleAndSetTransactionName('Edit Payment method')
|
|
12
13
|
/* start cra-effected */
|
|
13
|
-
const featureFlags = await
|
|
14
|
+
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
16
|
|
|
16
|
-
return
|
|
17
|
+
return getProviderPropsUtil(
|
|
17
18
|
{
|
|
18
19
|
...context,
|
|
19
20
|
provider: 'Payment',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PaymentMethods } from '@newskit-render/my-account'
|
|
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} />
|
|
@@ -12,9 +13,9 @@ export default AccountPaymentMethods
|
|
|
12
13
|
|
|
13
14
|
export const getServerSideProps = async (context) => {
|
|
14
15
|
replaceConsoleAndSetTransactionName('Account: Payment Methods')
|
|
15
|
-
const featureFlags = await
|
|
16
|
+
const featureFlags = await getAllFeatureFlags()
|
|
16
17
|
// create-render-app effected
|
|
17
|
-
return
|
|
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
|
-
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
6
|
-
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
2
|
+
import { SubscriptionAndBilling } from '@newskit-render/my-account'
|
|
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} />
|
|
@@ -15,9 +13,9 @@ export default AccountSubscriptionAndBilling
|
|
|
15
13
|
export const getServerSideProps = async (context) => {
|
|
16
14
|
replaceConsoleAndSetTransactionName('Account: Subscription and Billing')
|
|
17
15
|
/* start cra-effected */
|
|
18
|
-
const featureFlags = await
|
|
16
|
+
const featureFlags = await getAllFeatureFlags()
|
|
19
17
|
/* end cra-effected */
|
|
20
|
-
const result = await
|
|
18
|
+
const result = await getProviderPropsUtil(
|
|
21
19
|
{
|
|
22
20
|
...context,
|
|
23
21
|
provider: 'SubscriptionAndBilling',
|