project-booster-vue 10.7.13 → 10.8.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/README.md CHANGED
@@ -6,6 +6,33 @@ It is based on the [mozaic design system](https://mozaic.appspot.com/).
6
6
 
7
7
  Visit the [project-booster-vue storybook](https://adeo.github.io/project-booster-vue/) to discover available components.
8
8
 
9
+ ## Maintainers
10
+
11
+ Team: project-booster@adeo.com
12
+
13
+ #### Product Owners
14
+
15
+ - ~~Sébastien Martinage~~
16
+ - ~~Adrien Stadler~~
17
+ - ~~Narjisse Loulanti~~
18
+ - Ekaterina Kelekhsaeva: ekaterina.kelekhsaeva1@ext.adeo.com
19
+
20
+ #### Developers
21
+
22
+ - ~~Ndongo Wade~~
23
+ - ~~Rémi Even~~
24
+ - ~~Fabien Saulier~~
25
+ - ~~Nicolas Inchauspé~~
26
+ - ~~Tony Proum~~
27
+ - ~~Nicolas Beaussart~~
28
+ - ~~Faten Ghandour~~
29
+ - ~~Clément Buchart~~
30
+ - ~~Mickaël Margollé~~
31
+ - ~~Jean-Baptiste Renault~~
32
+ - Anthony Pillot: anthony.pillot@ext.leroymerlin.fr
33
+ - Maxime Drecourt: maxime.drecourt@ext.adeo.com
34
+ - Yassine Bourakba: yassine.bourakba@ext.adeo.com
35
+
9
36
  ## Get started
10
37
 
11
38
  ### Install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "10.7.13",
3
+ "version": "10.8.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -31,7 +31,7 @@
31
31
  />
32
32
  <pb-card
33
33
  v-else
34
- class="pb-configurations-list__card"
34
+ class="pb-configurations-list__card js-cdl"
35
35
  :flag-label="configuration.type"
36
36
  :hero="configuration.label"
37
37
  :flattened="readOnly"
@@ -43,6 +43,10 @@
43
43
  :text="`Réalisée le ${formatDate(configuration.creationDate)}`"
44
44
  :selected="configuration.selected"
45
45
  @click="emitConfigurationClickEvent(configuration)"
46
+ data-cdl-click-type="cdl_event"
47
+ :data-cdl-click-data="
48
+ formatEvent({ button_name: configuration.label, button_location: stepLocation }, EventTypeEnum.BUTTON)
49
+ "
46
50
  />
47
51
  </div>
48
52
  </m-flexy-col>
@@ -81,6 +85,7 @@ import PbAnimableLoader from '../../loader/PbAnimableLoader.vue';
81
85
  import PbCard from '../../cards/PbCard.vue';
82
86
  import { format } from 'date-fns';
83
87
  import Velocity from 'velocity-animate';
88
+ import { EventTypeEnum, formatEvent } from '../../rework/services/event';
84
89
 
85
90
  export const CONFIGURATION_ANIMATION_DURATION = 50;
86
91
 
@@ -134,10 +139,18 @@ export default defineComponent({
134
139
  type: Boolean,
135
140
  default: false,
136
141
  },
142
+ /**
143
+ * Step location
144
+ */
145
+ stepLocation: {
146
+ type: String,
147
+ default: '',
148
+ },
137
149
  },
138
150
 
139
151
  data: () => ({
140
152
  showMoreButtonAnimationDelay: 0,
153
+ EventTypeEnum,
141
154
  }),
142
155
 
143
156
  methods: {
@@ -196,6 +209,7 @@ export default defineComponent({
196
209
  */
197
210
  this.$emit('refresh-configuration', configuration);
198
211
  },
212
+ formatEvent,
199
213
  },
200
214
  });
201
215
  </script>
@@ -216,13 +216,20 @@
216
216
  <m-button
217
217
  label="Précédent"
218
218
  theme="bordered-neutral"
219
- class="pb-question__actions-buttons-button"
219
+ class="pb-question__actions-buttons-button js-cdl"
220
220
  size="m"
221
221
  size-from-l="l"
222
222
  @click="$emit('go-back')"
223
223
  v-if="!payload.viewModel.hideBackButton"
224
224
  icon="ArrowBack48"
225
225
  :data-cerberus="sanitizeCerberusAttribut('MPB-QUESTION', 'Etape precedente')"
226
+ data-cdl-click-type="cdl_event"
227
+ :data-cdl-click-data="
228
+ formatEvent(
229
+ { button_name: 'Etape precedente', button_location: payload.viewModel.analytics.funnel_name },
230
+ EventTypeEnum.BUTTON,
231
+ )
232
+ "
226
233
  >
227
234
  </m-button>
228
235
  </div>
@@ -769,10 +776,14 @@ const nextStepHandler = () => {
769
776
  };
770
777
 
771
778
  const updateCdlValues = () => {
772
- const answers: any = [];
779
+ let answers: any = [];
773
780
 
774
781
  for (const answerCode in Object.fromEntries(selectedAnswers.value)) {
775
- answers.push(answerCode);
782
+ if (!answers.includes(answerCode)) {
783
+ answers.push(answerCode);
784
+ } else {
785
+ answers = answers.filter((item: any) => item !== answerCode);
786
+ }
776
787
  }
777
788
 
778
789
  eventData.value = formatEvent(
@@ -61,15 +61,32 @@
61
61
 
62
62
  <div class="pb-configurations-import__redirect-link" v-if="payload.viewModel.redirectLink">
63
63
  <m-link
64
+ class="js-cdl"
64
65
  :label="payload.viewModel.redirectLink.label"
65
66
  @click="callAction(payload.viewModel.redirectLink.nextStep)"
66
67
  theme="primary"
68
+ data-cdl-click-type="cdl_event"
69
+ :data-cdl-click-data="
70
+ formatEvent(
71
+ { button_name: payload.viewModel.redirectLink.label, button_location: stepLocation },
72
+ EventTypeEnum.BUTTON,
73
+ )
74
+ "
67
75
  ></m-link>
68
76
  </div>
69
77
 
70
78
  <div class="pb-configurations-import__buttons row-flex" v-if="payload.callToActions">
71
79
  <div class="pb-configurations-import__buttons__button" v-for="button in payload.callToActions">
72
- <m-button :label="button.label" @click="callAction(button.nextStep)" :theme="button.theme" />
80
+ <m-button
81
+ class="js-cdl"
82
+ :label="button.label"
83
+ @click="callAction(button.nextStep)"
84
+ :theme="button.theme"
85
+ data-cdl-click-type="cdl_event"
86
+ :data-cdl-click-data="
87
+ formatEvent({ button_name: button.label, button_location: stepLocation }, EventTypeEnum.BUTTON)
88
+ "
89
+ />
73
90
  </div>
74
91
  </div>
75
92
  </m-container>
@@ -123,6 +140,7 @@ import { ScenarioStepAnswer } from '@/types/pb/Scenario';
123
140
  import { Configuration } from '@/types/pb/Configuration';
124
141
  import { decorate } from '@/services/decorate';
125
142
  import { PayloadAction } from '../../types/genericPayload';
143
+ import { EventTypeEnum, formatEvent } from '../../services/event';
126
144
 
127
145
  const BACK_ICON =
128
146
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -192,6 +210,13 @@ export default defineComponent({
192
210
  type: String,
193
211
  default: '0px',
194
212
  },
213
+ /**
214
+ * Step location
215
+ */
216
+ stepLocation: {
217
+ type: String,
218
+ default: '',
219
+ },
195
220
  },
196
221
 
197
222
  setup(props, { emit }) {
@@ -280,6 +305,8 @@ export default defineComponent({
280
305
  configurationImportSuccess,
281
306
  configurationImportError,
282
307
  callAction,
308
+ EventTypeEnum,
309
+ formatEvent,
283
310
  };
284
311
  },
285
312
  });