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