@worksafevictoria/wcl7.5 1.17.0-beta.1 → 1.17.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/package.json +1 -1
- package/src/assets/icons/chevron-right-icon.svg +14 -0
- package/src/assets/icons/notepad.svg +93 -0
- package/src/assets/icons/question.svg +7 -0
- package/src/components/Common/CardGrid/index.vue +83 -74
- package/src/components/Common/CardGridItem/index.vue +31 -4
- package/src/components/Containers/Carousel/index.vue +6 -0
- package/src/components/Containers/SectionGroup/index.stories.js +28 -27
- package/src/components/Containers/SectionGroup/index.vue +6 -0
- package/src/components/Global/AppHeaderNew/index.vue +9 -1
- package/src/components/Global/AppHeaderNew/mobile.scss +5 -2
- package/src/components/Global/AppHeaderNew/styles.scss +6 -5
- package/src/components/Global/HeroHeader/index.vue +74 -57
- package/src/components/Paragraphs/Calculator/CardContainer/index.vue +68 -60
- package/src/components/Paragraphs/Calculator/index.vue +24 -22
- package/src/components/Paragraphs/RTWPlanner/CardContainer/index.vue +133 -0
- package/src/components/Paragraphs/RTWPlanner/Constants.js +433 -0
- package/src/components/Paragraphs/RTWPlanner/Footer/index.vue +32 -0
- package/src/components/Paragraphs/RTWPlanner/{NavBar → Header}/index.vue +20 -9
- package/src/components/Paragraphs/RTWPlanner/HomePage/index.vue +72 -0
- package/src/components/Paragraphs/RTWPlanner/Injuries/index.vue +220 -0
- package/src/components/Paragraphs/RTWPlanner/index.stories.js +79 -15
- package/src/components/Paragraphs/RTWPlanner/index.vue +99 -31
- package/src/components/Paragraphs/SelectableCards/Control/index.stories.js +31 -11
- package/src/components/Paragraphs/SelectableCards/cardbody.vue +9 -10
- package/src/components/Paragraphs/SelectableCards/cardtop.vue +23 -16
- package/src/components/Paragraphs/SelectableCards/index.stories.js +29 -8
- package/src/components/Paragraphs/SelectableCards/index.vue +124 -50
- package/src/components/Paragraphs/TextMedia/index.vue +4 -0
- package/src/components/Paragraphs/VideoPlayer/index.vue +1 -1
- package/src/components/SubComponents/Breadcrumb/index.vue +40 -7
- package/src/components/SubComponents/FormInstance/services/logic-parser.js +44 -12
- package/src/components/SubComponents/ResourceGroup/index.vue +1 -1
- package/src/includes/scss/vars/src/colors.module.scss +3 -0
- package/src/includes/scss/vars/src/colors.scss +3 -0
- package/src/mock/control-selectable-cards.js +68 -25
- package/src/components/Paragraphs/RTWPlanner/Home/index.vue +0 -83
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
:weights="weights || []"
|
|
26
26
|
@nextScreen="nextScreen"
|
|
27
27
|
/>
|
|
28
|
+
|
|
28
29
|
<card-container
|
|
29
30
|
v-show="screen === 2"
|
|
30
31
|
ref="heightCardContainer"
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
@nextScreen="nextScreen"
|
|
35
36
|
@prevScreen="prevScreen"
|
|
36
37
|
/>
|
|
38
|
+
|
|
37
39
|
<risk-level
|
|
38
40
|
v-show="screen === 3"
|
|
39
41
|
:risk-points="riskPoints"
|
|
@@ -70,41 +72,41 @@ export default {
|
|
|
70
72
|
CardContainer,
|
|
71
73
|
ProgressBar,
|
|
72
74
|
RiskLevel,
|
|
73
|
-
RichText
|
|
75
|
+
RichText,
|
|
74
76
|
},
|
|
75
77
|
props: {
|
|
76
78
|
items: {
|
|
77
79
|
type: Array,
|
|
78
|
-
default: () => []
|
|
80
|
+
default: () => [],
|
|
79
81
|
},
|
|
80
82
|
steeperStyle: {
|
|
81
83
|
type: Boolean,
|
|
82
|
-
default: true
|
|
84
|
+
default: true,
|
|
83
85
|
},
|
|
84
86
|
titles: {
|
|
85
87
|
type: Object,
|
|
86
|
-
default: () => {}
|
|
88
|
+
default: () => {},
|
|
87
89
|
},
|
|
88
90
|
weights: {
|
|
89
91
|
type: Array,
|
|
90
|
-
default: () => []
|
|
92
|
+
default: () => [],
|
|
91
93
|
},
|
|
92
94
|
heights: {
|
|
93
95
|
type: Array,
|
|
94
|
-
default: () => []
|
|
96
|
+
default: () => [],
|
|
95
97
|
},
|
|
96
98
|
ffhPage: {
|
|
97
99
|
type: Object,
|
|
98
|
-
default: () => {}
|
|
100
|
+
default: () => {},
|
|
99
101
|
},
|
|
100
102
|
heroHeader: {
|
|
101
103
|
type: Object,
|
|
102
|
-
default: () => {}
|
|
104
|
+
default: () => {},
|
|
103
105
|
},
|
|
104
106
|
riskResults: {
|
|
105
107
|
type: Array,
|
|
106
|
-
default: () => []
|
|
107
|
-
}
|
|
108
|
+
default: () => [],
|
|
109
|
+
},
|
|
108
110
|
},
|
|
109
111
|
data() {
|
|
110
112
|
return {
|
|
@@ -112,14 +114,14 @@ export default {
|
|
|
112
114
|
selectedWeight: null,
|
|
113
115
|
selectedHeight: null,
|
|
114
116
|
barItems: [],
|
|
115
|
-
g: 9.81
|
|
117
|
+
g: 9.81,
|
|
116
118
|
}
|
|
117
119
|
},
|
|
118
120
|
computed: {
|
|
119
121
|
updateBar() {
|
|
120
122
|
const data = this.barItems
|
|
121
123
|
const currentIndex = data.findIndex(
|
|
122
|
-
(item) => item.value === this.screen.toString()
|
|
124
|
+
(item) => item.value === this.screen.toString(),
|
|
123
125
|
)
|
|
124
126
|
|
|
125
127
|
if (data.length === this.screen) {
|
|
@@ -144,13 +146,13 @@ export default {
|
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
let speedImpactMS = Math.sqrt(
|
|
147
|
-
2 * Number(this.selectedHeight.value) * this.g
|
|
149
|
+
2 * Number(this.selectedHeight.value) * this.g,
|
|
148
150
|
).toFixed(2)
|
|
149
151
|
let speedImpactKmH = (
|
|
150
152
|
Math.sqrt(2 * Number(this.selectedHeight.value) * this.g) * 3.6
|
|
151
153
|
).toFixed(2)
|
|
152
154
|
let timeImpact = Math.sqrt(
|
|
153
|
-
(2 * Number(this.selectedHeight.value)) / this.g
|
|
155
|
+
(2 * Number(this.selectedHeight.value)) / this.g,
|
|
154
156
|
).toFixed(2)
|
|
155
157
|
let energyImpact = (
|
|
156
158
|
Number(this.selectedHeight.value) *
|
|
@@ -177,10 +179,10 @@ export default {
|
|
|
177
179
|
speedImpactMS: speedImpactMS,
|
|
178
180
|
speedImpactKmH: speedImpactKmH,
|
|
179
181
|
timeImpact: timeImpact,
|
|
180
|
-
energyImpact: energyImpact
|
|
181
|
-
}
|
|
182
|
+
energyImpact: energyImpact,
|
|
183
|
+
},
|
|
182
184
|
]
|
|
183
|
-
}
|
|
185
|
+
},
|
|
184
186
|
},
|
|
185
187
|
created() {
|
|
186
188
|
this.barItems = JSON.parse(JSON.stringify(this.items))
|
|
@@ -218,7 +220,7 @@ export default {
|
|
|
218
220
|
|
|
219
221
|
this.$nextTick(() => {
|
|
220
222
|
const cardElement = this.$refs.weightCardContainer.$el.querySelector(
|
|
221
|
-
'#selectable-cc-card-0'
|
|
223
|
+
'#selectable-cc-card-0',
|
|
222
224
|
)
|
|
223
225
|
if (cardElement !== null) {
|
|
224
226
|
cardElement.focus()
|
|
@@ -265,16 +267,16 @@ export default {
|
|
|
265
267
|
label: labelVar,
|
|
266
268
|
mass: massVar,
|
|
267
269
|
height: heightVar,
|
|
268
|
-
energy: energyVar
|
|
270
|
+
energy: energyVar,
|
|
269
271
|
}
|
|
270
272
|
// fire the event
|
|
271
273
|
this.$gtm.push({
|
|
272
274
|
event: 'custom.interaction.droppedobject.click',
|
|
273
|
-
...attrs
|
|
275
|
+
...attrs,
|
|
274
276
|
})
|
|
275
277
|
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
+
},
|
|
279
|
+
},
|
|
278
280
|
}
|
|
279
281
|
</script>
|
|
280
282
|
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import SelectableCards from './../../SelectableCards/index.vue'
|
|
4
|
+
import RichText from './../../RichText/index.vue'
|
|
5
|
+
import CtaButton from './../../../SubComponents/CtaButton/index.vue'
|
|
6
|
+
import CaretRight from './../../../../assets/icons/caret-right.svg?url'
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits(['nextScreen'])
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
titles: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => [],
|
|
14
|
+
},
|
|
15
|
+
cards: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => [],
|
|
18
|
+
},
|
|
19
|
+
iconIsBordered: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false,
|
|
22
|
+
},
|
|
23
|
+
buttonRole: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'none',
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const selectedCard = ref(null)
|
|
30
|
+
const isButtonDisabled = ref(true)
|
|
31
|
+
|
|
32
|
+
function selectedCardChangeFocus(card) {
|
|
33
|
+
isButtonDisabled.value = false
|
|
34
|
+
selectedCard.value = card
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function selectedButtonRole(card) {
|
|
38
|
+
selectedCard.value = card
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function handleNextScreen() {
|
|
42
|
+
// Only emit the 'nextScreen' event if the button is not disabled
|
|
43
|
+
if (!isButtonDisabled.value && selectedCard.value) {
|
|
44
|
+
emit('nextScreen', selectedCard.value)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<selectable-cards
|
|
51
|
+
ref="cardDeck"
|
|
52
|
+
:button-role="buttonRole"
|
|
53
|
+
:columns="3"
|
|
54
|
+
:title="titles && titles.heading"
|
|
55
|
+
:sub-heading="titles && titles.subHeading"
|
|
56
|
+
:cards="cards"
|
|
57
|
+
:icon-is-bordered="iconIsBordered"
|
|
58
|
+
:card-type="'control-selectcards'"
|
|
59
|
+
class="rtw-card-container control-selectablecards"
|
|
60
|
+
@selected="selectedCardChangeFocus"
|
|
61
|
+
@selected-button-role="selectedButtonRole"
|
|
62
|
+
>
|
|
63
|
+
<template v-slot:cardGridFooter>
|
|
64
|
+
<container class="rtw-card-container__footer">
|
|
65
|
+
<row>
|
|
66
|
+
<column>
|
|
67
|
+
<cta-button
|
|
68
|
+
ref="calNextBtn"
|
|
69
|
+
:glyph="CaretRight"
|
|
70
|
+
class="rtw-card-container__footer--next-btn"
|
|
71
|
+
:disabled="isButtonDisabled"
|
|
72
|
+
@clicked="handleNextScreen"
|
|
73
|
+
>Next</cta-button
|
|
74
|
+
>
|
|
75
|
+
</column>
|
|
76
|
+
</row>
|
|
77
|
+
</container>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<!-- provide modal content via scoped slots (purely presentational) -->
|
|
81
|
+
<template #modalTitle="{ card }">
|
|
82
|
+
<rich-text
|
|
83
|
+
class="wcl-injury-modal__card--title"
|
|
84
|
+
:tag="'h2'"
|
|
85
|
+
:tag-class="'card-title'"
|
|
86
|
+
:content="card?.name"
|
|
87
|
+
/>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<template #modalBody="{ card }">
|
|
91
|
+
<div class="wcl-injury-modal__card">
|
|
92
|
+
<rich-text
|
|
93
|
+
:tag="'h5'"
|
|
94
|
+
class="wcl-injury-modal__card--content"
|
|
95
|
+
:content="card?.value"
|
|
96
|
+
/>
|
|
97
|
+
<rich-text
|
|
98
|
+
class="wcl-injury-modal__card--description"
|
|
99
|
+
:content="card?.description"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
</selectable-cards>
|
|
104
|
+
</template>
|
|
105
|
+
<style lang="scss" scoped>
|
|
106
|
+
@import './../../../../includes//scss/all.scss';
|
|
107
|
+
|
|
108
|
+
.rtw-card-container {
|
|
109
|
+
&__footer {
|
|
110
|
+
&--next-btn {
|
|
111
|
+
float: right;
|
|
112
|
+
}
|
|
113
|
+
.wcl-cta.default:disabled {
|
|
114
|
+
background-color: $gray-alt;
|
|
115
|
+
color: grey;
|
|
116
|
+
cursor: not-allowed; /* Change cursor to not-allowed */
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
.wcl-injury-modal {
|
|
121
|
+
&__card {
|
|
122
|
+
&--title {
|
|
123
|
+
font-weight: normal;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--content {
|
|
127
|
+
color: #b5321d;
|
|
128
|
+
font-weight: normal;
|
|
129
|
+
margin: 15px 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</style>
|