@worksafevictoria/wcl7.5 1.14.0-beta.6 → 1.14.0-beta.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.14.0-beta.6",
3
+ "version": "1.14.0-beta.8",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="140.743" height="128.766" viewBox="0 0 140.743 128.766"><g transform="translate(0 0)"><path d="M5.986,128.766A5.986,5.986,0,0,1,.45,120.507a.323.323,0,0,1,.083-.056.35.35,0,0,0,.073-.046L117.334,3.677a4.454,4.454,0,0,0,1.036-1.742l.107-.108a5.986,5.986,0,1,1,8.465,8.465L103,34.206a125.465,125.465,0,0,1,25.74,21.55,12.981,12.981,0,0,1,.042,17.348A125.8,125.8,0,0,1,115.556,85.64a118.682,118.682,0,0,1-16.05,11.144,90.43,90.43,0,0,1-17.951,7.984,63.583,63.583,0,0,1-18.927,3.054h-1.8a67.061,67.061,0,0,1-25.8-5.62L10.213,127.02A5.951,5.951,0,0,1,5.986,128.766Zm78.962-75.9a1.515,1.515,0,0,0-1.076.452L50.589,86.6A1.514,1.514,0,0,0,51,89.032,25.738,25.738,0,0,0,69.553,90.17,27.416,27.416,0,0,0,87.511,72.044a25.711,25.711,0,0,0-1.2-18.323,1.51,1.51,0,0,0-1.36-.854Z" transform="translate(8.661 0)" fill="#fff"/><path d="M44.106,51.784a1.461,1.461,0,0,0,.365-1.437A25.83,25.83,0,0,1,43.417,43.4,26.937,26.937,0,0,1,70.355,16.467,25.6,25.6,0,0,1,77.3,17.5a1.461,1.461,0,0,0,1.437-.371L90.354,5.506a1.52,1.52,0,0,0-.6-2.52A62.333,62.333,0,0,0,70.355,0C44.615-.342,18.874,17.664,3.388,34.718a12.87,12.87,0,0,0-.042,17.36,126.959,126.959,0,0,0,20.58,18.138,1.532,1.532,0,0,0,1.951-.174Z" transform="translate(0 21.038)" fill="#fff"/></g></svg>
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <!-- eslint-disable vue/no-v-html -->
3
3
  <container>
4
+ <div>
5
+ <hr />
6
+ </div>
4
7
  <row>
5
8
  <column sm="9">
6
9
  <div v-if="item.outcome" class="record-details__outcome">
@@ -89,3 +92,11 @@ export default {
89
92
  }
90
93
  }
91
94
  </script>
95
+
96
+ <style lang="scss" scoped>
97
+
98
+ .record-details__outcome {
99
+ margin-left: 20px !important;
100
+ }
101
+
102
+ </style>
@@ -9,19 +9,67 @@
9
9
  :size="fixWidth ? 'content' : 'page'"
10
10
  @isMobileOrTabletView="(e) => (isMobileOrTabletView = e)"
11
11
  >
12
- <div>
13
- <video-player
14
- :provider="provider"
15
- :video-id="videoId"
16
- class="video-media__video-player"
17
- :rtl="rtl"
18
- />
19
- </div>
12
+ <BOverlay
13
+ v-model:show="show"
14
+ no-center
15
+ variant="dark"
16
+ opacity="1"
17
+ @shown="onShown"
18
+ @hidden="onHidden"
19
+ >
20
+ <div>
21
+ <video-player
22
+ :provider="provider"
23
+ :video-id="videoId"
24
+ class="video-media__video-player"
25
+ :rtl="rtl"
26
+ />
27
+ </div>
28
+
29
+ <!-- video overlay slot... -->
30
+ <template #overlay>
31
+ <div class="wcl-video-modal__overlay" role="dialog" aria-modal="true">
32
+ <div class="wcl-video-modal__panel">
33
+ <img
34
+ class="icon"
35
+ :src="IconView"
36
+ alt="Icon View"
37
+ aria-hidden="true"
38
+ />
39
+ <h2 class="title">
40
+ {{ mediaAlertTitle }}
41
+ </h2>
42
+ <p class="description">
43
+ {{ mediaAlertDescription }}
44
+ </p>
45
+ <CtaButton
46
+ text-only="true"
47
+ aria-describedby="gethelp-label"
48
+ :url="mediaAlertUrl"
49
+ >
50
+ Get help
51
+ </CtaButton>
52
+ <CtaButton
53
+ type="gray"
54
+ text-only="true"
55
+ aria-describedby="seevideo-label"
56
+ @click="onSeeVideo"
57
+ >
58
+ See video
59
+ </CtaButton>
60
+ </div>
61
+ </div>
62
+ </template>
63
+ </BOverlay>
20
64
  </section-group>
65
+
66
+ <!-- Only visible when overlay is NOT visible -->
21
67
  <accordion
68
+ v-show="!show"
22
69
  :accordion-list="accordion"
23
70
  :option="'close-all'"
24
71
  class="video-media__transcript"
72
+ :aria-hidden="show ? 'true' : null"
25
73
  />
26
74
  </div>
27
75
  </template>
@@ -30,64 +78,101 @@
30
78
  import SectionGroup from '../../Containers/SectionGroup/index.vue'
31
79
  import VideoPlayer from '../../SubComponents/MediaPlayer/index.vue'
32
80
  import Accordion from '../Accordion/index.vue'
81
+ import IconView from './../../../assets/icons/icon-view-off.svg?url'
82
+ import CtaButton from './../../SubComponents/CtaButton/index.vue'
33
83
 
34
84
  export default {
35
85
  name: 'VideoMedia',
36
86
  components: {
87
+ CtaButton,
37
88
  VideoPlayer,
38
89
  SectionGroup,
39
- Accordion
90
+ Accordion,
91
+ IconView,
40
92
  },
41
93
  props: {
42
94
  mediaTitle: {
43
95
  type: String,
44
- default: null
96
+ default: null,
45
97
  },
46
98
  mediaDescription: {
47
99
  type: String,
48
- default: null
100
+ default: null,
49
101
  },
50
102
  provider: {
51
103
  type: String,
52
- required: true
104
+ required: true,
53
105
  },
54
106
  videoId: {
55
107
  type: String,
56
- required: true
108
+ required: true,
57
109
  },
58
110
  transcriptTitle: {
59
111
  type: String,
60
- default: null
112
+ default: null,
61
113
  },
62
114
  transcript: {
63
115
  type: String,
64
- default: null
116
+ default: null,
65
117
  },
66
118
  fixWidth: {
67
119
  type: Boolean,
68
- default: false
120
+ default: false,
69
121
  },
70
122
  rtl: {
71
123
  type: Boolean,
72
- default: false
124
+ default: false,
73
125
  },
74
126
  titleTag: {
75
127
  type: String,
76
- default: 'h2'
128
+ default: 'h2',
129
+ },
130
+ mediaAlert: {
131
+ type: Boolean,
132
+ default: false,
133
+ },
134
+ mediaAlertTitle: {
135
+ type: String,
136
+ default: null,
137
+ },
138
+ mediaAlertDescription: {
139
+ type: String,
140
+ default: null,
141
+ },
142
+ mediaAlertUrl: {
143
+ type: String,
144
+ default: null,
145
+ },
146
+ },
147
+ data() {
148
+ return {
149
+ IconView,
150
+ show: this.mediaAlert,
77
151
  }
78
152
  },
153
+ watch: {
154
+ mediaAlert(v) {
155
+ this.show = v
156
+ },
157
+ },
79
158
  computed: {
80
159
  accordion() {
81
160
  return [
82
161
  {
83
162
  field_title: this.transcriptTitle,
84
163
  field_rich_text: {
85
- value: this.transcript
86
- }
87
- }
164
+ value: this.transcript,
165
+ },
166
+ },
88
167
  ]
89
- }
90
- }
168
+ },
169
+ },
170
+ methods: {
171
+ onSeeVideo() {
172
+ this.show = false
173
+ this.$emit('update:alert', false) // or emit nothing if parent doesn't care
174
+ },
175
+ },
91
176
  }
92
177
  </script>
93
178
 
@@ -106,5 +191,50 @@ export default {
106
191
  :deep(.section-group--size-page .video-player) {
107
192
  @include fp(min-height, 250, 625);
108
193
  }
194
+
195
+ /* Center *within the wrapper*, not the window */
196
+ .wcl-video-modal {
197
+ &__overlay {
198
+ position: absolute; /* absolute to .b-overlay-wrap */
199
+ inset: 0; /* fill the wrapper */
200
+ z-index: 10; /* above the video */
201
+ display: grid; /* simple centering */
202
+ place-items: center; /* vertical + horizontal center */
203
+ padding: 1rem;
204
+ text-align: center;
205
+ /* Optional dim */
206
+ background: rgba(0, 0, 0, 0.6);
207
+ overflow: auto; /* scroll if content taller than video area */
208
+ }
209
+
210
+ /* The centered card */
211
+ &__panel {
212
+ color: white;
213
+ width: min(756px, 100%);
214
+ border-radius: 12px;
215
+ // padding: 1.25rem 1.5rem;
216
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
217
+
218
+ /* Tidy content */
219
+ img {
220
+ width: 110px;
221
+ margin-bottom: 30px;
222
+ }
223
+ .title {
224
+ font-size: 39px;
225
+ font-weight: 700;
226
+ margin-bottom: 24px;
227
+ }
228
+ .description {
229
+ font-size: 24px;
230
+ font-weight: 400;
231
+ text-align: left;
232
+ margin-bottom: 30px;
233
+ }
234
+ .wcl-cta {
235
+ margin-bottom: 0;
236
+ }
237
+ }
238
+ }
109
239
  }
110
240
  </style>
@@ -27,19 +27,11 @@
27
27
  size="xl"
28
28
  >
29
29
  <div class="wcl-video-modal__video">
30
- <p class="visually-hidden">
31
- video.triggerWarning = {{ video.alertStrip }} <br />
32
- video.triggerWarningContent = {{ video.alertStripDesc }} <br />
33
- video.triggerWarningTitle :- {{ video.alertStripTitle }} <br />
34
- video.triggerWarningUrl :- {{ video.alertStripUrl }} <br />
35
- </p>
36
- <AlertStrip
37
- v-if="video.alertStrip"
38
- :is-warning="true"
39
- :desc="video.alertStripDesc"
40
- :url="video.alertStripUrl"
41
- />
42
30
  <video-media
31
+ :media-alert="video.alertStrip"
32
+ :media-alert-title="video.alertStripTitle"
33
+ :media-alert-description="video.alertStripDesc"
34
+ :media-alert-url="video.alertStripUrl"
43
35
  :media-title="video.mediaTitle"
44
36
  :media-description="video.mediaDescription"
45
37
  :video-id="video.id"
@@ -48,15 +40,14 @@
48
40
  :transcript-title="video.transcriptTitle"
49
41
  :fix-width="video.fixWidth"
50
42
  :rtl="video.rtl"
43
+ :aria-hidden="video.alertStrip ? 'true' : null"
51
44
  />
52
45
  </div>
53
46
  <template #footer><div></div></template>
54
47
  </BModal>
55
48
  </div>
56
49
  </template>
57
-
58
50
  <script>
59
- import AlertStrip from './../../Global/AlertStrip/index.vue'
60
51
  import VideoMedia from './../../Paragraphs/VideoPlayer/index.vue'
61
52
  import VideoPlay from './../../../assets/icons/video-play.svg?url'
62
53
  import IconClose from './../../../assets/icons/icon-close.svg?url'
@@ -66,7 +57,6 @@ import axios from 'axios'
66
57
  export default {
67
58
  name: 'VideoThumbnail',
68
59
  components: {
69
- AlertStrip,
70
60
  VideoMedia,
71
61
  IconClose,
72
62
  'b-modal': BModal,