@worksafevictoria/wcl7.5 1.9.0-beta.14 → 1.9.0-beta.16

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.
@@ -32,11 +32,13 @@
32
32
  <label for="frNo" class="option">No</label>
33
33
  </div>
34
34
  <div v-if="submitted">
35
- <img class="feedback-tick" alt="feedback tick" :src="Tick" />Thank you for
36
- your feedback
35
+ <img class="feedback-tick" alt="feedback tick" :src="Tick" />Thank
36
+ you for your feedback
37
37
  </div>
38
38
  </column>
39
- <column class="app-footer__page-info__reviewed-date fullscreen" :xs="6"
39
+ <column
40
+ class="app-footer__page-info__reviewed-date fullscreen"
41
+ :xs="6"
40
42
  >Reviewed on {{ updateDate }}</column
41
43
  >
42
44
  </row>
@@ -55,8 +57,9 @@
55
57
  <strong>Tell us more (optional)</strong>
56
58
  </div>
57
59
  <div>
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
60
+ We are unable to respond to questions via this form. If you
61
+ have a question and would like to receive a reply, please use
62
+ one of the
60
63
  <a
61
64
  class="feedback-link"
62
65
  href="https://www.worksafe.vic.gov.au/contact-worksafe"
@@ -92,7 +95,10 @@
92
95
  </row>
93
96
  </container>
94
97
  </div>
95
- <div class="app-footer__main" :class="{ 'app-footer__main--workwell': isWorkwell }">
98
+ <div
99
+ class="app-footer__main"
100
+ :class="{ 'app-footer__main--workwell': isWorkwell }"
101
+ >
96
102
  <container>
97
103
  <row valign="center" class="app-footer__main__social-share">
98
104
  <column :xs="12" :sm="2"
@@ -101,7 +107,9 @@
101
107
  :width="isWorkwell ? 99 : 101"
102
108
  :src="isWorkwell ? WorkWellLogo : WorkSafeLogo"
103
109
  :alt="
104
- !isWorkwell ? 'Work Safe Victoria - Logo' : 'Work Well Victoria - Logo'
110
+ !isWorkwell
111
+ ? 'Work Safe Victoria - Logo'
112
+ : 'Work Well Victoria - Logo'
105
113
  "
106
114
  /></column>
107
115
  <column :xs="12" :sm="10">
@@ -148,7 +156,7 @@
148
156
  'dark',
149
157
  { nolink: !menuItem.absolute },
150
158
  ]"
151
- :tabindex="!menuItem.absolute ? 0 : undefined"
159
+ :tabindex="!menuItem.absolute ? 0 : -1"
152
160
  target="_blank"
153
161
  :aria-expanded="
154
162
  isMobile && !menuItem.absolute
@@ -216,7 +224,11 @@
216
224
  >
217
225
  <a
218
226
  :aria-expanded="
219
- isMobile ? (contactMenuIsOpen ? 'true' : 'false') : undefined
227
+ isMobile
228
+ ? contactMenuIsOpen
229
+ ? 'true'
230
+ : 'false'
231
+ : undefined
220
232
  "
221
233
  role="button"
222
234
  class="app-footer-menu__title--link dark nolink"
@@ -239,7 +251,10 @@
239
251
  class="app-footer-menu__title__caret"
240
252
  alt="collapse icon"
241
253
  />
242
- <ul class="submenu" :class="contactMenuIsOpen ? 'isOpen' : false">
254
+ <ul
255
+ class="submenu"
256
+ :class="contactMenuIsOpen ? 'isOpen' : false"
257
+ >
243
258
  <li
244
259
  class="app-footer-menu__item app-footer-menu__address app-footer-menu__item--link"
245
260
  :class="{
@@ -299,13 +314,14 @@
299
314
  alt="Pride Flag"
300
315
  />
301
316
  <p>
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.
317
+ WorkSafe Victoria acknowledges Aboriginal and Torres Strait
318
+ Islander people as the Traditional Custodians of the land and
319
+ acknowledges and pays respect to their Elders, past and present.
305
320
  </p>
306
321
  <p>
307
- WorkSafe Victoria is committed to safe and inclusive work places, policies
308
- and services for people of LGBTIQ communities and their families.
322
+ WorkSafe Victoria is committed to safe and inclusive work places,
323
+ policies and services for people of LGBTIQ communities and their
324
+ families.
309
325
  </p>
310
326
  </column>
311
327
  <column :md="1" class="app-footer__main__empty-col" />
@@ -352,27 +368,27 @@
352
368
  </template>
353
369
 
354
370
  <script>
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";
371
+ import Row from './../../Containers/Row/index.vue'
372
+ import Container from './../../Containers/Container/index.vue'
373
+ import Column from './../../Containers/Column/index.vue'
374
+ import FooterSocialShare from './FooterSocialShare/index.vue'
375
+ import CaretUp from './../../../assets/icons/caret-up.svg?url'
376
+ import CaretDown from './../../../assets/icons/caret-down.svg?url'
377
+ import WorkSafeLogo from './../../../assets/icons/AppFooter/worksafe-footer-logo.svg?url'
378
+ import VicGovLogo from './../../../assets/icons/brand-VicStateGov-logo-reversed.svg?url'
379
+ import ExternalLink from './../../../assets/icons/external-link-16px.svg?url'
380
+ import ExternalLinkRaw from './../../../assets/icons/external-link.svg?url'
381
+ import AboriginalFlag from './../../../assets/icons/AppFooter/australian-aboriginal-flag.svg?url'
382
+ import PrideFlag from './../../../assets/icons/AppFooter/pride-flag.svg?url'
383
+ import TorresStraitFlag from './../../../assets/icons/AppFooter/torres-strait-islanders-flag.svg?url'
384
+ import WorkWellLogo from './../../../assets/icons/AppFooter/logo-workwell-reversed.svg?url'
385
+ import { format } from 'date-fns'
386
+ import Icon from './../../SubComponents/Icon/index.vue'
387
+ import CtaButton from './../../SubComponents/CtaButton/index.vue'
388
+ import Tick from './../../../assets/icons/tick.svg?url'
373
389
 
374
390
  export default {
375
- name: "AppFooter",
391
+ name: 'AppFooter',
376
392
  components: {
377
393
  FooterSocialShare,
378
394
  Column,
@@ -419,27 +435,28 @@ export default {
419
435
  showForm: false,
420
436
  submitted: false,
421
437
  endpoint:
422
- (this.$config ? this.$config.public.apiURL : process.env.CONTENT_API_URL) +
423
- "/webform_rest/submit?_format=json",
438
+ (this.$config
439
+ ? this.$config.public.apiURL
440
+ : process.env.CONTENT_API_URL) + '/webform_rest/submit?_format=json',
424
441
  response: {
425
- webform_id: "page_feedback_form",
426
- page_url: "",
427
- was_the_information_on_this_page_helpful_: "",
428
- message: "",
442
+ webform_id: 'page_feedback_form',
443
+ page_url: '',
444
+ was_the_information_on_this_page_helpful_: '',
445
+ message: '',
429
446
  },
430
- };
447
+ }
431
448
  },
432
449
  computed: {
433
450
  updateDate() {
434
451
  // Change to remove hydration date
435
452
  return new Date(this.changedDate)
436
- .toLocaleString("en-AU", {
437
- timeZone: "Australia/Sydney",
453
+ .toLocaleString('en-AU', {
454
+ timeZone: 'Australia/Sydney',
438
455
  })
439
- .split(",")[0];
456
+ .split(',')[0]
440
457
  },
441
458
  isMobile() {
442
- return this.windowWidth < 768;
459
+ return this.windowWidth < 768
443
460
  },
444
461
  // Why send junk id
445
462
  // processID() {
@@ -448,73 +465,73 @@ export default {
448
465
  },
449
466
  watch: {
450
467
  $route() {
451
- this.showForm = false;
452
- this.submitted = false;
468
+ this.showForm = false
469
+ this.submitted = false
453
470
  },
454
471
  showForm: {
455
472
  handler: function () {
456
- this.initialiseFeedback();
473
+ this.initialiseFeedback()
457
474
  },
458
475
  },
459
476
  },
460
477
  mounted() {
461
478
  this.$nextTick(() => {
462
- window.addEventListener("resize", this.onResize);
463
- });
464
- this.onResize();
479
+ window.addEventListener('resize', this.onResize)
480
+ })
481
+ this.onResize()
465
482
  },
466
483
  beforeDestroy() {
467
- window.removeEventListener("resize", this.onResize);
484
+ window.removeEventListener('resize', this.onResize)
468
485
  },
469
486
  methods: {
470
487
  initialiseFeedback() {
471
488
  if (!this.showForm) {
472
- var rbY = document.getElementById("frYes");
473
- rbY.checked = false;
474
- var rbN = document.getElementById("frNo");
475
- rbN.checked = false;
489
+ var rbY = document.getElementById('frYes')
490
+ rbY.checked = false
491
+ var rbN = document.getElementById('frNo')
492
+ rbN.checked = false
476
493
  }
477
494
  },
478
495
  setResponse(event) {
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();
496
+ var answer = event.target.value
497
+ this.response.was_the_information_on_this_page_helpful_ = answer
498
+ this.response.page_url = window.location.href
499
+ this.showForm = true
500
+ this.fireGtagHelpful()
484
501
  },
485
502
  cancelFeedback() {
486
- this.showForm = false;
503
+ this.showForm = false
487
504
  },
488
505
  async submitFeedback() {
489
506
  if (this.$gtm) {
490
507
  try {
491
- const res = await this.$axios.post(this.endpoint, this.response);
508
+ const res = await this.$axios.post(this.endpoint, this.response)
492
509
  if (res.data && res.data.sid) {
493
- this.submitted = true;
494
- this.showForm = false;
495
- this.fireGtagFeedback();
510
+ this.submitted = true
511
+ this.showForm = false
512
+ this.fireGtagFeedback()
496
513
  }
497
514
  } catch (e) {
498
515
  // eslint-disable-next-line no-console
499
- console.error("Error submitting webform");
516
+ console.error('Error submitting webform')
500
517
  }
501
518
  } else {
502
- this.submitted = true;
503
- this.showForm = false;
519
+ this.submitted = true
520
+ this.showForm = false
504
521
  }
505
522
  },
506
523
  isSet(ans) {
507
- return this.response.was_the_information_on_this_page_helpful_ === ans;
524
+ return this.response.was_the_information_on_this_page_helpful_ === ans
508
525
  },
509
526
  fireGtagHelpful() {
510
527
  const attrs = {
511
- event: "custom.interaction.helpful",
528
+ event: 'custom.interaction.helpful',
512
529
  label: this.response.was_the_information_on_this_page_helpful_,
513
530
  //title: this.$store?.state?.page?.content?.title,
514
531
  title: this.$pageStore?.content?.title,
515
- };
532
+ }
516
533
  if (this.$gtm) {
517
- this.$gtm.push({ event: "custom.interaction.helpful", ...attrs });
534
+ this.$gtm.push({ event: 'custom.interaction.helpful', ...attrs })
518
535
  }
519
536
  },
520
537
  fireGtagFeedback() {
@@ -523,49 +540,49 @@ export default {
523
540
  title: this.$pageStore?.content?.title,
524
541
  label: this.response.was_the_information_on_this_page_helpful_,
525
542
  // processID: this.processID, why send GTM junk id
526
- };
543
+ }
527
544
  if (this.$gtm) {
528
545
  this.$gtm.push({
529
- event: "custom.interaction.helpful.feedback",
546
+ event: 'custom.interaction.helpful.feedback',
530
547
  ...attrs,
531
- });
548
+ })
532
549
  }
533
550
  },
534
551
  backToTop() {
535
552
  if (this.$bus) {
536
- this.$bus.$emit("scrollToTop");
553
+ this.$bus.$emit('scrollToTop')
537
554
  }
538
555
  },
539
556
  isAbsoluteUrl(uri) {
540
- let r = new RegExp("^(?:[a-z]+:)?//", "i");
541
- return r.test(uri);
557
+ let r = new RegExp('^(?:[a-z]+:)?//', 'i')
558
+ return r.test(uri)
542
559
  },
543
560
  subscribe() {
544
561
  window.location =
545
- "https://comms.worksafe.vic.gov.au/link/id/zzzz5c2d405926ec7534Pzzzz4ff385a2d38d8616/page.html?prompt=1";
562
+ 'https://comms.worksafe.vic.gov.au/link/id/zzzz5c2d405926ec7534Pzzzz4ff385a2d38d8616/page.html?prompt=1'
546
563
  },
547
564
  handleMenuItemClick(menuFooter, index) {
548
565
  // splice is needed for vue to pick up that changes to the footerMenu array and re-render the screen
549
566
  if (this.isMobile) {
550
567
  for (let i = 0; i < menuFooter.length; i++) {
551
- let newMenuItem = menuFooter[i];
552
- this.contactMenuIsOpen = false;
568
+ let newMenuItem = menuFooter[i]
569
+ this.contactMenuIsOpen = false
553
570
  if (i === index) {
554
- newMenuItem.isOpen = !newMenuItem.isOpen;
571
+ newMenuItem.isOpen = !newMenuItem.isOpen
555
572
  } else {
556
- newMenuItem.isOpen = false;
573
+ newMenuItem.isOpen = false
557
574
  }
558
- menuFooter.splice(i, 1, newMenuItem);
575
+ menuFooter.splice(i, 1, newMenuItem)
559
576
  }
560
577
  }
561
578
  },
562
579
  handleContactItemClick(menuFooter) {
563
580
  if (this.isMobile) {
564
581
  for (let i = 0; i < menuFooter.length; i++) {
565
- let newMenuItem = menuFooter[i];
566
- this.contactMenuIsOpen = !this.contactMenuIsOpen;
567
- newMenuItem.isOpen = false;
568
- menuFooter.splice(i, 1, newMenuItem);
582
+ let newMenuItem = menuFooter[i]
583
+ this.contactMenuIsOpen = !this.contactMenuIsOpen
584
+ newMenuItem.isOpen = false
585
+ menuFooter.splice(i, 1, newMenuItem)
569
586
  }
570
587
  }
571
588
  },
@@ -574,14 +591,14 @@ export default {
574
591
  if (event.keyCode === 32 || event.keyCode === 13) {
575
592
  //splice is needed for vue to pick up that changes to the menuFooter array and re-render the screen
576
593
  for (let i = 0; i < menuFooter.length; i++) {
577
- let newMenuItem = menuFooter[i];
578
- this.contactMenuIsOpen = false;
594
+ let newMenuItem = menuFooter[i]
595
+ this.contactMenuIsOpen = false
579
596
  if (i === index) {
580
- newMenuItem.isOpen = !newMenuItem.isOpen;
597
+ newMenuItem.isOpen = !newMenuItem.isOpen
581
598
  } else {
582
- newMenuItem.isOpen = false;
599
+ newMenuItem.isOpen = false
583
600
  }
584
- menuFooter.splice(i, 1, newMenuItem);
601
+ menuFooter.splice(i, 1, newMenuItem)
585
602
  }
586
603
  }
587
604
  }
@@ -590,26 +607,26 @@ export default {
590
607
  if (this.isMobile) {
591
608
  if (event.keyCode === 32 || event.keyCode === 13) {
592
609
  for (let i = 0; i < menuFooter.length; i++) {
593
- let newMenuItem = menuFooter[i];
594
- this.contactMenuIsOpen = !this.contactMenuIsOpen;
595
- newMenuItem.isOpen = false;
596
- menuFooter.splice(i, 1, newMenuItem);
610
+ let newMenuItem = menuFooter[i]
611
+ this.contactMenuIsOpen = !this.contactMenuIsOpen
612
+ newMenuItem.isOpen = false
613
+ menuFooter.splice(i, 1, newMenuItem)
597
614
  }
598
615
  }
599
616
  }
600
617
  },
601
618
  onResize() {
602
- this.windowWidth = window.innerWidth;
603
- let titles = document.getElementsByClassName("app-footer-menu__title");
619
+ this.windowWidth = window.innerWidth
620
+ let titles = document.getElementsByClassName('app-footer-menu__title')
604
621
  if (Array.isArray(titles)) {
605
622
  if (this.isMobile) {
606
623
  titles.forEach((t) => {
607
- t.setAttribute("tabIndex", "0");
608
- });
624
+ t.setAttribute('tabIndex', '0')
625
+ })
609
626
  } else {
610
627
  titles.forEach((t) => {
611
- t.removeAttribute("tabIndex");
612
- });
628
+ t.removeAttribute('tabIndex')
629
+ })
613
630
  }
614
631
  }
615
632
  },
@@ -617,18 +634,18 @@ export default {
617
634
  if (item.absolute) {
618
635
  if (this.$gtm) {
619
636
  this.$gtm.push({
620
- event: "custom.interaction.outboundlink",
637
+ event: 'custom.interaction.outboundlink',
621
638
  category: item.title,
622
639
  label: item.absolute,
623
- });
640
+ })
624
641
  }
625
- window.open(item.absolute);
642
+ window.open(item.absolute)
626
643
  }
627
644
  },
628
645
  },
629
- };
646
+ }
630
647
  </script>
631
648
 
632
649
  <style lang="scss" scoped>
633
- @import "./styles";
650
+ @import './styles';
634
651
  </style>
@@ -16,7 +16,7 @@ $app-menu-gold: #fecc56;
16
16
  $primary-color: $app-menu-gold;
17
17
  $app-menu-white: #ffffff;
18
18
  $app-menu-black: #191919;
19
- $app-menu-grey: lightgrey;
19
+ $app-menu-grey: #f2f2f2;
20
20
  $app-menu-green: #356041;
21
21
  $app-menu-border-color: rgba(255, 255, 255, 0.3);
22
22
  // $app-menu-border-color: $app-menu-black;
@@ -24,8 +24,10 @@ $app-menu-border-color: rgba(255, 255, 255, 0.3);
24
24
  $app-header-background-colour: $app-menu-grey !default;
25
25
  $app-header-text-colour: $app-menu-black !default;
26
26
  $app-header-hover: $app-menu-gold !default;
27
- $app-header-active: $app-menu-yellow !default;
27
+ $app-header-active: $app-menu-black !default;
28
28
  $app-subheader-text-colour: $app-menu-white !default;
29
+ $app-header-active-text-colour: $app-menu-white !default;
30
+
29
31
 
30
32
  @if ($primary-color == #478157) {
31
33
  $app-header-background-colour: $app-menu-green !global;