project-booster-vue 9.33.1 → 9.35.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.33.1",
3
+ "version": "9.35.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -280,7 +280,7 @@ $responsive-breakpoint: 'm';
280
280
  top: 0;
281
281
 
282
282
  &--is-visible {
283
- transform: translateX(0);
283
+ transform: translateX(0) !important;
284
284
  }
285
285
 
286
286
  &--is-hidden {
@@ -240,7 +240,7 @@ $responsive-breakpoint: 'm';
240
240
  &__button-informations {
241
241
  @include set-font-scale('07', 'm');
242
242
  @include set-font-face('semi-bold');
243
- margin-bottom: calc($mu100 * -1);
243
+ margin-bottom: ($mu100 * -1);
244
244
  margin-top: $mu200;
245
245
  }
246
246
  }
@@ -1,7 +1,13 @@
1
1
  <template>
2
2
  <m-flex class="pb-projects-list" ref="pbProjectsList" direction="column">
3
+ <m-link
4
+ :label="linkLabel"
5
+ class="pb-projects-list__back-button"
6
+ :left-icon="BACK_ICON"
7
+ @click.prevent="window.history.go(-1)"
8
+ />
3
9
  <m-flex class="pb-projects-list__title-container" direction="column">
4
- <m-flex justify-content="space-between" wrap full-width>
10
+ <m-flex justify-content="space-between" align-items="center" wrap full-width>
5
11
  <m-heading :label="title" size="s" underline-color="primary-01" />
6
12
  <m-button
7
13
  class="pb-projects-list__hero-button"
@@ -182,6 +188,7 @@ import MButton from '../../../components/mozaic/buttons/MButton.vue';
182
188
  import MContainer from '../../../components/mozaic/grid/MContainer.vue';
183
189
  import MFlex from './../../../components/mozaic/flex/MFlex.vue';
184
190
  import MFlexy from '../../../components/mozaic/grid/MFlexy.vue';
191
+ import MLink from './../../../components/mozaic/link/MLink.vue';
185
192
  import MFlexyCol from '../../../components/mozaic/grid/MFlexyCol.vue';
186
193
  import MHeading from '../../../components/mozaic/heading/MHeading.vue';
187
194
  import MIcon from '../../../components/mozaic/icon/MIcon.vue';
@@ -190,6 +197,9 @@ import PbAnimableLoader from '../../../components/loader/PbAnimableLoader.vue';
190
197
  import PbCard from '../../../components/cards/PbCard.vue';
191
198
  import { Project } from '@/types/pb/Project';
192
199
 
200
+ const BACK_ICON =
201
+ 'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
202
+
193
203
  const PLUS_ICON =
194
204
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Control_More_32px.svg';
195
205
  const PROJECT_ICON =
@@ -210,6 +220,7 @@ export default defineComponent({
210
220
  MNotification,
211
221
  PbAnimableLoader,
212
222
  PbCard,
223
+ MLink,
213
224
  },
214
225
 
215
226
  props: {
@@ -234,6 +245,13 @@ export default defineComponent({
234
245
  type: Boolean,
235
246
  default: true,
236
247
  },
248
+ /**
249
+ * Link label
250
+ */
251
+ linkLabel: {
252
+ type: String,
253
+ default: 'Retour',
254
+ },
237
255
  },
238
256
 
239
257
  data: () => ({
@@ -243,6 +261,7 @@ export default defineComponent({
243
261
  showProjectDialog: false,
244
262
  window,
245
263
  showMoreButtonAnimationDelay: 0,
264
+ BACK_ICON,
246
265
  }),
247
266
 
248
267
  computed: {
@@ -353,6 +372,15 @@ $responsive-breakpoint: 'm';
353
372
  padding-right: 0;
354
373
  }
355
374
 
375
+ &__back-button {
376
+ justify-content: flex-start;
377
+ margin-top: $mu200;
378
+
379
+ @include set-from-screen($responsive-breakpoint) {
380
+ margin-top: 0;
381
+ }
382
+ }
383
+
356
384
  &--fade {
357
385
  &-enter-active {
358
386
  transition: opacity 0.3s;
@@ -17,10 +17,19 @@
17
17
  {{ payload.viewModel.label }}
18
18
  </div>
19
19
 
20
- <div class="pb-warning-message__container--background">
20
+ <div class="pb-warning-message__head" v-if="payload.viewModel.headBlock">
21
+ <div class="pb-warning-message__head__image">
22
+ <img :src="payload.viewModel.headBlock.image" alt="Icon" />
23
+ </div>
24
+ <div class="pb-warning-message__head__text">
25
+ <p>{{ payload.viewModel.headBlock.text }}</p>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="pb-warning-message__container--background" v-if="payload">
21
30
  <m-flex class="pb-warning-message__container__message">
22
31
  <div class="pb-warning-message__container__message__left">
23
- <img :data-src="injectIcon(WARNING_ICON)" id="pb-warning-message-icon" alt="Icon" />
32
+ <img :data-src="injectIcon()" id="pb-warning-message-icon" alt="Icon" />
24
33
  </div>
25
34
  <div class="pb-warning-message__container__message__right">
26
35
  <h3>{{ payload.viewModel.subtitle }}</h3>
@@ -100,6 +109,7 @@ import { ScenarioStepAnswer } from '@/types/pb/Scenario';
100
109
  import SVGInjector from 'svg-injector';
101
110
  import { WarningMessagePayloadAction } from '@/types/pb/WarningMessage';
102
111
  import { DialogContent } from './dialogContent';
112
+ import { string } from 'yup';
103
113
  const BACK_ICON =
104
114
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
105
115
  const WARNING_ICON =
@@ -151,21 +161,31 @@ export default defineComponent({
151
161
  type: Object as PropType<Map<string, ScenarioStepAnswer[]>>,
152
162
  default: () => new Map<string, ScenarioStepAnswer[]>(),
153
163
  },
164
+ /**
165
+ * Component icon
166
+ */
167
+ icon: {
168
+ type: string,
169
+ default: () => WARNING_ICON,
170
+ },
154
171
  },
155
172
  methods: {
156
- injectIcon(icon: string) {
173
+ injectIcon() {
157
174
  this.$nextTick(() => {
158
- const element = document.getElementById('pb-warning-message-icon');
175
+ const element = document.querySelector('#pb-warning-message-icon');
159
176
  if (element) {
160
177
  SVGInjector(element, {
161
178
  each: function (svg) {
162
- (svg as any).setAttribute('fill', '#C65200');
179
+ if (svg) {
180
+ console.log(svg);
181
+ (svg as any).setAttribute('fill', '#C65200');
182
+ }
163
183
  },
164
184
  });
165
185
  }
166
186
  });
167
187
 
168
- return icon;
188
+ return this.icon;
169
189
  },
170
190
  callAction(action: WarningMessagePayloadAction) {
171
191
  if (action.type === 'STEP') {
@@ -280,6 +300,23 @@ $responsive-breakpoint: 'm';
280
300
  padding: 0 0 $mu250 0;
281
301
  }
282
302
 
303
+ &__head {
304
+ &__image {
305
+ width: 240px;
306
+
307
+ img {
308
+ height: auto;
309
+ width: 100%;
310
+ }
311
+ }
312
+
313
+ &__text {
314
+ @include set-font-face('semi-bold');
315
+ @include set-font-scale('05', 's');
316
+ text-align: center;
317
+ }
318
+ }
319
+
283
320
  &__container__message__right {
284
321
  h3 {
285
322
  @include set-font-face('semi-bold');
@@ -13,6 +13,10 @@
13
13
  "contentHtml": "Mon contenu de modal ici"
14
14
  }
15
15
  }
16
+ },
17
+ "headBlock": {
18
+ "image": "https://storage.googleapis.com/project-booster-media/new-house/Estimation%20Construction%20Neuve%20-%20Localisation.png",
19
+ "text": "Isolation des combles perdus"
16
20
  }
17
21
  },
18
22
  "callToActions": [