@newskit-render/core 1.29.4 → 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 +19 -0
- package/__tests__/pages/[articleSlug].test.tsx +2 -15
- package/components/article/index.tsx +1 -1
- package/components/header/index.tsx +8 -3
- package/components/layout/LayoutTemplate.tsx +1 -1
- package/components/layout/layoutTypes.ts +1 -1
- package/components/section/index.tsx +2 -2
- package/helpers/getUser.ts +1 -1
- package/helpers/global-types.ts +0 -29
- package/infrastructure/.circleci/config.yml +0 -1
- package/package.json +3 -3
- package/pages/[section]/[articleId]/[articleSlug].tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
|
|
6
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)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -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,
|
|
@@ -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'
|
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
|
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",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@newskit-render/auth": "^0.29.0",
|
|
38
38
|
"@newskit-render/checkout": "^0.24.2",
|
|
39
39
|
"@newskit-render/feature-flags": "^0.11.0",
|
|
40
|
-
"@newskit-render/my-account": "^0.
|
|
40
|
+
"@newskit-render/my-account": "^0.143.0",
|
|
41
41
|
"@newskit-render/shared-components": "^0.37.2",
|
|
42
42
|
"@newskit-render/sitemap": "^0.35.0",
|
|
43
|
-
"@newskit-render/validation": "^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'
|