@worksafevictoria/wcl7.5 1.5.0 → 1.7.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.
Files changed (99) hide show
  1. package/.storybook/preview.js +20 -13
  2. package/bin/deploy.sh +1 -1
  3. package/lib/utility.js +10 -8
  4. package/package.json +6 -5
  5. package/src/assets/icons/AppFooter/x-ws-footer.svg +10 -0
  6. package/src/assets/icons/AppFooter/x-ww-footer.svg +28 -0
  7. package/src/assets/icons/SocialShare/x-icon-white.svg +28 -0
  8. package/src/assets/styles/modal.scss +51 -0
  9. package/src/components/Common/CardGrid/index.vue +56 -51
  10. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +7 -4
  11. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +15 -19
  12. package/src/components/Common/CardGridItem/index.vue +77 -63
  13. package/src/components/Containers/Carousel/index.vue +14 -7
  14. package/src/components/Containers/HomepageHeader/index.stories.js +60 -36
  15. package/src/components/Containers/HomepageHeader/index.vue +2 -26
  16. package/src/components/Containers/HomepageHeaderNew/index.stories.js +15 -15
  17. package/src/components/Containers/HomepageHeaderNew/index.vue +97 -68
  18. package/src/components/Containers/SectionGroup/index.vue +1 -1
  19. package/src/components/Containers/Subheader/index.vue +5 -1
  20. package/src/components/Global/AppFooter/FooterSocialShare/index.vue +1 -1
  21. package/src/components/Global/AppFooter/index.vue +14 -7
  22. package/src/components/Global/AppFooter/styles.scss +3 -0
  23. package/src/components/Global/AppHeaderNew/styles.scss +10 -15
  24. package/src/components/Global/BackToTop/index.vue +8 -8
  25. package/src/components/Global/Cookies/index.stories.js +16 -10
  26. package/src/components/Global/Cookies/index.vue +280 -243
  27. package/src/components/Global/Cookies/styles.scss +54 -54
  28. package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +50 -133
  29. package/src/components/Global/DirectoryFilters/index.vue +3 -0
  30. package/src/components/Global/GlobalNotice/index.vue +79 -100
  31. package/src/components/Global/SocialShare/index.vue +1 -1
  32. package/src/components/Global/Strip/index.vue +1 -1
  33. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +8 -4
  34. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +23 -23
  35. package/src/components/Paragraphs/Accordion/index.stories.js +21 -18
  36. package/src/components/Paragraphs/Accordion/index.vue +52 -48
  37. package/src/components/Paragraphs/BrowseContent/index.vue +1 -1
  38. package/src/components/Paragraphs/BrowseContent/setup.vue +284 -0
  39. package/src/components/Paragraphs/Chart/Constants.js +952 -952
  40. package/src/components/Paragraphs/Chart/index.vue +232 -241
  41. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.stories.js +34 -0
  42. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +321 -0
  43. package/src/components/Paragraphs/Directory/HSCP/Records/index.stories.js +19 -0
  44. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +345 -0
  45. package/src/components/Paragraphs/Directory/HSCP/Records/pagination.vue +179 -0
  46. package/src/components/Paragraphs/Directory/Records/CJ/index.vue +1 -1
  47. package/src/components/Paragraphs/Directory/Records/ISP/index.vue +1 -1
  48. package/src/components/Paragraphs/Directory/Records/PRS/index.stories.js +34 -0
  49. package/src/components/Paragraphs/Directory/Records/PRS/index.vue +5 -1
  50. package/src/components/Paragraphs/Directory/Records/index.storieshide.js +47 -0
  51. package/src/components/Paragraphs/Directory/Records/index.vue +52 -33
  52. package/src/components/Paragraphs/Directory/constants.js +23 -5
  53. package/src/components/Paragraphs/Directory/index.vue +14 -14
  54. package/src/components/Paragraphs/Directory/{Records/styles.scss → styles.scss} +5 -3
  55. package/src/components/Paragraphs/ListGroup/index.vue +5 -1
  56. package/src/components/Paragraphs/Map/Constants.js +4790 -0
  57. package/src/components/Paragraphs/Map/index.mdx +29 -0
  58. package/src/components/Paragraphs/Map/index.stories.js +15 -0
  59. package/src/components/Paragraphs/Map/index.vue +295 -0
  60. package/src/components/Paragraphs/Map/postcode_location.json +3543 -0
  61. package/src/components/Paragraphs/ScrollSpy/index.vue +23 -14
  62. package/src/components/Paragraphs/SelectableCards/index.vue +15 -12
  63. package/src/components/Paragraphs/TabbedCards/index.vue +13 -14
  64. package/src/components/Paragraphs/Tabs/index.vue +19 -17
  65. package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +9 -9
  66. package/src/components/Paragraphs/TextMedia/index.vue +20 -16
  67. package/src/components/Paragraphs/VideoGrid/index.stories.js +43 -19
  68. package/src/components/Paragraphs/VideoGrid/index.vue +13 -13
  69. package/src/components/Paragraphs/Webform/index.stories.js +82 -69
  70. package/src/components/SubComponents/Breadcrumb/index.vue +4 -0
  71. package/src/components/SubComponents/CardGroup/index.vue +5 -1
  72. package/src/components/SubComponents/FormAddressPostcode/index.vue +35 -37
  73. package/src/components/SubComponents/FormInstance/components/handler/index.vue +25 -29
  74. package/src/components/SubComponents/FormInstance/components/renderer/index.vue +81 -30
  75. package/src/components/SubComponents/FormInstance/models/overrides/file.js +38 -40
  76. package/src/components/SubComponents/FormInstance/services/form-submit-parser.js +22 -15
  77. package/src/components/SubComponents/FormInstance/services/registry-factory.js +1 -1
  78. package/src/components/SubComponents/FormInstance/stories/fileupload.stories.js +57 -0
  79. package/src/components/SubComponents/FormInstance/stories/mocks/fileupload.json +25 -0
  80. package/src/components/SubComponents/FormInstance/style.scss +2 -2
  81. package/src/components/SubComponents/FormInstance/tests/address.test.js +4 -4
  82. package/src/components/SubComponents/FormInstance/tests/checkboxes.test.js +7 -7
  83. package/src/components/SubComponents/FormInstance/tests/customcomposite.test.js +15 -15
  84. package/src/components/SubComponents/FormInstance/tests/date.test.js +8 -8
  85. package/src/components/SubComponents/FormInstance/tests/form-test-utils.js +9 -9
  86. package/src/components/SubComponents/FormInstance/tests/multiple.test.js +13 -13
  87. package/src/components/SubComponents/FormInstance/tests/rule-visible.test.js +120 -120
  88. package/src/components/SubComponents/FormInstance/tests/scale.test.js +6 -6
  89. package/src/components/SubComponents/FormInstance/tests/url.test.js +13 -10
  90. package/src/components/SubComponents/Pagination/index.vue +19 -18
  91. package/src/components/SubComponents/ResourceGroup/index.vue +5 -1
  92. package/src/components/SubComponents/Search/SearchListing/index.vue +20 -20
  93. package/src/components/SubComponents/Search/index.vue +42 -35
  94. package/src/components/SubComponents/VideoThumbnail/index.vue +48 -133
  95. package/src/includes/scss/vars/src/colors.module.scss +28 -1
  96. package/src/index.js +25 -3
  97. package/src/main.js +2 -10
  98. package/src/mock/carousel-items.js +71 -46
  99. package/src/mock/course-provider.js +273 -0
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  </column>
20
20
  <!-- Cookie buttons displayed when not xs -->
21
- <column class="cookie-container__col hidden-on-xs">
21
+ <column class="cookie-container__col hidden-on-xs">
22
22
  <div class="cookie-buttons mt-md-3">
23
23
  <button
24
24
  id="moreBtn"
@@ -34,9 +34,9 @@
34
34
  id="accept_all"
35
35
  role="button"
36
36
  class="cookieBtn yellow hasIcon"
37
- style="order:1;"
37
+ style="order: 1"
38
38
  aria-label="Accept all cookies"
39
- @click="clickedCookie('accept'), fireGTM()"
39
+ @click="(clickedCookie('accept'), fireGTM())"
40
40
  >
41
41
  Accept all
42
42
  </button>
@@ -44,9 +44,9 @@
44
44
  id="reject_all"
45
45
  role="button"
46
46
  class="cookieBtn black hasIcon"
47
- style="order:2;"
47
+ style="order: 2"
48
48
  aria-label="Reject all cookies"
49
- @click="clickedCookie('reject'), fireGTM(), checkCookie()"
49
+ @click="(clickedCookie('reject'), fireGTM(), checkCookie())"
50
50
  >
51
51
  Reject all
52
52
  </button>
@@ -61,126 +61,155 @@
61
61
  <a
62
62
  id="acceptAllLink"
63
63
  href="#"
64
- @click="clickedCookie('accept'), fireGTM()"
64
+ @click="(clickedCookie('accept'), fireGTM())"
65
65
  >Accept all</a
66
66
  >
67
67
  <a
68
68
  id="rejectAllLink"
69
69
  href="#"
70
- @click="clickedCookie('reject'), fireGTM(), checkCookie()"
70
+ @click="(clickedCookie('reject'), fireGTM(), checkCookie())"
71
71
  >Reject all</a
72
72
  >
73
73
  </div>
74
74
  </row>
75
75
  </row>
76
76
  <!-- Modal -->
77
- <div v-if="showCookieModal" class="modal fade show" tabindex="-1" aria-modal="true" role="dialog" style="display: block;">
78
- <div class="modal-dialog">
79
- <div class="modal-content">
80
- <div class="modal-header">
81
- <div class="modal-heading-text">
82
- {{ cookieContent.modal.heading }}
83
- </div>
84
- <button type="button" class="btn-close" @click="showCookieModal = !showCookieModal" aria-label="close"></button>
85
- </div>
86
- <div class="modal-body">
87
- <fieldset>
88
- <row>
89
- <column>
90
- <h5>{{ cookieContent.modal.functional.heading }}</h5>
91
- </column>
92
- <column>
93
- <label for="modal1CB" class="option">
94
- Necessary<span class="visually-hidden">functional label</span>
95
- <input
96
- id="modal1CB"
97
- type="checkbox"
98
- value="functional"
99
- checked
100
- disabled
101
- />
102
- </label>
103
- </column>
104
- </row>
105
- <row>
106
- <column class="modal-description">
107
- {{cookieContent.modal.functional.description}}
108
- </column>
109
- </row>
110
- <hr />
111
- <row>
112
- <column>
113
- <h5>{{ cookieContent.modal.analytics.heading }}</h5>
114
- </column>
115
- <column>
116
- <label for="modal2CB" class="option">
117
- <span class="visually-hidden">analytics checkbox</span>
118
- <input
119
- id="modal2CB"
120
- type="checkbox"
121
- name="modal2CB"
122
- value="analytics"
123
- />
124
- </label>
125
- </column>
126
- </row>
127
- <row>
128
- <column class="modal-description">
129
- {{cookieContent.modal.analytics.description}}
130
- </column>
131
- </row>
132
- <hr />
133
- <row>
134
- <column>
135
- <h5>{{ cookieContent.modal.marketing.heading }}</h5>
136
- </column>
137
- <column text-align="right">
138
- <label for="modal3CB" class="option">
139
- <span class="visually-hidden">marketing checkbox</span>
140
- <input
141
- id="modal3CB"
142
- type="checkbox"
143
- name="modal3CB"
144
- value="marketing"
145
- />
146
- </label>
147
- </column>
148
- </row>
149
- <row>
150
- <column class="modal-description">
151
- {{cookieContent.modal.marketing.description}}
152
- </column>
153
- </row>
154
- </fieldset>
155
- </div>
156
- <div class="modal-footer">
157
- <button
158
- id="modal_save"
159
- type="button"
160
- role="button"
161
- class="cookieBtn yellow hasIcon"
162
- style="order:1;"
163
- aria-label="Save cookie settings"
164
- @click="clickedCookie('save'), fireGTM(), checkCookie(), showCookieModal = !showCookieModal"
165
- >
166
- Save
167
- </button>
168
- <button
169
- id="modal_accept"
170
- type="button"
171
- role="button"
172
- class="cookieBtn black hasIcon"
173
- style="order:2;"
174
- data-bs-dismiss="cookieModal"
175
- aria-label="Accept all cookies"
176
- @click="clickedCookie('accept'), fireGTM(), showCookieModal = !showCookieModal"
177
- >
178
- Accept all
179
- </button>
180
- </div>
181
- </div>
77
+ <b-modal
78
+ v-model="showCookieModal"
79
+ scrollable
80
+ @hidden="reset"
81
+ footer-border-variant="null"
82
+ no-header
83
+ size="md"
84
+ >
85
+ <template #default="{ close }">
86
+ <form ref="clearForm">
87
+ <container>
88
+ <row
89
+ ><column>
90
+ <div class="modal-heading">
91
+ {{ cookieContent.modal.heading }}
92
+ </div>
93
+ </column></row
94
+ >
95
+ <row>
96
+ <column>
97
+ <h5>{{ cookieContent.modal.functional.heading }}</h5>
98
+ </column>
99
+ <column>
100
+ <fieldset style="float: right">
101
+ <label for="modal1CB" class="option">
102
+ Necessary<span class="sr-only">functional label</span>
103
+ <input
104
+ id="modal1CB"
105
+ type="checkbox"
106
+ value="functional"
107
+ checked
108
+ disabled
109
+ @keyup.enter="(e) => e.target.click()"
110
+ />
111
+ </label>
112
+ </fieldset>
113
+ </column>
114
+ </row>
115
+ <row>
116
+ <column class="modal-description">{{
117
+ cookieContent.modal.functional.description
118
+ }}</column>
119
+ </row>
120
+ <hr />
121
+ <row>
122
+ <column>
123
+ <h5>{{ cookieContent.modal.analytics.heading }}</h5>
124
+ </column>
125
+ <column>
126
+ <fieldset style="float: right">
127
+ <label for="modal2CB" class="option"
128
+ ><span class="sr-only">analytics checkbox</span>
129
+ <input
130
+ id="modal2CB"
131
+ type="checkbox"
132
+ name="modal2CB"
133
+ value="analytics"
134
+ @keyup.enter="(e) => e.target.click()"
135
+ /></label>
136
+ </fieldset>
137
+ </column>
138
+ </row>
139
+ <row>
140
+ <column class="modal-description">{{
141
+ cookieContent.modal.analytics.description
142
+ }}</column>
143
+ </row>
144
+ <hr />
145
+ <row>
146
+ <column>
147
+ <h5>{{ cookieContent.modal.marketing.heading }}</h5>
148
+ </column>
149
+ <column>
150
+ <fieldset style="float: right">
151
+ <label for="modal3CB" class="option"
152
+ ><span class="sr-only">marketing checkbox</span>
153
+ <input
154
+ id="modal3CB"
155
+ type="checkbox"
156
+ name="modal3CB"
157
+ value="marketing"
158
+ @keyup.enter="(e) => e.target.click()"
159
+ /></label>
160
+ </fieldset>
161
+ </column>
162
+ </row>
163
+ <row>
164
+ <column class="modal-description">{{
165
+ cookieContent.modal.marketing.description
166
+ }}</column>
167
+ </row>
168
+ </container>
169
+ </form>
170
+ </template>
171
+
172
+ <template #footer="{ close }">
173
+ <div>
174
+ <button
175
+ id="modal_save"
176
+ type="button"
177
+ role="button"
178
+ class="cookieBtn yellow hasIcon"
179
+ style="order: 1"
180
+ aria-label="Save cookie settings"
181
+ @click="
182
+ () => {
183
+ clickedCookie('save')
184
+ fireGTM()
185
+ checkCookie()
186
+ close()
187
+ }
188
+ "
189
+ >
190
+ Save
191
+ </button>
192
+ <button
193
+ id="modal_accept"
194
+ type="button"
195
+ role="button"
196
+ class="cookieBtn black hasIcon"
197
+ style="order: 2"
198
+ data-bs-dismiss="cookieModal"
199
+ aria-label="Accept all cookies"
200
+ @click="
201
+ () => {
202
+ clickedCookie('accept')
203
+ fireGTM()
204
+ close()
205
+ }
206
+ "
207
+ >
208
+ Accept all
209
+ </button>
182
210
  </div>
183
- </div>
211
+ </template>
212
+ </b-modal>
184
213
  </container>
185
214
  </template>
186
215
 
@@ -189,23 +218,25 @@ import Container from './../../Containers/Container/index.vue'
189
218
  import Row from './../../Containers/Row/index.vue'
190
219
  import Column from './../../Containers/Column/index.vue'
191
220
  import { analyticsCookies, marketingCookies } from './Constants'
221
+ import { BModal } from 'bootstrap-vue-next'
192
222
 
193
223
  export default {
194
224
  name: 'Cookies',
195
225
  components: {
196
226
  Container,
197
227
  Row,
198
- Column
228
+ Column,
229
+ 'b-modal': BModal,
199
230
  },
200
231
  props: {
201
232
  cookieHeader: {
202
233
  type: String,
203
- default: 'Accept and Reject Cookies'
234
+ default: 'Accept and Reject Cookies',
204
235
  },
205
236
  cookieContent: {
206
237
  type: Object,
207
- default: () => {}
208
- }
238
+ default: () => {},
239
+ },
209
240
  },
210
241
  data() {
211
242
  return {
@@ -213,7 +244,7 @@ export default {
213
244
  analyticsCookies,
214
245
  marketingCookies,
215
246
  screenWidth: 0,
216
- showCookieModal: false
247
+ showCookieModal: false,
217
248
  }
218
249
  },
219
250
  computed: {
@@ -221,9 +252,10 @@ export default {
221
252
  return this.item === null
222
253
  },
223
254
  showCookie() {
224
- //Check first if cookies have been turned on in the environment variable
225
- return process.env.SHOW_COOKIE === false ? false : true
255
+ // Default to false, but set to true when SHOW_COOKIE is explicitly "true"
256
+ return this.$config?.public?.showCookie === "true" || process.env.SHOW_COOKIE === "true";
226
257
  }
258
+
227
259
  },
228
260
  mounted() {
229
261
  // detect screen size to display smaller content
@@ -232,7 +264,6 @@ export default {
232
264
  // required, as unable to check localStorage until window loaded
233
265
  this.checkCookie()
234
266
  window.addEventListener('resize', this.updateScreenWidth)
235
-
236
267
  },
237
268
  unmounted() {
238
269
  window.removeEventListener('load', this.checkCookie)
@@ -243,29 +274,36 @@ export default {
243
274
  this.screenWidth = window.innerWidth
244
275
  },
245
276
  reset() {
246
- this.$emit('input', null)
277
+ this.$refs.clearForm.reset()
278
+ //this.$emit('input', null)
247
279
  },
280
+
248
281
  //function to set cookies based on response in overlay or modal
249
282
  clickedCookie: (clickResponse) => {
250
283
  const analyticsCookieName = 'analyticsCookies'
251
284
  const marketingCookieName = 'marketingCookies'
252
285
  var cookieElement = document.getElementById('mainCookieContainer')
253
-
286
+
254
287
  if (cookieElement) {
255
288
  localStorage.setItem('cookieBannerDisplayed', 'true') // Mark the banner as displayed
256
-
289
+
257
290
  if (clickResponse === 'accept') {
258
291
  // localStorage.setItem('cookieBannerDisplayed', 'false')
259
292
  localStorage.setItem(analyticsCookieName, 'granted')
260
293
  localStorage.setItem(marketingCookieName, 'granted')
261
-
262
294
  } else if (clickResponse === 'save') {
263
295
  // localStorage.setItem('cookieBannerDisplayed', 'false')
264
296
  const acb = document.getElementById('modal2CB')
265
297
  const mcb = document.getElementById('modal3CB')
266
298
 
267
- localStorage.setItem(analyticsCookieName, acb.checked ? 'granted' : 'denied')
268
- localStorage.setItem(marketingCookieName, mcb.checked ? 'granted' : 'denied')
299
+ localStorage.setItem(
300
+ analyticsCookieName,
301
+ acb.checked ? 'granted' : 'denied',
302
+ )
303
+ localStorage.setItem(
304
+ marketingCookieName,
305
+ mcb.checked ? 'granted' : 'denied',
306
+ )
269
307
  } else {
270
308
  // clickResponse === 'reject'
271
309
  // localStorage.setItem('cookieBannerDisplayed', 'false')
@@ -279,30 +317,30 @@ export default {
279
317
  },
280
318
  // function to update consent in GTM
281
319
  fireGTM() {
282
- // if (this.$gtm) {
283
- // // gather attrs
284
- // let aConsent = localStorage.getItem('analyticsCookies')
285
- // let mConsent = localStorage.getItem('marketingCookies')
286
- // let attrs1 = {
287
- // ad_storage: mConsent
288
- // }
289
- // // fire the event - marketing
290
- // this.$gtm.push({
291
- // event: 'gtm_consent_update',
292
- // ...attrs1
293
- // })
294
- // let attrs2 = {
295
- // analytics_storage: aConsent
296
- // }
297
- // // fire the event - analytics
298
- // this.$gtm.push({
299
- // event: 'gtm_consent_update',
300
- // ...attrs2
301
- // })
302
- // }
320
+ if (this.$gtm) {
321
+ // gather attrs
322
+ let aConsent = localStorage.getItem('analyticsCookies')
323
+ let mConsent = localStorage.getItem('marketingCookies')
324
+ let attrs1 = {
325
+ ad_storage: mConsent,
326
+ }
327
+ // fire the event - marketing
328
+ this.$gtm.push({
329
+ event: 'gtm_consent_update',
330
+ ...attrs1,
331
+ })
332
+ let attrs2 = {
333
+ analytics_storage: aConsent,
334
+ }
335
+ // fire the event - analytics
336
+ this.$gtm.push({
337
+ event: 'gtm_consent_update',
338
+ ...attrs2,
339
+ })
340
+ }
303
341
  },
304
342
  //function to remove from local storage based on partial match - called from checkCookie
305
- removeLocalStorage: function(cookieName) {
343
+ removeLocalStorage: function (cookieName) {
306
344
  var removeArr = []
307
345
  for (var i = 0; i < localStorage.length; i++) {
308
346
  var x = localStorage.key(i)
@@ -315,125 +353,124 @@ export default {
315
353
  })
316
354
  },
317
355
  // function to remove cookies according to response from overlay or modal
318
- checkCookie: function() {
319
- const cookieElement = document.getElementById('mainCookieContainer');
320
- const bannerDisplayed = localStorage.getItem('cookieBannerDisplayed');
321
-
356
+ checkCookie: function () {
357
+ const cookieElement = document.getElementById('mainCookieContainer')
358
+ const bannerDisplayed = localStorage.getItem('cookieBannerDisplayed')
322
359
 
323
- if (this.showCookie && bannerDisplayed !== 'true') {
324
- // Show the banner if it's not been displayed yet
325
- console.log('** Show the banner if its not been displayed yet:-')
326
- cookieElement.classList.remove('hide')
327
- cookieElement.classList.add('show')
328
- } else {
329
- // Hide the banner if user has already made a selection
330
- console.log('** Hide the banner if user has already made a selection:-')
331
- // need to remove cookies in rejected categories, but first hide cookie overlay
332
- cookieElement.classList.add('hide')
333
- cookieElement.classList.remove('show')
360
+ if (this.showCookie && bannerDisplayed !== 'true') {
361
+ // Show the banner if it's not been displayed yet
362
+ cookieElement.classList.remove('hide')
363
+ cookieElement.classList.add('show')
364
+ } else {
365
+ // Hide the banner if user has already made a selection
366
+ // need to remove cookies in rejected categories, but first hide cookie overlay
367
+ cookieElement.classList.add('hide')
368
+ cookieElement.classList.remove('show')
334
369
 
335
- // get list of categorised cookies
336
- const analyticsArr = analyticsCookies
337
- const marketingArr = marketingCookies
370
+ // get list of categorised cookies
371
+ const analyticsArr = analyticsCookies
372
+ const marketingArr = marketingCookies
338
373
 
339
- // get list of cookies to process
340
- var pairs = document.cookie.split(';')
341
- var cookieArr = []
342
- for (var i = 0; i < pairs.length; i++) {
343
- var pair = pairs[i].split('=')
344
- var nameVar = [pair[0].trim()]
345
- cookieArr.push(nameVar[0])
346
- }
347
- // identify which categories to process, initialising variables to false
348
- // will only be set to true if user has rejected any cookies
349
- var checkAnalytics = false
350
- var checkMarketing = false
374
+ // get list of cookies to process
375
+ var pairs = document.cookie.split(';')
376
+ var cookieArr = []
377
+ for (var i = 0; i < pairs.length; i++) {
378
+ var pair = pairs[i].split('=')
379
+ var nameVar = [pair[0].trim()]
380
+ cookieArr.push(nameVar[0])
381
+ }
382
+ // identify which categories to process, initialising variables to false
383
+ // will only be set to true if user has rejected any cookies
384
+ var checkAnalytics = false
385
+ var checkMarketing = false
351
386
 
352
- // get value of consent cookies to determine if cookies have to be removed
353
- var analyticsValue = localStorage.getItem('analyticsCookies')
354
- if (analyticsValue !== null && analyticsValue === 'denied') {
355
- checkAnalytics = true
356
- }
387
+ // get value of consent cookies to determine if cookies have to be removed
388
+ var analyticsValue = localStorage.getItem('analyticsCookies')
389
+ if (analyticsValue !== null && analyticsValue === 'denied') {
390
+ checkAnalytics = true
391
+ }
357
392
 
358
- var marketingValue = localStorage.getItem('marketingCookies')
359
- if (marketingValue !== null && marketingValue === 'denied') {
360
- checkMarketing = true
361
- }
393
+ var marketingValue = localStorage.getItem('marketingCookies')
394
+ if (marketingValue !== null && marketingValue === 'denied') {
395
+ checkMarketing = true
396
+ }
362
397
 
363
- // Remove analytics cookies stored as cookies or localStorage
364
- if (checkAnalytics) {
365
- analyticsArr.forEach((cookieName) => {
366
- if (cookieName.name.slice(-1) === '*') {
367
- var tmpVar = cookieName.name.slice(0, -1)
368
- this.removeLocalStorage(tmpVar)
369
- var tmpArr = cookieArr.filter((x) => x.match(cookieName.name))
370
- tmpArr.forEach((tmpName) => {
371
- document.cookie =
372
- tmpName +
373
- '=;expires=' +
374
- new Date(0).toUTCString() +
375
- ';domain=' +
376
- cookieName.domain +
377
- ';path=' +
378
- cookieName.path
379
- })
380
- } else {
381
- localStorage.removeItem(cookieName.name)
398
+ // Remove analytics cookies stored as cookies or localStorage
399
+ if (checkAnalytics) {
400
+ analyticsArr.forEach((cookieName) => {
401
+ if (cookieName.name.slice(-1) === '*') {
402
+ var tmpVar = cookieName.name.slice(0, -1)
403
+ this.removeLocalStorage(tmpVar)
404
+ var tmpArr = cookieArr.filter((x) => x.match(cookieName.name))
405
+ tmpArr.forEach((tmpName) => {
382
406
  document.cookie =
383
- cookieName.name +
407
+ tmpName +
384
408
  '=;expires=' +
385
409
  new Date(0).toUTCString() +
386
410
  ';domain=' +
387
411
  cookieName.domain +
388
412
  ';path=' +
389
413
  cookieName.path
390
- }
391
- })
392
- }
393
- // Remove marketing cookies stored as cookies or localStorage
394
- if (checkMarketing) {
395
- marketingArr.forEach((cookieName) => {
396
- if (cookieName.name.slice(-1) === '*') {
397
- var tmpVar = cookieName.name.slice(0, -1)
398
- this.removeLocalStorage(tmpVar)
399
- var tmpArr = cookieArr.filter((x) => x.match(cookieName.name))
400
- tmpArr.forEach((tmpName) => {
401
- document.cookie =
402
- tmpName +
403
- '=;expires=' +
404
- new Date(0).toUTCString() +
405
- ';domain=' +
406
- cookieName.domain +
407
- ';path=' +
408
- cookieName.path
409
- })
410
- } else {
411
- localStorage.removeItem(cookieName.name)
414
+ })
415
+ } else {
416
+ localStorage.removeItem(cookieName.name)
417
+ document.cookie =
418
+ cookieName.name +
419
+ '=;expires=' +
420
+ new Date(0).toUTCString() +
421
+ ';domain=' +
422
+ cookieName.domain +
423
+ ';path=' +
424
+ cookieName.path
425
+ }
426
+ })
427
+ }
428
+ // Remove marketing cookies stored as cookies or localStorage
429
+ if (checkMarketing) {
430
+ marketingArr.forEach((cookieName) => {
431
+ if (cookieName.name.slice(-1) === '*') {
432
+ var tmpVar = cookieName.name.slice(0, -1)
433
+ this.removeLocalStorage(tmpVar)
434
+ var tmpArr = cookieArr.filter((x) => x.match(cookieName.name))
435
+ tmpArr.forEach((tmpName) => {
412
436
  document.cookie =
413
- cookieName.name +
437
+ tmpName +
414
438
  '=;expires=' +
415
439
  new Date(0).toUTCString() +
416
440
  ';domain=' +
417
441
  cookieName.domain +
418
442
  ';path=' +
419
443
  cookieName.path
420
- }
421
- })
422
- }
444
+ })
445
+ } else {
446
+ localStorage.removeItem(cookieName.name)
447
+ document.cookie =
448
+ cookieName.name +
449
+ '=;expires=' +
450
+ new Date(0).toUTCString() +
451
+ ';domain=' +
452
+ cookieName.domain +
453
+ ';path=' +
454
+ cookieName.path
455
+ }
456
+ })
423
457
  }
424
-
425
- }
426
- }
458
+ }
459
+ },
460
+ },
427
461
  }
428
462
  </script>
429
463
 
430
464
  <style lang="scss" scoped>
465
+ /* Removed scoped */
431
466
  @import './styles';
432
-
433
- #mainCookieContainer {
434
- .modal-dialog {
435
- max-width: var(--bs-modal-width);
436
- margin: 1.75rem auto;
437
- }
467
+ :deep(.modal-heading) {
468
+ font-size: 26px;
469
+ font-weight: 700;
470
+ line-height: 30px;
471
+ letter-spacing: 0px;
472
+ margin-bottom: 16px;
473
+ display: flex;
474
+ justify-content: flex-end !important;
438
475
  }
439
476
  </style>