@designcrowd/library.brand-page 5.18.7-ast-padding-1 → 5.18.7
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-Cn8zNuGM.js → CreatedOnBrandCrowd-de-de-CZmqvsOT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CP8xAFc-.js → CreatedOnBrandCrowd-en-us-5nTR1eLT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Ds8NijwP.js → CreatedOnBrandCrowd-es-es-xLvoayrw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BiVV_7lj.js → CreatedOnBrandCrowd-fr-ca-CN5n8X8v.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BiVV_7lj.js → CreatedOnBrandCrowd-fr-fr-CN5n8X8v.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CjjrYojo.js → CreatedOnBrandCrowd-pt-br-CdkYC12E.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CjjrYojo.js → CreatedOnBrandCrowd-pt-pt-CdkYC12E.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-ChR5jvlP.js → CreatedOnDcom-de-de-B8rV2rD7.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-C4rO1BMA.js → CreatedOnDcom-en-us-C4WaRIpF.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DxGMS6JK.js → CreatedOnDcom-es-es-BPHPey0b.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-n31u4t7u.js → CreatedOnDcom-fr-ca-xrMr4xlv.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-gwdsX7YV.js → CreatedOnDcom-fr-fr-BEozL-o2.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-iZjFp--s.js → CreatedOnDcom-pt-br-CoN-ZhjG.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-B3Z3-RLC.js → CreatedOnDcom-pt-pt-9vfUJ3ks.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 -26
- package/lib/src/brand-page/constants/misc.constants.js +0 -42
- package/lib/src/brand-page/models/content.model.d.ts +0 -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.util.js +0 -10
- 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 -38
- package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +1 -9
- package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +1 -7
- 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 -36
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -12
- package/lib/src/{bundled-translations-BUyt4scr.js → bundled-translations-D1q3rSEz.js} +9 -9
- package/lib/src/{bundled-translations.de-DE-DEw_OVai.js → bundled-translations.de-DE-BxqLLwbh.js} +1 -1
- package/lib/src/{bundled-translations.es-ES-CFKWmkgY.js → bundled-translations.es-ES-uh249NlJ.js} +17 -17
- package/lib/src/{bundled-translations.fr-CA-DCl5LJS4.js → bundled-translations.fr-CA-BEQmv2fX.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-B5BjgllA.js → bundled-translations.fr-FR-BnNuCojH.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-5PWpMPuM.js → bundled-translations.pt-BR-CJUOxVlq.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-B9_wN0HR.js → bundled-translations.pt-PT-Ds9cMEqK.js} +9 -9
- package/lib/src/bundles/bundled-translations.de-DE.json +0 -2
- package/lib/src/bundles/bundled-translations.es-ES.json +0 -2
- package/lib/src/bundles/bundled-translations.fr-CA.json +0 -2
- package/lib/src/bundles/bundled-translations.fr-FR.json +0 -2
- package/lib/src/bundles/bundled-translations.json +0 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +0 -2
- package/lib/src/bundles/bundled-translations.pt-PT.json +0 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +116 -108
- package/lib/src/css/library.brand-page-brandPage.min.css +116 -108
- package/lib/src/css/library.brand-page-designCom.min.css +116 -108
- package/lib/src/css/library.brand-page-preview.min.css +116 -108
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CIj_C38s.js → lib-xHNclG2R.js} +19655 -19841
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +13 -0
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +49 -0
- 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/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/about-section/AboutSection.vue +4 -10
- package/src/brand-page/components/banner-section/BannerSection.vue +4 -11
- 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 +104 -105
- 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/shop/Shop.vue +2 -7
- 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 -48
- package/src/brand-page/models/content.model.ts +0 -2
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -9
- package/src/brand-page/utils/index.ts +0 -1
- package/src/brand-page/utils/migration.util.test.ts +0 -195
- package/src/brand-page/utils/migration.util.ts +0 -11
- package/src/brand-page-maker/constants/config-settings-constant.ts +0 -44
- package/src/brand-page-maker/convertors/about-display-style.convertor.ts +0 -10
- package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +0 -8
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +0 -8
- package/src/brand-page-maker/models/content-settings.ts +2 -38
- package/src/bundles/bundled-translations.de-DE.json +0 -2
- package/src/bundles/bundled-translations.es-ES.json +0 -2
- package/src/bundles/bundled-translations.fr-CA.json +0 -2
- package/src/bundles/bundled-translations.fr-FR.json +0 -2
- package/src/bundles/bundled-translations.json +0 -2
- package/src/bundles/bundled-translations.pt-BR.json +0 -2
- package/src/bundles/bundled-translations.pt-PT.json +0 -2
- package/src/metadata-builder/builders/reorder-pages-builder.ts +80 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.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/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/lib/src/brand-page/utils/migration/migration-17.d.ts +0 -2
- package/lib/src/brand-page/utils/migration/migration-17.js +0 -48
- 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/utils/migration/migration-17.ts +0 -65
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +0 -50
|
@@ -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 tw-py-4"
|
|
6
6
|
:class="{
|
|
7
7
|
'tw-my-8': context.isBrandSite,
|
|
8
8
|
'tw-mb-4': context.isBrandPageOrIsBrandContact,
|
|
9
9
|
}"
|
|
10
|
-
:style="
|
|
10
|
+
:style="backgroundStyle"
|
|
11
11
|
>
|
|
12
12
|
<div class="tw-p-4 inner-container">
|
|
13
13
|
<div class="tw-flex tw-flex-col tw-gap-2">
|
|
@@ -140,7 +140,6 @@ 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';
|
|
144
143
|
|
|
145
144
|
const props = withDefaults(
|
|
146
145
|
defineProps<{
|
|
@@ -261,10 +260,6 @@ const itemStyle = computed((): BrandPageCssStyle => {
|
|
|
261
260
|
};
|
|
262
261
|
});
|
|
263
262
|
|
|
264
|
-
const contentPaddingStyle = computed(() =>
|
|
265
|
-
toContentPaddingStyle(props.viewModel),
|
|
266
|
-
);
|
|
267
|
-
|
|
268
263
|
const backgroundStyle = computed((): any => {
|
|
269
264
|
return props.viewModel.backgroundStyle;
|
|
270
265
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div data-component="social-links">
|
|
3
3
|
<div
|
|
4
|
+
class="tw-pb-8"
|
|
4
5
|
:class="{
|
|
5
6
|
'tw-mb-4': context.isBrandPageOrIsBrandContact,
|
|
6
7
|
}"
|
|
7
|
-
:style="
|
|
8
|
+
:style="containerStyles"
|
|
8
9
|
style="container-type: inline-size"
|
|
9
10
|
>
|
|
10
11
|
<TextWrapper
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
:text="title"
|
|
14
15
|
element="h1"
|
|
15
16
|
:class="textAlignClass"
|
|
16
|
-
class="tw-
|
|
17
|
+
class="tw-py-8"
|
|
17
18
|
/>
|
|
18
19
|
<SocialLinksItems
|
|
19
20
|
:id="id"
|
|
@@ -33,7 +34,6 @@ import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
|
33
34
|
import type { SocialLinksViewModel } from 'src/brand-page/view-models';
|
|
34
35
|
import { SOCIAL_LINKS_ICON_DISPLAY_STYLES } from '@brand-page/models';
|
|
35
36
|
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,10 +51,6 @@ const containerStyles = computed((): BrandPageCssStyle => {
|
|
|
51
51
|
return props.viewModel.backgroundStyles || {};
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
const contentPaddingStyle = computed(() =>
|
|
55
|
-
toContentPaddingStyle(props.viewModel),
|
|
56
|
-
);
|
|
57
|
-
|
|
58
54
|
const iconStyle = computed((): BrandPageCssStyle => {
|
|
59
55
|
return props.viewModel.iconFillStyles || {};
|
|
60
56
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div
|
|
4
4
|
v-if="!context.isBrandSite"
|
|
5
|
-
:style="
|
|
5
|
+
:style="containerStyle"
|
|
6
6
|
:class="{
|
|
7
7
|
[containerClasses]: true,
|
|
8
8
|
}"
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
data-test-tag="text-content-text"
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
|
-
<div v-else :style="
|
|
18
|
+
<div v-else :style="containerStyle">
|
|
19
19
|
<div
|
|
20
|
-
class="c-text-container tw-px-6 grid-container tw-gap-4"
|
|
20
|
+
class="c-text-container tw-py-3 tw-px-6 grid-container tw-gap-4"
|
|
21
21
|
:class="{
|
|
22
22
|
[containerClasses]: true,
|
|
23
23
|
[gridClass]: context.isBrandSite,
|
|
@@ -41,10 +41,7 @@
|
|
|
41
41
|
import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
42
42
|
import { computed } from 'vue';
|
|
43
43
|
import type { TextViewModel } from '@brand-page/view-models';
|
|
44
|
-
import {
|
|
45
|
-
getRenderText,
|
|
46
|
-
contentPaddingStyle as toContentPaddingStyle,
|
|
47
|
-
} from '@brand-page/utils';
|
|
44
|
+
import { getRenderText } from '@brand-page/utils';
|
|
48
45
|
import type { BrandPageContext } from '@brand-page/models';
|
|
49
46
|
|
|
50
47
|
interface Props {
|
|
@@ -54,10 +51,6 @@ interface Props {
|
|
|
54
51
|
|
|
55
52
|
const props = defineProps<Props>();
|
|
56
53
|
|
|
57
|
-
const contentPaddingStyle = computed(() =>
|
|
58
|
-
toContentPaddingStyle(props.viewModel),
|
|
59
|
-
);
|
|
60
|
-
|
|
61
54
|
const containerStyle = computed<any>(() => {
|
|
62
55
|
const containerStyles = {} as BrandPageCssStyle;
|
|
63
56
|
|
|
@@ -90,7 +83,7 @@ const containerClasses = computed(() => {
|
|
|
90
83
|
return '';
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
return 'tw-px-6';
|
|
86
|
+
return 'tw-py-3 tw-px-6';
|
|
94
87
|
});
|
|
95
88
|
|
|
96
89
|
const renderText = computed(() => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section data-component="text-media-section">
|
|
3
3
|
<div
|
|
4
|
-
class="tw-relative tw-w-full tw-box-border"
|
|
4
|
+
class="tw-relative tw-w-full tw-box-border tw-py-8"
|
|
5
5
|
:class="{
|
|
6
6
|
'tw-pl-0 tw-pr-0': hasNoPadding || !hasBrandSitePadding,
|
|
7
7
|
'tw-rounded-md': hasRoundedCorners,
|
|
8
8
|
}"
|
|
9
|
-
:style="
|
|
9
|
+
:style="viewModel.backgroundStyle"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
12
|
:class="[
|
|
@@ -148,11 +148,7 @@ import {
|
|
|
148
148
|
MEDIA_ONLY,
|
|
149
149
|
} from '../../constants';
|
|
150
150
|
import { isHexTransparent } from '@brand-page/utils/color.util';
|
|
151
|
-
import {
|
|
152
|
-
escapeContentText,
|
|
153
|
-
getRenderText,
|
|
154
|
-
contentPaddingStyle as toContentPaddingStyle,
|
|
155
|
-
} from '@brand-page/utils';
|
|
151
|
+
import { escapeContentText, getRenderText } from '@brand-page/utils';
|
|
156
152
|
|
|
157
153
|
const props = defineProps({
|
|
158
154
|
viewModel: {
|
|
@@ -175,10 +171,6 @@ const props = defineProps({
|
|
|
175
171
|
},
|
|
176
172
|
});
|
|
177
173
|
|
|
178
|
-
const contentPaddingStyle = computed(() =>
|
|
179
|
-
toContentPaddingStyle(props.viewModel),
|
|
180
|
-
);
|
|
181
|
-
|
|
182
174
|
const items = computed(() => props.viewModel.items);
|
|
183
175
|
|
|
184
176
|
const shouldDisplayText = computed(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { VideoViewModel } from '@brand-page/view-models';
|
|
4
|
-
import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
|
|
5
4
|
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
6
5
|
import {
|
|
7
6
|
DISPLAY_STYLE_PREVIEW,
|
|
@@ -23,10 +22,6 @@ export default defineComponent({
|
|
|
23
22
|
title: 'Video',
|
|
24
23
|
}),
|
|
25
24
|
computed: {
|
|
26
|
-
contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
|
|
27
|
-
return toContentPaddingStyle(this.viewModel);
|
|
28
|
-
},
|
|
29
|
-
|
|
30
25
|
arrowStyle(): BrandPageCssStyle {
|
|
31
26
|
return {
|
|
32
27
|
color: this.viewModel.buttonStyles.style?.color,
|
|
@@ -38,54 +38,6 @@ export const ALIGN_LEFT_FULL_IMAGE = 'left-aligned-full-image';
|
|
|
38
38
|
export const ALIGN_RIGHT_FULL_IMAGE = 'right-aligned-full-image';
|
|
39
39
|
export const ALTERNATE_IMAGE = 'alternate-image';
|
|
40
40
|
|
|
41
|
-
/**
|
|
42
|
-
* Padding Control (BP-5699): the top/bottom padding each Contact Form layout
|
|
43
|
-
* had hard-coded before the sliders existed. Single source for new-block
|
|
44
|
-
* defaults (content-settings) and the migration backfill for existing pages.
|
|
45
|
-
* The image layouts (full-image divided and card-over-image) are 0: the bg
|
|
46
|
-
* image expands with the section padding (banner-style), so the default starts
|
|
47
|
-
* flush at the edges; the spacing inside/over the image stays fixed.
|
|
48
|
-
*/
|
|
49
|
-
export const CONTACT_FORM_LAYOUT_DEFAULT_PADDING: Record<string, number> = {
|
|
50
|
-
'': 0, // collapsible (default on Brand Page / Brand Contact)
|
|
51
|
-
[ALIGN_CENTERED]: 32,
|
|
52
|
-
[ALIGN_CARD_CENTER]: 32,
|
|
53
|
-
[ALIGN_CARD_CENTER_IMAGE]: 0,
|
|
54
|
-
[TEXT_ONLY]: 32,
|
|
55
|
-
[ALIGN_LEFT_FULL_IMAGE]: 0,
|
|
56
|
-
[ALIGN_RIGHT_FULL_IMAGE]: 0,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Banner: full-bleed display styles (divided + full-width stacked) render the
|
|
61
|
-
* image flush to the section edges, so their top/bottom padding defaults to 0 to
|
|
62
|
-
* match prod — the standard 32 would push the image off the edges. Every other
|
|
63
|
-
* banner style keeps 32. Used by the banner display-style convertor and the
|
|
64
|
-
* migration backfill, mirroring contact-form's per-layout map above.
|
|
65
|
-
*/
|
|
66
|
-
export const BANNER_DEFAULT_PADDING = 32;
|
|
67
|
-
export const BANNER_FULL_BLEED_DISPLAY_STYLES = [
|
|
68
|
-
ALIGN_LEFT_FULL_IMAGE,
|
|
69
|
-
ALIGN_RIGHT_FULL_IMAGE,
|
|
70
|
-
ALIGN_TOP_FULL_IMAGE,
|
|
71
|
-
ALIGN_BOTTOM_FULL_IMAGE,
|
|
72
|
-
ALIGN_MIDDLE_FULL_IMAGE,
|
|
73
|
-
];
|
|
74
|
-
export const bannerDisplayStyleDefaultPadding = (
|
|
75
|
-
displayStyle?: string,
|
|
76
|
-
): number =>
|
|
77
|
-
displayStyle && BANNER_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
|
|
78
|
-
? 0
|
|
79
|
-
: BANNER_DEFAULT_PADDING;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* About: a flat 32 for every display style, including the two full-image styles.
|
|
83
|
-
* The full-image About renders the image inside the padded container, so the
|
|
84
|
-
* standard 32 band is the intended look. Used by the About display-style
|
|
85
|
-
* convertor and the migration backfill.
|
|
86
|
-
*/
|
|
87
|
-
export const ABOUT_DEFAULT_PADDING = 32;
|
|
88
|
-
|
|
89
41
|
export const BIG_IMAGE = 'big-image';
|
|
90
42
|
export const MEDIA_ONLY = 'media-only';
|
|
91
43
|
export const COLUMNS = 'columns';
|
|
@@ -292,7 +292,6 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
|
|
|
292
292
|
"contents": [
|
|
293
293
|
{
|
|
294
294
|
"backgroundStyle": {},
|
|
295
|
-
"bottomPadding": 32,
|
|
296
295
|
"buttonLinkType": "url",
|
|
297
296
|
"buttonPageId": "",
|
|
298
297
|
"buttonText": "Get Started",
|
|
@@ -331,7 +330,6 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
|
|
|
331
330
|
"textAlign": "center",
|
|
332
331
|
"wordBreak": "normal",
|
|
333
332
|
},
|
|
334
|
-
"topPadding": 32,
|
|
335
333
|
"type": "banner-section",
|
|
336
334
|
"url": "",
|
|
337
335
|
},
|
|
@@ -456,7 +454,7 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
|
|
|
456
454
|
},
|
|
457
455
|
},
|
|
458
456
|
},
|
|
459
|
-
"v":
|
|
457
|
+
"v": 16,
|
|
460
458
|
},
|
|
461
459
|
"useOldLogoRenderSize": true,
|
|
462
460
|
}
|
|
@@ -753,7 +751,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
753
751
|
{
|
|
754
752
|
"contents": [
|
|
755
753
|
{
|
|
756
|
-
"bottomPadding": 12,
|
|
757
754
|
"id": "bec5aca6-e3c5-4d4c-93fa-2894816a8040",
|
|
758
755
|
"text": "",
|
|
759
756
|
"textColor": {},
|
|
@@ -777,7 +774,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
777
774
|
"textAlign": "center",
|
|
778
775
|
"textStyleType": "paragraphs",
|
|
779
776
|
},
|
|
780
|
-
"topPadding": 12,
|
|
781
777
|
"type": "text",
|
|
782
778
|
},
|
|
783
779
|
],
|
|
@@ -901,7 +897,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
901
897
|
},
|
|
902
898
|
},
|
|
903
899
|
},
|
|
904
|
-
"v":
|
|
900
|
+
"v": 16,
|
|
905
901
|
},
|
|
906
902
|
"useOldLogoRenderSize": true,
|
|
907
903
|
}
|
|
@@ -1198,7 +1194,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
1198
1194
|
{
|
|
1199
1195
|
"contents": [
|
|
1200
1196
|
{
|
|
1201
|
-
"bottomPadding": 12,
|
|
1202
1197
|
"id": "bec5aca6-e3c5-4d4c-93fa-2894816a8040",
|
|
1203
1198
|
"text": "",
|
|
1204
1199
|
"textColor": {},
|
|
@@ -1229,7 +1224,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
1229
1224
|
"textAlign": "center",
|
|
1230
1225
|
"textStyleType": "paragraphs",
|
|
1231
1226
|
},
|
|
1232
|
-
"topPadding": 12,
|
|
1233
1227
|
"type": "text",
|
|
1234
1228
|
},
|
|
1235
1229
|
],
|
|
@@ -1353,7 +1347,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
1353
1347
|
},
|
|
1354
1348
|
},
|
|
1355
1349
|
},
|
|
1356
|
-
"v":
|
|
1350
|
+
"v": 16,
|
|
1357
1351
|
},
|
|
1358
1352
|
"useOldLogoRenderSize": true,
|
|
1359
1353
|
}
|
|
@@ -24,12 +24,6 @@ import {
|
|
|
24
24
|
createInitialTestimonialSectionContent,
|
|
25
25
|
} from '@brand-page-maker/models';
|
|
26
26
|
import {
|
|
27
|
-
ALIGN_CARD_CENTER_IMAGE,
|
|
28
|
-
ALIGN_LEFT_FULL_IMAGE,
|
|
29
|
-
ALIGN_RIGHT_FULL_IMAGE,
|
|
30
|
-
ALIGN_TOP_FULL_IMAGE,
|
|
31
|
-
ALIGN_BOTTOM_FULL_IMAGE,
|
|
32
|
-
ALIGN_MIDDLE_FULL_IMAGE,
|
|
33
27
|
DEFAULT_LETTER_SPACING,
|
|
34
28
|
LINE_HEIGHT_BODY,
|
|
35
29
|
LINE_HEIGHT_HEADINGS,
|
|
@@ -1470,195 +1464,6 @@ describe('migration.util', () => {
|
|
|
1470
1464
|
expect(content.layoutStyle).toBe(TEXT_ONLY);
|
|
1471
1465
|
});
|
|
1472
1466
|
|
|
1473
|
-
test('migration17 should backfill contact form padding from its layout style', async () => {
|
|
1474
|
-
const model = await migrateBrandPageModel(getBsModel(), {
|
|
1475
|
-
isUserDraft: false,
|
|
1476
|
-
isServerRender: false,
|
|
1477
|
-
});
|
|
1478
|
-
|
|
1479
|
-
const collapsible = model.brandPageModel.pages[3]
|
|
1480
|
-
.contents[0] as ContactFormContent;
|
|
1481
|
-
const textOnly = model.brandPageModel.pages[3]
|
|
1482
|
-
.contents[1] as ContactFormContent;
|
|
1483
|
-
|
|
1484
|
-
expect(collapsible.topPadding).toBe(0);
|
|
1485
|
-
expect(collapsible.bottomPadding).toBe(0);
|
|
1486
|
-
expect(textOnly.topPadding).toBe(32);
|
|
1487
|
-
expect(textOnly.bottomPadding).toBe(32);
|
|
1488
|
-
});
|
|
1489
|
-
|
|
1490
|
-
test.each([
|
|
1491
|
-
[ALIGN_LEFT_FULL_IMAGE],
|
|
1492
|
-
[ALIGN_RIGHT_FULL_IMAGE],
|
|
1493
|
-
[ALIGN_CARD_CENTER_IMAGE],
|
|
1494
|
-
])(
|
|
1495
|
-
'migration17 should backfill zero padding for the %s contact form layout',
|
|
1496
|
-
async (layoutStyle) => {
|
|
1497
|
-
const brandPageModel = getBsModel();
|
|
1498
|
-
|
|
1499
|
-
(
|
|
1500
|
-
brandPageModel.pages[3].contents[1] as ContactFormContent
|
|
1501
|
-
).layoutStyle = layoutStyle;
|
|
1502
|
-
|
|
1503
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1504
|
-
isUserDraft: false,
|
|
1505
|
-
isServerRender: false,
|
|
1506
|
-
});
|
|
1507
|
-
|
|
1508
|
-
const content = model.brandPageModel.pages[3]
|
|
1509
|
-
.contents[1] as ContactFormContent;
|
|
1510
|
-
|
|
1511
|
-
expect(content.topPadding).toBe(0);
|
|
1512
|
-
expect(content.bottomPadding).toBe(0);
|
|
1513
|
-
},
|
|
1514
|
-
);
|
|
1515
|
-
|
|
1516
|
-
test('migration17 should not overwrite contact form padding that is already set', async () => {
|
|
1517
|
-
const brandPageModel = getBsModel();
|
|
1518
|
-
|
|
1519
|
-
(brandPageModel.pages[3].contents[1] as ContactFormContent).topPadding =
|
|
1520
|
-
10;
|
|
1521
|
-
|
|
1522
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1523
|
-
isUserDraft: false,
|
|
1524
|
-
isServerRender: false,
|
|
1525
|
-
});
|
|
1526
|
-
|
|
1527
|
-
const content = model.brandPageModel.pages[3]
|
|
1528
|
-
.contents[1] as ContactFormContent;
|
|
1529
|
-
|
|
1530
|
-
expect(content.topPadding).toBe(10);
|
|
1531
|
-
expect(content.bottomPadding).toBe(32);
|
|
1532
|
-
});
|
|
1533
|
-
|
|
1534
|
-
test('migration17 should backfill 32 padding for standard banner display styles', async () => {
|
|
1535
|
-
const model = await migrateBrandPageModel(getBsModel(), {
|
|
1536
|
-
isUserDraft: false,
|
|
1537
|
-
isServerRender: false,
|
|
1538
|
-
});
|
|
1539
|
-
|
|
1540
|
-
// pages[0].contents[0] is a 'centered' banner (standard, not full-bleed).
|
|
1541
|
-
const banner = model.brandPageModel.pages[0]
|
|
1542
|
-
.contents[0] as BannerSectionContent;
|
|
1543
|
-
|
|
1544
|
-
expect(banner.topPadding).toBe(32);
|
|
1545
|
-
expect(banner.bottomPadding).toBe(32);
|
|
1546
|
-
});
|
|
1547
|
-
|
|
1548
|
-
test.each([
|
|
1549
|
-
[ALIGN_LEFT_FULL_IMAGE],
|
|
1550
|
-
[ALIGN_RIGHT_FULL_IMAGE],
|
|
1551
|
-
[ALIGN_TOP_FULL_IMAGE],
|
|
1552
|
-
[ALIGN_BOTTOM_FULL_IMAGE],
|
|
1553
|
-
[ALIGN_MIDDLE_FULL_IMAGE],
|
|
1554
|
-
])(
|
|
1555
|
-
'migration17 should backfill zero padding for the %s full-bleed banner style',
|
|
1556
|
-
async (displayStyle) => {
|
|
1557
|
-
const brandPageModel = getBsModel();
|
|
1558
|
-
|
|
1559
|
-
(
|
|
1560
|
-
brandPageModel.pages[0].contents[0] as BannerSectionContent
|
|
1561
|
-
).displayStyle = displayStyle;
|
|
1562
|
-
|
|
1563
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1564
|
-
isUserDraft: false,
|
|
1565
|
-
isServerRender: false,
|
|
1566
|
-
});
|
|
1567
|
-
|
|
1568
|
-
const banner = model.brandPageModel.pages[0]
|
|
1569
|
-
.contents[0] as BannerSectionContent;
|
|
1570
|
-
|
|
1571
|
-
expect(banner.topPadding).toBe(0);
|
|
1572
|
-
expect(banner.bottomPadding).toBe(0);
|
|
1573
|
-
},
|
|
1574
|
-
);
|
|
1575
|
-
|
|
1576
|
-
test('migration17 should backfill 32 padding for standard about display styles', async () => {
|
|
1577
|
-
const model = await migrateBrandPageModel(getBsModel(), {
|
|
1578
|
-
isUserDraft: false,
|
|
1579
|
-
isServerRender: false,
|
|
1580
|
-
});
|
|
1581
|
-
|
|
1582
|
-
// pages[0].contents[2] is a 'centered' about section (standard, not full-image).
|
|
1583
|
-
const about = model.brandPageModel.pages[0]
|
|
1584
|
-
.contents[2] as AboutSectionContent;
|
|
1585
|
-
|
|
1586
|
-
expect(about.topPadding).toBe(32);
|
|
1587
|
-
expect(about.bottomPadding).toBe(32);
|
|
1588
|
-
});
|
|
1589
|
-
|
|
1590
|
-
test.each([[ALIGN_LEFT_FULL_IMAGE], [ALIGN_RIGHT_FULL_IMAGE]])(
|
|
1591
|
-
'migration17 should backfill 32 padding for the %s full-image about style',
|
|
1592
|
-
async (displayStyle) => {
|
|
1593
|
-
const brandPageModel = getBsModel();
|
|
1594
|
-
|
|
1595
|
-
(
|
|
1596
|
-
brandPageModel.pages[0].contents[2] as AboutSectionContent
|
|
1597
|
-
).displayStyle = displayStyle;
|
|
1598
|
-
|
|
1599
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1600
|
-
isUserDraft: false,
|
|
1601
|
-
isServerRender: false,
|
|
1602
|
-
});
|
|
1603
|
-
|
|
1604
|
-
const about = model.brandPageModel.pages[0]
|
|
1605
|
-
.contents[2] as AboutSectionContent;
|
|
1606
|
-
|
|
1607
|
-
expect(about.topPadding).toBe(32);
|
|
1608
|
-
expect(about.bottomPadding).toBe(32);
|
|
1609
|
-
},
|
|
1610
|
-
);
|
|
1611
|
-
|
|
1612
|
-
test('migration17 should backfill 16 padding for the shop section', async () => {
|
|
1613
|
-
const oldTemplate: BrandPageModel = {
|
|
1614
|
-
pages: [
|
|
1615
|
-
{
|
|
1616
|
-
slug: 'shop',
|
|
1617
|
-
title: 'Shop',
|
|
1618
|
-
contents: [{ type: 'shop-section', id: 'shop-1' }],
|
|
1619
|
-
},
|
|
1620
|
-
],
|
|
1621
|
-
brandPageType: 'brandSite',
|
|
1622
|
-
} as any;
|
|
1623
|
-
|
|
1624
|
-
const model = await migrateBrandPageModel(
|
|
1625
|
-
new BrandPageModel(oldTemplate),
|
|
1626
|
-
{
|
|
1627
|
-
isUserDraft: false,
|
|
1628
|
-
isServerRender: false,
|
|
1629
|
-
},
|
|
1630
|
-
);
|
|
1631
|
-
const shop = model.brandPageModel.pages[0].contents[0] as any;
|
|
1632
|
-
|
|
1633
|
-
expect(shop.topPadding).toBe(16);
|
|
1634
|
-
expect(shop.bottomPadding).toBe(16);
|
|
1635
|
-
});
|
|
1636
|
-
|
|
1637
|
-
test('migration17 should not overwrite shop padding that is already set', async () => {
|
|
1638
|
-
const oldTemplate: BrandPageModel = {
|
|
1639
|
-
pages: [
|
|
1640
|
-
{
|
|
1641
|
-
slug: 'shop',
|
|
1642
|
-
title: 'Shop',
|
|
1643
|
-
contents: [{ type: 'shop-section', id: 'shop-1', topPadding: 40 }],
|
|
1644
|
-
},
|
|
1645
|
-
],
|
|
1646
|
-
brandPageType: 'brandSite',
|
|
1647
|
-
} as any;
|
|
1648
|
-
|
|
1649
|
-
const model = await migrateBrandPageModel(
|
|
1650
|
-
new BrandPageModel(oldTemplate),
|
|
1651
|
-
{
|
|
1652
|
-
isUserDraft: false,
|
|
1653
|
-
isServerRender: false,
|
|
1654
|
-
},
|
|
1655
|
-
);
|
|
1656
|
-
const shop = model.brandPageModel.pages[0].contents[0] as any;
|
|
1657
|
-
|
|
1658
|
-
expect(shop.topPadding).toBe(40);
|
|
1659
|
-
expect(shop.bottomPadding).toBe(16);
|
|
1660
|
-
});
|
|
1661
|
-
|
|
1662
1467
|
test('migrateNewLogoLogic should migrate logoDraftToken and logoVariation', () => {
|
|
1663
1468
|
const oldTemplate: BrandPageData = {
|
|
1664
1469
|
pages: [
|
|
@@ -19,7 +19,6 @@ import { migration13 } from './migration/migration-13';
|
|
|
19
19
|
import { migration14 } from './migration/migration-14';
|
|
20
20
|
import { migration15 } from './migration/migration-15';
|
|
21
21
|
import { migration16 } from './migration/migration-16';
|
|
22
|
-
import { migration17 } from './migration/migration-17';
|
|
23
22
|
|
|
24
23
|
export interface MigrationData {
|
|
25
24
|
brandPageModel: BrandPageModel;
|
|
@@ -150,16 +149,6 @@ const MIGRATION_TABLE = [
|
|
|
150
149
|
description:
|
|
151
150
|
'Default sub nav background color to color match on for TAB_2 and hamburger navs depending on font color only on first load flow',
|
|
152
151
|
},
|
|
153
|
-
{
|
|
154
|
-
version: 17,
|
|
155
|
-
migrateFn: migration17,
|
|
156
|
-
// runAlways: re-apply on every load (ticket stack) so already-migrated pages
|
|
157
|
-
// pick up newly-added block defaults (e.g. Store) without a new migration.
|
|
158
|
-
// Idempotent — only backfills when topPadding/bottomPadding aren't already set.
|
|
159
|
-
runAlways: true,
|
|
160
|
-
description:
|
|
161
|
-
'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), contact form (per layout), banner and about (per display style)',
|
|
162
|
-
},
|
|
163
152
|
] as MigrationTableItem[];
|
|
164
153
|
|
|
165
154
|
export const GetLatestModelVersion = () =>
|