@worksafevictoria/wcl7.5 1.4.0 → 1.6.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 +20 -13
- package/bin/deploy.sh +1 -1
- package/lib/utility.js +10 -8
- package/package.json +4 -5
- package/src/assets/icons/AppFooter/x-ws-footer.svg +10 -0
- package/src/assets/icons/AppFooter/x-ww-footer.svg +28 -0
- package/src/assets/icons/SocialShare/x-icon-white.svg +28 -0
- package/src/assets/styles/modal.scss +51 -0
- package/src/components/Common/CardGrid/index.vue +69 -49
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +7 -4
- package/src/components/Common/CardGridItem/index.vue +95 -71
- package/src/components/Containers/Carousel/index.vue +14 -7
- package/src/components/Containers/HomepageHeader/index.stories.js +60 -36
- package/src/components/Containers/HomepageHeader/index.vue +2 -26
- package/src/components/Containers/HomepageHeaderNew/index.stories.js +15 -15
- package/src/components/Containers/HomepageHeaderNew/index.vue +97 -68
- package/src/components/Containers/SectionGroup/index.vue +1 -1
- package/src/components/Containers/Subheader/index.vue +5 -1
- package/src/components/Global/AppFooter/FooterSocialShare/index.vue +1 -1
- package/src/components/Global/AppFooter/index.vue +14 -7
- package/src/components/Global/AppHeaderNew/index.vue +304 -233
- package/src/components/Global/AppHeaderNew/styles.scss +29 -8
- package/src/components/Global/BackToTop/index.vue +8 -8
- package/src/components/Global/ContrastMode/index.vue +1 -1
- package/src/components/Global/Cookies/index.stories.js +16 -10
- package/src/components/Global/Cookies/index.vue +281 -237
- package/src/components/Global/Cookies/styles.scss +54 -54
- package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +50 -133
- package/src/components/Global/GlobalNotice/index.vue +79 -100
- package/src/components/Global/SocialShare/index.vue +1 -1
- package/src/components/Global/Strip/index.vue +1 -1
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +8 -4
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +23 -23
- package/src/components/Paragraphs/Accordion/index.stories.js +21 -18
- package/src/components/Paragraphs/Accordion/index.vue +52 -48
- package/src/components/Paragraphs/BrowseContent/index.vue +1 -1
- package/src/components/Paragraphs/BrowseContent/setup.vue +284 -0
- package/src/components/Paragraphs/Chart/Constants.js +485 -485
- package/src/components/Paragraphs/Chart/index.vue +232 -241
- package/src/components/Paragraphs/Directory/Records/HSCP/index.stories.js +33 -0
- package/src/components/Paragraphs/Directory/Records/HSCP/index.vue +334 -0
- package/src/components/Paragraphs/Directory/Records/ISP/index.vue +2 -2
- package/src/components/Paragraphs/Directory/Records/index.vue +63 -27
- package/src/components/Paragraphs/Directory/Records/styles.scss +1 -0
- package/src/components/Paragraphs/Directory/constants.js +23 -5
- package/src/components/Paragraphs/Directory/index.vue +14 -14
- package/src/components/Paragraphs/ListGroup/index.vue +5 -1
- package/src/components/Paragraphs/ScrollSpy/index.vue +23 -14
- package/src/components/Paragraphs/SelectableCards/index.vue +15 -12
- package/src/components/Paragraphs/TabbedCards/index.vue +13 -14
- package/src/components/Paragraphs/Tabs/index.vue +19 -17
- package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +9 -9
- package/src/components/Paragraphs/TextMedia/index.vue +20 -16
- package/src/components/Paragraphs/VideoGrid/index.stories.js +43 -19
- package/src/components/Paragraphs/VideoGrid/index.vue +13 -13
- package/src/components/Paragraphs/Webform/index.stories.js +82 -69
- package/src/components/SubComponents/CardGroup/index.vue +5 -1
- package/src/components/SubComponents/FormAddressPostcode/index.vue +35 -37
- package/src/components/SubComponents/FormInstance/components/handler/index.vue +25 -29
- package/src/components/SubComponents/FormInstance/components/renderer/index.vue +63 -28
- package/src/components/SubComponents/FormInstance/models/overrides/file.js +33 -40
- package/src/components/SubComponents/FormInstance/services/form-submit-parser.js +22 -15
- package/src/components/SubComponents/FormInstance/services/registry-factory.js +1 -1
- package/src/components/SubComponents/FormInstance/stories/fileupload.stories.js +57 -0
- package/src/components/SubComponents/FormInstance/stories/mocks/fileupload.json +25 -0
- package/src/components/SubComponents/FormInstance/style.scss +2 -2
- package/src/components/SubComponents/FormInstance/tests/address.test.js +4 -4
- package/src/components/SubComponents/FormInstance/tests/checkboxes.test.js +7 -7
- package/src/components/SubComponents/FormInstance/tests/customcomposite.test.js +15 -15
- package/src/components/SubComponents/FormInstance/tests/date.test.js +8 -8
- package/src/components/SubComponents/FormInstance/tests/form-test-utils.js +9 -9
- package/src/components/SubComponents/FormInstance/tests/multiple.test.js +13 -13
- package/src/components/SubComponents/FormInstance/tests/rule-visible.test.js +120 -120
- package/src/components/SubComponents/FormInstance/tests/scale.test.js +6 -6
- package/src/components/SubComponents/FormInstance/tests/url.test.js +13 -10
- package/src/components/SubComponents/Pagination/index.vue +19 -18
- package/src/components/SubComponents/ResourceGroup/index.vue +5 -1
- package/src/components/SubComponents/Search/SearchListing/index.vue +20 -20
- package/src/components/SubComponents/Search/index.vue +35 -33
- package/src/components/SubComponents/VideoThumbnail/index.vue +48 -133
- package/src/includes/scss/mixins/src/units.scss +25 -4
- package/src/includes/scss/vars/src/colors.module.scss +28 -1
- package/src/index.js +21 -3
- package/src/main.js +2 -10
- package/src/mock/app-header-new.js +27 -15
- package/src/mock/carousel-items.js +71 -46
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import HomepageHeader from './index.vue'
|
|
2
2
|
import { mockCarouselItems } from '../../../mock/carousel-items'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
const headerLinks = [
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
text: 'Report an incident',
|
|
8
|
+
path: '/report-incident'
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
text: 'Report a case of COVID-19',
|
|
12
|
+
path: '/report-confirmed-positive-case-covid-19'
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
text: 'Make a claim',
|
|
16
|
+
path: '/before-claim'
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
text: 'Apply for a licence',
|
|
20
|
+
path: '/apply-for-licence'
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
text: 'Pay or renew your insurance',
|
|
24
|
+
path: '/pay-or-renew-your-workcover-insurance-premium'
|
|
25
25
|
}
|
|
26
|
-
]
|
|
26
|
+
]
|
|
27
27
|
|
|
28
28
|
const contentParser = () => {
|
|
29
29
|
return Promise.resolve({
|
|
@@ -52,10 +52,10 @@ export default {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
args: {
|
|
55
|
-
fetchMenu: fetchMenu,
|
|
56
55
|
slideList: mockCarouselItems,
|
|
57
56
|
isStorybook: true,
|
|
58
|
-
contentParser: contentParser
|
|
57
|
+
contentParser: contentParser,
|
|
58
|
+
headerLinks: headerLinks,
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -1,45 +1,54 @@
|
|
|
1
|
+
<!-- When implemented, importing mock values for carousel to be removed. This was only for testing locally, while values not available from drupal. -->
|
|
2
|
+
|
|
1
3
|
<template>
|
|
2
|
-
<div class="homepage-header">
|
|
3
|
-
<
|
|
4
|
+
<div class="homepage-header">
|
|
5
|
+
<container>
|
|
4
6
|
<search
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
v-for="(link, i) in links"
|
|
22
|
-
:key="i"
|
|
23
|
-
class="iebtn"
|
|
24
|
-
:url="link.path"
|
|
25
|
-
type="dark"
|
|
26
|
-
:stretch="true"
|
|
27
|
-
>{{ link.text }}</cta-button
|
|
28
|
-
>
|
|
29
|
-
<cta-button
|
|
30
|
-
class="iebtn"
|
|
31
|
-
url="/choose-your-language"
|
|
32
|
-
type="dark"
|
|
33
|
-
:stretch="true"
|
|
34
|
-
:glyph="earthIcon"
|
|
35
|
-
:is-centred="false"
|
|
36
|
-
>Choose your language</cta-button
|
|
7
|
+
:page-limit="3"
|
|
8
|
+
:page-number="1"
|
|
9
|
+
:is-typeahead="true"
|
|
10
|
+
:content-parser="contentParser"
|
|
11
|
+
tabindex="0"
|
|
12
|
+
class="homepage-header__search"
|
|
13
|
+
/>
|
|
14
|
+
</container>
|
|
15
|
+
|
|
16
|
+
<div class="homepage-header__content-wrapper">
|
|
17
|
+
<container class="homepage-header__content-wrapper__content">
|
|
18
|
+
<row>
|
|
19
|
+
<column
|
|
20
|
+
class="homepage-header__content-wrapper__content-col col-12 col-md-7 homepage-header__content-wrapper__content-col--split wcl-rich-text--ltr"
|
|
21
|
+
:xs="7"
|
|
22
|
+
:md="7"
|
|
37
23
|
>
|
|
24
|
+
<carousel-component
|
|
25
|
+
:carouselItems="this.slideList"
|
|
26
|
+
:storybook="this.isStorybook"
|
|
27
|
+
/>
|
|
38
28
|
</column>
|
|
29
|
+
<column
|
|
30
|
+
md="4"
|
|
31
|
+
:offset-md="1"
|
|
32
|
+
class="homepage-header__side col-md-4 offset-md-1"
|
|
33
|
+
>
|
|
34
|
+
<div>
|
|
35
|
+
<cta-button
|
|
36
|
+
v-for="(link, i) in headerLinks"
|
|
37
|
+
:key="i"
|
|
38
|
+
class="iebtn"
|
|
39
|
+
:url="link.path"
|
|
40
|
+
type="dark"
|
|
41
|
+
:stretch="true"
|
|
42
|
+
>{{ link.text }}</cta-button
|
|
43
|
+
>
|
|
44
|
+
</div>
|
|
45
|
+
</column>
|
|
39
46
|
</row>
|
|
40
|
-
|
|
47
|
+
</container>
|
|
48
|
+
</div>
|
|
41
49
|
</div>
|
|
42
50
|
</template>
|
|
51
|
+
|
|
43
52
|
<script>
|
|
44
53
|
import Search from './../../SubComponents/Search/index.vue'
|
|
45
54
|
import CtaButton from './../../SubComponents/CtaButton/index.vue'
|
|
@@ -47,6 +56,7 @@ import earthIcon from './../../../assets/icons/earth.svg?url'
|
|
|
47
56
|
import CarouselComponent from './../../Containers/Carousel/index.vue'
|
|
48
57
|
import Row from './../../Containers/Row/index.vue'
|
|
49
58
|
import Column from './../../Containers/Column/index.vue'
|
|
59
|
+
// import { mockCarouselItems } from '../../../mock/carousel-items'
|
|
50
60
|
|
|
51
61
|
export default {
|
|
52
62
|
name: 'HomepageHeader',
|
|
@@ -55,57 +65,47 @@ export default {
|
|
|
55
65
|
CtaButton,
|
|
56
66
|
CarouselComponent,
|
|
57
67
|
Row,
|
|
58
|
-
Column
|
|
68
|
+
Column,
|
|
69
|
+
// mockCarouselItems
|
|
59
70
|
},
|
|
60
71
|
props: {
|
|
61
72
|
contentParser: {
|
|
62
73
|
type: Function,
|
|
63
74
|
required: true,
|
|
64
75
|
},
|
|
65
|
-
|
|
66
|
-
type: Function,
|
|
67
|
-
required: true,
|
|
68
|
-
},
|
|
69
|
-
slideList: {
|
|
76
|
+
slideList: {
|
|
70
77
|
type: Array,
|
|
71
78
|
required: true,
|
|
79
|
+
// default: mockCarouselItems
|
|
72
80
|
},
|
|
73
81
|
isStorybook: {
|
|
74
82
|
type: Boolean,
|
|
75
83
|
default: false
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
},
|
|
85
|
+
headerLinks: {
|
|
86
|
+
type: Array,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
80
89
|
},
|
|
81
90
|
|
|
82
91
|
data: () => ({
|
|
83
|
-
links: [],
|
|
84
92
|
earthIcon,
|
|
85
|
-
})
|
|
86
|
-
methods: {
|
|
87
|
-
async renderMenu() {
|
|
88
|
-
const menu = await this.fetchMenu()
|
|
89
|
-
this.links = (Array.isArray(menu) ? menu : []).map((item) => {
|
|
90
|
-
return {
|
|
91
|
-
text: item.title,
|
|
92
|
-
path: item.relative || item.absolute,
|
|
93
|
-
}
|
|
94
|
-
})
|
|
95
|
-
},
|
|
96
|
-
},
|
|
93
|
+
})
|
|
97
94
|
}
|
|
98
95
|
</script>
|
|
99
96
|
|
|
100
|
-
<!-- styles from the heroheader are still used for consistency,
|
|
101
|
-
even though the component itself is no longer imported. -->
|
|
102
|
-
|
|
103
97
|
<style lang="scss" scoped>
|
|
104
98
|
@import '../../../includes/scss/all';
|
|
105
99
|
@import './../../Global/HeroHeader/styles.scss';
|
|
106
100
|
|
|
101
|
+
|
|
107
102
|
.homepage-header {
|
|
103
|
+
position:relative;
|
|
104
|
+
margin-bottom: 10px;
|
|
105
|
+
display: block;
|
|
108
106
|
border-bottom: none !important;
|
|
107
|
+
height: auto;
|
|
108
|
+
align-items: normal;
|
|
109
109
|
|
|
110
110
|
:deep(.wysiwyg) {
|
|
111
111
|
h1 {
|
|
@@ -122,17 +122,44 @@ even though the component itself is no longer imported. -->
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
&__content-wrapper {
|
|
126
|
+
width: 100%;
|
|
127
|
+
position: relative;
|
|
128
|
+
margin-top: 80px;
|
|
129
|
+
@include mq('mm') {
|
|
130
|
+
margin-top: 10px !important;
|
|
131
|
+
}
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
&__content {
|
|
134
|
+
@include mq('md') {
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding: 0 30px;
|
|
131
138
|
}
|
|
139
|
+
&-col {
|
|
140
|
+
max-width: 69%;
|
|
141
|
+
z-index: 2;
|
|
142
|
+
@include mq('mm') {
|
|
143
|
+
max-width: 100%;
|
|
144
|
+
padding-right: 45px;
|
|
145
|
+
}
|
|
146
|
+
@include mq('xs') {
|
|
147
|
+
padding-right: 0px;
|
|
148
|
+
padding-left: 0px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&--split {
|
|
152
|
+
padding-right: 0;
|
|
153
|
+
}
|
|
132
154
|
|
|
155
|
+
.header-rich-text-wrap {
|
|
156
|
+
max-width: 100%;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
133
160
|
}
|
|
134
161
|
|
|
135
|
-
:deep(.
|
|
162
|
+
:deep(.homepage-header__wrap) {
|
|
136
163
|
display: block;
|
|
137
164
|
align-items: normal;
|
|
138
165
|
}
|
|
@@ -151,9 +178,11 @@ even though the component itself is no longer imported. -->
|
|
|
151
178
|
}
|
|
152
179
|
|
|
153
180
|
&__search {
|
|
154
|
-
|
|
181
|
+
margin-top: 10px;
|
|
155
182
|
z-index: 1;
|
|
156
183
|
width: auto;
|
|
184
|
+
position: relative;
|
|
185
|
+
|
|
157
186
|
|
|
158
187
|
@include mq('xs') {
|
|
159
188
|
padding-right: 0;
|
|
@@ -102,7 +102,11 @@ export default {
|
|
|
102
102
|
methods: {
|
|
103
103
|
selectedCard(card) {
|
|
104
104
|
// Some custom logic for gov caretaker logic
|
|
105
|
-
if (
|
|
105
|
+
if (
|
|
106
|
+
(this.$config
|
|
107
|
+
? this.$config.public.caretaker
|
|
108
|
+
: process.env.CARETAKER) === 'true'
|
|
109
|
+
) {
|
|
106
110
|
if (!isGovSite(card?.selectedCard?.linkHref)) {
|
|
107
111
|
// this.$store.commit('page/SET_CARETAKER_REF', 'subheader')
|
|
108
112
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.linkHref)
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
24
|
import facebookIcon from '../../../../assets/icons/AppFooter/facebook-ws-footer.svg?url'
|
|
25
|
-
import twitterIcon from '../../../../assets/icons/AppFooter/
|
|
25
|
+
import twitterIcon from '../../../../assets/icons/AppFooter/x-ws-footer.svg?url'
|
|
26
26
|
import linkedInIcon from '../../../../assets/icons/AppFooter/linkedin-ws-footer.svg?url'
|
|
27
27
|
import instagramIcon from '../../../../assets/icons/instagram.svg?url'
|
|
28
28
|
import youtubeIcon from '../../../../assets/icons/AppFooter/youtube-ws-footer.svg?url'
|
|
@@ -425,7 +425,9 @@ export default {
|
|
|
425
425
|
showForm: false,
|
|
426
426
|
submitted: false,
|
|
427
427
|
endpoint:
|
|
428
|
-
|
|
428
|
+
(this.$config
|
|
429
|
+
? this.$config.public.apiURL
|
|
430
|
+
: process.env.CONTENT_API_URL) + '/webform_rest/submit?_format=json',
|
|
429
431
|
response: {
|
|
430
432
|
webform_id: 'page_feedback_form',
|
|
431
433
|
page_url: '',
|
|
@@ -436,15 +438,20 @@ export default {
|
|
|
436
438
|
},
|
|
437
439
|
computed: {
|
|
438
440
|
updateDate() {
|
|
439
|
-
//
|
|
440
|
-
return
|
|
441
|
+
// Change to remove hydration date
|
|
442
|
+
return new Date(this.changedDate)
|
|
443
|
+
.toLocaleString('en-AU', {
|
|
444
|
+
timeZone: 'Australia/Sydney',
|
|
445
|
+
})
|
|
446
|
+
.split(',')[0]
|
|
441
447
|
},
|
|
442
448
|
isMobile() {
|
|
443
449
|
return this.windowWidth < 768
|
|
444
450
|
},
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
451
|
+
// Why send junk id
|
|
452
|
+
// processID() {
|
|
453
|
+
// return `${Date.now()}-${Math.floor(Math.random() * 10000)}`
|
|
454
|
+
// },
|
|
448
455
|
},
|
|
449
456
|
watch: {
|
|
450
457
|
$route() {
|
|
@@ -522,7 +529,7 @@ export default {
|
|
|
522
529
|
//title: this.$store?.state?.page?.content?.title,
|
|
523
530
|
title: this.$pageStore?.content?.title,
|
|
524
531
|
label: this.response.was_the_information_on_this_page_helpful_,
|
|
525
|
-
processID: this.processID,
|
|
532
|
+
// processID: this.processID, why send GTM junk id
|
|
526
533
|
}
|
|
527
534
|
if (this.$gtm) {
|
|
528
535
|
this.$gtm.push({
|