@worksafevictoria/wcl7.5 1.18.0 → 1.18.1-beta.1
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/components/Paragraphs/Calculator/CardContainer/index.vue +1 -2
- package/src/components/Paragraphs/Calculator/CardContainer/styles.scss +72 -68
- package/src/components/Paragraphs/Calculator/index.vue +38 -23
- package/src/components/Paragraphs/RTWPlanner/CardContainer/index.vue +1 -0
- package/src/components/Paragraphs/RTWPlanner/Injuries/index.vue +5 -0
- package/src/components/Paragraphs/SelectableCards/Control/index.stories.js +1 -0
- package/src/components/Paragraphs/SelectableCards/cardtop.vue +1 -1
- package/src/components/Paragraphs/SelectableCards/index.vue +1 -1
package/package.json
CHANGED
|
@@ -18,11 +18,76 @@
|
|
|
18
18
|
margin-top: 5px;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
.ffh-cc-nav {
|
|
23
|
-
margin-top: 2rem;
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
&__footer {
|
|
25
|
+
&--title {
|
|
26
|
+
font-size: px-to-rem(26px);
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
margin-bottom: 15px;
|
|
29
|
+
|
|
30
|
+
span {
|
|
31
|
+
font-size: px-to-rem(16px);
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&--label {
|
|
36
|
+
font-size: px-to-rem(14px);
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
|
|
39
|
+
@media screen and (min-width: 1200px) {
|
|
40
|
+
font-size: px-to-rem(16px);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.input-group {
|
|
45
|
+
position: relative;
|
|
46
|
+
margin-bottom: 10px;
|
|
47
|
+
|
|
48
|
+
.input-with-arrows {
|
|
49
|
+
font-size: px-to-rem(22px);
|
|
50
|
+
font-weight: 700;
|
|
51
|
+
height: 64px;
|
|
52
|
+
border: 3px solid $gray;
|
|
53
|
+
border-radius: 10px;
|
|
54
|
+
width: 100%;
|
|
55
|
+
|
|
56
|
+
@media screen and (min-width: 768) {
|
|
57
|
+
font-size: px-to-rem(24px);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.input-group-btn {
|
|
62
|
+
border-radius: 0 10px 10px 0;
|
|
63
|
+
position: absolute;
|
|
64
|
+
background: $black;
|
|
65
|
+
width: 15%;
|
|
66
|
+
height: 64px;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
align-items: center;
|
|
71
|
+
padding: 10px 0;
|
|
72
|
+
z-index: 9;
|
|
73
|
+
right: 0;
|
|
74
|
+
@media (min-width: 768px) {
|
|
75
|
+
width: 10%;
|
|
76
|
+
}
|
|
77
|
+
@media (min-width: 991px) {
|
|
78
|
+
width: 7%;
|
|
79
|
+
}
|
|
80
|
+
img {
|
|
81
|
+
width: 16px;
|
|
82
|
+
height: 16px;
|
|
83
|
+
filter: invert(100%);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
.ffh-cc-nav__back-col {
|
|
26
91
|
font-weight: bold;
|
|
27
92
|
line-height: 1.6;
|
|
28
93
|
flex: 0 0 100%;
|
|
@@ -44,7 +109,7 @@
|
|
|
44
109
|
}
|
|
45
110
|
}
|
|
46
111
|
|
|
47
|
-
|
|
112
|
+
.ffh-cc-nav__right-col {
|
|
48
113
|
text-align: right;
|
|
49
114
|
min-height: 30px;
|
|
50
115
|
display: flex;
|
|
@@ -84,69 +149,8 @@
|
|
|
84
149
|
}
|
|
85
150
|
}
|
|
86
151
|
}
|
|
152
|
+
|
|
153
|
+
|
|
87
154
|
|
|
88
|
-
&__footer {
|
|
89
|
-
&--title {
|
|
90
|
-
font-size: px-to-rem(26px);
|
|
91
|
-
font-weight: 700;
|
|
92
|
-
margin-bottom: 15px;
|
|
93
|
-
|
|
94
|
-
span {
|
|
95
|
-
font-size: px-to-rem(16px);
|
|
96
|
-
font-weight: 400;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
&--label {
|
|
100
|
-
font-size: px-to-rem(14px);
|
|
101
|
-
font-weight: 700;
|
|
102
|
-
|
|
103
|
-
@media screen and (min-width: 1200px) {
|
|
104
|
-
font-size: px-to-rem(16px);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
.input-group {
|
|
109
|
-
position: relative;
|
|
110
|
-
margin-bottom: 10px;
|
|
111
|
-
|
|
112
|
-
.input-with-arrows {
|
|
113
|
-
font-size: px-to-rem(22px);
|
|
114
|
-
font-weight: 700;
|
|
115
|
-
height: 64px;
|
|
116
|
-
border: 3px solid $gray;
|
|
117
|
-
border-radius: 10px;
|
|
118
|
-
width: 100%;
|
|
119
|
-
|
|
120
|
-
@media screen and (min-width: 768) {
|
|
121
|
-
font-size: px-to-rem(24px);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.input-group-btn {
|
|
126
|
-
border-radius: 0 10px 10px 0;
|
|
127
|
-
position: absolute;
|
|
128
|
-
background: $black;
|
|
129
|
-
width: 15%;
|
|
130
|
-
height: 64px;
|
|
131
|
-
display: flex;
|
|
132
|
-
flex-direction: column;
|
|
133
|
-
justify-content: space-between;
|
|
134
|
-
align-items: center;
|
|
135
|
-
padding: 10px 0;
|
|
136
|
-
z-index: 9;
|
|
137
|
-
right: 0;
|
|
138
|
-
@media (min-width: 768px) {
|
|
139
|
-
width: 10%;
|
|
140
|
-
}
|
|
141
|
-
@media (min-width: 991px) {
|
|
142
|
-
width: 7%;
|
|
143
|
-
}
|
|
144
|
-
img {
|
|
145
|
-
width: 16px;
|
|
146
|
-
height: 16px;
|
|
147
|
-
filter: invert(100%);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
155
|
|
|
151
|
-
}
|
|
152
156
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</container>
|
|
19
19
|
|
|
20
20
|
<card-container
|
|
21
|
-
v-
|
|
21
|
+
v-if="screen === 1"
|
|
22
22
|
ref="weightCardContainer"
|
|
23
23
|
:is-weight="true"
|
|
24
24
|
:titles="titles.weight"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/>
|
|
28
28
|
|
|
29
29
|
<card-container
|
|
30
|
-
v-
|
|
30
|
+
v-if="screen === 2"
|
|
31
31
|
ref="heightCardContainer"
|
|
32
32
|
:is-weight="false"
|
|
33
33
|
:titles="titles.height"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
/>
|
|
38
38
|
|
|
39
39
|
<risk-level
|
|
40
|
-
v-
|
|
40
|
+
v-if="screen === 3"
|
|
41
41
|
:risk-points="riskPoints"
|
|
42
42
|
@prevScreen="prevScreen"
|
|
43
43
|
@reset="resetApp"
|
|
@@ -208,42 +208,57 @@ export default {
|
|
|
208
208
|
})
|
|
209
209
|
},
|
|
210
210
|
prevScreen() {
|
|
211
|
+
// go back one screen
|
|
211
212
|
this.screen--
|
|
213
|
+
|
|
214
|
+
// if we just went back to the first screen
|
|
212
215
|
if (this.screen === 1) {
|
|
213
216
|
this.selectedWeight = null
|
|
214
217
|
|
|
215
|
-
|
|
216
|
-
this
|
|
217
|
-
|
|
218
|
-
// update Bar
|
|
219
|
-
this.barItems = JSON.parse(JSON.stringify(this.items)) // Reseting the data back to the original items
|
|
218
|
+
// reset Bar
|
|
219
|
+
this.barItems = JSON.parse(JSON.stringify(this.items))
|
|
220
220
|
|
|
221
221
|
this.$nextTick(() => {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
222
|
+
if (this.$refs.weightCardContainer) {
|
|
223
|
+
this.$refs.weightCardContainer.clearCard()
|
|
224
|
+
|
|
225
|
+
const cardElement =
|
|
226
|
+
this.$refs.weightCardContainer.$el.querySelector(
|
|
227
|
+
'#selectable-cc-card-0',
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
if (cardElement !== null) {
|
|
231
|
+
cardElement.focus()
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// height container may not be in DOM yet, so guard it
|
|
236
|
+
if (this.$refs.heightCardContainer) {
|
|
237
|
+
this.$refs.heightCardContainer.clearCard()
|
|
227
238
|
}
|
|
228
239
|
})
|
|
229
240
|
}
|
|
230
241
|
},
|
|
231
242
|
resetApp() {
|
|
232
|
-
|
|
233
|
-
this
|
|
234
|
-
|
|
235
|
-
// added so that existing values are cleared and not reported to GTM if fired
|
|
236
|
-
//delete this.selectedWeight
|
|
237
|
-
//delete this.selectedHeight
|
|
238
|
-
//delete this.riskPoints[0]
|
|
239
|
-
|
|
243
|
+
// reset state first
|
|
244
|
+
this.selectedWeight = null
|
|
245
|
+
this.selectedHeight = null
|
|
240
246
|
this.screen = 1
|
|
241
247
|
|
|
242
248
|
// reset Bar
|
|
243
|
-
this.barItems = JSON.parse(JSON.stringify(this.items))
|
|
249
|
+
this.barItems = JSON.parse(JSON.stringify(this.items))
|
|
244
250
|
|
|
245
251
|
this.$nextTick(() => {
|
|
246
|
-
|
|
252
|
+
// these refs will only exist when their screen is rendered
|
|
253
|
+
if (this.$refs.weightCardContainer) {
|
|
254
|
+
this.$refs.weightCardContainer.clearCard()
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (this.$refs.heightCardContainer) {
|
|
258
|
+
this.$refs.heightCardContainer.clearCard()
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (this.$refs.ffhApp && this.$refs.ffhApp.scrollIntoView) {
|
|
247
262
|
this.$refs.ffhApp.scrollIntoView({ behavior: 'smooth' })
|
|
248
263
|
}
|
|
249
264
|
})
|
|
@@ -56,6 +56,7 @@ function handleNextScreen() {
|
|
|
56
56
|
:cards="cards"
|
|
57
57
|
:icon-is-bordered="iconIsBordered"
|
|
58
58
|
:card-type="'control-selectcards'"
|
|
59
|
+
:showModalOnButtonRole="true"
|
|
59
60
|
class="rtw-card-container control-selectablecards"
|
|
60
61
|
@selected="selectedCardChangeFocus"
|
|
61
62
|
@selected-button-role="selectedButtonRole"
|
|
@@ -43,6 +43,10 @@ const props = defineProps({
|
|
|
43
43
|
type: Array,
|
|
44
44
|
default: () => [],
|
|
45
45
|
},
|
|
46
|
+
showModalOnButtonRole: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
46
50
|
})
|
|
47
51
|
|
|
48
52
|
const screen = ref(1)
|
|
@@ -119,6 +123,7 @@ function nextScreenAgent(card) {
|
|
|
119
123
|
:titles="titles.physical"
|
|
120
124
|
:cards="cards"
|
|
121
125
|
:button-role="'modal-quest'"
|
|
126
|
+
:showModalOnButtonRole="showModalOnButtonRole"
|
|
122
127
|
@nextScreen="nextScreen"
|
|
123
128
|
/>
|
|
124
129
|
</div>
|