project-booster-vue 8.104.5 → 8.105.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.
Files changed (14) hide show
  1. package/package.json +1 -1
  2. package/src/components/appointment/PbAppointment.stories.mdx +4 -4
  3. package/src/components/appointment/PbAppointment.vue +1 -1
  4. package/src/components/appointment/__snapshots__/storyshots-puppeteer-test-puppeteer-js-image-storyshots-project-booster-components-/360/237/246/240-pb-appointment-feature-appointment-error-1-snap.png +0 -0
  5. package/src/components/appointment/__snapshots__/storyshots-puppeteer-test-puppeteer-js-image-storyshots-project-booster-components-/360/237/246/240-pb-appointment-feature-appointment-first-time-1-snap.png +0 -0
  6. package/src/components/appointment/default-payload.json +3 -1
  7. package/src/components/appointment/default-selected-scenarios.json +59 -1
  8. package/src/components/question/PbQuestion.vue +24 -16
  9. package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-js-image-storyshots-project-booster-scenario-/360/237/246/240-questions-/360/237/246/240-pb-question-features-question-show-more-show-more-1-snap.png +0 -0
  10. package/src/components/question/upload-document/PbUploadDocument.vue +71 -90
  11. package/src/components/question/upload-document/__snapshots__/storyshots-puppeteer-test-puppeteer-js-image-storyshots-project-booster-scenario-/360/237/246/240-questions-/360/237/246/240-pb-upload-document-feature-show-more-show-more-documents-1-snap.png +0 -0
  12. package/src/components/question/upload-document/default-payload.json +2 -1
  13. package/src/components/scenario/PbScenario.vue +1 -6
  14. package/src/components/scenario/scenarii/appointment-qualification-kitchen.json +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "8.104.5",
3
+ "version": "8.105.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "test:unit": "vue-cli-service test:unit --forceExit --detectOpenHandles",
@@ -51,11 +51,11 @@ import { documentThumbnailResolver, uploadDocumentResolver } from '../../service
51
51
 
52
52
  The `PbAppointment` component to make an appointment.
53
53
 
54
- ## Start Appointment
54
+ ## Appointment first time
55
55
 
56
56
  <Canvas>
57
57
  <Story
58
- name="Feature - Start Appointment"
58
+ name="Feature - Appointment first time"
59
59
  parameters={{
60
60
  controls: { disable: true },
61
61
  msw: [
@@ -111,10 +111,10 @@ The `PbAppointment` component to make an appointment.
111
111
  </Story>
112
112
  </Canvas>
113
113
 
114
- ## Error Appointment
114
+ ## Appointment Error
115
115
 
116
116
  <Canvas>
117
- <Story name="Feature - Error Appointment" parameters={{ controls: { disabled: true } }} height="100vh">
117
+ <Story name="Feature - Appointment Error" parameters={{ controls: { disabled: true } }} height="100vh">
118
118
  {{
119
119
  components: { PbAppointment },
120
120
  created() {
@@ -12,7 +12,7 @@
12
12
  @click="$store.dispatch('appointmentQualification/checkAppointmentQualification')"
13
13
  />
14
14
  <m-flex v-else full-width align-items="center" justify-content="center" direction="column">
15
- <pb-scenario :scenarios="scenarios" in-height="100vh" @scenario-event="handleEvent"></pb-scenario>
15
+ <pb-scenario :scenarios="scenarios" min-height="100vh" @scenario-event="handleEvent"></pb-scenario>
16
16
  </m-flex>
17
17
  </m-flex>
18
18
  </template>
@@ -296,8 +296,9 @@
296
296
  "skippable": [
297
297
  {
298
298
  "label": "Ajouter un plan plus tard",
299
- "theme": "bordered",
299
+ "theme": "text-primary",
300
300
  "width": "full",
301
+ "widthFromM": "fit",
301
302
  "nextStep": {
302
303
  "code": "ADD_PLAN_LATER"
303
304
  }
@@ -405,6 +406,7 @@
405
406
  "label": "Ajouter un plan plus tard",
406
407
  "theme": "text-primary",
407
408
  "width": "full",
409
+ "widthFromM": "fit",
408
410
  "nextStep": {
409
411
  "code": "ADD_PLAN_LATER"
410
412
  }
@@ -346,8 +346,9 @@
346
346
  "skippable": [
347
347
  {
348
348
  "label": "Ajouter un plan plus tard",
349
- "theme": "bordered",
349
+ "theme": "text-primary",
350
350
  "width": "full",
351
+ "widthFromM": "fit",
351
352
  "nextStep": {
352
353
  "code": "ADD_PLAN_LATER"
353
354
  }
@@ -455,6 +456,7 @@
455
456
  "label": "Ajouter un plan plus tard",
456
457
  "theme": "text-primary",
457
458
  "width": "full",
459
+ "widthFromM": "fit",
458
460
  "nextStep": {
459
461
  "code": "ADD_PLAN_LATER"
460
462
  }
@@ -479,6 +481,14 @@
479
481
  "image": "https://storage.googleapis.com/project-booster-media/common/icons/plus--title-offset.jpg"
480
482
  }
481
483
  },
484
+ "ANSWER-1": {
485
+ "code": "ANSWER-1",
486
+ "selected": true,
487
+ "newDocumentUploaded": false,
488
+ "viewModel": {
489
+ "title": "Answer 1"
490
+ }
491
+ },
482
492
  "ANSWER-2": {
483
493
  "code": "ANSWER-2",
484
494
  "selected": true,
@@ -494,6 +504,54 @@
494
504
  "viewModel": {
495
505
  "title": "Answer 3"
496
506
  }
507
+ },
508
+ "ANSWER-4": {
509
+ "code": "ANSWER-4",
510
+ "selected": true,
511
+ "newDocumentUploaded": false,
512
+ "viewModel": {
513
+ "title": "Answer 4"
514
+ }
515
+ },
516
+ "ANSWER-5": {
517
+ "code": "ANSWER-5",
518
+ "selected": true,
519
+ "newDocumentUploaded": false,
520
+ "viewModel": {
521
+ "title": "Answer 5"
522
+ }
523
+ },
524
+ "ANSWER-6": {
525
+ "code": "ANSWER-6",
526
+ "selected": true,
527
+ "newDocumentUploaded": false,
528
+ "viewModel": {
529
+ "title": "Answer 6"
530
+ }
531
+ },
532
+ "ANSWER-7": {
533
+ "code": "ANSWER-7",
534
+ "selected": true,
535
+ "newDocumentUploaded": false,
536
+ "viewModel": {
537
+ "title": "Answer 7"
538
+ }
539
+ },
540
+ "ANSWER-8": {
541
+ "code": "ANSWER-8",
542
+ "selected": true,
543
+ "newDocumentUploaded": false,
544
+ "viewModel": {
545
+ "title": "Answer 8"
546
+ }
547
+ },
548
+ "ANSWER-9": {
549
+ "code": "ANSWER-9",
550
+ "selected": true,
551
+ "newDocumentUploaded": false,
552
+ "viewModel": {
553
+ "title": "Answer 9"
554
+ }
497
555
  }
498
556
  }
499
557
  }
@@ -88,7 +88,7 @@
88
88
  </div>
89
89
  </m-flexy-col>
90
90
  </transition-group>
91
- <m-flex v-if="showMoreButtonDisplayed" class="pb-question__show-more-container">
91
+ <m-flex v-if="showMoreButtonDisplayed" class="pb-question__show-more-container" justify-content="center">
92
92
  <m-button
93
93
  theme="bordered"
94
94
  class="pb-question__show-more-button"
@@ -97,22 +97,22 @@
97
97
  @click="handleShowMoreClick()"
98
98
  />
99
99
  </m-flex>
100
- <div
101
- v-if="isShowingFooter(payload.viewModel)"
102
- class="pb-question__footer"
103
- :class="{
104
- 'pb-question__footer--gray': payload.viewModel.footer.theme && payload.viewModel.footer.theme === 'gray',
105
- }"
106
- >
107
- <div class="pb-question__footer-icon">
108
- <m-icon color="primary-01-500" :icon="INFO_ICON" />
109
- </div>
110
- <div class="pb-question__footer-label">
111
- {{ payload.viewModel.footer.label }}
112
- </div>
113
- </div>
114
100
  </m-flexy>
115
101
  </m-container>
102
+ <div
103
+ v-if="isShowingFooter(payload.viewModel)"
104
+ class="pb-question__footer"
105
+ :class="{
106
+ 'pb-question__footer--gray': payload.viewModel.footer.theme && payload.viewModel.footer.theme === 'gray',
107
+ }"
108
+ >
109
+ <div class="pb-question__footer-icon">
110
+ <m-icon color="primary-01-500" :icon="INFO_ICON" />
111
+ </div>
112
+ <div class="pb-question__footer-label">
113
+ {{ payload.viewModel.footer.label }}
114
+ </div>
115
+ </div>
116
116
  </div>
117
117
  <pb-sticky-footer
118
118
  v-show="
@@ -679,6 +679,10 @@ export default {
679
679
  displayVideoGuide() {
680
680
  this.displayDialog = true;
681
681
  this.displayVideo = true;
682
+ this.$store.dispatch('sendEventToBus', {
683
+ code: 'APPOINTMENT-QUALIFICATION-VIDEO-CLICKED',
684
+ payload: {},
685
+ });
682
686
  },
683
687
  },
684
688
  };
@@ -838,6 +842,7 @@ $answers-apparition-duration: '0.5s';
838
842
  &__show-more {
839
843
  &-container {
840
844
  box-sizing: border-box;
845
+ padding-bottom: $mu100;
841
846
  width: 100%;
842
847
  }
843
848
 
@@ -853,6 +858,7 @@ $answers-apparition-duration: '0.5s';
853
858
  box-sizing: border-box;
854
859
 
855
860
  @include set-from-screen($responsive-breakpoint) {
861
+ max-width: 384px;
856
862
  width: 100%;
857
863
  }
858
864
  }
@@ -1002,7 +1008,6 @@ $answers-apparition-duration: '0.5s';
1002
1008
  display: flex;
1003
1009
  flex-direction: column;
1004
1010
  flex-wrap: nowrap;
1005
-
1006
1011
  height: 100%;
1007
1012
  padding: $mu150;
1008
1013
  width: 100%;
@@ -1056,9 +1061,12 @@ $answers-apparition-duration: '0.5s';
1056
1061
  @include set-font-face('semi-bold');
1057
1062
  }
1058
1063
  }
1064
+
1059
1065
  &-video-container {
1066
+ padding: $mu100;
1060
1067
  width: 100%;
1061
1068
  }
1069
+
1062
1070
  &-footer {
1063
1071
  box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2);
1064
1072
  padding: $mu100;
@@ -114,36 +114,29 @@
114
114
  <transition-group name="pb-upload-document__actions--animated" mode="out-in">
115
115
  <div
116
116
  v-if="payload.multiSelect && areMultiselectButtonsDisplayed() && hasAnswersSelected()"
117
+ ref="pbQuestionActionsButtonsValidate"
117
118
  class="pb-upload-document__actions-container"
119
+ key="validate"
118
120
  >
119
- <m-flex
120
- ref="pbQuestionActionsButtons1"
121
- class="pb-upload-document__actions-buttons"
122
- :class="{ 'pb-upload-document__actions-buttons--more-padding': showMoreButtonDisplayed }"
123
- justify-content="center"
124
- align-items="center"
125
- direction="row"
126
- >
127
- <m-button
128
- v-if="isResetMultiselectButtonDisplayed()"
129
- class="pb-upload-document__cancel-button"
130
- theme="bordered"
131
- size="m"
132
- size-from-l="l"
133
- width="full"
134
- :label="payload.multiSelect.actions.RESET.label"
135
- @click="resetMultiSelect(payload.multiSelect.actions.RESET, payload.answers)"
136
- />
137
- <m-button
138
- v-if="isValidateMultiselectButtonDisplayed()"
139
- class="pb-upload-document__validate-button"
140
- size="m"
141
- size-from-l="l"
142
- width="full"
143
- :label="payload.multiSelect.actions.VALIDATE.label"
144
- @click="validMultiSelect(payload.multiSelect.actions.VALIDATE)"
145
- />
146
- </m-flex>
121
+ <m-button
122
+ v-if="isResetMultiselectButtonDisplayed()"
123
+ class="pb-upload-document__actions-buttons-button"
124
+ theme="bordered"
125
+ size="m"
126
+ size-from-l="l"
127
+ width="full"
128
+ :label="payload.multiSelect.actions.RESET.label"
129
+ @click="resetMultiSelect(payload.multiSelect.actions.RESET, payload.answers)"
130
+ />
131
+ <m-button
132
+ v-if="isValidateMultiselectButtonDisplayed()"
133
+ class="pb-upload-document__actions-buttons-button"
134
+ size="m"
135
+ size-from-l="l"
136
+ width="full"
137
+ :label="payload.multiSelect.actions.VALIDATE.label"
138
+ @click="validMultiSelect(payload.multiSelect.actions.VALIDATE)"
139
+ />
147
140
  </div>
148
141
  <div
149
142
  v-if="
@@ -155,27 +148,19 @@
155
148
  class="pb-upload-document__actions-container"
156
149
  key="skip"
157
150
  >
158
- <m-flex
159
- class="pb-question__actions-buttons"
160
- :class="{ 'pb-question__actions-buttons--more-padding': showMoreButtonDisplayed }"
161
- justify-content="center"
162
- align-items="center"
163
- direction="row"
164
- >
165
- <m-button
166
- v-for="button in payload.skippable"
167
- :key="button.label"
168
- class="pb-upload-document__actions-buttons-button"
169
- :label="button.label"
170
- :theme="button.theme ? button.theme : 'bordered'"
171
- :right-icon="button.rightIcon"
172
- :left-icon="button.leftIcon"
173
- size="m"
174
- :width="button.width"
175
- :widthFromM="button.widthFromM"
176
- @click="skipQuestion(button)"
177
- />
178
- </m-flex>
151
+ <m-button
152
+ v-for="button in payload.skippable"
153
+ :key="button.label"
154
+ class="pb-upload-document__actions-buttons-button"
155
+ :label="button.label"
156
+ :theme="button.theme ? button.theme : 'bordered'"
157
+ :right-icon="button.rightIcon"
158
+ :left-icon="button.leftIcon"
159
+ size="m"
160
+ :width="button.width"
161
+ :widthFromM="button.widthFromM"
162
+ @click="skipQuestion(button)"
163
+ />
179
164
  </div>
180
165
  </transition-group>
181
166
  </pb-sticky-footer>
@@ -287,7 +272,7 @@ export default {
287
272
  selectedDocuments: [],
288
273
  displayableAnswers: [],
289
274
  displayedAnswers: [],
290
- lastItemIndex: 0,
275
+ lastItemIndex: 1,
291
276
  pageSize: 8,
292
277
  showMoreAnimation: '',
293
278
  showAnswerDelay: 0,
@@ -316,6 +301,7 @@ export default {
316
301
  },
317
302
 
318
303
  mounted() {
304
+ window.addEventListener('resize', this.updatePbQuestionActionsButtonsSizeHeight);
319
305
  this.updateDefaultAnswers();
320
306
  this.updateSelectedDocuments(this.answers[this.stepName]);
321
307
  this.updatePbQuestionActionsButtonsSizeHeight();
@@ -327,8 +313,8 @@ export default {
327
313
  if (selectedDocuments) {
328
314
  this.selectedDocuments = selectedDocuments;
329
315
  if (this.payload.viewModel.showMore) {
330
- if (this.lastItemIndex < this.pageSize) {
331
- this.lastItemIndex = this.pageSize;
316
+ if (this.lastItemIndex < this.pageSize - 1) {
317
+ this.lastItemIndex = this.pageSize - 1;
332
318
  }
333
319
  this.displayedAnswers = this.selectedDocuments.slice(0, this.lastItemIndex);
334
320
  } else {
@@ -491,7 +477,7 @@ export default {
491
477
  }, delay);
492
478
  delay += this.showAnswerDelay;
493
479
  }
494
- this.lastItemIndex += this.pageSize;
480
+ this.lastItemIndex = this.lastItemIndex + this.pageSize;
495
481
  },
496
482
  activateShowMoreAnimation() {
497
483
  this.showMoreAnimation = 'pb-upload-document__answers-animation';
@@ -602,8 +588,8 @@ $answers-apparition-duration: '0.5s';
602
588
  }
603
589
 
604
590
  .pb-upload-document__container {
605
- margin: 0 $mu050;
606
- width: calc(100% - #{$mu050} - #{$mu050});
591
+ padding: 0 $mu050;
592
+ width: 100%;
607
593
  }
608
594
 
609
595
  .pb-upload-document {
@@ -623,10 +609,6 @@ $answers-apparition-duration: '0.5s';
623
609
  }
624
610
  }
625
611
 
626
- &__cancel-button ~ &__validate-button {
627
- margin-left: $mu050;
628
- }
629
-
630
612
  &__hero {
631
613
  @include set-font-face('semi-bold');
632
614
  @include set-font-scale('09', 's');
@@ -742,6 +724,7 @@ $answers-apparition-duration: '0.5s';
742
724
  &__show-more {
743
725
  &-container {
744
726
  box-sizing: border-box;
727
+ padding-bottom: $mu100;
745
728
  width: 100%;
746
729
  }
747
730
 
@@ -754,11 +737,6 @@ $answers-apparition-duration: '0.5s';
754
737
  }
755
738
  }
756
739
 
757
- &__sticky-footer {
758
- margin: 0 #{-$mu050};
759
- width: calc(100% + 2 * #{$mu050});
760
- }
761
-
762
740
  &__footer {
763
741
  &-container {
764
742
  font-size: $size-font-05;
@@ -780,49 +758,52 @@ $answers-apparition-duration: '0.5s';
780
758
  }
781
759
  }
782
760
 
761
+ &__sticky-footer {
762
+ margin: 0 #{-$mu050};
763
+ width: calc(100% + 2 * #{$mu050});
764
+ }
765
+
783
766
  &__actions-container {
767
+ align-items: stretch;
784
768
  backface-visibility: hidden;
785
769
  background-color: white;
770
+ display: flex;
771
+ flex-direction: column;
772
+ justify-content: center;
786
773
  padding: $mu100;
774
+
775
+ @include set-from-screen($responsive-breakpoint) {
776
+ flex-direction: row;
777
+ }
778
+
787
779
  button {
788
- max-width: 384px;
789
780
  &:nth-child(n + 2) {
790
781
  margin: $mu050 0 0 0;
782
+
791
783
  @include set-from-screen($responsive-breakpoint) {
792
784
  margin: 0 0 0 $mu050;
785
+ max-width: 384px;
793
786
  }
794
787
  }
795
788
  }
796
789
  }
797
790
 
798
- &__actions {
799
- box-sizing: border-box;
800
- position: relative;
801
-
802
- &-buttons-container {
803
- box-sizing: border-box;
804
- left: 50%;
805
- position: absolute;
806
- transform: translateX(-50%);
807
- width: 100%;
791
+ &__actions--animated {
792
+ &-enter-from {
793
+ opacity: 0;
794
+ transform: translate(0, 50%);
808
795
  }
809
796
 
810
- &--animated,
811
- &--animated-with-replacer {
812
- &-enter-from {
813
- opacity: 0;
814
- transform: translate(0, 56px);
815
- }
816
-
817
- &-enter-active,
818
- &-leave-active {
819
- transition: transform 0.2s ease-out, opacity 0.1s ease-out;
820
- }
797
+ &-enter-active,
798
+ &-leave-active {
799
+ transition: transform 0.2s ease-out, opacity 0.1s ease-out;
800
+ }
821
801
 
822
- &-leave-to {
823
- opacity: 0;
824
- transform: translate(0, 56px);
825
- }
802
+ &-leave-to {
803
+ opacity: 0;
804
+ position: absolute;
805
+ transform: translate(0, 50%);
806
+ width: 100%;
826
807
  }
827
808
  }
828
809
  }
@@ -40,8 +40,9 @@
40
40
  "skippable": [
41
41
  {
42
42
  "label": "Ajouter un plan plus tard",
43
- "theme": "bordered",
43
+ "theme": "text-primary",
44
44
  "width": "full",
45
+ "widthFromM": "fit",
45
46
  "nextStep": {
46
47
  "code": "LMFR_QUESTION_ADD_PLAN_LATER"
47
48
  }
@@ -237,14 +237,9 @@ export default {
237
237
  emit('scenario-completed', state.value.answers);
238
238
  emitEventToPipeline('SCENARIO-COMPLETED', step);
239
239
  } else {
240
- emit('STEP-STARTED', step);
240
+ emitEventToPipeline('STEP-STARTED', step);
241
241
  }
242
242
  if (state.value.currentStep.component === 'PbRestitution' && !props.runtimeOptions.projectMode) {
243
- /**
244
- * Emitted when the user lands on PbRestitution
245
- * @event RESTITUTION-LANDED
246
- */
247
-
248
243
  emitEventToPipeline('RESTITUTION-LANDED', state.value.answers);
249
244
  }
250
245
  }
@@ -296,8 +296,9 @@
296
296
  "skippable": [
297
297
  {
298
298
  "label": "Ajouter un plan plus tard",
299
- "theme": "bordered",
299
+ "theme": "text-primary",
300
300
  "width": "full",
301
+ "widthFromM": "fit",
301
302
  "nextStep": {
302
303
  "code": "ADD_PLAN_LATER"
303
304
  }
@@ -405,6 +406,7 @@
405
406
  "label": "Ajouter un plan plus tard",
406
407
  "theme": "text-primary",
407
408
  "width": "full",
409
+ "widthFromM": "fit",
408
410
  "nextStep": {
409
411
  "code": "ADD_PLAN_LATER"
410
412
  }