@newskit-render/core 1.27.8 → 1.30.0
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 +79 -0
- package/__tests__/pages/[articleSlug].test.tsx +2 -15
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +1 -1
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/components/article/index.tsx +1 -1
- package/components/header/index.tsx +9 -4
- package/components/layout/LayoutTemplate.tsx +1 -1
- package/components/layout/layoutTypes.ts +1 -1
- package/components/section/index.tsx +2 -2
- package/cypress/e2e/account/account-page.spec.js +4 -3
- package/cypress/e2e/account/payment-page.spec.js +37 -37
- package/helpers/__tests__/createThemeDropdownObject.test.ts +34 -0
- package/helpers/createThemeDropdownObject.ts +49 -0
- package/helpers/getUser.ts +1 -1
- package/helpers/global-types.ts +0 -29
- package/infrastructure/.circleci/config.yml +2 -1
- package/infrastructure/helm/values-dev.yaml +1 -0
- package/infrastructure/helm/values-pr.yaml +1 -0
- package/infrastructure/helm/values-prod.yaml +1 -0
- package/infrastructure/helm/values-staging.yaml +1 -0
- package/package.json +9 -9
- package/pages/[section]/[articleId]/[articleSlug].tsx +1 -1
- package/pages/account/cancellation/index.tsx +9 -1
- package/pages/account/edit/[field].tsx +3 -1
- package/pages/account/index.tsx +9 -1
- package/pages/account/newsletters-and-alerts/index.tsx +7 -1
- package/pages/account/payment/index.tsx +9 -1
- package/pages/account/subscription-and-billing/index.tsx +3 -1
- package/pages/api/sitemap.ts +11 -1
- package/pages/checkout/account-creation/index.tsx +3 -1
- package/pages/checkout/payment-details/index.tsx +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,85 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.30.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.5...@newskit-render/core@1.30.0) (2022-03-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **PPDSR-627:** update-account-cancellation ([#593](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/593)) ([9b70d1c](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/9b70d1c8c670541b3d084073f372274951006ade))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.29.5](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.4...@newskit-render/core@1.29.5) (2022-03-03)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.29.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.3...@newskit-render/core@1.29.4) (2022-03-02)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **PPDSR-680:** changed overflow on homepage nav to remove the scroller ([#614](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/614)) ([f7e4d21](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/f7e4d2196399eae72ef26b71d6e925ab6c82efb1))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [1.29.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.2...@newskit-render/core@1.29.3) (2022-03-01)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [1.29.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.1...@newskit-render/core@1.29.2) (2022-03-01)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [1.29.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.0...@newskit-render/core@1.29.1) (2022-03-01)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* **PPDSR-667:** make theme selector overridable ([#610](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/610)) ([4017c6b](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/4017c6baf796dbad2727712d60b9719fb190efcb))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# [1.29.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.28.0...@newskit-render/core@1.29.0) (2022-02-28)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* **PPDSR-474:** intergate new MAIN Zuora mutation ([#604](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/604)) ([bf62a52](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/bf62a5270f5d5d0236e67222db81697f5e74cd01))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
# [1.28.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.8...@newskit-render/core@1.28.0) (2022-02-25)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Features
|
|
78
|
+
|
|
79
|
+
* **PPDSR-542:** sitemap add support for custom urls ([#601](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/601)) ([dd51e1f](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/dd51e1ff4404b44ba64381f987551f4f88da9b8f))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
6
85
|
## [1.27.8](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.7...@newskit-render/core@1.27.8) (2022-02-25)
|
|
7
86
|
|
|
8
87
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -5,7 +5,7 @@ import Article, {
|
|
|
5
5
|
} from '../../pages/[section]/[articleId]/[articleSlug]'
|
|
6
6
|
import { renderWithQuery } from '../../helpers/test-utils'
|
|
7
7
|
import { getUniversalArticleMock } from '../../helpers/mocks'
|
|
8
|
-
import { URL, Slug
|
|
8
|
+
import { URL, Slug } from '../../helpers/global-types'
|
|
9
9
|
|
|
10
10
|
const props: ArticleSlug = {
|
|
11
11
|
universalArticle: {
|
|
@@ -59,20 +59,7 @@ const props: ArticleSlug = {
|
|
|
59
59
|
gscId: '4320982',
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const userMock = {
|
|
63
|
-
vxInstances: [
|
|
64
|
-
{
|
|
65
|
-
interactions: [
|
|
66
|
-
{
|
|
67
|
-
pastDue: {
|
|
68
|
-
isPastDue: false,
|
|
69
|
-
since: new Date(),
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
} as UserData
|
|
62
|
+
const userMock = {}
|
|
76
63
|
|
|
77
64
|
jest.mock('cross-fetch', () =>
|
|
78
65
|
jest.fn().mockImplementation(() =>
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
Divider,
|
|
15
15
|
} from 'newskit'
|
|
16
16
|
import { SEOComponent } from '@newskit-render/shared-components'
|
|
17
|
+
import { UserData } from '@newskit-render/my-account'
|
|
17
18
|
import MetaBoxComponent from './MetaBox'
|
|
18
19
|
import Ad from '../ad'
|
|
19
20
|
import Highlights from './Highlights'
|
|
@@ -27,7 +28,6 @@ import {
|
|
|
27
28
|
Topic,
|
|
28
29
|
Byline,
|
|
29
30
|
ParagraphBlock,
|
|
30
|
-
UserData,
|
|
31
31
|
} from '../../helpers/global-types'
|
|
32
32
|
import ShareButton from '../common/ShareButton'
|
|
33
33
|
import Layout from '../layout'
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
IconFilledMenu,
|
|
13
13
|
Image,
|
|
14
14
|
} from 'newskit'
|
|
15
|
-
import { PastDueBannerExternal } from '@newskit-render/my-account'
|
|
15
|
+
import { PastDueBannerExternal, UserData } from '@newskit-render/my-account'
|
|
16
16
|
import {
|
|
17
17
|
NextLink,
|
|
18
18
|
theSunTheme,
|
|
@@ -30,7 +30,6 @@ import NewsKitLogoShort from '../common/NewskitLogoShort'
|
|
|
30
30
|
import NavLink from '../common/NavLink'
|
|
31
31
|
import { AppContext } from '../../app-context/AppContext'
|
|
32
32
|
import { handleEnterKeyPress } from '../../helpers/a11y'
|
|
33
|
-
import { UserData, VxInstance } from '../../helpers/global-types'
|
|
34
33
|
|
|
35
34
|
export const headerSize = 'sizing090'
|
|
36
35
|
|
|
@@ -80,6 +79,12 @@ const pastDueBanner = {
|
|
|
80
79
|
text:
|
|
81
80
|
'You’ll no longer have access to subscription benefits. To re-activate call 0800 555 1234.',
|
|
82
81
|
},
|
|
82
|
+
toBeCancelled: {
|
|
83
|
+
title: 'Your subscription will end soon.',
|
|
84
|
+
phoneNumber: '0800 555 1234',
|
|
85
|
+
text:
|
|
86
|
+
'You have cacelled your subscription and will lose access to all benefits on ##DATE##. To re-activate your subcsription call ##PHONE_NUMBER##.',
|
|
87
|
+
},
|
|
83
88
|
treshold: {
|
|
84
89
|
firstNotice: 26,
|
|
85
90
|
secondNotice: 30,
|
|
@@ -110,7 +115,7 @@ const NavigationContainer = styled.div<NavigationProps>`
|
|
|
110
115
|
${getMediaQueryFromTheme('md')} {
|
|
111
116
|
display: block;
|
|
112
117
|
position: relative;
|
|
113
|
-
overflow:
|
|
118
|
+
overflow: hidden;
|
|
114
119
|
width: initial;
|
|
115
120
|
min-height: initial;
|
|
116
121
|
background-color: initial;
|
|
@@ -280,7 +285,7 @@ const Header: React.FC<{ user: UserData }> = ({ user }) => {
|
|
|
280
285
|
</StyledHeader>
|
|
281
286
|
<PastDueBannerExternal
|
|
282
287
|
pastDueBanner={pastDueBanner}
|
|
283
|
-
|
|
288
|
+
user={user}
|
|
284
289
|
wrapper={BannerContainer}
|
|
285
290
|
/>
|
|
286
291
|
</>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { UserData } from '@newskit-render/my-account'
|
|
2
3
|
import Header from '../header'
|
|
3
4
|
import Footer from '../footer'
|
|
4
5
|
import { Gutter } from './Gutter'
|
|
5
6
|
import { LayoutProps } from './layoutTypes'
|
|
6
7
|
import { MainGrid } from './MainGrid'
|
|
7
|
-
import { UserData } from '../../helpers/global-types'
|
|
8
8
|
|
|
9
9
|
const LayoutTemplate: React.FC<LayoutProps> = ({
|
|
10
10
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Cell } from 'newskit'
|
|
3
|
-
|
|
4
|
-
import { Page
|
|
3
|
+
import { UserData } from '@newskit-render/my-account'
|
|
4
|
+
import { Page } from '../../helpers/global-types'
|
|
5
5
|
import Layout from '../layout'
|
|
6
6
|
import pageBlock from './pageBlock'
|
|
7
7
|
import SectionTitleBar from '../common/SectionTitleBar'
|
|
@@ -258,8 +258,8 @@ describe('My account personal details', () => {
|
|
|
258
258
|
cy.get('input[name="city"]').clear().type('London')
|
|
259
259
|
cy.get('input[name="county"]').clear().type('Kent')
|
|
260
260
|
cy.get('input[name="postcode"]').clear().type('SE1 9GF')
|
|
261
|
-
cy.get('
|
|
262
|
-
|
|
261
|
+
cy.get('[data-testid="select-chevron-button"]').click({ force: true })
|
|
262
|
+
cy.get('[data-testid="United States"]').click({ multiple: true })
|
|
263
263
|
cy.get('[data-testid="primary-button"]').click()
|
|
264
264
|
cy.contains(
|
|
265
265
|
'Your address can’t contain special characters. Please try again.'
|
|
@@ -293,7 +293,8 @@ describe('My account personal details', () => {
|
|
|
293
293
|
cy.get('input[name="city"]').clear().type('London')
|
|
294
294
|
cy.get('input[name="county"]').clear().type('Kent')
|
|
295
295
|
cy.get('input[name="postcode"]').clear().type('SE1 9GF')
|
|
296
|
-
cy.get('
|
|
296
|
+
cy.get('[data-testid="select-chevron-button"]').click({ force: true })
|
|
297
|
+
cy.get('[data-testid="United States"]').click({ multiple: true })
|
|
297
298
|
|
|
298
299
|
cy.get('[data-testid="primary-button"]').click()
|
|
299
300
|
cy.contains('[data-testid="toast-container"]', 'Updating your address...')
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
describe('My account Payment page', () => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// describe('My account Payment page', () => {
|
|
2
|
+
// beforeEach(() => {
|
|
3
|
+
// cy.mockConsentAndVisit('/account/payment')
|
|
4
|
+
// })
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
// it('should load the zuora iFrame', () => {
|
|
7
|
+
// cy.get('iframe').should('exist')
|
|
8
|
+
// })
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
// it('should successully send the form', () => {
|
|
11
|
+
// if (Cypress.config('chromeWebSecurity')) {
|
|
12
|
+
// throw new Error(
|
|
13
|
+
// 'To get Zuora element `chromeWebSecurity` must be disabled'
|
|
14
|
+
// )
|
|
15
|
+
// }
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
// cy.get('iframe').should('exist')
|
|
18
|
+
// cy.getZuoraElement('input[name="field_creditCardHolderName"]').type(
|
|
19
|
+
// 'Gabriel Dimitrov'
|
|
20
|
+
// )
|
|
21
|
+
// cy.getZuoraElement('input[name="field_creditCardNumber"]').type(
|
|
22
|
+
// '4111 1111 1111 1111'
|
|
23
|
+
// )
|
|
24
|
+
// cy.getZuoraElement('input[name="field_cardSecurityCode"]').type('123')
|
|
25
|
+
// cy.getZuoraElement('input[name="field_creditCardPostalCode"]').type(
|
|
26
|
+
// 'E11 9HB'
|
|
27
|
+
// )
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
// cy.getZuoraElement('select[name="field_creditCardExpirationMonth"]').select(
|
|
30
|
+
// '11'
|
|
31
|
+
// )
|
|
32
|
+
// cy.getZuoraElement('select[name="field_creditCardExpirationYear"]').select(
|
|
33
|
+
// '2026'
|
|
34
|
+
// )
|
|
35
|
+
// cy.getZuoraElement('#submitButton').click()
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
37
|
+
// cy.contains(
|
|
38
|
+
// '[data-testid="toast-container"]',
|
|
39
|
+
// 'Your payment method has been updated'
|
|
40
|
+
// )
|
|
41
|
+
// })
|
|
42
|
+
// })
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createThemeDropdownObject } from '../createThemeDropdownObject'
|
|
2
|
+
|
|
3
|
+
describe('createThemeDropdownObject', () => {
|
|
4
|
+
const setTheme = jest.fn()
|
|
5
|
+
test('should return themeDropdownObject', () => {
|
|
6
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
7
|
+
expect(themeDropdownObject).toEqual({
|
|
8
|
+
setTheme,
|
|
9
|
+
clientHeaderImages: {
|
|
10
|
+
'The-Sun': 'display-personalDetails-header-sun.svg',
|
|
11
|
+
'Virgin-Radio': 'display-personalDetails-header-vr.svg',
|
|
12
|
+
'The-Times': 'display-personalDetails-header-times.svg',
|
|
13
|
+
},
|
|
14
|
+
clientNavigationLogos: {
|
|
15
|
+
'The-Sun': {
|
|
16
|
+
src: 'navigationPrimary-brandMark-sun.svg',
|
|
17
|
+
width: '115px',
|
|
18
|
+
top: '0',
|
|
19
|
+
},
|
|
20
|
+
'Virgin-Radio': {
|
|
21
|
+
src: 'navigationPrimary-brandMark-vr.svg',
|
|
22
|
+
width: '150px',
|
|
23
|
+
top: '0',
|
|
24
|
+
},
|
|
25
|
+
'The-Times': {
|
|
26
|
+
src: 'navigationPrimary-brandMark-times.svg',
|
|
27
|
+
width: '150px',
|
|
28
|
+
top: '0',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
options: expect.any(Object),
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UncompiledTheme } from 'newskit'
|
|
2
|
+
import {
|
|
3
|
+
sharedTheme,
|
|
4
|
+
timesTheme,
|
|
5
|
+
virginRadioTheme,
|
|
6
|
+
theSunTheme,
|
|
7
|
+
ThemeDropdownObject,
|
|
8
|
+
} from '@newskit-render/shared-components'
|
|
9
|
+
|
|
10
|
+
const clientHeaderImages = {
|
|
11
|
+
'The-Sun': 'display-personalDetails-header-sun.svg',
|
|
12
|
+
'Virgin-Radio': 'display-personalDetails-header-vr.svg',
|
|
13
|
+
'The-Times': 'display-personalDetails-header-times.svg',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const clientNavigationLogos = {
|
|
17
|
+
'The-Sun': {
|
|
18
|
+
src: 'navigationPrimary-brandMark-sun.svg',
|
|
19
|
+
width: '115px',
|
|
20
|
+
top: '0',
|
|
21
|
+
},
|
|
22
|
+
'Virgin-Radio': {
|
|
23
|
+
src: 'navigationPrimary-brandMark-vr.svg',
|
|
24
|
+
width: '150px',
|
|
25
|
+
top: '0',
|
|
26
|
+
},
|
|
27
|
+
'The-Times': {
|
|
28
|
+
src: 'navigationPrimary-brandMark-times.svg',
|
|
29
|
+
width: '150px',
|
|
30
|
+
top: '0',
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const createThemeDropdownObject = (
|
|
35
|
+
setTheme: (T: UncompiledTheme) => void
|
|
36
|
+
): ThemeDropdownObject => {
|
|
37
|
+
const themeDropdownObject = {
|
|
38
|
+
setTheme,
|
|
39
|
+
clientHeaderImages,
|
|
40
|
+
clientNavigationLogos,
|
|
41
|
+
options: {
|
|
42
|
+
sharedTheme,
|
|
43
|
+
timesTheme,
|
|
44
|
+
virginRadioTheme,
|
|
45
|
+
theSunTheme,
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
return themeDropdownObject
|
|
49
|
+
}
|
package/helpers/getUser.ts
CHANGED
package/helpers/global-types.ts
CHANGED
|
@@ -3,35 +3,6 @@ export enum ContentType {
|
|
|
3
3
|
post,
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export interface UserData {
|
|
7
|
-
firstName?: string
|
|
8
|
-
lastName?: string
|
|
9
|
-
cpn?: string
|
|
10
|
-
email?: string
|
|
11
|
-
hash?: string
|
|
12
|
-
customData?: string
|
|
13
|
-
displayName?: string
|
|
14
|
-
vxInstances?: VxInstance[]
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface VxInstance {
|
|
18
|
-
spec?: {
|
|
19
|
-
description: string
|
|
20
|
-
id: string
|
|
21
|
-
isActive: string
|
|
22
|
-
name: string
|
|
23
|
-
}
|
|
24
|
-
interactions: [SubscriptionPaymentInstance]
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface PastDue {
|
|
28
|
-
isPastDue: boolean
|
|
29
|
-
since: Date
|
|
30
|
-
}
|
|
31
|
-
export interface SubscriptionPaymentInstance {
|
|
32
|
-
pastDue: PastDue
|
|
33
|
-
}
|
|
34
|
-
|
|
35
6
|
export type RadioPost = {
|
|
36
7
|
id: number
|
|
37
8
|
type: ContentType
|
|
@@ -240,7 +240,6 @@ orbs:
|
|
|
240
240
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.NEW_RELIC_LICENSE_KEY=${NEW_RELIC_LICENSE_KEY}"' >> $BASH_ENV
|
|
241
241
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.MAIN_GRAPHQL_URL=${MAIN_GRAPHQL_URL}"' >> $BASH_ENV
|
|
242
242
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.MAIN_COOKIE_NAME=${MAIN_COOKIE_NAME}"' >> $BASH_ENV
|
|
243
|
-
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.MAIN_USER_ID=${MAIN_USER_ID}"' >> $BASH_ENV
|
|
244
243
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.MAIN_AUDIENCE=${MAIN_AUDIENCE}"' >> $BASH_ENV
|
|
245
244
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.MAIN_OAUTH_TOKEN=${MAIN_OAUTH_TOKEN}"' >> $BASH_ENV
|
|
246
245
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.MAIN_CLIENT_ID=${MAIN_CLIENT_ID}"' >> $BASH_ENV
|
|
@@ -259,6 +258,8 @@ orbs:
|
|
|
259
258
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.SN_PASSWORD=${SN_PASSWORD}"' >> $BASH_ENV
|
|
260
259
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.SN_USERNAME=${SN_USERNAME}"' >> $BASH_ENV
|
|
261
260
|
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.SN_ENVIRONMENT=${SN_ENVIRONMENT}"' >> $BASH_ENV
|
|
261
|
+
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.ZUORA_RSA_SIGNATURE_URI=${ZUORA_RSA_SIGNATURE_URI}"' >> $BASH_ENV
|
|
262
|
+
echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.OPTIMIZELY_SDK_KEY=${OPTIMIZELY_SDK_KEY}"' >> $BASH_ENV
|
|
262
263
|
echo 'export HELM_PATH="helm"' >> $BASH_ENV
|
|
263
264
|
echo 'export HELM_VALUES="--values $HELM_PATH/values-$HELM_VAL_ENV.yaml"' >> $BASH_ENV
|
|
264
265
|
echo 'export HELM_INSTALL="helm install --atomic $HELM_VALUES $HELM_OPT_SET $HELM_OPT_NAMESPACE"' >> $BASH_ENV
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@apollo/client": "3.4.16",
|
|
36
|
-
"@newskit-render/api": "^0.
|
|
37
|
-
"@newskit-render/auth": "^0.
|
|
38
|
-
"@newskit-render/checkout": "^0.
|
|
39
|
-
"@newskit-render/feature-flags": "^0.
|
|
40
|
-
"@newskit-render/my-account": "^0.
|
|
41
|
-
"@newskit-render/shared-components": "^0.
|
|
42
|
-
"@newskit-render/sitemap": "^0.
|
|
43
|
-
"@newskit-render/validation": "^0.
|
|
36
|
+
"@newskit-render/api": "^0.15.0",
|
|
37
|
+
"@newskit-render/auth": "^0.29.0",
|
|
38
|
+
"@newskit-render/checkout": "^0.24.2",
|
|
39
|
+
"@newskit-render/feature-flags": "^0.11.0",
|
|
40
|
+
"@newskit-render/my-account": "^0.143.0",
|
|
41
|
+
"@newskit-render/shared-components": "^0.37.2",
|
|
42
|
+
"@newskit-render/sitemap": "^0.35.0",
|
|
43
|
+
"@newskit-render/validation": "^0.37.0",
|
|
44
44
|
"cross-fetch": "3.1.5",
|
|
45
45
|
"graphql": "15.6.0",
|
|
46
46
|
"newrelic": "7.1.0",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import newrelic from 'newrelic'
|
|
3
3
|
import { createApolloClient, ClientTypes } from '@newskit-render/api'
|
|
4
|
+
import { UserData } from '@newskit-render/my-account'
|
|
4
5
|
import { GET_UNIVERSAL_ARTICLE } from '../../../queries'
|
|
5
6
|
import ArticlePage, { UniversalArticle } from '../../../components/article'
|
|
6
7
|
import { highlights, relatedArticles } from '../../../helpers/mocks/articleMock'
|
|
7
|
-
import { UserData } from '../../../helpers/global-types'
|
|
8
8
|
// import { fetchUser } from '../../../helpers/getUser'
|
|
9
9
|
// import { ACCOUNT_QUERY_URL } from '../../../constants'
|
|
10
10
|
import { addCacheHeaders } from '../../../helpers/addCacheHeaders'
|
|
@@ -2,10 +2,18 @@ import React, { useContext } from 'react'
|
|
|
2
2
|
import { Cancellation, getProviderProps } from '@newskit-render/my-account'
|
|
3
3
|
import newrelic from 'newrelic'
|
|
4
4
|
import { AppContext } from '../../../app-context/AppContext'
|
|
5
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
5
6
|
|
|
6
7
|
const AccountCancellation = (props) => {
|
|
7
8
|
const { theme, setTheme } = useContext(AppContext)
|
|
8
|
-
|
|
9
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
10
|
+
return (
|
|
11
|
+
<Cancellation
|
|
12
|
+
{...props}
|
|
13
|
+
customTheme={theme}
|
|
14
|
+
themeDropdownObject={themeDropdownObject}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
export default AccountCancellation
|
|
@@ -8,10 +8,12 @@ import {
|
|
|
8
8
|
} from '@newskit-render/my-account'
|
|
9
9
|
import validation from '../../../validation'
|
|
10
10
|
import { AppContext } from '../../../app-context/AppContext'
|
|
11
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
11
12
|
|
|
12
13
|
const AccountEditField = (props) => {
|
|
13
14
|
const doesEditPageExist = Object.keys(componentMap).includes(props.data.type)
|
|
14
15
|
const { theme, setTheme } = useContext(AppContext)
|
|
16
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
15
17
|
|
|
16
18
|
if (doesEditPageExist) {
|
|
17
19
|
return (
|
|
@@ -19,7 +21,7 @@ const AccountEditField = (props) => {
|
|
|
19
21
|
{...props}
|
|
20
22
|
validation={validation}
|
|
21
23
|
customTheme={theme}
|
|
22
|
-
|
|
24
|
+
themeDropdownObject={themeDropdownObject}
|
|
23
25
|
/>
|
|
24
26
|
)
|
|
25
27
|
}
|
package/pages/account/index.tsx
CHANGED
|
@@ -2,10 +2,18 @@ import newrelic from 'newrelic'
|
|
|
2
2
|
import { PersonalDetails, getProviderProps } from '@newskit-render/my-account'
|
|
3
3
|
import React, { useContext } from 'react'
|
|
4
4
|
import { AppContext } from '../../app-context/AppContext'
|
|
5
|
+
import { createThemeDropdownObject } from '../../helpers/createThemeDropdownObject'
|
|
5
6
|
|
|
6
7
|
const AccountPersonalDetails = (props) => {
|
|
7
8
|
const { theme, setTheme } = useContext(AppContext)
|
|
8
|
-
|
|
9
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
10
|
+
return (
|
|
11
|
+
<PersonalDetails
|
|
12
|
+
{...props}
|
|
13
|
+
customTheme={theme}
|
|
14
|
+
themeDropdownObject={themeDropdownObject}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
export default AccountPersonalDetails
|
|
@@ -5,11 +5,17 @@ import {
|
|
|
5
5
|
import newrelic from 'newrelic'
|
|
6
6
|
import React, { useContext } from 'react'
|
|
7
7
|
import { AppContext } from '../../../app-context/AppContext'
|
|
8
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
8
9
|
|
|
9
10
|
const AccountNewslettersAndAlerts = (props) => {
|
|
10
11
|
const { theme, setTheme } = useContext(AppContext)
|
|
12
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
11
13
|
return (
|
|
12
|
-
<NewslettersAndAlerts
|
|
14
|
+
<NewslettersAndAlerts
|
|
15
|
+
{...props}
|
|
16
|
+
customTheme={theme}
|
|
17
|
+
themeDropdownObject={themeDropdownObject}
|
|
18
|
+
/>
|
|
13
19
|
)
|
|
14
20
|
}
|
|
15
21
|
|
|
@@ -6,10 +6,18 @@ import {
|
|
|
6
6
|
} from '@newskit-render/my-account'
|
|
7
7
|
import React, { useContext } from 'react'
|
|
8
8
|
import { AppContext } from '../../../app-context/AppContext'
|
|
9
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
9
10
|
|
|
10
11
|
const AccountCancellation = (props) => {
|
|
11
12
|
const { theme, setTheme } = useContext(AppContext)
|
|
12
|
-
|
|
13
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
14
|
+
return (
|
|
15
|
+
<Payment
|
|
16
|
+
{...props}
|
|
17
|
+
customTheme={theme}
|
|
18
|
+
themeDropdownObject={themeDropdownObject}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
export default AccountCancellation
|
|
@@ -5,14 +5,16 @@ import {
|
|
|
5
5
|
import newrelic from 'newrelic'
|
|
6
6
|
import React, { useContext } from 'react'
|
|
7
7
|
import { AppContext } from '../../../app-context/AppContext'
|
|
8
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
8
9
|
|
|
9
10
|
const AccountSubscriptionAndBilling = (props) => {
|
|
10
11
|
const { theme, setTheme } = useContext(AppContext)
|
|
12
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
11
13
|
return (
|
|
12
14
|
<SubscriptionAndBilling
|
|
13
15
|
{...props}
|
|
14
16
|
customTheme={theme}
|
|
15
|
-
|
|
17
|
+
themeDropdownObject={themeDropdownObject}
|
|
16
18
|
/>
|
|
17
19
|
)
|
|
18
20
|
}
|
package/pages/api/sitemap.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { NextApiRequest, NextApiResponse } from 'next'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
genericSitemap,
|
|
4
|
+
PublisherGroup,
|
|
5
|
+
CustomStaticPage,
|
|
6
|
+
} from '@newskit-render/sitemap'
|
|
3
7
|
|
|
8
|
+
const defaultCustomStaticPagesCollection: CustomStaticPage[] = [
|
|
9
|
+
{
|
|
10
|
+
channel: 'test-custom-page',
|
|
11
|
+
},
|
|
12
|
+
]
|
|
4
13
|
const handler = async (req: NextApiRequest, res: NextApiResponse) =>
|
|
5
14
|
genericSitemap({
|
|
6
15
|
res,
|
|
@@ -9,6 +18,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) =>
|
|
|
9
18
|
domain: new URL(process.env.SITE_HOST as string).host,
|
|
10
19
|
firstArticleDate: process.env.SITEMAP_FIRST_PUBLICATION_DATE as string,
|
|
11
20
|
publicationName: process.env.SITEMAP_PUBLICATION_NAME as string,
|
|
21
|
+
customStaticPageCollection: defaultCustomStaticPagesCollection,
|
|
12
22
|
})
|
|
13
23
|
|
|
14
24
|
export default handler
|
|
@@ -2,14 +2,16 @@ import { AccountCreation, getProviderProps } from '@newskit-render/checkout'
|
|
|
2
2
|
import React, { useContext } from 'react'
|
|
3
3
|
import { AppContext } from '../../../app-context/AppContext'
|
|
4
4
|
import validation from '../../../validation'
|
|
5
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
5
6
|
|
|
6
7
|
const AccountCreationPage = (props) => {
|
|
7
8
|
const { theme, setTheme } = useContext(AppContext)
|
|
9
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
8
10
|
return (
|
|
9
11
|
<AccountCreation
|
|
10
12
|
{...props}
|
|
11
13
|
customTheme={theme}
|
|
12
|
-
|
|
14
|
+
themeDropdownObject={themeDropdownObject}
|
|
13
15
|
validation={validation}
|
|
14
16
|
/>
|
|
15
17
|
)
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { PaymentDetails, getProviderProps } from '@newskit-render/checkout'
|
|
2
2
|
import React, { useContext } from 'react'
|
|
3
3
|
import { AppContext } from '../../../app-context/AppContext'
|
|
4
|
+
import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
|
|
4
5
|
|
|
5
6
|
const PaymentDetailsPage = (props) => {
|
|
6
7
|
const { theme, setTheme } = useContext(AppContext)
|
|
7
|
-
|
|
8
|
+
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
9
|
+
return (
|
|
10
|
+
<PaymentDetails
|
|
11
|
+
{...props}
|
|
12
|
+
customTheme={theme}
|
|
13
|
+
themeDropdownObject={themeDropdownObject}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
export default PaymentDetailsPage
|