@designcrowd/library.brand-page 5.18.2-ast-subnav-5 → 5.18.2-ast-padding-2
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-4zgO_-aa.js → CreatedOnBrandCrowd-de-de-BhukNHvt.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CXf-RHHY.js → CreatedOnBrandCrowd-en-us-J6XEVETI.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-C-3C-3_V.js → CreatedOnBrandCrowd-es-es-BvU6TWqv.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CsV6USvy.js → CreatedOnBrandCrowd-fr-ca-RxSp1TrN.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CsV6USvy.js → CreatedOnBrandCrowd-fr-fr-RxSp1TrN.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CoQz5qwf.js → CreatedOnBrandCrowd-pt-br-YUSMTsSD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CoQz5qwf.js → CreatedOnBrandCrowd-pt-pt-YUSMTsSD.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BR_jGD2C.js → CreatedOnDcom-de-de-C2WQvGKH.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DbeaOAoh.js → CreatedOnDcom-en-us-CNoK8RYq.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B1S1IeqE.js → CreatedOnDcom-es-es-DJi-cgZ2.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-B2BeYwR-.js → CreatedOnDcom-fr-ca-ZqSzLPFX.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CVv89v_F.js → CreatedOnDcom-fr-fr-mzPOeMde.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DyhC_TE-.js → CreatedOnDcom-pt-br-Wi0O-8C5.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DD9Jq47r.js → CreatedOnDcom-pt-pt-DqtM6ovg.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/misc.constants.d.ts +11 -0
- package/lib/src/brand-page/constants/misc.constants.js +19 -0
- package/lib/src/brand-page/models/content.model.d.ts +2 -0
- package/lib/src/brand-page/models/navigation-styles.model.d.ts +0 -7
- package/lib/src/brand-page/models/navigation-styles.model.js +2 -41
- 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-16.js +33 -53
- package/lib/src/brand-page/utils/migration.util.js +4 -1
- 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 +37 -0
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
- package/lib/src/brand-page-maker/models/content-settings.js +36 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +9 -1
- package/lib/src/{bundled-translations-CnareLWC.js → bundled-translations-DYd5oFZv.js} +1 -1
- package/lib/src/{bundled-translations.de-DE-2Ys7epLO.js → bundled-translations.de-DE-CH1jit6l.js} +1 -1
- package/lib/src/{bundled-translations.es-ES-Cjp-G8rT.js → bundled-translations.es-ES-DoLRmoFo.js} +9 -9
- package/lib/src/{bundled-translations.fr-CA-CsaW4Oae.js → bundled-translations.fr-CA-Dq1_Ddi1.js} +9 -9
- package/lib/src/{bundled-translations.fr-FR-DIT2dd8J.js → bundled-translations.fr-FR-D5Smt12r.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-BamoBpDW.js → bundled-translations.pt-BR-CpAaJ3dQ.js} +9 -9
- package/lib/src/{bundled-translations.pt-PT-C9A4hY_e.js → bundled-translations.pt-PT-C1uIpd-9.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/css/library.brand-page-brandCrowd.min.css +129 -173
- package/lib/src/css/library.brand-page-brandPage.min.css +129 -173
- package/lib/src/css/library.brand-page-designCom.min.css +129 -173
- package/lib/src/css/library.brand-page-preview.min.css +129 -173
- package/lib/src/index.mjs +60 -62
- package/lib/src/{lib-DXoSgt54.js → lib-Ci8yD-3n.js} +18646 -18541
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.d.ts +2 -14
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.js +13 -43
- 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/google-address-field/GoogleAddressField.mixin.d.ts +54 -0
- package/lib/src/shared/content-settings/components/google-address-field/GoogleAddressField.mixin.js +67 -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/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +8 -10
- package/lib/src/shared/navigation-style-settings/store/index.js +12 -1
- 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 +2 -2
- 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 +115 -118
- 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/navigation/navigation-side-menu/NavigationSideMenu.vue +1 -4
- 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/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/misc.constants.ts +20 -0
- package/src/brand-page/models/content.model.ts +2 -0
- package/src/brand-page/models/navigation-styles.model.ts +1 -63
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +6 -0
- 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-16.ts +40 -78
- package/src/brand-page/utils/migration.util.test.ts +64 -0
- package/src/brand-page/utils/migration.util.ts +4 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +1 -10
- package/src/brand-page-maker/constants/config-settings-constant.ts +43 -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 +38 -2
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +14 -0
- 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/plugins/google-maps-plugin/google-maps-plugin.ts +18 -58
- package/src/shared/content-settings/components/color-field/ColorField.vue +5 -10
- 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/google-address-field/GoogleAddressField.mixin.ts +84 -0
- package/src/shared/content-settings/components/google-address-field/GoogleAddressField.vue +15 -148
- package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +11 -17
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +1 -4
- package/src/shared/navigation-style-settings/store/index.ts +21 -1
- package/src/utils/minify-brand-page-metadata.ts +11 -1
- package/src/brand-page/models/navigation-styles.model.test.ts +0 -72
- package/src/brand-page/utils/migration/migration-16.test.ts +0 -187
|
@@ -45,6 +45,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
45
|
}, {
|
|
46
46
|
submitButtonStyle(): BrandPageCssStyle;
|
|
47
47
|
submitButtonTextStyle(): BrandPageCssStyle;
|
|
48
|
+
contentPaddingStyle(): {
|
|
49
|
+
paddingTop: string;
|
|
50
|
+
paddingBottom: string;
|
|
51
|
+
};
|
|
48
52
|
hasCard(): boolean;
|
|
49
53
|
hasBgImage(): boolean;
|
|
50
54
|
hasBgColor(): boolean;
|
|
@@ -4,7 +4,7 @@ import { getEmailValidationError, getMessageValidationError, getNameValidationEr
|
|
|
4
4
|
import brandPageClient from '../../clients/brand-page.client';
|
|
5
5
|
import { isEmail } from '../../../utils/validator.util';
|
|
6
6
|
import { ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, DISPLAY_STYLE_COLLAPSED, RECAPTCHA_ACTION_CONTACT_FORM, TEXT_ONLY, } from '../../constants';
|
|
7
|
-
import { getRenderText } from '@brand-page/utils';
|
|
7
|
+
import { getRenderText, contentPaddingStyle as toContentPaddingStyle, } from '@brand-page/utils';
|
|
8
8
|
import { hasRTEContent } from '@brand-page-maker/utils';
|
|
9
9
|
import { useReCaptcha } from '../../composables/recaptcha.composable';
|
|
10
10
|
export default defineComponent({
|
|
@@ -64,6 +64,9 @@ export default defineComponent({
|
|
|
64
64
|
};
|
|
65
65
|
return buttonTextStyle;
|
|
66
66
|
},
|
|
67
|
+
contentPaddingStyle() {
|
|
68
|
+
return toContentPaddingStyle(this.viewModel);
|
|
69
|
+
},
|
|
67
70
|
hasCard() {
|
|
68
71
|
return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
|
|
69
72
|
this.viewModel.layoutStyle === ALIGN_CARD_CENTER_IMAGE);
|
|
@@ -72,9 +75,10 @@ export default defineComponent({
|
|
|
72
75
|
return this.viewModel.layoutStyle === ALIGN_CARD_CENTER_IMAGE;
|
|
73
76
|
},
|
|
74
77
|
hasBgColor() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
// Every brandSite layout applies the background colour on the section
|
|
79
|
+
// root (banner-style) so the padding control reveals it; for the image
|
|
80
|
+
// layouts it only shows in the padding bands around the image block.
|
|
81
|
+
return Boolean(this.viewModel.layoutStyle);
|
|
78
82
|
},
|
|
79
83
|
isCenteredLayout() {
|
|
80
84
|
return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
|
|
@@ -23,6 +23,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
23
23
|
}>, {}, {
|
|
24
24
|
imageModalSelectedImageIndex: number | undefined;
|
|
25
25
|
}, {
|
|
26
|
+
contentPaddingStyle(): {
|
|
27
|
+
paddingTop: string;
|
|
28
|
+
paddingBottom: string;
|
|
29
|
+
};
|
|
26
30
|
getContainerStyle(): BrandPageCssStyle;
|
|
27
31
|
images(): any[] | undefined;
|
|
28
32
|
galleryType(): GalleryType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
2
3
|
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
3
4
|
import ImageModalMixin from '../mixins/image-modal.mixin';
|
|
4
5
|
import { GALLERY_TYPES } from '@brand-page/models';
|
|
@@ -29,6 +30,9 @@ export default defineComponent({
|
|
|
29
30
|
};
|
|
30
31
|
},
|
|
31
32
|
computed: {
|
|
33
|
+
contentPaddingStyle() {
|
|
34
|
+
return toContentPaddingStyle(this.viewModel);
|
|
35
|
+
},
|
|
32
36
|
getContainerStyle() {
|
|
33
37
|
if (this.galleryType === 'carousel') {
|
|
34
38
|
const maxWidth = this.containerClientWidth
|
|
@@ -39,6 +39,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
39
39
|
isSubmitting: boolean;
|
|
40
40
|
show: boolean;
|
|
41
41
|
}, {
|
|
42
|
+
contentPaddingStyle(): {
|
|
43
|
+
paddingTop: string;
|
|
44
|
+
paddingBottom: string;
|
|
45
|
+
};
|
|
42
46
|
hasNameError(): boolean;
|
|
43
47
|
hasEmailError(): boolean;
|
|
44
48
|
hasFormError(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import brandPageClient from '../../clients/brand-page.client';
|
|
3
|
-
import { getEmailValidationError } from '@brand-page/utils';
|
|
3
|
+
import { getEmailValidationError, contentPaddingStyle as toContentPaddingStyle, } from '@brand-page/utils';
|
|
4
4
|
import { contentSettingsTr, mailingListTr, } from '@src/composables/useTranslate';
|
|
5
5
|
import { useReCaptcha } from '../../composables/recaptcha.composable';
|
|
6
6
|
import { RECAPTCHA_ACTION_MAILING_LIST } from '../../constants';
|
|
@@ -51,6 +51,9 @@ export default defineComponent({
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
computed: {
|
|
54
|
+
contentPaddingStyle() {
|
|
55
|
+
return toContentPaddingStyle(this.viewModel);
|
|
56
|
+
},
|
|
54
57
|
hasNameError() {
|
|
55
58
|
return !!this.nameError;
|
|
56
59
|
},
|
|
@@ -21,6 +21,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
21
21
|
selectedPaymentOptionIds: string[];
|
|
22
22
|
imageType: string;
|
|
23
23
|
}, {
|
|
24
|
+
contentPaddingStyle(): {
|
|
25
|
+
paddingTop: string;
|
|
26
|
+
paddingBottom: string;
|
|
27
|
+
};
|
|
24
28
|
isCustomerRequestDetailsValid(): boolean;
|
|
25
29
|
paymentRequestDetails(): PaymentRequestDetails;
|
|
26
30
|
paymentOptions(): PaymentOption[];
|
|
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
|
|
|
2
2
|
import { PAYMENT_OPTION_DISPLAY_TYPES, PAYMENT_OPTION_IMAGE_TYPES, } from '../../../models';
|
|
3
3
|
import { DEFAULT_CURRENCY_SYMBOL } from '../../../constants';
|
|
4
4
|
import { addOpacityToHex } from '../../../utils/color.util';
|
|
5
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '../../../utils';
|
|
5
6
|
import { RGBAtoHex } from '@utils/helpers';
|
|
6
7
|
const MAX_CUSTOM_REQUEST_CHARS = 500;
|
|
7
8
|
export default defineComponent({
|
|
@@ -28,6 +29,9 @@ export default defineComponent({
|
|
|
28
29
|
};
|
|
29
30
|
},
|
|
30
31
|
computed: {
|
|
32
|
+
contentPaddingStyle() {
|
|
33
|
+
return toContentPaddingStyle(this.viewModel);
|
|
34
|
+
},
|
|
31
35
|
isCustomerRequestDetailsValid() {
|
|
32
36
|
return (!this.viewModel.requestPaymentConfig.isCustomerRequestDetailsEnabled ||
|
|
33
37
|
this.customerRequestDetails === undefined ||
|
|
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
17
17
|
prevCustomAmount: string;
|
|
18
18
|
customAmount: string;
|
|
19
19
|
}, {
|
|
20
|
+
contentPaddingStyle(): {
|
|
21
|
+
paddingTop: string;
|
|
22
|
+
paddingBottom: string;
|
|
23
|
+
};
|
|
20
24
|
isCustomAmountFieldVisible(): boolean;
|
|
21
25
|
isCustomerMessageFieldVisible(): boolean;
|
|
22
26
|
isCustomerMessageValid(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { SUPPORT_ME_CUSTOM_PRODUCT_NAME } from '../../../constants';
|
|
3
|
-
import { isPaymentAmountValid } from '../../../utils';
|
|
3
|
+
import { isPaymentAmountValid, contentPaddingStyle as toContentPaddingStyle, } from '../../../utils';
|
|
4
4
|
import { DEFAULT_CURRENCY_SYMBOL, DEFAULT_CURRENCY_CODE, } from '../../../constants';
|
|
5
5
|
import { paymentTr } from '@src/composables/useTranslate';
|
|
6
6
|
const MAX_CUSTOM_MESSAGE_CHARS = 500;
|
|
@@ -24,6 +24,9 @@ export default defineComponent({
|
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
26
|
computed: {
|
|
27
|
+
contentPaddingStyle() {
|
|
28
|
+
return toContentPaddingStyle(this.viewModel);
|
|
29
|
+
},
|
|
27
30
|
isCustomAmountFieldVisible() {
|
|
28
31
|
return this.viewModel.supportMeConfig.paymentOptions.some((o) => o.name === SUPPORT_ME_CUSTOM_PRODUCT_NAME);
|
|
29
32
|
},
|
|
@@ -11,6 +11,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
11
11
|
isCollapsed: boolean;
|
|
12
12
|
title: string;
|
|
13
13
|
}, {
|
|
14
|
+
contentPaddingStyle(): {
|
|
15
|
+
paddingTop: string;
|
|
16
|
+
paddingBottom: string;
|
|
17
|
+
};
|
|
14
18
|
arrowStyle(): BrandPageCssStyle;
|
|
15
19
|
containerStyle(): BrandPageCssStyle;
|
|
16
20
|
videoUrl(): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
|
+
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
2
3
|
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
3
4
|
import { DISPLAY_STYLE_PREVIEW, DISPLAY_STYLE_COLLAPSED, } from '../../constants';
|
|
4
5
|
export default defineComponent({
|
|
@@ -16,6 +17,9 @@ export default defineComponent({
|
|
|
16
17
|
title: 'Video',
|
|
17
18
|
}),
|
|
18
19
|
computed: {
|
|
20
|
+
contentPaddingStyle() {
|
|
21
|
+
return toContentPaddingStyle(this.viewModel);
|
|
22
|
+
},
|
|
19
23
|
arrowStyle() {
|
|
20
24
|
return {
|
|
21
25
|
color: this.viewModel.buttonStyles.style?.color,
|
|
@@ -29,6 +29,17 @@ export declare const TEXT_ONLY = "text-only";
|
|
|
29
29
|
export declare const ALIGN_LEFT_FULL_IMAGE = "left-aligned-full-image";
|
|
30
30
|
export declare const ALIGN_RIGHT_FULL_IMAGE = "right-aligned-full-image";
|
|
31
31
|
export declare const ALTERNATE_IMAGE = "alternate-image";
|
|
32
|
+
/**
|
|
33
|
+
* Padding Control (BP-5699): the top/bottom padding each Contact Form layout
|
|
34
|
+
* had hard-coded before the sliders existed. Single source for new-block
|
|
35
|
+
* defaults (content-settings) and the migration backfill for existing pages.
|
|
36
|
+
* The image layouts (full-image divided and card-over-image) are 0: their
|
|
37
|
+
* padding sits on the section root and reveals the background colour around
|
|
38
|
+
* the image block (same as the banner), while the spacing inside/over the
|
|
39
|
+
* image stays fixed — existing pages rendered the image flush to the section
|
|
40
|
+
* edges.
|
|
41
|
+
*/
|
|
42
|
+
export declare const CONTACT_FORM_LAYOUT_DEFAULT_PADDING: Record<string, number>;
|
|
32
43
|
export declare const BIG_IMAGE = "big-image";
|
|
33
44
|
export declare const MEDIA_ONLY = "media-only";
|
|
34
45
|
export declare const COLUMNS = "columns";
|
|
@@ -30,6 +30,25 @@ export const TEXT_ONLY = 'text-only';
|
|
|
30
30
|
export const ALIGN_LEFT_FULL_IMAGE = 'left-aligned-full-image';
|
|
31
31
|
export const ALIGN_RIGHT_FULL_IMAGE = 'right-aligned-full-image';
|
|
32
32
|
export const ALTERNATE_IMAGE = 'alternate-image';
|
|
33
|
+
/**
|
|
34
|
+
* Padding Control (BP-5699): the top/bottom padding each Contact Form layout
|
|
35
|
+
* had hard-coded before the sliders existed. Single source for new-block
|
|
36
|
+
* defaults (content-settings) and the migration backfill for existing pages.
|
|
37
|
+
* The image layouts (full-image divided and card-over-image) are 0: their
|
|
38
|
+
* padding sits on the section root and reveals the background colour around
|
|
39
|
+
* the image block (same as the banner), while the spacing inside/over the
|
|
40
|
+
* image stays fixed — existing pages rendered the image flush to the section
|
|
41
|
+
* edges.
|
|
42
|
+
*/
|
|
43
|
+
export const CONTACT_FORM_LAYOUT_DEFAULT_PADDING = {
|
|
44
|
+
'': 0, // collapsible (default on Brand Page / Brand Contact)
|
|
45
|
+
[ALIGN_CENTERED]: 24,
|
|
46
|
+
[ALIGN_CARD_CENTER]: 32,
|
|
47
|
+
[ALIGN_CARD_CENTER_IMAGE]: 0,
|
|
48
|
+
[TEXT_ONLY]: 32,
|
|
49
|
+
[ALIGN_LEFT_FULL_IMAGE]: 0,
|
|
50
|
+
[ALIGN_RIGHT_FULL_IMAGE]: 0,
|
|
51
|
+
};
|
|
33
52
|
export const BIG_IMAGE = 'big-image';
|
|
34
53
|
export const MEDIA_ONLY = 'media-only';
|
|
35
54
|
export const COLUMNS = 'columns';
|
|
@@ -8,13 +8,6 @@ export declare class NavigationMenuStyles {
|
|
|
8
8
|
subNavBackgroundColor?: string;
|
|
9
9
|
constructor(options: Partial<NavigationMenuStyles>, defaultOptions: Partial<NavigationMenuStyles>);
|
|
10
10
|
}
|
|
11
|
-
export declare const getDefaultSubNavBackgroundColor: (defaultTextColor: string | undefined) => string | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* The hamburger sub nav background colour is auto color-matched only when the
|
|
14
|
-
* user has not deliberately set it - i.e. it has no value or is transparent.
|
|
15
|
-
* Any explicit colour (a hex) or an already color-matched key is preserved.
|
|
16
|
-
*/
|
|
17
|
-
export declare const isUnsetOrTransparentColor: (color: string | undefined | null) => boolean;
|
|
18
11
|
type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
|
|
19
12
|
hamburgerMenuStyle?: Partial<NavigationMenuStyles>;
|
|
20
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL,
|
|
1
|
+
import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
|
|
2
2
|
import { VIEWPORTS } from './index';
|
|
3
3
|
import { TEXT_STYLE_TYPES } from './index';
|
|
4
4
|
import cloneDeep from 'lodash.clonedeep';
|
|
@@ -15,29 +15,6 @@ export class NavigationMenuStyles {
|
|
|
15
15
|
options.subNavBackgroundColor ?? defaultOptions.subNavBackgroundColor;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export const getDefaultSubNavBackgroundColor = (defaultTextColor) => {
|
|
19
|
-
if (defaultTextColor === STYLE_THEME_KEYS.LogoTextColor ||
|
|
20
|
-
defaultTextColor === STYLE_THEME_KEYS.LogoTextMultiColor) {
|
|
21
|
-
return STYLE_THEME_KEYS.LogoBackgroundColor;
|
|
22
|
-
}
|
|
23
|
-
if (defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundColor ||
|
|
24
|
-
defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundMultiColor) {
|
|
25
|
-
return STYLE_THEME_KEYS.LogoTextColor;
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* The hamburger sub nav background colour is auto color-matched only when the
|
|
31
|
-
* user has not deliberately set it - i.e. it has no value or is transparent.
|
|
32
|
-
* Any explicit colour (a hex) or an already color-matched key is preserved.
|
|
33
|
-
*/
|
|
34
|
-
export const isUnsetOrTransparentColor = (color) => {
|
|
35
|
-
if (color == null) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
const normalised = color.trim().toLowerCase();
|
|
39
|
-
return normalised === '' || normalised === 'transparent';
|
|
40
|
-
};
|
|
41
18
|
class NavigationStyles {
|
|
42
19
|
displayType;
|
|
43
20
|
renderAfterLogo;
|
|
@@ -82,9 +59,7 @@ class NavigationStyles {
|
|
|
82
59
|
borderColor: theme?.primaryColor,
|
|
83
60
|
}, option?.selectedButtonStyle || {});
|
|
84
61
|
this.iconStyle = Object.assign({}, option?.iconStyle || {});
|
|
85
|
-
this.subNavBackgroundColor =
|
|
86
|
-
option?.subNavBackgroundColor ??
|
|
87
|
-
getDefaultSubNavBackgroundColor(this.defaultButtonStyle.color);
|
|
62
|
+
this.subNavBackgroundColor = option?.subNavBackgroundColor;
|
|
88
63
|
this.isLogoVisible = option?.isLogoVisible || true;
|
|
89
64
|
this.hamburgerMenuStyle = new NavigationMenuStyles(option?.hamburgerMenuStyle || {}, {
|
|
90
65
|
defaultButtonStyle: {
|
|
@@ -106,20 +81,6 @@ class NavigationStyles {
|
|
|
106
81
|
},
|
|
107
82
|
subNavBackgroundColor: theme?.secondaryColor,
|
|
108
83
|
});
|
|
109
|
-
// Default the hamburger sub nav to the opposite logo colour when the menu
|
|
110
|
-
// text is colour matched (e.g. logo text colour -> logo background colour).
|
|
111
|
-
// Runs on every load - so it also reaches sites already stamped at the latest
|
|
112
|
-
// model version, where the migration is version-gated out (bp-5454/bp-5634).
|
|
113
|
-
// Only an unset/transparent value, or the legacy secondary-colour default, is
|
|
114
|
-
// upgraded - a deliberately set colour (or an already color matched key) is
|
|
115
|
-
// preserved. When the text colour is NOT color matched, nothing is touched.
|
|
116
|
-
const colorMatchedHamburgerSubNav = getDefaultSubNavBackgroundColor(this.hamburgerMenuStyle.defaultButtonStyle.color);
|
|
117
|
-
if (colorMatchedHamburgerSubNav &&
|
|
118
|
-
(isUnsetOrTransparentColor(this.hamburgerMenuStyle.subNavBackgroundColor) ||
|
|
119
|
-
this.hamburgerMenuStyle.subNavBackgroundColor === theme?.secondaryColor)) {
|
|
120
|
-
this.hamburgerMenuStyle.subNavBackgroundColor =
|
|
121
|
-
colorMatchedHamburgerSubNav;
|
|
122
|
-
}
|
|
123
84
|
}
|
|
124
85
|
}
|
|
125
86
|
export class NavigationDesktop extends NavigationStyles {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Block top/bottom padding (BP-5687) as a bindable CSS style object. Defaults
|
|
3
|
+
* live in the data — `content-settings` for new content, a migration for
|
|
4
|
+
* existing — so this just reads the stored value (`?? 0` covers content from
|
|
5
|
+
* before the field existed).
|
|
6
|
+
*/
|
|
7
|
+
export declare const contentPaddingStyle: (content: {
|
|
8
|
+
topPadding?: number;
|
|
9
|
+
bottomPadding?: number;
|
|
10
|
+
}) => {
|
|
11
|
+
paddingTop: string;
|
|
12
|
+
paddingBottom: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Block top/bottom padding (BP-5687) as a bindable CSS style object. Defaults
|
|
3
|
+
* live in the data — `content-settings` for new content, a migration for
|
|
4
|
+
* existing — so this just reads the stored value (`?? 0` covers content from
|
|
5
|
+
* before the field existed).
|
|
6
|
+
*/
|
|
7
|
+
export const contentPaddingStyle = (content) => ({
|
|
8
|
+
paddingTop: `${content.topPadding ?? 0}px`,
|
|
9
|
+
paddingBottom: `${content.bottomPadding ?? 0}px`,
|
|
10
|
+
});
|
|
@@ -1,60 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getDefaultSubNavBackgroundColor, isUnsetOrTransparentColor, } from '../../models';
|
|
1
|
+
import { CONTACT_FORM_LAYOUT_DEFAULT_PADDING } from '../../constants';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* migration brings existing sites in line with the new default by setting the
|
|
10
|
-
* sub nav background colour to a logo theme key (color matched), unless the
|
|
11
|
-
* value is already color matched - in which case the user's choice is kept.
|
|
3
|
+
* Padding Control backfill (BP-5699 Tier 2, BP-5700 Store): blocks that already
|
|
4
|
+
* had hard-coded top/bottom spacing. Backfill that spacing as the block's explicit
|
|
5
|
+
* topPadding/bottomPadding so existing pages render unchanged once the spacing
|
|
6
|
+
* moves to the Padding Control sliders. Type-scoped and idempotent — only the
|
|
7
|
+
* listed types, and only when the value isn't already set.
|
|
12
8
|
*/
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
if (!isColorMatchTargetDisplayType(navigation.displayType)) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
let menuStyles;
|
|
27
|
-
if (isHamburger(navigation.displayType)) {
|
|
28
|
-
navigation.hamburgerMenuStyle =
|
|
29
|
-
navigation.hamburgerMenuStyle ?? {};
|
|
30
|
-
menuStyles = navigation.hamburgerMenuStyle;
|
|
31
|
-
// Hamburger: only auto-match when the sub nav has no value or is transparent.
|
|
32
|
-
// Preserve ANY explicit colour (a deliberate hex or an already color matched
|
|
33
|
-
// key) so we never overwrite a choice an admin/template made. (The legacy
|
|
34
|
-
// secondary-colour default is upgraded by the model runtime default on load,
|
|
35
|
-
// where the theme is available to compare against.)
|
|
36
|
-
if (!isUnsetOrTransparentColor(menuStyles.subNavBackgroundColor)) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
menuStyles = navigation;
|
|
42
|
-
// TAB_2 (unchanged): respect an existing color matched value.
|
|
43
|
-
if (isColorMatched(menuStyles.subNavBackgroundColor)) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// Only color match the sub nav when the default text color is itself color
|
|
48
|
-
// matched - in which case it takes the opposite logo color (e.g. logo text
|
|
49
|
-
// color -> logo background color). Otherwise leave the sub nav as-is.
|
|
50
|
-
const colorMatchedSubNav = getDefaultSubNavBackgroundColor(menuStyles.defaultButtonStyle?.color);
|
|
51
|
-
if (colorMatchedSubNav) {
|
|
52
|
-
menuStyles.subNavBackgroundColor = colorMatchedSubNav;
|
|
53
|
-
}
|
|
9
|
+
const BLOCK_DEFAULT_PADDING = {
|
|
10
|
+
text: 12,
|
|
11
|
+
'images-section': 32,
|
|
12
|
+
'social-links': 32,
|
|
13
|
+
'shapes-section': 32,
|
|
14
|
+
'booking-section': 32,
|
|
15
|
+
'shop-section': 16,
|
|
16
|
+
'banner-section': 32,
|
|
17
|
+
'about-section': 32,
|
|
54
18
|
};
|
|
55
19
|
export const migration16 = async (migrationResult) => {
|
|
56
20
|
const { brandPageModel } = migrationResult;
|
|
57
|
-
|
|
58
|
-
|
|
21
|
+
brandPageModel.pages.forEach((page) => {
|
|
22
|
+
page.contents.forEach((content) => {
|
|
23
|
+
// Contact Form's previous hard-coded spacing varies by layout, so it's
|
|
24
|
+
// keyed by layoutStyle rather than a single per-type value.
|
|
25
|
+
const value = content.type === 'contact-form'
|
|
26
|
+
? CONTACT_FORM_LAYOUT_DEFAULT_PADDING[content.layoutStyle ?? '']
|
|
27
|
+
: BLOCK_DEFAULT_PADDING[content.type];
|
|
28
|
+
if (value === undefined) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (content.topPadding === undefined) {
|
|
32
|
+
content.topPadding = value;
|
|
33
|
+
}
|
|
34
|
+
if (content.bottomPadding === undefined) {
|
|
35
|
+
content.bottomPadding = value;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
59
39
|
return migrationResult;
|
|
60
40
|
};
|
|
@@ -119,8 +119,11 @@ const MIGRATION_TABLE = [
|
|
|
119
119
|
{
|
|
120
120
|
version: 16,
|
|
121
121
|
migrateFn: migration16,
|
|
122
|
+
// runAlways: re-apply on every load (ticket stack) so already-migrated pages
|
|
123
|
+
// pick up newly-added block defaults (e.g. Store) without a new migration.
|
|
124
|
+
// Idempotent — only backfills when topPadding/bottomPadding aren't already set.
|
|
122
125
|
runAlways: true,
|
|
123
|
-
description: '
|
|
126
|
+
description: 'Padding Control backfill (BP-5699 Tier 2 + BP-5700 Store): backfill existing top/bottom spacing as explicit padding for text (12px), images/social links/shapes/booking (32px), store (16px), and contact form (per layout)',
|
|
124
127
|
},
|
|
125
128
|
];
|
|
126
129
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
8
8
|
id: string;
|
|
9
9
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
10
10
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
11
|
+
topPadding?: number | undefined;
|
|
12
|
+
bottomPadding?: number | undefined;
|
|
11
13
|
imageUrlOverride?: string | undefined;
|
|
12
14
|
imageUrlsOverride?: string | undefined;
|
|
13
15
|
avatarImageUrlOverride?: string | undefined;
|