project-booster-vue 10.22.1 → 10.22.3
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 +1 -1
- package/src/components/date-picker/MPbDatePicker.vue +16 -8
- package/src/components/projects/project-item-save/PbProjectItemSave.vue +4 -0
- package/src/components/rework/navigation/MPbNavigation.vue +5 -1
- package/src/components/rework/question/MPbQuestion.vue +38 -34
- package/src/components/rework/question/default-payload.json +5 -0
- package/src/types/pb/Scenario.ts +1 -0
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
3
4
|
import MLink from '../mozaic/link/MLink.vue';
|
|
4
5
|
import MButton from '../mozaic/buttons/MButton.vue';
|
|
5
6
|
|
|
@@ -7,17 +8,24 @@ const BACK_ICON =
|
|
|
7
8
|
'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
|
|
8
9
|
const props = defineProps(['payload']);
|
|
9
10
|
const emit = defineEmits(['go-back']);
|
|
10
|
-
const
|
|
11
|
+
const store = useStore();
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
moveDate.value = event.target.value;
|
|
14
|
-
}
|
|
13
|
+
const moveDate = ref(store.state.answers.moveDate);
|
|
15
14
|
|
|
16
|
-
function
|
|
15
|
+
function commitStep(moveDateValue) {
|
|
16
|
+
store.commit('setMoveDate', moveDateValue);
|
|
17
17
|
emit('step-completed', {
|
|
18
|
-
answers: [{ moveDate:
|
|
18
|
+
answers: [{ moveDate: moveDateValue }],
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
function handleSubmit() {
|
|
23
|
+
commitStep(moveDate.value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function skipQuestion() {
|
|
27
|
+
commitStep(null);
|
|
28
|
+
}
|
|
21
29
|
</script>
|
|
22
30
|
|
|
23
31
|
<template>
|
|
@@ -26,14 +34,14 @@ function handleSubmit() {
|
|
|
26
34
|
<div class="date-picker">
|
|
27
35
|
<span class="title">{{ props.payload.viewModel.title }}</span>
|
|
28
36
|
<span class="subtile">{{ props.payload.viewModel.subtitle }}</span>
|
|
29
|
-
<input type="date"
|
|
37
|
+
<input type="date" v-model="moveDate" class="mc-text-input mc-field__input input-text-date" />
|
|
30
38
|
<MButton
|
|
31
39
|
class="button"
|
|
32
40
|
:label="props.payload.viewModel.actionLabel"
|
|
33
41
|
@click="handleSubmit"
|
|
34
42
|
:disabled="!moveDate"
|
|
35
43
|
/>
|
|
36
|
-
<m-link class="skip-link" :label="props.payload.viewModel.skipLabel" @click.once="
|
|
44
|
+
<m-link class="skip-link" :label="props.payload.viewModel.skipLabel" @click.once="skipQuestion" />
|
|
37
45
|
</div>
|
|
38
46
|
</div>
|
|
39
47
|
</template>
|
|
@@ -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="
|
|
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
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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",
|