@worksafevictoria/wcl7.5 1.8.0 → 1.9.0-beta.10
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/.storybook/preview.js +1 -1
- package/lib/utility.js +0 -2
- package/package.json +1 -1
- package/src/components/Common/CardGrid/index.vue +0 -3
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +39 -45
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +29 -32
- package/src/components/Common/CardGridItem/index.vue +6 -5
- 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 +0 -5
- package/src/components/Global/AppFooter/index.vue +130 -133
- 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/AppHeaderNew/styles.scss +1 -4
- 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 +62 -66
- package/src/components/Global/Strip/index.vue +82 -70
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +21 -23
- 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.stories.js +1 -1
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +105 -108
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +152 -117
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
- package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +157 -124
- package/src/components/Paragraphs/ScrollSpy/index.stories.js +23 -25
- package/src/components/Paragraphs/ScrollSpy/index.vue +33 -40
- package/src/components/Paragraphs/TabulatedData/index.vue +3 -2
- 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/ResourceGroup/index.vue +2 -1
- package/src/components/SubComponents/Search/SearchListing/index.vue +0 -2
- package/src/components/SubComponents/Search/index.vue +4 -2
- package/src/components/SubComponents/VideoThumbnail/index.vue +29 -28
- package/src/index.js +1 -1
- package/src/mock/asbestos-removalists.js +1 -1
- package/src/mock/carousel-items.js +46 -81
- package/src/mock/course-provider.js +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div>
|
|
3
3
|
<b-carousel
|
|
4
4
|
id="carousel-1"
|
|
5
|
+
:class="{carouselPara: isParagraph}"
|
|
5
6
|
v-model="slide"
|
|
6
|
-
interval=0
|
|
7
|
+
interval="0"
|
|
7
8
|
controls
|
|
8
9
|
indicators
|
|
9
10
|
keyboard
|
|
@@ -13,160 +14,170 @@
|
|
|
13
14
|
<b-carousel-slide
|
|
14
15
|
v-for="item in filteredCarouselItems"
|
|
15
16
|
:key="item.id"
|
|
16
|
-
:img-src="getImageURL(item.
|
|
17
|
-
|
|
17
|
+
:img-src="getImageURL(item.imageURL)"
|
|
18
|
+
:img-alt="item.imageAlt"
|
|
19
|
+
@click.prevent="handleClick(item.linkURL)"
|
|
18
20
|
>
|
|
19
|
-
<h4>{{ item.
|
|
21
|
+
<h4>{{ item.title }}</h4>
|
|
20
22
|
</b-carousel-slide>
|
|
21
23
|
</b-carousel>
|
|
22
24
|
</div>
|
|
23
25
|
</template>
|
|
24
26
|
|
|
25
27
|
<script>
|
|
26
|
-
import { BCarousel, BCarouselSlide } from
|
|
27
|
-
import { isAbsoluteUrl, navigateToPath } from
|
|
28
|
+
import { BCarousel, BCarouselSlide } from "bootstrap-vue-next"
|
|
29
|
+
import { isAbsoluteUrl, navigateToPath } from "../../../../lib/utility"
|
|
28
30
|
|
|
29
31
|
export default {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
name: "CarouselComponent",
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
slide: 0,
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
components: {
|
|
39
|
+
BCarousel,
|
|
40
|
+
BCarouselSlide,
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
carouselItems: {
|
|
44
|
+
type: Array,
|
|
45
|
+
required: true,
|
|
46
|
+
default: () => [],
|
|
35
47
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
storybook: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
39
51
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
required: true,
|
|
44
|
-
default: () => [],
|
|
45
|
-
},
|
|
46
|
-
storybook: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
}
|
|
52
|
+
isParagraph: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
50
55
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
filteredCarouselItems() {
|
|
59
|
+
|
|
60
|
+
var todayDate = new Date();
|
|
61
|
+
|
|
62
|
+
for (var i = 0, length = this.carouselItems.length; i < length; i++) {
|
|
63
|
+
if (this.carouselItems[i].favourite === true) {
|
|
64
|
+
this.carouselItems[i].active = 'Yes';
|
|
65
|
+
} else if (new Date(this.carouselItems[i].dateStart).valueOf() <= todayDate.valueOf()) {
|
|
66
|
+
if (new Date(this.carouselItems[i].dateEnd).valueOf() >= todayDate.valueOf()) {
|
|
58
67
|
this.carouselItems[i].active = 'Yes'
|
|
59
|
-
} else if (new Date(this.carouselItems[i].field_date_start).valueOf() <= todayDate.valueOf()) {
|
|
60
|
-
if (new Date(this.carouselItems[i].field_date_end).valueOf() >= todayDate.valueOf()) {
|
|
61
|
-
this.carouselItems[i].active = 'Yes'
|
|
62
|
-
}
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
|
-
|
|
66
|
-
let filtered = this.carouselItems.filter(e =>
|
|
67
|
-
e.active === 'Yes');
|
|
68
|
-
return filtered
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
|
|
72
|
+
let filtered = this.carouselItems.filter(e => e.active === "Yes");
|
|
73
|
+
return filtered;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
methods: {
|
|
77
|
+
|
|
78
|
+
handleClick(link) {
|
|
79
|
+
if (link) {
|
|
80
|
+
if (isAbsoluteUrl(link)) {
|
|
81
|
+
navigateToPath(link, true);
|
|
82
|
+
} else {
|
|
83
|
+
if (this.storybook) {
|
|
84
|
+
alert('This link will go to: ' + link);
|
|
77
85
|
} else {
|
|
78
|
-
|
|
79
|
-
alert('This link will go to: ' + link)
|
|
80
|
-
} else {
|
|
81
|
-
this.$router.push({ path: link })
|
|
82
|
-
}
|
|
86
|
+
this.$router.push({ path: link });
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
getImageURL(imagePath) {
|
|
88
|
-
let apiPath = this.$config ? this.$config.public.apiURL : process.env.CONTENT_API_URL;
|
|
89
|
-
let fullPath = apiPath.concat(imagePath)
|
|
90
|
-
return fullPath
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
formatDate(date) {
|
|
94
|
-
return [
|
|
95
|
-
date.getFullYear(),
|
|
96
|
-
('0' + date.getDate()).slice(-2),
|
|
97
|
-
('0' + (date.getMonth() + 1)).slice(-2)
|
|
98
|
-
].join('-')
|
|
99
89
|
}
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
getImageURL(imagePath) {
|
|
93
|
+
let apiPath = this.$config ? this.$config.public.apiURL : process.env.CONTENT_API_URL;
|
|
94
|
+
let fullPath = apiPath.concat(imagePath);
|
|
95
|
+
return fullPath;
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
formatDate(date) {
|
|
99
|
+
return [
|
|
100
|
+
date.getFullYear(),
|
|
101
|
+
('0' + date.getDate()).slice(-2),
|
|
102
|
+
('0' + (date.getMonth() + 1)).slice(-2)
|
|
103
|
+
].join('-');
|
|
100
104
|
}
|
|
101
105
|
}
|
|
106
|
+
}
|
|
102
107
|
</script>
|
|
103
108
|
|
|
104
109
|
<style lang="scss" scoped>
|
|
105
|
-
@
|
|
110
|
+
@use '../../../includes/scss/all';
|
|
106
111
|
</style>
|
|
107
112
|
|
|
108
113
|
<style>
|
|
109
|
-
.carousel {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
+
.carousel {
|
|
115
|
+
position: relative;
|
|
116
|
+
padding-bottom: 7rem;
|
|
117
|
+
max-width: 540px;
|
|
118
|
+
}
|
|
114
119
|
|
|
115
|
-
.carousel-inner {
|
|
116
|
-
|
|
117
|
-
}
|
|
120
|
+
.carousel-inner {
|
|
121
|
+
overflow: visible;
|
|
122
|
+
}
|
|
118
123
|
|
|
119
|
-
.carousel-indicators {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
124
|
+
.carousel-indicators {
|
|
125
|
+
padding-bottom: 3rem;
|
|
126
|
+
float: right;
|
|
127
|
+
right: 2% !important;
|
|
128
|
+
width: 20%;
|
|
129
|
+
justify-content: end;
|
|
130
|
+
margin-left: 80%;
|
|
131
|
+
margin-right: 0;
|
|
132
|
+
}
|
|
128
133
|
|
|
129
|
-
.carousel-indicators button {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
134
|
+
.carousel-indicators button {
|
|
135
|
+
width: 10px !important;
|
|
136
|
+
height: 10px !important;
|
|
137
|
+
border-radius: 50% !important;
|
|
138
|
+
background-color: black !important;
|
|
139
|
+
}
|
|
135
140
|
|
|
136
|
-
.carousel-indicators button:focus,
|
|
137
|
-
.carousel-indicators button:active {
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
.carousel-indicators button:focus,
|
|
142
|
+
.carousel-indicators button:active {
|
|
143
|
+
outline: none !important;
|
|
144
|
+
box-shadow: none;
|
|
145
|
+
}
|
|
140
146
|
|
|
141
|
-
|
|
147
|
+
.carousel-caption {
|
|
148
|
+
color: black;
|
|
149
|
+
top: 100%;
|
|
150
|
+
left: 0;
|
|
151
|
+
right: 20%;
|
|
152
|
+
text-align: left;
|
|
153
|
+
text-decoration: underline;
|
|
154
|
+
}
|
|
142
155
|
|
|
143
|
-
.carousel-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
right: 20%;
|
|
148
|
-
text-align: left;
|
|
149
|
-
text-decoration: underline;
|
|
150
|
-
}
|
|
156
|
+
.carousel-control-next,
|
|
157
|
+
.carousel-control-prev {
|
|
158
|
+
bottom: 7rem;
|
|
159
|
+
}
|
|
151
160
|
|
|
152
|
-
.carousel-control-
|
|
153
|
-
.carousel-control-prev
|
|
154
|
-
|
|
155
|
-
|
|
161
|
+
.carousel-control-prev:focus,
|
|
162
|
+
.carousel-control-prev:active,
|
|
163
|
+
.carousel-control-next:focus,
|
|
164
|
+
.carousel-control-next:active {
|
|
165
|
+
outline: none !important;
|
|
166
|
+
box-shadow: none;
|
|
167
|
+
}
|
|
156
168
|
|
|
157
|
-
.carousel-control-prev
|
|
158
|
-
.carousel-control-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
169
|
+
.carousel-control-prev-icon,
|
|
170
|
+
.carousel-control-next-icon {
|
|
171
|
+
height: 50px !important;
|
|
172
|
+
width: 50px !important;
|
|
173
|
+
outline:none !important;
|
|
174
|
+
}
|
|
164
175
|
|
|
165
|
-
.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
176
|
+
.carouselPara {
|
|
177
|
+
margin-left: auto;
|
|
178
|
+
margin-right: auto;
|
|
179
|
+
width: 75%;
|
|
180
|
+
height: auto;
|
|
181
|
+
}
|
|
171
182
|
|
|
172
183
|
</style>
|
|
@@ -39,8 +39,9 @@ const headerLinks = [
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export default {
|
|
42
|
-
title: '
|
|
42
|
+
title: 'Containers/HomepageHeader',
|
|
43
43
|
component: HomepageHeader,
|
|
44
|
+
tags: ['autodocs'],
|
|
44
45
|
argTypes: {
|
|
45
46
|
fetchMenu: {
|
|
46
47
|
control: 'function',
|
|
@@ -59,17 +60,4 @@ export default {
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
const
|
|
63
|
-
components: { HomepageHeader },
|
|
64
|
-
setup() {
|
|
65
|
-
return { args };
|
|
66
|
-
},
|
|
67
|
-
mounted() {
|
|
68
|
-
setTimeout(() => {
|
|
69
|
-
this.$refs.hh.renderMenu()
|
|
70
|
-
})
|
|
71
|
-
},
|
|
72
|
-
template: '<homepage-header v-bind="args" ref="hh" />'
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
export const Default = DefaultHH.bind({})
|
|
63
|
+
export const New = {}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<!-- When implemented, importing mock values for carousel to be removed. This was only for testing locally, while values not available from drupal. -->
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<div class="homepage-header">
|
|
5
3
|
<container>
|
|
@@ -56,7 +54,6 @@ import earthIcon from './../../../assets/icons/earth.svg?url'
|
|
|
56
54
|
import CarouselComponent from './../../Containers/Carousel/index.vue'
|
|
57
55
|
import Row from './../../Containers/Row/index.vue'
|
|
58
56
|
import Column from './../../Containers/Column/index.vue'
|
|
59
|
-
// import { mockCarouselItems } from '../../../mock/carousel-items'
|
|
60
57
|
|
|
61
58
|
export default {
|
|
62
59
|
name: 'HomepageHeader',
|
|
@@ -66,7 +63,6 @@ export default {
|
|
|
66
63
|
CarouselComponent,
|
|
67
64
|
Row,
|
|
68
65
|
Column,
|
|
69
|
-
// mockCarouselItems
|
|
70
66
|
},
|
|
71
67
|
props: {
|
|
72
68
|
contentParser: {
|
|
@@ -76,7 +72,6 @@ export default {
|
|
|
76
72
|
slideList: {
|
|
77
73
|
type: Array,
|
|
78
74
|
required: true,
|
|
79
|
-
// default: mockCarouselItems
|
|
80
75
|
},
|
|
81
76
|
isStorybook: {
|
|
82
77
|
type: Boolean,
|