@designcrowd/library.brand-page 5.19.0 → 5.19.1-error-html2canvas-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/lib/src/{CreatedOnBrandCrowd-de-de-DsoA9hc-.js → CreatedOnBrandCrowd-de-de-CxCJU9cc.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BP6NEQ66.js → CreatedOnBrandCrowd-en-us-zDJCWP5n.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-D424uM1Z.js → CreatedOnBrandCrowd-es-es-DNna1Sh9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CJvuLTkB.js → CreatedOnBrandCrowd-fr-ca-C5XVf_hD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CJvuLTkB.js → CreatedOnBrandCrowd-fr-fr-C5XVf_hD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Cc9L314u.js → CreatedOnBrandCrowd-pt-br-9eUHV_M3.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Cc9L314u.js → CreatedOnBrandCrowd-pt-pt-9eUHV_M3.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CX-295FH.js → CreatedOnDcom-de-de-D9HMpK8Q.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-UFlORUgZ.js → CreatedOnDcom-en-us-BCTkchV5.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-D1tRpcq9.js → CreatedOnDcom-es-es-B0N7VoTp.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Dz_ry9uY.js → CreatedOnDcom-fr-ca-Gi4oz_Mm.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-8Ydu6b1T.js → CreatedOnDcom-fr-fr-DJI8eJo1.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-COwvw5k4.js → CreatedOnDcom-pt-br-YNWMAuQf.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-CB72-eaa.js → CreatedOnDcom-pt-pt-DCIIK3sy.js} +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
- package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
- package/lib/src/brand-page/constants/font.constants.d.ts +4 -4
- package/lib/src/brand-page/constants/font.constants.js +4 -4
- package/lib/src/brand-page/constants/misc.constants.d.ts +35 -0
- package/lib/src/brand-page/constants/misc.constants.js +51 -0
- package/lib/src/brand-page/models/content.model.d.ts +2 -0
- package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
- package/lib/src/brand-page/utils/content-padding.util.js +10 -0
- package/lib/src/brand-page/utils/index.d.ts +1 -0
- package/lib/src/brand-page/utils/index.js +1 -0
- package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-17.js +60 -0
- package/lib/src/brand-page/utils/migration.util.js +10 -0
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +14 -0
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +39 -0
- package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
- package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
- package/lib/src/brand-page-maker/models/content-settings.js +39 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
- package/lib/src/{bundled-translations-D1q3rSEz.js → bundled-translations-BUyt4scr.js} +9 -9
- package/lib/src/{bundled-translations.de-DE-BxqLLwbh.js → bundled-translations.de-DE-DEw_OVai.js} +1 -1
- package/lib/src/{bundled-translations.es-ES-uh249NlJ.js → bundled-translations.es-ES-CFKWmkgY.js} +17 -17
- package/lib/src/{bundled-translations.fr-CA-BEQmv2fX.js → bundled-translations.fr-CA-DCl5LJS4.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-BnNuCojH.js → bundled-translations.fr-FR-B5BjgllA.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-CJUOxVlq.js → bundled-translations.pt-BR-5PWpMPuM.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-Ds9cMEqK.js → bundled-translations.pt-PT-B9_wN0HR.js} +9 -9
- package/lib/src/bundles/bundled-translations.de-DE.json +2 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +2 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +2 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +2 -0
- package/lib/src/bundles/bundled-translations.json +2 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +2 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +2 -0
- package/lib/src/composables/useSnapshot.js +18 -18
- package/lib/src/css/library.brand-page-brandCrowd.min.css +141 -155
- package/lib/src/css/library.brand-page-brandPage.min.css +141 -155
- package/lib/src/css/library.brand-page-designCom.min.css +141 -155
- package/lib/src/css/library.brand-page-preview.min.css +141 -155
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-tHPi9EKk.js → lib-CaY174HB.js} +21159 -21017
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +14 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +14 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +14 -0
- package/lib/src/utils/minify-brand-page-metadata.js +11 -1
- package/package.json +1 -1
- package/src/brand-page/components/about-section/AboutSection.vue +10 -4
- package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
- package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
- package/src/brand-page/components/contact-form/ContactForm.vue +105 -104
- package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
- package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
- package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
- package/src/brand-page/components/map/Map.vue +5 -1
- package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
- package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
- package/src/brand-page/components/shop/Shop.vue +7 -2
- package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
- package/src/brand-page/components/testimonial-section/TestimonialSection.vue +120 -11
- package/src/brand-page/components/text/Text.vue +12 -5
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
- package/src/brand-page/components/video/Video.mixin.ts +5 -0
- package/src/brand-page/components/video/Video.vue +1 -1
- package/src/brand-page/constants/font.constants.ts +4 -4
- package/src/brand-page/constants/misc.constants.ts +58 -0
- package/src/brand-page/models/content.model.ts +2 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +6 -6
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +12 -12
- package/src/brand-page/utils/content-padding.util.test.ts +29 -0
- package/src/brand-page/utils/content-padding.util.ts +13 -0
- package/src/brand-page/utils/index.ts +1 -0
- package/src/brand-page/utils/migration/migration-17.ts +77 -0
- package/src/brand-page/utils/migration.util.test.ts +290 -0
- package/src/brand-page/utils/migration.util.ts +11 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +45 -0
- package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
- package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
- package/src/brand-page-maker/models/content-settings.ts +43 -2
- package/src/bundles/bundled-translations.de-DE.json +2 -0
- package/src/bundles/bundled-translations.es-ES.json +2 -0
- package/src/bundles/bundled-translations.fr-CA.json +2 -0
- package/src/bundles/bundled-translations.fr-FR.json +2 -0
- package/src/bundles/bundled-translations.json +2 -0
- package/src/bundles/bundled-translations.pt-BR.json +2 -0
- package/src/bundles/bundled-translations.pt-PT.json +2 -0
- package/src/composables/useSnapshot.ts +19 -22
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
- package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
- package/src/utils/minify-brand-page-metadata.ts +11 -1
- package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.d.ts +0 -97
- package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.js +0 -112
- package/src/brand-page/components/testimonial-section/TestimonialSection.mixin.ts +0 -132
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
<div
|
|
8
8
|
:class="{
|
|
9
9
|
'about-container': context.isBrandSite,
|
|
10
|
-
'about-container--padding
|
|
10
|
+
'about-container--padding': !isFullImage,
|
|
11
11
|
'mobile-about-container--padding': isFullImage,
|
|
12
12
|
}"
|
|
13
|
+
:style="contentPaddingStyle"
|
|
13
14
|
>
|
|
14
15
|
<Media
|
|
15
16
|
v-if="
|
|
@@ -103,7 +104,10 @@
|
|
|
103
104
|
import { computed } from 'vue';
|
|
104
105
|
import type { AboutSectionViewModel } from '@brand-page/view-models';
|
|
105
106
|
import type { BrandPageContext } from '@brand-page/models';
|
|
106
|
-
import {
|
|
107
|
+
import {
|
|
108
|
+
getRenderText,
|
|
109
|
+
contentPaddingStyle as toContentPaddingStyle,
|
|
110
|
+
} from '@brand-page/utils';
|
|
107
111
|
import { hasRTEContent } from '@brand-page-maker/utils';
|
|
108
112
|
import Media from '../media/Media.vue';
|
|
109
113
|
import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
@@ -123,6 +127,10 @@ const props = withDefaults(
|
|
|
123
127
|
},
|
|
124
128
|
);
|
|
125
129
|
|
|
130
|
+
const contentPaddingStyle = computed(() =>
|
|
131
|
+
toContentPaddingStyle(props.viewModel),
|
|
132
|
+
);
|
|
133
|
+
|
|
126
134
|
const isFullImage = computed(
|
|
127
135
|
() =>
|
|
128
136
|
props.viewModel.displayStyle === 'right-aligned-full-image' ||
|
|
@@ -201,7 +209,6 @@ const renderText = computed((): string => {
|
|
|
201
209
|
.device-wrapper--mobile .mobile-about-container--padding {
|
|
202
210
|
padding-left: var(--page-padding);
|
|
203
211
|
padding-right: var(--page-padding);
|
|
204
|
-
@apply tw-py-10;
|
|
205
212
|
}
|
|
206
213
|
.device-wrapper--mobile .text-grid-column {
|
|
207
214
|
@apply container-grid-columns;
|
|
@@ -275,7 +282,6 @@ const renderText = computed((): string => {
|
|
|
275
282
|
.mobile-about-container--padding {
|
|
276
283
|
padding-left: var(--page-padding);
|
|
277
284
|
padding-right: var(--page-padding);
|
|
278
|
-
@apply tw-py-10;
|
|
279
285
|
}
|
|
280
286
|
.about-container :deep(.container-image) {
|
|
281
287
|
aspect-ratio: 1/1;
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
viewModel.isBigImageType,
|
|
8
8
|
'c_banner--with-image-overlay tw-flex tw-flex-col': isDividedContent,
|
|
9
9
|
'tw-px-6': !isDividedContent,
|
|
10
|
-
'tw-py-8': !isDividedContent && !isStackedFullWidth,
|
|
11
10
|
}"
|
|
12
|
-
:style="viewModel.backgroundStyle"
|
|
11
|
+
:style="[viewModel.backgroundStyle, contentPaddingStyle]"
|
|
13
12
|
style="container-type: inline-size"
|
|
14
13
|
>
|
|
15
14
|
<Media
|
|
@@ -201,7 +200,7 @@
|
|
|
201
200
|
<div
|
|
202
201
|
class="!tw-text-center tw-flex tw-flex-col tw-gap-5"
|
|
203
202
|
:class="{
|
|
204
|
-
'tw-px-6
|
|
203
|
+
'tw-px-6': isDividedContent,
|
|
205
204
|
}"
|
|
206
205
|
>
|
|
207
206
|
<TextWrapper
|
|
@@ -332,7 +331,11 @@ import type {
|
|
|
332
331
|
} from '@brand-page/view-models';
|
|
333
332
|
import type { BrandPageContext } from '@brand-page/models';
|
|
334
333
|
import { hasValidButton } from '../../../utils/validator.util';
|
|
335
|
-
import {
|
|
334
|
+
import {
|
|
335
|
+
getRenderText,
|
|
336
|
+
escapeContentText,
|
|
337
|
+
contentPaddingStyle as toContentPaddingStyle,
|
|
338
|
+
} from '@brand-page/utils';
|
|
336
339
|
import { hasRTEContent } from '@brand-page-maker/utils';
|
|
337
340
|
import {
|
|
338
341
|
ALIGN_CENTERED,
|
|
@@ -490,6 +493,10 @@ const layout = computed<BannerLayoutConfig>(
|
|
|
490
493
|
() => BANNER_LAYOUTS[props.viewModel.displayStyle] ?? DEFAULT_LAYOUT,
|
|
491
494
|
);
|
|
492
495
|
|
|
496
|
+
const contentPaddingStyle = computed(() =>
|
|
497
|
+
toContentPaddingStyle(props.viewModel),
|
|
498
|
+
);
|
|
499
|
+
|
|
493
500
|
const displayAlignClass = computed(() => layout.value.alignClass);
|
|
494
501
|
const isHorizontalAligned = computed(() => !!layout.value.hasSideImage);
|
|
495
502
|
const isDividedContent = computed(() => layout.value.layout === 'divided');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section data-component="booking-section">
|
|
3
3
|
<div
|
|
4
|
-
class="tw-relative tw-px-6
|
|
5
|
-
:style="viewModel.backgroundStyle"
|
|
4
|
+
class="tw-relative tw-px-6"
|
|
5
|
+
:style="[viewModel.backgroundStyle, contentPaddingStyle]"
|
|
6
6
|
style="container-type: inline-size"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
@@ -45,7 +45,11 @@ import type {
|
|
|
45
45
|
ButtonViewModel,
|
|
46
46
|
} from '@brand-page/view-models';
|
|
47
47
|
import type { BrandPageContext } from '@brand-page/models';
|
|
48
|
-
import {
|
|
48
|
+
import {
|
|
49
|
+
getRenderText,
|
|
50
|
+
escapeContentText,
|
|
51
|
+
contentPaddingStyle as toContentPaddingStyle,
|
|
52
|
+
} from '@brand-page/utils';
|
|
49
53
|
import { hasRTEContent } from '@brand-page-maker/utils';
|
|
50
54
|
import { hasValidButton as shouldShowButtonUtil } from '../../../utils/validator.util';
|
|
51
55
|
import Button from '../button/Button.vue';
|
|
@@ -71,6 +75,10 @@ const props = defineProps({
|
|
|
71
75
|
},
|
|
72
76
|
});
|
|
73
77
|
|
|
78
|
+
const contentPaddingStyle = computed(() =>
|
|
79
|
+
toContentPaddingStyle(props.viewModel),
|
|
80
|
+
);
|
|
81
|
+
|
|
74
82
|
const renderText = computed((): string => {
|
|
75
83
|
if (!props.viewModel.description) {
|
|
76
84
|
return '';
|
|
@@ -25,7 +25,10 @@ import {
|
|
|
25
25
|
RECAPTCHA_ACTION_CONTACT_FORM,
|
|
26
26
|
TEXT_ONLY,
|
|
27
27
|
} from '../../constants';
|
|
28
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
getRenderText,
|
|
30
|
+
contentPaddingStyle as toContentPaddingStyle,
|
|
31
|
+
} from '@brand-page/utils';
|
|
29
32
|
import { hasRTEContent } from '@brand-page-maker/utils';
|
|
30
33
|
import { useReCaptcha } from '../../composables/recaptcha.composable';
|
|
31
34
|
|
|
@@ -97,6 +100,10 @@ export default defineComponent({
|
|
|
97
100
|
return buttonTextStyle;
|
|
98
101
|
},
|
|
99
102
|
|
|
103
|
+
contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
|
|
104
|
+
return toContentPaddingStyle(this.viewModel);
|
|
105
|
+
},
|
|
106
|
+
|
|
100
107
|
hasCard(): boolean {
|
|
101
108
|
return (
|
|
102
109
|
this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
|
|
@@ -109,11 +116,10 @@ export default defineComponent({
|
|
|
109
116
|
},
|
|
110
117
|
|
|
111
118
|
hasBgColor(): boolean {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
);
|
|
119
|
+
// Every brandSite layout applies the background colour on the section
|
|
120
|
+
// root (banner-style) so the padding control reveals it; for the image
|
|
121
|
+
// layouts it only shows in the padding bands around the image block.
|
|
122
|
+
return Boolean(this.viewModel.layoutStyle);
|
|
117
123
|
},
|
|
118
124
|
|
|
119
125
|
isCenteredLayout(): boolean {
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
<section data-component="contact-form">
|
|
3
3
|
<div
|
|
4
4
|
:class="{
|
|
5
|
-
'tw-flex': isCenteredLayout && !hasBgImage,
|
|
6
5
|
'tw-block': !viewModel.layoutStyle,
|
|
7
|
-
'tw-relative': hasBgImage,
|
|
6
|
+
'tw-relative tw-overflow-hidden': hasBgImage,
|
|
8
7
|
}"
|
|
9
|
-
:style="
|
|
8
|
+
:style="[
|
|
9
|
+
hasBgColor ? viewModel.backgroundStyle : {},
|
|
10
|
+
contentPaddingStyle,
|
|
11
|
+
]"
|
|
10
12
|
>
|
|
11
13
|
<Media
|
|
12
14
|
v-if="hasBgImage && isCenteredLayout"
|
|
@@ -108,110 +110,115 @@
|
|
|
108
110
|
</Collapsible>
|
|
109
111
|
<div
|
|
110
112
|
v-else-if="isCenteredLayout"
|
|
111
|
-
class="
|
|
112
|
-
:class="{
|
|
113
|
-
'tw-px-6 tw-py-8': hasCard,
|
|
114
|
-
'tw-py-6': !hasCard,
|
|
115
|
-
'tw-w-full': !hasBgImage,
|
|
116
|
-
}"
|
|
113
|
+
:class="{ 'tw-relative': hasBgImage, 'tw-flex': !hasBgImage }"
|
|
117
114
|
>
|
|
118
115
|
<div
|
|
119
|
-
|
|
120
|
-
class="
|
|
116
|
+
class="contact-container"
|
|
117
|
+
:class="{
|
|
118
|
+
'tw-px-6': hasCard,
|
|
119
|
+
'tw-py-8': hasBgImage,
|
|
120
|
+
'tw-w-full': !hasBgImage,
|
|
121
|
+
}"
|
|
121
122
|
>
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
value.field.required ? '*' : ''
|
|
152
|
-
}`"
|
|
153
|
-
:label="`${value.field.name}${value.field.required ? '*' : ''}`"
|
|
154
|
-
:show-label-screen-reader-only="true"
|
|
155
|
-
size="sm"
|
|
156
|
-
:error="!!value.error"
|
|
157
|
-
:type="getTextInputTypeByFieldType(value.field.type)"
|
|
158
|
-
class="tw-w-full"
|
|
159
|
-
@input="onValueChange(index)"
|
|
160
|
-
/>
|
|
161
|
-
<Textarea
|
|
162
|
-
v-if="value.field.type === 'text-area'"
|
|
163
|
-
v-model="value.value"
|
|
164
|
-
:placeholder="`${value.field.name}${
|
|
165
|
-
value.field.required ? '*' : ''
|
|
166
|
-
}`"
|
|
167
|
-
:label="`${value.field.name}${value.field.required ? '*' : ''}`"
|
|
168
|
-
:show-label-screen-reader-only="true"
|
|
169
|
-
size="sm"
|
|
170
|
-
:error="!!value.error"
|
|
171
|
-
:resize="false"
|
|
172
|
-
class="tw-w-full"
|
|
173
|
-
@input="onValueChange(index)"
|
|
174
|
-
/>
|
|
175
|
-
<p v-if="!!value.error" class="form-error">
|
|
176
|
-
{{ value.error }}
|
|
177
|
-
</p>
|
|
178
|
-
</div>
|
|
179
|
-
<div class="tw-flex tw-w-full tw-justify-center tw-col-span-2">
|
|
180
|
-
<button
|
|
181
|
-
v-if="isSubmitButtonVisible"
|
|
182
|
-
class="tw-block tw-border-0 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-fit hover:tw-cursor-pointer tw-px-8 tw-py-3 c-button-full"
|
|
183
|
-
:style="submitButtonStyle"
|
|
184
|
-
:class="{ 'tw-w-full': isMobileDevice }"
|
|
123
|
+
<div
|
|
124
|
+
:style="hasCard ? viewModel.cardStyle : {}"
|
|
125
|
+
class="tw-relative tw-block tw-px-6 tw-rounded-2xl"
|
|
126
|
+
:class="{ 'tw-py-8': hasCard }"
|
|
127
|
+
>
|
|
128
|
+
<form v-if="!hasSubmitted" @submit.prevent="submitContactForm">
|
|
129
|
+
<TextWrapper
|
|
130
|
+
v-if="viewModel.title"
|
|
131
|
+
:text-style="viewModel.titleStyle"
|
|
132
|
+
:text="viewModel.title"
|
|
133
|
+
element="h1"
|
|
134
|
+
class="tw-mb-4 tw-text-base"
|
|
135
|
+
/>
|
|
136
|
+
<TextWrapper
|
|
137
|
+
v-if="renderText"
|
|
138
|
+
:text-style="viewModel.descriptionStyle"
|
|
139
|
+
:text="renderText"
|
|
140
|
+
element="div"
|
|
141
|
+
class="tw-mb-4 tw-text-base"
|
|
142
|
+
/>
|
|
143
|
+
<div v-if="!isSubmitting" class="tw-grid tw-grid-cols-2 tw-gap-4">
|
|
144
|
+
<div
|
|
145
|
+
v-for="(value, index) in values"
|
|
146
|
+
:key="index"
|
|
147
|
+
class="tw-text-secondary-500 c-col-span-2"
|
|
148
|
+
:class="{
|
|
149
|
+
'tw-col-span-2':
|
|
150
|
+
value.field.type === 'text-area' || isMobileDevice,
|
|
151
|
+
}"
|
|
185
152
|
>
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
153
|
+
<TextInput
|
|
154
|
+
v-if="value.field.type !== 'text-area'"
|
|
155
|
+
v-model="value.value"
|
|
156
|
+
:placeholder="`${value.field.name}${
|
|
157
|
+
value.field.required ? '*' : ''
|
|
158
|
+
}`"
|
|
159
|
+
:label="`${value.field.name}${value.field.required ? '*' : ''}`"
|
|
160
|
+
:show-label-screen-reader-only="true"
|
|
161
|
+
size="sm"
|
|
162
|
+
:error="!!value.error"
|
|
163
|
+
:type="getTextInputTypeByFieldType(value.field.type)"
|
|
164
|
+
class="tw-w-full"
|
|
165
|
+
@input="onValueChange(index)"
|
|
190
166
|
/>
|
|
191
|
-
|
|
167
|
+
<Textarea
|
|
168
|
+
v-if="value.field.type === 'text-area'"
|
|
169
|
+
v-model="value.value"
|
|
170
|
+
:placeholder="`${value.field.name}${
|
|
171
|
+
value.field.required ? '*' : ''
|
|
172
|
+
}`"
|
|
173
|
+
:label="`${value.field.name}${value.field.required ? '*' : ''}`"
|
|
174
|
+
:show-label-screen-reader-only="true"
|
|
175
|
+
size="sm"
|
|
176
|
+
:error="!!value.error"
|
|
177
|
+
:resize="false"
|
|
178
|
+
class="tw-w-full"
|
|
179
|
+
@input="onValueChange(index)"
|
|
180
|
+
/>
|
|
181
|
+
<p v-if="!!value.error" class="form-error">
|
|
182
|
+
{{ value.error }}
|
|
183
|
+
</p>
|
|
184
|
+
</div>
|
|
185
|
+
<div class="tw-flex tw-w-full tw-justify-center tw-col-span-2">
|
|
186
|
+
<button
|
|
187
|
+
v-if="isSubmitButtonVisible"
|
|
188
|
+
class="tw-block tw-border-0 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-fit hover:tw-cursor-pointer tw-px-8 tw-py-3 c-button-full"
|
|
189
|
+
:style="submitButtonStyle"
|
|
190
|
+
:class="{ 'tw-w-full': isMobileDevice }"
|
|
191
|
+
>
|
|
192
|
+
<TextWrapper
|
|
193
|
+
:text-style="submitButtonTextStyle"
|
|
194
|
+
:text="viewModel.buttonText"
|
|
195
|
+
class="tw-text-center tw-text-base"
|
|
196
|
+
/>
|
|
197
|
+
</button>
|
|
198
|
+
</div>
|
|
192
199
|
</div>
|
|
200
|
+
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
201
|
+
<Loader />
|
|
202
|
+
</div>
|
|
203
|
+
<p
|
|
204
|
+
v-if="hasSubmitError"
|
|
205
|
+
class="tw-text-center tw-mt-2 form-error"
|
|
206
|
+
>
|
|
207
|
+
{{ submitError }}
|
|
208
|
+
</p>
|
|
209
|
+
</form>
|
|
210
|
+
<div v-else :style="successMessageColorStyle">
|
|
211
|
+
<TextWrapper
|
|
212
|
+
v-if="viewModel.successMessage"
|
|
213
|
+
:text="renderSuccessText"
|
|
214
|
+
element="p"
|
|
215
|
+
:class="'tw-my-0.5'"
|
|
216
|
+
/>
|
|
193
217
|
</div>
|
|
194
|
-
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
195
|
-
<Loader />
|
|
196
|
-
</div>
|
|
197
|
-
<p v-if="hasSubmitError" class="tw-text-center tw-mt-2 form-error">
|
|
198
|
-
{{ submitError }}
|
|
199
|
-
</p>
|
|
200
|
-
</form>
|
|
201
|
-
<div v-else :style="successMessageColorStyle">
|
|
202
|
-
<TextWrapper
|
|
203
|
-
v-if="viewModel.successMessage"
|
|
204
|
-
:text="renderSuccessText"
|
|
205
|
-
element="p"
|
|
206
|
-
:class="'tw-my-0.5'"
|
|
207
|
-
/>
|
|
208
218
|
</div>
|
|
209
219
|
</div>
|
|
210
220
|
</div>
|
|
211
|
-
<div
|
|
212
|
-
v-else-if="isTextOnly"
|
|
213
|
-
class="tw-px-6 tw-py-8 tw-gap-2 contact-container"
|
|
214
|
-
>
|
|
221
|
+
<div v-else-if="isTextOnly" class="tw-px-6 tw-gap-2 contact-container">
|
|
215
222
|
<span v-if="!hasSubmitted" class="tw-grid tw-grid-cols-2">
|
|
216
223
|
<div
|
|
217
224
|
v-if="!isSubmitting"
|
|
@@ -350,10 +357,7 @@
|
|
|
350
357
|
}"
|
|
351
358
|
>
|
|
352
359
|
<div
|
|
353
|
-
class="tw-flex tw-flex-col tw-gap-2 tw-px-8 tw-w-full tw-justify-center
|
|
354
|
-
:class="{
|
|
355
|
-
'tw-py-6': isMobileDevice,
|
|
356
|
-
}"
|
|
360
|
+
class="tw-flex tw-flex-col tw-gap-2 tw-px-8 tw-py-6 tw-w-full tw-justify-center"
|
|
357
361
|
>
|
|
358
362
|
<span v-if="!hasSubmitted">
|
|
359
363
|
<TextWrapper
|
|
@@ -516,9 +520,6 @@ export default {
|
|
|
516
520
|
.c-text-padding {
|
|
517
521
|
@apply tw-px-0 tw-col-span-2;
|
|
518
522
|
}
|
|
519
|
-
.c-py-6 {
|
|
520
|
-
@apply tw-py-6;
|
|
521
|
-
}
|
|
522
523
|
.c-divided-container {
|
|
523
524
|
@apply tw-flex-col;
|
|
524
525
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { ImageGalleryViewModel } from '@brand-page/view-models';
|
|
4
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
4
5
|
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
5
6
|
import ImageModalMixin from '../mixins/image-modal.mixin';
|
|
6
7
|
import type { ImageGalleryImageClickPayload } from './models';
|
|
@@ -34,6 +35,10 @@ export default defineComponent({
|
|
|
34
35
|
};
|
|
35
36
|
},
|
|
36
37
|
computed: {
|
|
38
|
+
contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
|
|
39
|
+
return toContentPaddingStyle(this.viewModel);
|
|
40
|
+
},
|
|
41
|
+
|
|
37
42
|
getContainerStyle(): BrandPageCssStyle {
|
|
38
43
|
if (this.galleryType === 'carousel') {
|
|
39
44
|
const maxWidth = this.containerClientWidth
|
|
@@ -2,7 +2,10 @@ import { defineComponent } from 'vue';
|
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { MailingListViewModel } from '@brand-page/view-models';
|
|
4
4
|
import brandPageClient from '../../clients/brand-page.client';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getEmailValidationError,
|
|
7
|
+
contentPaddingStyle as toContentPaddingStyle,
|
|
8
|
+
} from '@brand-page/utils';
|
|
6
9
|
import type { BrandPageContext } from '@brand-page/models';
|
|
7
10
|
import {
|
|
8
11
|
contentSettingsTr,
|
|
@@ -61,6 +64,10 @@ export default defineComponent({
|
|
|
61
64
|
}
|
|
62
65
|
},
|
|
63
66
|
computed: {
|
|
67
|
+
contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
|
|
68
|
+
return toContentPaddingStyle(this.viewModel);
|
|
69
|
+
},
|
|
70
|
+
|
|
64
71
|
hasNameError(): boolean {
|
|
65
72
|
return !!this.nameError;
|
|
66
73
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div data-component="map">
|
|
2
|
+
<div data-component="map" :style="contentPaddingStyle">
|
|
3
3
|
<div
|
|
4
4
|
class="c-map"
|
|
5
5
|
:class="{
|
|
@@ -22,6 +22,7 @@ import Placeholder from '../placeholder/Placeholder.vue';
|
|
|
22
22
|
import type { MapViewModel } from '@brand-page/view-models';
|
|
23
23
|
import type { BrandPageContext } from '@brand-page/models';
|
|
24
24
|
import { mapTr } from '@src/composables/useTranslate';
|
|
25
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
25
26
|
import { computed } from 'vue';
|
|
26
27
|
|
|
27
28
|
interface Props {
|
|
@@ -37,6 +38,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
const placeId = computed(() => props.viewModel?.address?.placeId);
|
|
41
|
+
const contentPaddingStyle = computed(() =>
|
|
42
|
+
toContentPaddingStyle(props.viewModel),
|
|
43
|
+
);
|
|
40
44
|
</script>
|
|
41
45
|
<style scoped>
|
|
42
46
|
.c-map {
|
|
@@ -14,6 +14,7 @@ import type { RequestPaymentViewModel } from '../../../view-models';
|
|
|
14
14
|
import type { PaymentRequestDetails } from '../Payment.mixin';
|
|
15
15
|
import { DEFAULT_CURRENCY_SYMBOL } from '../../../constants';
|
|
16
16
|
import { addOpacityToHex } from '../../../utils/color.util';
|
|
17
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '../../../utils';
|
|
17
18
|
import { RGBAtoHex } from '@utils/helpers';
|
|
18
19
|
|
|
19
20
|
const MAX_CUSTOM_REQUEST_CHARS = 500;
|
|
@@ -42,6 +43,10 @@ export default defineComponent({
|
|
|
42
43
|
};
|
|
43
44
|
},
|
|
44
45
|
computed: {
|
|
46
|
+
contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
|
|
47
|
+
return toContentPaddingStyle(this.viewModel);
|
|
48
|
+
},
|
|
49
|
+
|
|
45
50
|
isCustomerRequestDetailsValid(): boolean {
|
|
46
51
|
return (
|
|
47
52
|
!this.viewModel.requestPaymentConfig.isCustomerRequestDetailsEnabled ||
|
|
@@ -4,7 +4,10 @@ import { SUPPORT_ME_CUSTOM_PRODUCT_NAME } from '../../../constants';
|
|
|
4
4
|
import type { BrandPageContext, PaymentOption } from '../../../models';
|
|
5
5
|
import type { SupportMeViewModel } from '../../../view-models';
|
|
6
6
|
import type { PaymentRequestDetails } from '../Payment.mixin';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
isPaymentAmountValid,
|
|
9
|
+
contentPaddingStyle as toContentPaddingStyle,
|
|
10
|
+
} from '../../../utils';
|
|
8
11
|
import {
|
|
9
12
|
DEFAULT_CURRENCY_SYMBOL,
|
|
10
13
|
DEFAULT_CURRENCY_CODE,
|
|
@@ -33,6 +36,10 @@ export default defineComponent({
|
|
|
33
36
|
};
|
|
34
37
|
},
|
|
35
38
|
computed: {
|
|
39
|
+
contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
|
|
40
|
+
return toContentPaddingStyle(this.viewModel);
|
|
41
|
+
},
|
|
42
|
+
|
|
36
43
|
isCustomAmountFieldVisible(): boolean {
|
|
37
44
|
return this.viewModel.supportMeConfig.paymentOptions.some(
|
|
38
45
|
(o) => o.name === SUPPORT_ME_CUSTOM_PRODUCT_NAME,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<section>
|
|
3
3
|
<div
|
|
4
4
|
v-if="shouldShowContainer"
|
|
5
|
-
class="tw-relative outer-container
|
|
5
|
+
class="tw-relative outer-container"
|
|
6
6
|
:class="{
|
|
7
7
|
'tw-my-8': context.isBrandSite,
|
|
8
8
|
'tw-mb-4': context.isBrandPageOrIsBrandContact,
|
|
9
9
|
}"
|
|
10
|
-
:style="backgroundStyle"
|
|
10
|
+
:style="[backgroundStyle, contentPaddingStyle]"
|
|
11
11
|
>
|
|
12
12
|
<div class="tw-p-4 inner-container">
|
|
13
13
|
<div class="tw-flex tw-flex-col tw-gap-2">
|
|
@@ -140,6 +140,7 @@ import brandPageClient from '../../clients/brand-page.client';
|
|
|
140
140
|
import raygunUtil from '@brand-page/utils/raygun.util';
|
|
141
141
|
import { shopTr } from '@src/composables/useTranslate';
|
|
142
142
|
import { useShopConfigStore } from '@shared/ecommerce-settings/store/shop-settings-store';
|
|
143
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
143
144
|
|
|
144
145
|
const props = withDefaults(
|
|
145
146
|
defineProps<{
|
|
@@ -260,6 +261,10 @@ const itemStyle = computed((): BrandPageCssStyle => {
|
|
|
260
261
|
};
|
|
261
262
|
});
|
|
262
263
|
|
|
264
|
+
const contentPaddingStyle = computed(() =>
|
|
265
|
+
toContentPaddingStyle(props.viewModel),
|
|
266
|
+
);
|
|
267
|
+
|
|
263
268
|
const backgroundStyle = computed((): any => {
|
|
264
269
|
return props.viewModel.backgroundStyle;
|
|
265
270
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div data-component="social-links">
|
|
3
3
|
<div
|
|
4
|
-
class="tw-pb-8"
|
|
5
4
|
:class="{
|
|
6
5
|
'tw-mb-4': context.isBrandPageOrIsBrandContact,
|
|
7
6
|
}"
|
|
8
|
-
:style="containerStyles"
|
|
7
|
+
:style="[containerStyles, contentPaddingStyle]"
|
|
9
8
|
style="container-type: inline-size"
|
|
10
9
|
>
|
|
11
10
|
<TextWrapper
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
:text="title"
|
|
15
14
|
element="h1"
|
|
16
15
|
:class="textAlignClass"
|
|
17
|
-
class="tw-
|
|
16
|
+
class="tw-pb-8"
|
|
18
17
|
/>
|
|
19
18
|
<SocialLinksItems
|
|
20
19
|
:id="id"
|
|
@@ -34,6 +33,7 @@ import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
|
34
33
|
import type { SocialLinksViewModel } from 'src/brand-page/view-models';
|
|
35
34
|
import { SOCIAL_LINKS_ICON_DISPLAY_STYLES } from '@brand-page/models';
|
|
36
35
|
import type { BrandPageContext, LinksItem } from '@brand-page/models';
|
|
36
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
37
37
|
import { computed } from 'vue';
|
|
38
38
|
|
|
39
39
|
const props = withDefaults(
|
|
@@ -51,6 +51,10 @@ const containerStyles = computed((): BrandPageCssStyle => {
|
|
|
51
51
|
return props.viewModel.backgroundStyles || {};
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
const contentPaddingStyle = computed(() =>
|
|
55
|
+
toContentPaddingStyle(props.viewModel),
|
|
56
|
+
);
|
|
57
|
+
|
|
54
58
|
const iconStyle = computed((): BrandPageCssStyle => {
|
|
55
59
|
return props.viewModel.iconFillStyles || {};
|
|
56
60
|
});
|