project-booster-vue 9.44.9 → 9.44.11
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 +1 -0
- package/src/components/progression-price/PbProgressionPrice.vue +1 -3
- package/src/components/projects/project-item-save/PbProjectItemSaveProjectName.vue +2 -3
- package/src/components/question/space-input/PbSpaceInput.vue +15 -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
|
/**
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
justify-content="center"
|
|
9
9
|
:aria-hidden="showDialog"
|
|
10
10
|
:style="`height: ${componentHeight};`"
|
|
11
|
+
@click.prevent="hide()"
|
|
11
12
|
>
|
|
12
13
|
<m-flex class="m-dialog" direction="column" :style="dialogStyle">
|
|
13
14
|
<div class="m-dialog__header" :class="{ 'm-dialog__header--padding-right': !hideCross }">
|
|
@@ -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>
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
import { defineComponent, computed } from 'vue';
|
|
47
47
|
import MFlex from '../../mozaic/flex/MFlex.vue';
|
|
48
48
|
import MTag from '../../mozaic/tag/MTag.vue';
|
|
49
|
-
import MTextInput from '../../mozaic/text-input/MTextInput.vue';
|
|
50
49
|
import PbAnimableLoader from '../../loader/PbAnimableLoader.vue';
|
|
51
50
|
import { useStore } from 'vuex';
|
|
52
51
|
import { v4 as uuidv4 } from 'uuid';
|
|
@@ -56,7 +55,7 @@ import { useField, useForm } from 'vee-validate';
|
|
|
56
55
|
export default defineComponent({
|
|
57
56
|
name: 'PbProjectItemSaveProjectName',
|
|
58
57
|
|
|
59
|
-
components: { PbAnimableLoader,
|
|
58
|
+
components: { PbAnimableLoader, MTag, MFlex },
|
|
60
59
|
|
|
61
60
|
props: {
|
|
62
61
|
/**
|
|
@@ -114,8 +113,8 @@ export default defineComponent({
|
|
|
114
113
|
setFieldValue('tag-input-' + componentId, currentTypology.value !== typologyCode ? typologyCode : undefined);
|
|
115
114
|
|
|
116
115
|
setTimeout(() => {
|
|
117
|
-
emitInputEvent(typologyCode);
|
|
118
116
|
defineDefaultProjectName(typologyName);
|
|
117
|
+
emitInputEvent(typologyCode);
|
|
119
118
|
currentTypology.value = typologyCode;
|
|
120
119
|
});
|
|
121
120
|
};
|
|
@@ -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,15 @@ export default defineComponent({
|
|
|
260
263
|
|
|
261
264
|
const validationSchema = initValidation(componentId, computedPayload);
|
|
262
265
|
|
|
266
|
+
watch(space, async (newValue) => {
|
|
267
|
+
const validation = computedPayload.value.viewModel.validation;
|
|
268
|
+
if (newValue && parseInt(newValue) >= validation.minValue && parseInt(newValue) <= validation.maxValue) {
|
|
269
|
+
disabledNextStep.value = false;
|
|
270
|
+
} else {
|
|
271
|
+
disabledNextStep.value = true;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
|
|
263
275
|
const { handleSubmit } = useForm({ validationSchema: validationSchema.value });
|
|
264
276
|
const handleFormSubmit = handleSubmit((values) => {
|
|
265
277
|
const elementId = `text-input-${componentId}` as string;
|
|
@@ -314,6 +326,7 @@ export default defineComponent({
|
|
|
314
326
|
showModal,
|
|
315
327
|
handleShowModal,
|
|
316
328
|
contentModal,
|
|
329
|
+
disabledNextStep,
|
|
317
330
|
};
|
|
318
331
|
},
|
|
319
332
|
});
|