project-booster-vue 9.43.4 → 9.44.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.43.4",
3
+ "version": "9.44.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -511,10 +511,7 @@ $responsive-breakpoint: 's';
511
511
 
512
512
  color: $color-grey-600;
513
513
  height: 100%;
514
- hyphens: auto;
515
514
  max-width: 100%;
516
- overflow-wrap: break-word;
517
- word-break: break-word;
518
515
 
519
516
  .a11y-high-contrast & {
520
517
  color: $color-grey-800;
@@ -366,8 +366,11 @@ $responsive-breakpoint: 'm';
366
366
  justify-content: flex-end !important;
367
367
  margin-bottom: $mu100;
368
368
  position: sticky;
369
- width: 100%;
370
369
  z-index: 1;
370
+
371
+ @include set-from-screen($responsive-breakpoint) {
372
+ width: 100%;
373
+ }
371
374
  }
372
375
 
373
376
  &__link {
@@ -1,18 +1,20 @@
1
1
  <template>
2
- <m-flex
3
- :class="`pb-restitution-list`"
4
- align-items="center"
5
- justify-content="flex-start"
6
- direction="column"
7
- ref="pbRestitutionList"
8
- >
9
- <m-link
10
- v-if="showBackButton"
11
- :left-icon="BACK_ICON"
12
- :label="payload.backLabel || 'Modifier l\'estimation'"
13
- class="pb-restitution-list__back-button"
14
- @click.once="$emit('go-back')"
15
- />
2
+ <m-flex align-items="center" direction="column" class="pb-restitution-wrapper">
3
+ <m-flex
4
+ :class="`pb-restitution-list`"
5
+ align-items="center"
6
+ justify-content="center"
7
+ direction="column"
8
+ ref="pbRestitutionList"
9
+ >
10
+ <m-link
11
+ v-if="showBackButton"
12
+ :left-icon="BACK_ICON"
13
+ :label="payload.backLabel || 'Modifier l\'estimation'"
14
+ class="pb-restitution-list__back-button"
15
+ @click.once="callAction(payload.viewModel.backButtonAction)"
16
+ />
17
+ </m-flex>
16
18
  <div class="pb-restitution-list__title">{{ payload?.viewModel?.title }}</div>
17
19
 
18
20
  <div class="pb-restitution-list__line">
@@ -78,7 +80,7 @@
78
80
  <div class="pb-restitution-list__modal__details__row">
79
81
  <div v-for="component in summary.components" :key="component.details">
80
82
  <div class="pb-restitution-list__modal__details__row__title" justify-content="space-between">
81
- <div v-html="component.title"></div>
83
+ <div v-html="component.title" :class="{ green: component.componentId === 'AID' }"></div>
82
84
  <div v-if="component.cost.min != component.cost.max">
83
85
  <strong>
84
86
  {{ formattedPriceRange(component.cost.min) }} et
@@ -126,6 +128,12 @@
126
128
  <strong v-html="formattedPriceRange(summary.cost.max)"></strong>
127
129
  </div>
128
130
  </div>
131
+
132
+ <div class="pb-restitution-list__modal__details__legal-mentions">
133
+ <p v-for="(mention, index) in payload?.viewModel?.legalMentions" :key="'lm-modal-' + index">
134
+ {{ mention }}
135
+ </p>
136
+ </div>
129
137
  </div>
130
138
  </template>
131
139
  <template #footer>
@@ -147,7 +155,11 @@ import MLink from '../mozaic/link/MLink.vue';
147
155
  import PbProjectItemSave from '../projects/project-item-save/PbProjectItemSave.vue';
148
156
  import MNotification from '../mozaic/notifications/MNotification.vue';
149
157
  import { NotificationOptions } from '@/types/pb/Notification';
150
- import { RestitutionPayload, RestitutionPayloadAction, RestitutionPayloadCallToAction } from '@/types/pb/Restitution';
158
+ import {
159
+ RestitutionListPayload,
160
+ RestitutionPayloadAction,
161
+ RestitutionPayloadCallToAction,
162
+ } from '@/types/pb/Restitution';
151
163
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
152
164
  import PbRestitutionListBlock from './PbRestitutionListBlock.vue';
153
165
  import { Project } from '../../types/pb/Project';
@@ -183,7 +195,7 @@ export default defineComponent({
183
195
  * from the default ones.
184
196
  */
185
197
  payload: {
186
- type: Object as PropType<RestitutionPayload>,
198
+ type: Object as PropType<RestitutionListPayload>,
187
199
  default: () => ({}),
188
200
  required: true,
189
201
  },
@@ -235,6 +247,9 @@ export default defineComponent({
235
247
  this.dialogContent = content;
236
248
  this.showDialog = !this.showDialog;
237
249
  },
250
+ handleLinkClicked(href: string) {
251
+ window.open(href, '_blank');
252
+ },
238
253
  handleItemCreated({
239
254
  projectId,
240
255
  estimateName,
@@ -302,16 +317,19 @@ $responsive-breakpoint: 'm';
302
317
  display: none;
303
318
  }
304
319
 
320
+ .pb-restitution-wrapper {
321
+ height: calc(100vh - 80px);
322
+ }
323
+
305
324
  .pb-restitution-list {
306
325
  @include set-font-face('regular');
307
- height: calc(100vh - 120px);
308
326
  margin: 0 auto;
309
- padding-top: $mu250;
310
327
  position: relative;
311
328
  width: 100%;
312
329
 
313
330
  @include set-from-screen($responsive-breakpoint) {
314
331
  justify-content: space-between;
332
+ padding-bottom: $mu250;
315
333
  width: calc(100% - #{$mu050} - #{$mu050});
316
334
  }
317
335
 
@@ -333,16 +351,31 @@ $responsive-breakpoint: 'm';
333
351
 
334
352
  &__title {
335
353
  @include set-font-face('semi-bold');
336
- @include set-font-scale('07', 's');
337
- left: 0;
354
+ @include set-font-scale('10', 's');
338
355
  padding: $mu100 0 $mu100 $mu025;
339
- position: absolute;
340
- right: 0;
341
- text-align: center;
342
- top: $mu250;
356
+ text-align: left;
357
+
358
+ &::after {
359
+ background: $color-primary-01-600;
360
+ content: '';
361
+ display: block;
362
+ height: 4px;
363
+ margin-bottom: $mu150;
364
+ margin-top: $mu025;
365
+ width: 100px;
366
+ }
343
367
 
344
368
  @include set-from-screen($responsive-breakpoint) {
345
- top: 0;
369
+ left: 0;
370
+ position: absolute;
371
+ right: 0;
372
+ text-align: center;
373
+ top: 0px;
374
+ @include set-font-scale('07', 's');
375
+
376
+ &::after {
377
+ display: none;
378
+ }
346
379
  }
347
380
  }
348
381
 
@@ -364,7 +397,11 @@ $responsive-breakpoint: 'm';
364
397
  }
365
398
 
366
399
  &__line {
367
- margin-top: $mu250;
400
+ padding: 8px;
401
+
402
+ @include set-from-screen($responsive-breakpoint) {
403
+ margin-top: $mu250;
404
+ }
368
405
  }
369
406
 
370
407
  &__modal {
@@ -511,6 +548,12 @@ $responsive-breakpoint: 'm';
511
548
  }
512
549
  }
513
550
  }
551
+
552
+ &__legal-mentions {
553
+ color: $color-grey-600;
554
+ @include set-font-face('regular');
555
+ @include set-font-scale('04', 'm');
556
+ }
514
557
  }
515
558
 
516
559
  &__footer {
@@ -109,7 +109,6 @@ $responsive-breakpoint: 'm';
109
109
  @include set-box-shadow('l');
110
110
  margin-bottom: $mu100;
111
111
  padding: $mu150;
112
- width: 80%;
113
112
 
114
113
  @include set-from-screen($responsive-breakpoint) {
115
114
  padding: $mu250;
@@ -211,7 +210,7 @@ $responsive-breakpoint: 'm';
211
210
  border-bottom: 1px solid $color-grey-500;
212
211
  display: flex;
213
212
  flex-direction: column;
214
- padding: $mu150 0 $mu075 0;
213
+ padding: $mu150 8px $mu075 8px;
215
214
 
216
215
  @include set-from-screen($responsive-breakpoint) {
217
216
  flex-direction: row;
@@ -2,7 +2,9 @@
2
2
  <div class="pb-restitution-list-line" :class="{ green: renovAid }" v-if="renovAid">
3
3
  <div class="pb-restitution-list-line__title" v-html="line.text || line.title"></div>
4
4
  <div class="pb-restitution-list-line__price" v-if="!renovAid">
5
- <div class="pb-restitution-list-line__price__min">{{ formattedPriceRange(line.cost.min) }}&nbsp;et&nbsp;</div>
5
+ <div class="pb-restitution-list-line__price__min">
6
+ {{ formattedPriceRange(line.cost.min) }}&nbsp;et&nbsp;{{ formattedPriceRange(line.cost.max) }}
7
+ </div>
6
8
  <div class="pb-restitution-list-line__price__max">{{ formattedPriceRange(line.cost.max) }}</div>
7
9
  </div>
8
10
  <div class="pb-restitution-list-line__price">
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "viewModel": {
3
3
  "title": "Votre estimation par travaux",
4
+ "backButtonAction": {
5
+ "type": "STEP",
6
+ "code": "STEP_CODE"
7
+ },
4
8
  "legalMentions": [
5
9
  "* Montant estimatif établi selon les réponses renseignées dans le questionnaire et susceptible d'être ajusté lors du devis définitif. Ce montant n’engage pas Leroy Merlin."
6
10
  ]
@@ -1,3 +1,5 @@
1
+ import { array } from 'yup';
2
+
1
3
  export interface RestitutionCost {
2
4
  min: number;
3
5
  max: number;
@@ -81,3 +83,15 @@ export interface RestitutionPayload {
81
83
  callToActions: RestitutionPayloadCallToAction[];
82
84
  exitOptions: RestitutionExitOptions;
83
85
  }
86
+
87
+ export interface RestitutionListPayload {
88
+ viewModel: RestitutionListViewModelPayload;
89
+ callToActions: RestitutionPayloadCallToAction[];
90
+ exitOptions: RestitutionExitOptions;
91
+ }
92
+
93
+ export interface RestitutionListViewModelPayload {
94
+ title: string;
95
+ backButtonAction: any;
96
+ legalMentions?: string[];
97
+ }