@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,31 +1,63 @@
|
|
|
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="search-keyword">
|
|
8
8
|
Search by keyword (typed keyword automatically filters below results)
|
|
9
9
|
</label>
|
|
10
|
-
<input
|
|
10
|
+
<input
|
|
11
|
+
id="search-keyword"
|
|
12
|
+
type="text"
|
|
13
|
+
v-model="searchOrg"
|
|
14
|
+
placeholder="Organisation"
|
|
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="search-suburb">
|
|
14
21
|
Search by suburb (typed suburb automatically filters below results)
|
|
15
22
|
</label>
|
|
16
|
-
<input
|
|
23
|
+
<input
|
|
24
|
+
id="search-suburb"
|
|
25
|
+
type="text"
|
|
26
|
+
v-model="searchSub"
|
|
27
|
+
placeholder="Training 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
|
-
|
|
34
|
+
<label class="col-form-label visually-hidden" for="filterType">
|
|
35
|
+
Filter Type
|
|
36
|
+
</label>
|
|
37
|
+
<select
|
|
38
|
+
id="filterType"
|
|
39
|
+
v-model="searchCourse"
|
|
40
|
+
name="filter"
|
|
41
|
+
aria-label="Filter Type"
|
|
42
|
+
class="selectClass"
|
|
43
|
+
>
|
|
44
|
+
<option class="placeholder" value="" disabled hidden selected>
|
|
45
|
+
Course type
|
|
46
|
+
</option>
|
|
22
47
|
<option value="HSR Initial">HSR Initial</option>
|
|
23
48
|
<option value="HSR Refresher">HSR Refresher</option>
|
|
24
49
|
</select>
|
|
25
50
|
</column>
|
|
26
51
|
<column xxl="2" xl="3" md="4" sm="6">
|
|
27
|
-
<select
|
|
28
|
-
|
|
52
|
+
<select
|
|
53
|
+
id="filterTheme"
|
|
54
|
+
v-model="searchThemes"
|
|
55
|
+
name="filter1"
|
|
56
|
+
class="selectClass"
|
|
57
|
+
>
|
|
58
|
+
<option class="placeholder" value="" disabled hidden selected>
|
|
59
|
+
Theme
|
|
60
|
+
</option>
|
|
29
61
|
<option v-for="(opt, i) in themeOptions" :key="i" :value="opt">
|
|
30
62
|
{{ opt }}
|
|
31
63
|
</option>
|
|
@@ -42,32 +74,29 @@
|
|
|
42
74
|
</column>
|
|
43
75
|
</row>
|
|
44
76
|
<!-- HSCP Records -->
|
|
45
|
-
<div class="dirRecords"
|
|
46
|
-
<template v-for="(item, index) in resultChunks[page]"
|
|
47
|
-
<hscp-record v-if="item.type === 'hscp'" :key="index" :item="item"/>
|
|
77
|
+
<div class="dirRecords">
|
|
78
|
+
<template v-for="(item, index) in resultChunks[page]">
|
|
79
|
+
<hscp-record v-if="item.type === 'hscp'" :key="index" :item="item" />
|
|
48
80
|
</template>
|
|
49
81
|
</div>
|
|
50
82
|
<div v-if="filteredRecords.length > 0" align-items="center">
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
83
|
+
<pagination
|
|
84
|
+
:total-pages="totalPages"
|
|
85
|
+
:total="totalResults"
|
|
86
|
+
:per-page="perPage"
|
|
87
|
+
:current-page="page + 1"
|
|
88
|
+
@pagechanged="pageChanged($event)"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
59
91
|
<h4 v-if="filteredRecords.length === 0">No records found</h4>
|
|
60
|
-
|
|
61
92
|
</section-group>
|
|
62
|
-
|
|
63
93
|
</template>
|
|
64
94
|
|
|
65
95
|
<script>
|
|
66
|
-
|
|
67
96
|
import hscpRecord from './SingleRecord/index.vue'
|
|
68
97
|
import searchIcon from './../../../../../assets/icons/search.svg?url'
|
|
69
98
|
import SectionGroup from '../../../../Containers/SectionGroup/index.vue'
|
|
70
|
-
import FilterButton from '../../../../Common/FilterButton/index.vue'
|
|
99
|
+
import FilterButton from '../../../../Common/FilterButton/index.vue' //Reset
|
|
71
100
|
import Pagination from './pagination.vue'
|
|
72
101
|
|
|
73
102
|
export default {
|
|
@@ -76,7 +105,7 @@ export default {
|
|
|
76
105
|
hscpRecord,
|
|
77
106
|
SectionGroup,
|
|
78
107
|
FilterButton,
|
|
79
|
-
Pagination
|
|
108
|
+
Pagination,
|
|
80
109
|
},
|
|
81
110
|
data() {
|
|
82
111
|
return {
|
|
@@ -88,7 +117,7 @@ export default {
|
|
|
88
117
|
perPage: 10,
|
|
89
118
|
page: 0,
|
|
90
119
|
searchIcon,
|
|
91
|
-
hideReset: true
|
|
120
|
+
hideReset: true,
|
|
92
121
|
}
|
|
93
122
|
},
|
|
94
123
|
props: {
|
|
@@ -97,12 +126,11 @@ export default {
|
|
|
97
126
|
required: true,
|
|
98
127
|
},
|
|
99
128
|
},
|
|
100
|
-
|
|
101
|
-
computed: {
|
|
102
129
|
|
|
130
|
+
computed: {
|
|
103
131
|
themeOptions() {
|
|
104
132
|
// Concatenate all themes, remove duplicates, sort and use for a drop-down list
|
|
105
|
-
let allThemes = this.flatRecords.map(a => a.themes)
|
|
133
|
+
let allThemes = this.flatRecords.map((a) => a.themes)
|
|
106
134
|
allThemes = allThemes.join(',')
|
|
107
135
|
allThemes = allThemes.trim()
|
|
108
136
|
allThemes = allThemes.split(',')
|
|
@@ -118,12 +146,12 @@ export default {
|
|
|
118
146
|
// Sort the themes
|
|
119
147
|
let sortedThemes = allThemes.sort((a, b) => {
|
|
120
148
|
if (a.trim() < b.trim()) {
|
|
121
|
-
return -1
|
|
149
|
+
return -1
|
|
122
150
|
}
|
|
123
151
|
if (a.trim() > b.trim()) {
|
|
124
|
-
return 1
|
|
152
|
+
return 1
|
|
125
153
|
}
|
|
126
|
-
return 0
|
|
154
|
+
return 0
|
|
127
155
|
})
|
|
128
156
|
allThemes = sortedThemes
|
|
129
157
|
|
|
@@ -132,44 +160,59 @@ export default {
|
|
|
132
160
|
|
|
133
161
|
filteredRecords() {
|
|
134
162
|
let results = this.flatRecords
|
|
135
|
-
|
|
163
|
+
|
|
136
164
|
if (this.searchOrg.length) {
|
|
137
165
|
this.hideReset = false
|
|
138
|
-
results = results.filter(item =>
|
|
166
|
+
results = results.filter((item) =>
|
|
167
|
+
item.title.toLowerCase().includes(this.searchOrg.toLowerCase()),
|
|
168
|
+
)
|
|
139
169
|
}
|
|
140
170
|
if (this.searchSub.length) {
|
|
141
171
|
this.hideReset = false
|
|
142
|
-
results = results.filter(item =>
|
|
172
|
+
results = results.filter((item) =>
|
|
173
|
+
item.trainingVenues
|
|
174
|
+
.toLowerCase()
|
|
175
|
+
.includes(this.searchSub.toLowerCase()),
|
|
176
|
+
)
|
|
143
177
|
}
|
|
144
178
|
if (this.searchCourse.length) {
|
|
145
179
|
this.hideReset = false
|
|
146
|
-
results = results.filter(item =>
|
|
180
|
+
results = results.filter((item) =>
|
|
181
|
+
item.courses.toLowerCase().includes(this.searchCourse.toLowerCase()),
|
|
182
|
+
)
|
|
147
183
|
}
|
|
148
184
|
if (this.searchThemes.length) {
|
|
149
185
|
this.hideReset = false
|
|
150
|
-
results = results.filter(item =>
|
|
186
|
+
results = results.filter((item) =>
|
|
187
|
+
item.themes.toLowerCase().includes(this.searchThemes.toLowerCase()),
|
|
188
|
+
)
|
|
151
189
|
}
|
|
152
190
|
this.filteredItems = results
|
|
153
191
|
|
|
154
|
-
if (
|
|
192
|
+
if (
|
|
193
|
+
this.searchOrg.length ||
|
|
194
|
+
this.searchSub.length ||
|
|
195
|
+
this.searchCourse.length ||
|
|
196
|
+
this.searchThemes.length
|
|
197
|
+
) {
|
|
155
198
|
this.pageChanged(1)
|
|
156
199
|
}
|
|
157
200
|
|
|
158
201
|
return results
|
|
159
202
|
},
|
|
160
|
-
|
|
203
|
+
|
|
161
204
|
flatRecords() {
|
|
162
205
|
let flatRecords = []
|
|
163
206
|
const sortedItems = this.items.sort((a, b) => {
|
|
164
207
|
if (a.Organisation < b.Organisation) {
|
|
165
|
-
return -1
|
|
208
|
+
return -1
|
|
166
209
|
}
|
|
167
210
|
if (a.Organisation > b.Organisation) {
|
|
168
|
-
return 1
|
|
211
|
+
return 1
|
|
169
212
|
}
|
|
170
|
-
return 0
|
|
213
|
+
return 0
|
|
171
214
|
})
|
|
172
|
-
|
|
215
|
+
sortedItems.forEach((record) => {
|
|
173
216
|
flatRecords.push({
|
|
174
217
|
type: 'hscp',
|
|
175
218
|
title: record.Organisation,
|
|
@@ -187,7 +230,7 @@ export default {
|
|
|
187
230
|
phone2: record.Contact_2_Phone,
|
|
188
231
|
courses: record.Training_courses.replace(/,$/, ''),
|
|
189
232
|
themes: record.Themes.replace(/,$/, ''),
|
|
190
|
-
trainingVenues: record.Training_venues
|
|
233
|
+
trainingVenues: record.Training_venues,
|
|
191
234
|
})
|
|
192
235
|
})
|
|
193
236
|
return flatRecords
|
|
@@ -206,20 +249,23 @@ export default {
|
|
|
206
249
|
},
|
|
207
250
|
pageResultCount() {
|
|
208
251
|
return this.resultChunks[this.page].length
|
|
209
|
-
}
|
|
252
|
+
},
|
|
210
253
|
},
|
|
211
|
-
|
|
212
|
-
methods: {
|
|
213
254
|
|
|
255
|
+
methods: {
|
|
214
256
|
formatWebsite(url) {
|
|
215
257
|
let startUrl = url.slice(0, 3)
|
|
216
258
|
let returnUrl = url
|
|
217
259
|
if (startUrl.toLowerCase() === 'www') {
|
|
218
260
|
returnUrl = 'https://' + url
|
|
219
|
-
}
|
|
220
|
-
if (
|
|
261
|
+
}
|
|
262
|
+
if (
|
|
263
|
+
startUrl.toLowerCase() !== 'htt' &&
|
|
264
|
+
startUrl.toLowerCase() !== 'www' &&
|
|
265
|
+
url !== ''
|
|
266
|
+
) {
|
|
221
267
|
returnUrl = 'https://www.' + url
|
|
222
|
-
}
|
|
268
|
+
}
|
|
223
269
|
return returnUrl
|
|
224
270
|
},
|
|
225
271
|
|
|
@@ -231,13 +277,13 @@ export default {
|
|
|
231
277
|
chunk[chunk.length - 1].push(val)
|
|
232
278
|
return chunk
|
|
233
279
|
},
|
|
234
|
-
[[]]
|
|
280
|
+
[[]],
|
|
235
281
|
)
|
|
236
282
|
return chunked
|
|
237
283
|
}
|
|
238
284
|
return [[]]
|
|
239
285
|
},
|
|
240
|
-
|
|
286
|
+
|
|
241
287
|
reset() {
|
|
242
288
|
this.collapseOrgs('No')
|
|
243
289
|
this.hideReset = true
|
|
@@ -250,13 +296,18 @@ export default {
|
|
|
250
296
|
pageChanged(ev) {
|
|
251
297
|
this.page = ev - 1
|
|
252
298
|
|
|
253
|
-
if (
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
299
|
+
if (
|
|
300
|
+
this.searchOrg.length ||
|
|
301
|
+
this.searchSub.length ||
|
|
302
|
+
this.searchCourse.length ||
|
|
303
|
+
this.searchThemes.length
|
|
304
|
+
) {
|
|
305
|
+
// don't set focus
|
|
306
|
+
// don't collapseOrgs
|
|
307
|
+
} else {
|
|
308
|
+
// set focus to top element - used instead of scrollTo
|
|
309
|
+
this.collapseOrgs('Yes')
|
|
310
|
+
}
|
|
260
311
|
},
|
|
261
312
|
|
|
262
313
|
collapseOrgs(focusLink) {
|
|
@@ -273,11 +324,9 @@ export default {
|
|
|
273
324
|
linksArr[0].focus()
|
|
274
325
|
}
|
|
275
326
|
}
|
|
276
|
-
|
|
277
327
|
},
|
|
278
328
|
|
|
279
329
|
toTitleCase(strVal) {
|
|
280
|
-
|
|
281
330
|
let retVal = strVal.trim()
|
|
282
331
|
|
|
283
332
|
const firstChar = retVal.charAt(0)
|
|
@@ -288,13 +337,10 @@ export default {
|
|
|
288
337
|
|
|
289
338
|
return retVal
|
|
290
339
|
},
|
|
291
|
-
}
|
|
340
|
+
},
|
|
292
341
|
}
|
|
293
342
|
</script>
|
|
294
343
|
|
|
295
344
|
<style lang="scss" scoped>
|
|
296
|
-
|
|
297
|
-
@import '../styles.scss'
|
|
298
|
-
|
|
299
|
-
|
|
345
|
+
@import '../styles.scss';
|
|
300
346
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<card-grid
|
|
3
3
|
:title="title"
|
|
4
|
-
:title-tag="headingTag"
|
|
4
|
+
:title-tag="headingTag || 'h3'"
|
|
5
5
|
:cards="itemList"
|
|
6
6
|
:rtl="rtl"
|
|
7
7
|
:force-md-columns-per-row="columns < 3 ? 3 : columns"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
class="statistics__grid"
|
|
10
10
|
>
|
|
11
11
|
<template v-slot:cardItem="{ card }">
|
|
12
|
-
<hr class="statistics__hr" />
|
|
12
|
+
<hr class="statistics__hr" aria-hidden="true" />
|
|
13
13
|
<card-grid-item
|
|
14
14
|
:card-header-title="card.statistic"
|
|
15
15
|
:header-tag="'div'"
|
|
@@ -47,25 +47,25 @@ export default {
|
|
|
47
47
|
props: {
|
|
48
48
|
title: {
|
|
49
49
|
type: String,
|
|
50
|
-
default: null
|
|
50
|
+
default: null,
|
|
51
51
|
},
|
|
52
52
|
headingTag: {
|
|
53
53
|
type: String,
|
|
54
|
-
default: 'h2'
|
|
54
|
+
default: 'h2',
|
|
55
55
|
},
|
|
56
56
|
itemList: {
|
|
57
57
|
type: Array,
|
|
58
|
-
required: true
|
|
58
|
+
required: true,
|
|
59
59
|
},
|
|
60
60
|
rtl: {
|
|
61
61
|
type: Boolean,
|
|
62
|
-
default: false
|
|
62
|
+
default: false,
|
|
63
63
|
},
|
|
64
64
|
columns: {
|
|
65
65
|
type: Number,
|
|
66
|
-
default: 3
|
|
67
|
-
}
|
|
68
|
-
}
|
|
66
|
+
default: 3,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
69
|
}
|
|
70
70
|
</script>
|
|
71
71
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
:class="`paragraph--tabs ${workwell ? 'workwell' : ''}`"
|
|
14
14
|
>
|
|
15
15
|
<template v-slot:cardItem>
|
|
16
|
-
<
|
|
17
|
-
<
|
|
16
|
+
<BTabs v-model:index="tabIndex" card>
|
|
17
|
+
<BTab
|
|
18
18
|
v-for="(item, index) in items"
|
|
19
19
|
:key="`${index}-${$.uid}`"
|
|
20
20
|
:title="item.title"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
:content="item.content.value"
|
|
25
25
|
:without-container="true"
|
|
26
26
|
/>
|
|
27
|
-
</
|
|
28
|
-
</
|
|
27
|
+
</BTab>
|
|
28
|
+
</BTabs>
|
|
29
29
|
</template>
|
|
30
30
|
</card-grid>
|
|
31
31
|
<container v-else class="pdf-tabs">
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:size="'content'"
|
|
6
6
|
>
|
|
7
7
|
<div :class="isFluid ? 'table-scrolled' : ''">
|
|
8
|
-
<
|
|
8
|
+
<BTable
|
|
9
9
|
v-if="items"
|
|
10
10
|
:items="items"
|
|
11
11
|
:fields="fields"
|
|
@@ -17,11 +17,18 @@
|
|
|
17
17
|
:responsive="!isFluid"
|
|
18
18
|
:stacked="!isFluid ? 'sm' : false"
|
|
19
19
|
:must-sort="true"
|
|
20
|
+
:tbody-tr-attrs="
|
|
21
|
+
() => ({
|
|
22
|
+
role: 'button',
|
|
23
|
+
tabindex: 0,
|
|
24
|
+
})
|
|
25
|
+
"
|
|
20
26
|
>
|
|
21
27
|
<template #head()="data">
|
|
22
28
|
<span
|
|
23
29
|
class="iconHeader table-active"
|
|
24
30
|
tabindex="0"
|
|
31
|
+
role="button"
|
|
25
32
|
@keypress.enter="accessSort(data.field)"
|
|
26
33
|
scope="colgroup"
|
|
27
34
|
>
|
|
@@ -31,13 +38,13 @@
|
|
|
31
38
|
v-if="data.field.thAttr['aria-sort'] === 'ascending'"
|
|
32
39
|
:src="CaretUp"
|
|
33
40
|
alt="image indicating ascending sort"
|
|
34
|
-
class="
|
|
41
|
+
class="collapse icon"
|
|
35
42
|
/>
|
|
36
43
|
<img
|
|
37
44
|
v-else-if="data.field.thAttr['aria-sort'] === 'descending'"
|
|
38
45
|
:src="CaretDown"
|
|
39
46
|
alt="image indicating descending sort"
|
|
40
|
-
class="
|
|
47
|
+
class="expand icon"
|
|
41
48
|
/>
|
|
42
49
|
</span>
|
|
43
50
|
</span>
|
|
@@ -45,20 +52,20 @@
|
|
|
45
52
|
<template #cell()="data">
|
|
46
53
|
<rich-text :content="data.value" />
|
|
47
54
|
</template>
|
|
48
|
-
</
|
|
55
|
+
</BTable>
|
|
49
56
|
</div>
|
|
50
57
|
</section-group>
|
|
51
58
|
</template>
|
|
52
59
|
|
|
53
60
|
<script>
|
|
54
|
-
import SectionGroup from
|
|
55
|
-
import RichText from
|
|
56
|
-
import { BTable } from
|
|
57
|
-
import CaretUp from
|
|
58
|
-
import CaretDown from
|
|
61
|
+
import SectionGroup from './../../Containers/SectionGroup/index.vue'
|
|
62
|
+
import RichText from '../../Paragraphs/RichText/index.vue'
|
|
63
|
+
import { BTable } from 'bootstrap-vue-next'
|
|
64
|
+
import CaretUp from './../../../assets/icons/caret-up.svg?url'
|
|
65
|
+
import CaretDown from './../../../assets/icons/caret-down.svg?url'
|
|
59
66
|
|
|
60
67
|
export default {
|
|
61
|
-
name:
|
|
68
|
+
name: 'TabulatedData',
|
|
62
69
|
components: { SectionGroup, RichText, BTable },
|
|
63
70
|
props: {
|
|
64
71
|
items: {
|
|
@@ -79,7 +86,7 @@ export default {
|
|
|
79
86
|
},
|
|
80
87
|
caption: {
|
|
81
88
|
type: String,
|
|
82
|
-
default:
|
|
89
|
+
default: '',
|
|
83
90
|
required: false,
|
|
84
91
|
},
|
|
85
92
|
sortBy: {
|
|
@@ -90,33 +97,33 @@ export default {
|
|
|
90
97
|
},
|
|
91
98
|
data() {
|
|
92
99
|
return {
|
|
93
|
-
newSortBy: this.sortBy ? [{ key: this.sortBy, order:
|
|
100
|
+
newSortBy: this.sortBy ? [{ key: this.sortBy, order: 'asc' }] : [],
|
|
94
101
|
//sortDesc: false,
|
|
95
102
|
CaretUp,
|
|
96
103
|
CaretDown,
|
|
97
|
-
}
|
|
104
|
+
}
|
|
98
105
|
},
|
|
99
106
|
computed: {
|
|
100
107
|
isFluid() {
|
|
101
|
-
return this.isFixedWidth
|
|
108
|
+
return this.isFixedWidth
|
|
102
109
|
},
|
|
103
110
|
},
|
|
104
111
|
methods: {
|
|
105
112
|
accessSort(fieldVar) {
|
|
106
|
-
const currentSort = fieldVar.thAttr[
|
|
107
|
-
if (currentSort ===
|
|
108
|
-
this.newSortBy = [{ key: fieldVar.key, order:
|
|
113
|
+
const currentSort = fieldVar.thAttr['aria-sort']
|
|
114
|
+
if (currentSort === 'ascending') {
|
|
115
|
+
this.newSortBy = [{ key: fieldVar.key, order: 'desc' }]
|
|
109
116
|
} else {
|
|
110
|
-
this.newSortBy = [{ key: fieldVar.key, order:
|
|
117
|
+
this.newSortBy = [{ key: fieldVar.key, order: 'asc' }]
|
|
111
118
|
}
|
|
112
119
|
},
|
|
113
120
|
},
|
|
114
|
-
}
|
|
121
|
+
}
|
|
115
122
|
</script>
|
|
116
123
|
|
|
117
124
|
<style lang="scss">
|
|
118
125
|
.paragraph--tabulated-data {
|
|
119
|
-
@import
|
|
126
|
+
@import '../../../includes/scss/all';
|
|
120
127
|
|
|
121
128
|
.section-group__block {
|
|
122
129
|
margin-top: -32px;
|