project-booster-vue 10.4.3 → 10.5.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": "10.4.3",
3
+ "version": "10.5.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -113,7 +113,12 @@
113
113
  </template>
114
114
  <li v-if="attributeId === 'bathTubStyle'">Type de baignoire: {{ bathTubStyle[attribute.value] }}</li>
115
115
  <li v-if="attributeId === 'showerType'">Type de douche: {{ showerType[attribute.value] }}</li>
116
- <li v-if="attributeId === 'furnitureType'">Type de meubles: {{ furnitureType[attribute.value] }}</li>
116
+ <template v-if="attributeId === 'furnitureType'">
117
+ <li v-if="isArray(attribute.value)" v-for="value in JSON.parse(attribute.value)">
118
+ Type de meubles: {{ furnitureType[value] }}
119
+ </li>
120
+ <li v-else>Type de meubles: {{ furnitureType[attribute.value] }}</li>
121
+ </template>
117
122
  <li v-if="attributeId === 'wcType'">Type de WC: {{ wcType[attribute.value] }}</li>
118
123
  </template>
119
124
  </ul>
@@ -76,7 +76,6 @@ import { MNotification, MButton, MCard, MModal } from '@mozaic-ds/vue-3';
76
76
  import { PayloadAction } from '../types/genericPayload';
77
77
  import { sanitizeCerberusAttribut } from '@/services/sanitize';
78
78
  import { ref } from 'vue';
79
- import { ButtonType, EventName, sendAnalyticEvent } from '../services/event';
80
79
  import { useStore } from 'vuex';
81
80
 
82
81
  const emit = defineEmits(['go-back', 'step-completed']);
@@ -103,14 +102,6 @@ const handleCloseModal = () => {
103
102
  };
104
103
 
105
104
  const handleShowModal = (option: any) => {
106
- if (props.payload.viewModel.analytics.funnel_name) {
107
- sendAnalyticEvent(store, EventName.CLICK, {
108
- button_name: option.viewModel.button.label || '',
109
- button_location: props.payload.viewModel.analytics.funnel_name,
110
- button_type: ButtonType.ACTION,
111
- });
112
- }
113
-
114
105
  if (option.viewModel.button.dialog) {
115
106
  showModal.value = true;
116
107
  titleModal.value = option.viewModel.title;
@@ -130,14 +121,6 @@ const callAction = (button: PayloadAction) => {
130
121
  answers: null,
131
122
  nextStep: button.code,
132
123
  });
133
-
134
- if (props.payload.viewModel.analytics.funnel_name) {
135
- sendAnalyticEvent(store, EventName.CLICK, {
136
- button_name: button.label || '',
137
- button_location: props.payload.viewModel.analytics.funnel_name,
138
- button_type: ButtonType.ACTION,
139
- });
140
- }
141
124
  } else {
142
125
  emit('go-back');
143
126
  }
@@ -88,7 +88,6 @@ import { PayloadAction } from '../types/genericPayload';
88
88
  import { areConditionsValid } from '../../../services/scenarioConditionals';
89
89
  import { sanitizeCerberusAttribut } from '@/services/sanitize';
90
90
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
91
- import { ButtonType, EventName, sendAnalyticEvent } from '../services/event';
92
91
  import { useStore } from 'vuex';
93
92
  import { callAction } from '../services/navigate';
94
93
 
@@ -127,14 +126,6 @@ const props = defineProps({
127
126
  * @param action
128
127
  */
129
128
  const goToNavigation = (action: PayloadAction, label?: string) => {
130
- if (label && props.payload.viewModel.analytics.funnel_name) {
131
- sendAnalyticEvent(store, EventName.CLICK, {
132
- button_name: label || '',
133
- button_location: props.payload.viewModel.analytics.funnel_name,
134
- button_type: ButtonType.ACTION,
135
- });
136
- }
137
-
138
129
  callAction(action, [{ message }], emit);
139
130
  };
140
131
 
@@ -30,11 +30,9 @@
30
30
  />
31
31
  </div>
32
32
  <div class="pb-media-upload__link" v-if="payload.viewModel.notification">
33
- <m-link
34
- :label="payload.viewModel.notification.title"
35
- :theme="payload.viewModel.notification.theme"
36
- @click="displayNotificationDialog = true"
37
- />
33
+ <m-link :theme="payload.viewModel.notification.theme" @click.prevent="displayNotificationDialog = true">{{
34
+ payload.viewModel.notification.title
35
+ }}</m-link>
38
36
  </div>
39
37
  <div class="pb-media-upload__buttons" v-if="payload.callToActions">
40
38
  <div class="pb-media-upload__buttons__button" v-for="button in payload.callToActions">
@@ -240,10 +238,8 @@
240
238
 
241
239
  <script lang="ts">
242
240
  import { defineComponent } from 'vue';
243
- import MButton from '../../../mozaic/buttons/MButton.vue';
244
241
  import MDialog from '../../../mozaic/dialog/MDialog.vue';
245
242
  import MFlex from '../../../mozaic/flex/MFlex.vue';
246
- import MLink from '../../../mozaic/link/MLink.vue';
247
243
  import MTextInput from '../../../mozaic/text-input/MTextInput.vue';
248
244
  import MRadio from '../../../mozaic/radio/MRadio.vue';
249
245
  import MToggle from '../../../mozaic/toggle/MToggle.vue';
@@ -254,7 +250,7 @@ import { isFileTypeValid, MediaValidationErrors, mediaValidator } from './mediaV
254
250
  import DOCUMENT_UPLOAD_PAYLOAD from './document-upload-payload.json';
255
251
  import { MediaEventOptions, MediaUploadOptions } from '@/types/pb/Media';
256
252
  import { UploadDocumentMediaType } from '@/components/question/upload-document/UploadDocument';
257
- import { MModal, MCard } from '@mozaic-ds/vue-3';
253
+ import { MModal, MCard, MButton, MLink } from '@mozaic-ds/vue-3';
258
254
  import { PayloadAction } from '../../types/genericPayload';
259
255
 
260
256
  const NAME_MAX_LENGTH = 60;
@@ -2,7 +2,7 @@
2
2
  <div class="pb-products">
3
3
  <div class="pb-products__back-button-container" v-if="payload.viewModel.backLabel">
4
4
  <m-link
5
- icon="ArrowArrowLeft48"
5
+ icon="ArrowLeft48"
6
6
  :class="{
7
7
  'pb-products__back-button': true,
8
8
  }"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="pb-question__container" :style="{ paddingBottom: `calc(${stickyBottomOffset}px)` }">
3
3
  <div class="pb-question">
4
- <m-flex align-items="center">
4
+ <div class="row-flex align-center">
5
5
  <m-link
6
6
  :label="payload.viewModel.backLabel || 'Question précédente'"
7
7
  :left-icon="BACK_ICON"
@@ -12,8 +12,8 @@
12
12
  }"
13
13
  @click="navigateTo(payload.viewModel)"
14
14
  />
15
- </m-flex>
16
- <m-container fluid class="pb-question__answers-container">
15
+ </div>
16
+ <div class="pb-question__answers-container row-flex column">
17
17
  <div class="pb-question__answers-container-progress">
18
18
  <div
19
19
  class="pb-question__answers-container-progress-label"
@@ -25,7 +25,7 @@
25
25
  ></div>
26
26
  </div>
27
27
 
28
- <m-flexy class="pb-question__answers-container-flexy">
28
+ <div class="pb-question__answers-container-flexy row-flex">
29
29
  <transition-group :class="`pb-question__answers`" :name="showMoreAnimation" tag="div">
30
30
  <div
31
31
  v-for="answer in displayedAnswers"
@@ -115,7 +115,7 @@
115
115
  </div>
116
116
  </div>
117
117
  </transition-group>
118
- <m-flex v-if="showMoreButtonDisplayed" class="pb-question__show-more-container" justify-content="center">
118
+ <div v-if="showMoreButtonDisplayed" class="pb-question__show-more-container row-flex justify-center">
119
119
  <m-button
120
120
  theme="bordered"
121
121
  class="pb-question__show-more-button"
@@ -123,11 +123,11 @@
123
123
  :label="payload?.viewModel?.showMore?.label"
124
124
  @click="handleShowMoreClick()"
125
125
  />
126
- </m-flex>
127
- </m-flexy>
126
+ </div>
127
+ </div>
128
128
 
129
129
  <!-- Help link/modal -->
130
- <m-flex class="pb-question__help" v-if="payload.helpArea" direction="column">
130
+ <div class="pb-question__help row-flex column" v-if="payload.helpArea">
131
131
  <div v-for="helpItem in payload.helpArea" :key="helpItem.type">
132
132
  <div v-if="helpItem.type === 'text'">
133
133
  <p class="pb-question__help__text">{{ helpItem.label }}</p>
@@ -143,7 +143,7 @@
143
143
  />
144
144
  </div>
145
145
  </div>
146
- </m-flex>
146
+ </div>
147
147
 
148
148
  <m-notification class="pb-question__notifications" :type="notification.type" v-if="notification">
149
149
  <template #default>
@@ -179,7 +179,7 @@
179
179
  :label="payload.redirectLink.label"
180
180
  />
181
181
  </div>
182
- </m-container>
182
+ </div>
183
183
  <div
184
184
  v-if="isShowingFooter(payload.viewModel)"
185
185
  class="pb-question__footer"
@@ -222,6 +222,7 @@
222
222
  @click="$emit('go-back')"
223
223
  v-if="!payload.viewModel.hideBackButton"
224
224
  icon="ArrowBack48"
225
+ :data-cerberus="sanitizeCerberusAttribut('MPB-QUESTION', 'Etape precedente')"
225
226
  >
226
227
  </m-button>
227
228
  </div>
@@ -235,6 +236,7 @@
235
236
  label="Étape suivante"
236
237
  @click="nextStepHandler"
237
238
  :disabled="!hasAnswersSelected"
239
+ :data-cerberus="sanitizeCerberusAttribut('MPB-QUESTION', 'Etape suivante')"
238
240
  />
239
241
  </div>
240
242
  <div v-else-if="skippables && !hasAnswersSelected" class="pb-question__actions-container__column">
@@ -248,12 +250,13 @@
248
250
  :iconPosition="button.iconPosition"
249
251
  size="m"
250
252
  @click="skipQuestion(button)"
253
+ :data-cerberus="sanitizeCerberusAttribut('MPB-QUESTION', button?.label)"
251
254
  />
252
255
  </div>
253
256
  </div>
254
257
  </transition-group>
255
258
  </pb-sticky-footer>
256
- <m-container>
259
+ <div class="row-flex">
257
260
  <m-flexy
258
261
  v-if="payload.viewModel.decoratorStripe && Number(payload.viewModel.decoratorStripe.length) > 0"
259
262
  class="pb-question__decorator-stripe"
@@ -269,7 +272,7 @@
269
272
  <m-image class="pb-question__decorator-stripe-item-image" :src="decoratorItem" />
270
273
  </m-flexy-col>
271
274
  </m-flexy>
272
- </m-container>
275
+ </div>
273
276
 
274
277
  <m-modal
275
278
  :modalTitle="notification?.modal?.title"
@@ -315,14 +318,16 @@
315
318
  </template>
316
319
  </m-modal>
317
320
 
318
- <m-dialog class="pb-question__dialog" v-model:show-dialog="displayDialog">
319
- <template #header v-if="!displayVideo">
320
- <span>{{ dialog?.headerTitle }}</span>
321
- </template>
322
- <template #body>
321
+ <m-modal
322
+ class="pb-question__dialog"
323
+ :modalTitle="dialog?.headerTitle"
324
+ :open="displayDialog"
325
+ @update:open="displayDialog = false"
326
+ >
327
+ <template #default>
323
328
  <div class="pb-question__dialog-body" v-if="!displayVideo">
324
329
  <div :style="`background-image: url(${dialog?.imageUrl});`" class="pb-question__dialog-body-image" />
325
- <m-flex direction="column" class="pb-question__dialog-body-description">
330
+ <div class="pb-question__dialog-body-description row-flex column">
326
331
  <div class="pb-question__dialog-body-title">{{ dialog?.title }}</div>
327
332
  <div class="pb-question__dialog-body-text" v-html="dialog?.text" />
328
333
  <m-button
@@ -333,7 +338,7 @@
333
338
  width="fit"
334
339
  @click="displayVideoGuide(dialog?.headerTitle)"
335
340
  />
336
- </m-flex>
341
+ </div>
337
342
  </div>
338
343
  <iframe
339
344
  v-else
@@ -345,34 +350,28 @@
345
350
  ></iframe>
346
351
  </template>
347
352
  <template #footer v-if="!displayVideo">
348
- <m-flex class="pb-question__dialog-footer" justify-content="center">
349
- <m-button
350
- label="Fermer"
351
- width-from-m="fit"
352
- width="full"
353
- theme="bordered-neutral"
354
- @click="displayDialog = false"
355
- />
356
- </m-flex>
353
+ <m-button
354
+ label="Fermer"
355
+ width-from-m="fit"
356
+ width="full"
357
+ theme="bordered-neutral"
358
+ @click="displayDialog = false"
359
+ />
357
360
  </template>
358
- </m-dialog>
361
+ </m-modal>
359
362
  </div>
360
363
  </template>
361
364
 
362
365
  <script lang="ts" setup>
363
- import { PropType, ref, computed, watch, onMounted, onBeforeUnmount, defineEmits, nextTick } from 'vue';
366
+ import { PropType, ref, computed, watch, onMounted, defineEmits } from 'vue';
367
+ import { sanitizeCerberusAttribut } from '@/services/sanitize';
364
368
  import { MButton } from '@mozaic-ds/vue-3';
365
- import MContainer from '../../mozaic/grid/MContainer.vue';
366
- import MDialog from '../../mozaic/dialog/MDialog.vue';
367
- import MFlex from '../../mozaic/flex/MFlex.vue';
368
369
  import MFlexy from '../../mozaic/grid/MFlexy.vue';
369
370
  import MFlexyCol from '../../mozaic/grid/MFlexyCol.vue';
370
- import MIcon from '../../mozaic/icon/MIcon.vue';
371
371
  import MImage from '../../mozaic/image/MImage.vue';
372
- import MLink from '../../mozaic/link/MLink.vue';
373
372
  import MPbCard from '../../rework/cards/MPbCards.vue';
374
373
  import PbStickyFooter from '../../sticky-footer/PbStickyFooter.vue';
375
- import { MNotification, MModal } from '@mozaic-ds/vue-3';
374
+ import { MNotification, MModal, MLink, MIcon } from '@mozaic-ds/vue-3';
376
375
  import { sortAnswers } from './sortAnswers';
377
376
  import { areConditionsValid } from '../../../services/scenarioConditionals';
378
377
  import { decorate } from '@/services/decorate';
@@ -388,7 +387,6 @@ import {
388
387
  ScenarioStepDialog,
389
388
  ScenarioStepAnswerNotification,
390
389
  } from '@/types/pb/Scenario';
391
- import { sendAnalyticEvent, EventName, ButtonType } from '../services/event';
392
390
  import { useStore } from 'vuex';
393
391
 
394
392
  const BACK_ICON =
@@ -610,14 +608,6 @@ const selectAnswer = (stepCode: string, answer: ScenarioStepAnswer) => {
610
608
  const validMultiSelect = (multiSelectOptions: ScenarioStepMultiSelectAction | undefined) => {
611
609
  const answers: any = [];
612
610
 
613
- if (props.payload.viewModel.analytics.funnel_name) {
614
- sendAnalyticEvent($store, EventName.FIELD, {
615
- field_name: multiSelectOptions?.label || '',
616
- field_value: answers,
617
- funnel_name: props.payload.viewModel.analytics.funnel_name,
618
- });
619
- }
620
-
621
611
  for (const answerCode in Object.fromEntries(selectedAnswers.value)) {
622
612
  if (selectedAnswers.value.get(answerCode)) {
623
613
  answers.push({ ...questionPossibleAnswers.value.get(answerCode), selected: true });
@@ -706,14 +696,6 @@ const handleLinkClick = (answer: ScenarioStepAnswer) => {
706
696
  },
707
697
  },
708
698
  });
709
-
710
- if (props.payload.viewModel.analytics.funnel_name) {
711
- sendAnalyticEvent($store, EventName.CLICK, {
712
- button_name: answer.viewModel?.title || '',
713
- button_location: props.payload.viewModel.analytics.funnel_name,
714
- button_type: ButtonType.ACTION,
715
- });
716
- }
717
699
  };
718
700
 
719
701
  const displayVideoGuide = (origin: string | undefined) => {
@@ -2,7 +2,6 @@
2
2
  <form class="pb-city-search" @submit.prevent="handleFormValidation">
3
3
  <m-flex class="pb-city-search__back-button-container" align-items="stretch">
4
4
  <m-link
5
- :label="computedPayload.viewModel.backLabel"
6
5
  :left-icon="BACK_ICON"
7
6
  :class="{
8
7
  'pb-city-search__back-button': true,
@@ -10,7 +9,8 @@
10
9
  !showBackButton && !decorate(answers, runtimeOptions, payload.viewModel.forceBackButton),
11
10
  }"
12
11
  @click.once="$emit('go-back')"
13
- />
12
+ >{{ computedPayload.viewModel.backLabel }}</m-link
13
+ >
14
14
  </m-flex>
15
15
  <div class="pb-city-search__form">
16
16
  <div class="pb-city-search__title">
@@ -106,14 +106,13 @@ import merge from 'lodash.merge';
106
106
  import initGoogleMapsApi from './google-maps-api';
107
107
  import axios from 'axios';
108
108
  import MFlex from '../../../mozaic/flex/MFlex.vue';
109
- import MButton from '../../../mozaic/buttons/MButton.vue';
110
- import MLink from '../../../mozaic/link/MLink.vue';
111
109
  import MTextInput from '../../../mozaic/text-input/MTextInput.vue';
112
110
  import { sanitizeCerberusAttribut } from '@/services/sanitize';
113
111
  import DEFAULT_PAYLOAD from './default-payload.json';
114
112
  import { DebouncedFunc } from 'lodash-es';
115
113
  import { decorate } from '@/services/decorate';
116
114
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
115
+ import { MButton, MLink } from '@mozaic-ds/vue-3';
117
116
 
118
117
  const BACK_ICON =
119
118
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -123,7 +123,6 @@ import { ScenarioStepAnswer } from '@/types/pb/Scenario';
123
123
  import { Configuration } from '@/types/pb/Configuration';
124
124
  import { decorate } from '@/services/decorate';
125
125
  import { PayloadAction } from '../../types/genericPayload';
126
- import { ButtonType, EventName, sendAnalyticEvent } from '../../services/event';
127
126
 
128
127
  const BACK_ICON =
129
128
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -204,12 +203,6 @@ export default defineComponent({
204
203
  const configurationImportError = ref(false);
205
204
 
206
205
  const navigateTo = (viewModel: ConfigurationsImportViewModel) => {
207
- sendAnalyticEvent(store, EventName.CLICK, {
208
- button_name: viewModel.label || '',
209
- button_location: '',
210
- button_type: ButtonType.ACTION,
211
- });
212
-
213
206
  if (viewModel.backLink) {
214
207
  (<any>window).location = decorate(props.answers, props.runtimeOptions, viewModel.backLink);
215
208
  } else {
@@ -246,12 +239,6 @@ export default defineComponent({
246
239
  };
247
240
 
248
241
  const skipQuestion = (button: ConfigurationsImportSkippable) => {
249
- sendAnalyticEvent(store, EventName.CLICK, {
250
- button_name: button.label || '',
251
- button_location: '',
252
- button_type: ButtonType.ACTION,
253
- });
254
-
255
242
  store.dispatch('sendEventToBus', { code: 'SKIP-IMPORT-SIMULATIONS', payload: { projectId: projectId.value } });
256
243
  emit(props.completedEventName, {
257
244
  answers: {},
@@ -260,12 +247,6 @@ export default defineComponent({
260
247
  };
261
248
 
262
249
  const validMultiSelect = (multiSelectOptions: ConfigurationsImportMultiSelectAction) => {
263
- sendAnalyticEvent(store, EventName.CLICK, {
264
- button_name: multiSelectOptions.label || '',
265
- button_location: '',
266
- button_type: ButtonType.ACTION,
267
- });
268
-
269
250
  emit(props.completedEventName, {
270
251
  answers: selectedConfigurations.value,
271
252
  nextStep: multiSelectOptions.nextStep,
@@ -273,12 +254,6 @@ export default defineComponent({
273
254
  };
274
255
 
275
256
  const callAction = (action: PayloadAction) => {
276
- sendAnalyticEvent(store, EventName.CLICK, {
277
- button_name: action.label || '',
278
- button_location: '',
279
- button_type: ButtonType.ACTION,
280
- });
281
-
282
257
  if (action.code != '__BACK__') {
283
258
  emit('step-completed', {
284
259
  answers: [],
@@ -2,15 +2,15 @@
2
2
  <div class="pb-incremental-amount-input row-flex column align-center">
3
3
  <div class="pb-incremental-amount-input__back-button-container row-flex align-stretch">
4
4
  <m-link
5
- :label="computedPayload.viewModel.backLabel"
6
- :left-icon="BACK_ICON"
5
+ icon="ArrowBack48"
7
6
  :class="{
8
7
  'pb-incremental-amount-input__back-button': true,
9
8
  'pb-incremental-amount-input__back-button--hidden':
10
9
  !showBackButton && !decorate(answers, runtimeOptions, payload.viewModel.forceBackButton),
11
10
  }"
12
11
  @click.once="$emit('go-back')"
13
- />
12
+ >{{ computedPayload.viewModel.backLabel }}</m-link
13
+ >
14
14
  </div>
15
15
 
16
16
  <form
@@ -32,7 +32,7 @@
32
32
  />
33
33
  </div>
34
34
 
35
- <div class="pb-incremental-amount-input__buttons-container row-flex column align-start">
35
+ <div class="pb-incremental-amount-input__buttons-container row-flex flex-start">
36
36
  <m-button
37
37
  class="pb-incremental-amount-input__button"
38
38
  :label="computedPayload.viewModel.actionLabel"
@@ -49,14 +49,13 @@ import { computed, onMounted, ComputedRef, PropType } from 'vue';
49
49
  import cloneDeep from 'lodash.clonedeep';
50
50
  import merge from 'lodash.merge';
51
51
  import DEFAULT_PAYLOAD from './default-payload.json';
52
- import MLink from '../../../mozaic/link/MLink.vue';
53
- import MButton from '../../../mozaic/buttons/MButton.vue';
54
52
  import { ref } from 'vue';
55
53
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
56
54
  import { decorate } from '@/services/decorate';
57
55
  import MQuantitySelector from '../../../mozaic/quantityselector/MQuantitySelector.vue';
58
56
  import { IncrementalAmountPayload } from '@/components/question/incremental-amount-input/IncrementalAmount';
59
57
  import { EmitEventName } from '../../services/emit';
58
+ import { MLink, MButton } from '@mozaic-ds/vue-3';
60
59
 
61
60
  const BACK_ICON =
62
61
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -328,7 +327,6 @@ $responsive-breakpoint: 'm';
328
327
  }
329
328
 
330
329
  &__buttons-container {
331
- justify-content: flex-end !important;
332
330
  margin-bottom: $mu100;
333
331
  position: sticky;
334
332
  z-index: 1;
@@ -2,7 +2,6 @@
2
2
  <div class="pb-name-input row-flex column align-center">
3
3
  <div class="pb-name-input__back-button-container row-flex align-stretch">
4
4
  <m-link
5
- :label="computedPayload.viewModel.backLabel"
6
5
  :left-icon="BACK_ICON"
7
6
  :class="{
8
7
  'pb-name-input__back-button': true,
@@ -10,7 +9,8 @@
10
9
  !showBackButton && !decorate(answers, runtimeOptions, payload.viewModel.forceBackButton),
11
10
  }"
12
11
  @click.once="$emit('go-back')"
13
- />
12
+ >{{ computedPayload.viewModel.backLabel }}</m-link
13
+ >
14
14
  </div>
15
15
  <form class="pb-name-input__form-container" ref="pbNameInputFormObserver" @submit.prevent="handleFormSubmit">
16
16
  <div class="pb-name-input__title">
@@ -54,8 +54,6 @@ import { useForm } from 'vee-validate';
54
54
  import * as yup from 'yup';
55
55
  import cloneDeep from 'lodash.clonedeep';
56
56
  import merge from 'lodash.merge';
57
- import MButton from '../../../mozaic/buttons/MButton.vue';
58
- import MLink from '../../../mozaic/link/MLink.vue';
59
57
  import MTextInput from '../../../mozaic/text-input/MTextInput.vue';
60
58
  import MToggle from '../../../mozaic/toggle/MToggle.vue';
61
59
  import DEFAULT_PAYLOAD from './default-payload.json';
@@ -64,6 +62,7 @@ import { ScenarioStepAnswer } from '@/types/pb/Scenario';
64
62
  import { decorate } from '@/services/decorate';
65
63
  import { sanitizeCerberusAttribut } from '@/services/sanitize';
66
64
  import { EmitEventName } from '../../services/emit';
65
+ import { MButton, MLink } from '@mozaic-ds/vue-3';
67
66
 
68
67
  const BACK_ICON =
69
68
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -2,15 +2,15 @@
2
2
  <m-flex class="pb-space-input" direction="column" align-items="center">
3
3
  <m-flex class="pb-space-input__back-button-container" align-items="stretch">
4
4
  <m-link
5
- :label="computedPayload.viewModel.backLabel"
6
- :left-icon="BACK_ICON"
5
+ icon="ArrowBack48"
7
6
  :class="{
8
7
  'pb-space-input__back-button': true,
9
8
  'pb-space-input__back-button--hidden':
10
9
  !showBackButton && !decorate(answers, runtimeOptions, payload.viewModel.forceBackButton),
11
10
  }"
12
11
  @click.once="$emit('go-back')"
13
- />
12
+ >{{ computedPayload.viewModel.backLabel }}</m-link
13
+ >
14
14
  </m-flex>
15
15
 
16
16
  <form
@@ -130,8 +130,6 @@ import * as yup from 'yup';
130
130
  import cloneDeep from 'lodash.clonedeep';
131
131
  import merge from 'lodash.merge';
132
132
  import MFlex from '../../../mozaic/flex/MFlex.vue';
133
- import MButton from '../../../mozaic/buttons/MButton.vue';
134
- import MLink from '../../../mozaic/link/MLink.vue';
135
133
  import MTextInput from '../../../mozaic/text-input/MTextInput.vue';
136
134
  import MFlexyCol from '../../../mozaic/grid/MFlexyCol.vue';
137
135
  import MIcon from '../../../mozaic/icon/MIcon.vue';
@@ -142,9 +140,8 @@ import { ScenarioStepAnswer } from '@/types/pb/Scenario';
142
140
  import { decorate } from '@/services/decorate';
143
141
  import { sanitizeCerberusAttribut } from '@/services/sanitize';
144
142
  import { EmitEventName } from '../../services/emit';
143
+ import { MButton, MLink } from '@mozaic-ds/vue-3';
145
144
 
146
- const BACK_ICON =
147
- 'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
148
145
  const INFO_ICON =
149
146
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Notification_Information_24px.svg';
150
147
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="pb-upload-document__container" :style="`padding-bottom: calc(${stickyBottomOffset}px);`">
3
3
  <div class="pb-upload-document">
4
- <m-flex align-items="center">
4
+ <div class="row-flex align-center">
5
5
  <m-link
6
6
  :label="payload.viewModel.backLabel || 'Question précédente'"
7
7
  :left-icon="BACK_ICON"
@@ -12,7 +12,7 @@
12
12
  }"
13
13
  @click="navigateTo(payload.viewModel)"
14
14
  />
15
- </m-flex>
15
+ </div>
16
16
  <div v-if="payload.viewModel.hero" class="pb-upload-document__hero">
17
17
  {{ payload.viewModel.hero }}
18
18
  </div>
@@ -62,11 +62,9 @@
62
62
  </div>
63
63
  </m-flexy-col>
64
64
  </transition-group>
65
- <m-flex
65
+ <div
66
66
  v-if="showMoreButtonDisplayed"
67
- justify-content="center"
68
- align-items="center"
69
- class="pb-upload-document__show-more-container"
67
+ class="pb-upload-document__show-more-container row-flex align-center justify-center"
70
68
  >
71
69
  <m-button
72
70
  theme="text-primary"
@@ -75,17 +73,15 @@
75
73
  :label="payload.viewModel.showMore.label"
76
74
  @click="handleShowMoreClick()"
77
75
  />
78
- </m-flex>
76
+ </div>
79
77
  </m-flexy>
80
78
  </m-container>
81
79
  </div>
82
80
 
83
81
  <div class="pb-upload-document__redirect-link" v-if="payload.viewModel.redirectLink">
84
- <m-link
85
- :label="payload.viewModel.redirectLink.label"
86
- @click="validMultiSelect(payload.viewModel.redirectLink)"
87
- theme="primary"
88
- ></m-link>
82
+ <m-link @click="validMultiSelect(payload.viewModel.redirectLink)" theme="primary">{{
83
+ payload.viewModel.redirectLink.label
84
+ }}</m-link>
89
85
  </div>
90
86
 
91
87
  <div class="pb-upload-document__buttons row-flex" v-if="payload.multiSelect">
@@ -115,12 +111,10 @@
115
111
 
116
112
  <script lang="ts" setup>
117
113
  import { computed, onMounted, ref, PropType } from 'vue';
118
- import { MButton } from '@mozaic-ds/vue-3';
114
+ import { MButton, MLink } from '@mozaic-ds/vue-3';
119
115
  import MContainer from '../../../mozaic/grid/MContainer.vue';
120
- import MFlex from '../../../mozaic/flex/MFlex.vue';
121
116
  import MFlexy from '../../../mozaic/grid/MFlexy.vue';
122
117
  import MFlexyCol from '../../../mozaic/grid/MFlexyCol.vue';
123
- import MLink from '../../../mozaic/link/MLink.vue';
124
118
  import PbCard from '../../../cards/PbCard.vue';
125
119
  import MPbMediaUpload from '../../media/upload/MPbMediaUpload.vue';
126
120
  import { useStore } from 'vuex';
@@ -131,8 +125,6 @@ import {
131
125
  } from '@/components/question/upload-document/UploadDocument';
132
126
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
133
127
  import { decorate, doEval } from '@/services/decorate';
134
- import { PayloadAction } from '../../types/genericPayload';
135
- import { ButtonType, EventName, sendAnalyticEvent } from '../../services/event';
136
128
  import { EmitEventName } from '../../services/emit';
137
129
 
138
130
  const BACK_ICON =
@@ -226,14 +218,6 @@ const navigateTo = (viewModel: UploadDocumentViewModel) => {
226
218
  */
227
219
  $emit('go-back');
228
220
  }
229
-
230
- if (props.payload.viewModel.analytics.funnel_name) {
231
- sendAnalyticEvent(store, EventName.CLICK, {
232
- button_name: props.payload.viewModel.label || '',
233
- button_location: props.payload.viewModel.analytics.funnel_name,
234
- button_type: ButtonType.ACTION,
235
- });
236
- }
237
221
  };
238
222
 
239
223
  const handleDisplayDialogEvent = (event: Event) => {
@@ -246,14 +230,6 @@ const validMultiSelect = (multiSelectOptions: UploadDocumentMultiSelectAction) =
246
230
  if (multiSelectOptions.nextStep.code == '__BACK__') {
247
231
  $emit('go-back');
248
232
  } else {
249
- if (props.payload.viewModel.analytics.funnel_name) {
250
- sendAnalyticEvent(store, EventName.CLICK, {
251
- button_name: props.payload.viewModel.label || '',
252
- button_location: props.payload.viewModel.analytics.funnel_name,
253
- button_type: ButtonType.ACTION,
254
- });
255
- }
256
-
257
233
  $emit(props.completedEventName, {
258
234
  answers: selectedDocuments.value.length ? selectedDocuments.value : null,
259
235
  nextStep: multiSelectOptions.nextStep,
@@ -262,14 +238,6 @@ const validMultiSelect = (multiSelectOptions: UploadDocumentMultiSelectAction) =
262
238
  };
263
239
 
264
240
  const skipQuestion = (button: UploadDocumentMultiSelectAction) => {
265
- if (props.payload.viewModel.analytics.funnel_name) {
266
- sendAnalyticEvent(store, EventName.CLICK, {
267
- button_name: props.payload.viewModel.label || '',
268
- button_location: props.payload.viewModel.analytics.funnel_name,
269
- button_type: ButtonType.ACTION,
270
- });
271
- }
272
-
273
241
  $emit(props.completedEventName, {
274
242
  answers: selectedDocuments.value.length ? selectedDocuments.value : null,
275
243
  nextStep: button.next,
@@ -10,10 +10,10 @@
10
10
  <m-link
11
11
  v-if="showBackButton && payload.backLabel"
12
12
  :left-icon="BACK_ICON"
13
- :label="payload.backLabel.label || 'Recommencer l\'estimation'"
14
13
  class="pb-restitution-list__back-button"
15
14
  @click.once="callAction(payload.backLabel.action)"
16
- />
15
+ >{{ payload.backLabel.label || "Recommencer l'estimation" }}</m-link
16
+ >
17
17
  </m-flex>
18
18
  <div class="pb-restitution-list__title">{{ payload?.viewModel?.title }}</div>
19
19
 
@@ -66,17 +66,16 @@
66
66
  </m-flex>
67
67
 
68
68
  <div>
69
- <m-dialog
69
+ <m-modal
70
70
  class="pb-restitution-list__modal"
71
- :show-dialog="showDialog"
72
71
  width="771px"
73
72
  maxHeight="100vh"
74
- @update:show-dialog="handleShowDialog"
73
+ :open="showDialog"
74
+ @update:open="handleShowDialog"
75
+ :modalTitle="summary.subprojectTemplateLabel"
75
76
  >
76
- <template #body>
77
+ <template #default>
77
78
  <div class="pb-restitution-list__modal__details" direction="column">
78
- <div class="pb-restitution-list__modal__details__title" v-html="summary.subprojectTemplateLabel"></div>
79
-
80
79
  <div class="pb-restitution-list__modal__details__totals" justify-content="space-between" align-items="center">
81
80
  <div><strong>Montant total</strong>&nbsp; (aides déduites)</div>
82
81
  <div class="space-mx">entre</div>
@@ -105,25 +104,22 @@
105
104
  <m-button label="Fermer" theme="bordered-neutral" @click.prevent="handleShowDialog"></m-button>
106
105
  </m-flex>
107
106
  </template>
108
- </m-dialog>
107
+ </m-modal>
109
108
  </div>
110
109
  </template>
111
110
 
112
111
  <script lang="ts">
113
112
  import { defineComponent, PropType } from 'vue';
114
113
  import { mapGetters } from 'vuex';
115
- import MButton from '../../mozaic/buttons/MButton.vue';
116
- import MDialog from '../../mozaic/dialog/MDialog.vue';
117
114
  import MFlex from '../../mozaic/flex/MFlex.vue';
118
- import MLink from '../../mozaic/link/MLink.vue';
119
115
  import PbProjectItemSave from '../../projects/project-item-save/PbProjectItemSave.vue';
120
- import MNotification from '../../mozaic/notifications/MNotification.vue';
121
116
  import { NotificationOptions } from '@/types/pb/Notification';
122
117
  import { RestitutionListPayload, RestitutionPayloadCallToAction } from '@/types/pb/Restitution';
123
118
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
124
119
  import PbRestitutionListBlock from './MPbRestitutionListBlock.vue';
125
120
  import { Project } from '../../../types/pb/Project';
126
121
  import { areConditionsValid } from '../../../services/scenarioConditionals';
122
+ import { MModal, MButton, MLink, MNotification } from '@mozaic-ds/vue-3';
127
123
  const BACK_ICON =
128
124
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
129
125
  import { sanitizeCerberusAttribut } from '@/services/sanitize';
@@ -131,7 +127,7 @@ import { sanitizeCerberusAttribut } from '@/services/sanitize';
131
127
  export default defineComponent({
132
128
  components: {
133
129
  MButton,
134
- MDialog,
130
+ MModal,
135
131
  MFlex,
136
132
  MLink,
137
133
  PbRestitutionListBlock,