project-booster-vue 10.16.0 → 10.16.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "10.16.0",
3
+ "version": "10.16.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -53,6 +53,9 @@
53
53
  :nextButtonAction="payload.viewModel.nextStep"
54
54
  :step-number="stepNumber"
55
55
  :next-step-type="EventTypeEnum.BUTTON"
56
+ :trackingStatus="trackingStatus"
57
+ @go-back="$emit('go-back')"
58
+ @next-step="callAction(payload.viewModel.nextStep, [], emit)"
56
59
  />
57
60
 
58
61
  <m-modal :modalTitle="titleModal" :open="showModal" @update:open="handleCloseModal" class="m-pb-alert__dialog">
@@ -78,7 +81,7 @@
78
81
 
79
82
  <script lang="ts" setup>
80
83
  import { MNotification, MButton, MCard, MModal } from '@mozaic-ds/vue-3';
81
- import { PayloadAction } from '../types/genericPayload';
84
+ import { callAction } from '../services/navigate';
82
85
  import { ref } from 'vue';
83
86
  import { useStore } from 'vuex';
84
87
  import { EventTypeEnum, formatEvent } from '../services/event';
@@ -137,21 +140,6 @@ const handleShowModal = (option: any) => {
137
140
  window.open(option.viewModel.button.href, '_blank');
138
141
  }
139
142
  };
140
-
141
- /**
142
- * Send action to completed step
143
- * @param action
144
- */
145
- const callAction = (button: PayloadAction) => {
146
- if (button.nextStep.code != '__BACK__') {
147
- emit('step-completed', {
148
- answers: null,
149
- nextStep: button.code,
150
- });
151
- } else {
152
- emit('go-back');
153
- }
154
- };
155
143
  </script>
156
144
 
157
145
  <style lang="scss">
@@ -82,6 +82,17 @@
82
82
  />
83
83
  </div>
84
84
  </div>
85
+
86
+ <m-pb-navigation
87
+ :payload="payload"
88
+ :nextButtonAction="payload.viewModel.nextStep"
89
+ :step-number="stepNumber"
90
+ :next-step-type="EventTypeEnum.BUTTON"
91
+ v-if="payload?.viewModel?.nextStep"
92
+ :trackingStatus="trackingStatus"
93
+ @go-back="$emit('go-back')"
94
+ @next-step="goToNavigation(payload.viewModel.nextStep)"
95
+ />
85
96
  </div>
86
97
  </template>
87
98
 
@@ -99,6 +110,7 @@ import DEFAULT_PAYLOAD from './default-payload.json';
99
110
  import merge from 'lodash.merge';
100
111
  import { decorate } from '@/services/decorate';
101
112
  import { formatEvent, EventTypeEnum } from '../services/event';
113
+ import MPbNavigation from '../navigation/MPbNavigation.vue';
102
114
 
103
115
  const props = defineProps({
104
116
  /**
@@ -196,7 +208,6 @@ $responsive-breakpoint: 'm';
196
208
  .m-pb-exit-options {
197
209
  width: calc(100% - $mu250);
198
210
  margin: 4rem auto;
199
- padding: 0 $mu125;
200
211
 
201
212
  @include set-from-screen($responsive-breakpoint) {
202
213
  width: 100%;
@@ -5,20 +5,16 @@
5
5
  "typeForm": {
6
6
  "placeholder": "Par exemple : garder un miroir que vous appréciez"
7
7
  },
8
- "callToActions": [
9
- {
10
- "label": "Précédent",
11
- "theme": "bordered-neutral",
12
- "nextStep": {
13
- "code": "LMFR_BATHROOM_BATHTUB_BUDGET"
14
- }
15
- },
16
- {
17
- "label": "Etape suivante",
18
- "nextStep": {
19
- "code": "BATHROOM_END"
20
- }
8
+ "nextStep": {
9
+ "code": "APPOINTMENT_FORM",
10
+ "label": "Etape suivante"
11
+ },
12
+ "backButton": {
13
+ "label": "Précédent",
14
+ "theme": "bordered-neutral",
15
+ "nextStep": {
16
+ "code": "__BACK__"
21
17
  }
22
- ]
18
+ }
23
19
  }
24
20
  }
@@ -69,11 +69,11 @@
69
69
  </div>
70
70
 
71
71
  <m-pb-navigation
72
- :trackingStatus="trackingStatus"
73
72
  :answers="answers"
74
73
  :payload="payload"
75
74
  :nextButtonAction="payload.viewModel.nextStep"
76
75
  :disabledNextButton="!selectedCity"
76
+ :trackingStatus="trackingStatus"
77
77
  @go-back="$emit('go-back')"
78
78
  @next-step="nextStep"
79
79
  :step-number="stepNumber"
@@ -80,6 +80,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
80
80
  return { args };
81
81
  },
82
82
  template: `<m-pb-configurations-import
83
+ style="width:720px;margin:100px auto 0 auto;"
83
84
  :payload="args.payload"
84
85
  :show-back-button="args.showBackButton"
85
86
  :answers="args.answers"
@@ -1,18 +1,6 @@
1
1
  <template>
2
2
  <div class="pb-configurations-import_container">
3
3
  <div class="pb-configurations-import">
4
- <m-flex align-items="center">
5
- <m-link
6
- :label="payload.viewModel.backLabel || 'Question précédente'"
7
- :left-icon="BACK_ICON"
8
- :class="{
9
- 'pb-configurations-import__back-button': true,
10
- 'pb-configurations-import__back-button--hidden':
11
- !showBackButton && !decorate(answers, runtimeOptions, payload.viewModel.forceBackButton),
12
- }"
13
- @click="navigateTo(payload.viewModel)"
14
- />
15
- </m-flex>
16
4
  <div v-if="payload.viewModel.hero" class="pb-configurations-import__hero">
17
5
  {{ payload.viewModel.hero }}
18
6
  </div>
@@ -356,7 +344,6 @@ $answers-apparition-duration: '0.5s';
356
344
  width: 100%;
357
345
 
358
346
  @include set-from-screen($responsive-breakpoint) {
359
- width: 754px;
360
347
  margin: 0 auto;
361
348
  }
362
349
 
@@ -401,7 +388,7 @@ $answers-apparition-duration: '0.5s';
401
388
  padding: $mu200 $mu125 $mu100 $mu125;
402
389
 
403
390
  @include set-from-screen($responsive-breakpoint) {
404
- padding: $mu250 $mu100 $mu100 $mu100;
391
+ padding: 0;
405
392
  width: 100%;
406
393
  }
407
394
  }
@@ -458,7 +445,7 @@ $answers-apparition-duration: '0.5s';
458
445
  padding: $mu050;
459
446
 
460
447
  @include set-from-screen($responsive-breakpoint) {
461
- padding: $mu100;
448
+ padding: $mu100 0;
462
449
  }
463
450
 
464
451
  &-card {
@@ -470,7 +457,7 @@ $answers-apparition-duration: '0.5s';
470
457
  margin: $mu100 $mu050 0 $mu050;
471
458
 
472
459
  @include set-from-screen($responsive-breakpoint) {
473
- margin: $mu100 $mu100 0 $mu100;
460
+ margin: $mu100 0 0 0;
474
461
  }
475
462
  }
476
463
 
@@ -478,7 +465,7 @@ $answers-apparition-duration: '0.5s';
478
465
  margin: $mu150 $mu050 0 $mu050;
479
466
 
480
467
  @include set-from-screen($responsive-breakpoint) {
481
- margin: $mu150 $mu100 0 $mu100;
468
+ margin: $mu150 0 0 0;
482
469
  }
483
470
 
484
471
  &__button {
@@ -98,6 +98,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
98
98
  return { args };
99
99
  },
100
100
  template: `<m-pb-upload-document
101
+ style="width:720px;margin:100px auto 0 auto;"
101
102
  :payload="args.payload"
102
103
  :show-back-button="args.showBackButton"
103
104
  :answers="args.answers"
@@ -282,8 +282,8 @@ $answers-apparition-duration: '0.5s';
282
282
  width: 100%;
283
283
 
284
284
  @include set-from-screen($responsive-breakpoint) {
285
- width: 769px;
286
285
  margin: 0 auto;
286
+ padding: 0;
287
287
  }
288
288
  }
289
289
 
@@ -297,6 +297,10 @@ $answers-apparition-duration: '0.5s';
297
297
  padding: 0 $mu100;
298
298
  margin-top: $mu250;
299
299
 
300
+ @include set-from-screen($responsive-breakpoint) {
301
+ padding: 0;
302
+ }
303
+
300
304
  &__button {
301
305
  width: 50%;
302
306
 
@@ -308,6 +312,10 @@ $answers-apparition-duration: '0.5s';
308
312
 
309
313
  &__redirect-link {
310
314
  margin: $mu100 $mu100 0 $mu100;
315
+
316
+ @include set-from-screen($responsive-breakpoint) {
317
+ margin: $mu100 0 0 0;
318
+ }
311
319
  }
312
320
 
313
321
  &__back-button {
@@ -355,7 +363,7 @@ $answers-apparition-duration: '0.5s';
355
363
  padding: 0 $mu050 $mu100 $mu050;
356
364
 
357
365
  @include set-from-screen($responsive-breakpoint) {
358
- padding: $mu250 $mu100 $mu100 $mu100;
366
+ padding: 0;
359
367
  width: 100%;
360
368
  }
361
369
  }
@@ -417,7 +425,7 @@ $answers-apparition-duration: '0.5s';
417
425
  padding: $mu050;
418
426
 
419
427
  @include set-from-screen($responsive-breakpoint) {
420
- padding: $mu100;
428
+ padding: $mu100 0 0 0;
421
429
  }
422
430
 
423
431
  :deep(.pb-upload-document__answer__component) {
@@ -947,26 +947,11 @@
947
947
  }
948
948
  }
949
949
  }
950
- ]
951
- },
952
- "callToActions": [
953
- {
954
- "label": "Précédent",
955
- "nextStep": {
956
- "code": "__BACK__"
957
- },
958
- "theme": "bordered-primary-02"
959
- },
960
- {
961
- "label": "Etape suivante",
962
- "nextStep": {
963
- "code": "LMFR_QUESTION_ADD_PICTURE"
964
- }
950
+ ],
951
+ "nextStep": {
952
+ "code": "LMFR_QUESTION_ADD_PICTURE"
965
953
  }
966
- ]
967
- },
968
- "nextStep": {
969
- "code": "LMFR_QUESTION_ADD_PICTURE"
954
+ }
970
955
  }
971
956
  },
972
957
  "LMFR_QUESTION_ADD_PICTURE": {