@worksafevictoria/wcl7.5 1.5.0 → 1.7.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.
Files changed (99) hide show
  1. package/.storybook/preview.js +20 -13
  2. package/bin/deploy.sh +1 -1
  3. package/lib/utility.js +10 -8
  4. package/package.json +6 -5
  5. package/src/assets/icons/AppFooter/x-ws-footer.svg +10 -0
  6. package/src/assets/icons/AppFooter/x-ww-footer.svg +28 -0
  7. package/src/assets/icons/SocialShare/x-icon-white.svg +28 -0
  8. package/src/assets/styles/modal.scss +51 -0
  9. package/src/components/Common/CardGrid/index.vue +56 -51
  10. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +7 -4
  11. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +15 -19
  12. package/src/components/Common/CardGridItem/index.vue +77 -63
  13. package/src/components/Containers/Carousel/index.vue +14 -7
  14. package/src/components/Containers/HomepageHeader/index.stories.js +60 -36
  15. package/src/components/Containers/HomepageHeader/index.vue +2 -26
  16. package/src/components/Containers/HomepageHeaderNew/index.stories.js +15 -15
  17. package/src/components/Containers/HomepageHeaderNew/index.vue +97 -68
  18. package/src/components/Containers/SectionGroup/index.vue +1 -1
  19. package/src/components/Containers/Subheader/index.vue +5 -1
  20. package/src/components/Global/AppFooter/FooterSocialShare/index.vue +1 -1
  21. package/src/components/Global/AppFooter/index.vue +14 -7
  22. package/src/components/Global/AppFooter/styles.scss +3 -0
  23. package/src/components/Global/AppHeaderNew/styles.scss +10 -15
  24. package/src/components/Global/BackToTop/index.vue +8 -8
  25. package/src/components/Global/Cookies/index.stories.js +16 -10
  26. package/src/components/Global/Cookies/index.vue +280 -243
  27. package/src/components/Global/Cookies/styles.scss +54 -54
  28. package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +50 -133
  29. package/src/components/Global/DirectoryFilters/index.vue +3 -0
  30. package/src/components/Global/GlobalNotice/index.vue +79 -100
  31. package/src/components/Global/SocialShare/index.vue +1 -1
  32. package/src/components/Global/Strip/index.vue +1 -1
  33. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +8 -4
  34. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +23 -23
  35. package/src/components/Paragraphs/Accordion/index.stories.js +21 -18
  36. package/src/components/Paragraphs/Accordion/index.vue +52 -48
  37. package/src/components/Paragraphs/BrowseContent/index.vue +1 -1
  38. package/src/components/Paragraphs/BrowseContent/setup.vue +284 -0
  39. package/src/components/Paragraphs/Chart/Constants.js +952 -952
  40. package/src/components/Paragraphs/Chart/index.vue +232 -241
  41. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.stories.js +34 -0
  42. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +321 -0
  43. package/src/components/Paragraphs/Directory/HSCP/Records/index.stories.js +19 -0
  44. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +345 -0
  45. package/src/components/Paragraphs/Directory/HSCP/Records/pagination.vue +179 -0
  46. package/src/components/Paragraphs/Directory/Records/CJ/index.vue +1 -1
  47. package/src/components/Paragraphs/Directory/Records/ISP/index.vue +1 -1
  48. package/src/components/Paragraphs/Directory/Records/PRS/index.stories.js +34 -0
  49. package/src/components/Paragraphs/Directory/Records/PRS/index.vue +5 -1
  50. package/src/components/Paragraphs/Directory/Records/index.storieshide.js +47 -0
  51. package/src/components/Paragraphs/Directory/Records/index.vue +52 -33
  52. package/src/components/Paragraphs/Directory/constants.js +23 -5
  53. package/src/components/Paragraphs/Directory/index.vue +14 -14
  54. package/src/components/Paragraphs/Directory/{Records/styles.scss → styles.scss} +5 -3
  55. package/src/components/Paragraphs/ListGroup/index.vue +5 -1
  56. package/src/components/Paragraphs/Map/Constants.js +4790 -0
  57. package/src/components/Paragraphs/Map/index.mdx +29 -0
  58. package/src/components/Paragraphs/Map/index.stories.js +15 -0
  59. package/src/components/Paragraphs/Map/index.vue +295 -0
  60. package/src/components/Paragraphs/Map/postcode_location.json +3543 -0
  61. package/src/components/Paragraphs/ScrollSpy/index.vue +23 -14
  62. package/src/components/Paragraphs/SelectableCards/index.vue +15 -12
  63. package/src/components/Paragraphs/TabbedCards/index.vue +13 -14
  64. package/src/components/Paragraphs/Tabs/index.vue +19 -17
  65. package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +9 -9
  66. package/src/components/Paragraphs/TextMedia/index.vue +20 -16
  67. package/src/components/Paragraphs/VideoGrid/index.stories.js +43 -19
  68. package/src/components/Paragraphs/VideoGrid/index.vue +13 -13
  69. package/src/components/Paragraphs/Webform/index.stories.js +82 -69
  70. package/src/components/SubComponents/Breadcrumb/index.vue +4 -0
  71. package/src/components/SubComponents/CardGroup/index.vue +5 -1
  72. package/src/components/SubComponents/FormAddressPostcode/index.vue +35 -37
  73. package/src/components/SubComponents/FormInstance/components/handler/index.vue +25 -29
  74. package/src/components/SubComponents/FormInstance/components/renderer/index.vue +81 -30
  75. package/src/components/SubComponents/FormInstance/models/overrides/file.js +38 -40
  76. package/src/components/SubComponents/FormInstance/services/form-submit-parser.js +22 -15
  77. package/src/components/SubComponents/FormInstance/services/registry-factory.js +1 -1
  78. package/src/components/SubComponents/FormInstance/stories/fileupload.stories.js +57 -0
  79. package/src/components/SubComponents/FormInstance/stories/mocks/fileupload.json +25 -0
  80. package/src/components/SubComponents/FormInstance/style.scss +2 -2
  81. package/src/components/SubComponents/FormInstance/tests/address.test.js +4 -4
  82. package/src/components/SubComponents/FormInstance/tests/checkboxes.test.js +7 -7
  83. package/src/components/SubComponents/FormInstance/tests/customcomposite.test.js +15 -15
  84. package/src/components/SubComponents/FormInstance/tests/date.test.js +8 -8
  85. package/src/components/SubComponents/FormInstance/tests/form-test-utils.js +9 -9
  86. package/src/components/SubComponents/FormInstance/tests/multiple.test.js +13 -13
  87. package/src/components/SubComponents/FormInstance/tests/rule-visible.test.js +120 -120
  88. package/src/components/SubComponents/FormInstance/tests/scale.test.js +6 -6
  89. package/src/components/SubComponents/FormInstance/tests/url.test.js +13 -10
  90. package/src/components/SubComponents/Pagination/index.vue +19 -18
  91. package/src/components/SubComponents/ResourceGroup/index.vue +5 -1
  92. package/src/components/SubComponents/Search/SearchListing/index.vue +20 -20
  93. package/src/components/SubComponents/Search/index.vue +42 -35
  94. package/src/components/SubComponents/VideoThumbnail/index.vue +48 -133
  95. package/src/includes/scss/vars/src/colors.module.scss +28 -1
  96. package/src/index.js +25 -3
  97. package/src/main.js +2 -10
  98. package/src/mock/carousel-items.js +71 -46
  99. package/src/mock/course-provider.js +273 -0
@@ -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
- <div class="container">
4
+ <div class="homepage-header">
5
+ <container>
4
6
  <search
5
- :page-limit="3"
6
- :page-number="1"
7
- :is-typeahead="true"
8
- :content-parser="contentParser"
9
- tabindex="0"
10
- class="homepage-header__search"
11
- />
12
- <row class="wcl-hero-header__content-wrapper container">
13
- <column class="wcl-hero-header__content-wrapper__content-col col-12 col-md-7 wcl-hero-header__content-wrapper__content-col--split wcl-rich-text--ltr">
14
- <carousel-component
15
- :carouselItems="this.slideList"
16
- :storybook="this.isStorybook"
17
- />
18
- </column>
19
- <column class="wcl-hero-header__side col-md-4 offset-md-1">
20
- <cta-button
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
- </div>
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
- fetchMenu: {
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
- async mounted() {
79
- await this.renderMenu()
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
- :deep(.wcl-hero-header__content-wrapper) {
126
- @include fp('top', 75, 250);
127
- margin-top: 0;
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
- @media screen and (max-width: 540px) {
130
- padding-right: 35px;
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(.wcl-hero-header__wrap) {
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
- // margin-top: 10px;
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;
@@ -50,7 +50,7 @@
50
50
  <slot name="preContent"></slot>
51
51
  </column>
52
52
  </row>
53
-
53
+
54
54
  <div
55
55
  class="section-group__content section-group__row"
56
56
  :class="{
@@ -102,7 +102,11 @@ export default {
102
102
  methods: {
103
103
  selectedCard(card) {
104
104
  // Some custom logic for gov caretaker logic
105
- if (process.env.CARETAKER && process.env.CARETAKER === 'true') {
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/twitter-ws-footer.svg?url'
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
- process.env.CONTENT_API_URL + '/webform_rest/submit?_format=json',
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
- // https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
440
- return format(new Date(this.changedDate), 'dd/MM/yyyy')
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
- processID() {
446
- return `${Date.now()}-${Math.floor(Math.random() * 10000)}`
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({
@@ -257,6 +257,9 @@ $whitesmoke: #f3f3f3 !default;
257
257
  :deep(path) {
258
258
  fill: white;
259
259
  }
260
+ :deep(.icon) {
261
+ filter: invert(100%) sepia(5%) saturate(49%) hue-rotate(165deg) brightness(119%) contrast(100%);
262
+ }
260
263
  }
261
264
 
262
265
  @media screen and (max-width: 767px) {
@@ -31,9 +31,10 @@
31
31
  border: $app-header-active;
32
32
 
33
33
  > a > span {
34
+ // border-bottom: 3px solid $app-header-active;
34
35
  background-color: $app-header-active;
35
36
  }
36
- }
37
+ }
37
38
  .isActiveChild {
38
39
  > a {
39
40
  background: $app-header-active;
@@ -48,7 +49,6 @@
48
49
 
49
50
  // First Level Overrides
50
51
  &__close {
51
-
52
52
  &-button {
53
53
  display: flex;
54
54
  vertical-align: middle;
@@ -113,7 +113,6 @@
113
113
  margin-right: 0;
114
114
  }
115
115
 
116
-
117
116
  .search-string {
118
117
  @media screen and (max-width: 1065px) and (min-width: 981px) {
119
118
  display: none;
@@ -192,15 +191,15 @@
192
191
  }
193
192
 
194
193
  &__nav-menu {
195
-
194
+
196
195
  .nav-item {
197
196
  .sub-nav-container {
198
197
  display: none;
199
198
  position: fixed;
200
199
  background: $app-menu-black;
201
- top: 180px;
202
- left: 25px;
203
- right: 25px;
200
+ top: 165px;
201
+ left: 10px;
202
+ right: 10px;
204
203
  bottom: 10px;
205
204
  border-radius: 3px;
206
205
 
@@ -212,16 +211,15 @@
212
211
  &__innermore {
213
212
  overflow-x: auto;
214
213
  height: max-content;
215
- left: 25px;
216
- right: 25px;
217
- top: 180px;
214
+ left: 10px;
215
+ right: 10px;
216
+ top: 165px;
218
217
  position: fixed;
219
218
  padding-top: 15px !important;
220
219
  background-color: $app-menu-black !important;
221
220
  border-radius: 3px;
222
221
  }
223
222
 
224
-
225
223
  &__wrap {
226
224
  position: relative;
227
225
  margin: 0 auto;
@@ -248,11 +246,9 @@
248
246
 
249
247
  &:last-of-type {
250
248
  > a {
251
-
252
249
  svg {
253
250
  height: 23px;
254
251
  width: 23px;
255
-
256
252
  }
257
253
  & > span {
258
254
  margin-right: 10px;
@@ -307,14 +303,13 @@
307
303
  }
308
304
  > .sub-nav-group {
309
305
  li.isActiveChild {
306
+
310
307
  .sub-nav {
311
308
  display: block;
312
-
313
309
 
314
310
  .selected-title {
315
311
  text-align: left;
316
312
  top: 12px;
317
-
318
313
 
319
314
  a {
320
315
  padding: 5px 5px 15px 5px;
@@ -12,23 +12,23 @@
12
12
  <script>
13
13
  import Icon from '../../SubComponents/Icon/index.vue'
14
14
  import ChevUp from '../../../assets/icons/chev-up.svg?raw'
15
- import debounce from 'lodash/debounce'
15
+ import { debounce } from 'lodash-es'
16
16
 
17
17
  export default {
18
18
  name: 'BackToTop',
19
19
  components: {
20
- Icon
20
+ Icon,
21
21
  },
22
22
  props: {
23
23
  storybook: {
24
24
  type: Boolean,
25
- default: false
26
- }
25
+ default: false,
26
+ },
27
27
  },
28
28
  data() {
29
29
  return {
30
30
  ChevUp,
31
- showBackToTop: false
31
+ showBackToTop: false,
32
32
  }
33
33
  },
34
34
  computed: {
@@ -38,7 +38,7 @@ export default {
38
38
  } else {
39
39
  return this.showBackToTop
40
40
  }
41
- }
41
+ },
42
42
  },
43
43
  mounted() {
44
44
  this.handleDebouncedScroll = debounce(this.showHideBtbBtn, 100)
@@ -57,8 +57,8 @@ export default {
57
57
  },
58
58
  showHideBtbBtn() {
59
59
  this.showBackToTop = window.scrollY > window.innerHeight / 2
60
- }
61
- }
60
+ },
61
+ },
62
62
  }
63
63
  </script>
64
64
 
@@ -4,31 +4,37 @@ const defaultValue = {
4
4
  header: 'field_cookie_heading',
5
5
  content: {
6
6
  default: 'field_cookie_content',
7
- small: 'field_cookie_content_small'
7
+ small: 'field_cookie_content_small',
8
8
  },
9
9
  modal: {
10
10
  heading: 'field_modal_heading',
11
11
  functional: {
12
12
  heading: 'field_functional_heading',
13
- description: 'field_functional_description'
13
+ description: 'field_functional_description',
14
14
  },
15
15
  analytics: {
16
16
  heading: 'field_analytics_heading',
17
- description: 'field_analytics_description'
17
+ description: 'field_analytics_description',
18
18
  },
19
19
  marketing: {
20
20
  heading: 'field_marketing_heading',
21
- description: 'field_marketing_description'
22
- }
23
- }
21
+ description: 'field_marketing_description',
22
+ },
23
+ },
24
24
  }
25
25
  export default {
26
26
  title: 'Global/Cookies',
27
27
  component: Cookies,
28
28
  args: {
29
29
  cookieHeader: 'Accept and Reject Cookies',
30
- cookieContent: defaultValue
31
- }
32
- }
30
+ cookieContent: defaultValue,
31
+ },
32
+ }
33
33
 
34
- export const Default = {}
34
+ export const Default = {
35
+ loaders: [
36
+ () => {
37
+ window.localStorage.removeItem('cookieBannerDisplayed')
38
+ },
39
+ ],
40
+ }