project-booster-vue 9.44.10 → 9.44.12
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/cards/PbCard.vue +2 -2
- package/src/components/mozaic/dialog/MDialog.vue +33 -31
- package/src/components/mozaic/dialog/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-mozaic-components-m-dialog-/342/232/233/357/270/217-showcase-hide-overlay-1-snap.png +0 -0
- package/src/components/progression-price/PbProgressionPrice.vue +1 -3
- package/src/components/question/space-input/PbSpaceInput.vue +21 -2
package/package.json
CHANGED
|
@@ -335,12 +335,12 @@ export default defineComponent({
|
|
|
335
335
|
this.$emit('link-click');
|
|
336
336
|
},
|
|
337
337
|
handleCardClick() {
|
|
338
|
-
this.cardLink ? window.open(this.cardLink, '
|
|
338
|
+
this.cardLink ? window.open(this.cardLink, '_self') : '';
|
|
339
339
|
!this.buttonLabel && !this.linkLabel ? this.$emit('card-click') : '';
|
|
340
340
|
},
|
|
341
341
|
handleButtonLinkClicked(href: string) {
|
|
342
342
|
this.handleButtonClicked();
|
|
343
|
-
window.open(href, '
|
|
343
|
+
window.open(href, '_self');
|
|
344
344
|
},
|
|
345
345
|
handleButtonClicked() {
|
|
346
346
|
/**
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<m-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<transition name="m-dialog__slide-bottom">
|
|
4
|
+
<m-flex
|
|
5
|
+
v-if="showDialog"
|
|
6
|
+
class="m-dialog__container"
|
|
7
|
+
align-items="center"
|
|
8
|
+
justify-content="center"
|
|
9
|
+
:aria-hidden="showDialog"
|
|
10
|
+
:style="`height: ${componentHeight};`"
|
|
11
|
+
>
|
|
12
|
+
<div class="m-dialog__container m-dialog__container--overlay" @click.prevent="hide()"></div>
|
|
13
|
+
<m-flex class="m-dialog" direction="column" :style="dialogStyle">
|
|
14
|
+
<div class="m-dialog__header" :class="{ 'm-dialog__header--padding-right': !hideCross }">
|
|
15
|
+
<!-- @slot Dialog header slot -->
|
|
16
|
+
<slot name="header" />
|
|
17
|
+
</div>
|
|
18
|
+
<div class="m-dialog__body-top" :style="`opacity: ${bodyShadowTopOpacity}`" />
|
|
19
|
+
<div ref="pbDialogBody" class="m-dialog__body" @scroll="handleScroll">
|
|
20
|
+
<!-- @slot Dialog body slot -->
|
|
21
|
+
<slot name="body" />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="m-dialog__body-bottom" :style="`opacity: ${bodyShadowBottomOpacity}`" />
|
|
24
|
+
<div class="m-dialog__footer">
|
|
25
|
+
<!-- @slot Dialog footer slot -->
|
|
26
|
+
<slot name="footer" />
|
|
27
|
+
</div>
|
|
28
|
+
<div v-if="!hideCross" class="m-dialog__close" @click="hide()">
|
|
29
|
+
<m-icon :icon="CROSS_ICON" size="m" color="grey-500" />
|
|
30
|
+
</div>
|
|
31
|
+
</m-flex>
|
|
30
32
|
</m-flex>
|
|
31
|
-
</
|
|
32
|
-
</
|
|
33
|
+
</transition>
|
|
34
|
+
</div>
|
|
33
35
|
</template>
|
|
34
36
|
|
|
35
37
|
<script lang="ts">
|
|
@@ -248,6 +250,7 @@ $responsive-breakpoint: 'm';
|
|
|
248
250
|
max-height: 100%;
|
|
249
251
|
overflow: hidden;
|
|
250
252
|
position: relative;
|
|
253
|
+
z-index: 999;
|
|
251
254
|
|
|
252
255
|
@include set-from-screen('m') {
|
|
253
256
|
max-height: 50vh;
|
|
@@ -278,7 +281,6 @@ $responsive-breakpoint: 'm';
|
|
|
278
281
|
right: 0;
|
|
279
282
|
top: 0;
|
|
280
283
|
width: 100vw;
|
|
281
|
-
z-index: 100;
|
|
282
284
|
}
|
|
283
285
|
|
|
284
286
|
&__container--overlay {
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
<div class="pb-progression-block__title">
|
|
5
5
|
{{ title }}
|
|
6
6
|
</div>
|
|
7
|
-
<div v-if="subtitle" class="pb-progression-block__subtitle">
|
|
8
|
-
{{ subtitle }}
|
|
9
|
-
</div>
|
|
7
|
+
<div v-if="subtitle" class="pb-progression-block__subtitle" v-html="subtitle"></div>
|
|
10
8
|
<m-flex class="pb-progression-block__price" align-items="baseline" justify-content="center" wrap>
|
|
11
9
|
<div class="pb-progression-block__price-min">{{ roundDecadeDown(lowerPrice) }}</div>
|
|
12
10
|
<div class="pb-progression-block__price-separator">{{ separatorLabel || 'et' }}</div>
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
width="full"
|
|
90
90
|
size="l"
|
|
91
91
|
@click="handleFormSubmit"
|
|
92
|
+
:disabled="disabledNextStep"
|
|
92
93
|
/>
|
|
93
94
|
<m-link
|
|
94
95
|
v-if="payload.skippable"
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
</template>
|
|
131
132
|
|
|
132
133
|
<script lang="ts">
|
|
133
|
-
import { defineComponent, computed, onMounted, PropType, ref, ComputedRef } from 'vue';
|
|
134
|
+
import { defineComponent, computed, onMounted, PropType, ref, ComputedRef, watch } from 'vue';
|
|
134
135
|
import { v4 as uuidv4 } from 'uuid';
|
|
135
136
|
import { useForm } from 'vee-validate';
|
|
136
137
|
import * as yup from 'yup';
|
|
@@ -147,6 +148,7 @@ import DEFAULT_PAYLOAD from './default-payload.json';
|
|
|
147
148
|
import { SpaceInputPayload } from '@/components/question/space-input/SpaceInput';
|
|
148
149
|
import { ScenarioStepAnswer } from '@/types/pb/Scenario';
|
|
149
150
|
import { decorate } from '@/services/decorate';
|
|
151
|
+
import { id } from 'date-fns/locale';
|
|
150
152
|
|
|
151
153
|
const BACK_ICON =
|
|
152
154
|
'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
|
|
@@ -247,8 +249,9 @@ export default defineComponent({
|
|
|
247
249
|
const pbSpaceInputTextInput = ref<HTMLElement>();
|
|
248
250
|
const showModal = ref(false);
|
|
249
251
|
const contentModal = ref({});
|
|
252
|
+
const disabledNextStep = ref(true);
|
|
250
253
|
|
|
251
|
-
const space = computeDefaultValue(props.runtimeOptions, props.answers!, computedPayload);
|
|
254
|
+
const space = ref(computeDefaultValue(props.runtimeOptions, props.answers!, computedPayload));
|
|
252
255
|
|
|
253
256
|
const handleShowModal = ({ headerTitle, htmlContent }: { headerTitle: string; htmlContent: string }) => {
|
|
254
257
|
showModal.value = !showModal.value;
|
|
@@ -260,6 +263,21 @@ export default defineComponent({
|
|
|
260
263
|
|
|
261
264
|
const validationSchema = initValidation(componentId, computedPayload);
|
|
262
265
|
|
|
266
|
+
const disabledButton = (value: any) => {
|
|
267
|
+
const validation = computedPayload.value.viewModel.validation;
|
|
268
|
+
if (value && parseInt(value) >= validation.minValue && parseInt(value) <= validation.maxValue) {
|
|
269
|
+
disabledNextStep.value = false;
|
|
270
|
+
} else {
|
|
271
|
+
disabledNextStep.value = true;
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
disabledButton(space.value);
|
|
276
|
+
|
|
277
|
+
watch(space, async (newValue) => {
|
|
278
|
+
disabledButton(newValue);
|
|
279
|
+
});
|
|
280
|
+
|
|
263
281
|
const { handleSubmit } = useForm({ validationSchema: validationSchema.value });
|
|
264
282
|
const handleFormSubmit = handleSubmit((values) => {
|
|
265
283
|
const elementId = `text-input-${componentId}` as string;
|
|
@@ -314,6 +332,7 @@ export default defineComponent({
|
|
|
314
332
|
showModal,
|
|
315
333
|
handleShowModal,
|
|
316
334
|
contentModal,
|
|
335
|
+
disabledNextStep,
|
|
317
336
|
};
|
|
318
337
|
},
|
|
319
338
|
});
|