@newskit-render/core 2.4.0 → 2.5.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,14 @@
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
+ # [2.5.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.5.0-alpha.0...@newskit-render/core@2.5.0) (2022-10-12)
7
+
8
+ **Note:** Version bump only for package @newskit-render/core
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.4.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.4.0-alpha.0...@newskit-render/core@2.4.0) (2022-10-11)
7
15
 
8
16
  **Note:** Version bump only for package @newskit-render/core
@@ -1,17 +1,30 @@
1
1
  //Note: Check periodically if these consent cookie values exprire
2
2
  import _ from 'lodash'
3
- const nuktSPConsentValue = 'JABCDEFGHI'
4
- const consentUUIDValue = 'ff8ac797-02c4-4fb4-81f2-22f8ba2e8723_8'
3
+ import {
4
+ nuktSPConsentValue,
5
+ consentUUIDValue,
6
+ _sp_local_state,
7
+ _sp_user_consent_7377,
8
+ _sp_non_keyed_local_state,
9
+ } from './consentValues'
10
+
11
+ const setConentLocalStorage = () => {
12
+ localStorage.setItem('_sp_local_state', JSON.stringify(_sp_local_state))
13
+ localStorage.setItem('_sp_user_consent_7377', JSON.stringify(_sp_user_consent_7377))
14
+ localStorage.setItem('_sp_non_keyed_local_state', JSON.stringify(_sp_non_keyed_local_state))
15
+ }
5
16
 
6
17
  Cypress.Commands.add('mockConsentAndVisit', (url) => {
7
18
  cy.setCookie('nukt_sp_consent', nuktSPConsentValue)
8
19
  cy.setCookie('consentUUID', consentUUIDValue)
20
+ setConentLocalStorage()
9
21
  cy.visit(url)
10
22
  })
11
23
 
12
24
  Cypress.Commands.add('mockConsent', () => {
13
25
  cy.setCookie('nukt_sp_consent', nuktSPConsentValue)
14
26
  cy.setCookie('consentUUID', consentUUIDValue)
27
+ setConentLocalStorage()
15
28
  })
16
29
 
17
30
  const userMap = {
@@ -0,0 +1,392 @@
1
+ export const nuktSPConsentValue = 'JABCDEFGHI'
2
+
3
+ export const consentUUIDValue = 'f5e9a5b9-3468-4d4e-8380-138fc864f19a_12'
4
+
5
+ export const _sp_local_state = {
6
+ "gdpr": {
7
+ "mmsCookies": [
8
+ "_sp_v1_ss=1:H4sIAAAAAAAAAItWqo5RKimOUbKKBjLyQAyD2lidGKVUEDOvNCcHyC4BK6iurVWKBQAW54XRMAAAAA%3D%3D"
9
+ ],
10
+ "propertyId": 7377,
11
+ "messageId": 565369
12
+ }
13
+ }
14
+
15
+ export const _sp_user_consent_7377 = {
16
+ "actions": [
17
+ {
18
+ "_id": "61fa905112228108ab6be61f",
19
+ "type": "inline",
20
+ "url": "",
21
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'J';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
22
+ "tagManager": null
23
+ },
24
+ {
25
+ "_id": "61fa905112228108ab6be627",
26
+ "type": "inline",
27
+ "url": "",
28
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'A';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
29
+ "tagManager": null
30
+ },
31
+ {
32
+ "_id": "61fa905112228108ab6be62f",
33
+ "type": "inline",
34
+ "url": "",
35
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'B';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
36
+ "tagManager": null
37
+ },
38
+ {
39
+ "_id": "61fa905112228108ab6be637",
40
+ "type": "inline",
41
+ "url": "",
42
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'C';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
43
+ "tagManager": null
44
+ },
45
+ {
46
+ "_id": "61fa905112228108ab6be63f",
47
+ "type": "inline",
48
+ "url": "",
49
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'D';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
50
+ "tagManager": null
51
+ },
52
+ {
53
+ "_id": "61fa905112228108ab6be647",
54
+ "type": "inline",
55
+ "url": "",
56
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'E';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
57
+ "tagManager": null
58
+ },
59
+ {
60
+ "_id": "61fa905112228108ab6be64f",
61
+ "type": "inline",
62
+ "url": "",
63
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'F';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
64
+ "tagManager": null
65
+ },
66
+ {
67
+ "_id": "61fa905112228108ab6be657",
68
+ "type": "inline",
69
+ "url": "",
70
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'G';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
71
+ "tagManager": null
72
+ },
73
+ {
74
+ "_id": "61fa905112228108ab6be65f",
75
+ "type": "inline",
76
+ "url": "",
77
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'H';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
78
+ "tagManager": null
79
+ },
80
+ {
81
+ "_id": "61fa905112228108ab6be667",
82
+ "type": "inline",
83
+ "url": "",
84
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'I';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}\r\n\r\n// manage the cookie for Tealium\r\n// update the cookie and set the expiry date for it to THREE YEARS\r\nlet now = new Date();\r\nlet time = now.getTime();\r\ntime += 94608000000; // three years later\r\nnow.setTime(time);\r\n// drop the cookie\r\ndocument.cookie = 'nukt_sp_consent=' + encodeURIComponent( window.nonIabPurposeConsents ) + ';expires='+now.toGMTString()+';path=/';\r\n// update Tealium data layer, if existing\r\nif( typeof utag_data !== 'undefined' ) { utag_data['cp.nukt_sp_consent'] = window.nonIabPurposeConsents; }\r\nif( ( typeof utag !== 'undefined' ) && ( typeof utag.data !== 'undefined' ) ) { utag.data['cp.nukt_sp_consent'] = window.nonIabPurposeConsents; }\r\n\r\n// clear the queue of Tealium calls, if needed\r\nif( ( typeof window.nukt_cmp !== 'undefined' ) && ( typeof window.nukt_cmp.flushQueue !== 'undefined' ) ) {\r\n window.nukt_cmp.flushQueue();\r\n}\r\n\r\n\r\n\r\n// code to handle the cookie V2 for new Tealium integration\r\nif( ( typeof _sp_ !== 'undefined' ) && ( typeof _sp_.getCustomVendorConsents === 'function' ) ) {\r\n\r\n _sp_.getCustomVendorConsents( function( v, success ) {\r\n if( success ) {\r\n // consent information is available\r\n\t // read the data structure and set the flags\r\n\t var f = '';\r\n\t if( typeof v.consentedPurposes !== 'undefined' &&\r\n\t v.consentedPurposes.constructor === Array &&\r\n\t\t v.consentedPurposes.length > 0 ) {\r\n\t for( var i = 0; i < v.consentedPurposes.length; i++ ) {\r\n\r\n switch( v.consentedPurposes[i]._id.toLowerCase() ) {\r\n\t\t case '5ff72d5ebdf037283e40a4c2': f += 'A'; break; \r\n\t\t case '5ff72d5ebdf037283e40a4c7': f += 'B'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c1': f += 'C'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c6': f += 'D'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38cb': f += 'E'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d0': f += 'F'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d5': f += 'G'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38da': f += 'H'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38df': f += 'I'; break;\r\n\t\t\tcase '5ff72d5ebdf037283e40a4bd': f += 'J'; break;\r\n\t\t }\r\n\r\n\t\t}\r\n\t }\r\n\t f = f + '|';\r\n\t if( typeof v.legIntPurposes !== 'undefined' &&\r\n\t v.legIntPurposes.constructor === Array &&\r\n\t\t v.legIntPurposes.length > 0 ) {\r\n\t for(var j = 0; j < v.legIntPurposes.length; j++ ) {\r\n\t\t\t\r\n switch( v.legIntPurposes[j]._id.toLowerCase() ) {\r\n\t\t case '5ff72d5ebdf037283e40a4c2': f += 'N'; break; \r\n\t\t case '5ff72d5ebdf037283e40a4c7': f += 'O'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c1': f += 'P'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c6': f += 'Q'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38cb': f += 'R'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d0': f += 'S'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d5': f += 'T'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38da': f += 'U'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38df': f += 'V'; break;\r\n\t\t }\r\n\t\t\t\r\n\t\t}\r\n }\r\n\t \r\n\t // update the cookie V2 with the overall consent information\r\n now = new Date();\r\n time = now.getTime();\r\n time += 94608000000; // three years later\r\n now.setTime(time);\r\n // drop the cookie\r\n document.cookie = 'nukt_sp_consent_v2=' + encodeURIComponent(f) + ';expires=' + now.toGMTString() + ';path=/';\r\n\t \r\n\t // update Tealium data layer, if existing\r\n if( typeof utag_data !== 'undefined' ) {\r\n utag_data['cp.nukt_sp_consent_v2'] = f;\r\n }\r\n if( typeof utag !== 'undefined' && typeof utag.data !== 'undefined' ) {\r\n utag.data['cp.nukt_sp_consent_v2'] = f;\r\n }\r\n \r\n\t // clear the queue of Tealium calls, if needed\r\n if( ( typeof window.nukt_cmp !== 'undefined' ) && ( typeof window.nukt_cmp.flushQueueV2 !== 'undefined' ) ) {\r\n window.nukt_cmp.flushQueueV2();\r\n }\r\n }\r\n });\r\n}\r\n\r\n\r\n",
85
+ "tagManager": null
86
+ }
87
+ ],
88
+ "addtlConsent": "1~",
89
+ "consentStatus": {
90
+ "rejectedAny": false,
91
+ "rejectedLI": false,
92
+ "consentedAll": true,
93
+ "granularStatus": {
94
+ "vendorConsent": "ALL",
95
+ "vendorLegInt": "EMPTY_VL",
96
+ "purposeConsent": "ALL",
97
+ "purposeLegInt": "EMPTY_VL",
98
+ "previousOptInAll": false,
99
+ "defaultConsent": false
100
+ },
101
+ "hasConsentData": true,
102
+ "consentedToAny": true
103
+ },
104
+ "consentUUID": "f5e9a5b9-3468-4d4e-8380-138fc864f19a_12",
105
+ "customVendorsResponse": {
106
+ "consentedVendors": [
107
+ {
108
+ "_id": "5e7f6927b8e05c1c467daa5d",
109
+ "name": "Branch Metrics, Inc.",
110
+ "vendorType": "CUSTOM"
111
+ },
112
+ {
113
+ "_id": "5f745ab96f3aae0163740409",
114
+ "name": "Ipsos MORI",
115
+ "vendorType": "CUSTOM"
116
+ }
117
+ ],
118
+ "consentedPurposes": [
119
+ {
120
+ "_id": "5ff72d5ebdf037283e40a4bd",
121
+ "name": "Store and/or access information on a device"
122
+ },
123
+ {
124
+ "_id": "5ff72d5ebdf037283e40a4c2",
125
+ "name": "Select personalised content"
126
+ },
127
+ {
128
+ "_id": "5ff72d5ebdf037283e40a4c7",
129
+ "name": "Select personalised ads"
130
+ },
131
+ {
132
+ "_id": "6014443f87b0803b0f3e38c1",
133
+ "name": "Select basic ads"
134
+ },
135
+ {
136
+ "_id": "6014443f87b0803b0f3e38c6",
137
+ "name": "Create a personalised ads profile"
138
+ },
139
+ {
140
+ "_id": "6014443f87b0803b0f3e38cb",
141
+ "name": "Create a personalised content profile"
142
+ },
143
+ {
144
+ "_id": "6014443f87b0803b0f3e38d0",
145
+ "name": "Measure ad performance"
146
+ },
147
+ {
148
+ "_id": "6014443f87b0803b0f3e38d5",
149
+ "name": "Measure content performance"
150
+ },
151
+ {
152
+ "_id": "6014443f87b0803b0f3e38da",
153
+ "name": "Apply market research to generate audience insights"
154
+ },
155
+ {
156
+ "_id": "6014443f87b0803b0f3e38df",
157
+ "name": "Develop and improve products"
158
+ }
159
+ ],
160
+ "legIntPurposes": []
161
+ },
162
+ "dateCreated": "2022-10-06T11:16:35.371Z",
163
+ "euconsent": "CPgbQkAPgbQkAAGABCENCjCsAAAAAAAAACgAAAAAAAAA.YAAAAAAAAAAA",
164
+ "gdprApplies": true,
165
+ "grants": {
166
+ "5e7f6927b8e05c1c467daa5d": {
167
+ "vendorGrant": true,
168
+ "purposeGrants": {
169
+ "5ff72d5ebdf037283e40a4bd": true,
170
+ "5ff72d5ebdf037283e40a4c2": true,
171
+ "5ff72d5ebdf037283e40a4c7": true,
172
+ "6014443f87b0803b0f3e38c1": true,
173
+ "6014443f87b0803b0f3e38c6": true,
174
+ "6014443f87b0803b0f3e38cb": true,
175
+ "6014443f87b0803b0f3e38d0": true,
176
+ "6014443f87b0803b0f3e38d5": true,
177
+ "6014443f87b0803b0f3e38da": true,
178
+ "6014443f87b0803b0f3e38df": true
179
+ }
180
+ },
181
+ "5f745ab96f3aae0163740409": {
182
+ "vendorGrant": true,
183
+ "purposeGrants": {
184
+ "5ff72d5ebdf037283e40a4bd": true,
185
+ "5ff72d5ebdf037283e40a4c2": true,
186
+ "5ff72d5ebdf037283e40a4c7": true,
187
+ "6014443f87b0803b0f3e38c1": true,
188
+ "6014443f87b0803b0f3e38c6": true,
189
+ "6014443f87b0803b0f3e38cb": true,
190
+ "6014443f87b0803b0f3e38d0": true,
191
+ "6014443f87b0803b0f3e38d5": true,
192
+ "6014443f87b0803b0f3e38da": true,
193
+ "6014443f87b0803b0f3e38df": true
194
+ }
195
+ }
196
+ },
197
+ "vendorListId": "5ff72d5fa22863a7f72b9b95",
198
+ "gdpr": {
199
+ "authId": null,
200
+ "uuid": "f5e9a5b9-3468-4d4e-8380-138fc864f19a_12",
201
+ "getMessageAlways": false,
202
+ "applies": true,
203
+ "customVendorsResponse": {
204
+ "consentedVendors": [
205
+ {
206
+ "_id": "5e7f6927b8e05c1c467daa5d",
207
+ "name": "Branch Metrics, Inc.",
208
+ "vendorType": "CUSTOM"
209
+ },
210
+ {
211
+ "_id": "5f745ab96f3aae0163740409",
212
+ "name": "Ipsos MORI",
213
+ "vendorType": "CUSTOM"
214
+ }
215
+ ],
216
+ "consentedPurposes": [
217
+ {
218
+ "_id": "5ff72d5ebdf037283e40a4bd",
219
+ "name": "Store and/or access information on a device"
220
+ },
221
+ {
222
+ "_id": "5ff72d5ebdf037283e40a4c2",
223
+ "name": "Select personalised content"
224
+ },
225
+ {
226
+ "_id": "5ff72d5ebdf037283e40a4c7",
227
+ "name": "Select personalised ads"
228
+ },
229
+ {
230
+ "_id": "6014443f87b0803b0f3e38c1",
231
+ "name": "Select basic ads"
232
+ },
233
+ {
234
+ "_id": "6014443f87b0803b0f3e38c6",
235
+ "name": "Create a personalised ads profile"
236
+ },
237
+ {
238
+ "_id": "6014443f87b0803b0f3e38cb",
239
+ "name": "Create a personalised content profile"
240
+ },
241
+ {
242
+ "_id": "6014443f87b0803b0f3e38d0",
243
+ "name": "Measure ad performance"
244
+ },
245
+ {
246
+ "_id": "6014443f87b0803b0f3e38d5",
247
+ "name": "Measure content performance"
248
+ },
249
+ {
250
+ "_id": "6014443f87b0803b0f3e38da",
251
+ "name": "Apply market research to generate audience insights"
252
+ },
253
+ {
254
+ "_id": "6014443f87b0803b0f3e38df",
255
+ "name": "Develop and improve products"
256
+ }
257
+ ],
258
+ "legIntPurposes": []
259
+ },
260
+ "addtlConsent": "1~",
261
+ "grants": {
262
+ "5e7f6927b8e05c1c467daa5d": {
263
+ "vendorGrant": true,
264
+ "purposeGrants": {
265
+ "5ff72d5ebdf037283e40a4bd": true,
266
+ "5ff72d5ebdf037283e40a4c2": true,
267
+ "5ff72d5ebdf037283e40a4c7": true,
268
+ "6014443f87b0803b0f3e38c1": true,
269
+ "6014443f87b0803b0f3e38c6": true,
270
+ "6014443f87b0803b0f3e38cb": true,
271
+ "6014443f87b0803b0f3e38d0": true,
272
+ "6014443f87b0803b0f3e38d5": true,
273
+ "6014443f87b0803b0f3e38da": true,
274
+ "6014443f87b0803b0f3e38df": true
275
+ }
276
+ },
277
+ "5f745ab96f3aae0163740409": {
278
+ "vendorGrant": true,
279
+ "purposeGrants": {
280
+ "5ff72d5ebdf037283e40a4bd": true,
281
+ "5ff72d5ebdf037283e40a4c2": true,
282
+ "5ff72d5ebdf037283e40a4c7": true,
283
+ "6014443f87b0803b0f3e38c1": true,
284
+ "6014443f87b0803b0f3e38c6": true,
285
+ "6014443f87b0803b0f3e38cb": true,
286
+ "6014443f87b0803b0f3e38d0": true,
287
+ "6014443f87b0803b0f3e38d5": true,
288
+ "6014443f87b0803b0f3e38da": true,
289
+ "6014443f87b0803b0f3e38df": true
290
+ }
291
+ }
292
+ },
293
+ "euconsent": "CPgbQkAPgbQkAAGABCENCjCsAAAAAAAAACgAAAAAAAAA.YAAAAAAAAAAA",
294
+ "consentStatus": {
295
+ "rejectedAny": false,
296
+ "rejectedLI": false,
297
+ "consentedAll": true,
298
+ "granularStatus": {
299
+ "vendorConsent": "ALL",
300
+ "vendorLegInt": "EMPTY_VL",
301
+ "purposeConsent": "ALL",
302
+ "purposeLegInt": "EMPTY_VL",
303
+ "previousOptInAll": false,
304
+ "defaultConsent": false
305
+ },
306
+ "hasConsentData": true,
307
+ "consentedToAny": true
308
+ },
309
+ "actions": [
310
+ {
311
+ "_id": "61fa905112228108ab6be61f",
312
+ "type": "inline",
313
+ "url": "",
314
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'J';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
315
+ "tagManager": null
316
+ },
317
+ {
318
+ "_id": "61fa905112228108ab6be627",
319
+ "type": "inline",
320
+ "url": "",
321
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'A';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
322
+ "tagManager": null
323
+ },
324
+ {
325
+ "_id": "61fa905112228108ab6be62f",
326
+ "type": "inline",
327
+ "url": "",
328
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'B';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
329
+ "tagManager": null
330
+ },
331
+ {
332
+ "_id": "61fa905112228108ab6be637",
333
+ "type": "inline",
334
+ "url": "",
335
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'C';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
336
+ "tagManager": null
337
+ },
338
+ {
339
+ "_id": "61fa905112228108ab6be63f",
340
+ "type": "inline",
341
+ "url": "",
342
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'D';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
343
+ "tagManager": null
344
+ },
345
+ {
346
+ "_id": "61fa905112228108ab6be647",
347
+ "type": "inline",
348
+ "url": "",
349
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'E';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
350
+ "tagManager": null
351
+ },
352
+ {
353
+ "_id": "61fa905112228108ab6be64f",
354
+ "type": "inline",
355
+ "url": "",
356
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'F';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
357
+ "tagManager": null
358
+ },
359
+ {
360
+ "_id": "61fa905112228108ab6be657",
361
+ "type": "inline",
362
+ "url": "",
363
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'G';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
364
+ "tagManager": null
365
+ },
366
+ {
367
+ "_id": "61fa905112228108ab6be65f",
368
+ "type": "inline",
369
+ "url": "",
370
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'H';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}",
371
+ "tagManager": null
372
+ },
373
+ {
374
+ "_id": "61fa905112228108ab6be667",
375
+ "type": "inline",
376
+ "url": "",
377
+ "js": "/*\r\nAIT consent management code.\r\nPlease do not modify.\r\n*/\r\nlet lbl = 'I';\r\nif( typeof window.nonIabPurposeConsents === 'undefined' ) {\r\n // create the list, if not existing\r\n window.nonIabPurposeConsents = lbl;\r\n}\r\nelse {\r\n // add the consent to the list, if not already present\r\n if( window.nonIabPurposeConsents.indexOf(lbl) === -1 ) {\r\n window.nonIabPurposeConsents += lbl;\r\n }\r\n}\r\n\r\n// manage the cookie for Tealium\r\n// update the cookie and set the expiry date for it to THREE YEARS\r\nlet now = new Date();\r\nlet time = now.getTime();\r\ntime += 94608000000; // three years later\r\nnow.setTime(time);\r\n// drop the cookie\r\ndocument.cookie = 'nukt_sp_consent=' + encodeURIComponent( window.nonIabPurposeConsents ) + ';expires='+now.toGMTString()+';path=/';\r\n// update Tealium data layer, if existing\r\nif( typeof utag_data !== 'undefined' ) { utag_data['cp.nukt_sp_consent'] = window.nonIabPurposeConsents; }\r\nif( ( typeof utag !== 'undefined' ) && ( typeof utag.data !== 'undefined' ) ) { utag.data['cp.nukt_sp_consent'] = window.nonIabPurposeConsents; }\r\n\r\n// clear the queue of Tealium calls, if needed\r\nif( ( typeof window.nukt_cmp !== 'undefined' ) && ( typeof window.nukt_cmp.flushQueue !== 'undefined' ) ) {\r\n window.nukt_cmp.flushQueue();\r\n}\r\n\r\n\r\n\r\n// code to handle the cookie V2 for new Tealium integration\r\nif( ( typeof _sp_ !== 'undefined' ) && ( typeof _sp_.getCustomVendorConsents === 'function' ) ) {\r\n\r\n _sp_.getCustomVendorConsents( function( v, success ) {\r\n if( success ) {\r\n // consent information is available\r\n\t // read the data structure and set the flags\r\n\t var f = '';\r\n\t if( typeof v.consentedPurposes !== 'undefined' &&\r\n\t v.consentedPurposes.constructor === Array &&\r\n\t\t v.consentedPurposes.length > 0 ) {\r\n\t for( var i = 0; i < v.consentedPurposes.length; i++ ) {\r\n\r\n switch( v.consentedPurposes[i]._id.toLowerCase() ) {\r\n\t\t case '5ff72d5ebdf037283e40a4c2': f += 'A'; break; \r\n\t\t case '5ff72d5ebdf037283e40a4c7': f += 'B'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c1': f += 'C'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c6': f += 'D'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38cb': f += 'E'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d0': f += 'F'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d5': f += 'G'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38da': f += 'H'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38df': f += 'I'; break;\r\n\t\t\tcase '5ff72d5ebdf037283e40a4bd': f += 'J'; break;\r\n\t\t }\r\n\r\n\t\t}\r\n\t }\r\n\t f = f + '|';\r\n\t if( typeof v.legIntPurposes !== 'undefined' &&\r\n\t v.legIntPurposes.constructor === Array &&\r\n\t\t v.legIntPurposes.length > 0 ) {\r\n\t for(var j = 0; j < v.legIntPurposes.length; j++ ) {\r\n\t\t\t\r\n switch( v.legIntPurposes[j]._id.toLowerCase() ) {\r\n\t\t case '5ff72d5ebdf037283e40a4c2': f += 'N'; break; \r\n\t\t case '5ff72d5ebdf037283e40a4c7': f += 'O'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c1': f += 'P'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38c6': f += 'Q'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38cb': f += 'R'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d0': f += 'S'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38d5': f += 'T'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38da': f += 'U'; break;\r\n\t\t\tcase '6014443f87b0803b0f3e38df': f += 'V'; break;\r\n\t\t }\r\n\t\t\t\r\n\t\t}\r\n }\r\n\t \r\n\t // update the cookie V2 with the overall consent information\r\n now = new Date();\r\n time = now.getTime();\r\n time += 94608000000; // three years later\r\n now.setTime(time);\r\n // drop the cookie\r\n document.cookie = 'nukt_sp_consent_v2=' + encodeURIComponent(f) + ';expires=' + now.toGMTString() + ';path=/';\r\n\t \r\n\t // update Tealium data layer, if existing\r\n if( typeof utag_data !== 'undefined' ) {\r\n utag_data['cp.nukt_sp_consent_v2'] = f;\r\n }\r\n if( typeof utag !== 'undefined' && typeof utag.data !== 'undefined' ) {\r\n utag.data['cp.nukt_sp_consent_v2'] = f;\r\n }\r\n \r\n\t // clear the queue of Tealium calls, if needed\r\n if( ( typeof window.nukt_cmp !== 'undefined' ) && ( typeof window.nukt_cmp.flushQueueV2 !== 'undefined' ) ) {\r\n window.nukt_cmp.flushQueueV2();\r\n }\r\n }\r\n });\r\n}\r\n\r\n\r\n",
378
+ "tagManager": null
379
+ }
380
+ ],
381
+ "dateCreated": "2022-10-06T11:16:35.371Z",
382
+ "vendorListId": "5ff72d5fa22863a7f72b9b95"
383
+ },
384
+ "version": 1
385
+ }
386
+
387
+ export const _sp_non_keyed_local_state = {
388
+ "gdpr": {
389
+ "_sp_v1_uid": "1:117:d10f2b55-a2d1-484f-847e-9d0f18a7c6e3",
390
+ "_sp_v1_data": "2:405889:1652176805:0:8:0:8:0:0:_:-1"
391
+ }
392
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -82,10 +82,12 @@ export default class MyDocument extends Document {
82
82
  {helmet.script.toComponent()}
83
83
  {sourcepointAccountId && (
84
84
  <Consent
85
- sourcePointConfigTCFV2={{
85
+ sourcePointConfigUnified={{
86
86
  accountId: Number(sourcepointAccountId),
87
87
  propertyHref: sourcepointPropertyHref,
88
+ gdpr: {},
88
89
  }}
90
+ reactHelmet={Helmet}
89
91
  />
90
92
  )}
91
93
  <meta name="robots" content="noindex" />