@worksafevictoria/wcl7.5 1.0.0 → 1.1.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/.env +4 -2
- package/.eslintrc.cjs +1 -1
- package/.eslintrc.js +2 -1
- package/.husky/pre-commit +4 -0
- package/.storybook/main.js +4 -2
- package/.storybook/preview.js +15 -0
- package/README.md +14 -0
- package/babel.config.js +7 -6
- package/bin/deploy.sh +3 -3
- package/ci/build/build_validation.yml +11 -6
- package/ci/release/beta.yml +6 -5
- package/ci/release/master.yml +6 -5
- package/jest.config.js +3 -1
- package/package.json +16 -9
- package/public/.nojekyll +1 -0
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
- package/src/components/Common/CardGridItem/index.vue +9 -3
- package/src/components/Global/AppHeader/ModalSearch/index.vue +6 -1
- package/src/components/Global/AppHeader/index.stories.js +16 -24
- package/src/components/Global/AppHeader/index.vue +9 -8
- package/src/components/Global/Cookies/{index.storieshide.js → index.stories.js} +5 -16
- package/src/components/Global/Cookies/index.vue +122 -136
- package/src/components/Global/Cookies/styles.scss +10 -2
- package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +53 -47
- package/src/components/Global/GlobalNotice/index.stories.js +8 -0
- package/src/components/Global/GlobalNotice/index.vue +71 -137
- package/src/components/Global/HeroHeader/styles.scss +2 -1
- package/src/components/Paragraphs/BrowseContent/index.stories.js +39 -57
- package/src/components/Paragraphs/Chart/Constants.js +4790 -0
- package/src/components/Paragraphs/Chart/index.mdx +61 -0
- package/src/components/Paragraphs/Chart/index.stories.js +31 -0
- package/src/components/Paragraphs/Chart/index.vue +331 -0
- package/src/components/Paragraphs/ListGroup/Link/list-link.stories.js +34 -39
- package/src/components/Paragraphs/ListGroup/list-group.stories.js +34 -31
- package/src/components/Paragraphs/ListGroup/navigation-card.stories.js +33 -30
- package/src/components/Paragraphs/ScrollSpy/index.stories.js +18 -26
- package/src/components/Paragraphs/ScrollSpy/index.vue +2 -1
- package/src/components/Paragraphs/TaskFinder/index.stories.js +10 -33
- package/src/components/Paragraphs/TaskFinder/pdf/index.vue +1 -1
- package/src/components/Paragraphs/TextMedia/index.stories.js +12 -61
- package/src/components/Paragraphs/VideoGrid/index.stories.js +16 -32
- package/src/components/SubComponents/FormInstance/index.vue +3 -1
- package/src/components/SubComponents/FormInstance/stories/mocks/checkbox.json +21 -0
- package/src/components/SubComponents/Search/GoogleREST/index.stories.js +50 -0
- package/src/components/SubComponents/Search/GoogleSearch/index.stories.js +23 -0
- package/src/components/SubComponents/Search/SearchListing/index.vue +69 -9
- package/src/components/SubComponents/Search/index.stories.js +19 -16
- package/src/components/SubComponents/Search/index.vue +563 -59
- package/src/components/SubComponents/VideoThumbnail/index.stories.js +9 -4
- package/src/components/SubComponents/VideoThumbnail/index.vue +93 -96
- package/src/includes/scss/vars/src/colors.scss +29 -1
- package/src/index.js +42 -40
- package/vite.config.js +5 -1
- package/src/components/SubComponents/GoogleSearch/index.stories.js +0 -8
- package/src/components/SubComponents/GoogleSearch/index.vue +0 -405
|
@@ -1,104 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
aria-labelledby="global-notice-modal"
|
|
13
|
-
role="dialog"
|
|
14
|
-
>
|
|
15
|
-
<template #modal-header="{} ">
|
|
16
|
-
<div>
|
|
17
|
-
<!-- Emulate built in modal header close button action -->
|
|
18
|
-
<a
|
|
19
|
-
href="#"
|
|
20
|
-
aria-label="Close"
|
|
21
|
-
@click="
|
|
22
|
-
setCookie()
|
|
23
|
-
$bvModal.hide('global-notice-modal')
|
|
24
|
-
"
|
|
25
|
-
>
|
|
26
|
-
<img
|
|
27
|
-
:src="IconClose"
|
|
28
|
-
alt="close icon"
|
|
29
|
-
class="close-icon"
|
|
30
|
-
width="16px"
|
|
31
|
-
height="16px"
|
|
32
|
-
/>
|
|
33
|
-
</a>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
<div>
|
|
37
|
-
<div slot="modal-title" class="modal-heading">
|
|
38
|
-
Understand changes to the 2023-24 WorkCover premium
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
2
|
+
<div
|
|
3
|
+
v-if="displayGlobal"
|
|
4
|
+
id="global-notice-modal"
|
|
5
|
+
ref="globalNoticeModal"
|
|
6
|
+
class="modal show"
|
|
7
|
+
aria-labelledby="global-notice-modal"
|
|
8
|
+
role="dialog"
|
|
9
|
+
tabindex="-1"
|
|
10
|
+
aria-modal="true"
|
|
11
|
+
style="display: block;">
|
|
41
12
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
13
|
+
<div class="modal-dialog modal-dialog-centered">
|
|
14
|
+
<div class="modal-content">
|
|
15
|
+
<div class="modal-header">
|
|
16
|
+
<button type="button" class="btn-close" @click="setCookie(), displayGlobal = !displayGlobal" aria-label="close"></button>
|
|
46
17
|
</div>
|
|
47
|
-
<div class="modal-
|
|
48
|
-
<div>
|
|
49
|
-
|
|
50
|
-
id="open_page"
|
|
51
|
-
type="button"
|
|
52
|
-
role="button"
|
|
53
|
-
class="modal-buttons isWiderYellow hasIcon justify-content-start "
|
|
54
|
-
style="order: 1"
|
|
55
|
-
aria-label="Open information about premium changes"
|
|
56
|
-
@click="
|
|
57
|
-
setCookie()
|
|
58
|
-
goToPage('/2023-24-workcover-premium-changes')
|
|
59
|
-
$bvModal.hide('global-notice-modal')
|
|
60
|
-
"
|
|
61
|
-
>
|
|
62
|
-
2023-24 premium FAQs
|
|
63
|
-
</button>
|
|
18
|
+
<div class="modal-body">
|
|
19
|
+
<div class="modal-heading">
|
|
20
|
+
Understand changes to the 2023-24 WorkCover premium
|
|
64
21
|
</div>
|
|
65
22
|
<div>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
23
|
+
Information for employers on changes to premium rates, how premium is
|
|
24
|
+
calculated and key dates.
|
|
25
|
+
</div>
|
|
26
|
+
<div class="modal-buttons">
|
|
27
|
+
<div>
|
|
28
|
+
<button
|
|
29
|
+
id="open_page"
|
|
30
|
+
type="button"
|
|
31
|
+
role="button"
|
|
32
|
+
class="modal-buttons isWiderYellow hasIcon justify-content-start "
|
|
33
|
+
style="order: 1"
|
|
34
|
+
aria-label="Open information about premium changes"
|
|
35
|
+
@click="setCookie(), goToPage('/2023-24-workcover-premium-changes'), displayGlobal = !displayGlobal"
|
|
36
|
+
>
|
|
37
|
+
2023-24 premium FAQs
|
|
38
|
+
</button>
|
|
39
|
+
</div>
|
|
40
|
+
<div>
|
|
41
|
+
<button
|
|
42
|
+
id="modal_close"
|
|
43
|
+
type="button"
|
|
44
|
+
role="button"
|
|
45
|
+
class="modal-buttons isWiderGray hasIcon justify-content-start "
|
|
46
|
+
style="order: 2"
|
|
47
|
+
data-bs-dismiss="global-notice-modal"
|
|
48
|
+
aria-label="Close modal and go to WorkSafe website"
|
|
49
|
+
@click="setCookie(), displayGlobal = !displayGlobal"
|
|
50
|
+
>
|
|
51
|
+
Continue to WorkSafe
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
81
54
|
</div>
|
|
82
55
|
</div>
|
|
56
|
+
<div style="display: none;" class="modal-footer"></div>
|
|
83
57
|
</div>
|
|
84
|
-
|
|
85
|
-
slot="modal-footer"
|
|
86
|
-
style="display: none;"
|
|
87
|
-
class="modal-footer"
|
|
88
|
-
></div>
|
|
89
|
-
</b-modal>
|
|
58
|
+
</div>
|
|
90
59
|
</div>
|
|
91
60
|
</template>
|
|
92
61
|
|
|
93
62
|
<script>
|
|
94
|
-
|
|
63
|
+
|
|
95
64
|
export default {
|
|
96
65
|
name: 'GlobalNotice',
|
|
97
66
|
data() {
|
|
98
67
|
return {
|
|
99
68
|
currentURL: '',
|
|
100
69
|
displayGlobal: false,
|
|
101
|
-
IconClose
|
|
102
70
|
}
|
|
103
71
|
},
|
|
104
72
|
mounted() {
|
|
@@ -109,7 +77,11 @@ export default {
|
|
|
109
77
|
localStorage.setItem('globalModalHidden', 'true')
|
|
110
78
|
},
|
|
111
79
|
goToPage(link) {
|
|
112
|
-
|
|
80
|
+
if (process.env.IS_STORYBOOK === 'TRUE') {
|
|
81
|
+
alert('Will go to: ' + link + ' and close notice - clear local storage and refresh to redisplay')
|
|
82
|
+
} else {
|
|
83
|
+
window.open(link, '_self')
|
|
84
|
+
}
|
|
113
85
|
},
|
|
114
86
|
checkPage() {
|
|
115
87
|
this.currentURL = window.location.pathname
|
|
@@ -131,73 +103,35 @@ export default {
|
|
|
131
103
|
@import '../../../assets/styles/generated-icons.scss';
|
|
132
104
|
@import '../../../includes/scss/all';
|
|
133
105
|
|
|
134
|
-
|
|
135
|
-
border-bottom: 0 none !important;
|
|
136
|
-
}
|
|
137
|
-
.modal-dialog.modal-400 {
|
|
138
|
-
width: 400px !important;
|
|
139
|
-
left: 50%;
|
|
140
|
-
margin-left: -(200px);
|
|
141
|
-
top: 50%;
|
|
142
|
-
margin-top: -240px;
|
|
143
|
-
box-shadow: 0px 0px 16px 8px rgba(0, 0, 0, 0.24) !important;
|
|
144
|
-
border-radius: 6px !important;
|
|
106
|
+
// modal and modal backdrop styles required in order to display the overlay behind the modal
|
|
145
107
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
margin-left: -(171px);
|
|
149
|
-
}
|
|
108
|
+
.modal {
|
|
109
|
+
background: rgba(0,0,0,0.5)
|
|
150
110
|
}
|
|
151
|
-
|
|
111
|
+
|
|
112
|
+
.modal-backdrop {
|
|
152
113
|
display: none;
|
|
153
114
|
}
|
|
115
|
+
|
|
154
116
|
.modal-header {
|
|
155
|
-
border
|
|
156
|
-
justify-content: flex-end !important;
|
|
157
|
-
padding-bottom: 0px !important;
|
|
158
|
-
}
|
|
159
|
-
.close-icon {
|
|
160
|
-
padding: 0;
|
|
117
|
+
border: none;
|
|
161
118
|
}
|
|
162
|
-
.modal-footer {
|
|
163
|
-
border-top: 0 none !important;
|
|
164
|
-
}
|
|
165
|
-
.modal-body {
|
|
166
|
-
padding-left: 24px;
|
|
167
|
-
margin-bottom: 0px;
|
|
168
|
-
padding-bottom: 0 !important;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.modal-content {
|
|
172
|
-
font-weight: 400;
|
|
173
|
-
font-size: 16px;
|
|
174
|
-
line-height: 24px;
|
|
175
|
-
border: none !important;
|
|
176
|
-
margin-top: 16px;
|
|
177
|
-
margin-bottom: 0px;
|
|
178
|
-
padding: 0px 8px;
|
|
179
|
-
|
|
180
|
-
&:focus:focus-visible {
|
|
181
|
-
outline: 0 !important;
|
|
182
|
-
}
|
|
183
119
|
|
|
184
|
-
@media only screen and (max-width: 481px) {
|
|
185
|
-
padding: 0px;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
120
|
.modal-heading {
|
|
189
121
|
font-size: 26px;
|
|
190
122
|
font-weight: 700;
|
|
191
123
|
line-height: 30px;
|
|
192
124
|
letter-spacing: 0px;
|
|
193
|
-
margin-bottom:
|
|
194
|
-
margin-top: 0px;
|
|
195
|
-
padding: 0px 8px;
|
|
196
|
-
@media only screen and (max-width: 481px) {
|
|
197
|
-
padding: 0px;
|
|
198
|
-
}
|
|
125
|
+
margin-bottom: 16px;
|
|
199
126
|
}
|
|
200
127
|
|
|
128
|
+
.modal-content {
|
|
129
|
+
font-weight: 400;
|
|
130
|
+
font-size: 16px;
|
|
131
|
+
line-height: 24px;
|
|
132
|
+
padding: 16px;
|
|
133
|
+
}
|
|
134
|
+
|
|
201
135
|
.modal-buttons {
|
|
202
136
|
position: relative;
|
|
203
137
|
text-decoration: none;
|
|
@@ -8,83 +8,64 @@ export default {
|
|
|
8
8
|
argTypes: {
|
|
9
9
|
background: {
|
|
10
10
|
control: 'select',
|
|
11
|
-
options: ['grey', 'white', 'yellow']
|
|
12
|
-
defaultValue: 'grey'
|
|
13
|
-
},
|
|
14
|
-
title: {
|
|
15
|
-
control: 'text',
|
|
16
|
-
defaultValue: 'Card Group Auto title'
|
|
11
|
+
options: ['grey', 'white', 'yellow']
|
|
17
12
|
},
|
|
18
13
|
titleTag: {
|
|
19
14
|
control: 'select',
|
|
20
|
-
options: ['h2', 'h3']
|
|
21
|
-
defaultValue: 'h2'
|
|
22
|
-
},
|
|
23
|
-
bundle: {
|
|
24
|
-
control: 'object',
|
|
25
|
-
defaultValue: bundleContent
|
|
15
|
+
options: ['h2', 'h3']
|
|
26
16
|
},
|
|
27
17
|
columns: {
|
|
28
18
|
control: 'select',
|
|
29
|
-
options: [4, 3, 2, 1]
|
|
30
|
-
defaultValue: 3
|
|
31
|
-
},
|
|
32
|
-
initialDisplyLimit: {
|
|
33
|
-
control: 'number',
|
|
34
|
-
defaultValue: 3
|
|
19
|
+
options: [4, 3, 2, 1]
|
|
35
20
|
},
|
|
36
21
|
fetchContent: {
|
|
37
22
|
control: 'function',
|
|
38
|
-
defaultValue: null,
|
|
39
23
|
table: { disable: true }
|
|
40
24
|
},
|
|
41
|
-
|
|
42
|
-
control: '
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
showMore: {
|
|
46
|
-
control: 'boolean',
|
|
47
|
-
defaultValue: true
|
|
25
|
+
fetchFilters: {
|
|
26
|
+
control: 'function',
|
|
27
|
+
table: { disable: true }
|
|
48
28
|
},
|
|
49
29
|
type: {
|
|
50
30
|
control: 'text',
|
|
51
|
-
defaultValue: 'auto',
|
|
52
31
|
table: { disable: true }
|
|
53
32
|
},
|
|
54
|
-
showFilter: {
|
|
55
|
-
control: 'boolean',
|
|
56
|
-
defaultValue: true
|
|
57
|
-
},
|
|
58
33
|
rows: {
|
|
59
34
|
control: 'select',
|
|
60
|
-
options: [3, 2, 1]
|
|
61
|
-
defaultValue: 3
|
|
62
|
-
},
|
|
63
|
-
hasPreselectedFilters: {
|
|
64
|
-
control: 'boolean',
|
|
65
|
-
defaultValue: false
|
|
66
|
-
},
|
|
67
|
-
totalResults: {
|
|
68
|
-
control: 'number',
|
|
69
|
-
defaultValue: 10
|
|
70
|
-
},
|
|
71
|
-
filterResults: {
|
|
72
|
-
control: 'number',
|
|
73
|
-
defaultValue: 1
|
|
35
|
+
options: [3, 2, 1]
|
|
74
36
|
}
|
|
37
|
+
},
|
|
38
|
+
args: {
|
|
39
|
+
background: 'grey',
|
|
40
|
+
title: 'Card Group Auto title',
|
|
41
|
+
titleTag: 'h2',
|
|
42
|
+
bundle: bundleContent,
|
|
43
|
+
columns: 3,
|
|
44
|
+
initialDisplyLimit: 3,
|
|
45
|
+
fetchContent: null,
|
|
46
|
+
enableBundleFilter: true,
|
|
47
|
+
showMore: true,
|
|
48
|
+
type: 'auto',
|
|
49
|
+
showFilter: true,
|
|
50
|
+
rows: 3,
|
|
51
|
+
hasPreselectedFilters: false,
|
|
52
|
+
totalResults: 10,
|
|
53
|
+
filterResults: 1
|
|
75
54
|
}
|
|
76
55
|
}
|
|
77
56
|
|
|
78
|
-
const DefaultContent = (args
|
|
57
|
+
const DefaultContent = (args) => ({
|
|
79
58
|
components: { BrowseContent },
|
|
80
|
-
|
|
59
|
+
setup() {
|
|
60
|
+
return { args }
|
|
61
|
+
},
|
|
81
62
|
mounted() {
|
|
82
63
|
this.reset()
|
|
83
64
|
},
|
|
84
65
|
computed: {
|
|
85
66
|
searchResults() {
|
|
86
67
|
return {
|
|
87
|
-
results: Array(
|
|
68
|
+
results: Array(args.totalResults).fill({
|
|
88
69
|
title: 'News Kitchen Sink 11',
|
|
89
70
|
imageSrc: '',
|
|
90
71
|
imageAlt: '',
|
|
@@ -96,7 +77,7 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
96
77
|
location: '',
|
|
97
78
|
rtl: false
|
|
98
79
|
}),
|
|
99
|
-
numFound:
|
|
80
|
+
numFound: args.totalResults
|
|
100
81
|
}
|
|
101
82
|
}
|
|
102
83
|
},
|
|
@@ -125,15 +106,15 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
125
106
|
})
|
|
126
107
|
|
|
127
108
|
data.results = hasFilters
|
|
128
|
-
? data.results.slice(0,
|
|
109
|
+
? data.results.slice(0, args.filterResults)
|
|
129
110
|
: data.results.slice(qs.start, qs.start + qs.rows)
|
|
130
|
-
data.numFound = hasFilters ?
|
|
111
|
+
data.numFound = hasFilters ? args.filterResults : data.numFound
|
|
131
112
|
|
|
132
113
|
return Promise.resolve(data)
|
|
133
114
|
},
|
|
134
115
|
fetchFilters() {
|
|
135
|
-
|
|
136
|
-
|
|
116
|
+
const filters = (
|
|
117
|
+
args.showFilter
|
|
137
118
|
? [
|
|
138
119
|
{
|
|
139
120
|
name: 'industry',
|
|
@@ -148,7 +129,7 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
148
129
|
name: 'Aged care'
|
|
149
130
|
}
|
|
150
131
|
].filter((item) =>
|
|
151
|
-
|
|
132
|
+
args.hasPreselectedFilters ? true : !item.preselected
|
|
152
133
|
),
|
|
153
134
|
record_id: 'industry'
|
|
154
135
|
},
|
|
@@ -165,13 +146,14 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
165
146
|
preselected: true
|
|
166
147
|
}
|
|
167
148
|
].filter((item) =>
|
|
168
|
-
|
|
149
|
+
args.hasPreselectedFilters ? true : !item.preselected
|
|
169
150
|
),
|
|
170
151
|
record_id: 'topic'
|
|
171
152
|
}
|
|
172
153
|
]
|
|
173
154
|
: []
|
|
174
155
|
)
|
|
156
|
+
return Promise.resolve(filters)
|
|
175
157
|
},
|
|
176
158
|
getBundleAlias(string) {
|
|
177
159
|
return string.charAt(0).toUpperCase() + string.slice(1)
|
|
@@ -206,10 +188,10 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
206
188
|
},
|
|
207
189
|
template: `
|
|
208
190
|
<browse-content
|
|
209
|
-
v-bind="
|
|
191
|
+
v-bind="args"
|
|
210
192
|
ref="bc"
|
|
211
193
|
:key="rerenderKey"
|
|
212
|
-
:initial-disply-limit="rows * 3"
|
|
194
|
+
:initial-disply-limit="args.rows * 3"
|
|
213
195
|
:fetch-content="fetchCards"
|
|
214
196
|
:get-bundle-alias="getBundleAlias"
|
|
215
197
|
:fetch-filters="fetchFilters"
|