@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
|
@@ -17,12 +17,14 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</column>
|
|
20
|
+
<!-- Cookie buttons displayed when not xs -->
|
|
20
21
|
<column class="cookie-container__col hidden-on-xs">
|
|
21
22
|
<div class="cookie-buttons mt-md-3">
|
|
22
23
|
<button
|
|
23
24
|
id="moreBtn"
|
|
24
|
-
|
|
25
|
+
type="button"
|
|
25
26
|
role="button"
|
|
27
|
+
@click="showCookieModal = !showCookieModal"
|
|
26
28
|
class="cookieBtn moreOptions"
|
|
27
29
|
aria-label="More cookie options"
|
|
28
30
|
>
|
|
@@ -34,10 +36,7 @@
|
|
|
34
36
|
class="cookieBtn yellow hasIcon"
|
|
35
37
|
style="order:1;"
|
|
36
38
|
aria-label="Accept all cookies"
|
|
37
|
-
@click="
|
|
38
|
-
clickedCookie('accept')
|
|
39
|
-
fireGTM()
|
|
40
|
-
"
|
|
39
|
+
@click="clickedCookie('accept'), fireGTM()"
|
|
41
40
|
>
|
|
42
41
|
Accept all
|
|
43
42
|
</button>
|
|
@@ -47,162 +46,148 @@
|
|
|
47
46
|
class="cookieBtn black hasIcon"
|
|
48
47
|
style="order:2;"
|
|
49
48
|
aria-label="Reject all cookies"
|
|
50
|
-
@click="
|
|
51
|
-
clickedCookie('reject')
|
|
52
|
-
fireGTM()
|
|
53
|
-
checkCookie()
|
|
54
|
-
"
|
|
49
|
+
@click="clickedCookie('reject'), fireGTM(), checkCookie()"
|
|
55
50
|
>
|
|
56
51
|
Reject all
|
|
57
52
|
</button>
|
|
58
53
|
</div>
|
|
59
54
|
</column>
|
|
55
|
+
<!-- Cookie buttons displayed when xs -->
|
|
60
56
|
<row class="cookie-links col mt-3 display-on-xs">
|
|
61
57
|
<div>
|
|
62
|
-
<a id="moreLink" href="#" @click="
|
|
58
|
+
<a id="moreLink" href="#" @click="showCookieModal = !showCookieModal"
|
|
63
59
|
>More options</a
|
|
64
60
|
>
|
|
65
61
|
<a
|
|
66
62
|
id="acceptAllLink"
|
|
67
63
|
href="#"
|
|
68
|
-
@click="
|
|
69
|
-
clickedCookie('accept')
|
|
70
|
-
fireGTM()
|
|
71
|
-
"
|
|
64
|
+
@click="clickedCookie('accept'), fireGTM()"
|
|
72
65
|
>Accept all</a
|
|
73
66
|
>
|
|
74
67
|
<a
|
|
75
68
|
id="rejectAllLink"
|
|
76
69
|
href="#"
|
|
77
|
-
@click="
|
|
78
|
-
clickedCookie('reject')
|
|
79
|
-
fireGTM()
|
|
80
|
-
checkCookie()
|
|
81
|
-
"
|
|
70
|
+
@click="clickedCookie('reject'), fireGTM(), checkCookie()"
|
|
82
71
|
>Reject all</a
|
|
83
72
|
>
|
|
84
73
|
</div>
|
|
85
74
|
</row>
|
|
86
75
|
</row>
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"
|
|
196
|
-
>
|
|
197
|
-
Accept all
|
|
198
|
-
</button>
|
|
199
|
-
</div>
|
|
200
|
-
</b-modal>
|
|
76
|
+
<!-- Modal -->
|
|
77
|
+
<div v-if="showCookieModal" class="modal fade show" tabindex="-1" aria-modal="true" role="dialog" style="display: block;">
|
|
78
|
+
<div class="modal-dialog">
|
|
79
|
+
<div class="modal-content">
|
|
80
|
+
<div class="modal-header">
|
|
81
|
+
<div class="modal-heading-text">
|
|
82
|
+
{{ cookieContent.modal.heading }}
|
|
83
|
+
</div>
|
|
84
|
+
<button type="button" class="btn-close" @click="showCookieModal = !showCookieModal" aria-label="close"></button>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="modal-body">
|
|
87
|
+
<fieldset>
|
|
88
|
+
<row>
|
|
89
|
+
<column>
|
|
90
|
+
<h5>{{ cookieContent.modal.functional.heading }}</h5>
|
|
91
|
+
</column>
|
|
92
|
+
<column>
|
|
93
|
+
<label for="modal1CB" class="option">
|
|
94
|
+
Necessary<span class="visually-hidden">functional label</span>
|
|
95
|
+
<input
|
|
96
|
+
id="modal1CB"
|
|
97
|
+
type="checkbox"
|
|
98
|
+
value="functional"
|
|
99
|
+
checked
|
|
100
|
+
disabled
|
|
101
|
+
/>
|
|
102
|
+
</label>
|
|
103
|
+
</column>
|
|
104
|
+
</row>
|
|
105
|
+
<row>
|
|
106
|
+
<column class="modal-description">
|
|
107
|
+
{{cookieContent.modal.functional.description}}
|
|
108
|
+
</column>
|
|
109
|
+
</row>
|
|
110
|
+
<hr />
|
|
111
|
+
<row>
|
|
112
|
+
<column>
|
|
113
|
+
<h5>{{ cookieContent.modal.analytics.heading }}</h5>
|
|
114
|
+
</column>
|
|
115
|
+
<column>
|
|
116
|
+
<label for="modal2CB" class="option">
|
|
117
|
+
<span class="visually-hidden">analytics checkbox</span>
|
|
118
|
+
<input
|
|
119
|
+
id="modal2CB"
|
|
120
|
+
type="checkbox"
|
|
121
|
+
name="modal2CB"
|
|
122
|
+
value="analytics"
|
|
123
|
+
/>
|
|
124
|
+
</label>
|
|
125
|
+
</column>
|
|
126
|
+
</row>
|
|
127
|
+
<row>
|
|
128
|
+
<column class="modal-description">
|
|
129
|
+
{{cookieContent.modal.analytics.description}}
|
|
130
|
+
</column>
|
|
131
|
+
</row>
|
|
132
|
+
<hr />
|
|
133
|
+
<row>
|
|
134
|
+
<column>
|
|
135
|
+
<h5>{{ cookieContent.modal.marketing.heading }}</h5>
|
|
136
|
+
</column>
|
|
137
|
+
<column text-align="right">
|
|
138
|
+
<label for="modal3CB" class="option">
|
|
139
|
+
<span class="visually-hidden">marketing checkbox</span>
|
|
140
|
+
<input
|
|
141
|
+
id="modal3CB"
|
|
142
|
+
type="checkbox"
|
|
143
|
+
name="modal3CB"
|
|
144
|
+
value="marketing"
|
|
145
|
+
/>
|
|
146
|
+
</label>
|
|
147
|
+
</column>
|
|
148
|
+
</row>
|
|
149
|
+
<row>
|
|
150
|
+
<column class="modal-description">
|
|
151
|
+
{{cookieContent.modal.marketing.description}}
|
|
152
|
+
</column>
|
|
153
|
+
</row>
|
|
154
|
+
</fieldset>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="modal-footer">
|
|
157
|
+
<button
|
|
158
|
+
id="modal_save"
|
|
159
|
+
type="button"
|
|
160
|
+
role="button"
|
|
161
|
+
class="cookieBtn yellow hasIcon"
|
|
162
|
+
style="order:1;"
|
|
163
|
+
aria-label="Save cookie settings"
|
|
164
|
+
@click="clickedCookie('save'), fireGTM(), checkCookie(), showCookieModal = !showCookieModal"
|
|
165
|
+
>
|
|
166
|
+
Save
|
|
167
|
+
</button>
|
|
168
|
+
<button
|
|
169
|
+
id="modal_accept"
|
|
170
|
+
type="button"
|
|
171
|
+
role="button"
|
|
172
|
+
class="cookieBtn black hasIcon"
|
|
173
|
+
style="order:2;"
|
|
174
|
+
data-bs-dismiss="cookieModal"
|
|
175
|
+
aria-label="Accept all cookies"
|
|
176
|
+
@click="clickedCookie('accept'), fireGTM(), showCookieModal = !showCookieModal"
|
|
177
|
+
>
|
|
178
|
+
Accept all
|
|
179
|
+
</button>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
201
184
|
</container>
|
|
202
185
|
</template>
|
|
203
186
|
|
|
204
187
|
<script>
|
|
205
|
-
import
|
|
188
|
+
import Container from './../../Containers/Container/index.vue'
|
|
189
|
+
import Row from './../../Containers/Row/index.vue'
|
|
190
|
+
import Column from './../../Containers/Column/index.vue'
|
|
206
191
|
import { analyticsCookies, marketingCookies } from './Constants'
|
|
207
192
|
|
|
208
193
|
export default {
|
|
@@ -227,7 +212,8 @@ export default {
|
|
|
227
212
|
modalTitle: this.modalHeading,
|
|
228
213
|
analyticsCookies,
|
|
229
214
|
marketingCookies,
|
|
230
|
-
screenWidth: 0
|
|
215
|
+
screenWidth: 0,
|
|
216
|
+
showCookieModal: false
|
|
231
217
|
}
|
|
232
218
|
},
|
|
233
219
|
computed: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@import '../../../assets/styles/generated-icons.scss';
|
|
2
|
-
@import '
|
|
2
|
+
@import './../../../includes/scss/all';
|
|
3
3
|
|
|
4
4
|
h3.cookie-header {
|
|
5
5
|
font-weight: 700;
|
|
@@ -249,7 +249,15 @@ h3.cookie-header {
|
|
|
249
249
|
color: $black;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.modal
|
|
252
|
+
.modal {
|
|
253
|
+
background: rgba(0,0,0,0.5)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.modal-backdrop {
|
|
257
|
+
display: none;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.modal-heading-text {
|
|
253
261
|
font-size: 26px;
|
|
254
262
|
font-weight: 700;
|
|
255
263
|
line-height: 32px;
|
|
@@ -4,62 +4,58 @@
|
|
|
4
4
|
:has-caret="true"
|
|
5
5
|
:selected="numberOfItems > 0"
|
|
6
6
|
:is-reset="false"
|
|
7
|
-
@clicked="
|
|
7
|
+
@clicked="showMyModal = !showMyModal"
|
|
8
8
|
>
|
|
9
9
|
<span>{{ data.name }}</span>
|
|
10
10
|
<span v-if="numberOfItems > 0">({{ numberOfItems }})</span>
|
|
11
11
|
</filter-button>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
centered
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
<div v-if="showMyModal" class="modal fade show wcl-directory-filters__single-tax__modal"
|
|
13
|
+
tabindex="-1" aria-labelledby="exampleModalLabel" aria-modal="true" role="dialog"
|
|
14
|
+
style="display: block;">
|
|
15
|
+
<div class="modal-dialog modal-xl modal-dialog-scrollable modal-dialog-centered">
|
|
16
|
+
<div class="modal-content">
|
|
17
|
+
<div class="modal-body">
|
|
18
|
+
<fieldset>
|
|
19
|
+
<legend>Filter by {{ data.name }}</legend>
|
|
20
|
+
<div v-for="term in data.terms" :key="term.tid" class="option">
|
|
21
|
+
<input
|
|
22
|
+
:id="`term_${term.tid}`"
|
|
23
|
+
v-model="selectedFilters[`${data.record_id}`]"
|
|
24
|
+
type="checkbox"
|
|
25
|
+
:name="term.name"
|
|
26
|
+
:value="term"
|
|
27
|
+
:disabled="term.preselected"
|
|
28
|
+
@keyup.enter="(e) => e.target.click()"
|
|
29
|
+
/>
|
|
30
|
+
<label :for="`term_${term.tid}`">{{ term.name }}</label>
|
|
31
|
+
</div>
|
|
32
|
+
</fieldset>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="modal-footer">
|
|
35
|
+
<cta-button
|
|
36
|
+
v-if="!loading && results !== 0"
|
|
37
|
+
:type="'dark'"
|
|
38
|
+
:rtl="false"
|
|
39
|
+
:focus-outline="'light'"
|
|
40
|
+
:workwell="false"
|
|
41
|
+
@clicked="showMyModal = !showMyModal"
|
|
42
|
+
>Show <span>{{ results }}</span> {{ resultString }}
|
|
43
|
+
</cta-button>
|
|
44
|
+
<strong v-else><span v-show="!loading">No results found</span></strong>
|
|
45
|
+
</div>
|
|
35
46
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<!-- Emulate built in modal footer ok and cancel button actions -->
|
|
39
|
-
<cta-button
|
|
40
|
-
v-if="!loading && results !== 0"
|
|
41
|
-
:type="'dark'"
|
|
42
|
-
:rtl="false"
|
|
43
|
-
:focus-outline="'light'"
|
|
44
|
-
:workwell="false"
|
|
45
|
-
@clicked="ok()"
|
|
46
|
-
>Show <span>{{ results }}</span> {{ resultString }}</cta-button
|
|
47
|
-
>
|
|
48
|
-
<strong v-else><span v-show="!loading">No results found</span></strong>
|
|
49
|
-
</template>
|
|
50
|
-
</b-modal>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
51
49
|
</div>
|
|
52
50
|
</template>
|
|
53
51
|
<script>
|
|
54
|
-
import CtaButton from '
|
|
55
|
-
import FilterButton from '
|
|
56
|
-
import { BModal } from 'bootstrap-vue-next'
|
|
52
|
+
import CtaButton from '../../../SubComponents/CtaButton/index.vue'
|
|
53
|
+
import FilterButton from '../../../Common/FilterButton/index.vue'
|
|
57
54
|
|
|
58
55
|
export default {
|
|
59
56
|
components: {
|
|
60
57
|
CtaButton,
|
|
61
|
-
FilterButton
|
|
62
|
-
BModal
|
|
58
|
+
FilterButton
|
|
63
59
|
},
|
|
64
60
|
props: {
|
|
65
61
|
data: {
|
|
@@ -82,7 +78,8 @@ export default {
|
|
|
82
78
|
(term) => term.preselected
|
|
83
79
|
)
|
|
84
80
|
},
|
|
85
|
-
hasReset: false
|
|
81
|
+
hasReset: false,
|
|
82
|
+
showMyModal: false
|
|
86
83
|
}
|
|
87
84
|
},
|
|
88
85
|
computed: {
|
|
@@ -92,7 +89,7 @@ export default {
|
|
|
92
89
|
resultString() {
|
|
93
90
|
let s = 's'
|
|
94
91
|
this.results === 1 ? (s = '') : false
|
|
95
|
-
return 'Result' + s
|
|
92
|
+
return 'Result' + s + ' '
|
|
96
93
|
}
|
|
97
94
|
},
|
|
98
95
|
watch: {
|
|
@@ -121,7 +118,7 @@ export default {
|
|
|
121
118
|
}
|
|
122
119
|
</script>
|
|
123
120
|
<style lang="scss">
|
|
124
|
-
//
|
|
121
|
+
//
|
|
125
122
|
// Global non scoped scss!
|
|
126
123
|
// Modal inner overrides only
|
|
127
124
|
//
|
|
@@ -134,13 +131,22 @@ export default {
|
|
|
134
131
|
padding-left: 8px;
|
|
135
132
|
}
|
|
136
133
|
|
|
134
|
+
.modal {
|
|
135
|
+
background: rgba(0,0,0,0.5);
|
|
136
|
+
}
|
|
137
|
+
.modal-backdrop {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
137
141
|
&__modal {
|
|
138
142
|
.modal-content {
|
|
139
143
|
border-radius: 8px;
|
|
140
144
|
}
|
|
145
|
+
|
|
141
146
|
.modal-xl {
|
|
142
147
|
max-width: 920px;
|
|
143
148
|
}
|
|
149
|
+
|
|
144
150
|
.modal-header {
|
|
145
151
|
position: absolute;
|
|
146
152
|
width: 100%;
|