@newskit-render/core 4.27.1-alpha.2 → 4.27.1-alpha.4
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/package.json +2 -2
- package/pages/account/cancellation/index.tsx +2 -3
- package/pages/account/dream-team/index.tsx +2 -3
- package/pages/account/edit/[field].tsx +2 -3
- package/pages/account/family/index.tsx +2 -3
- package/pages/account/holiday-stop/index.tsx +2 -3
- package/pages/account/index.tsx +6 -6
- package/pages/account/newsletters/index.tsx +2 -3
- package/pages/account/newsletters-and-alerts/index.tsx +2 -3
- package/pages/account/payment/[paymentMethod].tsx +2 -3
- package/pages/account/payment/index.tsx +2 -3
- package/pages/account/payment-methods/index.tsx +3 -3
- package/pages/account/subscription-and-billing/index.tsx +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "4.27.1-alpha.
|
|
3
|
+
"version": "4.27.1-alpha.4",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@newskit-render/api": "^1.12.1",
|
|
46
46
|
"@newskit-render/auth": "^1.8.0",
|
|
47
47
|
"@newskit-render/checkout": "^3.9.34-alpha.0",
|
|
48
|
-
"@newskit-render/feature-flags": "^1.8.
|
|
48
|
+
"@newskit-render/feature-flags": "^1.8.1-alpha.1",
|
|
49
49
|
"@newskit-render/feed": "^1.8.9",
|
|
50
50
|
"@newskit-render/my-account": "^7.54.0-alpha.1",
|
|
51
51
|
"@newskit-render/shared-components": "^4.28.0-alpha.0",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Cancellation, getProviderProps } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
5
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
4
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
6
5
|
import validation from '../../../validation'
|
|
7
6
|
|
|
8
7
|
const AccountCancellation = (props) => (
|
|
@@ -14,7 +13,7 @@ export default AccountCancellation
|
|
|
14
13
|
export const getServerSideProps = async (context) => {
|
|
15
14
|
replaceConsoleAndSetTransactionName('Account: Cancellation')
|
|
16
15
|
/* start cra-effected */
|
|
17
|
-
const featureFlags = await
|
|
16
|
+
const featureFlags = await getFlagsAll()
|
|
18
17
|
/* end cra-effected */
|
|
19
18
|
return getProviderProps(
|
|
20
19
|
{ ...context, provider: 'Cancellation' },
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { DreamTeam, getProviderProps } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
5
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
4
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
6
5
|
|
|
7
6
|
const AccountNewslettersAndAlerts = (props) => <DreamTeam {...props} />
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ export default AccountNewslettersAndAlerts
|
|
|
11
10
|
export const getServerSideProps = async (context) => {
|
|
12
11
|
replaceConsoleAndSetTransactionName('Account: Dream Team')
|
|
13
12
|
/* start cra-effected */
|
|
14
|
-
const featureFlags = await
|
|
13
|
+
const featureFlags = await getFlagsAll()
|
|
15
14
|
/* end cra-effected */
|
|
16
15
|
return getProviderProps(
|
|
17
16
|
{ ...context, provider: 'DreamTeam' },
|
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
editComponentMap,
|
|
7
7
|
DynamicPage,
|
|
8
8
|
} from '@newskit-render/my-account'
|
|
9
|
-
import {
|
|
10
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
9
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
11
10
|
import validation from '../../../validation'
|
|
12
11
|
|
|
13
12
|
const AccountEditField = (props) => (
|
|
@@ -36,7 +35,7 @@ export const getServerSideProps = async (context) => {
|
|
|
36
35
|
console.error(`An error ${context.res.statusCode} occurred on server`)
|
|
37
36
|
}
|
|
38
37
|
/* start cra-effected */
|
|
39
|
-
const featureFlags = await
|
|
38
|
+
const featureFlags = await getFlagsAll()
|
|
40
39
|
/* end cra-effected */
|
|
41
40
|
|
|
42
41
|
return getProviderProps(
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Family, getProviderProps } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
5
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
4
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
6
5
|
|
|
7
6
|
const AccountFamily = (props) => <Family {...props} />
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ export default AccountFamily
|
|
|
11
10
|
export const getServerSideProps = async (context) => {
|
|
12
11
|
replaceConsoleAndSetTransactionName('Account: Family')
|
|
13
12
|
/* start cra-effected */
|
|
14
|
-
const featureFlags = await
|
|
13
|
+
const featureFlags = await getFlagsAll()
|
|
15
14
|
/* end cra-effected */
|
|
16
15
|
return getProviderProps(
|
|
17
16
|
{ ...context, provider: 'GroupAccounts' },
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { getProviderProps, HolidayStop } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
5
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
4
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
6
5
|
|
|
7
6
|
const AccountHolidayStop = (props) => <HolidayStop {...props} />
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ export default AccountHolidayStop
|
|
|
11
10
|
export const getServerSideProps = async (context) => {
|
|
12
11
|
replaceConsoleAndSetTransactionName('Account: Book a Holiday Stop')
|
|
13
12
|
/* start cra-effected */
|
|
14
|
-
const featureFlags = await
|
|
13
|
+
const featureFlags = await getFlagsAll()
|
|
15
14
|
/* end cra-effected */
|
|
16
15
|
return getProviderProps(
|
|
17
16
|
{ ...context, provider: 'HolidayStop' },
|
package/pages/account/index.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { PersonalDetails, getProviderProps } from '@newskit-render/my-account'
|
|
3
|
-
import {
|
|
4
|
-
import { optimizelysdkKey } from '../../config' /* cra-effected */
|
|
3
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
4
|
import { AccountDropdown } from '../../components/AccountDropdown' /* cra-disabled */
|
|
6
5
|
import { replaceConsoleAndSetTransactionName } from '../../helpers/logger'
|
|
6
|
+
import { closeFlagsInstance } from '@newskit-render/feature-flags'
|
|
7
7
|
|
|
8
8
|
const AccountPersonalDetails = (props) => {
|
|
9
9
|
return (
|
|
@@ -21,11 +21,11 @@ const AccountPersonalDetails = (props) => {
|
|
|
21
21
|
export default AccountPersonalDetails
|
|
22
22
|
|
|
23
23
|
export const getServerSideProps = async (context) => {
|
|
24
|
-
/* start cra-effected */
|
|
25
|
-
const featureFlags = await initAndGetFeatureFlag(optimizelysdkKey)
|
|
26
|
-
|
|
27
|
-
/* end cra-effected */
|
|
28
24
|
replaceConsoleAndSetTransactionName('Account: Personal details')
|
|
25
|
+
|
|
26
|
+
const featureFlags = await getFlagsAll()
|
|
27
|
+
await closeFlagsInstance()
|
|
28
|
+
|
|
29
29
|
return getProviderProps(
|
|
30
30
|
{ ...context, provider: 'PersonalDetails' },
|
|
31
31
|
{ featureFlags } /* cra-effected */
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Newsletters, getProviderProps } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
-
import {
|
|
5
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
4
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
6
5
|
|
|
7
6
|
const AccountNewsletters = (props) => <Newsletters {...props} />
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ export default AccountNewsletters
|
|
|
11
10
|
export const getServerSideProps = async (context) => {
|
|
12
11
|
replaceConsoleAndSetTransactionName('Account: Newsletters')
|
|
13
12
|
/* start cra-effected */
|
|
14
|
-
const featureFlags = await
|
|
13
|
+
const featureFlags = await getFlagsAll()
|
|
15
14
|
/* end cra-effected */
|
|
16
15
|
return getProviderProps(
|
|
17
16
|
{ ...context, provider: 'Newsletters' },
|
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
getProviderProps,
|
|
5
5
|
} from '@newskit-render/my-account'
|
|
6
6
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
7
|
-
import {
|
|
8
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
7
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
9
8
|
|
|
10
9
|
const AccountNewslettersAndAlerts = (props) => (
|
|
11
10
|
<NewslettersAndAlerts {...props} />
|
|
@@ -16,7 +15,7 @@ export default AccountNewslettersAndAlerts
|
|
|
16
15
|
export const getServerSideProps = async (context) => {
|
|
17
16
|
replaceConsoleAndSetTransactionName('Account: Newsletters and Alerts')
|
|
18
17
|
/* start cra-effected */
|
|
19
|
-
const featureFlags = await
|
|
18
|
+
const featureFlags = await getFlagsAll()
|
|
20
19
|
/* end cra-effected */
|
|
21
20
|
return getProviderProps(
|
|
22
21
|
{ ...context, provider: 'NewslettersAndAlerts' },
|
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
paymentMethodsMap,
|
|
7
7
|
DynamicPage,
|
|
8
8
|
} from '@newskit-render/my-account'
|
|
9
|
-
import {
|
|
10
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
9
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
11
10
|
|
|
12
11
|
const PaymentPage = (props) => {
|
|
13
12
|
return (
|
|
@@ -25,7 +24,7 @@ export default PaymentPage
|
|
|
25
24
|
export const getServerSideProps = async (context) => {
|
|
26
25
|
replaceConsoleAndSetTransactionName('Payment method')
|
|
27
26
|
/* start cra-effected */
|
|
28
|
-
const featureFlags = await
|
|
27
|
+
const featureFlags = await getFlagsAll()
|
|
29
28
|
/* end cra-effected */
|
|
30
29
|
|
|
31
30
|
return getProviderProps(
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
3
|
import { Payment, getProviderProps } from '@newskit-render/my-account'
|
|
4
|
-
import {
|
|
5
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
4
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
6
5
|
|
|
7
6
|
const AccountPayment = (props) => <Payment {...props} />
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ export default AccountPayment
|
|
|
11
10
|
export const getServerSideProps = async (context) => {
|
|
12
11
|
replaceConsoleAndSetTransactionName('Edit Payment method')
|
|
13
12
|
/* start cra-effected */
|
|
14
|
-
const featureFlags = await
|
|
13
|
+
const featureFlags = await getFlagsAll()
|
|
15
14
|
/* end cra-effected */
|
|
16
15
|
|
|
17
16
|
return getProviderProps(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { getProviderProps, PaymentMethods } from '@newskit-render/my-account'
|
|
3
|
-
import {
|
|
4
|
-
import { optimizelysdkKey } from '../../../config' // create-render-app effected
|
|
3
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' // create-render-app effected
|
|
5
4
|
import { paymentMethodContext } from '../../../context/app-context/paymentMethodContext'
|
|
6
5
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
7
6
|
|
|
@@ -13,7 +12,8 @@ export default AccountPaymentMethods
|
|
|
13
12
|
|
|
14
13
|
export const getServerSideProps = async (context) => {
|
|
15
14
|
replaceConsoleAndSetTransactionName('Account: Payment Methods')
|
|
16
|
-
const featureFlags = await
|
|
15
|
+
const featureFlags = await getFlagsAll()
|
|
16
|
+
// create-render-app effected
|
|
17
17
|
return getProviderProps(
|
|
18
18
|
{ ...context, provider: 'PaymentMethods' },
|
|
19
19
|
{ featureFlags } // create-render-app effected
|
|
@@ -3,8 +3,7 @@ import {
|
|
|
3
3
|
SubscriptionAndBilling,
|
|
4
4
|
getProviderProps,
|
|
5
5
|
} from '@newskit-render/my-account'
|
|
6
|
-
import {
|
|
7
|
-
import { optimizelysdkKey } from '../../../config' /* cra-effected */
|
|
6
|
+
import { getFlagsAll } from '@newskit-render/feature-flags' /* cra-effected */
|
|
8
7
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
9
8
|
|
|
10
9
|
const AccountSubscriptionAndBilling = (props) => (
|
|
@@ -16,7 +15,7 @@ export default AccountSubscriptionAndBilling
|
|
|
16
15
|
export const getServerSideProps = async (context) => {
|
|
17
16
|
replaceConsoleAndSetTransactionName('Account: Subscription and Billing')
|
|
18
17
|
/* start cra-effected */
|
|
19
|
-
const featureFlags = await
|
|
18
|
+
const featureFlags = await getFlagsAll()
|
|
20
19
|
/* end cra-effected */
|
|
21
20
|
const result = await getProviderProps(
|
|
22
21
|
{
|