@worksafevictoria/wcl7.5 1.10.0 → 1.12.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 (44) 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 +40 -46
  4. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
  5. package/src/components/Common/CardGridItem/index.vue +153 -115
  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 +29 -19
  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/includes.scss +4 -2
  16. package/src/components/Global/AppHeaderNew/index.stories.js +2 -2
  17. package/src/components/Global/AppHeaderNew/index.vue +126 -386
  18. package/src/components/Global/AppHeaderNew/mobile.scss +41 -6
  19. package/src/components/Global/AppHeaderNew/styles.scss +57 -45
  20. package/src/components/Global/BackToTop/index.vue +16 -16
  21. package/src/components/Global/ContrastMode/index.stories.js +1 -1
  22. package/src/components/Global/DirectoryFilters/index.vue +24 -18
  23. package/src/components/Global/HeroHeader/index.vue +62 -73
  24. package/src/components/Global/SocialShare/index.vue +114 -129
  25. package/src/components/Global/Strip/index.vue +43 -39
  26. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +22 -24
  27. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +15 -15
  28. package/src/components/Paragraphs/Calculator/CardContainer/index.vue +74 -75
  29. package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +31 -39
  30. package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +104 -107
  31. package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +129 -64
  32. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
  33. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +112 -66
  34. package/src/components/Paragraphs/Statistics/index.vue +9 -9
  35. package/src/components/Paragraphs/Tabs/index.vue +4 -4
  36. package/src/components/Paragraphs/TabulatedData/index.vue +27 -20
  37. package/src/components/SubComponents/CtaButton/index.vue +47 -44
  38. package/src/components/SubComponents/Icon/README.md +2 -2
  39. package/src/components/SubComponents/Icon/example.js +1 -0
  40. package/src/components/SubComponents/Icon/index.stories.js +1 -1
  41. package/src/components/SubComponents/Icon/index.vue +47 -47
  42. package/src/components/SubComponents/ResourceGroup/cardbody.vue +18 -16
  43. package/src/components/SubComponents/VideoThumbnail/index.vue +8 -6
  44. package/src/mock/carousel-items.js +46 -81
@@ -1,35 +1,75 @@
1
1
  <template>
2
2
  <section-group class="paragraph--directory dir-filters">
3
3
  <!-- Filters -->
4
- <row style="column-gap: 16px;">
4
+ <row style="column-gap: 16px">
5
5
  <!-- Keyword Filters -->
6
6
  <column xxl="2" xl="3" md="4" sm="6">
7
- <label class="visually-hidden" for="search-directory">
7
+ <label class="col-form-label visually-hidden" for="keyword-search">
8
8
  Search by keyword (typed keyword automatically filters below results)
9
9
  </label>
10
- <input type="text" v-model="searchRem" placeholder="Removalist" class="search">
10
+ <input
11
+ id="keyword-search"
12
+ type="text"
13
+ v-model="searchRem"
14
+ placeholder="Removalist"
15
+ aria-label="Search by keyword (typed keyword automatically filters below results)"
16
+ class="search"
17
+ />
11
18
  </column>
12
19
  <column xxl="2" xl="3" md="4" sm="6">
13
- <label class="visually-hidden" for="search-directory">
20
+ <label class="col-form-label visually-hidden" for="suburb-search">
14
21
  Search by suburb (typed suburb automatically filters below results)
15
22
  </label>
16
- <input type="text" v-model="searchSub" placeholder="Location" class="search">
23
+ <input
24
+ id="suburb-search"
25
+ type="text"
26
+ v-model="searchSub"
27
+ placeholder="Location"
28
+ aria-label="Search by suburb (typed suburb automatically filters below results)"
29
+ class="search"
30
+ />
17
31
  </column>
18
32
  <!-- Other Filters -->
19
33
  <column xxl="2" xl="3" md="4" sm="6">
20
- <select id="filterType" v-model="searchClass" name="filter" class="selectClass">
21
- <option class="placeholder" value="" disabled hidden selected>Service class</option>
22
- <option value="Class A Asbestos Removalists">Class A Asbestos Removalists</option>
23
- <option value="Class B Asbestos Removalists">Class B Asbestos Removalists</option>
24
- <option value="Class A - Restricted - Asbestos Removalists">Class A - Restricted - Asbestos Removalists</option>
25
- <option value="Class B - Restricted - Asbestos Removalists">Class B - Restricted - Asbestos Removalists</option>
34
+ <label class="col-form-label visually-hidden" for="filterType">
35
+ Filter Type
36
+ </label>
37
+ <select
38
+ id="filterType"
39
+ v-model="searchClass"
40
+ name="filter"
41
+ class="selectClass"
42
+ aria-label="Filter Type"
43
+ >
44
+ <option class="placeholder" value="" disabled hidden selected>
45
+ Service class
46
+ </option>
47
+ <option value="Class A Asbestos Removalists">
48
+ Class A Asbestos Removalists
49
+ </option>
50
+ <option value="Class B Asbestos Removalists">
51
+ Class B Asbestos Removalists
52
+ </option>
53
+ <option value="Class A - Restricted - Asbestos Removalists">
54
+ Class A - Restricted - Asbestos Removalists
55
+ </option>
56
+ <option value="Class B - Restricted - Asbestos Removalists">
57
+ Class B - Restricted - Asbestos Removalists
58
+ </option>
26
59
  </select>
27
60
  </column>
28
61
  <column xxl="2" xl="3" md="4" sm="6">
29
- <label class="visually-hidden" for="search-directory">
62
+ <label class="col-form-label visually-hidden" for="search-services">
30
63
  Search by suburb (typed suburb automatically filters below results)
31
64
  </label>
32
- <input type="text" v-model="searchServices" placeholder="Services" class="search">
65
+ <input
66
+ id="search-services"
67
+ type="text"
68
+ v-model="searchServices"
69
+ placeholder="Services"
70
+ aria-label="Search by suburb (typed suburb automatically filters below results)"
71
+ class="search"
72
+ />
33
73
  </column>
34
74
  <column md="2">
35
75
  <filter-button
@@ -42,32 +82,29 @@
42
82
  </column>
43
83
  </row>
44
84
  <!-- AR Records -->
45
- <div class="dirRecords" >
46
- <template v-for="(item, index) in resultChunks[page]" >
47
- <ar-record v-if="item.type === 'ar'" :key="index" :item="item"/>
85
+ <div class="dirRecords">
86
+ <template v-for="(item, index) in resultChunks[page]">
87
+ <ar-record v-if="item.type === 'ar'" :key="index" :item="item" />
48
88
  </template>
49
89
  </div>
50
90
  <div v-if="filteredRecords.length > 0" align-items="center">
51
- <pagination
52
- :total-pages="totalPages"
53
- :total="totalResults"
54
- :per-page="perPage"
55
- :current-page="page + 1"
56
- @pagechanged="pageChanged($event)"
57
- />
58
- </div>
91
+ <pagination
92
+ :total-pages="totalPages"
93
+ :total="totalResults"
94
+ :per-page="perPage"
95
+ :current-page="page + 1"
96
+ @pagechanged="pageChanged($event)"
97
+ />
98
+ </div>
59
99
  <h4 v-if="filteredRecords.length === 0">No records found</h4>
60
-
61
100
  </section-group>
62
-
63
101
  </template>
64
102
 
65
103
  <script>
66
-
67
104
  import arRecord from './SingleRecord/index.vue'
68
105
  import searchIcon from './../../../../../assets/icons/search.svg?url'
69
106
  import SectionGroup from '../../../../Containers/SectionGroup/index.vue'
70
- import FilterButton from '../../../../Common/FilterButton/index.vue' //Reset
107
+ import FilterButton from '../../../../Common/FilterButton/index.vue' //Reset
71
108
  import Pagination from '../../HSCP/Records/pagination.vue'
72
109
 
73
110
  export default {
@@ -76,7 +113,7 @@ export default {
76
113
  arRecord,
77
114
  SectionGroup,
78
115
  FilterButton,
79
- Pagination
116
+ Pagination,
80
117
  },
81
118
  data() {
82
119
  return {
@@ -88,7 +125,7 @@ export default {
88
125
  perPage: 10,
89
126
  page: 0,
90
127
  searchIcon,
91
- hideReset: true
128
+ hideReset: true,
92
129
  }
93
130
  },
94
131
  props: {
@@ -97,41 +134,61 @@ export default {
97
134
  required: true,
98
135
  },
99
136
  },
100
-
101
- computed: {
102
137
 
138
+ computed: {
103
139
  filteredRecords() {
104
140
  let results = this.flatRecords
105
-
141
+
106
142
  if (this.searchRem.length) {
107
143
  this.hideReset = false
108
- results = results.filter(item => item.title.toLowerCase().includes(this.searchRem.toLowerCase()))
144
+ results = results.filter((item) =>
145
+ item.title.toLowerCase().includes(this.searchRem.toLowerCase()),
146
+ )
109
147
  }
110
148
  if (this.searchSub.length) {
111
149
  this.hideReset = false
112
- results = results.filter(item => item.fullAddress.toLowerCase().includes(this.searchSub.toLowerCase()))
150
+ results = results.filter((item) =>
151
+ item.fullAddress.toLowerCase().includes(this.searchSub.toLowerCase()),
152
+ )
113
153
  }
114
154
  if (this.searchClass.length) {
115
155
  this.hideReset = false
116
- results = results.filter(item => item.serviceCategory.toLowerCase().includes(this.searchClass.toLowerCase()))
156
+ results = results.filter((item) =>
157
+ item.serviceCategory
158
+ .toLowerCase()
159
+ .includes(this.searchClass.toLowerCase()),
160
+ )
117
161
  }
118
162
  if (this.searchServices.length) {
119
163
  this.hideReset = false
120
- results = results.filter(item => item.services.toLowerCase().includes(this.searchServices.toLowerCase()))
164
+ results = results.filter((item) =>
165
+ item.services
166
+ .toLowerCase()
167
+ .includes(this.searchServices.toLowerCase()),
168
+ )
121
169
  }
122
170
  this.filteredItems = results
123
171
 
124
- if (this.searchRem.length || this.searchSub.length || this.searchClass.length || this.searchServices.length) {
172
+ if (
173
+ this.searchRem.length ||
174
+ this.searchSub.length ||
175
+ this.searchClass.length ||
176
+ this.searchServices.length
177
+ ) {
125
178
  this.pageChanged(1)
126
179
  }
127
180
 
128
181
  return results
129
182
  },
130
-
183
+
131
184
  flatRecords() {
132
185
  let flatRecords = []
133
- const sortedItems = this.items.sort((a, b) => a.ResourceName.localeCompare(b.ResourceName, 'en', {'sensitivity': 'base'}))
134
-
186
+ const sortedItems = this.items.sort((a, b) =>
187
+ a.ResourceName.localeCompare(b.ResourceName, 'en', {
188
+ sensitivity: 'base',
189
+ }),
190
+ )
191
+
135
192
  sortedItems.forEach((record) => {
136
193
  flatRecords.push({
137
194
  type: 'ar',
@@ -141,12 +198,15 @@ export default {
141
198
  mobilePhone: record.CompanyMobile,
142
199
  email: record.CompanyEmailDisp,
143
200
  website: this.formatWebsite(record.CompanyWebURLDisp),
144
- contact1: this.returnContact(record.ContactFirstName, record.ContactLastName),
201
+ contact1: this.returnContact(
202
+ record.ContactFirstName,
203
+ record.ContactLastName,
204
+ ),
145
205
  email1: record.ContactEmail,
146
206
  phone1: record.ContactPhoneDisp,
147
207
  mobile1: record.ContactMobileDisp,
148
208
  services: record.ServicesAll.replace(/,$/, ''),
149
- serviceCategory: record.ServiceAll
209
+ serviceCategory: record.ServiceAll,
150
210
  })
151
211
  })
152
212
  return flatRecords
@@ -165,21 +225,24 @@ export default {
165
225
  },
166
226
  pageResultCount() {
167
227
  return this.resultChunks[this.page].length
168
- }
228
+ },
169
229
  },
170
-
171
- methods: {
172
230
 
231
+ methods: {
173
232
  formatWebsite(url) {
174
233
  let startUrl = url.slice(0, 3)
175
234
  let returnUrl = url
176
235
  if (startUrl.toLowerCase() === 'www') {
177
236
  returnUrl = 'https://' + url
178
- }
179
- if (startUrl.toLowerCase() !== 'htt' && startUrl.toLowerCase() !== 'www' && url !== '') {
237
+ }
238
+ if (
239
+ startUrl.toLowerCase() !== 'htt' &&
240
+ startUrl.toLowerCase() !== 'www' &&
241
+ url !== ''
242
+ ) {
180
243
  returnUrl = 'https://www.' + url
181
- }
182
- return returnUrl
244
+ }
245
+ return returnUrl
183
246
  },
184
247
 
185
248
  returnContact(firstN, lastN) {
@@ -195,13 +258,13 @@ export default {
195
258
  chunk[chunk.length - 1].push(val)
196
259
  return chunk
197
260
  },
198
- [[]]
261
+ [[]],
199
262
  )
200
263
  return chunked
201
264
  }
202
265
  return [[]]
203
266
  },
204
-
267
+
205
268
  reset() {
206
269
  this.collapseOrgs('No')
207
270
  this.hideReset = true
@@ -214,13 +277,18 @@ export default {
214
277
  pageChanged(ev) {
215
278
  this.page = ev - 1
216
279
 
217
- if (this.searchRem.length || this.searchSub.length || this.searchClass.length || this.searchServices.length) {
218
- // don't set focus
219
- // don't collapseOrgs
220
- } else {
221
- // set focus to top element - used instead of scrollTo
222
- this.collapseOrgs('Yes')
223
- }
280
+ if (
281
+ this.searchRem.length ||
282
+ this.searchSub.length ||
283
+ this.searchClass.length ||
284
+ this.searchServices.length
285
+ ) {
286
+ // don't set focus
287
+ // don't collapseOrgs
288
+ } else {
289
+ // set focus to top element - used instead of scrollTo
290
+ this.collapseOrgs('Yes')
291
+ }
224
292
  },
225
293
 
226
294
  collapseOrgs(focusLink) {
@@ -237,11 +305,9 @@ export default {
237
305
  linksArr[0].focus()
238
306
  }
239
307
  }
240
-
241
308
  },
242
309
 
243
310
  toTitleCase(strVal) {
244
-
245
311
  let retVal = strVal.trim()
246
312
 
247
313
  const firstChar = retVal.charAt(0)
@@ -252,11 +318,10 @@ export default {
252
318
 
253
319
  return retVal
254
320
  },
255
- }
321
+ },
256
322
  }
257
323
  </script>
258
324
 
259
325
  <style lang="scss" scoped>
260
- @import '../../HSCP/styles.scss'
261
-
326
+ @import '../../HSCP/styles.scss';
262
327
  </style>