@designcrowd/library.brand-page 5.18.6-ast-padding-1 → 5.18.6

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.
Files changed (129) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CAtPZtwo.js → CreatedOnBrandCrowd-de-de-DlYq1LAT.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Dcx4yFkK.js → CreatedOnBrandCrowd-en-us-BssRIQqn.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DpodH0gD.js → CreatedOnBrandCrowd-es-es-BGF9pptH.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DZbMRJn-.js → CreatedOnBrandCrowd-fr-ca-Caupqu2Z.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DZbMRJn-.js → CreatedOnBrandCrowd-fr-fr-Caupqu2Z.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-C3gBveLk.js → CreatedOnBrandCrowd-pt-br-s9q4uJ4u.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-C3gBveLk.js → CreatedOnBrandCrowd-pt-pt-s9q4uJ4u.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DHNyyTV9.js → CreatedOnDcom-de-de-UnYnZbA7.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BjqZ0Jmw.js → CreatedOnDcom-en-us-rDv6H12L.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-tiNjDJmH.js → CreatedOnDcom-es-es-DKPLaT6o.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-COUSI6w1.js → CreatedOnDcom-fr-ca-DAv34bG7.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-c3UCfh9A.js → CreatedOnDcom-fr-fr-DsOHnS8q.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-U1jbo_g5.js → CreatedOnDcom-pt-br-DpjDBCLj.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-BOW_n3bo.js → CreatedOnDcom-pt-pt-rFG0unf1.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +0 -4
  16. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +4 -8
  17. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +0 -4
  18. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +0 -4
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +0 -4
  20. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +1 -4
  21. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +0 -4
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +0 -4
  23. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +0 -4
  24. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +1 -4
  25. package/lib/src/brand-page/components/video/Video.mixin.d.ts +0 -4
  26. package/lib/src/brand-page/components/video/Video.mixin.js +0 -4
  27. package/lib/src/brand-page/constants/misc.constants.d.ts +0 -30
  28. package/lib/src/brand-page/constants/misc.constants.js +0 -51
  29. package/lib/src/brand-page/models/content.model.d.ts +0 -2
  30. package/lib/src/brand-page/utils/index.d.ts +0 -1
  31. package/lib/src/brand-page/utils/index.js +0 -1
  32. package/lib/src/brand-page/utils/migration.util.js +0 -10
  33. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +0 -2
  34. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -12
  35. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -14
  36. package/lib/src/brand-page-maker/constants/config-settings-constant.js +0 -37
  37. package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +1 -9
  38. package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +1 -7
  39. package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +1 -6
  40. package/lib/src/brand-page-maker/models/content-settings.js +2 -36
  41. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -12
  42. package/lib/src/{bundled-translations-Chw0nsFv.js → bundled-translations-B5Fkt3qd.js} +9 -9
  43. package/lib/src/{bundled-translations.de-DE-cqBv7atZ.js → bundled-translations.de-DE-DpdVePM9.js} +1 -1
  44. package/lib/src/{bundled-translations.es-ES-D9VXftl_.js → bundled-translations.es-ES-BsIcrzZF.js} +9 -9
  45. package/lib/src/{bundled-translations.fr-CA-BYstWXcO.js → bundled-translations.fr-CA-G1XCp2Qh.js} +1 -1
  46. package/lib/src/{bundled-translations.fr-FR-D1H1hJD4.js → bundled-translations.fr-FR-BdwLXOnB.js} +1 -1
  47. package/lib/src/{bundled-translations.pt-BR-DqNFuNHX.js → bundled-translations.pt-BR-Bvn5ePe7.js} +1 -1
  48. package/lib/src/{bundled-translations.pt-PT-tOic0FfQ.js → bundled-translations.pt-PT-CDtkb2k1.js} +9 -9
  49. package/lib/src/bundles/bundled-translations.de-DE.json +0 -2
  50. package/lib/src/bundles/bundled-translations.es-ES.json +0 -2
  51. package/lib/src/bundles/bundled-translations.fr-CA.json +0 -2
  52. package/lib/src/bundles/bundled-translations.fr-FR.json +0 -2
  53. package/lib/src/bundles/bundled-translations.json +0 -2
  54. package/lib/src/bundles/bundled-translations.pt-BR.json +0 -2
  55. package/lib/src/bundles/bundled-translations.pt-PT.json +0 -2
  56. package/lib/src/css/library.brand-page-brandCrowd.min.css +116 -108
  57. package/lib/src/css/library.brand-page-brandPage.min.css +116 -108
  58. package/lib/src/css/library.brand-page-designCom.min.css +116 -108
  59. package/lib/src/css/library.brand-page-preview.min.css +116 -108
  60. package/lib/src/index.mjs +1 -1
  61. package/lib/src/{lib-Bl7w5LQl.js → lib-ngdDRkSL.js} +19534 -19720
  62. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -14
  63. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +0 -14
  64. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -12
  65. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -12
  66. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +0 -12
  67. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +0 -9
  68. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -12
  69. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -16
  70. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -14
  71. package/lib/src/utils/minify-brand-page-metadata.js +1 -11
  72. package/package.json +1 -1
  73. package/src/brand-page/components/about-section/AboutSection.vue +4 -10
  74. package/src/brand-page/components/banner-section/BannerSection.vue +4 -11
  75. package/src/brand-page/components/booking-section/BookingSection.vue +3 -11
  76. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +6 -12
  77. package/src/brand-page/components/contact-form/ContactForm.vue +118 -115
  78. package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +0 -5
  79. package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
  80. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +1 -8
  81. package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
  82. package/src/brand-page/components/map/Map.vue +1 -5
  83. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +0 -5
  84. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +0 -1
  85. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +1 -8
  86. package/src/brand-page/components/payment/support-me/SupportMe.vue +0 -1
  87. package/src/brand-page/components/shop/Shop.vue +2 -7
  88. package/src/brand-page/components/social-links/SocialLinks.vue +3 -7
  89. package/src/brand-page/components/text/Text.vue +5 -12
  90. package/src/brand-page/components/text-media-section/TextMediaSection.vue +3 -11
  91. package/src/brand-page/components/video/Video.mixin.ts +0 -5
  92. package/src/brand-page/components/video/Video.vue +1 -1
  93. package/src/brand-page/constants/misc.constants.ts +0 -60
  94. package/src/brand-page/models/content.model.ts +0 -2
  95. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -9
  96. package/src/brand-page/utils/index.ts +0 -1
  97. package/src/brand-page/utils/migration.util.test.ts +0 -145
  98. package/src/brand-page/utils/migration.util.ts +0 -11
  99. package/src/brand-page-maker/constants/config-settings-constant.ts +0 -43
  100. package/src/brand-page-maker/convertors/about-display-style.convertor.ts +0 -10
  101. package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +0 -8
  102. package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +0 -8
  103. package/src/brand-page-maker/models/content-settings.ts +2 -38
  104. package/src/bundles/bundled-translations.de-DE.json +0 -2
  105. package/src/bundles/bundled-translations.es-ES.json +0 -2
  106. package/src/bundles/bundled-translations.fr-CA.json +0 -2
  107. package/src/bundles/bundled-translations.fr-FR.json +0 -2
  108. package/src/bundles/bundled-translations.json +0 -2
  109. package/src/bundles/bundled-translations.pt-BR.json +0 -2
  110. package/src/bundles/bundled-translations.pt-PT.json +0 -2
  111. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +0 -2
  112. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +0 -2
  113. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +0 -2
  114. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +0 -2
  115. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +0 -2
  116. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +0 -2
  117. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +0 -2
  118. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
  119. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
  120. package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +0 -9
  121. package/src/utils/minify-brand-page-metadata.ts +1 -11
  122. package/lib/src/brand-page/utils/content-padding.util.d.ts +0 -13
  123. package/lib/src/brand-page/utils/content-padding.util.js +0 -10
  124. package/lib/src/brand-page/utils/migration/migration-17.d.ts +0 -2
  125. package/lib/src/brand-page/utils/migration/migration-17.js +0 -50
  126. package/src/brand-page/utils/content-padding.util.test.ts +0 -29
  127. package/src/brand-page/utils/content-padding.util.ts +0 -13
  128. package/src/brand-page/utils/migration/migration-17.ts +0 -73
  129. package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +0 -50
@@ -2,7 +2,7 @@
2
2
  <div>
3
3
  <div
4
4
  v-if="!context.isBrandSite"
5
- :style="[containerStyle, contentPaddingStyle]"
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="[containerStyle, contentPaddingStyle]">
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="[viewModel.backgroundStyle, contentPaddingStyle]"
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,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="c-video" :style="contentPaddingStyle">
2
+ <div class="c-video">
3
3
  <div v-if="viewModel.videoUrl">
4
4
  <!-- Start -->
5
5
  <div
@@ -38,66 +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: their
46
- * padding sits on the section root and reveals the background colour around
47
- * the image block (same as the banner), while the spacing inside/over the
48
- * image stays fixed — existing pages rendered the image flush to the section
49
- * edges.
50
- */
51
- export const CONTACT_FORM_LAYOUT_DEFAULT_PADDING: Record<string, number> = {
52
- '': 0, // collapsible (default on Brand Page / Brand Contact)
53
- [ALIGN_CENTERED]: 24,
54
- [ALIGN_CARD_CENTER]: 32,
55
- [ALIGN_CARD_CENTER_IMAGE]: 0,
56
- [TEXT_ONLY]: 32,
57
- [ALIGN_LEFT_FULL_IMAGE]: 0,
58
- [ALIGN_RIGHT_FULL_IMAGE]: 0,
59
- };
60
-
61
- /**
62
- * Banner: full-bleed display styles (divided + full-width stacked) render the
63
- * image flush to the section edges, so their top/bottom padding defaults to 0 to
64
- * match prod — the standard 32 would push the image off the edges. Every other
65
- * banner style keeps 32. Used by the banner display-style convertor and the
66
- * migration backfill, mirroring contact-form's per-layout map above.
67
- */
68
- export const BANNER_DEFAULT_PADDING = 32;
69
- export const BANNER_FULL_BLEED_DISPLAY_STYLES = [
70
- ALIGN_LEFT_FULL_IMAGE,
71
- ALIGN_RIGHT_FULL_IMAGE,
72
- ALIGN_TOP_FULL_IMAGE,
73
- ALIGN_BOTTOM_FULL_IMAGE,
74
- ALIGN_MIDDLE_FULL_IMAGE,
75
- ];
76
- export const bannerDisplayStyleDefaultPadding = (
77
- displayStyle?: string,
78
- ): number =>
79
- displayStyle && BANNER_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
80
- ? 0
81
- : BANNER_DEFAULT_PADDING;
82
-
83
- /**
84
- * About: same rule as the banner. The two full-image display styles render the
85
- * image flush to the section edges, so their top/bottom padding defaults to 0;
86
- * every other About style keeps 32. Used by the About display-style convertor
87
- * and the migration backfill.
88
- */
89
- export const ABOUT_DEFAULT_PADDING = 32;
90
- export const ABOUT_FULL_BLEED_DISPLAY_STYLES = [
91
- ALIGN_LEFT_FULL_IMAGE,
92
- ALIGN_RIGHT_FULL_IMAGE,
93
- ];
94
- export const aboutDisplayStyleDefaultPadding = (
95
- displayStyle?: string,
96
- ): number =>
97
- displayStyle && ABOUT_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
98
- ? 0
99
- : ABOUT_DEFAULT_PADDING;
100
-
101
41
  export const BIG_IMAGE = 'big-image';
102
42
  export const MEDIA_ONLY = 'media-only';
103
43
  export const COLUMNS = 'columns';
@@ -51,8 +51,6 @@ export interface Content {
51
51
  id: string;
52
52
  type: ContentType;
53
53
  personalisationRole?: PersonalisationRole;
54
- topPadding?: number;
55
- bottomPadding?: number;
56
54
 
57
55
  // Overrides for personalisation
58
56
  imageUrlOverride?: string;
@@ -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": 17,
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": 17,
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": 17,
1350
+ "v": 16,
1357
1351
  },
1358
1352
  "useOldLogoRenderSize": true,
1359
1353
  }
@@ -1,5 +1,4 @@
1
1
  export * from './style.util';
2
- export * from './content-padding.util';
3
2
  export * from './view-model.util';
4
3
  export * from './text.util';
5
4
  export * from './model.util';
@@ -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,145 +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 zero 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(0);
1608
- expect(about.bottomPadding).toBe(0);
1609
- },
1610
- );
1611
-
1612
1467
  test('migrateNewLogoLogic should migrate logoDraftToken and logoVariation', () => {
1613
1468
  const oldTemplate: BrandPageData = {
1614
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',
@@ -2832,7 +2793,6 @@ export const SOCIAL_LINKS_SETTINGS_CONFIG =
2832
2793
  optionsConvertor: socialLinksIconDisplayStyleConvertor,
2833
2794
  variant: 'icon',
2834
2795
  },
2835
- ...PADDING_CONTROL_FIELDS(SOCIAL_LINKS_GROUPS.style),
2836
2796
  titleStyle: {
2837
2797
  type: 'text-style',
2838
2798
  groupId: SOCIAL_LINKS_GROUPS.style,
@@ -2945,7 +2905,6 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
2945
2905
  ],
2946
2906
  fields: {
2947
2907
  displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.shape),
2948
- ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2949
2908
  size: IMAGE_SIZE_FIELD(),
2950
2909
  title: TEXT_MEDIA_TITLE_FIELD(),
2951
2910
  description: TEXT_MEDIA_DESCRIPTION_FIELD(),
@@ -2983,7 +2942,6 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
2983
2942
  ? MAX_BS_MEDIA_AND_IMAGE_ITEMS
2984
2943
  : MAX_BP_MEDIA_AND_IMAGE_ITEMS,
2985
2944
  },
2986
- ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2987
2945
  },
2988
2946
  isEnabled: true,
2989
2947
  isLocked: false,
@@ -3208,7 +3166,6 @@ export const BOOKING_SECTION_SETTINGS_CONFIG =
3208
3166
  visibilityAssessor: (c, b) =>
3209
3167
  personalisationOverrideVisibility(c, b, 'buttonText'),
3210
3168
  },
3211
- ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
3212
3169
  backgroundStyle: {
3213
3170
  type: 'color',
3214
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
- aboutDisplayStyleDefaultPadding,
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. The two
82
- // full-image styles default to 0 (image flush to the edges); the rest to 32.
83
- const padding = aboutDisplayStyleDefaultPadding(selectedOption?.value);
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
  },