@designcrowd/library.brand-page 5.18.9-ast-padding-2 → 5.18.9
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-BmLOUBDj.js → CreatedOnBrandCrowd-de-de-CDdi84ti.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DGCwedd5.js → CreatedOnBrandCrowd-en-us-BvRiqC8_.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-qfWIO62h.js → CreatedOnBrandCrowd-es-es-BGjpqIbV.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Bh6tQfv-.js → CreatedOnBrandCrowd-fr-ca-BSLrflaD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Bh6tQfv-.js → CreatedOnBrandCrowd-fr-fr-BSLrflaD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DBF_gR3z.js → CreatedOnBrandCrowd-pt-br-CYdUgcJs.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-DBF_gR3z.js → CreatedOnBrandCrowd-pt-pt-CYdUgcJs.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-B1ZibTqN.js → CreatedOnDcom-de-de-D3gzpYgh.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-4qS61Om_.js → CreatedOnDcom-en-us-V6QwvLNX.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-yX1FaMrI.js → CreatedOnDcom-es-es-BmgxqURo.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-h5RbgiUo.js → CreatedOnDcom-fr-ca-DEAawXEa.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-4cJbiAWr.js → CreatedOnDcom-fr-fr-Da7MhYpI.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-C0FUKVjn.js → CreatedOnDcom-pt-br-D6WUdxFK.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-CFstpuvQ.js → CreatedOnDcom-pt-pt-CS5m0sQX.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/testimonial-section/TestimonialSection.mixin.d.ts +97 -0
- package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.js +112 -0
- 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/font.constants.d.ts +4 -4
- package/lib/src/brand-page/constants/font.constants.js +4 -4
- package/lib/src/brand-page/constants/misc.constants.d.ts +0 -35
- package/lib/src/brand-page/constants/misc.constants.js +0 -51
- 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 -39
- 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 -39
- 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 +155 -141
- package/lib/src/css/library.brand-page-brandPage.min.css +155 -141
- package/lib/src/css/library.brand-page-designCom.min.css +155 -141
- package/lib/src/css/library.brand-page-preview.min.css +155 -141
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-B3NH7cmE.js → lib--1xJXw4j.js} +21010 -21158
- 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/testimonial-section/TestimonialSection.mixin.ts +132 -0
- package/src/brand-page/components/testimonial-section/TestimonialSection.vue +11 -120
- 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/font.constants.ts +4 -4
- package/src/brand-page/constants/misc.constants.ts +0 -58
- 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/__snapshots__/migration2.util.test.ts.snap +6 -6
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +12 -12
- package/src/brand-page/utils/index.ts +0 -1
- package/src/brand-page/utils/migration.util.test.ts +0 -290
- package/src/brand-page/utils/migration.util.ts +0 -11
- package/src/brand-page-maker/constants/config-settings-constant.ts +0 -45
- 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 -43
- 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/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 -60
- 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 -77
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +0 -50
|
@@ -155,7 +155,7 @@ BrandPageModel {
|
|
|
155
155
|
"borderTopWidth": "0px",
|
|
156
156
|
"color": undefined,
|
|
157
157
|
"fontFamily": "Lato",
|
|
158
|
-
"fontSize": "
|
|
158
|
+
"fontSize": "1rem",
|
|
159
159
|
"fontStyle": undefined,
|
|
160
160
|
"fontWeight": "normal",
|
|
161
161
|
"textAlign": "center",
|
|
@@ -229,7 +229,7 @@ BrandPageModel {
|
|
|
229
229
|
"borderTopWidth": "0px",
|
|
230
230
|
"color": undefined,
|
|
231
231
|
"fontFamily": "Lato",
|
|
232
|
-
"fontSize": "
|
|
232
|
+
"fontSize": "1rem",
|
|
233
233
|
"fontStyle": undefined,
|
|
234
234
|
"fontWeight": "normal",
|
|
235
235
|
"textAlign": "center",
|
|
@@ -384,7 +384,7 @@ BrandPageModel {
|
|
|
384
384
|
"style": {
|
|
385
385
|
"color": undefined,
|
|
386
386
|
"fontFamily": "Lato",
|
|
387
|
-
"fontSize": "
|
|
387
|
+
"fontSize": "1rem",
|
|
388
388
|
"fontStyle": undefined,
|
|
389
389
|
"fontWeight": undefined,
|
|
390
390
|
"letterSpacing": undefined,
|
|
@@ -400,7 +400,7 @@ BrandPageModel {
|
|
|
400
400
|
"style": {
|
|
401
401
|
"color": undefined,
|
|
402
402
|
"fontFamily": "Lato",
|
|
403
|
-
"fontSize": "1.
|
|
403
|
+
"fontSize": "1.5rem",
|
|
404
404
|
"fontStyle": undefined,
|
|
405
405
|
"fontWeight": undefined,
|
|
406
406
|
"letterSpacing": undefined,
|
|
@@ -416,7 +416,7 @@ BrandPageModel {
|
|
|
416
416
|
"style": {
|
|
417
417
|
"color": undefined,
|
|
418
418
|
"fontFamily": "Lato",
|
|
419
|
-
"fontSize": "
|
|
419
|
+
"fontSize": "1rem",
|
|
420
420
|
"fontStyle": undefined,
|
|
421
421
|
"fontWeight": undefined,
|
|
422
422
|
"letterSpacing": undefined,
|
|
@@ -432,7 +432,7 @@ BrandPageModel {
|
|
|
432
432
|
"style": {
|
|
433
433
|
"color": undefined,
|
|
434
434
|
"fontFamily": "Lato",
|
|
435
|
-
"fontSize": "2.
|
|
435
|
+
"fontSize": "2.25rem",
|
|
436
436
|
"fontStyle": undefined,
|
|
437
437
|
"fontWeight": undefined,
|
|
438
438
|
"letterSpacing": undefined,
|
|
@@ -605,7 +605,7 @@ BrandPageModel {
|
|
|
605
605
|
"borderTopWidth": "0px",
|
|
606
606
|
"color": undefined,
|
|
607
607
|
"fontFamily": "Lato",
|
|
608
|
-
"fontSize": "
|
|
608
|
+
"fontSize": "1rem",
|
|
609
609
|
"fontStyle": undefined,
|
|
610
610
|
"fontWeight": "normal",
|
|
611
611
|
"textAlign": "center",
|
|
@@ -679,7 +679,7 @@ BrandPageModel {
|
|
|
679
679
|
"borderTopWidth": "0px",
|
|
680
680
|
"color": undefined,
|
|
681
681
|
"fontFamily": "Lato",
|
|
682
|
-
"fontSize": "
|
|
682
|
+
"fontSize": "1rem",
|
|
683
683
|
"fontStyle": undefined,
|
|
684
684
|
"fontWeight": "normal",
|
|
685
685
|
"textAlign": "center",
|
|
@@ -849,7 +849,7 @@ BrandPageModel {
|
|
|
849
849
|
"style": {
|
|
850
850
|
"color": undefined,
|
|
851
851
|
"fontFamily": "Lato",
|
|
852
|
-
"fontSize": "
|
|
852
|
+
"fontSize": "1rem",
|
|
853
853
|
"fontStyle": undefined,
|
|
854
854
|
"fontWeight": undefined,
|
|
855
855
|
"letterSpacing": undefined,
|
|
@@ -865,7 +865,7 @@ BrandPageModel {
|
|
|
865
865
|
"style": {
|
|
866
866
|
"color": undefined,
|
|
867
867
|
"fontFamily": "Lato",
|
|
868
|
-
"fontSize": "1.
|
|
868
|
+
"fontSize": "1.5rem",
|
|
869
869
|
"fontStyle": undefined,
|
|
870
870
|
"fontWeight": undefined,
|
|
871
871
|
"letterSpacing": undefined,
|
|
@@ -881,7 +881,7 @@ BrandPageModel {
|
|
|
881
881
|
"style": {
|
|
882
882
|
"color": undefined,
|
|
883
883
|
"fontFamily": "Lato",
|
|
884
|
-
"fontSize": "
|
|
884
|
+
"fontSize": "1rem",
|
|
885
885
|
"fontStyle": undefined,
|
|
886
886
|
"fontWeight": undefined,
|
|
887
887
|
"letterSpacing": undefined,
|
|
@@ -897,7 +897,7 @@ BrandPageModel {
|
|
|
897
897
|
"style": {
|
|
898
898
|
"color": undefined,
|
|
899
899
|
"fontFamily": "Lato",
|
|
900
|
-
"fontSize": "2.
|
|
900
|
+
"fontSize": "2.25rem",
|
|
901
901
|
"fontStyle": undefined,
|
|
902
902
|
"fontWeight": undefined,
|
|
903
903
|
"letterSpacing": undefined,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { migrateBrandPageModel } from './migration.util';
|
|
2
2
|
import { migrateNewLogoLogic } from './migration/migration-01';
|
|
3
|
-
import { migration17 } from './migration/migration-17';
|
|
4
3
|
import {
|
|
5
4
|
BrandPageModel,
|
|
6
5
|
type BrandPageData,
|
|
@@ -25,18 +24,11 @@ import {
|
|
|
25
24
|
createInitialTestimonialSectionContent,
|
|
26
25
|
} from '@brand-page-maker/models';
|
|
27
26
|
import {
|
|
28
|
-
ALIGN_CARD_CENTER_IMAGE,
|
|
29
|
-
ALIGN_LEFT_FULL_IMAGE,
|
|
30
|
-
ALIGN_RIGHT_FULL_IMAGE,
|
|
31
|
-
ALIGN_TOP_FULL_IMAGE,
|
|
32
|
-
ALIGN_BOTTOM_FULL_IMAGE,
|
|
33
|
-
ALIGN_MIDDLE_FULL_IMAGE,
|
|
34
27
|
DEFAULT_LETTER_SPACING,
|
|
35
28
|
LINE_HEIGHT_BODY,
|
|
36
29
|
LINE_HEIGHT_HEADINGS,
|
|
37
30
|
LINE_HEIGHT_TITLE,
|
|
38
31
|
TEXT_ONLY,
|
|
39
|
-
TESTIMONIAL_DEFAULT_PADDING,
|
|
40
32
|
} from '../constants';
|
|
41
33
|
|
|
42
34
|
describe('migration.util', () => {
|
|
@@ -1472,288 +1464,6 @@ describe('migration.util', () => {
|
|
|
1472
1464
|
expect(content.layoutStyle).toBe(TEXT_ONLY);
|
|
1473
1465
|
});
|
|
1474
1466
|
|
|
1475
|
-
test('migration17 should backfill contact form padding from its layout style', async () => {
|
|
1476
|
-
const model = await migrateBrandPageModel(getBsModel(), {
|
|
1477
|
-
isUserDraft: false,
|
|
1478
|
-
isServerRender: false,
|
|
1479
|
-
});
|
|
1480
|
-
|
|
1481
|
-
const collapsible = model.brandPageModel.pages[3]
|
|
1482
|
-
.contents[0] as ContactFormContent;
|
|
1483
|
-
const textOnly = model.brandPageModel.pages[3]
|
|
1484
|
-
.contents[1] as ContactFormContent;
|
|
1485
|
-
|
|
1486
|
-
expect(collapsible.topPadding).toBe(0);
|
|
1487
|
-
expect(collapsible.bottomPadding).toBe(0);
|
|
1488
|
-
expect(textOnly.topPadding).toBe(32);
|
|
1489
|
-
expect(textOnly.bottomPadding).toBe(32);
|
|
1490
|
-
});
|
|
1491
|
-
|
|
1492
|
-
test.each([
|
|
1493
|
-
[ALIGN_LEFT_FULL_IMAGE],
|
|
1494
|
-
[ALIGN_RIGHT_FULL_IMAGE],
|
|
1495
|
-
[ALIGN_CARD_CENTER_IMAGE],
|
|
1496
|
-
])(
|
|
1497
|
-
'migration17 should backfill zero padding for the %s contact form layout',
|
|
1498
|
-
async (layoutStyle) => {
|
|
1499
|
-
const brandPageModel = getBsModel();
|
|
1500
|
-
|
|
1501
|
-
(
|
|
1502
|
-
brandPageModel.pages[3].contents[1] as ContactFormContent
|
|
1503
|
-
).layoutStyle = layoutStyle;
|
|
1504
|
-
|
|
1505
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1506
|
-
isUserDraft: false,
|
|
1507
|
-
isServerRender: false,
|
|
1508
|
-
});
|
|
1509
|
-
|
|
1510
|
-
const content = model.brandPageModel.pages[3]
|
|
1511
|
-
.contents[1] as ContactFormContent;
|
|
1512
|
-
|
|
1513
|
-
expect(content.topPadding).toBe(0);
|
|
1514
|
-
expect(content.bottomPadding).toBe(0);
|
|
1515
|
-
},
|
|
1516
|
-
);
|
|
1517
|
-
|
|
1518
|
-
test('migration17 should not overwrite contact form padding that is already set', async () => {
|
|
1519
|
-
const brandPageModel = getBsModel();
|
|
1520
|
-
|
|
1521
|
-
(brandPageModel.pages[3].contents[1] as ContactFormContent).topPadding =
|
|
1522
|
-
10;
|
|
1523
|
-
|
|
1524
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1525
|
-
isUserDraft: false,
|
|
1526
|
-
isServerRender: false,
|
|
1527
|
-
});
|
|
1528
|
-
|
|
1529
|
-
const content = model.brandPageModel.pages[3]
|
|
1530
|
-
.contents[1] as ContactFormContent;
|
|
1531
|
-
|
|
1532
|
-
expect(content.topPadding).toBe(10);
|
|
1533
|
-
expect(content.bottomPadding).toBe(32);
|
|
1534
|
-
});
|
|
1535
|
-
|
|
1536
|
-
test('migration17 should backfill 32 padding for standard banner display styles', async () => {
|
|
1537
|
-
const model = await migrateBrandPageModel(getBsModel(), {
|
|
1538
|
-
isUserDraft: false,
|
|
1539
|
-
isServerRender: false,
|
|
1540
|
-
});
|
|
1541
|
-
|
|
1542
|
-
// pages[0].contents[0] is a 'centered' banner (standard, not full-bleed).
|
|
1543
|
-
const banner = model.brandPageModel.pages[0]
|
|
1544
|
-
.contents[0] as BannerSectionContent;
|
|
1545
|
-
|
|
1546
|
-
expect(banner.topPadding).toBe(32);
|
|
1547
|
-
expect(banner.bottomPadding).toBe(32);
|
|
1548
|
-
});
|
|
1549
|
-
|
|
1550
|
-
test.each([
|
|
1551
|
-
[ALIGN_LEFT_FULL_IMAGE],
|
|
1552
|
-
[ALIGN_RIGHT_FULL_IMAGE],
|
|
1553
|
-
[ALIGN_TOP_FULL_IMAGE],
|
|
1554
|
-
[ALIGN_BOTTOM_FULL_IMAGE],
|
|
1555
|
-
[ALIGN_MIDDLE_FULL_IMAGE],
|
|
1556
|
-
])(
|
|
1557
|
-
'migration17 should backfill zero padding for the %s full-bleed banner style',
|
|
1558
|
-
async (displayStyle) => {
|
|
1559
|
-
const brandPageModel = getBsModel();
|
|
1560
|
-
|
|
1561
|
-
(
|
|
1562
|
-
brandPageModel.pages[0].contents[0] as BannerSectionContent
|
|
1563
|
-
).displayStyle = displayStyle;
|
|
1564
|
-
|
|
1565
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1566
|
-
isUserDraft: false,
|
|
1567
|
-
isServerRender: false,
|
|
1568
|
-
});
|
|
1569
|
-
|
|
1570
|
-
const banner = model.brandPageModel.pages[0]
|
|
1571
|
-
.contents[0] as BannerSectionContent;
|
|
1572
|
-
|
|
1573
|
-
expect(banner.topPadding).toBe(0);
|
|
1574
|
-
expect(banner.bottomPadding).toBe(0);
|
|
1575
|
-
},
|
|
1576
|
-
);
|
|
1577
|
-
|
|
1578
|
-
test('migration17 should backfill 32 padding for standard about display styles', async () => {
|
|
1579
|
-
const model = await migrateBrandPageModel(getBsModel(), {
|
|
1580
|
-
isUserDraft: false,
|
|
1581
|
-
isServerRender: false,
|
|
1582
|
-
});
|
|
1583
|
-
|
|
1584
|
-
// pages[0].contents[2] is a 'centered' about section (standard, not full-image).
|
|
1585
|
-
const about = model.brandPageModel.pages[0]
|
|
1586
|
-
.contents[2] as AboutSectionContent;
|
|
1587
|
-
|
|
1588
|
-
expect(about.topPadding).toBe(32);
|
|
1589
|
-
expect(about.bottomPadding).toBe(32);
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1592
|
-
test.each([[ALIGN_LEFT_FULL_IMAGE], [ALIGN_RIGHT_FULL_IMAGE]])(
|
|
1593
|
-
'migration17 should backfill 32 padding for the %s full-image about style',
|
|
1594
|
-
async (displayStyle) => {
|
|
1595
|
-
const brandPageModel = getBsModel();
|
|
1596
|
-
|
|
1597
|
-
(
|
|
1598
|
-
brandPageModel.pages[0].contents[2] as AboutSectionContent
|
|
1599
|
-
).displayStyle = displayStyle;
|
|
1600
|
-
|
|
1601
|
-
const model = await migrateBrandPageModel(brandPageModel, {
|
|
1602
|
-
isUserDraft: false,
|
|
1603
|
-
isServerRender: false,
|
|
1604
|
-
});
|
|
1605
|
-
|
|
1606
|
-
const about = model.brandPageModel.pages[0]
|
|
1607
|
-
.contents[2] as AboutSectionContent;
|
|
1608
|
-
|
|
1609
|
-
expect(about.topPadding).toBe(32);
|
|
1610
|
-
expect(about.bottomPadding).toBe(32);
|
|
1611
|
-
},
|
|
1612
|
-
);
|
|
1613
|
-
|
|
1614
|
-
test('migration17 should backfill 16 padding for the shop section', async () => {
|
|
1615
|
-
const oldTemplate: BrandPageModel = {
|
|
1616
|
-
pages: [
|
|
1617
|
-
{
|
|
1618
|
-
slug: 'shop',
|
|
1619
|
-
title: 'Shop',
|
|
1620
|
-
contents: [{ type: 'shop-section', id: 'shop-1' }],
|
|
1621
|
-
},
|
|
1622
|
-
],
|
|
1623
|
-
brandPageType: 'brandSite',
|
|
1624
|
-
} as any;
|
|
1625
|
-
|
|
1626
|
-
const model = await migrateBrandPageModel(
|
|
1627
|
-
new BrandPageModel(oldTemplate),
|
|
1628
|
-
{
|
|
1629
|
-
isUserDraft: false,
|
|
1630
|
-
isServerRender: false,
|
|
1631
|
-
},
|
|
1632
|
-
);
|
|
1633
|
-
const shop = model.brandPageModel.pages[0].contents[0] as any;
|
|
1634
|
-
|
|
1635
|
-
expect(shop.topPadding).toBe(16);
|
|
1636
|
-
expect(shop.bottomPadding).toBe(16);
|
|
1637
|
-
});
|
|
1638
|
-
|
|
1639
|
-
test('migration17 should not overwrite shop padding that is already set', async () => {
|
|
1640
|
-
const oldTemplate: BrandPageModel = {
|
|
1641
|
-
pages: [
|
|
1642
|
-
{
|
|
1643
|
-
slug: 'shop',
|
|
1644
|
-
title: 'Shop',
|
|
1645
|
-
contents: [{ type: 'shop-section', id: 'shop-1', topPadding: 40 }],
|
|
1646
|
-
},
|
|
1647
|
-
],
|
|
1648
|
-
brandPageType: 'brandSite',
|
|
1649
|
-
} as any;
|
|
1650
|
-
|
|
1651
|
-
const model = await migrateBrandPageModel(
|
|
1652
|
-
new BrandPageModel(oldTemplate),
|
|
1653
|
-
{
|
|
1654
|
-
isUserDraft: false,
|
|
1655
|
-
isServerRender: false,
|
|
1656
|
-
},
|
|
1657
|
-
);
|
|
1658
|
-
const shop = model.brandPageModel.pages[0].contents[0] as any;
|
|
1659
|
-
|
|
1660
|
-
expect(shop.topPadding).toBe(40);
|
|
1661
|
-
expect(shop.bottomPadding).toBe(16);
|
|
1662
|
-
});
|
|
1663
|
-
|
|
1664
|
-
test('migration17 should backfill the single testimonial padding across both breakpoints', async () => {
|
|
1665
|
-
const oldTemplate: BrandPageModel = {
|
|
1666
|
-
pages: [
|
|
1667
|
-
{
|
|
1668
|
-
slug: 'testimonials',
|
|
1669
|
-
title: 'Testimonials',
|
|
1670
|
-
contents: [{ type: 'testimonial-section', id: 'testimonial-1' }],
|
|
1671
|
-
},
|
|
1672
|
-
],
|
|
1673
|
-
brandPageType: 'brandSite',
|
|
1674
|
-
} as any;
|
|
1675
|
-
|
|
1676
|
-
const model = await migrateBrandPageModel(
|
|
1677
|
-
new BrandPageModel(oldTemplate),
|
|
1678
|
-
{
|
|
1679
|
-
isUserDraft: false,
|
|
1680
|
-
isServerRender: false,
|
|
1681
|
-
},
|
|
1682
|
-
);
|
|
1683
|
-
const testimonial = model.brandPageModel.pages[0].contents[0] as any;
|
|
1684
|
-
|
|
1685
|
-
expect(testimonial.topPadding).toBe(TESTIMONIAL_DEFAULT_PADDING);
|
|
1686
|
-
expect(testimonial.bottomPadding).toBe(TESTIMONIAL_DEFAULT_PADDING);
|
|
1687
|
-
});
|
|
1688
|
-
|
|
1689
|
-
test('migration17 should not overwrite testimonial padding that is already set', async () => {
|
|
1690
|
-
const oldTemplate: BrandPageModel = {
|
|
1691
|
-
pages: [
|
|
1692
|
-
{
|
|
1693
|
-
slug: 'testimonials',
|
|
1694
|
-
title: 'Testimonials',
|
|
1695
|
-
contents: [
|
|
1696
|
-
{
|
|
1697
|
-
type: 'testimonial-section',
|
|
1698
|
-
id: 'testimonial-1',
|
|
1699
|
-
topPadding: 40,
|
|
1700
|
-
},
|
|
1701
|
-
],
|
|
1702
|
-
},
|
|
1703
|
-
],
|
|
1704
|
-
brandPageType: 'brandSite',
|
|
1705
|
-
} as any;
|
|
1706
|
-
|
|
1707
|
-
const model = await migrateBrandPageModel(
|
|
1708
|
-
new BrandPageModel(oldTemplate),
|
|
1709
|
-
{
|
|
1710
|
-
isUserDraft: false,
|
|
1711
|
-
isServerRender: false,
|
|
1712
|
-
},
|
|
1713
|
-
);
|
|
1714
|
-
const testimonial = model.brandPageModel.pages[0].contents[0] as any;
|
|
1715
|
-
|
|
1716
|
-
expect(testimonial.topPadding).toBe(40);
|
|
1717
|
-
expect(testimonial.bottomPadding).toBe(TESTIMONIAL_DEFAULT_PADDING);
|
|
1718
|
-
});
|
|
1719
|
-
|
|
1720
|
-
const runMigration17ForText = async (brandPageType: string) => {
|
|
1721
|
-
const brandPageModel = {
|
|
1722
|
-
brandPageType,
|
|
1723
|
-
pages: [
|
|
1724
|
-
{
|
|
1725
|
-
slug: 'home',
|
|
1726
|
-
title: 'Home',
|
|
1727
|
-
contents: [{ type: 'text', id: 'text-1' }],
|
|
1728
|
-
},
|
|
1729
|
-
],
|
|
1730
|
-
} as any;
|
|
1731
|
-
|
|
1732
|
-
const result = await migration17({
|
|
1733
|
-
brandPageModel,
|
|
1734
|
-
useOldLogoRenderSize: false,
|
|
1735
|
-
});
|
|
1736
|
-
|
|
1737
|
-
return result.brandPageModel.pages[0].contents[0] as any;
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
test('migration17 should backfill 12 text padding for brand site', async () => {
|
|
1741
|
-
const text = await runMigration17ForText('brandSite');
|
|
1742
|
-
|
|
1743
|
-
expect(text.topPadding).toBe(12);
|
|
1744
|
-
expect(text.bottomPadding).toBe(12);
|
|
1745
|
-
});
|
|
1746
|
-
|
|
1747
|
-
test.each(['default', 'brandContact'])(
|
|
1748
|
-
'migration17 should backfill 0 text padding for %s (Brand Page / Brand Contact)',
|
|
1749
|
-
async (brandPageType) => {
|
|
1750
|
-
const text = await runMigration17ForText(brandPageType);
|
|
1751
|
-
|
|
1752
|
-
expect(text.topPadding).toBe(0);
|
|
1753
|
-
expect(text.bottomPadding).toBe(0);
|
|
1754
|
-
},
|
|
1755
|
-
);
|
|
1756
|
-
|
|
1757
1467
|
test('migrateNewLogoLogic should migrate logoDraftToken and logoVariation', () => {
|
|
1758
1468
|
const oldTemplate: BrandPageData = {
|
|
1759
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 = () =>
|
|
@@ -201,34 +201,6 @@ const SETTINGS_STYLE_FIElD_GROUPS = (): ContentSettingsFieldGroup[] => {
|
|
|
201
201
|
];
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
/**
|
|
205
|
-
* Shared Top/Bottom padding sliders (BP-5687). Reuses the same `slider` control
|
|
206
|
-
* as the Divider block (track + editable number box), range 0–100, continuous.
|
|
207
|
-
* Spread into a block's `fields` to expose the Padding Control on that block.
|
|
208
|
-
* Pass the Style field-group id for blocks that use grouped panels.
|
|
209
|
-
*/
|
|
210
|
-
const PADDING_CONTROL_FIELDS = (
|
|
211
|
-
groupId?: string,
|
|
212
|
-
): {
|
|
213
|
-
topPadding: ContentSettingsField<Content>;
|
|
214
|
-
bottomPadding: ContentSettingsField<Content>;
|
|
215
|
-
} => ({
|
|
216
|
-
topPadding: {
|
|
217
|
-
type: 'slider',
|
|
218
|
-
title: contentSettingsTr(`topPaddingTitle`),
|
|
219
|
-
minLength: 0,
|
|
220
|
-
maxLength: 100,
|
|
221
|
-
groupId,
|
|
222
|
-
},
|
|
223
|
-
bottomPadding: {
|
|
224
|
-
type: 'slider',
|
|
225
|
-
title: contentSettingsTr(`bottomPaddingTitle`),
|
|
226
|
-
minLength: 0,
|
|
227
|
-
maxLength: 100,
|
|
228
|
-
groupId,
|
|
229
|
-
},
|
|
230
|
-
});
|
|
231
|
-
|
|
232
204
|
const DEFAULT_TITLE_STYLE_SETTINGS_FILED =
|
|
233
205
|
(): ContentSettingsField<Content> => ({
|
|
234
206
|
type: 'text-style',
|
|
@@ -1125,7 +1097,6 @@ export const IMAGE_GALLERY_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
1125
1097
|
defaultValue: false,
|
|
1126
1098
|
visibilityAssessor: imageGalleryFieldVisibilityAssessor,
|
|
1127
1099
|
},
|
|
1128
|
-
...PADDING_CONTROL_FIELDS(),
|
|
1129
1100
|
},
|
|
1130
1101
|
isEnabled: true,
|
|
1131
1102
|
isLocked: (features) => !features.canAddImageContents,
|
|
@@ -1165,7 +1136,6 @@ export const VIDEO_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
1165
1136
|
label: contentSettingsTr(`muteLabel`),
|
|
1166
1137
|
valueConvertor: videoContentStateConvertor,
|
|
1167
1138
|
},
|
|
1168
|
-
...PADDING_CONTROL_FIELDS(),
|
|
1169
1139
|
},
|
|
1170
1140
|
isEnabled: true,
|
|
1171
1141
|
isLocked: (features) => !features.canAddVideoContents,
|
|
@@ -1308,7 +1278,6 @@ export const TEXT_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
1308
1278
|
variant: 'icon',
|
|
1309
1279
|
visibilityAssessor: brandSiteTypeVisibilityAssessor,
|
|
1310
1280
|
},
|
|
1311
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
1312
1281
|
backgroundColor: {
|
|
1313
1282
|
type: 'color',
|
|
1314
1283
|
defaultValue: {},
|
|
@@ -1767,7 +1736,6 @@ export const MAP_CONTENT_SETTINGS_CONFIG =
|
|
|
1767
1736
|
type: 'address',
|
|
1768
1737
|
title: contentSettingsTr(`addressTitle`),
|
|
1769
1738
|
},
|
|
1770
|
-
...PADDING_CONTROL_FIELDS(),
|
|
1771
1739
|
},
|
|
1772
1740
|
isEnabled: true,
|
|
1773
1741
|
isLocked: (features) => !features.canAddMapContents,
|
|
@@ -1819,7 +1787,6 @@ export const MAILING_LIST_CONTENT_SETTINGS_CONFIG =
|
|
|
1819
1787
|
},
|
|
1820
1788
|
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
1821
1789
|
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
1822
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
1823
1790
|
},
|
|
1824
1791
|
isEnabled: true,
|
|
1825
1792
|
isLocked: false,
|
|
@@ -2004,7 +1971,6 @@ export const REQUEST_PAYMENT_CONTENT_SETTINGS_CONFIG =
|
|
|
2004
1971
|
defaultValue: {},
|
|
2005
1972
|
label: contentSettingsTr(`buttonTextStyleLabel`),
|
|
2006
1973
|
},
|
|
2007
|
-
...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
|
|
2008
1974
|
},
|
|
2009
1975
|
isEnabled: (features) => features.canAddRequestPaymentContents,
|
|
2010
1976
|
isLocked: false,
|
|
@@ -2072,7 +2038,6 @@ export const SUPPORT_ME_CONTENT_SETTINGS_CONFIG =
|
|
|
2072
2038
|
label: contentSettingsTr(`itemStyleLabel`),
|
|
2073
2039
|
},
|
|
2074
2040
|
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
2075
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2076
2041
|
},
|
|
2077
2042
|
isEnabled: (features) => features.canAddRequestPaymentContents,
|
|
2078
2043
|
isLocked: false,
|
|
@@ -2205,7 +2170,6 @@ export const CONTACT_FORM_SETTINGS_CONFIG =
|
|
|
2205
2170
|
variant: 'icon',
|
|
2206
2171
|
visibilityAssessor: brandSiteTypeVisibilityAssessor,
|
|
2207
2172
|
},
|
|
2208
|
-
...PADDING_CONTROL_FIELDS(CONTACT_FORM_GROUPS.style),
|
|
2209
2173
|
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
2210
2174
|
descriptionStyle: DEFAULT_DESCRIPTION_STYLE_FILED(),
|
|
2211
2175
|
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
@@ -2265,7 +2229,6 @@ export const BANNER_SECTION_SETTINGS_CONFIG =
|
|
|
2265
2229
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2266
2230
|
variant: 'icon',
|
|
2267
2231
|
},
|
|
2268
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2269
2232
|
overlayColor: {
|
|
2270
2233
|
type: 'color',
|
|
2271
2234
|
title: contentSettingsTr(`overlayColorTitle`),
|
|
@@ -2544,7 +2507,6 @@ export const ABOUT_SECTION_SETTINGS_CONFIG =
|
|
|
2544
2507
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2545
2508
|
variant: 'icon',
|
|
2546
2509
|
},
|
|
2547
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2548
2510
|
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
2549
2511
|
paragraphStyle: {
|
|
2550
2512
|
type: 'text-style',
|
|
@@ -2632,7 +2594,6 @@ export const IMAGES_SECTION_SETTINGS_CONFIG =
|
|
|
2632
2594
|
],
|
|
2633
2595
|
fields: {
|
|
2634
2596
|
displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.image),
|
|
2635
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2636
2597
|
aspectRatio: {
|
|
2637
2598
|
type: 'radio',
|
|
2638
2599
|
role: 'multi',
|
|
@@ -2720,7 +2681,6 @@ export const TESTIMONIALS_SECTION_SETTINGS_CONFIG =
|
|
|
2720
2681
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2721
2682
|
variant: 'icon',
|
|
2722
2683
|
},
|
|
2723
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2724
2684
|
title: {
|
|
2725
2685
|
type: 'text',
|
|
2726
2686
|
placeholder: contentSettingsTr(`titlePlaceholder`),
|
|
@@ -2833,7 +2793,6 @@ export const SOCIAL_LINKS_SETTINGS_CONFIG =
|
|
|
2833
2793
|
optionsConvertor: socialLinksIconDisplayStyleConvertor,
|
|
2834
2794
|
variant: 'icon',
|
|
2835
2795
|
},
|
|
2836
|
-
...PADDING_CONTROL_FIELDS(SOCIAL_LINKS_GROUPS.style),
|
|
2837
2796
|
titleStyle: {
|
|
2838
2797
|
type: 'text-style',
|
|
2839
2798
|
groupId: SOCIAL_LINKS_GROUPS.style,
|
|
@@ -2946,7 +2905,6 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
|
|
|
2946
2905
|
],
|
|
2947
2906
|
fields: {
|
|
2948
2907
|
displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.shape),
|
|
2949
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2950
2908
|
size: IMAGE_SIZE_FIELD(),
|
|
2951
2909
|
title: TEXT_MEDIA_TITLE_FIELD(),
|
|
2952
2910
|
description: TEXT_MEDIA_DESCRIPTION_FIELD(),
|
|
@@ -2984,7 +2942,6 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
|
|
|
2984
2942
|
? MAX_BS_MEDIA_AND_IMAGE_ITEMS
|
|
2985
2943
|
: MAX_BP_MEDIA_AND_IMAGE_ITEMS,
|
|
2986
2944
|
},
|
|
2987
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2988
2945
|
},
|
|
2989
2946
|
isEnabled: true,
|
|
2990
2947
|
isLocked: false,
|
|
@@ -3046,7 +3003,6 @@ export const SHOP_SECTION_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
3046
3003
|
optionsConvertor: shopAspectRatioConvertor,
|
|
3047
3004
|
visibilityAssessor: shopImageOptionVisibilityAssessor,
|
|
3048
3005
|
},
|
|
3049
|
-
...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
|
|
3050
3006
|
title: {
|
|
3051
3007
|
type: 'title',
|
|
3052
3008
|
groupId: REQUEST_PAYMENT_GROUPS.settings,
|
|
@@ -3210,7 +3166,6 @@ export const BOOKING_SECTION_SETTINGS_CONFIG =
|
|
|
3210
3166
|
visibilityAssessor: (c, b) =>
|
|
3211
3167
|
personalisationOverrideVisibility(c, b, 'buttonText'),
|
|
3212
3168
|
},
|
|
3213
|
-
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
3214
3169
|
backgroundStyle: {
|
|
3215
3170
|
type: 'color',
|
|
3216
3171
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
ALIGN_RIGHT_ALIGNED,
|
|
7
7
|
ALIGN_RIGHT_FULL_IMAGE,
|
|
8
8
|
TEXT_ONLY,
|
|
9
|
-
ABOUT_DEFAULT_PADDING,
|
|
10
9
|
} from '@brand-page/constants';
|
|
11
10
|
|
|
12
11
|
import type { AboutSectionContent } from '@brand-page';
|
|
@@ -77,18 +76,11 @@ export const aboutDisplayStyleConvertor: ValueConvertor<
|
|
|
77
76
|
convertBack(config: ButtonGroupConfig): Partial<AboutSectionContent> {
|
|
78
77
|
const selectedOption = config.options.find((v) => v.isSelected);
|
|
79
78
|
|
|
80
|
-
// Switching display style adopts that style's canonical look — like the
|
|
81
|
-
// textAlign reset below — including its default block padding (a flat 32
|
|
82
|
-
// for every About style).
|
|
83
|
-
const padding = ABOUT_DEFAULT_PADDING;
|
|
84
|
-
|
|
85
79
|
if (!selectedOption || selectedOption.value === ALIGN_CENTERED) {
|
|
86
80
|
const textAlign = 'center';
|
|
87
81
|
|
|
88
82
|
return {
|
|
89
83
|
displayStyle: selectedOption?.value,
|
|
90
|
-
topPadding: padding,
|
|
91
|
-
bottomPadding: padding,
|
|
92
84
|
titleStyle: {
|
|
93
85
|
textAlign,
|
|
94
86
|
},
|
|
@@ -102,8 +94,6 @@ export const aboutDisplayStyleConvertor: ValueConvertor<
|
|
|
102
94
|
|
|
103
95
|
return {
|
|
104
96
|
displayStyle: selectedOption?.value,
|
|
105
|
-
topPadding: padding,
|
|
106
|
-
bottomPadding: padding,
|
|
107
97
|
titleStyle: {
|
|
108
98
|
textAlign,
|
|
109
99
|
},
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
ALIGN_TOP_FULL_IMAGE,
|
|
16
16
|
ALIGN_BOTTOM_FULL_IMAGE,
|
|
17
17
|
ALIGN_MIDDLE_FULL_IMAGE,
|
|
18
|
-
bannerDisplayStyleDefaultPadding,
|
|
19
18
|
} from '@brand-page/constants';
|
|
20
19
|
import type { BannerSectionContent } from '@brand-page';
|
|
21
20
|
|
|
@@ -173,15 +172,8 @@ export const bannerAlignDisplayStyleConvertor: ValueConvertor<
|
|
|
173
172
|
textAlign = 'center';
|
|
174
173
|
}
|
|
175
174
|
|
|
176
|
-
// Switching display style adopts that style's canonical look — like the
|
|
177
|
-
// textAlign resets above — including its default block padding. Full-bleed
|
|
178
|
-
// image styles default to 0 (image flush to the edges); the rest to 32.
|
|
179
|
-
const padding = bannerDisplayStyleDefaultPadding(selectedOption?.value);
|
|
180
|
-
|
|
181
175
|
return {
|
|
182
176
|
displayStyle: selectedOption?.value,
|
|
183
|
-
topPadding: padding,
|
|
184
|
-
bottomPadding: padding,
|
|
185
177
|
titleStyle: {
|
|
186
178
|
textAlign,
|
|
187
179
|
},
|