project-booster-vue 9.19.2 → 9.19.5

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.19.2",
3
+ "version": "9.19.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -100,19 +100,18 @@ export const answerGettersMappers: Map<string, (param: any) => void> = new Map<s
100
100
  }),
101
101
  );
102
102
 
103
- function adaptAnswers(answers: Record<string, ScenarioStepAnswer[]>, scenario: Scenario) {
103
+ function adaptAnswers(answers: Map<string, ScenarioStepAnswer[]>, scenario: Record<string, any>) {
104
104
  let adaptedAnswers: ScenarioAnswer[] = [];
105
105
 
106
106
  if (answers) {
107
- adaptedAnswers = Object.entries(answers)
108
- .filter(([code]) => !['PbRestitution'].includes(scenario?.get(code)?.component ?? ''))
109
- .filter(([code]) => code !== 'SUBPROJECT_FORM_ID')
110
- .map(([questionId, answerData]) => ({
111
- questionId,
112
- answers: answerData.map(
113
- answerGettersMappers.get(scenario?.get(questionId)?.component ?? '') ?? (() => undefined),
114
- ),
115
- }));
107
+ answers.forEach((value: ScenarioStepAnswer[], key: string) => {
108
+ if (!['PbRestitution'].includes(scenario[key]?.component ?? '') && key !== 'SUBPROJECT_FORM_ID') {
109
+ adaptedAnswers.push({
110
+ questionId: key,
111
+ answers: value.map(answerGettersMappers.get(scenario[key]?.component ?? '') ?? (() => undefined)),
112
+ });
113
+ }
114
+ });
116
115
  }
117
116
 
118
117
  return adaptedAnswers;
@@ -55,7 +55,6 @@ import { useForm } from 'vee-validate';
55
55
  import * as yup from 'yup';
56
56
  import cloneDeep from 'lodash.clonedeep';
57
57
  import merge from 'lodash.merge';
58
- import objectPath from 'object-path';
59
58
  import MFlex from './../../mozaic/flex/MFlex.vue';
60
59
  import MButton from './../../mozaic/buttons/MButton.vue';
61
60
  import MIcon from './../../mozaic/icon/MIcon.vue';
@@ -98,7 +98,6 @@ import MTextInput from './../../mozaic/text-input/MTextInput.vue';
98
98
  import DEFAULT_PAYLOAD from './default-payload.json';
99
99
  import MLink from '../../mozaic/link/MLink.vue';
100
100
  import MIcon from '../../mozaic/icon/MIcon.vue';
101
- import objectPath from 'object-path';
102
101
  import { ref } from 'vue';
103
102
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
104
103
  import { DimensionsInputPayload } from '@/components/question/dimensions-input/DimensionsInput';
@@ -156,13 +155,13 @@ const computeDefaultValue = (
156
155
  answers,
157
156
  runtimeOptions,
158
157
  computedPayload?.value?.value?.length,
159
- computedPayload?.value?.defaultDecoratorValue,
158
+ computedPayload?.value?.defaultDecoratorValue ?? '',
160
159
  );
161
160
  width.value = decorate(
162
161
  answers,
163
162
  runtimeOptions,
164
163
  computedPayload?.value?.value?.width,
165
- computedPayload?.value?.defaultDecoratorValue,
164
+ computedPayload?.value?.defaultDecoratorValue ?? '',
166
165
  );
167
166
  }
168
167
 
@@ -243,8 +242,8 @@ export default defineComponent({
243
242
  emit(props.completedEventName, {
244
243
  answers: [
245
244
  {
246
- width: values[elementLengthId],
247
- length: values[elementWidthId],
245
+ length: values[elementLengthId],
246
+ width: values[elementWidthId],
248
247
  },
249
248
  ],
250
249
  });
@@ -160,7 +160,7 @@ export const overridenLabelsPayload = {
160
160
  buttonLabelConnect: 'Se connecter',
161
161
  buttonLabelCreateAccount: 'Créer un compte',
162
162
  forceRedirect: false,
163
- link: '/espace-perso/espace-projets.html?hash=/projects/new',
163
+ link: '/espace-perso/espace-projets.html',
164
164
  },
165
165
  };
166
166
 
@@ -52,7 +52,6 @@ import { useForm } from 'vee-validate';
52
52
  import * as yup from 'yup';
53
53
  import cloneDeep from 'lodash.clonedeep';
54
54
  import merge from 'lodash.merge';
55
- import objectPath from 'object-path';
56
55
  import MFlex from '../../mozaic/flex/MFlex.vue';
57
56
  import MButton from '../../mozaic/buttons/MButton.vue';
58
57
  import MLink from '../../mozaic/link/MLink.vue';
@@ -99,13 +98,13 @@ const computeDefaultValue = (
99
98
  answers,
100
99
  runtimeOptions,
101
100
  computedPayload?.value?.value?.projectName,
102
- computedPayload?.value?.defaultDecoratorValue,
101
+ computedPayload?.value?.defaultDecoratorValue ?? '',
103
102
  );
104
103
  optin.value = decorate(
105
104
  answers,
106
105
  runtimeOptions,
107
106
  computedPayload?.value?.value?.optin,
108
- computedPayload?.value?.defaultDecoratorValue,
107
+ computedPayload?.value?.defaultDecoratorValue ?? '',
109
108
  );
110
109
  }
111
110
 
@@ -129,7 +129,7 @@ export const valuePayload = {
129
129
  <Source language="json" code={JSON.stringify(valuePayload, null, ' ')} />
130
130
 
131
131
  The `getAnswerValue` function allows to retrieve a value from one provided answer. To retrieve a value, the first
132
- parameter is the answer Id, the second is an optionnal path to extract a spcific value.
132
+ parameter is the answer Id, the second is an optional path to extract a specific value.
133
133
 
134
134
  A `defaultDecoratorValue` value can be added as a fallback when no previous answer is found. When no default value is provided and no answer
135
135
  is found, the component value will be empty :
@@ -87,7 +87,6 @@ import { useForm } from 'vee-validate';
87
87
  import * as yup from 'yup';
88
88
  import cloneDeep from 'lodash.clonedeep';
89
89
  import merge from 'lodash.merge';
90
- import objectPath from 'object-path';
91
90
  import MFlex from '../../mozaic/flex/MFlex.vue';
92
91
  import MButton from '../../mozaic/buttons/MButton.vue';
93
92
  import MLink from '../../mozaic/link/MLink.vue';
@@ -130,7 +129,7 @@ const computeDefaultValue = (
130
129
  answers,
131
130
  runtimeOptions,
132
131
  computedPayload?.value?.value?.space,
133
- computedPayload?.value?.defaultDecoratorValue,
132
+ computedPayload?.value?.defaultDecoratorValue ?? '',
134
133
  );
135
134
  }
136
135
  return space;
@@ -537,14 +537,17 @@
537
537
  "payload": {
538
538
  "viewModel": {
539
539
  "label": "${answers.LMFR_QUESTION_PLAN[0].code === 'HAVE_PLAN' ? 'Sur votre plan, vérifiez que vous avez les bonnes mesures :' : 'Réalisez rapidement un plan avec les mesures de votre pièce en 3 étapes'}",
540
- "subtitle": "${answers.LMFR_QUESTION_PLAN[0].code === 'HAVE_PLAN' ? 'Votre conseiller aura besoin de ces mesures pour créer votre plan de cuisine en 3D.' : 'Sur une feuille, dessinez la pièce et reportez les bonnes mesures, prenez une photo du plan et ajoutez la.'}",
541
540
  "widthFromL": "1of3",
542
541
  "forceOneCardPerLineOnMobile": true,
543
542
  "answersComponent": "PbCard",
543
+ "videoBlock": {
544
+ "buttonLabel": "Voir le guide en vidéo (1min)",
545
+ "icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg",
546
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/Qualif-RDV-Plan-Video.png"
547
+ },
544
548
  "video": {
545
549
  "src": "https://players.brightcove.net/2812541250001/SkgXKciHDZ_default/index.html?videoId=6270735637001&autoplay=play",
546
550
  "theme": "bordered",
547
- "label": "Voir le guide en vidéo",
548
551
  "icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg"
549
552
  }
550
553
  },
@@ -663,26 +666,10 @@
663
666
  "errorUploadTitle": "Une erreur est survenue lors de l'envoi de votre plan ",
664
667
  "uploadPreviewTitle": "Nom de plan ",
665
668
  "mediaTypeTitle": "De quel type de plan s’agit il ?",
666
- "mediaTypes": [
667
- {
668
- "type": "PLAN",
669
- "subtype": "HAND_DRAWN_PLAN",
670
- "code": "HAND_DRAWN_PLAN",
671
- "label": "Un plan fait moi-même"
672
- },
673
- {
674
- "type": "PLAN",
675
- "subtype": "ARCHITECT_PLAN",
676
- "code": "ARCHITECT_PLAN",
677
- "label": "Un plan d’architecte"
678
- },
679
- {
680
- "type": "PLAN",
681
- "subtype": "KITCHEN_DESIGNER_PLAN",
682
- "code": "KITCHEN_DESIGNER_PLAN",
683
- "label": "Un plan d’un autre cuisiniste"
684
- }
685
- ]
669
+ "defaultMediaType": {
670
+ "type": "PLAN",
671
+ "subtype": "ANY"
672
+ }
686
673
  }
687
674
  }
688
675
  }
@@ -804,21 +791,24 @@
804
791
  "viewModel": {
805
792
  "title": "Ex : Une photo avec du recul",
806
793
  "text": "Pour une bonne vue d’ensemble",
807
- "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-overview.jpg"
794
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-overview.jpg",
795
+ "flattened": true
808
796
  }
809
797
  },
810
798
  "2": {
811
799
  "viewModel": {
812
800
  "title": "Ex : Les contraintes particulières",
813
801
  "text": "A prendre en compte pour le plan",
814
- "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-constraints.jpg"
802
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-constraints.jpg",
803
+ "flattened": true
815
804
  }
816
805
  },
817
806
  "3": {
818
807
  "viewModel": {
819
808
  "title": "Ex : Les ouvertures sur d’autres pièces",
820
809
  "text": "Un salon, séjour, salle à manger...",
821
- "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-opening.jpg"
810
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-opening.jpg",
811
+ "flattened": true
822
812
  }
823
813
  }
824
814
  }
@@ -830,7 +820,6 @@
830
820
  "component": "PbUploadDocument",
831
821
  "payload": {
832
822
  "viewModel": {
833
- "startOpened": true,
834
823
  "label": "Les photos de votre cuisine",
835
824
  "addTitle": "Ajouter une photo",
836
825
  "addText": " ",
@@ -1021,7 +1010,7 @@
1021
1010
  "payload": {
1022
1011
  "code": "__END__",
1023
1012
  "viewModel": {
1024
- "title": "À présent, trouvons un créneau ensemble !",
1013
+ "title": "Les informations de votre projet ont été mises à jour",
1025
1014
  "icon": "https://storage.googleapis.com/project-booster-media/vad/fin-de-parcours/check_80.svg",
1026
1015
  "description": [
1027
1016
  {
@@ -66,6 +66,11 @@ export interface ScenarioStepAnswer {
66
66
  meta?: {
67
67
  order: number;
68
68
  stringSort: string;
69
+ ProjectTypeLabel?: string;
70
+ domesticSpace?: string;
71
+ projectType?: string;
72
+ ranking?: number;
73
+ projectKind?: string;
69
74
  };
70
75
  }
71
76