@worksafevictoria/wcl7.5 1.9.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/.storybook/preview.js +1 -1
- 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 +29 -32
- 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/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 +114 -129
- package/src/components/Global/Strip/index.vue +82 -70
- 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/Search/index.vue +4 -0
- package/src/components/SubComponents/VideoThumbnail/index.vue +8 -6
- package/src/mock/carousel-items.js +46 -81
|
@@ -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>
|
|
@@ -22,8 +20,9 @@
|
|
|
22
20
|
:md="7"
|
|
23
21
|
>
|
|
24
22
|
<carousel-component
|
|
25
|
-
:
|
|
26
|
-
:storybook="
|
|
23
|
+
:carousel-items="slideList"
|
|
24
|
+
:storybook="isStorybook"
|
|
25
|
+
:is-paragraph="false"
|
|
27
26
|
/>
|
|
28
27
|
</column>
|
|
29
28
|
<column
|
|
@@ -56,7 +55,6 @@ import earthIcon from './../../../assets/icons/earth.svg?url'
|
|
|
56
55
|
import CarouselComponent from './../../Containers/Carousel/index.vue'
|
|
57
56
|
import Row from './../../Containers/Row/index.vue'
|
|
58
57
|
import Column from './../../Containers/Column/index.vue'
|
|
59
|
-
// import { mockCarouselItems } from '../../../mock/carousel-items'
|
|
60
58
|
|
|
61
59
|
export default {
|
|
62
60
|
name: 'HomepageHeader',
|
|
@@ -66,7 +64,6 @@ export default {
|
|
|
66
64
|
CarouselComponent,
|
|
67
65
|
Row,
|
|
68
66
|
Column,
|
|
69
|
-
// mockCarouselItems
|
|
70
67
|
},
|
|
71
68
|
props: {
|
|
72
69
|
contentParser: {
|
|
@@ -76,7 +73,6 @@ export default {
|
|
|
76
73
|
slideList: {
|
|
77
74
|
type: Array,
|
|
78
75
|
required: true,
|
|
79
|
-
// default: mockCarouselItems
|
|
80
76
|
},
|
|
81
77
|
isStorybook: {
|
|
82
78
|
type: Boolean,
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
<input
|
|
18
18
|
id="frYes"
|
|
19
19
|
type="radio"
|
|
20
|
-
:aria-checked="isSet('Yes') ? 'true' : 'false'"
|
|
21
|
-
role="radio"
|
|
22
20
|
name="feedback-radio"
|
|
23
21
|
value="Yes"
|
|
24
22
|
@change="setResponse($event)"
|
|
@@ -27,8 +25,6 @@
|
|
|
27
25
|
<input
|
|
28
26
|
id="frNo"
|
|
29
27
|
type="radio"
|
|
30
|
-
:aria-checked="isSet('No') ? 'true' : 'false'"
|
|
31
|
-
role="radio"
|
|
32
28
|
name="feedback-radio"
|
|
33
29
|
value="No"
|
|
34
30
|
@change="setResponse($event)"
|
|
@@ -36,13 +32,11 @@
|
|
|
36
32
|
<label for="frNo" class="option">No</label>
|
|
37
33
|
</div>
|
|
38
34
|
<div v-if="submitted">
|
|
39
|
-
<img class="feedback-tick" alt="" :src="Tick" />Thank you for
|
|
40
|
-
feedback
|
|
35
|
+
<img class="feedback-tick" alt="feedback tick" :src="Tick" />Thank you for
|
|
36
|
+
your feedback
|
|
41
37
|
</div>
|
|
42
38
|
</column>
|
|
43
|
-
<column
|
|
44
|
-
class="app-footer__page-info__reviewed-date fullscreen"
|
|
45
|
-
:xs="6"
|
|
39
|
+
<column class="app-footer__page-info__reviewed-date fullscreen" :xs="6"
|
|
46
40
|
>Reviewed on {{ updateDate }}</column
|
|
47
41
|
>
|
|
48
42
|
</row>
|
|
@@ -61,9 +55,8 @@
|
|
|
61
55
|
<strong>Tell us more (optional)</strong>
|
|
62
56
|
</div>
|
|
63
57
|
<div>
|
|
64
|
-
We are unable to respond to questions via this form. If you
|
|
65
|
-
|
|
66
|
-
one of the
|
|
58
|
+
We are unable to respond to questions via this form. If you have a
|
|
59
|
+
question and would like to receive a reply, please use one of the
|
|
67
60
|
<a
|
|
68
61
|
class="feedback-link"
|
|
69
62
|
href="https://www.worksafe.vic.gov.au/contact-worksafe"
|
|
@@ -99,10 +92,7 @@
|
|
|
99
92
|
</row>
|
|
100
93
|
</container>
|
|
101
94
|
</div>
|
|
102
|
-
<div
|
|
103
|
-
class="app-footer__main"
|
|
104
|
-
:class="{ 'app-footer__main--workwell': isWorkwell }"
|
|
105
|
-
>
|
|
95
|
+
<div class="app-footer__main" :class="{ 'app-footer__main--workwell': isWorkwell }">
|
|
106
96
|
<container>
|
|
107
97
|
<row valign="center" class="app-footer__main__social-share">
|
|
108
98
|
<column :xs="12" :sm="2"
|
|
@@ -111,9 +101,7 @@
|
|
|
111
101
|
:width="isWorkwell ? 99 : 101"
|
|
112
102
|
:src="isWorkwell ? WorkWellLogo : WorkSafeLogo"
|
|
113
103
|
:alt="
|
|
114
|
-
!isWorkwell
|
|
115
|
-
? 'Work Safe Victoria - Logo'
|
|
116
|
-
: 'Work Well Victoria - Logo'
|
|
104
|
+
!isWorkwell ? 'Work Safe Victoria - Logo' : 'Work Well Victoria - Logo'
|
|
117
105
|
"
|
|
118
106
|
/></column>
|
|
119
107
|
<column :xs="12" :sm="10">
|
|
@@ -140,7 +128,7 @@
|
|
|
140
128
|
height="12"
|
|
141
129
|
width="17"
|
|
142
130
|
class="app-footer-menu__title__caret"
|
|
143
|
-
alt=""
|
|
131
|
+
alt="expand icon"
|
|
144
132
|
/>
|
|
145
133
|
<img
|
|
146
134
|
v-show="menuItem.isOpen"
|
|
@@ -148,25 +136,33 @@
|
|
|
148
136
|
height="12"
|
|
149
137
|
width="17"
|
|
150
138
|
class="app-footer-menu__title__caret"
|
|
151
|
-
alt=""
|
|
139
|
+
alt="collapse icon"
|
|
152
140
|
/>
|
|
153
141
|
|
|
154
142
|
<a
|
|
155
143
|
v-if="menuItem.absolute === menuItem.relative"
|
|
156
|
-
:role="!menuItem.absolute ? 'button' :
|
|
157
|
-
:href="menuItem.absolute"
|
|
158
|
-
class="
|
|
159
|
-
|
|
144
|
+
:role="!menuItem.absolute ? 'button' : null"
|
|
145
|
+
:href="menuItem.absolute || undefined"
|
|
146
|
+
:class="[
|
|
147
|
+
'app-footer-menu__title--link',
|
|
148
|
+
'dark',
|
|
149
|
+
{ nolink: !menuItem.absolute },
|
|
150
|
+
]"
|
|
151
|
+
:tabindex="!menuItem.absolute ? 0 : undefined"
|
|
160
152
|
target="_blank"
|
|
161
153
|
:aria-expanded="
|
|
162
|
-
isMobile
|
|
154
|
+
isMobile && !menuItem.absolute
|
|
155
|
+
? menuItem.isOpen
|
|
156
|
+
? 'true'
|
|
157
|
+
: 'false'
|
|
158
|
+
: undefined
|
|
163
159
|
"
|
|
164
160
|
@click.prevent="handleAbsoluteClick(menuItem)"
|
|
165
161
|
><h2>{{ menuItem.title }}</h2>
|
|
166
162
|
</a>
|
|
167
163
|
<nuxt-link
|
|
168
164
|
v-else
|
|
169
|
-
:to="menuItem.
|
|
165
|
+
:to="menuItem.title"
|
|
170
166
|
class="app-footer-menu__title--link dark"
|
|
171
167
|
>
|
|
172
168
|
<h2>{{ menuItem.title }}</h2>
|
|
@@ -189,14 +185,14 @@
|
|
|
189
185
|
:href="subItem.absolute"
|
|
190
186
|
target="_blank"
|
|
191
187
|
class="app-footer-menu__item--link dark"
|
|
192
|
-
@click
|
|
188
|
+
@click="handleAbsoluteClick(subItem)"
|
|
193
189
|
>{{ subItem.title
|
|
194
190
|
}}<img
|
|
195
191
|
:src="ExternalLink"
|
|
196
192
|
height="12"
|
|
197
193
|
width="12"
|
|
198
194
|
class="app-footer-menu__item--icon"
|
|
199
|
-
alt="
|
|
195
|
+
alt="External link"
|
|
200
196
|
/>
|
|
201
197
|
</a>
|
|
202
198
|
<nuxt-link
|
|
@@ -220,10 +216,11 @@
|
|
|
220
216
|
>
|
|
221
217
|
<a
|
|
222
218
|
:aria-expanded="
|
|
223
|
-
isMobile ? (contactMenuIsOpen ? 'true' : 'false') :
|
|
219
|
+
isMobile ? (contactMenuIsOpen ? 'true' : 'false') : undefined
|
|
224
220
|
"
|
|
225
221
|
role="button"
|
|
226
222
|
class="app-footer-menu__title--link dark nolink"
|
|
223
|
+
tabindex="0"
|
|
227
224
|
><h2>Contact</h2></a
|
|
228
225
|
>
|
|
229
226
|
<img
|
|
@@ -232,7 +229,7 @@
|
|
|
232
229
|
height="12"
|
|
233
230
|
width="17"
|
|
234
231
|
class="app-footer-menu__title__caret"
|
|
235
|
-
alt=""
|
|
232
|
+
alt="expand icon"
|
|
236
233
|
/>
|
|
237
234
|
<img
|
|
238
235
|
v-show="contactMenuIsOpen"
|
|
@@ -240,12 +237,9 @@
|
|
|
240
237
|
height="12"
|
|
241
238
|
width="17"
|
|
242
239
|
class="app-footer-menu__title__caret"
|
|
243
|
-
alt=""
|
|
240
|
+
alt="collapse icon"
|
|
244
241
|
/>
|
|
245
|
-
<ul
|
|
246
|
-
class="submenu"
|
|
247
|
-
:class="contactMenuIsOpen ? 'isOpen' : false"
|
|
248
|
-
>
|
|
242
|
+
<ul class="submenu" :class="contactMenuIsOpen ? 'isOpen' : false">
|
|
249
243
|
<li
|
|
250
244
|
class="app-footer-menu__item app-footer-menu__address app-footer-menu__item--link"
|
|
251
245
|
:class="{
|
|
@@ -305,14 +299,13 @@
|
|
|
305
299
|
alt="Pride Flag"
|
|
306
300
|
/>
|
|
307
301
|
<p>
|
|
308
|
-
WorkSafe Victoria acknowledges Aboriginal and Torres Strait
|
|
309
|
-
|
|
310
|
-
|
|
302
|
+
WorkSafe Victoria acknowledges Aboriginal and Torres Strait Islander people
|
|
303
|
+
as the Traditional Custodians of the land and acknowledges and pays respect
|
|
304
|
+
to their Elders, past and present.
|
|
311
305
|
</p>
|
|
312
306
|
<p>
|
|
313
|
-
WorkSafe Victoria is committed to safe and inclusive work places,
|
|
314
|
-
|
|
315
|
-
families.
|
|
307
|
+
WorkSafe Victoria is committed to safe and inclusive work places, policies
|
|
308
|
+
and services for people of LGBTIQ communities and their families.
|
|
316
309
|
</p>
|
|
317
310
|
</column>
|
|
318
311
|
<column :md="1" class="app-footer__main__empty-col" />
|
|
@@ -348,6 +341,7 @@
|
|
|
348
341
|
height="24"
|
|
349
342
|
class="app-footer__main__subscribe--icon"
|
|
350
343
|
:glyph="ExternalLinkRaw"
|
|
344
|
+
icon-alt="External link icon"
|
|
351
345
|
/>
|
|
352
346
|
</button>
|
|
353
347
|
</column>
|
|
@@ -358,27 +352,27 @@
|
|
|
358
352
|
</template>
|
|
359
353
|
|
|
360
354
|
<script>
|
|
361
|
-
import Row from
|
|
362
|
-
import Container from
|
|
363
|
-
import Column from
|
|
364
|
-
import FooterSocialShare from
|
|
365
|
-
import CaretUp from
|
|
366
|
-
import CaretDown from
|
|
367
|
-
import WorkSafeLogo from
|
|
368
|
-
import VicGovLogo from
|
|
369
|
-
import ExternalLink from
|
|
370
|
-
import ExternalLinkRaw from
|
|
371
|
-
import AboriginalFlag from
|
|
372
|
-
import PrideFlag from
|
|
373
|
-
import TorresStraitFlag from
|
|
374
|
-
import WorkWellLogo from
|
|
375
|
-
import { format } from
|
|
376
|
-
import Icon from
|
|
377
|
-
import CtaButton from
|
|
378
|
-
import Tick from
|
|
355
|
+
import Row from "./../../Containers/Row/index.vue";
|
|
356
|
+
import Container from "./../../Containers/Container/index.vue";
|
|
357
|
+
import Column from "./../../Containers/Column/index.vue";
|
|
358
|
+
import FooterSocialShare from "./FooterSocialShare/index.vue";
|
|
359
|
+
import CaretUp from "./../../../assets/icons/caret-up.svg?url";
|
|
360
|
+
import CaretDown from "./../../../assets/icons/caret-down.svg?url";
|
|
361
|
+
import WorkSafeLogo from "./../../../assets/icons/AppFooter/worksafe-footer-logo.svg?url";
|
|
362
|
+
import VicGovLogo from "./../../../assets/icons/brand-VicStateGov-logo-reversed.svg?url";
|
|
363
|
+
import ExternalLink from "./../../../assets/icons/external-link-16px.svg?url";
|
|
364
|
+
import ExternalLinkRaw from "./../../../assets/icons/external-link.svg?url";
|
|
365
|
+
import AboriginalFlag from "./../../../assets/icons/AppFooter/australian-aboriginal-flag.svg?url";
|
|
366
|
+
import PrideFlag from "./../../../assets/icons/AppFooter/pride-flag.svg?url";
|
|
367
|
+
import TorresStraitFlag from "./../../../assets/icons/AppFooter/torres-strait-islanders-flag.svg?url";
|
|
368
|
+
import WorkWellLogo from "./../../../assets/icons/AppFooter/logo-workwell-reversed.svg?url";
|
|
369
|
+
import { format } from "date-fns";
|
|
370
|
+
import Icon from "./../../SubComponents/Icon/index.vue";
|
|
371
|
+
import CtaButton from "./../../SubComponents/CtaButton/index.vue";
|
|
372
|
+
import Tick from "./../../../assets/icons/tick.svg?url";
|
|
379
373
|
|
|
380
374
|
export default {
|
|
381
|
-
name:
|
|
375
|
+
name: "AppFooter",
|
|
382
376
|
components: {
|
|
383
377
|
FooterSocialShare,
|
|
384
378
|
Column,
|
|
@@ -425,28 +419,27 @@ export default {
|
|
|
425
419
|
showForm: false,
|
|
426
420
|
submitted: false,
|
|
427
421
|
endpoint:
|
|
428
|
-
(this.$config
|
|
429
|
-
|
|
430
|
-
: process.env.CONTENT_API_URL) + '/webform_rest/submit?_format=json',
|
|
422
|
+
(this.$config ? this.$config.public.apiURL : process.env.CONTENT_API_URL) +
|
|
423
|
+
"/webform_rest/submit?_format=json",
|
|
431
424
|
response: {
|
|
432
|
-
webform_id:
|
|
433
|
-
page_url:
|
|
434
|
-
was_the_information_on_this_page_helpful_:
|
|
435
|
-
message:
|
|
425
|
+
webform_id: "page_feedback_form",
|
|
426
|
+
page_url: "",
|
|
427
|
+
was_the_information_on_this_page_helpful_: "",
|
|
428
|
+
message: "",
|
|
436
429
|
},
|
|
437
|
-
}
|
|
430
|
+
};
|
|
438
431
|
},
|
|
439
432
|
computed: {
|
|
440
433
|
updateDate() {
|
|
441
434
|
// Change to remove hydration date
|
|
442
435
|
return new Date(this.changedDate)
|
|
443
|
-
.toLocaleString(
|
|
444
|
-
timeZone:
|
|
436
|
+
.toLocaleString("en-AU", {
|
|
437
|
+
timeZone: "Australia/Sydney",
|
|
445
438
|
})
|
|
446
|
-
.split(
|
|
439
|
+
.split(",")[0];
|
|
447
440
|
},
|
|
448
441
|
isMobile() {
|
|
449
|
-
return this.windowWidth < 768
|
|
442
|
+
return this.windowWidth < 768;
|
|
450
443
|
},
|
|
451
444
|
// Why send junk id
|
|
452
445
|
// processID() {
|
|
@@ -455,73 +448,73 @@ export default {
|
|
|
455
448
|
},
|
|
456
449
|
watch: {
|
|
457
450
|
$route() {
|
|
458
|
-
this.showForm = false
|
|
459
|
-
this.submitted = false
|
|
451
|
+
this.showForm = false;
|
|
452
|
+
this.submitted = false;
|
|
460
453
|
},
|
|
461
454
|
showForm: {
|
|
462
455
|
handler: function () {
|
|
463
|
-
this.initialiseFeedback()
|
|
456
|
+
this.initialiseFeedback();
|
|
464
457
|
},
|
|
465
458
|
},
|
|
466
459
|
},
|
|
467
460
|
mounted() {
|
|
468
461
|
this.$nextTick(() => {
|
|
469
|
-
window.addEventListener(
|
|
470
|
-
})
|
|
471
|
-
this.onResize()
|
|
462
|
+
window.addEventListener("resize", this.onResize);
|
|
463
|
+
});
|
|
464
|
+
this.onResize();
|
|
472
465
|
},
|
|
473
466
|
beforeDestroy() {
|
|
474
|
-
window.removeEventListener(
|
|
467
|
+
window.removeEventListener("resize", this.onResize);
|
|
475
468
|
},
|
|
476
469
|
methods: {
|
|
477
470
|
initialiseFeedback() {
|
|
478
471
|
if (!this.showForm) {
|
|
479
|
-
var rbY = document.getElementById(
|
|
480
|
-
rbY.checked = false
|
|
481
|
-
var rbN = document.getElementById(
|
|
482
|
-
rbN.checked = false
|
|
472
|
+
var rbY = document.getElementById("frYes");
|
|
473
|
+
rbY.checked = false;
|
|
474
|
+
var rbN = document.getElementById("frNo");
|
|
475
|
+
rbN.checked = false;
|
|
483
476
|
}
|
|
484
477
|
},
|
|
485
478
|
setResponse(event) {
|
|
486
|
-
var answer = event.target.value
|
|
487
|
-
this.response.was_the_information_on_this_page_helpful_ = answer
|
|
488
|
-
this.response.page_url = window.location.href
|
|
489
|
-
this.showForm = true
|
|
490
|
-
this.fireGtagHelpful()
|
|
479
|
+
var answer = event.target.value;
|
|
480
|
+
this.response.was_the_information_on_this_page_helpful_ = answer;
|
|
481
|
+
this.response.page_url = window.location.href;
|
|
482
|
+
this.showForm = true;
|
|
483
|
+
this.fireGtagHelpful();
|
|
491
484
|
},
|
|
492
485
|
cancelFeedback() {
|
|
493
|
-
this.showForm = false
|
|
486
|
+
this.showForm = false;
|
|
494
487
|
},
|
|
495
488
|
async submitFeedback() {
|
|
496
489
|
if (this.$gtm) {
|
|
497
490
|
try {
|
|
498
|
-
const res = await this.$axios.post(this.endpoint, this.response)
|
|
491
|
+
const res = await this.$axios.post(this.endpoint, this.response);
|
|
499
492
|
if (res.data && res.data.sid) {
|
|
500
|
-
this.submitted = true
|
|
501
|
-
this.showForm = false
|
|
502
|
-
this.fireGtagFeedback()
|
|
493
|
+
this.submitted = true;
|
|
494
|
+
this.showForm = false;
|
|
495
|
+
this.fireGtagFeedback();
|
|
503
496
|
}
|
|
504
497
|
} catch (e) {
|
|
505
498
|
// eslint-disable-next-line no-console
|
|
506
|
-
console.error(
|
|
499
|
+
console.error("Error submitting webform");
|
|
507
500
|
}
|
|
508
501
|
} else {
|
|
509
|
-
this.submitted = true
|
|
510
|
-
this.showForm = false
|
|
502
|
+
this.submitted = true;
|
|
503
|
+
this.showForm = false;
|
|
511
504
|
}
|
|
512
505
|
},
|
|
513
506
|
isSet(ans) {
|
|
514
|
-
return this.response.was_the_information_on_this_page_helpful_ === ans
|
|
507
|
+
return this.response.was_the_information_on_this_page_helpful_ === ans;
|
|
515
508
|
},
|
|
516
509
|
fireGtagHelpful() {
|
|
517
510
|
const attrs = {
|
|
518
|
-
event:
|
|
511
|
+
event: "custom.interaction.helpful",
|
|
519
512
|
label: this.response.was_the_information_on_this_page_helpful_,
|
|
520
513
|
//title: this.$store?.state?.page?.content?.title,
|
|
521
514
|
title: this.$pageStore?.content?.title,
|
|
522
|
-
}
|
|
515
|
+
};
|
|
523
516
|
if (this.$gtm) {
|
|
524
|
-
this.$gtm.push({ event:
|
|
517
|
+
this.$gtm.push({ event: "custom.interaction.helpful", ...attrs });
|
|
525
518
|
}
|
|
526
519
|
},
|
|
527
520
|
fireGtagFeedback() {
|
|
@@ -530,49 +523,49 @@ export default {
|
|
|
530
523
|
title: this.$pageStore?.content?.title,
|
|
531
524
|
label: this.response.was_the_information_on_this_page_helpful_,
|
|
532
525
|
// processID: this.processID, why send GTM junk id
|
|
533
|
-
}
|
|
526
|
+
};
|
|
534
527
|
if (this.$gtm) {
|
|
535
528
|
this.$gtm.push({
|
|
536
|
-
event:
|
|
529
|
+
event: "custom.interaction.helpful.feedback",
|
|
537
530
|
...attrs,
|
|
538
|
-
})
|
|
531
|
+
});
|
|
539
532
|
}
|
|
540
533
|
},
|
|
541
534
|
backToTop() {
|
|
542
535
|
if (this.$bus) {
|
|
543
|
-
this.$bus.$emit(
|
|
536
|
+
this.$bus.$emit("scrollToTop");
|
|
544
537
|
}
|
|
545
538
|
},
|
|
546
539
|
isAbsoluteUrl(uri) {
|
|
547
|
-
let r = new RegExp(
|
|
548
|
-
return r.test(uri)
|
|
540
|
+
let r = new RegExp("^(?:[a-z]+:)?//", "i");
|
|
541
|
+
return r.test(uri);
|
|
549
542
|
},
|
|
550
543
|
subscribe() {
|
|
551
544
|
window.location =
|
|
552
|
-
|
|
545
|
+
"https://comms.worksafe.vic.gov.au/link/id/zzzz5c2d405926ec7534Pzzzz4ff385a2d38d8616/page.html?prompt=1";
|
|
553
546
|
},
|
|
554
547
|
handleMenuItemClick(menuFooter, index) {
|
|
555
548
|
// splice is needed for vue to pick up that changes to the footerMenu array and re-render the screen
|
|
556
549
|
if (this.isMobile) {
|
|
557
550
|
for (let i = 0; i < menuFooter.length; i++) {
|
|
558
|
-
let newMenuItem = menuFooter[i]
|
|
559
|
-
this.contactMenuIsOpen = false
|
|
551
|
+
let newMenuItem = menuFooter[i];
|
|
552
|
+
this.contactMenuIsOpen = false;
|
|
560
553
|
if (i === index) {
|
|
561
|
-
newMenuItem.isOpen = !newMenuItem.isOpen
|
|
554
|
+
newMenuItem.isOpen = !newMenuItem.isOpen;
|
|
562
555
|
} else {
|
|
563
|
-
newMenuItem.isOpen = false
|
|
556
|
+
newMenuItem.isOpen = false;
|
|
564
557
|
}
|
|
565
|
-
menuFooter.splice(i, 1, newMenuItem)
|
|
558
|
+
menuFooter.splice(i, 1, newMenuItem);
|
|
566
559
|
}
|
|
567
560
|
}
|
|
568
561
|
},
|
|
569
562
|
handleContactItemClick(menuFooter) {
|
|
570
563
|
if (this.isMobile) {
|
|
571
564
|
for (let i = 0; i < menuFooter.length; i++) {
|
|
572
|
-
let newMenuItem = menuFooter[i]
|
|
573
|
-
this.contactMenuIsOpen = !this.contactMenuIsOpen
|
|
574
|
-
newMenuItem.isOpen = false
|
|
575
|
-
menuFooter.splice(i, 1, newMenuItem)
|
|
565
|
+
let newMenuItem = menuFooter[i];
|
|
566
|
+
this.contactMenuIsOpen = !this.contactMenuIsOpen;
|
|
567
|
+
newMenuItem.isOpen = false;
|
|
568
|
+
menuFooter.splice(i, 1, newMenuItem);
|
|
576
569
|
}
|
|
577
570
|
}
|
|
578
571
|
},
|
|
@@ -581,14 +574,14 @@ export default {
|
|
|
581
574
|
if (event.keyCode === 32 || event.keyCode === 13) {
|
|
582
575
|
//splice is needed for vue to pick up that changes to the menuFooter array and re-render the screen
|
|
583
576
|
for (let i = 0; i < menuFooter.length; i++) {
|
|
584
|
-
let newMenuItem = menuFooter[i]
|
|
585
|
-
this.contactMenuIsOpen = false
|
|
577
|
+
let newMenuItem = menuFooter[i];
|
|
578
|
+
this.contactMenuIsOpen = false;
|
|
586
579
|
if (i === index) {
|
|
587
|
-
newMenuItem.isOpen = !newMenuItem.isOpen
|
|
580
|
+
newMenuItem.isOpen = !newMenuItem.isOpen;
|
|
588
581
|
} else {
|
|
589
|
-
newMenuItem.isOpen = false
|
|
582
|
+
newMenuItem.isOpen = false;
|
|
590
583
|
}
|
|
591
|
-
menuFooter.splice(i, 1, newMenuItem)
|
|
584
|
+
menuFooter.splice(i, 1, newMenuItem);
|
|
592
585
|
}
|
|
593
586
|
}
|
|
594
587
|
}
|
|
@@ -597,26 +590,26 @@ export default {
|
|
|
597
590
|
if (this.isMobile) {
|
|
598
591
|
if (event.keyCode === 32 || event.keyCode === 13) {
|
|
599
592
|
for (let i = 0; i < menuFooter.length; i++) {
|
|
600
|
-
let newMenuItem = menuFooter[i]
|
|
601
|
-
this.contactMenuIsOpen = !this.contactMenuIsOpen
|
|
602
|
-
newMenuItem.isOpen = false
|
|
603
|
-
menuFooter.splice(i, 1, newMenuItem)
|
|
593
|
+
let newMenuItem = menuFooter[i];
|
|
594
|
+
this.contactMenuIsOpen = !this.contactMenuIsOpen;
|
|
595
|
+
newMenuItem.isOpen = false;
|
|
596
|
+
menuFooter.splice(i, 1, newMenuItem);
|
|
604
597
|
}
|
|
605
598
|
}
|
|
606
599
|
}
|
|
607
600
|
},
|
|
608
601
|
onResize() {
|
|
609
|
-
this.windowWidth = window.innerWidth
|
|
610
|
-
let titles = document.getElementsByClassName(
|
|
602
|
+
this.windowWidth = window.innerWidth;
|
|
603
|
+
let titles = document.getElementsByClassName("app-footer-menu__title");
|
|
611
604
|
if (Array.isArray(titles)) {
|
|
612
605
|
if (this.isMobile) {
|
|
613
606
|
titles.forEach((t) => {
|
|
614
|
-
t.setAttribute(
|
|
615
|
-
})
|
|
607
|
+
t.setAttribute("tabIndex", "0");
|
|
608
|
+
});
|
|
616
609
|
} else {
|
|
617
610
|
titles.forEach((t) => {
|
|
618
|
-
t.removeAttribute(
|
|
619
|
-
})
|
|
611
|
+
t.removeAttribute("tabIndex");
|
|
612
|
+
});
|
|
620
613
|
}
|
|
621
614
|
}
|
|
622
615
|
},
|
|
@@ -624,18 +617,18 @@ export default {
|
|
|
624
617
|
if (item.absolute) {
|
|
625
618
|
if (this.$gtm) {
|
|
626
619
|
this.$gtm.push({
|
|
627
|
-
event:
|
|
620
|
+
event: "custom.interaction.outboundlink",
|
|
628
621
|
category: item.title,
|
|
629
622
|
label: item.absolute,
|
|
630
|
-
})
|
|
623
|
+
});
|
|
631
624
|
}
|
|
632
|
-
window.open(item.absolute)
|
|
625
|
+
window.open(item.absolute);
|
|
633
626
|
}
|
|
634
627
|
},
|
|
635
628
|
},
|
|
636
|
-
}
|
|
629
|
+
};
|
|
637
630
|
</script>
|
|
638
631
|
|
|
639
632
|
<style lang="scss" scoped>
|
|
640
|
-
@import
|
|
633
|
+
@import "./styles";
|
|
641
634
|
</style>
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
@click="$emit('closed')"
|
|
8
8
|
>
|
|
9
9
|
Close menu
|
|
10
|
-
<img
|
|
10
|
+
<img
|
|
11
|
+
class="app-search__close-icon"
|
|
12
|
+
alt="search close icon"
|
|
13
|
+
width="22"
|
|
14
|
+
height="18"
|
|
15
|
+
:src="Close"
|
|
16
|
+
/>
|
|
11
17
|
</button>
|
|
12
18
|
<form @submit.prevent>
|
|
13
19
|
<label class="app-search__label font-weight-bold" for="app-search--search-input-box"
|
|
@@ -18,7 +18,7 @@ const contentParser = () => {
|
|
|
18
18
|
export default {
|
|
19
19
|
title: 'Global/AppHeader',
|
|
20
20
|
component: AppHeader,
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
data() {
|
|
23
23
|
return {
|
|
24
24
|
appHeaderData
|
|
@@ -71,4 +71,4 @@ const DefaultContent = (args) => ({
|
|
|
71
71
|
`
|
|
72
72
|
})
|
|
73
73
|
|
|
74
|
-
export const
|
|
74
|
+
export const Former = DefaultContent.bind({})
|