@worksafevictoria/wcl7.5 1.10.0 → 1.11.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 (39) hide show
  1. package/package.json +1 -1
  2. package/src/assets/styles/generated-icons.scss +46 -46
  3. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +39 -45
  4. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
  5. package/src/components/Common/CardGridItem/index.vue +8 -2
  6. package/src/components/Containers/Carousel/index.stories.js +6 -4
  7. package/src/components/Containers/Carousel/index.vue +131 -120
  8. package/src/components/Containers/HomepageHeader/index.stories.js +1 -1
  9. package/src/components/Containers/HomepageHeaderNew/index.stories.js +3 -15
  10. package/src/components/Containers/HomepageHeaderNew/index.vue +3 -7
  11. package/src/components/Global/AppFooter/index.vue +130 -137
  12. package/src/components/Global/AppHeader/ModalSearch/index.vue +7 -1
  13. package/src/components/Global/AppHeader/index.stories.js +2 -2
  14. package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +21 -17
  15. package/src/components/Global/AppHeaderNew/index.stories.js +2 -2
  16. package/src/components/Global/AppHeaderNew/index.vue +53 -24
  17. package/src/components/Global/BackToTop/index.vue +16 -16
  18. package/src/components/Global/ContrastMode/index.stories.js +1 -1
  19. package/src/components/Global/HeroHeader/index.vue +62 -73
  20. package/src/components/Global/SocialShare/index.vue +114 -129
  21. package/src/components/Global/Strip/index.vue +9 -5
  22. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +22 -24
  23. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +15 -15
  24. package/src/components/Paragraphs/Calculator/CardContainer/index.vue +74 -75
  25. package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +31 -39
  26. package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +104 -107
  27. package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +152 -120
  28. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
  29. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +158 -128
  30. package/src/components/Paragraphs/Tabs/index.vue +4 -4
  31. package/src/components/Paragraphs/TabulatedData/index.vue +21 -20
  32. package/src/components/SubComponents/CtaButton/index.vue +47 -44
  33. package/src/components/SubComponents/Icon/README.md +2 -2
  34. package/src/components/SubComponents/Icon/example.js +1 -0
  35. package/src/components/SubComponents/Icon/index.stories.js +1 -1
  36. package/src/components/SubComponents/Icon/index.vue +47 -47
  37. package/src/components/SubComponents/ResourceGroup/cardbody.vue +49 -61
  38. package/src/components/SubComponents/VideoThumbnail/index.vue +8 -6
  39. package/src/mock/carousel-items.js +46 -81
@@ -2,7 +2,7 @@
2
2
  <div>
3
3
  <header
4
4
  v-if="headerMenu"
5
- :class="'app-header' + (this.screen === 'mobile' ? ' ' + 'isMobile' : '')"
5
+ :class="'app-header' + (screen === 'mobile' ? ' ' + 'isMobile' : '')"
6
6
  >
7
7
  <!-- Top menu -->
8
8
  <div class="logo">
@@ -33,10 +33,11 @@
33
33
  </nuxt-link>
34
34
  </td>
35
35
  <td>
36
- <a href="javascript:void(0)" @click="show = !show" title="Contrast">
37
- <span v-if="!topLevelIconsOnly">Adjust control</span> <img alt="Contrast Icon" width="20px" height="20px" :src=ContrastIcon />
36
+ <a href="javascript:void(0)" @click="show = !show" @keyup.esc="show = !show" title="Contrast" ref="selectContrast">
37
+ <span v-if="!topLevelIconsOnly">Adjust contrast</span> <img alt="Contrast Icon" width="20px" height="20px" :src=ContrastIcon />
38
38
  </a>
39
39
  <div
40
+ ref="contrastChoices"
40
41
  class="flex-container"
41
42
  v-if="show"
42
43
  >
@@ -82,7 +83,7 @@
82
83
  <div class="app-header__close-button mobile-close">
83
84
  <button
84
85
  v-if="
85
- (isMobileMenuOpen && this.screen === 'mobile' && !isSecondLevelOpen)
86
+ (isMobileMenuOpen && screen === 'mobile' && !isSecondLevelOpen)
86
87
  "
87
88
  ref="closeMenuButton"
88
89
  class="dark"
@@ -94,17 +95,17 @@
94
95
  </div>
95
96
  <div
96
97
  v-if="
97
- (!isSecondLevelOpen && this.screen === 'desktop') ||
98
- (!isMobileMenuOpen && this.screen === 'mobile')
98
+ (!isSecondLevelOpen && screen === 'desktop') ||
99
+ (!isMobileMenuOpen && screen === 'mobile')
99
100
  "
100
101
  class="app-header__app-branding"
101
102
  >
102
103
 
103
104
  </div>
104
105
  <nav
105
- v-if="isMobileMenuOpen || this.screen === 'desktop'"
106
+ v-if="isMobileMenuOpen || screen === 'desktop'"
106
107
  :class="{
107
- 'styled-scrollbar': this.screen === 'mobile' && !isSecondLevelOpen,
108
+ 'styled-scrollbar': screen === 'mobile' && !isSecondLevelOpen,
108
109
  }"
109
110
  >
110
111
  <ul class="app-header__nav-menu" id="navitems">
@@ -128,7 +129,7 @@
128
129
  >
129
130
  <span>{{ firstLevelLink.title }}</span>
130
131
 
131
- <caret-down v-if="this.screen === 'desktop'" class="caret-down" />
132
+ <caret-down v-if="screen === 'desktop'" class="caret-down" />
132
133
  <caret-right
133
134
  v-else-if="!isSecondLevelOpen && !isThirdLevelOpen"
134
135
  class="caret-right"
@@ -153,7 +154,7 @@
153
154
  <div v-if="isSecondLevelOpen" class="sub-nav-container">
154
155
  <div class="app-header__close-button">
155
156
  <button
156
- v-if="this.screen === 'mobile'"
157
+ v-if="screen === 'mobile'"
157
158
  ref="menuBackButton"
158
159
  class="dark"
159
160
  @click="mobileGoBack"
@@ -164,8 +165,8 @@
164
165
  </button>
165
166
  <button
166
167
  v-if="
167
- (isSecondLevelOpen && this.screen === 'desktop') ||
168
- (isMobileMenuOpen && this.screen === 'mobile')
168
+ (isSecondLevelOpen && screen === 'desktop') ||
169
+ (isMobileMenuOpen && screen === 'mobile')
169
170
  "
170
171
  ref="closeMenuButton"
171
172
  class="dark"
@@ -177,13 +178,13 @@
177
178
  </div>
178
179
  <div
179
180
  class="sub-nav-container__inner"
180
- :class="{ 'styled-scrollbar': this.screen === 'desktop' }"
181
+ :class="{ 'styled-scrollbar': screen === 'desktop' }"
181
182
  >
182
183
  <div
183
184
  class="sub-nav-container__wrap"
184
185
  :class="{
185
186
  'styled-scrollbar':
186
- this.screen === 'mobile' && isSecondLevelOpen,
187
+ screen === 'mobile' && isSecondLevelOpen,
187
188
  }"
188
189
  >
189
190
  <div
@@ -227,7 +228,7 @@
227
228
  >
228
229
  <span>{{ secondLevelLink.title }}</span>
229
230
  <caret-right
230
- v-if="!(this.screen === 'mobile' && isThirdLevelOpen)"
231
+ v-if="!(screen === 'mobile' && isThirdLevelOpen)"
231
232
  class="caret-right"
232
233
  />
233
234
  </a>
@@ -313,7 +314,7 @@
313
314
 
314
315
  <!-- More action button in bottom menu -->
315
316
 
316
- <li class="nav-item" id="moreDesktop" v-if="this.screen === 'desktop' && this.moreList.length > 0">
317
+ <li class="nav-item" id="moreDesktop" v-if="screen === 'desktop' && this.moreList.length > 0">
317
318
  <a class="dark" role="button" @click="showMore = !showMore">
318
319
  <span>More</span>
319
320
  <caret-down class="caret-down" style="padding-top: 4px; height: 16px; width: 16px"/>
@@ -374,7 +375,7 @@
374
375
  <div v-if="isSecondLevelOpen" class="sub-nav-container">
375
376
  <div class="app-header__close-button">
376
377
  <button
377
- v-if="this.screen === 'mobile'"
378
+ v-if="screen === 'mobile'"
378
379
  ref="menuBackButton"
379
380
  class="dark"
380
381
  @click="mobileGoBack"
@@ -385,8 +386,8 @@
385
386
  </button>
386
387
  <button
387
388
  v-if="
388
- (isSecondLevelOpen && this.screen === 'desktop') ||
389
- (isMobileMenuOpen && this.screen === 'mobile')
389
+ (isSecondLevelOpen && screen === 'desktop') ||
390
+ (isMobileMenuOpen && screen === 'mobile')
390
391
  "
391
392
  ref="closeMenuButton"
392
393
  class="dark"
@@ -398,11 +399,11 @@
398
399
  </div>
399
400
  <div
400
401
  class="sub-nav-container__inner"
401
- :class="{ 'styled-scrollbar': this.screen === 'desktop' }"
402
+ :class="{ 'styled-scrollbar': screen === 'desktop' }"
402
403
  >
403
404
  <div
404
405
  class="sub-nav-container__wrap"
405
- :class="{'styled-scrollbar': this.screen === 'mobile' && isSecondLevelOpen,}"
406
+ :class="{'styled-scrollbar': screen === 'mobile' && isSecondLevelOpen,}"
406
407
  >
407
408
  <div
408
409
  class="selected-title"
@@ -445,7 +446,7 @@
445
446
  >
446
447
  <span>{{ secondLevelLink.title }}</span>
447
448
  <caret-right
448
- v-if="!(this.screen === 'mobile' && isThirdLevelOpen)"
449
+ v-if="!(screen === 'mobile' && isThirdLevelOpen)"
449
450
  class="caret-right"
450
451
  />
451
452
  </a>
@@ -535,14 +536,14 @@
535
536
 
536
537
  </div>
537
538
  </li>
538
- <li v-if="isWorkWell && this.screen === 'desktop'" class="nav-item hide">
539
+ <li v-if="isWorkWell && screen === 'desktop'" class="nav-item hide">
539
540
  <a href="#" class="dark" @focus="resetTab"></a>
540
541
  </li>
541
542
  </ul>
542
543
 
543
544
 
544
545
  </nav>
545
- <div v-if="this.screen === 'mobile'" class="app-header__mobile-menu-container">
546
+ <div v-if="screen === 'mobile'" class="app-header__mobile-menu-container">
546
547
  <ul id="mobileitems">
547
548
  <li v-if="!isMobileMenuOpen">
548
549
  <a class="dark" role="button" @click.prevent="showMobileMenu">
@@ -661,6 +662,9 @@ export default {
661
662
  selectedValue: null
662
663
  }
663
664
  },
665
+
666
+ emits: ['handleContrast'],
667
+
664
668
  computed: {
665
669
  showSecondLevelCaret() {
666
670
  return (
@@ -709,6 +713,16 @@ export default {
709
713
  window.addEventListener('resize', this.updateMoreMenu())
710
714
  })
711
715
  this.updateMoreMenu()
716
+ let selectedMode = document
717
+ .getElementById('contrastStyle')
718
+ ?.getAttribute('data-sel')
719
+ this.selectedValue = selectedMode ?? 'default'
720
+ window.addEventListener('click', this.handleOutsideClick)
721
+ window.addEventListener('scroll', this.resetContrast)
722
+ },
723
+ beforeDestroy() {
724
+ window.removeEventListener('click', this.handleOutsideClick)
725
+ window.removeEventListener('scroll', this.resetContrast)
712
726
  },
713
727
  destroyed() {
714
728
  window.removeEventListener('resize', this.screenWidth),
@@ -1112,8 +1126,18 @@ export default {
1112
1126
  goToLocation(path) {
1113
1127
  this.$router.push(path)
1114
1128
  },
1129
+ handleOutsideClick(event) {
1130
+ const contentChoices = this.$refs.contrastChoices
1131
+ const contentSelect = this.$refs.selectContrast
1132
+
1133
+ // Check if the click is outside the content - both radios and Adjust contrast link
1134
+ if ((contentChoices && !contentChoices.contains(event.target)) && (contentSelect && !contentSelect.contains(event.target))) {
1135
+ this.show = !this.show
1136
+ }
1137
+ },
1115
1138
  handleContrast(event) {
1116
1139
  const selMode = event.target.value
1140
+ this.selectedValue = selMode
1117
1141
  // the css we are going to inject
1118
1142
  let cssVar = ''
1119
1143
  if (selMode === 'high_contrast') {
@@ -1165,6 +1189,11 @@ export default {
1165
1189
  style.setAttribute('data-sel', selMode) // Set a data attribute on the style element
1166
1190
  // panel collapsing after making selection
1167
1191
  this.show = !this.show
1192
+ },
1193
+ resetContrast() {
1194
+ if (this.show) {
1195
+ this.show = !this.show
1196
+ }
1168
1197
  }
1169
1198
  },
1170
1199
  }
@@ -3,19 +3,19 @@
3
3
  <button class="btbButton" @click="backToTop">
4
4
  <span>Back to top</span>
5
5
  <span class="btbButton--iconContainer">
6
- <icon :glyph="ChevUp" :width="24" :height="16" />
6
+ <icon :glyph="ChevUp" :width="24" :height="16" icon-alt="Back to top icon" />
7
7
  </span>
8
8
  </button>
9
9
  </div>
10
10
  </template>
11
11
 
12
12
  <script>
13
- import Icon from '../../SubComponents/Icon/index.vue'
14
- import ChevUp from '../../../assets/icons/chev-up.svg?raw'
15
- import { debounce } from 'lodash-es'
13
+ import Icon from "../../SubComponents/Icon/index.vue";
14
+ import ChevUp from "../../../assets/icons/chev-up.svg?raw";
15
+ import { debounce } from "lodash-es";
16
16
 
17
17
  export default {
18
- name: 'BackToTop',
18
+ name: "BackToTop",
19
19
  components: {
20
20
  Icon,
21
21
  },
@@ -29,39 +29,39 @@ export default {
29
29
  return {
30
30
  ChevUp,
31
31
  showBackToTop: false,
32
- }
32
+ };
33
33
  },
34
34
  computed: {
35
35
  showButton() {
36
36
  if (this.storybook) {
37
- return true
37
+ return true;
38
38
  } else {
39
- return this.showBackToTop
39
+ return this.showBackToTop;
40
40
  }
41
41
  },
42
42
  },
43
43
  mounted() {
44
- this.handleDebouncedScroll = debounce(this.showHideBtbBtn, 100)
45
- window.addEventListener('scroll', this.showHideBtbBtn)
44
+ this.handleDebouncedScroll = debounce(this.showHideBtbBtn, 100);
45
+ window.addEventListener("scroll", this.showHideBtbBtn);
46
46
  },
47
47
  beforeDestroy() {
48
- window.removeEventListener('scroll', this.showHideBtbBtn)
48
+ window.removeEventListener("scroll", this.showHideBtbBtn);
49
49
  },
50
50
  methods: {
51
51
  backToTop() {
52
52
  if (!this.storybook) {
53
- window.scrollTo(0, 0)
53
+ window.scrollTo(0, 0);
54
54
  } else {
55
- console.log('Is storybook, so not going back to top')
55
+ console.log("Is storybook, so not going back to top");
56
56
  }
57
57
  },
58
58
  showHideBtbBtn() {
59
- this.showBackToTop = window.scrollY > window.innerHeight / 2
59
+ this.showBackToTop = window.scrollY > window.innerHeight / 2;
60
60
  },
61
61
  },
62
- }
62
+ };
63
63
  </script>
64
64
 
65
65
  <style lang="scss" scoped>
66
- @import './styles.scss';
66
+ @import "./styles.scss";
67
67
  </style>
@@ -20,7 +20,7 @@ export default {
20
20
  <br>
21
21
  <h2>Image</h2>
22
22
  <p>This is an image</p>
23
- <img src='https://picsum.photos/900/600/?image=26' width="400" height="200"/>
23
+ <img src='https://picsum.photos/900/600/?image=26' alt="photo image" width="400" height="200"/>
24
24
  <br>
25
25
  <br>
26
26
  <h2>Background Image</h2>
@@ -12,14 +12,8 @@
12
12
  : false
13
13
  "
14
14
  >
15
- <row
16
- v-if="type === 'hero'"
17
- class="wcl-hero-header__wrap wcl-hero-header__showmore"
18
- >
19
- <container
20
- class="wcl-hero-header__content-wrapper__content"
21
- :class="{ rtl }"
22
- >
15
+ <row v-if="type === 'hero'" class="wcl-hero-header__wrap wcl-hero-header__showmore">
16
+ <container class="wcl-hero-header__content-wrapper__content" :class="{ rtl }">
23
17
  <row>
24
18
  <column class="wcl-hero-header__content-wrapper__content-col">
25
19
  <div>
@@ -28,7 +22,12 @@
28
22
  class="btn btn-link wcl-hero-header__showmore--link"
29
23
  @click="showMore"
30
24
  >
31
- <icon width="16px" height="10.61px" :glyph="CaretDown" />
25
+ <icon
26
+ width="16px"
27
+ height="10.61px"
28
+ :glyph="CaretDown"
29
+ icon-alt="expand icon"
30
+ />
32
31
  <span class="wcl-hero-header__showmore--text">Show more</span>
33
32
  </button>
34
33
  </div>
@@ -38,18 +37,14 @@
38
37
  </row>
39
38
  <row class="wcl-hero-header__wrap">
40
39
  <div class="wcl-hero-header__content-wrapper">
41
- <container
42
- class="wcl-hero-header__content-wrapper__content"
43
- :class="{ rtl }"
44
- >
40
+ <container class="wcl-hero-header__content-wrapper__content" :class="{ rtl }">
45
41
  <row>
46
42
  <column
47
43
  :xs="generateGridValue(type)"
48
44
  class="wcl-hero-header__content-wrapper__content-col"
49
45
  :md="7"
50
46
  :class="{
51
- [`wcl-hero-header__content-wrapper__content-col--split`]:
52
- $slots.side,
47
+ [`wcl-hero-header__content-wrapper__content-col--split`]: $slots.side,
53
48
  }"
54
49
  >
55
50
  <breadcrumb
@@ -64,10 +59,7 @@
64
59
  :content="strippedTitle"
65
60
  class="wcl-hero-header__title"
66
61
  />
67
- <div
68
- v-if="subTitle || $slots.description"
69
- class="header-rich-text-wrap"
70
- >
62
+ <div v-if="subTitle || $slots.description" class="header-rich-text-wrap">
71
63
  <rich-text
72
64
  v-if="subTitle"
73
65
  :content="subTitle"
@@ -120,9 +112,7 @@
120
112
  <column
121
113
  v-if="type === 'collection' && showMask"
122
114
  :sm="'7'"
123
- :style="
124
- image && image.url ? `background-image:url(${image.url})` : false
125
- "
115
+ :style="image && image.url ? `background-image:url(${image.url})` : false"
126
116
  class="wcl-hero-header__right type-collection"
127
117
  :class="{ 'rtl-flip': rtl }"
128
118
  :offset-sm="rtl ? 0 : 5"
@@ -131,6 +121,7 @@
131
121
  <img
132
122
  src="../../../assets/images/hero-header-mask.png"
133
123
  role="presentation"
124
+ alt="hero header mask"
134
125
  />
135
126
  </div>
136
127
  </column>
@@ -143,9 +134,7 @@
143
134
  :class="{ 'rtl-flip': rtl }"
144
135
  :offset-md="rtl ? 0 : 7"
145
136
  :offset-xs="rtl ? 0 : 7"
146
- :style="
147
- image && image.url ? `background-image:url(${image.url})` : false
148
- "
137
+ :style="image && image.url ? `background-image:url(${image.url})` : false"
149
138
  >
150
139
  &nbsp;
151
140
  </column>
@@ -155,19 +144,19 @@
155
144
  </container>
156
145
  </template>
157
146
  <script>
158
- import SocialShare from './../SocialShare/index.vue'
159
- import Container from './../../Containers/Container/index.vue'
160
- import Row from './../../Containers/Row/index.vue'
161
- import Column from './../../Containers/Column/index.vue'
162
- import Breadcrumb from './../../SubComponents/Breadcrumb/index.vue'
163
- import CtaButton from './../../SubComponents/CtaButton/index.vue'
164
- import Icon from './../../SubComponents/Icon/index.vue'
165
- import HeroHeaderChevron from './../../../assets/images/hero-header-chevron.svg?component'
166
- import CaretDown from './../../../assets/icons/chev-down-white.svg?url'
167
- import RichText from './../../Paragraphs/RichText/index.vue'
147
+ import SocialShare from "./../SocialShare/index.vue";
148
+ import Container from "./../../Containers/Container/index.vue";
149
+ import Row from "./../../Containers/Row/index.vue";
150
+ import Column from "./../../Containers/Column/index.vue";
151
+ import Breadcrumb from "./../../SubComponents/Breadcrumb/index.vue";
152
+ import CtaButton from "./../../SubComponents/CtaButton/index.vue";
153
+ import Icon from "./../../SubComponents/Icon/index.vue";
154
+ import HeroHeaderChevron from "./../../../assets/images/hero-header-chevron.svg?component";
155
+ import CaretDown from "./../../../assets/icons/chev-down-white.svg?url";
156
+ import RichText from "./../../Paragraphs/RichText/index.vue";
168
157
 
169
158
  export default {
170
- name: 'HeroHeader',
159
+ name: "HeroHeader",
171
160
  components: {
172
161
  Container,
173
162
  Row,
@@ -182,15 +171,15 @@ export default {
182
171
  props: {
183
172
  type: {
184
173
  type: String,
185
- default: 'default',
174
+ default: "default",
186
175
  },
187
176
  title: {
188
177
  type: String,
189
- default: '',
178
+ default: "",
190
179
  },
191
180
  description: {
192
181
  type: String,
193
- default: '',
182
+ default: "",
194
183
  },
195
184
  image: {
196
185
  type: Object,
@@ -234,33 +223,33 @@ export default {
234
223
  socialShareToggle: false,
235
224
  HeroHeaderChevron,
236
225
  CaretDown,
237
- }
226
+ };
238
227
  },
239
228
  computed: {
240
229
  generatedClass() {
241
- let c = `wcl-hero-header type-${this.type}`
230
+ let c = `wcl-hero-header type-${this.type}`;
242
231
  if (this.bgColor) {
243
- c = c + ' -with-bg'
232
+ c = c + " -with-bg";
244
233
  }
245
- return c
234
+ return c;
246
235
  },
247
236
  subTitle() {
248
- let content = undefined
237
+ let content = undefined;
249
238
  if (this.description) {
250
- if (typeof this.description === 'string') {
251
- content = this.description
252
- } else if (typeof this.description === 'object') {
253
- content = this.description.processed
239
+ if (typeof this.description === "string") {
240
+ content = this.description;
241
+ } else if (typeof this.description === "object") {
242
+ content = this.description.processed;
254
243
  }
255
244
  }
256
- if (content && !content.startsWith('<') && !this.tag?.startsWith('h')) {
257
- content = `<p class="intro">${content}</p>`
245
+ if (content && !content.startsWith("<") && !this.tag?.startsWith("h")) {
246
+ content = `<p class="intro">${content}</p>`;
258
247
  }
259
- return content
248
+ return content;
260
249
  },
261
250
  strippedTitle() {
262
- if (this.type === 'hero' && this.title.length > 122) {
263
- return this.title.slice(0, 122) + '...'
251
+ if (this.type === "hero" && this.title.length > 122) {
252
+ return this.title.slice(0, 122) + "...";
264
253
  }
265
254
  // Will reintroduce if business requirement
266
255
  // if (this.title?.includes('.')) {
@@ -269,7 +258,7 @@ export default {
269
258
  // return sentences.map((sentence) => sentence.trim()).join('.<br/>')
270
259
  // }
271
260
  // }
272
- return this.title
261
+ return this.title;
273
262
  },
274
263
  // Will reintroduce if business requirement
275
264
  // strippedDescription() {
@@ -282,57 +271,57 @@ export default {
282
271
  },
283
272
  mounted() {
284
273
  if (this.$bus) {
285
- this.$bus.$on('scrollToTop', () => {
274
+ this.$bus.$on("scrollToTop", () => {
286
275
  setTimeout(() => {
287
- const title = this.$refs.title
276
+ const title = this.$refs.title;
288
277
  if (title) {
289
- title.$el.setAttribute('tabindex', 0)
290
- title.$el.focus()
278
+ title.$el.setAttribute("tabindex", 0);
279
+ title.$el.focus();
291
280
  }
292
- }, 500)
293
- })
281
+ }, 500);
282
+ });
294
283
  }
295
284
  },
296
285
  beforeDestroy() {
297
286
  if (this.$bus) {
298
- this.$bus.$off('scrollToTop')
287
+ this.$bus.$off("scrollToTop");
299
288
  }
300
289
  },
301
290
  methods: {
302
291
  generateGridValue(type) {
303
292
  switch (type) {
304
293
  //the prop type default
305
- case 'default':
306
- return '6'
307
- case 'image':
308
- return '6'
294
+ case "default":
295
+ return "6";
296
+ case "image":
297
+ return "6";
309
298
  default:
310
- return '7'
299
+ return "7";
311
300
  }
312
301
  },
313
302
  showMore(ev) {
314
303
  if (ev?.target?.scrollIntoView) {
315
304
  ev.target.scrollIntoView({
316
- behavior: 'smooth',
305
+ behavior: "smooth",
317
306
  alignToTop: true,
318
- block: 'start',
319
- })
307
+ block: "start",
308
+ });
320
309
  }
321
310
  },
322
311
  fireGTM() {
323
312
  let attrs = {
324
313
  label: this.cta.uri,
325
314
  document_title: this.cta.filename,
326
- }
315
+ };
327
316
  if (this.$gtm) {
328
- this.$gtm.push({ event: 'custom.interaction.download', ...attrs })
317
+ this.$gtm.push({ event: "custom.interaction.download", ...attrs });
329
318
  }
330
319
  },
331
320
  },
332
- }
321
+ };
333
322
  </script>
334
323
  <style lang="scss" scoped>
335
- @import './styles';
324
+ @import "./styles";
336
325
 
337
326
  .wysiwyg {
338
327
  :deep(.cta-button:last-child) {