project-booster-vue 9.63.11 → 9.64.0

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": "9.63.11",
3
+ "version": "9.64.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -42,6 +42,8 @@
42
42
  :label="button.label"
43
43
  @click="callAction(button.nextStep)"
44
44
  :theme="button.theme"
45
+ :icon="button.icon"
46
+ :iconPosition="button.iconPosition"
45
47
  style="margin-left: 1rem"
46
48
  :data-cerberus="sanitizeCerberusAttribut('MPB-ALERT', button.label)"
47
49
  />
@@ -42,11 +42,14 @@
42
42
  {
43
43
  "label": "Précédent",
44
44
  "nextStep": "Code",
45
- "theme": "bordered-primary-02"
45
+ "theme": "bordered-primary-02",
46
+ "icon": "ArrowBack48"
46
47
  },
47
48
  {
48
49
  "label": "Etape suivante",
49
- "nextStep": "Code"
50
+ "nextStep": "Code",
51
+ "icon": "ArrowNext48",
52
+ "iconPosition": "right"
50
53
  }
51
54
  ]
52
55
  }
@@ -38,6 +38,7 @@
38
38
  :theme="payload.viewModel.backButton.theme"
39
39
  @click="callAction(payload.viewModel.backButton.nextStep)"
40
40
  :data-cerberus="sanitizeCerberusAttribut('MPB-EXIT-OPTIONS', payload.viewModel.backButton.label)"
41
+ icon="ArrowBack48"
41
42
  />
42
43
  </div>
43
44
 
@@ -49,6 +50,8 @@
49
50
  :label="condition.viewModel.nextStep.label"
50
51
  :href="condition.viewModel.nextStep.link"
51
52
  :data-cerberus="sanitizeCerberusAttribut('MPB-EXIT-OPTIONS', condition.viewModel.nextStep.label)"
53
+ icon="ArrowNext48"
54
+ iconPosition="right"
52
55
  />
53
56
  </div>
54
57
  </div>
@@ -61,6 +64,7 @@
61
64
  :theme="payload.viewModel.backButton.theme"
62
65
  @click="callAction(payload.viewModel.backButton.nextStep)"
63
66
  :data-cerberus="sanitizeCerberusAttribut('MPB-EXIT-OPTIONS', payload.viewModel.backButton.label)"
67
+ icon="ArrowBack48"
64
68
  />
65
69
  </div>
66
70
 
@@ -69,6 +73,8 @@
69
73
  :label="payload.viewModel.nextStep.label"
70
74
  :data-cerberus="sanitizeCerberusAttribut('MPB-EXIT-OPTIONS', 'NEXT')"
71
75
  @click="callAction(payload.viewModel.nextStep)"
76
+ icon="ArrowNext48"
77
+ iconPosition="right"
72
78
  />
73
79
  </div>
74
80
  </div>
@@ -146,6 +146,15 @@
146
146
  :label="notification.buttonText"
147
147
  />
148
148
  </div>
149
+ <div class="pb-question__redirect-link" v-if="payload.redirectLink">
150
+ <m-button
151
+ width="full"
152
+ width-from-xxl="full"
153
+ width-from-l="full"
154
+ :href="payload.redirectLink.href"
155
+ :label="payload.redirectLink.label"
156
+ />
157
+ </div>
149
158
  </m-container>
150
159
  <div
151
160
  v-if="isShowingFooter(payload.viewModel)"
@@ -170,14 +179,6 @@
170
179
  </div>
171
180
  </div>
172
181
  <pb-sticky-footer
173
- v-show="
174
- payload.skippable ||
175
- (payload.multiSelect &&
176
- ((payload.multiSelect && areMultiselectButtonsDisplayed() && hasAnswersSelected) ||
177
- (payload.skippable &&
178
- isSkipButtonsDisplayed() &&
179
- (payload.viewModel.alwaysDisplaySkippable || !hasAnswersSelected))))
180
- "
181
182
  ref="pbStickyFooter"
182
183
  class="pb-question__sticky-footer"
183
184
  :style="`height: ${pbQuestionActionsButtonsMaxHeight + Number.parseInt(stickyBottomOffset.replace('px', ''))}px;`"
@@ -185,54 +186,44 @@
185
186
  :intersection-observer-delay="250"
186
187
  >
187
188
  <transition-group name="pb-question__actions--animated" mode="out-in">
188
- <div
189
- v-if="payload.multiSelect && areMultiselectButtonsDisplayed() && hasAnswersSelected"
190
- ref="pbQuestionActionsButtonsValidate"
191
- class="pb-question__actions-container"
192
- key="validate"
193
- >
194
- <m-button
195
- v-if="isResetMultiselectButtonDisplayed()"
196
- class="pb-question__actions-buttons-button"
197
- theme="bordered"
198
- size="m"
199
- size-from-l="l"
200
- :label="payload.multiSelect.actions.RESET.label"
201
- @click="resetMultiSelect(payload.answers)"
202
- />
203
- <m-button
204
- v-if="isValidateMultiselectButtonDisplayed()"
205
- class="pb-question__actions-buttons-button"
206
- size="m"
207
- size-from-l="l"
208
- :label="payload.multiSelect.actions.VALIDATE.label"
209
- @click="validMultiSelect(payload?.multiSelect?.actions?.VALIDATE)"
210
- />
211
- </div>
212
- <div
213
- v-else-if="
214
- payload.skippable &&
215
- isSkipButtonsDisplayed() &&
216
- (payload.viewModel.alwaysDisplaySkippable || !hasAnswersSelected)
217
- "
218
- ref="pbQuestionActionsButtonsSkip"
219
- class="pb-question__actions-container"
220
- key="skip"
221
- >
222
- <m-button
223
- v-for="button in skippables"
224
- :key="button?.label"
225
- class="pb-question__actions-buttons-button"
226
- :label="button?.label"
227
- :theme="button?.theme ? button?.theme : 'bordered'"
228
- :right-icon="button?.rightIcon"
229
- :left-icon="button?.leftIcon"
230
- size="m"
231
- size-from-l="l"
232
- :width="button?.width"
233
- :widthFromM="button?.widthFromM"
234
- @click="skipQuestion(button)"
235
- />
189
+ <div ref="pbQuestionActionsButtonsValidate" class="pb-question__actions-container row-flex" key="validate">
190
+ <div class="pb-question__actions-container__column">
191
+ <m-button
192
+ label="Précédent"
193
+ theme="bordered-neutral"
194
+ class="pb-question__actions-buttons-button"
195
+ size="m"
196
+ size-from-l="l"
197
+ @click="$emit('go-back')"
198
+ v-if="!payload.viewModel.hideBackButton"
199
+ icon="ArrowBack48"
200
+ >
201
+ </m-button>
202
+ </div>
203
+ <div class="pb-question__actions-container__column" v-if="!skippables">
204
+ <m-button
205
+ class="pb-question__actions-buttons-button"
206
+ size="m"
207
+ size-from-l="l"
208
+ icon="ArrowNext48"
209
+ iconPosition="right"
210
+ label="Etape suivante"
211
+ @click="validMultiSelect(payload?.multiSelect?.actions?.VALIDATE)"
212
+ />
213
+ </div>
214
+ <div v-else class="pb-question__actions-container__column">
215
+ <m-button
216
+ v-for="button in skippables"
217
+ :key="button?.label"
218
+ class="pb-question__actions-buttons-button"
219
+ :label="button?.label"
220
+ :theme="button?.theme ? button?.theme : 'bordered'"
221
+ :icon="button.icon"
222
+ :iconPosition="button.iconPosition"
223
+ size="m"
224
+ @click="skipQuestion(button)"
225
+ />
226
+ </div>
236
227
  </div>
237
228
  </transition-group>
238
229
  </pb-sticky-footer>
@@ -356,7 +347,7 @@
356
347
 
357
348
  <script lang="ts">
358
349
  import { defineComponent, PropType } from 'vue';
359
- import MButton from '../../mozaic/buttons/MButton.vue';
350
+ import { MButton } from '@mozaic-ds/vue-3';
360
351
  import MContainer from '../../mozaic/grid/MContainer.vue';
361
352
  import MDialog from '../../mozaic/dialog/MDialog.vue';
362
353
  import MFlex from '../../mozaic/flex/MFlex.vue';
@@ -503,7 +494,7 @@ export default defineComponent({
503
494
  return this.lastItemIndex < Object.values(this.displayableAnswers).length && this.payload.viewModel.showMore;
504
495
  },
505
496
  skippables() {
506
- return Array.isArray(this.payload.skippable) ? this.payload.skippable : [this.payload.skippable];
497
+ return Array.isArray(this.payload.skippable) ? this.payload.skippable : null;
507
498
  },
508
499
  hasAnswersSelected() {
509
500
  return Object.values(Object.fromEntries(this.selectedAnswers)).findIndex((answerValue) => answerValue) > -1;
@@ -534,6 +525,7 @@ export default defineComponent({
534
525
  this.updatePbQuestionActionsButtonsSizeHeight();
535
526
  this.progressBar = this.payload.viewModel?.progressBar || false;
536
527
  this.widthXlSize = this.payload.viewModel?.widthXlSize || false;
528
+ this.notification = this.payload.viewModel.notification || undefined;
537
529
  },
538
530
 
539
531
  beforeUnmount() {
@@ -631,10 +623,10 @@ export default defineComponent({
631
623
  * Emitted when step is completed
632
624
  * @event dynamic event name according to completedEventName prop
633
625
  */
634
- this.$emit(this.completedEventName, {
635
- answers: [answer],
636
- nextStep: answer.nextStep,
637
- });
626
+ // this.$emit(this.completedEventName, {
627
+ // answers: [answer],
628
+ // nextStep: answer.nextStep,
629
+ // });
638
630
  }
639
631
 
640
632
  this.$nextTick(() => {
@@ -1182,6 +1174,17 @@ $answers-apparition-duration: '0.5s';
1182
1174
 
1183
1175
  @include set-from-screen($responsive-breakpoint) {
1184
1176
  flex-direction: row;
1177
+ max-width: 746px;
1178
+ margin: auto;
1179
+ }
1180
+
1181
+ &__column {
1182
+ width: 50%;
1183
+
1184
+ &:last-child {
1185
+ display: flex;
1186
+ justify-content: flex-end;
1187
+ }
1185
1188
  }
1186
1189
 
1187
1190
  button {
@@ -11,6 +11,10 @@
11
11
  "image": "https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
12
12
  }
13
13
  },
14
+ "redirectLink": {
15
+ "label": "Aller vers google",
16
+ "href": "https://google.fr"
17
+ },
14
18
  "answers": {
15
19
  "ANSWER-1": {
16
20
  "code": "ANSWER-1",
@@ -90,7 +90,16 @@
90
90
 
91
91
  <div class="pb-upload-document__buttons row-flex" v-if="payload.multiSelect">
92
92
  <div class="pb-upload-document__buttons__button" v-for="button in payload.multiSelect.actions">
93
- <m-button :label="button.label" @click="validMultiSelect(button)" :theme="button.theme" />
93
+ <m-button label="Précédent" @click="$emit('go-back')" theme="bordered-neutral" icon="ArrowBack48" />
94
+ </div>
95
+ <div class="pb-upload-document__buttons__button" v-for="button in payload.multiSelect.actions">
96
+ <m-button
97
+ :label="button.label"
98
+ @click="validMultiSelect(button)"
99
+ :theme="button.theme"
100
+ :icon="button.icon"
101
+ :iconPosition="button.iconPosition"
102
+ />
94
103
  </div>
95
104
  </div>
96
105
 
@@ -106,7 +115,7 @@
106
115
 
107
116
  <script lang="ts">
108
117
  import { defineComponent, computed, onMounted, ref, PropType, Ref, ComponentCustomProperties } from 'vue';
109
- import MButton from '../../../mozaic/buttons/MButton.vue';
118
+ import { MButton } from '@mozaic-ds/vue-3';
110
119
  import MContainer from '../../../mozaic/grid/MContainer.vue';
111
120
  import MFlex from '../../../mozaic/flex/MFlex.vue';
112
121
  import MFlexy from '../../../mozaic/grid/MFlexy.vue';
@@ -52,10 +52,13 @@
52
52
  "callToActions": [
53
53
  {
54
54
  "label": "Précédent",
55
- "theme": "bordered-primary-02"
55
+ "theme": "bordered-primary-02",
56
+ "icon": "ArrowLeft48"
56
57
  },
57
58
  {
58
- "label": "Suivant"
59
+ "label": "Suivant",
60
+ "icon": "ArrowRight48",
61
+ "iconPosition": "right"
59
62
  }
60
63
  ],
61
64
  "skippable": [
@@ -80,7 +80,7 @@ $responsive-breakpoint: 'm';
80
80
  padding: $mu150 $mu150 0 $mu150;
81
81
 
82
82
  @include set-from-screen($responsive-breakpoint) {
83
- padding: $mu250 $mu250 0 $mu250;
83
+ padding: $mu250 0 0 0;
84
84
  width: 630px;
85
85
  }
86
86
 
@@ -13,7 +13,7 @@
13
13
  <div class="pb-restitution-list-line__wrapper">
14
14
  <m-notification class="pb-restitution-list-line__label" v-if="line.details" size="s">
15
15
  <template #default>
16
- <p style="margin: 0">{{ line.details }}</p>
16
+ <p style="margin: 0" v-html="line.details"></p>
17
17
  </template>
18
18
  </m-notification>
19
19
 
@@ -758,8 +758,8 @@ export default defineComponent({
758
758
  @import 'layouts/l.flexy';
759
759
 
760
760
  $responsive-breakpoint: 'm';
761
- $slide-animation-duration: 0.15s;
762
- $slide-sticky-top-animation-duration: 0.15s;
761
+ $slide-animation-duration: 0.25s;
762
+ $slide-sticky-top-animation-duration: 0.25s;
763
763
  $slide-sticky-top-animation-delay: $slide-animation-duration;
764
764
  $slide-sticky-bottom-animation-duration: 0.3s;
765
765
  $slide-sticky-bottom-animation-delay: $slide-animation-duration + 0.45s;
@@ -816,14 +816,6 @@ $slide-sticky-bottom-animation-delay: $slide-animation-duration + 0.45s;
816
816
  }
817
817
 
818
818
  &__step--slide {
819
- &-enter-from {
820
- transform: translateX(100vw);
821
- }
822
-
823
- &-leave-to {
824
- transform: translateX(-100vw);
825
- }
826
-
827
819
  &-enter-active,
828
820
  &-leave-active {
829
821
  transition: transform $slide-animation-duration, opacity $slide-animation-duration;
@@ -835,14 +827,6 @@ $slide-sticky-bottom-animation-delay: $slide-animation-duration + 0.45s;
835
827
  }
836
828
 
837
829
  &-reversed {
838
- &-enter-from {
839
- transform: translateX(-100vw);
840
- }
841
-
842
- &-leave-to {
843
- transform: translateX(100vw);
844
- }
845
-
846
830
  &-enter-active,
847
831
  &-leave-active {
848
832
  transition: transform $slide-animation-duration, opacity $slide-animation-duration;
@@ -46,6 +46,7 @@
46
46
  "progressBar": true,
47
47
  "widthFromL": "1of3",
48
48
  "widthXlSize": true,
49
+ "hideBackButton": true,
49
50
  "forceOneCardPerLineOnMobile": true,
50
51
  "sortBy": {
51
52
  "type": ["numeric", "string"],
@@ -785,6 +786,20 @@
785
786
  }
786
787
  }
787
788
  },
789
+ "skippable": [
790
+ {
791
+ "isAnswer": true,
792
+ "label": "Passer à l'étape suivante",
793
+ "icon": "ArrowNext48",
794
+ "iconPosition": "right",
795
+ "theme": "text-primary",
796
+ "width": "full",
797
+ "widthFromM": "fit",
798
+ "nextStep": {
799
+ "code": "LMFR_QUESTION_PLAN_INFO"
800
+ }
801
+ }
802
+ ],
788
803
  "answers": {
789
804
  "NATURAL": {
790
805
  "code": "NATURAL",
@@ -1106,25 +1121,12 @@
1106
1121
  }
1107
1122
  }
1108
1123
  },
1109
- "callToActions": [
1110
- {
1111
- "label": "Précédent",
1112
- "theme": "bordered-primary-02",
1113
- "nextStep": {
1114
- "code": "__BACK__"
1115
- }
1116
- },
1117
- {
1118
- "label": "Suivant",
1119
- "nextStep": {
1120
- "code": "LMFR_QUESTION_WORK_START_DATE"
1121
- }
1122
- }
1123
- ],
1124
1124
  "multiSelect": {
1125
1125
  "actions": {
1126
1126
  "VALIDATE": {
1127
- "label": "Continuer",
1127
+ "label": "Etape suivante",
1128
+ "icon": "ArrowNext48",
1129
+ "iconPosition": "right",
1128
1130
  "nextStep": {
1129
1131
  "conditionals": [
1130
1132
  {
@@ -1206,25 +1208,12 @@
1206
1208
  }
1207
1209
  }
1208
1210
  },
1209
- "callToActions": [
1210
- {
1211
- "label": "Précédent",
1212
- "theme": "bordered-primary-02",
1213
- "nextStep": {
1214
- "code": "__BACK__"
1215
- }
1216
- },
1217
- {
1218
- "label": "Suivant",
1219
- "nextStep": {
1220
- "code": "LMFR_QUESTION_ADD_PICTURE"
1221
- }
1222
- }
1223
- ],
1224
1211
  "multiSelect": {
1225
1212
  "actions": {
1226
1213
  "VALIDATE": {
1227
- "label": "Continuer",
1214
+ "label": "Etape suivante",
1215
+ "icon": "ArrowNext48",
1216
+ "iconPosition": "right",
1228
1217
  "nextStep": {
1229
1218
  "conditionals": [
1230
1219
  {
@@ -79,7 +79,7 @@ export default defineComponent({
79
79
  &::before {
80
80
  background-color: white;
81
81
  bottom: -1px;
82
- box-shadow: 0 -#{$mu050} $mu100 rgba(0, 0, 0, 0.35);
82
+ box-shadow: 0 -#{$mu050} $mu100 rgba(0, 0, 0, 0.05);
83
83
  content: '';
84
84
  display: flex;
85
85
  justify-content: center;
@@ -5,10 +5,11 @@ export interface ScenarioStepAnswerSortOptions {
5
5
  }
6
6
 
7
7
  export interface ScenarioStepSkippableOptions {
8
+ [x: string]: unknown;
8
9
  label?: string;
9
10
  theme?: string;
10
- rightIcon?: string;
11
- leftIcon?: string;
11
+ icon?: string;
12
+ iconPosition?: string;
12
13
  isAnswer?: boolean;
13
14
  width: string;
14
15
  widthFromM: string;
@@ -140,6 +141,7 @@ export interface ScenarioStepPayload {
140
141
  type: string;
141
142
  action: string;
142
143
  };
144
+ redirectLink?: any;
143
145
  }
144
146
 
145
147
  export interface ScenarioStepViewModel {
@@ -174,6 +176,7 @@ export interface ScenarioStepViewModel {
174
176
  widthFromL?: string;
175
177
  progressBar?: boolean;
176
178
  widthXlSize?: boolean;
179
+ notification?: ScenarioStepAnswerNotification;
177
180
  }
178
181
 
179
182
  export interface ScenarioStep {