project-booster-vue 8.99.0 → 8.100.2
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/appointment/default-payload.json +14 -2
- package/src/components/products/PbProducts.vue +12 -1
- package/src/components/question/PbQuestion.vue +41 -13
- package/src/components/restitution/PbRestitution.vue +4 -2
- package/src/components/restitution/PbRestitutionExit.vue +4 -8
- package/src/components/restitution/restitution-with-conditionnal-exit-options.json +32 -29
- package/src/components/restitution/restitution-with-exit-options.json +29 -26
- package/src/components/sticky-footer/PbStickyFooter.vue +13 -3
- package/src/pages/project/project-hub/PbProjectHub.vue +1 -1
package/package.json
CHANGED
|
@@ -277,7 +277,13 @@
|
|
|
277
277
|
"subtitle": "Votre conseiller aura besoin de ces mesures pour créer votre plan de cuisine en 3D.",
|
|
278
278
|
"widthFromL": "1of3",
|
|
279
279
|
"forceOneCardPerLineOnMobile": true,
|
|
280
|
-
"answersComponent": "PbCard"
|
|
280
|
+
"answersComponent": "PbCard",
|
|
281
|
+
"video": {
|
|
282
|
+
"src": "https://players.brightcove.net/2812541250001/SkgXKciHDZ_default/index.html?videoId=6270735637001&autoplay=play",
|
|
283
|
+
"theme": "bordered",
|
|
284
|
+
"label": "Voir le guide en vidéo",
|
|
285
|
+
"icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg"
|
|
286
|
+
}
|
|
281
287
|
},
|
|
282
288
|
"skippable": [
|
|
283
289
|
{
|
|
@@ -353,7 +359,13 @@
|
|
|
353
359
|
"subtitle": "Sur une feuille, dessinez la pièce et reportez les bonnes mesures, prenez une photo du plan et ajoutez la.",
|
|
354
360
|
"answersComponent": "PbCard",
|
|
355
361
|
"forceOneCardPerLineOnMobile": true,
|
|
356
|
-
"widthFromL": "1of3"
|
|
362
|
+
"widthFromL": "1of3",
|
|
363
|
+
"video": {
|
|
364
|
+
"src": "https://players.brightcove.net/2812541250001/SkgXKciHDZ_default/index.html?videoId=6270735637001&autoplay=play",
|
|
365
|
+
"theme": "bordered",
|
|
366
|
+
"label": "Voir le guide en vidéo",
|
|
367
|
+
"icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg"
|
|
368
|
+
}
|
|
357
369
|
},
|
|
358
370
|
"skippable": [
|
|
359
371
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="pb-products">
|
|
2
|
+
<div class="pb-products" ref="pbProducts">
|
|
3
3
|
<m-link
|
|
4
4
|
class="pb-products__back-button"
|
|
5
5
|
:label="project.name"
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
91
91
|
},
|
|
92
92
|
mounted() {
|
|
93
93
|
this.updateProduct();
|
|
94
|
+
this.scrollToTop();
|
|
94
95
|
},
|
|
95
96
|
methods: {
|
|
96
97
|
displayProductsList(item, section) {
|
|
@@ -103,6 +104,16 @@ export default {
|
|
|
103
104
|
this.categoryName = selectedCategory.title ?? selectedCategory.viewModel.title;
|
|
104
105
|
this.$store.dispatch('loadProductsByWorkKind', categoryId);
|
|
105
106
|
},
|
|
107
|
+
scrollToTop() {
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
const top = this.$refs.pbProducts.getBoundingClientRect().top;
|
|
110
|
+
window.scroll({
|
|
111
|
+
top,
|
|
112
|
+
left: 0,
|
|
113
|
+
behavior: 'smooth',
|
|
114
|
+
});
|
|
115
|
+
}, 200);
|
|
116
|
+
},
|
|
106
117
|
},
|
|
107
118
|
};
|
|
108
119
|
</script>
|
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div v-if="payload.viewModel.subtitle" class="pb-question__subtitle">
|
|
23
23
|
{{ payload.viewModel.subtitle }}
|
|
24
|
+
<m-link
|
|
25
|
+
v-if="payload.viewModel.video"
|
|
26
|
+
:label="payload.viewModel.video.label"
|
|
27
|
+
theme="primary"
|
|
28
|
+
@click="displayVideoGuide"
|
|
29
|
+
/>
|
|
24
30
|
</div>
|
|
25
31
|
</div>
|
|
26
32
|
<m-container fluid class="pb-question__answers-container">
|
|
@@ -112,6 +118,7 @@
|
|
|
112
118
|
class="pb-question__sticky-footer"
|
|
113
119
|
:style="`height: ${pbQuestionActionsButtonsMaxHeight + Number.parseInt(stickyBottomOffset.replace('px', ''))}px;`"
|
|
114
120
|
:bottom-offset="stickyBottomOffset"
|
|
121
|
+
intersection-observer-delay="200"
|
|
115
122
|
>
|
|
116
123
|
<transition-group name="pb-question__actions--animated" mode="out-in">
|
|
117
124
|
<div
|
|
@@ -200,27 +207,35 @@
|
|
|
200
207
|
</m-flexy>
|
|
201
208
|
</m-container>
|
|
202
209
|
<m-dialog class="pb-question__dialog" v-model:show-dialog="displayDialog">
|
|
203
|
-
<template #header>
|
|
210
|
+
<template #header v-if="!displayVideo">
|
|
204
211
|
<span>{{ dialog.headerTitle }}</span>
|
|
205
212
|
</template>
|
|
206
213
|
<template #body>
|
|
207
|
-
<div class="pb-question__dialog-body">
|
|
214
|
+
<div class="pb-question__dialog-body" v-if="!displayVideo">
|
|
208
215
|
<div :style="`background-image: url(${dialog.imageUrl});`" class="pb-question__dialog-body-image" />
|
|
209
216
|
<m-flex direction="column" class="pb-question__dialog-body-description">
|
|
210
217
|
<div class="pb-question__dialog-body-title">{{ dialog.title }}</div>
|
|
211
218
|
<div class="pb-question__dialog-body-text" v-html="dialog.text" />
|
|
212
|
-
<m-
|
|
213
|
-
|
|
214
|
-
:label="
|
|
215
|
-
:theme="
|
|
216
|
-
:
|
|
217
|
-
width
|
|
218
|
-
|
|
219
|
+
<m-button
|
|
220
|
+
class="pb-question__dialog-body-button"
|
|
221
|
+
:label="payload.viewModel.video.label"
|
|
222
|
+
:theme="payload.viewModel.video.theme"
|
|
223
|
+
:left-icon="payload.viewModel.video.icon"
|
|
224
|
+
width="fit"
|
|
225
|
+
@click="displayVideo = true"
|
|
219
226
|
/>
|
|
220
227
|
</m-flex>
|
|
221
228
|
</div>
|
|
229
|
+
<iframe
|
|
230
|
+
v-else
|
|
231
|
+
:src="payload.viewModel.video.src"
|
|
232
|
+
class="pb-question__dialog-video-container"
|
|
233
|
+
frameborder="0"
|
|
234
|
+
allowfullscreen
|
|
235
|
+
allow="autoplay"
|
|
236
|
+
></iframe>
|
|
222
237
|
</template>
|
|
223
|
-
<template #footer>
|
|
238
|
+
<template #footer v-if="!displayVideo">
|
|
224
239
|
<m-flex class="pb-question__dialog-footer" justify-content="center">
|
|
225
240
|
<m-button
|
|
226
241
|
label="Fermer"
|
|
@@ -234,7 +249,6 @@
|
|
|
234
249
|
</m-dialog>
|
|
235
250
|
</div>
|
|
236
251
|
</template>
|
|
237
|
-
|
|
238
252
|
<script>
|
|
239
253
|
import objectPath from 'object-path';
|
|
240
254
|
import MButton from '../mozaic/buttons/MButton';
|
|
@@ -334,6 +348,7 @@ export default {
|
|
|
334
348
|
INFO_ICON,
|
|
335
349
|
displayDialog: false,
|
|
336
350
|
dialog: null,
|
|
351
|
+
displayVideo: false,
|
|
337
352
|
pbQuestionActionsButtonsMaxHeight: 0,
|
|
338
353
|
}),
|
|
339
354
|
|
|
@@ -357,6 +372,11 @@ export default {
|
|
|
357
372
|
answers() {
|
|
358
373
|
this.updateSelectedAnswers();
|
|
359
374
|
},
|
|
375
|
+
displayDialog(newVal) {
|
|
376
|
+
if (!newVal) {
|
|
377
|
+
this.displayVideo = false;
|
|
378
|
+
}
|
|
379
|
+
},
|
|
360
380
|
},
|
|
361
381
|
|
|
362
382
|
mounted() {
|
|
@@ -657,6 +677,10 @@ export default {
|
|
|
657
677
|
},
|
|
658
678
|
});
|
|
659
679
|
},
|
|
680
|
+
displayVideoGuide() {
|
|
681
|
+
this.displayDialog = true;
|
|
682
|
+
this.displayVideo = true;
|
|
683
|
+
},
|
|
660
684
|
},
|
|
661
685
|
};
|
|
662
686
|
</script>
|
|
@@ -946,7 +970,9 @@ $answers-apparition-duration: '0.5s';
|
|
|
946
970
|
color: $color-grey-600;
|
|
947
971
|
padding: $mu150 $mu350 $mu150 $mu150;
|
|
948
972
|
}
|
|
949
|
-
|
|
973
|
+
:deep(.m-dialog__close) {
|
|
974
|
+
background-color: transparent;
|
|
975
|
+
}
|
|
950
976
|
:deep(.m-dialog__body) {
|
|
951
977
|
display: flex;
|
|
952
978
|
flex-grow: 1;
|
|
@@ -1010,7 +1036,9 @@ $answers-apparition-duration: '0.5s';
|
|
|
1010
1036
|
@include set-font-face('semi-bold');
|
|
1011
1037
|
}
|
|
1012
1038
|
}
|
|
1013
|
-
|
|
1039
|
+
&-video-container {
|
|
1040
|
+
width: 100%;
|
|
1041
|
+
}
|
|
1014
1042
|
&-footer {
|
|
1015
1043
|
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2);
|
|
1016
1044
|
padding: $mu100;
|
|
@@ -153,9 +153,11 @@ export default {
|
|
|
153
153
|
return this.payload?.theme ?? this.theme;
|
|
154
154
|
},
|
|
155
155
|
displayedExitOptions() {
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
let formattedExitOptions = this.payload?.exitOptions;
|
|
157
|
+
formattedExitOptions.options = formattedExitOptions.options.filter(
|
|
158
|
+
(option) => !option.conditions || this.areConditionsValid(option.conditions),
|
|
158
159
|
);
|
|
160
|
+
return formattedExitOptions;
|
|
159
161
|
},
|
|
160
162
|
},
|
|
161
163
|
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
align-items="center"
|
|
8
8
|
justify-content="center"
|
|
9
9
|
>
|
|
10
|
-
<div class="pb-restitution-exit__section-title">{{ title }}</div>
|
|
10
|
+
<div class="pb-restitution-exit__section-title">{{ exitOptions.title }}</div>
|
|
11
11
|
<m-container class="pb-restitution-exit__section-content-cards-container" fluid>
|
|
12
12
|
<m-flexy class="pb-restitution-exit__section-content-cards-flexy">
|
|
13
13
|
<m-flexy-col
|
|
14
14
|
class="pb-restitution-exit__section-content-card-flexy"
|
|
15
|
-
v-for="tool in exitOptions"
|
|
15
|
+
v-for="tool in exitOptions.options"
|
|
16
16
|
:key="tool.id"
|
|
17
17
|
width="full"
|
|
18
18
|
width-from-m="1of4"
|
|
@@ -46,12 +46,8 @@ export default {
|
|
|
46
46
|
components: { PbCard, MFlexyCol, MFlexy, MContainer, MFlex },
|
|
47
47
|
props: {
|
|
48
48
|
exitOptions: {
|
|
49
|
-
type:
|
|
50
|
-
default:
|
|
51
|
-
},
|
|
52
|
-
title: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: 'Concevoir ma cuisine',
|
|
49
|
+
type: Object,
|
|
50
|
+
default: null,
|
|
55
51
|
},
|
|
56
52
|
},
|
|
57
53
|
methods: {
|
|
@@ -3,35 +3,38 @@
|
|
|
3
3
|
"title": "Votre projet de construction neuve se situe entre",
|
|
4
4
|
"subtitle": "Construire ma nouvelle maison"
|
|
5
5
|
},
|
|
6
|
-
"exitOptions":
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
6
|
+
"exitOptions": {
|
|
7
|
+
"title": "Concevoir ma cuisine",
|
|
8
|
+
"options": [
|
|
9
|
+
{
|
|
10
|
+
"id": "Concevoir-ma-cuisine-en-3D",
|
|
11
|
+
"title": "Concevoir ma cuisine en 3D",
|
|
12
|
+
"subtitle": "Concevez votre cuisine vous-même avec notre configurateur 3D et finalisez votre projet en magasin",
|
|
13
|
+
"type": "oaa",
|
|
14
|
+
"link": "https://cuisine3d-did.leroymerlin.fr/Page_Tunnel_Cuisine/page_tunnel_cuisine.html",
|
|
15
|
+
"image": "https://storage.googleapis.com/project-booster-media/common/services/tools.jpg",
|
|
16
|
+
"conditions": ["isAnswerMatching('QUESTION_1', 'QUESTION_1--ANSWER_1')"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "Réaliser votre plan de cuisine avec un expert",
|
|
20
|
+
"title": "Réaliser votre plan de cuisine avec un expert",
|
|
21
|
+
"subtitle": "Sur rendez-vous à distance",
|
|
22
|
+
"type": "oaa",
|
|
23
|
+
"link": "https://www.leroymerlin.fr/assistance-technique.html",
|
|
24
|
+
"image": "https://storage.googleapis.com/project-booster-media/common/services/appointment.jpg",
|
|
25
|
+
"conditions": ["isAnswerMatching('QUESTION_1', 'QUESTION_1--ANSWER_1')"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "Découvrir nos cuisines",
|
|
29
|
+
"title": "Découvrir nos cuisines",
|
|
30
|
+
"subtitle": "Découvrez l’ensemble de nos cuisines Delinia ID et leurs nombreuses possibilités de personnalisation.",
|
|
31
|
+
"type": "oaa",
|
|
32
|
+
"link": "https://cuisine3d-did.leroymerlin.fr/Page_Tunnel_Cuisine/page_tunnel_cuisine.html?mag=190",
|
|
33
|
+
"image": "https://storage.googleapis.com/project-booster-media/kitchen/kitchen-range.jpeg",
|
|
34
|
+
"conditions": ["isAnswerMatching('QUESTION_1', 'QUESTION_1--ANSWER_2')"]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
35
38
|
"callToActions": [
|
|
36
39
|
{
|
|
37
40
|
"type": "button",
|
|
@@ -3,32 +3,35 @@
|
|
|
3
3
|
"title": "Votre projet de construction neuve se situe entre",
|
|
4
4
|
"subtitle": "Construire ma nouvelle maison"
|
|
5
5
|
},
|
|
6
|
-
"exitOptions":
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
"exitOptions": {
|
|
7
|
+
"title": "Concevoir ma cuisine",
|
|
8
|
+
"options": [
|
|
9
|
+
{
|
|
10
|
+
"id": "Concevoir-ma-cuisine-en-3D",
|
|
11
|
+
"title": "Concevoir ma cuisine en 3D",
|
|
12
|
+
"subtitle": "Concevez votre cuisine vous-même avec notre configurateur 3D et finalisez votre projet en magasin",
|
|
13
|
+
"type": "oaa",
|
|
14
|
+
"link": "https://cuisine3d-did.leroymerlin.fr/Page_Tunnel_Cuisine/page_tunnel_cuisine.html",
|
|
15
|
+
"image": "https://storage.googleapis.com/project-booster-media/common/services/tools.jpg"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "Réaliser votre plan de cuisine avec un expert",
|
|
19
|
+
"title": "Réaliser votre plan de cuisine avec un expert",
|
|
20
|
+
"subtitle": "Sur rendez-vous à distance",
|
|
21
|
+
"type": "oaa",
|
|
22
|
+
"link": "https://www.leroymerlin.fr/assistance-technique.html",
|
|
23
|
+
"image": "https://storage.googleapis.com/project-booster-media/common/services/appointment.jpg"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "Découvrir nos cuisines",
|
|
27
|
+
"title": "Découvrir nos cuisines",
|
|
28
|
+
"subtitle": "Découvrez l’ensemble de nos cuisines Delinia ID et leurs nombreuses possibilités de personnalisation.",
|
|
29
|
+
"type": "oaa",
|
|
30
|
+
"link": "https://cuisine3d-did.leroymerlin.fr/Page_Tunnel_Cuisine/page_tunnel_cuisine.html?mag=190",
|
|
31
|
+
"image": "https://storage.googleapis.com/project-booster-media/kitchen/kitchen-range.jpeg"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
32
35
|
"callToActions": [
|
|
33
36
|
{
|
|
34
37
|
"type": "button",
|
|
@@ -21,9 +21,16 @@ export default {
|
|
|
21
21
|
type: String,
|
|
22
22
|
default: '0',
|
|
23
23
|
},
|
|
24
|
+
/**
|
|
25
|
+
* Intersection observer delay in ms.
|
|
26
|
+
*/
|
|
27
|
+
intersectionObserverDelay: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 0,
|
|
30
|
+
},
|
|
24
31
|
},
|
|
25
32
|
|
|
26
|
-
setup() {
|
|
33
|
+
setup(props) {
|
|
27
34
|
const pbStickyFooter = ref(null);
|
|
28
35
|
|
|
29
36
|
const stuck = ref(false);
|
|
@@ -40,10 +47,13 @@ export default {
|
|
|
40
47
|
},
|
|
41
48
|
{
|
|
42
49
|
root: null,
|
|
43
|
-
threshold: [0.1, 0.96, 0.98, 1],
|
|
50
|
+
threshold: [0.1, 0.5, 0.96, 0.98, 0.99, 1],
|
|
44
51
|
},
|
|
45
52
|
);
|
|
46
|
-
|
|
53
|
+
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
observer.observe(pbStickyFooter.value);
|
|
56
|
+
}, props.intersectionObserverDelay);
|
|
47
57
|
});
|
|
48
58
|
|
|
49
59
|
return {
|
|
@@ -1085,7 +1085,7 @@ export default {
|
|
|
1085
1085
|
},
|
|
1086
1086
|
|
|
1087
1087
|
scrollToTop() {
|
|
1088
|
-
const top = this.$refs.pbProjectHubContainer
|
|
1088
|
+
const top = this.$refs.pbProjectHubContainer.getBoundingClientRect().offsetTop;
|
|
1089
1089
|
window.scroll({
|
|
1090
1090
|
top,
|
|
1091
1091
|
left: 0,
|