@designcrowd/library.brand-page 5.18.2-ast-padding-1 → 5.18.2-ast-subnav-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-GFYl8DtL.js → CreatedOnBrandCrowd-de-de-BcE0fnK1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-D5CcXf2I.js → CreatedOnBrandCrowd-en-us-CSiIpDLD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Cr7J3ooe.js → CreatedOnBrandCrowd-es-es-D_dx-lMy.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BC1NFFIW.js → CreatedOnBrandCrowd-fr-ca-BR7qAax-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BC1NFFIW.js → CreatedOnBrandCrowd-fr-fr-BR7qAax-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BdiCcpwi.js → CreatedOnBrandCrowd-pt-br-D8L6aJoK.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BdiCcpwi.js → CreatedOnBrandCrowd-pt-pt-D8L6aJoK.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-d4TmC_lo.js → CreatedOnDcom-de-de-Bo0WNPXh.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DlvLEF-R.js → CreatedOnDcom-en-us-B0GDCSrA.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BulpVp3k.js → CreatedOnDcom-es-es-CDq2MPQJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-M4xqunZe.js → CreatedOnDcom-fr-ca-B8L5Wjnk.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BFqUXgzb.js → CreatedOnDcom-fr-fr-vpgsTke6.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CUVcVkV2.js → CreatedOnDcom-pt-br-CUMf_n7T.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Dc4CZ4xW.js → CreatedOnDcom-pt-pt-B_Ek1lUj.js} +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +0 -4
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +4 -8
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +0 -4
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +0 -4
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +0 -4
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +1 -4
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +0 -4
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +0 -4
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +0 -4
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +1 -4
- package/lib/src/brand-page/components/video/Video.mixin.d.ts +0 -4
- package/lib/src/brand-page/components/video/Video.mixin.js +0 -4
- package/lib/src/brand-page/constants/misc.constants.d.ts +0 -11
- package/lib/src/brand-page/constants/misc.constants.js +0 -19
- package/lib/src/brand-page/models/content.model.d.ts +0 -2
- package/lib/src/brand-page/models/navigation-styles.model.d.ts +1 -0
- package/lib/src/brand-page/models/navigation-styles.model.js +28 -2
- package/lib/src/brand-page/utils/index.d.ts +0 -1
- package/lib/src/brand-page/utils/index.js +0 -1
- package/lib/src/brand-page/utils/migration/migration-16.js +45 -30
- package/lib/src/brand-page/utils/migration.util.js +1 -1
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +0 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -12
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -14
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +0 -34
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +1 -6
- package/lib/src/brand-page-maker/models/content-settings.js +2 -30
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -12
- package/lib/src/{bundled-translations-DYd5oFZv.js → bundled-translations-CnareLWC.js} +1 -1
- package/lib/src/bundles/bundled-translations.json +0 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +69 -57
- package/lib/src/css/library.brand-page-brandPage.min.css +69 -57
- package/lib/src/css/library.brand-page-designCom.min.css +69 -57
- package/lib/src/css/library.brand-page-preview.min.css +69 -57
- package/lib/src/index.mjs +49 -48
- package/lib/src/{lib-CRihSxY0.js → lib-BXKezSr4.js} +13626 -13743
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -14
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +0 -14
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -12
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -12
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +0 -12
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +0 -9
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -12
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +10 -8
- package/lib/src/shared/navigation-style-settings/store/index.js +1 -12
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -16
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -14
- package/lib/src/utils/minify-brand-page-metadata.js +1 -11
- package/package.json +1 -1
- package/src/brand-page/components/booking-section/BookingSection.vue +3 -11
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +6 -12
- package/src/brand-page/components/contact-form/ContactForm.vue +118 -115
- package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +0 -5
- package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +1 -8
- package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
- package/src/brand-page/components/map/Map.vue +1 -5
- package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +0 -5
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +0 -1
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +1 -8
- package/src/brand-page/components/payment/support-me/SupportMe.vue +0 -1
- package/src/brand-page/components/social-links/SocialLinks.vue +3 -7
- package/src/brand-page/components/text/Text.vue +5 -12
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +3 -11
- package/src/brand-page/components/video/Video.mixin.ts +0 -5
- package/src/brand-page/components/video/Video.vue +1 -1
- package/src/brand-page/constants/misc.constants.ts +0 -20
- package/src/brand-page/models/content.model.ts +0 -2
- package/src/brand-page/models/navigation-styles.model.ts +43 -1
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -4
- package/src/brand-page/utils/index.ts +0 -1
- package/src/brand-page/utils/migration/migration-16.test.ts +125 -0
- package/src/brand-page/utils/migration/migration-16.ts +66 -37
- package/src/brand-page/utils/migration.util.test.ts +0 -64
- package/src/brand-page/utils/migration.util.ts +1 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +10 -1
- package/src/brand-page-maker/constants/config-settings-constant.ts +0 -40
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +0 -8
- package/src/brand-page-maker/models/content-settings.ts +2 -32
- package/src/bundles/bundled-translations.json +0 -2
- package/src/shared/content-settings/components/color-field/ColorField.vue +10 -5
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +0 -2
- 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 +0 -9
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +17 -11
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +4 -1
- package/src/shared/navigation-style-settings/store/index.ts +1 -21
- package/src/utils/minify-brand-page-metadata.ts +1 -11
- package/lib/src/brand-page/utils/content-padding.util.d.ts +0 -13
- package/lib/src/brand-page/utils/content-padding.util.js +0 -10
- package/src/brand-page/utils/content-padding.util.test.ts +0 -29
- package/src/brand-page/utils/content-padding.util.ts +0 -13
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +0 -50
|
@@ -45,10 +45,6 @@ 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
|
-
};
|
|
52
48
|
hasCard(): boolean;
|
|
53
49
|
hasBgImage(): boolean;
|
|
54
50
|
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
|
|
7
|
+
import { getRenderText } 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,9 +64,6 @@ export default defineComponent({
|
|
|
64
64
|
};
|
|
65
65
|
return buttonTextStyle;
|
|
66
66
|
},
|
|
67
|
-
contentPaddingStyle() {
|
|
68
|
-
return toContentPaddingStyle(this.viewModel);
|
|
69
|
-
},
|
|
70
67
|
hasCard() {
|
|
71
68
|
return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
|
|
72
69
|
this.viewModel.layoutStyle === ALIGN_CARD_CENTER_IMAGE);
|
|
@@ -75,10 +72,9 @@ export default defineComponent({
|
|
|
75
72
|
return this.viewModel.layoutStyle === ALIGN_CARD_CENTER_IMAGE;
|
|
76
73
|
},
|
|
77
74
|
hasBgColor() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return Boolean(this.viewModel.layoutStyle);
|
|
75
|
+
return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
|
|
76
|
+
this.viewModel.layoutStyle === TEXT_ONLY ||
|
|
77
|
+
this.viewModel.layoutStyle === ALIGN_CENTERED);
|
|
82
78
|
},
|
|
83
79
|
isCenteredLayout() {
|
|
84
80
|
return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
|
|
@@ -23,10 +23,6 @@ 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
|
-
};
|
|
30
26
|
getContainerStyle(): BrandPageCssStyle;
|
|
31
27
|
images(): any[] | undefined;
|
|
32
28
|
galleryType(): GalleryType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
|
-
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
3
2
|
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
4
3
|
import ImageModalMixin from '../mixins/image-modal.mixin';
|
|
5
4
|
import { GALLERY_TYPES } from '@brand-page/models';
|
|
@@ -30,9 +29,6 @@ export default defineComponent({
|
|
|
30
29
|
};
|
|
31
30
|
},
|
|
32
31
|
computed: {
|
|
33
|
-
contentPaddingStyle() {
|
|
34
|
-
return toContentPaddingStyle(this.viewModel);
|
|
35
|
-
},
|
|
36
32
|
getContainerStyle() {
|
|
37
33
|
if (this.galleryType === 'carousel') {
|
|
38
34
|
const maxWidth = this.containerClientWidth
|
|
@@ -39,10 +39,6 @@ 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
|
-
};
|
|
46
42
|
hasNameError(): boolean;
|
|
47
43
|
hasEmailError(): boolean;
|
|
48
44
|
hasFormError(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import brandPageClient from '../../clients/brand-page.client';
|
|
3
|
-
import { getEmailValidationError
|
|
3
|
+
import { getEmailValidationError } 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,9 +51,6 @@ export default defineComponent({
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
computed: {
|
|
54
|
-
contentPaddingStyle() {
|
|
55
|
-
return toContentPaddingStyle(this.viewModel);
|
|
56
|
-
},
|
|
57
54
|
hasNameError() {
|
|
58
55
|
return !!this.nameError;
|
|
59
56
|
},
|
|
@@ -21,10 +21,6 @@ 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
|
-
};
|
|
28
24
|
isCustomerRequestDetailsValid(): boolean;
|
|
29
25
|
paymentRequestDetails(): PaymentRequestDetails;
|
|
30
26
|
paymentOptions(): PaymentOption[];
|
|
@@ -2,7 +2,6 @@ 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';
|
|
6
5
|
import { RGBAtoHex } from '@utils/helpers';
|
|
7
6
|
const MAX_CUSTOM_REQUEST_CHARS = 500;
|
|
8
7
|
export default defineComponent({
|
|
@@ -29,9 +28,6 @@ export default defineComponent({
|
|
|
29
28
|
};
|
|
30
29
|
},
|
|
31
30
|
computed: {
|
|
32
|
-
contentPaddingStyle() {
|
|
33
|
-
return toContentPaddingStyle(this.viewModel);
|
|
34
|
-
},
|
|
35
31
|
isCustomerRequestDetailsValid() {
|
|
36
32
|
return (!this.viewModel.requestPaymentConfig.isCustomerRequestDetailsEnabled ||
|
|
37
33
|
this.customerRequestDetails === undefined ||
|
|
@@ -17,10 +17,6 @@ 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
|
-
};
|
|
24
20
|
isCustomAmountFieldVisible(): boolean;
|
|
25
21
|
isCustomerMessageFieldVisible(): boolean;
|
|
26
22
|
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
|
|
3
|
+
import { isPaymentAmountValid } 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,9 +24,6 @@ export default defineComponent({
|
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
26
|
computed: {
|
|
27
|
-
contentPaddingStyle() {
|
|
28
|
-
return toContentPaddingStyle(this.viewModel);
|
|
29
|
-
},
|
|
30
27
|
isCustomAmountFieldVisible() {
|
|
31
28
|
return this.viewModel.supportMeConfig.paymentOptions.some((o) => o.name === SUPPORT_ME_CUSTOM_PRODUCT_NAME);
|
|
32
29
|
},
|
|
@@ -11,10 +11,6 @@ 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
|
-
};
|
|
18
14
|
arrowStyle(): BrandPageCssStyle;
|
|
19
15
|
containerStyle(): BrandPageCssStyle;
|
|
20
16
|
videoUrl(): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
|
-
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
3
2
|
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
4
3
|
import { DISPLAY_STYLE_PREVIEW, DISPLAY_STYLE_COLLAPSED, } from '../../constants';
|
|
5
4
|
export default defineComponent({
|
|
@@ -17,9 +16,6 @@ export default defineComponent({
|
|
|
17
16
|
title: 'Video',
|
|
18
17
|
}),
|
|
19
18
|
computed: {
|
|
20
|
-
contentPaddingStyle() {
|
|
21
|
-
return toContentPaddingStyle(this.viewModel);
|
|
22
|
-
},
|
|
23
19
|
arrowStyle() {
|
|
24
20
|
return {
|
|
25
21
|
color: this.viewModel.buttonStyles.style?.color,
|
|
@@ -29,17 +29,6 @@ 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>;
|
|
43
32
|
export declare const BIG_IMAGE = "big-image";
|
|
44
33
|
export declare const MEDIA_ONLY = "media-only";
|
|
45
34
|
export declare const COLUMNS = "columns";
|
|
@@ -30,25 +30,6 @@ 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
|
-
};
|
|
52
33
|
export const BIG_IMAGE = 'big-image';
|
|
53
34
|
export const MEDIA_ONLY = 'media-only';
|
|
54
35
|
export const COLUMNS = 'columns';
|
|
@@ -8,6 +8,7 @@ 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;
|
|
11
12
|
type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
|
|
12
13
|
hamburgerMenuStyle?: Partial<NavigationMenuStyles>;
|
|
13
14
|
};
|
|
@@ -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, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
|
|
1
|
+
import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, STYLE_THEME_KEYS, 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,6 +15,17 @@ 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
|
+
};
|
|
18
29
|
class NavigationStyles {
|
|
19
30
|
displayType;
|
|
20
31
|
renderAfterLogo;
|
|
@@ -59,7 +70,9 @@ class NavigationStyles {
|
|
|
59
70
|
borderColor: theme?.primaryColor,
|
|
60
71
|
}, option?.selectedButtonStyle || {});
|
|
61
72
|
this.iconStyle = Object.assign({}, option?.iconStyle || {});
|
|
62
|
-
this.subNavBackgroundColor =
|
|
73
|
+
this.subNavBackgroundColor =
|
|
74
|
+
option?.subNavBackgroundColor ??
|
|
75
|
+
getDefaultSubNavBackgroundColor(this.defaultButtonStyle.color);
|
|
63
76
|
this.isLogoVisible = option?.isLogoVisible || true;
|
|
64
77
|
this.hamburgerMenuStyle = new NavigationMenuStyles(option?.hamburgerMenuStyle || {}, {
|
|
65
78
|
defaultButtonStyle: {
|
|
@@ -81,6 +94,19 @@ class NavigationStyles {
|
|
|
81
94
|
},
|
|
82
95
|
subNavBackgroundColor: theme?.secondaryColor,
|
|
83
96
|
});
|
|
97
|
+
// Default the hamburger sub nav to the opposite logo colour when the menu
|
|
98
|
+
// text is colour matched (e.g. logo text colour -> logo background colour).
|
|
99
|
+
// Runs on every load - so it also reaches sites already stamped at the latest
|
|
100
|
+
// model version, where the migration is version-gated out (bp-5454). Only an
|
|
101
|
+
// unset value or the legacy explicit default is upgraded, so a deliberate
|
|
102
|
+
// non-matched choice (or an already color matched value) is preserved.
|
|
103
|
+
const colorMatchedHamburgerSubNav = getDefaultSubNavBackgroundColor(this.hamburgerMenuStyle.defaultButtonStyle.color);
|
|
104
|
+
if (colorMatchedHamburgerSubNav &&
|
|
105
|
+
(this.hamburgerMenuStyle.subNavBackgroundColor === undefined ||
|
|
106
|
+
this.hamburgerMenuStyle.subNavBackgroundColor === theme?.secondaryColor)) {
|
|
107
|
+
this.hamburgerMenuStyle.subNavBackgroundColor =
|
|
108
|
+
colorMatchedHamburgerSubNav;
|
|
109
|
+
}
|
|
84
110
|
}
|
|
85
111
|
}
|
|
86
112
|
export class NavigationDesktop extends NavigationStyles {
|
|
@@ -1,37 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { STYLE_THEME_KEYS, NAVIGATION_DISPLAY } from '../../constants';
|
|
2
|
+
import { getDefaultSubNavBackgroundColor } from '../../models';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Migration 16: Default the sub nav background color to "color match on" for
|
|
5
|
+
* existing sites using the TAB_2 ("nav 2") or any hamburger display style.
|
|
6
|
+
*
|
|
7
|
+
* Before the sub nav background colour feature shipped, these styles defaulted
|
|
8
|
+
* to an explicit colour (e.g. the theme secondary colour for hamburger). This
|
|
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.
|
|
8
12
|
*/
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const isColorMatched = (color) => !!color && Object.values(STYLE_THEME_KEYS).includes(color);
|
|
14
|
+
// Matches NavigationStyleSettings.getMenuStyles: hamburger styles live on the
|
|
15
|
+
// hamburgerMenuStyle (looser `.includes` to catch any hamburger variant),
|
|
16
|
+
// TAB_2 uses the top-level styles.
|
|
17
|
+
const isHamburger = (displayType) => displayType.includes('hamburger');
|
|
18
|
+
const isColorMatchTargetDisplayType = (displayType) => isHamburger(displayType) || displayType === NAVIGATION_DISPLAY.TAB_2;
|
|
19
|
+
const applyDefaultSubNavColorMatch = (navigation) => {
|
|
20
|
+
if (!navigation?.displayType) {
|
|
21
|
+
return;
|
|
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
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
menuStyles = navigation;
|
|
34
|
+
}
|
|
35
|
+
// Respect an existing color matched value so we don't clobber a deliberate choice.
|
|
36
|
+
if (isColorMatched(menuStyles.subNavBackgroundColor)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
// Only color match the sub nav when the default text color is itself color
|
|
40
|
+
// matched - in which case it takes the opposite logo color (e.g. logo text
|
|
41
|
+
// color -> logo background color). Otherwise leave the sub nav as-is.
|
|
42
|
+
const colorMatchedSubNav = getDefaultSubNavBackgroundColor(menuStyles.defaultButtonStyle?.color);
|
|
43
|
+
if (colorMatchedSubNav) {
|
|
44
|
+
menuStyles.subNavBackgroundColor = colorMatchedSubNav;
|
|
45
|
+
}
|
|
15
46
|
};
|
|
16
47
|
export const migration16 = async (migrationResult) => {
|
|
17
48
|
const { brandPageModel } = migrationResult;
|
|
18
|
-
brandPageModel.
|
|
19
|
-
|
|
20
|
-
// Contact Form's previous hard-coded spacing varies by layout, so it's
|
|
21
|
-
// keyed by layoutStyle rather than a single per-type value.
|
|
22
|
-
const value = content.type === 'contact-form'
|
|
23
|
-
? CONTACT_FORM_LAYOUT_DEFAULT_PADDING[content.layoutStyle ?? '']
|
|
24
|
-
: TIER2_DEFAULT_PADDING[content.type];
|
|
25
|
-
if (value === undefined) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (content.topPadding === undefined) {
|
|
29
|
-
content.topPadding = value;
|
|
30
|
-
}
|
|
31
|
-
if (content.bottomPadding === undefined) {
|
|
32
|
-
content.bottomPadding = value;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
});
|
|
49
|
+
applyDefaultSubNavColorMatch(brandPageModel.pageHeaderDesktop?.navigation);
|
|
50
|
+
applyDefaultSubNavColorMatch(brandPageModel.pageHeaderMobile?.navigation);
|
|
36
51
|
return migrationResult;
|
|
37
52
|
};
|
|
@@ -119,7 +119,7 @@ const MIGRATION_TABLE = [
|
|
|
119
119
|
{
|
|
120
120
|
version: 16,
|
|
121
121
|
migrateFn: migration16,
|
|
122
|
-
description: '
|
|
122
|
+
description: 'Default sub nav background color to color match on for existing TAB_2 and hamburger navs',
|
|
123
123
|
},
|
|
124
124
|
];
|
|
125
125
|
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,8 +8,6 @@ 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;
|
|
13
11
|
imageUrlOverride?: string | undefined;
|
|
14
12
|
imageUrlsOverride?: string | undefined;
|
|
15
13
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -496,8 +496,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
496
496
|
id: string;
|
|
497
497
|
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";
|
|
498
498
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
499
|
-
topPadding?: number | undefined;
|
|
500
|
-
bottomPadding?: number | undefined;
|
|
501
499
|
imageUrlOverride?: string | undefined;
|
|
502
500
|
imageUrlsOverride?: string | undefined;
|
|
503
501
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -547,8 +545,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
547
545
|
id: string;
|
|
548
546
|
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";
|
|
549
547
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
550
|
-
topPadding?: number | undefined;
|
|
551
|
-
bottomPadding?: number | undefined;
|
|
552
548
|
imageUrlOverride?: string | undefined;
|
|
553
549
|
imageUrlsOverride?: string | undefined;
|
|
554
550
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -598,8 +594,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
598
594
|
id: string;
|
|
599
595
|
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";
|
|
600
596
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
601
|
-
topPadding?: number | undefined;
|
|
602
|
-
bottomPadding?: number | undefined;
|
|
603
597
|
imageUrlOverride?: string | undefined;
|
|
604
598
|
imageUrlsOverride?: string | undefined;
|
|
605
599
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -649,8 +643,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
649
643
|
id: string;
|
|
650
644
|
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";
|
|
651
645
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
652
|
-
topPadding?: number | undefined;
|
|
653
|
-
bottomPadding?: number | undefined;
|
|
654
646
|
imageUrlOverride?: string | undefined;
|
|
655
647
|
imageUrlsOverride?: string | undefined;
|
|
656
648
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -700,8 +692,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
700
692
|
id: string;
|
|
701
693
|
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";
|
|
702
694
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
703
|
-
topPadding?: number | undefined;
|
|
704
|
-
bottomPadding?: number | undefined;
|
|
705
695
|
imageUrlOverride?: string | undefined;
|
|
706
696
|
imageUrlsOverride?: string | undefined;
|
|
707
697
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -751,8 +741,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
751
741
|
id: string;
|
|
752
742
|
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";
|
|
753
743
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
754
|
-
topPadding?: number | undefined;
|
|
755
|
-
bottomPadding?: number | undefined;
|
|
756
744
|
imageUrlOverride?: string | undefined;
|
|
757
745
|
imageUrlsOverride?: string | undefined;
|
|
758
746
|
avatarImageUrlOverride?: string | undefined;
|