project-booster-vue 10.22.2 → 10.22.4

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": "10.22.2",
3
+ "version": "10.22.4",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -111,6 +111,10 @@ export const answerGettersMappers: Map<string, (param: any) => void> = new Map<s
111
111
  MPbProducts: ({ product }: { product: object }) => {
112
112
  return { product };
113
113
  },
114
+ MPbDimensionsInput: ({ width, length }: { width: string; length: string }): { width: number; length: number } => {
115
+ return { width: parseFloat(width), length: parseFloat(length) };
116
+ },
117
+ MPbListSelect: ({ value }: { value: string }): string => value,
114
118
  }),
115
119
  );
116
120
 
@@ -21,7 +21,11 @@
21
21
  <div class="m-pb-navigation__right column-full">
22
22
  <m-button
23
23
  :label="nextButtonLabel"
24
- @click.prevent="emitClickEvent(payload?.viewModel?.nextStep || payload?.nextStep)"
24
+ @click.prevent="
25
+ emitClickEvent(
26
+ payload?.viewModel?.nextStep || payload?.nextStep || payload?.multiSelect?.actions?.VALIDATE?.nextStep,
27
+ )
28
+ "
25
29
  icon="ArrowNext48"
26
30
  iconPosition="right"
27
31
  :data-cerberus="sanitizeCerberusAttribut('MPB-NAVIGATION', nextButtonLabel)"
@@ -154,40 +154,44 @@
154
154
  </div>
155
155
  </div>
156
156
 
157
- <m-notification class="pb-question__notifications" :type="notification.type" v-if="notification">
158
- <template #default>
159
- <strong style="font-size: 16px; line-height: 20px">{{ notification.title }}</strong>
160
- <p
161
- style="font-size: 16px; line-height: 20px; margin-bottom: 0"
162
- v-if="notification.content"
163
- v-html="notification.content"
164
- ></p>
165
- <m-link
166
- style="margin-top: 15px"
167
- v-if="notification?.modal"
168
- :label="notification?.modal.title"
169
- @click.prevent="displayNotificationDialog = true"
170
- ></m-link>
171
- </template>
172
- </m-notification>
173
- <div class="pb-question__redirect-link" v-if="!!notification?.buttonText">
174
- <m-button
175
- width="full"
176
- width-from-xxl="full"
177
- width-from-l="full"
178
- :href="notification.buttonHref"
179
- v-if="notification.buttonHref"
180
- :label="notification.buttonText"
181
- />
182
- <m-button
183
- width="full"
184
- width-from-xxl="full"
185
- width-from-l="full"
186
- v-else-if="notification?.buttonStep"
187
- @click.prevent="callAction(notification?.buttonStep, [], $emit)"
188
- :label="notification.buttonText"
189
- />
190
- </div>
157
+ <template
158
+ v-if="notification && areConditionsValid(notification.conditions || [], props.answers, props.runtimeOptions)"
159
+ >
160
+ <m-notification class="pb-question__notifications" :type="notification.type">
161
+ <template #default>
162
+ <strong style="font-size: 16px; line-height: 20px">{{ notification.title }}</strong>
163
+ <p
164
+ style="font-size: 16px; line-height: 20px; margin-bottom: 0"
165
+ v-if="notification.content"
166
+ v-html="notification.content"
167
+ ></p>
168
+ <m-link
169
+ style="margin-top: 15px"
170
+ v-if="notification?.modal"
171
+ :label="notification?.modal.title"
172
+ @click.prevent="displayNotificationDialog = true"
173
+ ></m-link>
174
+ </template>
175
+ </m-notification>
176
+ <div class="pb-question__redirect-link" v-if="!!notification?.buttonText">
177
+ <m-button
178
+ width="full"
179
+ width-from-xxl="full"
180
+ width-from-l="full"
181
+ :href="notification.buttonHref"
182
+ v-if="notification.buttonHref"
183
+ :label="notification.buttonText"
184
+ />
185
+ <m-button
186
+ width="full"
187
+ width-from-xxl="full"
188
+ width-from-l="full"
189
+ v-else-if="notification?.buttonStep"
190
+ @click.prevent="callAction(notification?.buttonStep, [], $emit)"
191
+ :label="notification.buttonText"
192
+ />
193
+ </div>
194
+ </template>
191
195
  <div class="pb-question__redirect-link" v-if="payload.redirectLink">
192
196
  <m-button
193
197
  width="full"
@@ -7,6 +7,11 @@
7
7
  "answersComponent": "MPbCard",
8
8
  "widthFromM": "1of2",
9
9
  "widthFromL": "1of2",
10
+ "notification": {
11
+ "type": "info",
12
+ "content": "orem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet tincidunt libero.",
13
+ "conditions": ["true"]
14
+ },
10
15
  "videoBlock": {
11
16
  "buttonLabel": "Voir le guide en vidéo (1min)",
12
17
  "icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg",
@@ -90,7 +90,7 @@
90
90
  :stepLocation="stepLocation"
91
91
  :trackingStatus="true"
92
92
  @go-back="$emit('go-back')"
93
- @next-step="validMultiSelect(payload?.multiSelect?.actions?.VALIDATE)"
93
+ @next-step="validMultiSelect"
94
94
  :step-number="stepNumber"
95
95
  />
96
96
 
@@ -131,6 +131,7 @@ export interface ScenarioStepAnswerNotification {
131
131
  htmlContent: string;
132
132
  link: string;
133
133
  };
134
+ conditions?: string[];
134
135
  }
135
136
 
136
137
  export interface ScenarioStepAnswers {