@newskit-render/core 0.138.1 → 1.4.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 CHANGED
@@ -3,6 +3,150 @@
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.4.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.3.4...@newskit-render/core@1.4.0) (2021-11-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * Stop storing cancellation reason in local storage ([#517](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/517)) ([8d602db](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/8d602db6fa16078f792f543d5715815cc202822c))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.3.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.3.3...@newskit-render/core@1.3.4) (2021-11-23)
18
+
19
+ **Note:** Version bump only for package @newskit-render/core
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.3.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.3.2...@newskit-render/core@1.3.3) (2021-11-23)
26
+
27
+ **Note:** Version bump only for package @newskit-render/core
28
+
29
+
30
+
31
+
32
+
33
+ ## [1.3.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.3.1...@newskit-render/core@1.3.2) (2021-11-22)
34
+
35
+ **Note:** Version bump only for package @newskit-render/core
36
+
37
+
38
+
39
+
40
+
41
+ ## [1.3.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.3.0...@newskit-render/core@1.3.1) (2021-11-22)
42
+
43
+ **Note:** Version bump only for package @newskit-render/core
44
+
45
+
46
+
47
+
48
+
49
+ # [1.3.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.2.4...@newskit-render/core@1.3.0) (2021-11-22)
50
+
51
+
52
+ ### Features
53
+
54
+ * **PPDSR-0:** fix broken dependecy ([#521](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/521)) ([2690dd3](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/2690dd3bc6cf61a88740a0ff935adf461be02416))
55
+
56
+
57
+
58
+
59
+
60
+ ## [1.2.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.2.3...@newskit-render/core@1.2.4) (2021-11-18)
61
+
62
+
63
+ ### Reverts
64
+
65
+ * Revert "fix(PPDSR-541): switch packages to es modules (#512)" (#516) ([fd719ba](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/fd719badac7578473e2bb991530277bb09ec2057)), closes [#512](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/512) [#516](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/516)
66
+
67
+
68
+
69
+
70
+
71
+ ## [1.2.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.2.2...@newskit-render/core@1.2.3) (2021-11-18)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * **PPDSR-541:** switch packages to es modules ([#512](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/512)) ([937e57c](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/937e57cb891b366b8f3c2f73c6b88abffef0ea7a))
77
+
78
+
79
+
80
+
81
+
82
+ ## [1.2.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.2.1...@newskit-render/core@1.2.2) (2021-11-18)
83
+
84
+ **Note:** Version bump only for package @newskit-render/core
85
+
86
+
87
+
88
+
89
+
90
+ ## [1.2.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.2.0...@newskit-render/core@1.2.1) (2021-11-18)
91
+
92
+ **Note:** Version bump only for package @newskit-render/core
93
+
94
+
95
+
96
+
97
+
98
+ # [1.2.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.1.0...@newskit-render/core@1.2.0) (2021-11-17)
99
+
100
+
101
+ ### Features
102
+
103
+ * **PPDSR-502:** Move cache version into circle ci context ([#503](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/503)) ([7d03acc](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/7d03acca296b9247de3ac84a6e6692eee7a7bb4f))
104
+
105
+
106
+
107
+
108
+
109
+ # [1.1.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@0.139.0...@newskit-render/core@1.1.0) (2021-11-17)
110
+
111
+
112
+ ### Features
113
+
114
+ * **PPDSR-403:** bump core major version ([#511](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/511)) ([cbdcace](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/cbdcace5107ee3d036f55d55fcd3d6db3336cd1a))
115
+
116
+
117
+
118
+
119
+
120
+ # [0.139.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@0.138.3...@newskit-render/core@0.139.0) (2021-11-16)
121
+
122
+
123
+ * feat(PPDSR-403)!: bump core major version (#502) ([595b60e](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/595b60e3ae6267b177b00a1dccab08d48f7ce2c7)), closes [#502](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/502)
124
+
125
+
126
+ ### BREAKING CHANGES
127
+
128
+ * core now uses @newskit-render/api for setting up apollo client
129
+
130
+
131
+
132
+
133
+
134
+ ## [0.138.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@0.138.2...@newskit-render/core@0.138.3) (2021-11-16)
135
+
136
+ **Note:** Version bump only for package @newskit-render/core
137
+
138
+
139
+
140
+
141
+
142
+ ## [0.138.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@0.138.1...@newskit-render/core@0.138.2) (2021-11-15)
143
+
144
+ **Note:** Version bump only for package @newskit-render/core
145
+
146
+
147
+
148
+
149
+
6
150
  ## [0.138.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@0.138.0...@newskit-render/core@0.138.1) (2021-11-15)
7
151
 
8
152
 
package/README.md CHANGED
@@ -26,11 +26,12 @@ npm start
26
26
  ## Ads Library
27
27
 
28
28
  Reach out to the Commercial team to discuss the ad slots names and to get a custom `ads.min.js` file which should be placed in the public directory / or ur to file on their CDN.
29
+
29
30
  More information on the names of the slots can be found here: `https://nidigitalsolutions.jira.com/wiki/spaces/COMM/pages/2370339149/Naming+convention+for+Ad+slots`
30
31
 
31
32
  The ad slots should be placed as an id propery of the component.
32
33
 
33
- In order to test the ads locally you should enable SourcePoint integration and add new entry on your host file,
34
+ In order to test ads locally you should enable SourcePoint integration and add a new entry on your host file,
34
35
  e.g. 127.0.0.1 newskit.render.
35
36
 
36
37
  ```
@@ -68,7 +68,7 @@ const pastDueBanner = {
68
68
  },
69
69
  cancelled: {
70
70
  title: 'Your subscription has been cancelled.',
71
- text: 'You will lose access to all benefits on ##DATE##. To re-activate your subscription call 0800 555 1234.',
71
+ text: 'You’ll no longer have access to subscription benefits. To re-activate call 0800 555 1234.',
72
72
  },
73
73
  treshold: {
74
74
  firstNotice: 26,
@@ -345,8 +345,8 @@ orbs:
345
345
  - checkout
346
346
  - restore_cache:
347
347
  keys:
348
- - <% PACKAGE_MANAGER >-build-v1-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
349
- - <% PACKAGE_MANAGER >-build-v1-
348
+ - <% PACKAGE_MANAGER >-build-{{ .Environment.BUILD_CACHE_VERSION }}-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
349
+ - <% PACKAGE_MANAGER >-build-{{ .Environment.BUILD_CACHE_VERSION }}-
350
350
  - attach_workspace:
351
351
  at: ~/project
352
352
  - run:
@@ -356,14 +356,14 @@ orbs:
356
356
  name: 'Build the project'
357
357
  command: <% PACKAGE_RUN > build
358
358
  - save_cache:
359
- key: <% PACKAGE_MANAGER >-build-v1-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
359
+ key: <% PACKAGE_MANAGER >-build-{{ .Environment.BUILD_CACHE_VERSION }}-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
360
360
  paths:
361
361
  - ~/.cache/yarn
362
362
  - ~/.npm
363
363
  - node_modules
364
364
  - .next/cache
365
365
  - save_cache:
366
- key: cypress-v1-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
366
+ key: cypress-{{ .Environment.CYPRESS_CACHE_VERSION }}-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
367
367
  paths:
368
368
  - ~/.cache/Cypress
369
369
  - run:
@@ -395,11 +395,11 @@ orbs:
395
395
  at: ~/project
396
396
  - restore_cache:
397
397
  keys:
398
- - <% PACKAGE_MANAGER >-build-v1-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
398
+ - <% PACKAGE_MANAGER >-build-{{ .Environment.BUILD_CACHE_VERSION }}-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
399
399
  - restore_cache:
400
400
  keys:
401
- - cypress-v1-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
402
- - cypress-v1-
401
+ - cypress-{{ .Environment.CYPRESS_CACHE_VERSION }}-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
402
+ - cypress-{{ .Environment.CYPRESS_CACHE_VERSION }}-
403
403
  - run:
404
404
  name: 'Export Newskit API variables'
405
405
  command: |
@@ -437,7 +437,7 @@ orbs:
437
437
  at: ~/project
438
438
  - restore_cache:
439
439
  keys:
440
- - <% PACKAGE_MANAGER >-build-v1-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
440
+ - <% PACKAGE_MANAGER >-build-{{ .Environment.BUILD_CACHE_VERSION }}-{{ checksum "<% PACKAGE_MANAGER_LOCK_FILE >" }}
441
441
  - setup_remote_docker
442
442
  - run:
443
443
  name: Install aws cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "0.138.1",
3
+ "version": "1.4.0",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -28,21 +28,22 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@apollo/client": "^3.4.16",
31
- "@newskit-render/api": "^0.3.0",
32
- "@newskit-render/auth": "^0.21.0",
33
- "@newskit-render/checkout": "^0.4.0",
34
- "@newskit-render/my-account": "^0.104.1",
35
- "@newskit-render/shared-components": "^0.8.0",
36
- "@newskit-render/sitemap": "^0.24.0",
37
- "@newskit-render/validation": "^0.24.0",
31
+ "@newskit-render/api": "^0.4.0",
32
+ "@newskit-render/auth": "^0.22.0",
33
+ "@newskit-render/checkout": "^0.5.0",
34
+ "@newskit-render/my-account": "^0.108.0",
35
+ "@newskit-render/shared-components": "^0.10.0",
36
+ "@newskit-render/sitemap": "^0.25.0",
37
+ "@newskit-render/validation": "^0.26.0",
38
38
  "cross-fetch": "^3.1.4",
39
39
  "graphql": "^15.6.0",
40
40
  "newrelic": "^7.1.0",
41
- "newskit": "^4.0.1",
41
+ "newskit": "4.0.1",
42
42
  "next": "^12.0.2",
43
43
  "react": "^17.0.1",
44
44
  "react-dom": "^17.0.2",
45
45
  "react-helmet": "^6.1.0",
46
+ "react-hook-form": "7.8.4",
46
47
  "striptags": "^3.1.1"
47
48
  },
48
49
  "devDependencies": {
@@ -85,5 +86,8 @@
85
86
  },
86
87
  "publishConfig": {
87
88
  "access": "public"
89
+ },
90
+ "resolutions": {
91
+ "newskit/react-hook-form": "7.8.4"
88
92
  }
89
93
  }
package/temp/header.tsx CHANGED
@@ -103,7 +103,7 @@ const pastDueBanner = {
103
103
  },
104
104
  cancelled: {
105
105
  title: 'Your subscription has been cancelled.',
106
- text: 'You will lose access to all benefits on ##DATE##. To re-activate your subscription call 0800 555 1234.',
106
+ text: 'You’ll no longer have access to subscription benefits. To re-activate call 0800 555 1234.',
107
107
  },
108
108
  treshold: {
109
109
  firstNotice: 26,
@@ -152,87 +152,87 @@ const Header: React.FC<{ user: UserData }> = ({ user }) => {
152
152
 
153
153
  return (
154
154
  <>
155
- <StyledHeader aria-label="StyledHeader">
156
- <MainGrid>
157
- <Cell xs={12}>
158
- <Stack
159
- flow="horizontal-center"
160
- stackDistribution="space-between"
161
- wrap="nowrap"
162
- >
163
- <NextLink
164
- type="standalone"
165
- overrides={{ stylePreset: 'linkStandaloneInverse' }}
166
- href="/"
167
- aria-label="Logo Link"
168
- >
169
- <Visible md lg xl>
170
- <NewsKitLogoFull color="white" size="sizing120" />
171
- </Visible>
172
- <Visible xs sm>
173
- <NewsKitLogoShort color="white" size="sizing120" />
174
- </Visible>
175
- </NextLink>
155
+ <StyledHeader aria-label="StyledHeader">
156
+ <MainGrid>
157
+ <Cell xs={12}>
176
158
  <Stack
177
159
  flow="horizontal-center"
178
- stackDistribution="flex-end"
160
+ stackDistribution="space-between"
179
161
  wrap="nowrap"
180
162
  >
181
- <NavigationContainer show={showMenu}>
182
- <Navigation>
183
- {showMenu && (
184
- <Block
185
- spaceStack="space050"
186
- data-testid="mobile-block-space"
163
+ <NextLink
164
+ type="standalone"
165
+ overrides={{ stylePreset: 'linkStandaloneInverse' }}
166
+ href="/"
167
+ aria-label="Logo Link"
168
+ >
169
+ <Visible md lg xl>
170
+ <NewsKitLogoFull color="white" size="sizing120" />
171
+ </Visible>
172
+ <Visible xs sm>
173
+ <NewsKitLogoShort color="white" size="sizing120" />
174
+ </Visible>
175
+ </NextLink>
176
+ <Stack
177
+ flow="horizontal-center"
178
+ stackDistribution="flex-end"
179
+ wrap="nowrap"
180
+ >
181
+ <NavigationContainer show={showMenu}>
182
+ <Navigation>
183
+ {showMenu && (
184
+ <Block
185
+ spaceStack="space050"
186
+ data-testid="mobile-block-space"
187
+ />
188
+ )}
189
+ <NavButton
190
+ buttonText="Section One"
191
+ href="/section-one"
192
+ isMobile={showMenu}
193
+ ariaLabel="Section One Link"
194
+ />
195
+ <NavButton
196
+ buttonText="Section Two"
197
+ href="/section-two"
198
+ isMobile={showMenu}
199
+ ariaLabel="Section Two Link"
200
+ />
201
+ <NavButton
202
+ buttonText="Section Three"
203
+ href="/section-three"
204
+ isMobile={showMenu}
205
+ ariaLabel="Section Three Link"
206
+ />
207
+ </Navigation>
208
+ </NavigationContainer>
209
+ <Visible xs sm>
210
+ <Block spaceInline="space050">
211
+ <IconFilledMenu
212
+ overrides={{
213
+ size: 'iconSize030',
214
+ stylePreset: 'linkStandaloneInverse',
215
+ }}
216
+ onClick={mobileMenuControl}
217
+ onKeyDown={handleEnterKeyPress(mobileMenuControl)}
218
+ role="button"
219
+ tabIndex={0}
220
+ aria-label="Mobile Menu Button"
221
+ data-testid="mobile-menu-btn"
187
222
  />
188
- )}
189
- <NavButton
190
- buttonText="Section One"
191
- href="/section-one"
192
- isMobile={showMenu}
193
- ariaLabel="Section One Link"
194
- />
195
- <NavButton
196
- buttonText="Section Two"
197
- href="/section-two"
198
- isMobile={showMenu}
199
- ariaLabel="Section Two Link"
200
- />
201
- <NavButton
202
- buttonText="Section Three"
203
- href="/section-three"
204
- isMobile={showMenu}
205
- ariaLabel="Section Three Link"
206
- />
207
- </Navigation>
208
- </NavigationContainer>
209
- <Visible xs sm>
210
- <Block spaceInline="space050">
211
- <IconFilledMenu
212
- overrides={{
213
- size: 'iconSize030',
214
- stylePreset: 'linkStandaloneInverse',
215
- }}
216
- onClick={mobileMenuControl}
217
- onKeyDown={handleEnterKeyPress(mobileMenuControl)}
218
- role="button"
219
- tabIndex={0}
220
- aria-label="Mobile Menu Button"
221
- data-testid="mobile-menu-btn"
222
- />
223
- </Block>
224
- </Visible>
223
+ </Block>
224
+ </Visible>
225
+ </Stack>
225
226
  </Stack>
226
- </Stack>
227
- </Cell>
228
- </MainGrid>
229
- </StyledHeader>
230
- <PastDueBannerExternal
231
- pastDueBanner={pastDueBanner}
232
- vxInstances={user?.vxInstances}
233
- wrapper={BannerContainer}
234
- />
235
- </>
227
+ </Cell>
228
+ </MainGrid>
229
+ </StyledHeader>
230
+ <PastDueBannerExternal
231
+ pastDueBanner={pastDueBanner}
232
+ vxInstances={user?.vxInstances}
233
+ wrapper={BannerContainer}
234
+ />
235
+ </>
236
236
  )
237
237
  }
238
238