@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
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:height="glyphHeight"
|
|
14
14
|
:glyph="glyph"
|
|
15
15
|
:class="glyphClass"
|
|
16
|
+
icon-alt="button icon"
|
|
16
17
|
/>
|
|
17
18
|
<arrow-right v-else-if="!rtl && !textOnly" :class="glyphClass" />
|
|
18
19
|
<arrow-left v-else-if="!textOnly" :class="glyphClass" />
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
:height="glyphHeight"
|
|
37
38
|
:glyph="glyph"
|
|
38
39
|
:class="glyphClass"
|
|
40
|
+
icon-alt="anchor icon"
|
|
39
41
|
/>
|
|
40
42
|
<arrow-right v-else-if="!rtl && !textOnly" :class="glyphClass" />
|
|
41
43
|
<arrow-left v-else-if="!textOnly" :class="glyphClass" />
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
:height="glyphHeight"
|
|
60
62
|
:glyph="glyph"
|
|
61
63
|
:class="glyphClass"
|
|
64
|
+
icon-alt="link icon"
|
|
62
65
|
/>
|
|
63
66
|
<arrow-right v-else-if="!rtl && !textOnly" :class="glyphClass" />
|
|
64
67
|
<arrow-left v-else-if="!textOnly" :class="glyphClass" />
|
|
@@ -66,12 +69,12 @@
|
|
|
66
69
|
</template>
|
|
67
70
|
|
|
68
71
|
<script>
|
|
69
|
-
import arrowRight from
|
|
70
|
-
import arrowLeft from
|
|
71
|
-
import icon from
|
|
72
|
+
import arrowRight from "../../../assets/icons/arrow-right.svg?component";
|
|
73
|
+
import arrowLeft from "../../../assets/icons/arrow-left.svg?component";
|
|
74
|
+
import icon from "./../Icon/index.vue";
|
|
72
75
|
|
|
73
76
|
export default {
|
|
74
|
-
name:
|
|
77
|
+
name: "CtaButton",
|
|
75
78
|
components: {
|
|
76
79
|
arrowRight,
|
|
77
80
|
arrowLeft,
|
|
@@ -80,18 +83,18 @@ export default {
|
|
|
80
83
|
props: {
|
|
81
84
|
type: {
|
|
82
85
|
type: String,
|
|
83
|
-
default:
|
|
86
|
+
default: "default",
|
|
84
87
|
validator: (value) =>
|
|
85
|
-
[
|
|
88
|
+
["default", "white", "gray", "workwell", "dark"].indexOf(value) >= 0,
|
|
86
89
|
},
|
|
87
90
|
url: {
|
|
88
91
|
type: String,
|
|
89
92
|
required: false,
|
|
90
|
-
default:
|
|
93
|
+
default: "",
|
|
91
94
|
},
|
|
92
95
|
alt: {
|
|
93
96
|
type: String,
|
|
94
|
-
default:
|
|
97
|
+
default: "",
|
|
95
98
|
},
|
|
96
99
|
rtl: {
|
|
97
100
|
type: Boolean,
|
|
@@ -138,15 +141,15 @@ export default {
|
|
|
138
141
|
},
|
|
139
142
|
focusOutline: {
|
|
140
143
|
type: String,
|
|
141
|
-
default:
|
|
142
|
-
validator: (value) => [
|
|
144
|
+
default: "default",
|
|
145
|
+
validator: (value) => ["default", "light", "dark"].indexOf(value) >= 0,
|
|
143
146
|
},
|
|
144
147
|
},
|
|
145
148
|
data() {
|
|
146
149
|
return {
|
|
147
150
|
arrowRight,
|
|
148
151
|
arrowLeft,
|
|
149
|
-
}
|
|
152
|
+
};
|
|
150
153
|
},
|
|
151
154
|
computed: {
|
|
152
155
|
// var r = new RegExp('^(?:[a-z]+:)?//', 'i');
|
|
@@ -158,81 +161,81 @@ export default {
|
|
|
158
161
|
// r.test('/myfolder/test.txt'); // false - relative URL
|
|
159
162
|
// r.test('test'); // false - also relative URL
|
|
160
163
|
isAbsolute() {
|
|
161
|
-
let r = new RegExp(
|
|
162
|
-
return r.test(this.url)
|
|
164
|
+
let r = new RegExp("^(?:[a-z]+:)?//", "i");
|
|
165
|
+
return r.test(this.url);
|
|
163
166
|
},
|
|
164
167
|
// Some links come out of Drupal in the format `entity:node/551`
|
|
165
168
|
// As an interim solution, make the link go to `node/551` and it
|
|
166
169
|
// will render correctly. Not ideal as it doesn't forward to the
|
|
167
170
|
// friendly link. Should come out of Drupal with a proper alias.
|
|
168
171
|
linkUriProcessed() {
|
|
169
|
-
if (this.url?.indexOf(
|
|
170
|
-
return this.url.slice(7)
|
|
171
|
-
} else if (this.url?.indexOf(
|
|
172
|
-
return this.url.slice(9)
|
|
172
|
+
if (this.url?.indexOf("entity:") === 0) {
|
|
173
|
+
return this.url.slice(7);
|
|
174
|
+
} else if (this.url?.indexOf("internal:") === 0) {
|
|
175
|
+
return this.url.slice(9);
|
|
173
176
|
} else {
|
|
174
|
-
return this.url
|
|
177
|
+
return this.url;
|
|
175
178
|
}
|
|
176
179
|
},
|
|
177
180
|
generatedClass() {
|
|
178
|
-
return `wcl-cta ${this.type} ${this.rtl ?
|
|
179
|
-
this.workwell ?
|
|
180
|
-
} ${this.isCentred ?
|
|
181
|
-
this.textOnly ?
|
|
182
|
-
} ${this.stretch ?
|
|
183
|
-
|
|
184
|
-
}
|
|
181
|
+
return `wcl-cta ${this.type} ${this.rtl ? "rtl" : ""} ${
|
|
182
|
+
this.workwell ? "workwell" : ""
|
|
183
|
+
} ${this.isCentred ? "text-center" : ""} ${
|
|
184
|
+
this.textOnly ? "wcl-cta--text-only" : ""
|
|
185
|
+
} ${this.stretch ? "wcl-cta--stretch" : ""} ${this.slim ? "wcl-cta--slim" : ""} ${
|
|
186
|
+
"wcl-cta--focus-" + this.focusOutline
|
|
187
|
+
}`;
|
|
185
188
|
},
|
|
186
189
|
glyphClass() {
|
|
187
|
-
const hasArrow = !this.glyph && !this.textOnly
|
|
190
|
+
const hasArrow = !this.glyph && !this.textOnly;
|
|
188
191
|
return this.isCentred
|
|
189
|
-
? { [
|
|
192
|
+
? { ["wcl-cta__arrow"]: hasArrow }
|
|
190
193
|
: {
|
|
191
|
-
[
|
|
192
|
-
}
|
|
194
|
+
["wcl-cta__arrow"]: hasArrow,
|
|
195
|
+
};
|
|
193
196
|
},
|
|
194
197
|
textClass() {
|
|
195
|
-
return this.isCentred ? {} : {}
|
|
198
|
+
return this.isCentred ? {} : {};
|
|
196
199
|
},
|
|
197
200
|
},
|
|
198
201
|
methods: {
|
|
199
202
|
clicked() {
|
|
200
|
-
var theEl = this.$el.getElementsByClassName(
|
|
201
|
-
var attrs
|
|
203
|
+
var theEl = this.$el.getElementsByClassName("wcl-cta__link-text");
|
|
204
|
+
var attrs;
|
|
202
205
|
if (theEl && theEl.length > 0) {
|
|
203
206
|
attrs = {
|
|
204
207
|
//group: this.$store?.state?.page?.content?.title,
|
|
205
208
|
group: this.$pageStore?.content?.title,
|
|
206
|
-
label: theEl[0]?.innerText?.split(
|
|
209
|
+
label: theEl[0]?.innerText?.split("\n")[0],
|
|
207
210
|
data: this.url,
|
|
208
|
-
}
|
|
211
|
+
};
|
|
209
212
|
} else {
|
|
210
213
|
attrs = {
|
|
211
214
|
//group: this.$store?.state?.page?.content?.title,
|
|
212
215
|
group: this.$pageStore?.content?.title,
|
|
213
|
-
label:
|
|
216
|
+
label: "",
|
|
214
217
|
data: this.url,
|
|
215
|
-
}
|
|
218
|
+
};
|
|
216
219
|
}
|
|
217
220
|
// push event to gtm
|
|
218
221
|
if (this.$gtm) {
|
|
219
|
-
this.$gtm.push({ event:
|
|
222
|
+
this.$gtm.push({ event: "custom.interaction.cta.click", ...attrs });
|
|
220
223
|
}
|
|
221
224
|
// navigate to url
|
|
222
225
|
if (!this.url) {
|
|
223
226
|
//donothing
|
|
224
227
|
} else if (this.isAbsolute) {
|
|
225
|
-
window.open(this.url)
|
|
228
|
+
window.open(this.url);
|
|
226
229
|
} else {
|
|
227
|
-
this.$router.push(this.url)
|
|
230
|
+
this.$router.push(this.url);
|
|
228
231
|
}
|
|
229
|
-
this.$emit(
|
|
232
|
+
this.$emit("clicked");
|
|
230
233
|
},
|
|
231
234
|
},
|
|
232
|
-
}
|
|
235
|
+
};
|
|
233
236
|
</script>
|
|
234
237
|
<style lang="scss" scoped>
|
|
235
|
-
@import
|
|
238
|
+
@import "../../../includes/scss/all";
|
|
236
239
|
// styles can be found in global src/assets/styles/stylesheet.scss
|
|
237
240
|
// this is because rich text html can dynamically specify cta button class
|
|
238
241
|
.wcl-cta {
|
|
@@ -245,12 +248,12 @@ export default {
|
|
|
245
248
|
&--focus {
|
|
246
249
|
&-light {
|
|
247
250
|
&:focus {
|
|
248
|
-
@include focus-outline(
|
|
251
|
+
@include focus-outline("light");
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
254
|
&-dark {
|
|
252
255
|
&:focus {
|
|
253
|
-
@include focus-outline(
|
|
256
|
+
@include focus-outline("dark");
|
|
254
257
|
}
|
|
255
258
|
}
|
|
256
259
|
}
|
|
@@ -9,8 +9,8 @@ Import the Icon component, and give it the URL path to the SVG file. When webpac
|
|
|
9
9
|
```html
|
|
10
10
|
<template>
|
|
11
11
|
<div id="app">
|
|
12
|
-
<icon width="100" height="100" :glyph="Logo"></icon>
|
|
13
|
-
<icon width="100" height="100" :glyph="Close"></icon>
|
|
12
|
+
<icon width="100" height="100" :glyph="Logo" icon-alt="Logo icon"></icon>
|
|
13
|
+
<icon width="100" height="100" :glyph="Close" icon-alt="Close icon"></icon>
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
aria-hidden="true"
|
|
8
8
|
:class="
|
|
9
9
|
className +
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
(first ? ' icon_first' : '') +
|
|
11
|
+
(last ? ' icon_last' : '') +
|
|
12
|
+
(inverted ? ' icon--inverted' : '')
|
|
13
13
|
"
|
|
14
14
|
:width="width"
|
|
15
15
|
:height="height"
|
|
@@ -24,104 +24,104 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script>
|
|
27
|
-
import { detectBrowser } from
|
|
27
|
+
import { detectBrowser } from "../../../../lib/detect-browser";
|
|
28
28
|
// TODO: Add .visually-hidden label prop
|
|
29
29
|
export default {
|
|
30
|
-
name:
|
|
30
|
+
name: "Icon",
|
|
31
31
|
props: {
|
|
32
32
|
className: {
|
|
33
33
|
type: String,
|
|
34
|
-
default:
|
|
34
|
+
default: "",
|
|
35
35
|
},
|
|
36
36
|
glyph: {
|
|
37
37
|
type: [Object, String],
|
|
38
|
-
required: true
|
|
38
|
+
required: true,
|
|
39
39
|
},
|
|
40
40
|
width: {
|
|
41
41
|
type: [Number, String],
|
|
42
|
-
default: 32
|
|
42
|
+
default: 32,
|
|
43
43
|
},
|
|
44
44
|
height: {
|
|
45
45
|
// height is required in IE
|
|
46
46
|
// undefined type added in case height was going to be handled explicitly, check JobsAtHomeDay for more details
|
|
47
47
|
type: [Number, String],
|
|
48
|
-
default: 32
|
|
48
|
+
default: 32,
|
|
49
49
|
},
|
|
50
50
|
first: {
|
|
51
51
|
type: Boolean,
|
|
52
|
-
default: false
|
|
52
|
+
default: false,
|
|
53
53
|
},
|
|
54
54
|
last: {
|
|
55
55
|
type: Boolean,
|
|
56
|
-
default: false
|
|
56
|
+
default: false,
|
|
57
57
|
},
|
|
58
58
|
inverted: {
|
|
59
59
|
type: Boolean,
|
|
60
|
-
default: false
|
|
60
|
+
default: false,
|
|
61
61
|
},
|
|
62
62
|
bordered: {
|
|
63
63
|
type: Boolean,
|
|
64
|
-
default: false
|
|
64
|
+
default: false,
|
|
65
65
|
},
|
|
66
66
|
iconAlt: {
|
|
67
67
|
type: String,
|
|
68
|
-
default:
|
|
69
|
-
}
|
|
68
|
+
default: "",
|
|
69
|
+
},
|
|
70
70
|
},
|
|
71
71
|
data() {
|
|
72
72
|
return {
|
|
73
|
-
renderedSVG: undefined
|
|
74
|
-
}
|
|
73
|
+
renderedSVG: undefined,
|
|
74
|
+
};
|
|
75
75
|
},
|
|
76
76
|
computed: {
|
|
77
77
|
isHtml() {
|
|
78
|
-
return this.glyph && typeof this.glyph ===
|
|
79
|
-
}
|
|
78
|
+
return this.glyph && typeof this.glyph === "string";
|
|
79
|
+
},
|
|
80
80
|
},
|
|
81
81
|
mounted() {
|
|
82
|
-
this.renderedSVG = this.getSvg()
|
|
82
|
+
this.renderedSVG = this.getSvg();
|
|
83
83
|
},
|
|
84
84
|
methods: {
|
|
85
85
|
getSvg() {
|
|
86
86
|
if (this.glyph) {
|
|
87
|
-
let icon
|
|
88
|
-
const content = String(this.glyph)
|
|
89
|
-
const isSVGTag = content.includes(
|
|
87
|
+
let icon;
|
|
88
|
+
const content = String(this.glyph);
|
|
89
|
+
const isSVGTag = content.includes("<svg");
|
|
90
90
|
if (!isSVGTag) {
|
|
91
|
-
icon = document.createElement(
|
|
92
|
-
icon.src = content
|
|
91
|
+
icon = document.createElement("img");
|
|
92
|
+
icon.src = content;
|
|
93
93
|
} else {
|
|
94
|
-
if (window && navigator && detectBrowser(navigator) ===
|
|
95
|
-
return this.glyph
|
|
94
|
+
if (window && navigator && detectBrowser(navigator) === "IE") {
|
|
95
|
+
return this.glyph;
|
|
96
96
|
} else {
|
|
97
|
-
const temp = document.createElement(
|
|
98
|
-
temp.innerHTML = content
|
|
99
|
-
icon = temp.querySelector(
|
|
100
|
-
icon.removeAttribute(
|
|
101
|
-
icon.removeAttribute(
|
|
97
|
+
const temp = document.createElement("div");
|
|
98
|
+
temp.innerHTML = content;
|
|
99
|
+
icon = temp.querySelector("svg");
|
|
100
|
+
icon.removeAttribute("width");
|
|
101
|
+
icon.removeAttribute("height");
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
if (this.iconAlt) {
|
|
105
|
-
icon.setAttribute(
|
|
105
|
+
icon.setAttribute("alt", this.iconAlt);
|
|
106
106
|
}
|
|
107
|
-
icon.setAttribute(
|
|
108
|
-
icon.setAttribute(
|
|
107
|
+
icon.setAttribute("width", this.width);
|
|
108
|
+
icon.setAttribute("height", this.height);
|
|
109
109
|
const customClass =
|
|
110
110
|
this.className +
|
|
111
|
-
(this.first ?
|
|
112
|
-
(this.last ?
|
|
113
|
-
(this.inverted ?
|
|
114
|
-
icon.setAttribute(
|
|
115
|
-
icon.setAttribute(
|
|
116
|
-
icon.setAttribute(
|
|
117
|
-
return icon.outerHTML
|
|
111
|
+
(this.first ? " icon_first" : "") +
|
|
112
|
+
(this.last ? " icon_last" : "") +
|
|
113
|
+
(this.inverted ? " icon--inverted" : "");
|
|
114
|
+
icon.setAttribute("class", "icon " + customClass);
|
|
115
|
+
icon.setAttribute("focusable", false);
|
|
116
|
+
icon.setAttribute("aria-hidden", true);
|
|
117
|
+
return icon.outerHTML;
|
|
118
118
|
}
|
|
119
|
-
return null
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
119
|
+
return null;
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
123
|
</script>
|
|
124
124
|
|
|
125
125
|
<style lang="scss">
|
|
126
|
-
@import
|
|
126
|
+
@import "./styles";
|
|
127
127
|
</style>
|
|
@@ -17,11 +17,13 @@
|
|
|
17
17
|
:aria-expanded="
|
|
18
18
|
isMobile || isResourceGroup
|
|
19
19
|
? cardMenuIsOpen
|
|
20
|
-
?
|
|
21
|
-
:
|
|
20
|
+
? true
|
|
21
|
+
: false
|
|
22
22
|
: false
|
|
23
23
|
"
|
|
24
24
|
role="button"
|
|
25
|
+
:aria-controls="`menu-panel-${card.ItemId}`"
|
|
26
|
+
tabindex="0"
|
|
25
27
|
class="card_item-menu__title--link nolink"
|
|
26
28
|
>
|
|
27
29
|
<img
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
height="12"
|
|
31
33
|
width="17"
|
|
32
34
|
class="card_item-menu__title__caret"
|
|
33
|
-
alt=""
|
|
35
|
+
alt="Card item Menu Title expand icon"
|
|
34
36
|
/>
|
|
35
37
|
<img
|
|
36
38
|
v-show="cardMenuIsOpen"
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
height="12"
|
|
39
41
|
width="17"
|
|
40
42
|
class="card_item-menu__title__caret"
|
|
41
|
-
alt=""
|
|
43
|
+
alt="Card item Menu Title collapse icon"
|
|
42
44
|
/>
|
|
43
45
|
<h3 class="card_item-menu__title--small">
|
|
44
46
|
{{ card.dropdownTitle }}
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
v-if="card.fileType"
|
|
50
52
|
class="card_item-menu__item card_item-menu__item--link"
|
|
51
53
|
:class="{
|
|
52
|
-
'card_item-menu__item--hide': !cardMenuIsOpen
|
|
54
|
+
'card_item-menu__item--hide': !cardMenuIsOpen,
|
|
53
55
|
}"
|
|
54
56
|
>
|
|
55
57
|
{{ card.fileTypeTitle }}
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
v-if="card.fileSize"
|
|
65
67
|
class="card_item-menu__item card_item-menu__item--link"
|
|
66
68
|
:class="{
|
|
67
|
-
'card_item-menu__item--hide': !cardMenuIsOpen
|
|
69
|
+
'card_item-menu__item--hide': !cardMenuIsOpen,
|
|
68
70
|
}"
|
|
69
71
|
>
|
|
70
72
|
{{ card.fileSizeTitle }}
|
|
@@ -79,7 +81,7 @@
|
|
|
79
81
|
v-if="card.fileLength"
|
|
80
82
|
class="card_item-menu__item card_item-menu__item--link"
|
|
81
83
|
:class="{
|
|
82
|
-
'card_item-menu__item--hide': !cardMenuIsOpen
|
|
84
|
+
'card_item-menu__item--hide': !cardMenuIsOpen,
|
|
83
85
|
}"
|
|
84
86
|
>
|
|
85
87
|
{{ card.fileLengthTitle }}
|
|
@@ -94,7 +96,7 @@
|
|
|
94
96
|
v-if="card.readingLevel"
|
|
95
97
|
class="card_item-menu__item card_item-menu__item--link"
|
|
96
98
|
:class="{
|
|
97
|
-
'card_item-menu__item--hide': !cardMenuIsOpen
|
|
99
|
+
'card_item-menu__item--hide': !cardMenuIsOpen,
|
|
98
100
|
}"
|
|
99
101
|
>
|
|
100
102
|
{{ card.readingLevelTitle }}
|
|
@@ -132,17 +134,17 @@ export default {
|
|
|
132
134
|
Column,
|
|
133
135
|
Row,
|
|
134
136
|
CardFooter,
|
|
135
|
-
RichText
|
|
137
|
+
RichText,
|
|
136
138
|
},
|
|
137
139
|
props: {
|
|
138
140
|
card: {
|
|
139
141
|
type: Object,
|
|
140
|
-
required: true
|
|
142
|
+
required: true,
|
|
141
143
|
},
|
|
142
144
|
resourceType: {
|
|
143
145
|
type: String,
|
|
144
|
-
default: 'resource-group'
|
|
145
|
-
}
|
|
146
|
+
default: 'resource-group',
|
|
147
|
+
},
|
|
146
148
|
},
|
|
147
149
|
data() {
|
|
148
150
|
return {
|
|
@@ -152,7 +154,7 @@ export default {
|
|
|
152
154
|
documentsvg,
|
|
153
155
|
CaretUp,
|
|
154
156
|
CaretDown,
|
|
155
|
-
windowWidth: 0
|
|
157
|
+
windowWidth: 0,
|
|
156
158
|
}
|
|
157
159
|
},
|
|
158
160
|
computed: {
|
|
@@ -161,7 +163,7 @@ export default {
|
|
|
161
163
|
},
|
|
162
164
|
isResourceGroup() {
|
|
163
165
|
return this.cardResourseType === 'resource-group' ? true : false
|
|
164
|
-
}
|
|
166
|
+
},
|
|
165
167
|
},
|
|
166
168
|
mounted() {
|
|
167
169
|
this.$nextTick(() => {
|
|
@@ -211,8 +213,8 @@ export default {
|
|
|
211
213
|
})
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
+
},
|
|
217
|
+
},
|
|
216
218
|
}
|
|
217
219
|
</script>
|
|
218
220
|
<style lang="scss" scoped>
|
|
@@ -4,27 +4,29 @@
|
|
|
4
4
|
<div class="video-thumbnail">
|
|
5
5
|
<img
|
|
6
6
|
:src="videoThumbnail"
|
|
7
|
-
alt="video
|
|
7
|
+
:alt="`Thumbnail for video: ${video.mediaTitle}`"
|
|
8
8
|
width="100%"
|
|
9
9
|
class="video-thumbnail__image"
|
|
10
10
|
/>
|
|
11
11
|
<img
|
|
12
12
|
:src="VideoPlay"
|
|
13
|
-
alt="
|
|
13
|
+
alt="Video play button"
|
|
14
|
+
aria-hidden="true"
|
|
14
15
|
class="video-thumbnail__button"
|
|
15
16
|
/>
|
|
16
17
|
</div>
|
|
17
18
|
</a>
|
|
18
19
|
<!-- Modal -->
|
|
19
|
-
<
|
|
20
|
-
|
|
20
|
+
<BModal
|
|
21
|
+
v-if="showModal"
|
|
21
22
|
v-model="showModal"
|
|
23
|
+
:id="`wcl-video-modal-${video.id}`"
|
|
22
24
|
scrollable
|
|
23
25
|
class="wcl-video-modal__modal"
|
|
24
26
|
no-footer
|
|
25
27
|
size="xl"
|
|
26
28
|
>
|
|
27
|
-
<div class="wcl-video-modal__video"
|
|
29
|
+
<div class="wcl-video-modal__video">
|
|
28
30
|
<video-media
|
|
29
31
|
:media-title="video.mediaTitle"
|
|
30
32
|
:media-description="video.mediaDescription"
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
/>
|
|
38
40
|
</div>
|
|
39
41
|
<template #footer><div></div></template>
|
|
40
|
-
</
|
|
42
|
+
</BModal>
|
|
41
43
|
</div>
|
|
42
44
|
</template>
|
|
43
45
|
|