project-booster-vue 9.30.1 → 9.31.2

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.30.1",
3
+ "version": "9.31.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -12,6 +12,7 @@
12
12
  <div class="pb-media__header-upload-button" v-if="(!isLoadingMedia || mediaList.length > 0) && !mediaLoadError">
13
13
  <pb-media-upload
14
14
  v-if="!readOnly"
15
+ :store-module-name="storeModuleName"
15
16
  :payload="uploadPayload"
16
17
  @media-uploaded="handleMediaUploaded"
17
18
  ref="pbMediaUpload"
@@ -37,12 +38,13 @@
37
38
  subtitle-error="Voulez-vous relancer le chargement des photos"
38
39
  retry-button-label="Réessayer"
39
40
  :state="mediaLoadError ? 'error' : 'loading'"
40
- @loader-click="$store.dispatch('documents/loadMedia', $route.params.projectId)"
41
+ @loader-click="$store.dispatch(storeModuleName + '/loadMedia')"
41
42
  />
42
43
  </m-flex>
43
44
  <pb-media-list
44
45
  v-else
45
46
  ref="pbMediaList"
47
+ :store-module-name="storeModuleName"
46
48
  :media-list="mediaList"
47
49
  :has-still-media="hasStillMedia"
48
50
  :is-loading-media="isLoadingMedia"
@@ -51,7 +53,7 @@
51
53
  :read-only="readOnly"
52
54
  @add-media="addMedia"
53
55
  @click-on-delete="handleClickOnDelete"
54
- @click-load-more="$store.dispatch('documents/loadMoreMedia')"
56
+ @click-load-more="$store.dispatch(storeModuleName + '/loadMoreMedia')"
55
57
  />
56
58
  </m-flex>
57
59
  <m-notification
@@ -124,7 +126,7 @@
124
126
  } » n'a pas pu être supprimée.`"
125
127
  closable
126
128
  :link-label="mediaDeletionError ? 'Réessayer' : null"
127
- @link-click="$store.dispatch('documents/deleteMedia', currentMedia)"
129
+ @link-click="$store.dispatch(storeModuleName + '/deleteMedia', currentMedia)"
128
130
  @close="resetMediaDeletionError"
129
131
  />
130
132
  <pb-sticky-footer
@@ -135,6 +137,7 @@
135
137
  <pb-media-upload
136
138
  ref="pbMediaUploadSticky"
137
139
  class="pb-media__sticky-upload-button-content"
140
+ :store-module-name="storeModuleName"
138
141
  :payload="uploadPayload"
139
142
  @media-uploaded="handleMediaUploaded"
140
143
  :read-only="readOnly"
@@ -189,6 +192,13 @@ export default defineComponent({
189
192
  type: String,
190
193
  default: 'Mes documents',
191
194
  },
195
+ /**
196
+ * The store module name
197
+ */
198
+ storeModuleName: {
199
+ type: String,
200
+ default: 'documents',
201
+ },
192
202
  /**
193
203
  * The detail component payload
194
204
  */
@@ -234,16 +244,16 @@ export default defineComponent({
234
244
  const isDeletingMedia = ref(false);
235
245
  const isMediaDeletionSuccess = ref(false);
236
246
 
237
- const isLoadingMedia = computed(() => store.getters['documents/isLoadingMedia']);
238
- const hasStillMedia = computed(() => store.getters['documents/hasStillMedia']);
239
- const mediaList = computed(() => store.getters['documents/getMediaList']);
240
- const mediaLoadError = computed(() => store.getters['documents/getMediaLoadError']);
241
- const isAddPhotoDisabled = computed(() => store.getters['documents/isAddPhotoDisabled']);
242
- const currentMedia = computed(() => store.getters['documents/getCurrentMedia']);
247
+ const isLoadingMedia = computed(() => store.getters[props.storeModuleName + '/isLoadingMedia']);
248
+ const hasStillMedia = computed(() => store.getters[props.storeModuleName + '/hasStillMedia']);
249
+ const mediaList = computed(() => store.getters[props.storeModuleName + '/getMediaList']);
250
+ const mediaLoadError = computed(() => store.getters[props.storeModuleName + '/getMediaLoadError']);
251
+ const isAddPhotoDisabled = computed(() => store.getters[props.storeModuleName + '/isAddPhotoDisabled']);
252
+ const currentMedia = computed(() => store.getters[props.storeModuleName + '/getCurrentMedia']);
243
253
  const project = computed(() => store.getters['projects/getProject']);
244
254
 
245
255
  const handleMediaUploaded = () => {
246
- store.dispatch('documents/refreshMediaList');
256
+ store.dispatch(props.storeModuleName + '/refreshMediaList');
247
257
  };
248
258
  const handleClickOnDelete = (media: Media) => {
249
259
  mediaToDelete.value = media;
@@ -269,10 +279,10 @@ export default defineComponent({
269
279
  mediaDeletionError.value = null;
270
280
  isDeletingMedia.value = true;
271
281
  try {
272
- await store.dispatch('documents/deleteMedia', mediaToDelete.value);
282
+ await store.dispatch(props.storeModuleName + '/deleteMedia', mediaToDelete.value);
273
283
  isMediaDeletionSuccess.value = true;
274
284
  if (currentMedia.value && currentMedia.value.id === mediaToDelete.value?.id) {
275
- store.dispatch('documents/updateCurrentMedia', null);
285
+ store.dispatch(props.storeModuleName + '/updateCurrentMedia', null);
276
286
  }
277
287
  setTimeout(() => {
278
288
  isMediaDeletionSuccess.value = false;
@@ -16,7 +16,10 @@
16
16
  <pb-media-loader class="hidden-on-mobile" />
17
17
  </m-flex>
18
18
  <div class="pb-media-detail__image" :style="`background-image: url(${mediaUrl});`" />
19
- <div v-if="media.fileType && media.fileType === 'PDF'" class="pb-media-detail__image-download">
19
+ <div
20
+ v-if="storeModuleName === 'documents' && media.fileType && media.fileType === 'PDF'"
21
+ class="pb-media-detail__image-download"
22
+ >
20
23
  <m-button
21
24
  label="Visualiser le PDF"
22
25
  right-icon="https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Display_ExternalLink_24px.svg"
@@ -222,6 +225,13 @@ export default defineComponent({
222
225
  type: Object,
223
226
  default: null,
224
227
  },
228
+ /**
229
+ * The store module name to contextualize the store.
230
+ */
231
+ storeModuleName: {
232
+ type: String,
233
+ default: 'documents',
234
+ },
225
235
  /**
226
236
  * Indicates whether the UI is read only
227
237
  */
@@ -275,18 +285,22 @@ export default defineComponent({
275
285
  }
276
286
  return error;
277
287
  },
288
+ storePrefix() {
289
+ return this.storeModuleName ? this.storeModuleName + '/' : '';
290
+ },
278
291
  mediaUrl() {
279
292
  let mediaUrl;
280
293
  // If document, check if pdf or image
281
294
  if (this.media?.fileType === 'PDF') {
282
- mediaUrl = this.$store.getters['documents/getThumbnailUrl'].replace('@@PB_MEDIA_ID_FILLER@@', this.media.id);
283
- } else {
284
- mediaUrl = this.$store.getters['documents/getMediaUrl'].replace('@@PB_MEDIA_ID_FILLER@@', this.media.id);
295
+ mediaUrl = this.$store.getters[this.storePrefix + 'getThumbnailUrl'].replace(
296
+ '@@PB_MEDIA_ID_FILLER@@',
297
+ this.media.id,
298
+ );
285
299
  }
286
300
  return mediaUrl;
287
301
  },
288
302
  pdfUrl() {
289
- return this.$store.getters['documents/getMediaUrl'].replace('@@PB_MEDIA_ID_FILLER@@', this.media.id);
303
+ return this.$store.getters[this.storePrefix + 'getMediaUrl'].replace('@@PB_MEDIA_ID_FILLER@@', this.media.id);
290
304
  },
291
305
  },
292
306
 
@@ -411,7 +425,7 @@ export default defineComponent({
411
425
  this.mediaNameSaveError = false;
412
426
  this.isMediaNameSaved = false;
413
427
  try {
414
- await this.$store.dispatch('documents/updateMediaName', { id: this.media.id, name: this.mediaName });
428
+ await this.$store.dispatch(this.storePrefix + 'updateMediaName', { id: this.media.id, name: this.mediaName });
415
429
  this.$emit('media-name-updated', this.mediaName);
416
430
  this.isMediaNameSaved = true;
417
431
  } catch (err: any) {
@@ -67,6 +67,7 @@
67
67
  </m-flex>
68
68
  <pb-media-detail
69
69
  v-if="currentMedia"
70
+ :store-module-name="storeModuleName"
70
71
  :payload="detailPayload"
71
72
  :media="currentMedia"
72
73
  :read-only="readOnly"
@@ -118,6 +119,13 @@ export default defineComponent({
118
119
  type: Array,
119
120
  default: () => [],
120
121
  },
122
+ /**
123
+ * The store module name to contextualize the store.
124
+ */
125
+ storeModuleName: {
126
+ type: String,
127
+ default: 'documents',
128
+ },
121
129
  /**
122
130
  * Indicates wheteher pagination controllers are active.
123
131
  */
@@ -162,14 +170,17 @@ export default defineComponent({
162
170
  }),
163
171
 
164
172
  computed: {
173
+ storePrefix() {
174
+ return this.storeModuleName ? this.storeModuleName + '/' : '';
175
+ },
165
176
  thumbnailUrl() {
166
- return this.$store.getters['documents/getThumbnailUrl'];
177
+ return this.$store.getters[this.storePrefix + 'getThumbnailUrl'];
167
178
  },
168
179
  addedMediaNumber() {
169
- return this.$store.getters['documents/getAddedMediaNumber'];
180
+ return this.$store.getters[this.storePrefix + 'getAddedMediaNumber'];
170
181
  },
171
182
  currentMedia() {
172
- return this.$store.getters['documents/getCurrentMedia'];
183
+ return this.$store.getters[this.storePrefix + 'getCurrentMedia'];
173
184
  },
174
185
  },
175
186
 
@@ -198,7 +209,7 @@ export default defineComponent({
198
209
 
199
210
  handleClickOnClose() {
200
211
  this.$store.dispatch('sendEventToBus', { code: 'mediaDetailExit', payload: {} });
201
- this.$store.dispatch('documents/updateCurrentMedia', null);
212
+ this.$store.dispatch(this.storePrefix + 'updateCurrentMedia', null);
202
213
  this.$router.back();
203
214
  },
204
215
 
@@ -238,6 +238,13 @@ export default defineComponent({
238
238
  type: String,
239
239
  default: 'image/jpeg, image/png, image/heif, image/heic, image/heif-sequence, image/heic-sequence',
240
240
  },
241
+ /**
242
+ * The store module name to contextualize the store.
243
+ */
244
+ storeModuleName: {
245
+ type: String,
246
+ default: 'documents',
247
+ },
241
248
  /**
242
249
  * Defines the payload
243
250
  */
@@ -269,32 +276,36 @@ export default defineComponent({
269
276
  },
270
277
 
271
278
  computed: {
279
+ storePrefix() {
280
+ return this.storeModuleName ? this.storeModuleName + '/' : '';
281
+ },
282
+
272
283
  isAddPhotoDisabled() {
273
- return this.$store.getters['documents/isAddPhotoDisabled'];
284
+ return this.$store.getters[this.storePrefix + 'isAddPhotoDisabled'];
274
285
  },
275
286
 
276
287
  isMediaUploaded() {
277
- return this.$store.getters['documents/isUploaded'];
288
+ return this.$store.getters[this.storePrefix + 'isUploaded'];
278
289
  },
279
290
 
280
291
  isMediaUploading() {
281
- return this.$store.getters['documents/isUploading'];
292
+ return this.$store.getters[this.storePrefix + 'isUploading'];
282
293
  },
283
294
 
284
295
  mediaUploadError() {
285
- return this.$store.getters['documents/getUploadError'];
296
+ return this.$store.getters[this.storePrefix + 'getUploadError'];
286
297
  },
287
298
 
288
299
  uploadedMediaId() {
289
- return this.$store.getters['documents/getUploadedId'];
300
+ return this.$store.getters[this.storePrefix + 'getUploadedId'];
290
301
  },
291
302
 
292
303
  isNameAlreadyUsed() {
293
- return this.$store.getters['documents/isNameAlreadyUsed'];
304
+ return this.$store.getters[this.storePrefix + 'isNameAlreadyUsed'];
294
305
  },
295
306
 
296
307
  uploadProgress() {
297
- return this.$store.getters['documents/getUploadProgress'];
308
+ return this.$store.getters[this.storePrefix + 'getUploadProgress'];
298
309
  },
299
310
 
300
311
  nameSaveError() {
@@ -349,7 +360,7 @@ export default defineComponent({
349
360
  }
350
361
  },
351
362
  fileName() {
352
- this.$store.dispatch('documents/nameChanged');
363
+ this.$store.dispatch(this.storePrefix + 'nameChanged');
353
364
  },
354
365
  },
355
366
 
@@ -391,7 +402,7 @@ export default defineComponent({
391
402
  this.isRoomPicture = false;
392
403
  this.selectedType = null;
393
404
  this.$refs?.pbMediaUploadForm?.reset();
394
- this.$store.dispatch('documents/resetMediaUploadContext');
405
+ this.$store.dispatch(this.storePrefix + 'resetMediaUploadContext');
395
406
  },
396
407
 
397
408
  async upload() {
@@ -399,7 +410,7 @@ export default defineComponent({
399
410
  if (this.selectedType === null) {
400
411
  this.selectedType = this.payload.viewModel.dialog.defaultMediaType;
401
412
  }
402
- await this.$store.dispatch('documents/uploadFile', {
413
+ await this.$store.dispatch(this.storePrefix + 'uploadFile', {
403
414
  formData: this.formData,
404
415
  fileName: this.fileName,
405
416
  isRoomPicture: this.isRoomPicture,
@@ -421,7 +432,7 @@ export default defineComponent({
421
432
  async fileChange(event: Event) {
422
433
  const fieldName: string = (event.target as HTMLInputElement).name;
423
434
  const filesList = (event.target as HTMLInputElement).files;
424
- this.$store.dispatch('documents/generateCorrelationId');
435
+ this.$store.dispatch(this.storePrefix + 'generateCorrelationId');
425
436
  this.formData = new FormData();
426
437
 
427
438
  if (!filesList?.length) {
@@ -433,7 +444,7 @@ export default defineComponent({
433
444
  if (file['type'].split('/')[0] === 'image') {
434
445
  const validationData = await this.validateMedia(file);
435
446
  this.$store.dispatch('sendEventToBus', { code: 'documentUploadValidation', payload: validationData });
436
- this.$store.dispatch('documents/validateFileData', validationData);
447
+ this.$store.dispatch(this.storePrefix + 'validateFileData', validationData);
437
448
  this.validationErrors = validationData.validation;
438
449
  this.updateMediaPreviewUrl(file);
439
450
  } else {
@@ -444,7 +455,7 @@ export default defineComponent({
444
455
  this.mediaPreviewUrl = PDF_IMAGE;
445
456
  this.displayAddDialog = true;
446
457
  }
447
- this.$store.dispatch('documents/sendEvent', {
458
+ this.$store.dispatch(this.storePrefix + 'sendEvent', {
448
459
  eventName: 'qualify-by-the-front',
449
460
  file: file,
450
461
  } as MediaEventOptions);
@@ -15,17 +15,6 @@
15
15
  }
16
16
  },
17
17
  "cards": [
18
- {
19
- "code": "CARD-1",
20
- "viewModel": {
21
- "url": "https://www.leroymerlin.fr/produits/cuisine/cuisine-equipee-delinia-id/",
22
- "image": "https://media.leroymerlin.fr/Capture/37/bc/a121f7e74212ad2d356fd3cf2c8a/estimer-mon-budget-cuisine5e5d20ae063b330009a4a372.jpg?width=500&auto=webp&crop=16:9",
23
- "title": "Estimer votre budget cuisine en quelques clics",
24
- "width": "full",
25
- "widthFromM": "1of3",
26
- "widthFromL": "1of3"
27
- }
28
- },
29
18
  {
30
19
  "code": "CARD-2",
31
20
  "viewModel": {
@@ -129,6 +129,7 @@
129
129
  </pb-sticky-footer>
130
130
  <pb-media-upload
131
131
  :payload="payload.viewModel.mediaPayload"
132
+ :store-module-name="storeModuleName"
132
133
  @display-dialog="handleDisplayDialogEvent"
133
134
  @media-uploaded="handleMediaUploaded"
134
135
  ref="pbMediaUpload"
@@ -237,6 +238,7 @@ export default defineComponent({
237
238
 
238
239
  setup(props, { emit }) {
239
240
  const store = useStore();
241
+ let storeModuleName = ref(props.payload.viewModel.mediaPayload.viewModel.type);
240
242
 
241
243
  const pbMediaUpload = ref<ComponentCustomProperties>();
242
244
 
@@ -247,12 +249,12 @@ export default defineComponent({
247
249
  const pageSize = ref(8);
248
250
  const showMoreAnimation = ref('');
249
251
  const showMoreButtonDisplayed = computed(
250
- () => store.getters['documents/hasStillMedia'] && props.payload.viewModel.showMore,
252
+ () => store.getters[storeModuleName.value + '/hasStillMedia'] && props.payload.viewModel.showMore,
251
253
  );
252
- const selectedDocuments = computed(() => store.getters['documents/getMediaList']);
253
- const thumbnailUrl = computed(() => store.getters['documents/getThumbnailUrl']);
254
+ const selectedDocuments = computed(() => store.getters[storeModuleName.value + '/getMediaList']);
255
+ const thumbnailUrl = computed(() => store.getters[storeModuleName.value + '/getThumbnailUrl']);
254
256
  onMounted(() => {
255
- store.dispatch('documents/sendEvent', { eventName: 'start', file: null });
257
+ store.dispatch(storeModuleName.value + '/sendEvent', { eventName: 'start', file: null });
256
258
  if (props.payload.viewModel.startOpened) {
257
259
  pbMediaUpload.value?.$refs.pbMediaUploadFormInput.click();
258
260
  }
@@ -295,12 +297,12 @@ export default defineComponent({
295
297
  };
296
298
 
297
299
  const handleMediaUploaded = () => {
298
- store.dispatch('documents/refreshMediaList');
300
+ store.dispatch(storeModuleName.value + '/refreshMediaList');
299
301
  };
300
302
 
301
303
  const handleShowMoreClick = () => {
302
- store.dispatch('documents/updateMediaPerPageCount', 4);
303
- store.dispatch('documents/loadMoreMedia');
304
+ store.dispatch(storeModuleName.value + '/updateMediaPerPageCount', 4);
305
+ store.dispatch(storeModuleName.value + '/loadMoreMedia');
304
306
  showMoreAnimation.value = 'pb-upload-document__answers-animation';
305
307
  };
306
308
 
@@ -309,6 +311,7 @@ export default defineComponent({
309
311
  BACK_ICON,
310
312
  INFO_ICON,
311
313
  pbMediaUpload,
314
+ storeModuleName,
312
315
  lastItemIndex,
313
316
  pageSize,
314
317
  showMoreAnimation,
@@ -4,6 +4,7 @@ import cloneDeep from 'lodash.clonedeep';
4
4
  import PbWarningMessage from './PbWarningMessage';
5
5
  import DEFAULT_PAYLOAD from './default-payload.json';
6
6
  import WITHOUT_EXPLAIN_LINK from './without-explain-link.json';
7
+ import WITH_MODAL from './with-modal.json';
7
8
 
8
9
  <Meta
9
10
  title="Project Booster/Components/Warning Message/PbWarningMessage 🦠"
@@ -57,3 +58,11 @@ export const TemplateSandbox = (args, { argTypes }) => ({
57
58
  {TemplateSandbox.bind({})}
58
59
  </Story>
59
60
  </Canvas>
61
+
62
+ # `PbWarningMessage` - With Modal
63
+
64
+ <Canvas>
65
+ <Story name="With Modal" args={{ payload: WITH_MODAL }}>
66
+ {TemplateSandbox.bind({})}
67
+ </Story>
68
+ </Canvas>
@@ -26,7 +26,16 @@
26
26
  <h3>{{ payload.viewModel.subtitle }}</h3>
27
27
  <p>{{ payload.viewModel.content }}</p>
28
28
  <div class="pb-warning-message__container__message__right__link" v-if="payload.viewModel.explainLink">
29
- <a :href="payload.viewModel.explainLink.href">{{ payload.viewModel.explainLink.label }}</a>
29
+ <a
30
+ v-if="payload.viewModel.explainLink.action"
31
+ href="#"
32
+ @click.prevent="handleHelpDialog(payload.viewModel.explainLink.action.viewModelDialog)"
33
+ >
34
+ {{ payload.viewModel.explainLink.label }}
35
+ </a>
36
+ <a v-else :href="payload.viewModel.explainLink.href">
37
+ {{ payload.viewModel.explainLink.label }}
38
+ </a>
30
39
  </div>
31
40
  </div>
32
41
  </m-flex>
@@ -53,18 +62,44 @@
53
62
  />
54
63
  </m-flex>
55
64
  </div>
65
+
66
+ <m-dialog
67
+ class="pb-warning-message__dialog-help"
68
+ :show-dialog="displayDialogHelp"
69
+ width="771px"
70
+ height="492px"
71
+ maxHeight="100vh"
72
+ @update:show-dialog="handleHelpDialog"
73
+ v-if="dialogHelpContent"
74
+ >
75
+ <template #header>
76
+ <div class="pb-warning-message__dialog-help__title">
77
+ <h2>{{ dialogHelpContent.headerTitle }}</h2>
78
+ </div>
79
+ </template>
80
+ <template #body>
81
+ <div class="pb-warning-message__dialog-help__body" v-html="dialogHelpContent.contentHtml"></div>
82
+ </template>
83
+ <template v-slot:footer>
84
+ <m-flex class="pb-question__dialog-help__footer" align-items="center" justify-content="center">
85
+ <m-button label="Fermer" theme="bordered-neutral" @click.prevent="handleHelpDialog"></m-button>
86
+ </m-flex>
87
+ </template>
88
+ </m-dialog>
56
89
  </m-flex>
57
90
  </template>
58
91
 
59
92
  <script lang="ts">
60
- import { defineComponent, PropType } from 'vue';
93
+ import { defineComponent, PropType, ref } from 'vue';
61
94
  import { v4 as uuidv4 } from 'uuid';
62
95
  import MFlex from './../mozaic/flex/MFlex.vue';
63
96
  import MLink from '../mozaic/link/MLink.vue';
64
97
  import MButton from '../mozaic/buttons/MButton.vue';
98
+ import MDialog from '../mozaic/dialog/MDialog.vue';
65
99
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
66
100
  import SVGInjector from 'svg-injector';
67
101
  import { WarningMessagePayloadAction } from '@/types/pb/WarningMessage';
102
+ import { DialogContent } from './dialogContent';
68
103
  const BACK_ICON =
69
104
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
70
105
  const WARNING_ICON =
@@ -76,6 +111,7 @@ export default defineComponent({
76
111
  MFlex,
77
112
  MLink,
78
113
  MButton,
114
+ MDialog,
79
115
  },
80
116
  props: {
81
117
  /**
@@ -146,6 +182,13 @@ export default defineComponent({
146
182
  },
147
183
  setup(props, { emit }) {
148
184
  const componentId = uuidv4();
185
+ const displayDialogHelp = ref(false);
186
+ const dialogHelpContent = ref();
187
+
188
+ const handleHelpDialog = (content: DialogContent) => {
189
+ displayDialogHelp.value = !displayDialogHelp.value;
190
+ dialogHelpContent.value = content;
191
+ };
149
192
 
150
193
  const skipQuestion = () => {
151
194
  /**
@@ -168,6 +211,9 @@ export default defineComponent({
168
211
  skipQuestion,
169
212
  BACK_ICON,
170
213
  WARNING_ICON,
214
+ displayDialogHelp,
215
+ handleHelpDialog,
216
+ dialogHelpContent,
171
217
  };
172
218
  },
173
219
  });
@@ -184,7 +230,13 @@ $responsive-breakpoint: 'm';
184
230
  @include set-font-face('regular');
185
231
  flex-grow: 1;
186
232
  margin: 0 auto;
187
- width: calc(100% - #{$mu050} - #{$mu050});
233
+ padding: 0 $mu100;
234
+ width: calc(100% - #{$mu100} - #{$mu100});
235
+
236
+ @include set-from-screen($responsive-breakpoint) {
237
+ width: calc(100% - #{$mu200} - #{$mu200});
238
+ }
239
+
188
240
  &__back-button-container {
189
241
  align-self: flex-start;
190
242
  }
@@ -251,7 +303,9 @@ $responsive-breakpoint: 'm';
251
303
  }
252
304
 
253
305
  &__container {
254
- width: 511px;
306
+ @include set-from-screen($responsive-breakpoint) {
307
+ width: 511px;
308
+ }
255
309
  }
256
310
 
257
311
  &__container__message__left {
@@ -274,7 +328,10 @@ $responsive-breakpoint: 'm';
274
328
 
275
329
  &__container--button {
276
330
  margin: $mu250 auto 0 auto;
277
- width: 311px;
331
+
332
+ @include set-from-screen($responsive-breakpoint) {
333
+ width: 311px;
334
+ }
278
335
 
279
336
  &__ok {
280
337
  margin-bottom: $mu100;
@@ -282,3 +339,28 @@ $responsive-breakpoint: 'm';
282
339
  }
283
340
  }
284
341
  </style>
342
+
343
+ <style lang="scss">
344
+ @import 'pb-variables';
345
+
346
+ .pb-warning-message {
347
+ &__dialog-help {
348
+ &__title {
349
+ padding: $mu250 $mu250 0 $mu250;
350
+ }
351
+
352
+ &__body {
353
+ padding: 0 $mu250;
354
+ @include set-font-scale('05', 'l');
355
+ &__image {
356
+ background-size: cover;
357
+ padding: 120px 0;
358
+ }
359
+ }
360
+
361
+ &__footer {
362
+ padding: $mu100 $mu250 $mu250 $mu250;
363
+ }
364
+ }
365
+ }
366
+ </style>
@@ -0,0 +1,4 @@
1
+ export interface DialogContent {
2
+ headerTitle: string;
3
+ contentHtml: string;
4
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "viewModel": {
3
+ "backLabel": "Question précédente",
4
+ "label": "Vos travaux dans un appartement",
5
+ "subtitle": "Nous attirons votre attention !",
6
+ "content": "La pose d’une pompe à chaleur n’est pas adaptée a un appartement. Nous n’avons pas d’offre pour les appartements aujourd’hui..",
7
+ "explainLink": {
8
+ "type": "link",
9
+ "label": "Comment faire des travaux de rénovation énergétique en tant que locataire ?",
10
+ "action": {
11
+ "viewModelDialog": {
12
+ "headerTitle": "Votre travaux dans un appartement",
13
+ "contentHtml": "Mon contenu de modal ici"
14
+ }
15
+ }
16
+ }
17
+ },
18
+ "callToActions": [
19
+ {
20
+ "type": "button",
21
+ "label": "Ok, poursuivre l'estimation",
22
+ "action": {
23
+ "type": "STEP",
24
+ "code": "__END__"
25
+ },
26
+ "bordered": false
27
+ },
28
+ {
29
+ "type": "button",
30
+ "label": "Changer de le type de propriété",
31
+ "action": {
32
+ "type": "STEP",
33
+ "code": "__BACK__"
34
+ },
35
+ "bordered": true
36
+ }
37
+ ]
38
+ }