@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.
- package/package.json +1 -1
- package/src/assets/styles/generated-icons.scss +46 -46
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +40 -46
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
- package/src/components/Common/CardGridItem/index.vue +153 -115
- package/src/components/Containers/Carousel/index.stories.js +6 -4
- package/src/components/Containers/Carousel/index.vue +131 -120
- package/src/components/Containers/HomepageHeader/index.stories.js +1 -1
- package/src/components/Containers/HomepageHeaderNew/index.stories.js +3 -15
- package/src/components/Containers/HomepageHeaderNew/index.vue +3 -7
- package/src/components/Global/AppFooter/index.vue +29 -19
- package/src/components/Global/AppHeader/ModalSearch/index.vue +7 -1
- package/src/components/Global/AppHeader/index.stories.js +2 -2
- package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +21 -17
- package/src/components/Global/AppHeaderNew/includes.scss +4 -2
- package/src/components/Global/AppHeaderNew/index.stories.js +2 -2
- package/src/components/Global/AppHeaderNew/index.vue +126 -386
- package/src/components/Global/AppHeaderNew/mobile.scss +41 -6
- package/src/components/Global/AppHeaderNew/styles.scss +57 -45
- package/src/components/Global/BackToTop/index.vue +16 -16
- package/src/components/Global/ContrastMode/index.stories.js +1 -1
- package/src/components/Global/DirectoryFilters/index.vue +24 -18
- package/src/components/Global/HeroHeader/index.vue +62 -73
- package/src/components/Global/SocialShare/index.vue +114 -129
- package/src/components/Global/Strip/index.vue +43 -39
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +22 -24
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +15 -15
- package/src/components/Paragraphs/Calculator/CardContainer/index.vue +74 -75
- package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +31 -39
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +104 -107
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +129 -64
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
- package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +112 -66
- package/src/components/Paragraphs/Statistics/index.vue +9 -9
- package/src/components/Paragraphs/Tabs/index.vue +4 -4
- package/src/components/Paragraphs/TabulatedData/index.vue +27 -20
- package/src/components/SubComponents/CtaButton/index.vue +47 -44
- package/src/components/SubComponents/Icon/README.md +2 -2
- package/src/components/SubComponents/Icon/example.js +1 -0
- package/src/components/SubComponents/Icon/index.stories.js +1 -1
- package/src/components/SubComponents/Icon/index.vue +47 -47
- package/src/components/SubComponents/ResourceGroup/cardbody.vue +18 -16
- package/src/components/SubComponents/VideoThumbnail/index.vue +8 -6
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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-
|
|
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
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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'
|
|
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 =>
|
|
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 =>
|
|
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 =>
|
|
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 =>
|
|
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 (
|
|
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) =>
|
|
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(
|
|
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 (
|
|
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 (
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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>
|