project-booster-vue 9.63.11 → 9.64.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.63.11",
3
+ "version": "9.64.1",
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>
@@ -126,9 +126,11 @@
126
126
  <m-notification class="pb-question__notifications" :type="notification.type" v-if="notification">
127
127
  <template #default>
128
128
  <strong style="font-size: 16px; line-height: 20px">{{ notification.title }}</strong>
129
- <p style="font-size: 16px; line-height: 20px; margin-bottom: 0" v-if="notification.content">
130
- {{ notification.content }}
131
- </p>
129
+ <p
130
+ style="font-size: 16px; line-height: 20px; margin-bottom: 0"
131
+ v-if="notification.content"
132
+ v-html="notification.content"
133
+ ></p>
132
134
  <m-link
133
135
  style="margin-top: 15px"
134
136
  v-if="notification?.modal"
@@ -137,15 +139,24 @@
137
139
  ></m-link>
138
140
  </template>
139
141
  </m-notification>
140
- <div class="pb-question__redirect-link" v-if="notification">
142
+ <div class="pb-question__redirect-link" v-if="!!notification?.buttonText">
141
143
  <m-button
142
144
  width="full"
143
145
  width-from-xxl="full"
144
146
  width-from-l="full"
145
- @click.prevent="handleGoTo(notification?.buttonStepCode)"
147
+ :href="notification.buttonHref"
146
148
  :label="notification.buttonText"
147
149
  />
148
150
  </div>
151
+ <div class="pb-question__redirect-link" v-if="payload.redirectLink">
152
+ <m-button
153
+ width="full"
154
+ width-from-xxl="full"
155
+ width-from-l="full"
156
+ :href="payload.redirectLink.href"
157
+ :label="payload.redirectLink.label"
158
+ />
159
+ </div>
149
160
  </m-container>
150
161
  <div
151
162
  v-if="isShowingFooter(payload.viewModel)"
@@ -170,14 +181,6 @@
170
181
  </div>
171
182
  </div>
172
183
  <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
184
  ref="pbStickyFooter"
182
185
  class="pb-question__sticky-footer"
183
186
  :style="`height: ${pbQuestionActionsButtonsMaxHeight + Number.parseInt(stickyBottomOffset.replace('px', ''))}px;`"
@@ -185,54 +188,44 @@
185
188
  :intersection-observer-delay="250"
186
189
  >
187
190
  <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
- />
191
+ <div ref="pbQuestionActionsButtonsValidate" class="pb-question__actions-container row-flex" key="validate">
192
+ <div class="pb-question__actions-container__column">
193
+ <m-button
194
+ label="Précédent"
195
+ theme="bordered-neutral"
196
+ class="pb-question__actions-buttons-button"
197
+ size="m"
198
+ size-from-l="l"
199
+ @click="$emit('go-back')"
200
+ v-if="!payload.viewModel.hideBackButton"
201
+ icon="ArrowBack48"
202
+ >
203
+ </m-button>
204
+ </div>
205
+ <div class="pb-question__actions-container__column" v-if="!skippables">
206
+ <m-button
207
+ class="pb-question__actions-buttons-button"
208
+ size="m"
209
+ size-from-l="l"
210
+ icon="ArrowNext48"
211
+ iconPosition="right"
212
+ label="Etape suivante"
213
+ @click="validMultiSelect(payload?.multiSelect?.actions?.VALIDATE)"
214
+ />
215
+ </div>
216
+ <div v-else class="pb-question__actions-container__column">
217
+ <m-button
218
+ v-for="button in skippables"
219
+ :key="button?.label"
220
+ class="pb-question__actions-buttons-button"
221
+ :label="button?.label"
222
+ :theme="button?.theme ? button?.theme : 'bordered'"
223
+ :icon="button.icon"
224
+ :iconPosition="button.iconPosition"
225
+ size="m"
226
+ @click="skipQuestion(button)"
227
+ />
228
+ </div>
236
229
  </div>
237
230
  </transition-group>
238
231
  </pb-sticky-footer>
@@ -292,7 +285,12 @@
292
285
  v-if="helpDialog"
293
286
  >
294
287
  <template #default>
295
- <h4>{{ helpDialog?.viewModelDialog.subTitle }}</h4>
288
+ <h4 v-if="!!helpDialog?.viewModelDialog?.subTitle">{{ helpDialog?.viewModelDialog?.subTitle }}</h4>
289
+ <div
290
+ class="pb-question__dialog-help__body"
291
+ v-if="!!helpDialog?.viewModelDialog?.htmlContent"
292
+ v-html="helpDialog.viewModelDialog.htmlContent"
293
+ ></div>
296
294
  <div
297
295
  :style="`background-image: url(${helpDialog.viewModelDialog.imgUrl});`"
298
296
  class="pb-question__dialog-help__body__image"
@@ -356,7 +354,7 @@
356
354
 
357
355
  <script lang="ts">
358
356
  import { defineComponent, PropType } from 'vue';
359
- import MButton from '../../mozaic/buttons/MButton.vue';
357
+ import { MButton } from '@mozaic-ds/vue-3';
360
358
  import MContainer from '../../mozaic/grid/MContainer.vue';
361
359
  import MDialog from '../../mozaic/dialog/MDialog.vue';
362
360
  import MFlex from '../../mozaic/flex/MFlex.vue';
@@ -503,7 +501,7 @@ export default defineComponent({
503
501
  return this.lastItemIndex < Object.values(this.displayableAnswers).length && this.payload.viewModel.showMore;
504
502
  },
505
503
  skippables() {
506
- return Array.isArray(this.payload.skippable) ? this.payload.skippable : [this.payload.skippable];
504
+ return Array.isArray(this.payload.skippable) ? this.payload.skippable : null;
507
505
  },
508
506
  hasAnswersSelected() {
509
507
  return Object.values(Object.fromEntries(this.selectedAnswers)).findIndex((answerValue) => answerValue) > -1;
@@ -534,6 +532,7 @@ export default defineComponent({
534
532
  this.updatePbQuestionActionsButtonsSizeHeight();
535
533
  this.progressBar = this.payload.viewModel?.progressBar || false;
536
534
  this.widthXlSize = this.payload.viewModel?.widthXlSize || false;
535
+ this.notification = this.payload.viewModel.notification || undefined;
537
536
  },
538
537
 
539
538
  beforeUnmount() {
@@ -631,10 +630,10 @@ export default defineComponent({
631
630
  * Emitted when step is completed
632
631
  * @event dynamic event name according to completedEventName prop
633
632
  */
634
- this.$emit(this.completedEventName, {
635
- answers: [answer],
636
- nextStep: answer.nextStep,
637
- });
633
+ // this.$emit(this.completedEventName, {
634
+ // answers: [answer],
635
+ // nextStep: answer.nextStep,
636
+ // });
638
637
  }
639
638
 
640
639
  this.$nextTick(() => {
@@ -1182,6 +1181,17 @@ $answers-apparition-duration: '0.5s';
1182
1181
 
1183
1182
  @include set-from-screen($responsive-breakpoint) {
1184
1183
  flex-direction: row;
1184
+ max-width: 746px;
1185
+ margin: auto;
1186
+ }
1187
+
1188
+ &__column {
1189
+ width: 50%;
1190
+
1191
+ &:last-child {
1192
+ display: flex;
1193
+ justify-content: flex-end;
1194
+ }
1185
1195
  }
1186
1196
 
1187
1197
  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;
@@ -95,6 +96,7 @@ export interface ScenarioStepDialog {
95
96
  viewModelDialog: {
96
97
  headerTitle: string;
97
98
  subTitle: string;
99
+ htmlContent: string;
98
100
  imgUrl?: string;
99
101
  linkText?: string;
100
102
  hrefLink?: string;
@@ -140,6 +142,7 @@ export interface ScenarioStepPayload {
140
142
  type: string;
141
143
  action: string;
142
144
  };
145
+ redirectLink?: any;
143
146
  }
144
147
 
145
148
  export interface ScenarioStepViewModel {
@@ -174,6 +177,7 @@ export interface ScenarioStepViewModel {
174
177
  widthFromL?: string;
175
178
  progressBar?: boolean;
176
179
  widthXlSize?: boolean;
180
+ notification?: ScenarioStepAnswerNotification;
177
181
  }
178
182
 
179
183
  export interface ScenarioStep {