@worksafevictoria/wcl7.5 1.9.0-beta.4 → 1.9.0-beta.5

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 (37) hide show
  1. package/package.json +1 -1
  2. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +39 -45
  3. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
  4. package/src/components/Common/CardGridItem/index.vue +6 -2
  5. package/src/components/Containers/Carousel/index.stories.js +2 -1
  6. package/src/components/Containers/Carousel/index.vue +68 -69
  7. package/src/components/Containers/HomepageHeader/index.stories.js +1 -1
  8. package/src/components/Containers/HomepageHeaderNew/index.stories.js +3 -15
  9. package/src/components/Containers/HomepageHeaderNew/index.vue +0 -5
  10. package/src/components/Global/AppFooter/index.vue +115 -129
  11. package/src/components/Global/AppHeader/ModalSearch/index.vue +7 -1
  12. package/src/components/Global/AppHeader/index.stories.js +2 -2
  13. package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +21 -17
  14. package/src/components/Global/AppHeaderNew/index.stories.js +2 -2
  15. package/src/components/Global/AppHeaderNew/index.vue +22 -22
  16. package/src/components/Global/BackToTop/index.vue +16 -16
  17. package/src/components/Global/ContrastMode/index.stories.js +1 -1
  18. package/src/components/Global/HeroHeader/index.vue +62 -73
  19. package/src/components/Global/SocialShare/index.vue +62 -66
  20. package/src/components/Global/Strip/index.vue +9 -5
  21. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +21 -23
  22. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +15 -15
  23. package/src/components/Paragraphs/Calculator/CardContainer/index.vue +74 -75
  24. package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +31 -39
  25. package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +104 -107
  26. package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +152 -120
  27. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
  28. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +158 -128
  29. package/src/components/Paragraphs/TabulatedData/index.vue +3 -2
  30. package/src/components/SubComponents/CtaButton/index.vue +47 -44
  31. package/src/components/SubComponents/Icon/README.md +2 -2
  32. package/src/components/SubComponents/Icon/example.js +1 -0
  33. package/src/components/SubComponents/Icon/index.stories.js +1 -1
  34. package/src/components/SubComponents/Icon/index.vue +47 -47
  35. package/src/components/SubComponents/ResourceGroup/cardbody.vue +49 -61
  36. package/src/components/SubComponents/VideoThumbnail/index.vue +30 -28
  37. package/src/mock/carousel-items.js +46 -81
@@ -37,6 +37,7 @@
37
37
  width="16"
38
38
  class="btn-up"
39
39
  @click="incrementValue"
40
+ alt="collapse icon"
40
41
  />
41
42
 
42
43
  <img
@@ -45,6 +46,7 @@
45
46
  width="16"
46
47
  class="btn-down"
47
48
  @click="decrementValue"
49
+ alt="expand icon"
48
50
  />
49
51
  </div>
50
52
  </div>
@@ -85,50 +87,50 @@
85
87
  </template>
86
88
 
87
89
  <script>
88
- import Container from '../../../Containers/Container/index.vue'
89
- import Column from '../../../Containers/Column/index.vue'
90
- import Row from '../../../Containers/Row/index.vue'
91
- import CtaButton from '../../../SubComponents/CtaButton/index.vue'
92
- import SelectableCards from '../../SelectableCards/index.vue'
93
- import CaretDown from '../../../../assets/icons/caret-down.svg?url'
94
- import CaretUp from '../../../../assets/icons/caret-up.svg?url'
95
- import CaretRight from '../../../../assets/icons/caret-right.svg?url'
96
- import CaretLeft from '../../../../assets/icons/caret-left.svg?url'
90
+ import Container from "../../../Containers/Container/index.vue";
91
+ import Column from "../../../Containers/Column/index.vue";
92
+ import Row from "../../../Containers/Row/index.vue";
93
+ import CtaButton from "../../../SubComponents/CtaButton/index.vue";
94
+ import SelectableCards from "../../SelectableCards/index.vue";
95
+ import CaretDown from "../../../../assets/icons/caret-down.svg?url";
96
+ import CaretUp from "../../../../assets/icons/caret-up.svg?url";
97
+ import CaretRight from "../../../../assets/icons/caret-right.svg?url";
98
+ import CaretLeft from "../../../../assets/icons/caret-left.svg?url";
97
99
 
98
100
  export default {
99
- name: 'CardContainer',
101
+ name: "CardContainer",
100
102
  components: {
101
103
  Column,
102
104
  Container,
103
105
  Row,
104
106
  CtaButton,
105
- SelectableCards
107
+ SelectableCards,
106
108
  },
107
109
  props: {
108
110
  iconIsBordered: {
109
111
  type: Boolean,
110
- default: false
112
+ default: false,
111
113
  },
112
114
  isWeight: {
113
115
  type: Boolean,
114
- default: true
116
+ default: true,
115
117
  },
116
118
  isHeight: {
117
119
  type: Boolean,
118
- default: false
120
+ default: false,
119
121
  },
120
122
  titles: {
121
123
  type: Object,
122
- default: () => []
124
+ default: () => [],
123
125
  },
124
126
  weights: {
125
127
  type: Array,
126
- default: () => []
128
+ default: () => [],
127
129
  },
128
130
  heights: {
129
131
  type: Array,
130
- default: () => []
131
- }
132
+ default: () => [],
133
+ },
132
134
  },
133
135
  data() {
134
136
  return {
@@ -136,111 +138,108 @@ export default {
136
138
  CaretDown,
137
139
  CaretRight,
138
140
  CaretLeft,
139
- typeCard: 'control-selectcards',
140
- cardItemTextAlign: 'center',
141
+ typeCard: "control-selectcards",
142
+ cardItemTextAlign: "center",
141
143
  title: null,
142
144
  cards: null,
143
145
  cardUnit: null,
144
- placeHolder: '000',
146
+ placeHolder: "000",
145
147
  inputValueDisplay: null,
146
148
  minValue: 0.25,
147
149
  maxValue: 500,
148
150
  selectedCard: null,
149
- selectedInput: null
150
- }
151
+ selectedInput: null,
152
+ };
151
153
  },
152
154
  computed: {
153
155
  isButtonDisabled() {
154
156
  // Call the function to get its result, then check if either selectedCard is null or inputValueDisplay is null
155
- return this.getValueWithoutUnits === null
157
+ return this.getValueWithoutUnits === null;
156
158
  },
157
159
  getValueWithoutUnits() {
158
160
  // Ensure that inputValueDisplay is not null before attempting to replace
159
161
  if (this.inputValueDisplay !== null) {
160
162
  // Remove units (e.g., 'kg' or 'meters') from the input value
161
- const valueWithoutUnits = this.inputValueDisplay.replace(
162
- /kg|meters/i,
163
- ''
164
- )
163
+ const valueWithoutUnits = this.inputValueDisplay.replace(/kg|meters/i, "");
165
164
  // Convert the remaining value to a numeric representation
166
- const numericValue = parseFloat(valueWithoutUnits)
165
+ const numericValue = parseFloat(valueWithoutUnits);
167
166
  // Check if numericValue is a valid number
168
167
  if (!isNaN(numericValue)) {
169
168
  // Use toFixed(2) to display the number with two decimal places
170
- return parseFloat(numericValue.toFixed(2))
169
+ return parseFloat(numericValue.toFixed(2));
171
170
  } else {
172
- return null
171
+ return null;
173
172
  }
174
173
  } else {
175
- return null
174
+ return null;
176
175
  }
177
- }
176
+ },
178
177
  },
179
178
  mounted() {
180
- this.inputValueDisplay = null
179
+ this.inputValueDisplay = null;
181
180
  if (this.isWeight) {
182
- this.title = this.titles.weight
183
- this.cards = this.weights
184
- this.cardUnit = ' kg'
185
- this.placeHolder = this.placeHolder + this.cardUnit
186
- this.minValue = 0.25
187
- this.maxValue = 500
181
+ this.title = this.titles.weight;
182
+ this.cards = this.weights;
183
+ this.cardUnit = " kg";
184
+ this.placeHolder = this.placeHolder + this.cardUnit;
185
+ this.minValue = 0.25;
186
+ this.maxValue = 500;
188
187
  } else {
189
- this.title = this.titles.height
190
- this.cards = this.heights
191
- this.cardUnit = ' meters'
192
- this.placeHolder = this.placeHolder + this.cardUnit
193
- this.minValue = 2
194
- this.maxValue = 250
188
+ this.title = this.titles.height;
189
+ this.cards = this.heights;
190
+ this.cardUnit = " meters";
191
+ this.placeHolder = this.placeHolder + this.cardUnit;
192
+ this.minValue = 2;
193
+ this.maxValue = 250;
195
194
  }
196
195
  },
197
196
  methods: {
198
197
  handlePrevScreen() {
199
- this.$emit('prevScreen')
198
+ this.$emit("prevScreen");
200
199
  },
201
200
  handleNextScreen() {
202
201
  // Only emit the 'nextScreen' event if the button is not disabled
203
202
  if (!this.isButtonDisabled) {
204
- this.selectedInput = { value: this.getValueWithoutUnits }
203
+ this.selectedInput = { value: this.getValueWithoutUnits };
205
204
 
206
- this.inputValueDisplay = null
207
- this.$emit('nextScreen', this.selectedInput)
205
+ this.inputValueDisplay = null;
206
+ this.$emit("nextScreen", this.selectedInput);
208
207
  }
209
208
  },
210
209
  selectedCardChangeFocus(card) {
211
210
  // if statement added to overcome issue of lost values when function is called twice
212
211
  if (card.value !== undefined) {
213
- this.selectedCard = card
214
- this.selectedInput = null
215
- this.inputValueDisplay = card.value + ' ' + this.cardUnit
216
- this.$nextTick(() => this.$refs.calNextBtn.$el.focus())
212
+ this.selectedCard = card;
213
+ this.selectedInput = null;
214
+ this.inputValueDisplay = card.value + " " + this.cardUnit;
215
+ this.$nextTick(() => this.$refs.calNextBtn.$el.focus());
217
216
  }
218
217
  },
219
218
  clearCard() {
220
- this.selectedInput = null
219
+ this.selectedInput = null;
221
220
 
222
- this.selectedCard = null
223
- this.$refs.cardDeck.clearCard()
221
+ this.selectedCard = null;
222
+ this.$refs.cardDeck.clearCard();
224
223
  },
225
224
  incrementValue() {
226
225
  if (this.selectedCard !== null) {
227
- this.$refs.cardDeck.clearCard()
226
+ this.$refs.cardDeck.clearCard();
228
227
  }
229
228
 
230
- let newValue = Math.min(this.getValueWithoutUnits + 1, this.maxValue)
231
- this.inputValueDisplay = newValue + this.cardUnit
229
+ let newValue = Math.min(this.getValueWithoutUnits + 1, this.maxValue);
230
+ this.inputValueDisplay = newValue + this.cardUnit;
232
231
 
233
- this.selectedInput = { value: newValue }
232
+ this.selectedInput = { value: newValue };
234
233
  },
235
234
  decrementValue() {
236
235
  if (this.selectedCard !== null) {
237
- this.$refs.cardDeck.clearCard()
236
+ this.$refs.cardDeck.clearCard();
238
237
  }
239
238
 
240
- let newValue = Math.max(this.getValueWithoutUnits - 1, this.minValue)
241
- this.inputValueDisplay = newValue + this.cardUnit
239
+ let newValue = Math.max(this.getValueWithoutUnits - 1, this.minValue);
240
+ this.inputValueDisplay = newValue + this.cardUnit;
242
241
 
243
- this.selectedInput = { value: newValue }
242
+ this.selectedInput = { value: newValue };
244
243
  },
245
244
  // Validate the input value on blur
246
245
  validateInput() {
@@ -251,28 +250,28 @@ export default {
251
250
  this.getValueWithoutUnits <= this.maxValue
252
251
  ) {
253
252
  // Value is within the range, update the input value
254
- this.inputValueDisplay = this.getValueWithoutUnits + this.cardUnit
253
+ this.inputValueDisplay = this.getValueWithoutUnits + this.cardUnit;
255
254
 
256
255
  // alternate..
257
- this.selectedInput = { value: this.getValueWithoutUnits }
256
+ this.selectedInput = { value: this.getValueWithoutUnits };
258
257
  } else {
259
258
  // Value is outside the range, leave the input blank
260
- this.inputValueDisplay = null
259
+ this.inputValueDisplay = null;
261
260
 
262
- this.selectedInput = null
261
+ this.selectedInput = null;
263
262
  }
264
263
  },
265
264
  // Handle input focus
266
265
  handleInputFocus() {
267
266
  if (this.selectedCard !== null) {
268
- this.$refs.cardDeck.clearCard()
267
+ this.$refs.cardDeck.clearCard();
269
268
  }
270
- }
271
- }
272
- }
269
+ },
270
+ },
271
+ };
273
272
  </script>
274
273
 
275
274
  <style lang="scss" scoped>
276
- @import '../../../../includes/scss/all';
277
- @import './styles';
275
+ @import "../../../../includes/scss/all";
276
+ @import "./styles";
278
277
  </style>
@@ -12,7 +12,7 @@
12
12
  />
13
13
 
14
14
  <div class="ffh-result__risk--info">
15
- <img :src="riskIcon" class="ffh-result__risk--info--img" />
15
+ <img :src="riskIcon" class="ffh-result__risk--info--img" alt="risk icon" />
16
16
  <h3 class="ffh-result__risk--info--title">
17
17
  {{ riskTitle }}
18
18
  </h3>
@@ -42,83 +42,75 @@
42
42
  </template>
43
43
 
44
44
  <script>
45
- import Container from '../../../Containers/Container/index.vue'
46
- import Column from '../../../Containers/Column/index.vue'
47
- import Row from '../../../Containers/Row/index.vue'
48
- import CtaButton from '../../../SubComponents/CtaButton/index.vue'
49
- import RichText from '../../../Paragraphs/RichText/index.vue'
50
- import CaretLeft from '../../../../assets/icons/caret-left.svg?url'
45
+ import Container from "../../../Containers/Container/index.vue";
46
+ import Column from "../../../Containers/Column/index.vue";
47
+ import Row from "../../../Containers/Row/index.vue";
48
+ import CtaButton from "../../../SubComponents/CtaButton/index.vue";
49
+ import RichText from "../../../Paragraphs/RichText/index.vue";
50
+ import CaretLeft from "../../../../assets/icons/caret-left.svg?url";
51
51
 
52
52
  export default {
53
- name: 'RiskLevel',
53
+ name: "RiskLevel",
54
54
  components: { Column, Row, Container, CtaButton, RichText },
55
55
  props: {
56
56
  riskPoints: {
57
57
  type: Array,
58
- default: () => {}
59
- }
58
+ default: () => {},
59
+ },
60
60
  },
61
61
  data() {
62
62
  return {
63
63
  CaretLeft,
64
- headerTitle: 'Your results',
64
+ headerTitle: "Your results",
65
65
  headerMessage:
66
- 'These are you results based on the weight of the object being dropped and how high in meters you are up.'
67
- }
66
+ "These are you results based on the weight of the object being dropped and how high in meters you are up.",
67
+ };
68
68
  },
69
69
  computed: {
70
70
  riskIcon() {
71
71
  if (this.riskPoints && this.riskPoints[0]?.risksResult?.icon) {
72
- return `${this.riskPoints[0].risksResult.icon}`
72
+ return `${this.riskPoints[0].risksResult.icon}`;
73
73
  }
74
- return ''
74
+ return "";
75
75
  },
76
76
  riskTitle() {
77
77
  if (this.riskPoints && this.riskPoints[0]?.risksResult?.title) {
78
- return this.riskPoints[0].risksResult.title
78
+ return this.riskPoints[0].risksResult.title;
79
79
  }
80
- return ''
80
+ return "";
81
81
  },
82
82
  riskMessge() {
83
83
  if (this.riskPoints && this.riskPoints[0]?.risksResult?.message) {
84
- return this.riskPoints[0].risksResult.message
84
+ return this.riskPoints[0].risksResult.message;
85
85
  }
86
- return ''
86
+ return "";
87
87
  },
88
88
  speedLevel() {
89
89
  let speedImpactMS =
90
- this.riskPoints && this.riskPoints[0]
91
- ? this.riskPoints[0].speedImpactMS
92
- : ''
90
+ this.riskPoints && this.riskPoints[0] ? this.riskPoints[0].speedImpactMS : "";
93
91
 
94
92
  let speedImpactKmH =
95
- this.riskPoints && this.riskPoints[0]
96
- ? this.riskPoints[0].speedImpactKmH
97
- : ''
93
+ this.riskPoints && this.riskPoints[0] ? this.riskPoints[0].speedImpactKmH : "";
98
94
 
99
- return `Speed at impact: ${speedImpactMS} metres per second and ${speedImpactKmH} kilometres per hour`
95
+ return `Speed at impact: ${speedImpactMS} metres per second and ${speedImpactKmH} kilometres per hour`;
100
96
  },
101
97
  timeLevel() {
102
98
  let timeImpact =
103
- this.riskPoints && this.riskPoints[0]
104
- ? this.riskPoints[0].timeImpact
105
- : ''
99
+ this.riskPoints && this.riskPoints[0] ? this.riskPoints[0].timeImpact : "";
106
100
 
107
- return `Time until impact: ${timeImpact} seconds`
101
+ return `Time until impact: ${timeImpact} seconds`;
108
102
  },
109
103
  energyLevel() {
110
104
  let energyImpact =
111
- this.riskPoints && this.riskPoints[0]
112
- ? this.riskPoints[0]?.energyImpact
113
- : ''
105
+ this.riskPoints && this.riskPoints[0] ? this.riskPoints[0]?.energyImpact : "";
114
106
 
115
- return `Energy at impact: ${energyImpact} joules`
116
- }
117
- }
118
- }
107
+ return `Energy at impact: ${energyImpact} joules`;
108
+ },
109
+ },
110
+ };
119
111
  </script>
120
112
 
121
113
  <style lang="scss" scoped>
122
- @import '../../../../includes/scss/all';
123
- @import './styles';
114
+ @import "../../../../includes/scss/all";
115
+ @import "./styles";
124
116
  </style>