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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DQLtpdLe.js → CreatedOnBrandCrowd-de-de-CAtPZtwo.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CvEhlADd.js → CreatedOnBrandCrowd-en-us-Dcx4yFkK.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-pYQeTTC0.js → CreatedOnBrandCrowd-es-es-DpodH0gD.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CcE-iCEq.js → CreatedOnBrandCrowd-fr-ca-DZbMRJn-.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CcE-iCEq.js → CreatedOnBrandCrowd-fr-fr-DZbMRJn-.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-OyhWWWyO.js → CreatedOnBrandCrowd-pt-br-C3gBveLk.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-OyhWWWyO.js → CreatedOnBrandCrowd-pt-pt-C3gBveLk.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DH98FFLS.js → CreatedOnDcom-de-de-DHNyyTV9.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DK67NN1r.js → CreatedOnDcom-en-us-BjqZ0Jmw.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-9-QU4BU6.js → CreatedOnDcom-es-es-tiNjDJmH.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-U9J9H9VB.js → CreatedOnDcom-fr-ca-COUSI6w1.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DqdzB1DJ.js → CreatedOnDcom-fr-fr-c3UCfh9A.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-c4UiWtkB.js → CreatedOnDcom-pt-br-U1jbo_g5.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Do2qJsYp.js → CreatedOnDcom-pt-pt-BOW_n3bo.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
  16. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
  17. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
  18. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
  20. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
  21. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
  23. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
  24. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
  25. package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
  26. package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
  27. package/lib/src/brand-page/constants/misc.constants.d.ts +30 -0
  28. package/lib/src/brand-page/constants/misc.constants.js +51 -0
  29. package/lib/src/brand-page/models/content.model.d.ts +2 -0
  30. package/lib/src/brand-page/models/navigation-styles.model.d.ts +7 -0
  31. package/lib/src/brand-page/models/navigation-styles.model.js +25 -2
  32. package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
  33. package/lib/src/brand-page/utils/content-padding.util.js +10 -0
  34. package/lib/src/brand-page/utils/index.d.ts +1 -0
  35. package/lib/src/brand-page/utils/index.js +1 -0
  36. package/lib/src/brand-page/utils/migration/migration-16.d.ts +2 -0
  37. package/lib/src/brand-page/utils/migration/migration-16.js +47 -0
  38. package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
  39. package/lib/src/brand-page/utils/migration/migration-17.js +50 -0
  40. package/lib/src/brand-page/utils/migration.util.js +17 -0
  41. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
  42. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -0
  43. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +14 -0
  44. package/lib/src/brand-page-maker/constants/config-settings-constant.js +37 -0
  45. package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
  46. package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
  47. package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
  48. package/lib/src/brand-page-maker/models/content-settings.js +36 -2
  49. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
  50. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -9
  51. package/lib/src/{bundled-translations-B5Fkt3qd.js → bundled-translations-Chw0nsFv.js} +9 -9
  52. package/lib/src/{bundled-translations.de-DE-DpdVePM9.js → bundled-translations.de-DE-cqBv7atZ.js} +1 -1
  53. package/lib/src/{bundled-translations.es-ES-BsIcrzZF.js → bundled-translations.es-ES-D9VXftl_.js} +9 -9
  54. package/lib/src/{bundled-translations.fr-CA-G1XCp2Qh.js → bundled-translations.fr-CA-BYstWXcO.js} +1 -1
  55. package/lib/src/{bundled-translations.fr-FR-BdwLXOnB.js → bundled-translations.fr-FR-D1H1hJD4.js} +1 -1
  56. package/lib/src/{bundled-translations.pt-BR-Bvn5ePe7.js → bundled-translations.pt-BR-DqNFuNHX.js} +1 -1
  57. package/lib/src/{bundled-translations.pt-PT-CDtkb2k1.js → bundled-translations.pt-PT-tOic0FfQ.js} +9 -9
  58. package/lib/src/bundles/bundled-translations.de-DE.json +2 -0
  59. package/lib/src/bundles/bundled-translations.es-ES.json +2 -0
  60. package/lib/src/bundles/bundled-translations.fr-CA.json +2 -0
  61. package/lib/src/bundles/bundled-translations.fr-FR.json +2 -0
  62. package/lib/src/bundles/bundled-translations.json +2 -0
  63. package/lib/src/bundles/bundled-translations.pt-BR.json +2 -0
  64. package/lib/src/bundles/bundled-translations.pt-PT.json +2 -0
  65. package/lib/src/css/library.brand-page-brandCrowd.min.css +150 -168
  66. package/lib/src/css/library.brand-page-brandPage.min.css +150 -168
  67. package/lib/src/css/library.brand-page-designCom.min.css +150 -168
  68. package/lib/src/css/library.brand-page-preview.min.css +150 -168
  69. package/lib/src/index.mjs +62 -60
  70. package/lib/src/{lib-BI3J4Mbk.js → lib-Bl7w5LQl.js} +19205 -18991
  71. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +14 -0
  72. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +14 -0
  73. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -0
  74. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +12 -0
  75. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
  76. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
  77. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
  78. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +10 -8
  79. package/lib/src/shared/navigation-style-settings/store/index.js +1 -12
  80. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -0
  81. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +14 -0
  82. package/lib/src/utils/minify-brand-page-metadata.js +11 -1
  83. package/package.json +1 -1
  84. package/src/brand-page/components/about-section/AboutSection.vue +10 -4
  85. package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
  86. package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
  87. package/src/brand-page/components/button/Button.vue +2 -10
  88. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
  89. package/src/brand-page/components/contact-form/ContactForm.vue +117 -120
  90. package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
  91. package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
  92. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
  93. package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
  94. package/src/brand-page/components/map/Map.vue +5 -1
  95. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +4 -1
  96. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
  97. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
  98. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
  99. package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
  100. package/src/brand-page/components/shop/Shop.vue +7 -2
  101. package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
  102. package/src/brand-page/components/text/Text.vue +12 -5
  103. package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
  104. package/src/brand-page/components/video/Video.mixin.ts +5 -0
  105. package/src/brand-page/components/video/Video.vue +1 -1
  106. package/src/brand-page/constants/misc.constants.ts +60 -0
  107. package/src/brand-page/models/content.model.ts +2 -0
  108. package/src/brand-page/models/navigation-styles.model.ts +39 -1
  109. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
  110. package/src/brand-page/utils/content-padding.util.test.ts +29 -0
  111. package/src/brand-page/utils/content-padding.util.ts +13 -0
  112. package/src/brand-page/utils/index.ts +1 -0
  113. package/src/brand-page/utils/migration/migration-16.test.ts +319 -0
  114. package/src/brand-page/utils/migration/migration-16.ts +75 -0
  115. package/src/brand-page/utils/migration/migration-17.ts +73 -0
  116. package/src/brand-page/utils/migration.util.test.ts +145 -0
  117. package/src/brand-page/utils/migration.util.ts +19 -0
  118. package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +9 -7
  119. package/src/brand-page-maker/constants/config-settings-constant.ts +43 -0
  120. package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
  121. package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
  122. package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
  123. package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
  124. package/src/brand-page-maker/models/content-settings.ts +38 -2
  125. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +43 -0
  126. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -14
  127. package/src/bundles/bundled-translations.de-DE.json +2 -0
  128. package/src/bundles/bundled-translations.es-ES.json +2 -0
  129. package/src/bundles/bundled-translations.fr-CA.json +2 -0
  130. package/src/bundles/bundled-translations.fr-FR.json +2 -0
  131. package/src/bundles/bundled-translations.json +2 -0
  132. package/src/bundles/bundled-translations.pt-BR.json +2 -0
  133. package/src/bundles/bundled-translations.pt-PT.json +2 -0
  134. package/src/shared/content-settings/components/color-field/ColorField.vue +10 -5
  135. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
  136. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
  137. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
  138. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
  139. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  140. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
  141. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
  142. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
  143. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
  144. package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
  145. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +17 -11
  146. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +4 -1
  147. package/src/shared/navigation-style-settings/store/index.ts +1 -21
  148. package/src/utils/minify-brand-page-metadata.ts +11 -1
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BI3J4Mbk.js";
2
+ import { _ as t } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BI3J4Mbk.js";
2
+ import { _ as e } from "./lib-Bl7w5LQl.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BI3J4Mbk.js";
2
+ import { _ as e } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BI3J4Mbk.js";
2
+ import { _ as e } from "./lib-Bl7w5LQl.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BI3J4Mbk.js";
2
+ import { _ as e } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BI3J4Mbk.js";
2
+ import { _ as e } from "./lib-Bl7w5LQl.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BI3J4Mbk.js";
2
+ import { _ as M } from "./lib-Bl7w5LQl.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BI3J4Mbk.js";
2
+ import { _ as M } from "./lib-Bl7w5LQl.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -45,6 +45,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
45
45
  }, {
46
46
  submitButtonStyle(): BrandPageCssStyle;
47
47
  submitButtonTextStyle(): BrandPageCssStyle;
48
+ contentPaddingStyle(): {
49
+ paddingTop: string;
50
+ paddingBottom: string;
51
+ };
48
52
  hasCard(): boolean;
49
53
  hasBgImage(): boolean;
50
54
  hasBgColor(): boolean;
@@ -4,7 +4,7 @@ import { getEmailValidationError, getMessageValidationError, getNameValidationEr
4
4
  import brandPageClient from '../../clients/brand-page.client';
5
5
  import { isEmail } from '../../../utils/validator.util';
6
6
  import { ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, DISPLAY_STYLE_COLLAPSED, RECAPTCHA_ACTION_CONTACT_FORM, TEXT_ONLY, } from '../../constants';
7
- import { getRenderText } from '@brand-page/utils';
7
+ import { getRenderText, contentPaddingStyle as toContentPaddingStyle, } from '@brand-page/utils';
8
8
  import { hasRTEContent } from '@brand-page-maker/utils';
9
9
  import { useReCaptcha } from '../../composables/recaptcha.composable';
10
10
  export default defineComponent({
@@ -64,6 +64,9 @@ export default defineComponent({
64
64
  };
65
65
  return buttonTextStyle;
66
66
  },
67
+ contentPaddingStyle() {
68
+ return toContentPaddingStyle(this.viewModel);
69
+ },
67
70
  hasCard() {
68
71
  return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
69
72
  this.viewModel.layoutStyle === ALIGN_CARD_CENTER_IMAGE);
@@ -72,9 +75,10 @@ export default defineComponent({
72
75
  return this.viewModel.layoutStyle === ALIGN_CARD_CENTER_IMAGE;
73
76
  },
74
77
  hasBgColor() {
75
- return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
76
- this.viewModel.layoutStyle === TEXT_ONLY ||
77
- this.viewModel.layoutStyle === ALIGN_CENTERED);
78
+ // Every brandSite layout applies the background colour on the section
79
+ // root (banner-style) so the padding control reveals it; for the image
80
+ // layouts it only shows in the padding bands around the image block.
81
+ return Boolean(this.viewModel.layoutStyle);
78
82
  },
79
83
  isCenteredLayout() {
80
84
  return (this.viewModel.layoutStyle === ALIGN_CARD_CENTER ||
@@ -23,6 +23,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
23
23
  }>, {}, {
24
24
  imageModalSelectedImageIndex: number | undefined;
25
25
  }, {
26
+ contentPaddingStyle(): {
27
+ paddingTop: string;
28
+ paddingBottom: string;
29
+ };
26
30
  getContainerStyle(): BrandPageCssStyle;
27
31
  images(): any[] | undefined;
28
32
  galleryType(): GalleryType;
@@ -1,4 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
+ import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
2
3
  import ComponentCommonMixin from '../mixins/component-common.mixin';
3
4
  import ImageModalMixin from '../mixins/image-modal.mixin';
4
5
  import { GALLERY_TYPES } from '@brand-page/models';
@@ -29,6 +30,9 @@ export default defineComponent({
29
30
  };
30
31
  },
31
32
  computed: {
33
+ contentPaddingStyle() {
34
+ return toContentPaddingStyle(this.viewModel);
35
+ },
32
36
  getContainerStyle() {
33
37
  if (this.galleryType === 'carousel') {
34
38
  const maxWidth = this.containerClientWidth
@@ -39,6 +39,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
39
39
  isSubmitting: boolean;
40
40
  show: boolean;
41
41
  }, {
42
+ contentPaddingStyle(): {
43
+ paddingTop: string;
44
+ paddingBottom: string;
45
+ };
42
46
  hasNameError(): boolean;
43
47
  hasEmailError(): boolean;
44
48
  hasFormError(): boolean;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import brandPageClient from '../../clients/brand-page.client';
3
- import { getEmailValidationError } from '@brand-page/utils';
3
+ import { getEmailValidationError, contentPaddingStyle as toContentPaddingStyle, } from '@brand-page/utils';
4
4
  import { contentSettingsTr, mailingListTr, } from '@src/composables/useTranslate';
5
5
  import { useReCaptcha } from '../../composables/recaptcha.composable';
6
6
  import { RECAPTCHA_ACTION_MAILING_LIST } from '../../constants';
@@ -51,6 +51,9 @@ export default defineComponent({
51
51
  }
52
52
  },
53
53
  computed: {
54
+ contentPaddingStyle() {
55
+ return toContentPaddingStyle(this.viewModel);
56
+ },
54
57
  hasNameError() {
55
58
  return !!this.nameError;
56
59
  },
@@ -21,6 +21,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
21
21
  selectedPaymentOptionIds: string[];
22
22
  imageType: string;
23
23
  }, {
24
+ contentPaddingStyle(): {
25
+ paddingTop: string;
26
+ paddingBottom: string;
27
+ };
24
28
  isCustomerRequestDetailsValid(): boolean;
25
29
  paymentRequestDetails(): PaymentRequestDetails;
26
30
  paymentOptions(): PaymentOption[];
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import { PAYMENT_OPTION_DISPLAY_TYPES, PAYMENT_OPTION_IMAGE_TYPES, } from '../../../models';
3
3
  import { DEFAULT_CURRENCY_SYMBOL } from '../../../constants';
4
4
  import { addOpacityToHex } from '../../../utils/color.util';
5
+ import { contentPaddingStyle as toContentPaddingStyle } from '../../../utils';
5
6
  import { RGBAtoHex } from '@utils/helpers';
6
7
  const MAX_CUSTOM_REQUEST_CHARS = 500;
7
8
  export default defineComponent({
@@ -28,6 +29,9 @@ export default defineComponent({
28
29
  };
29
30
  },
30
31
  computed: {
32
+ contentPaddingStyle() {
33
+ return toContentPaddingStyle(this.viewModel);
34
+ },
31
35
  isCustomerRequestDetailsValid() {
32
36
  return (!this.viewModel.requestPaymentConfig.isCustomerRequestDetailsEnabled ||
33
37
  this.customerRequestDetails === undefined ||
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
17
17
  prevCustomAmount: string;
18
18
  customAmount: string;
19
19
  }, {
20
+ contentPaddingStyle(): {
21
+ paddingTop: string;
22
+ paddingBottom: string;
23
+ };
20
24
  isCustomAmountFieldVisible(): boolean;
21
25
  isCustomerMessageFieldVisible(): boolean;
22
26
  isCustomerMessageValid(): boolean;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { SUPPORT_ME_CUSTOM_PRODUCT_NAME } from '../../../constants';
3
- import { isPaymentAmountValid } from '../../../utils';
3
+ import { isPaymentAmountValid, contentPaddingStyle as toContentPaddingStyle, } from '../../../utils';
4
4
  import { DEFAULT_CURRENCY_SYMBOL, DEFAULT_CURRENCY_CODE, } from '../../../constants';
5
5
  import { paymentTr } from '@src/composables/useTranslate';
6
6
  const MAX_CUSTOM_MESSAGE_CHARS = 500;
@@ -24,6 +24,9 @@ export default defineComponent({
24
24
  };
25
25
  },
26
26
  computed: {
27
+ contentPaddingStyle() {
28
+ return toContentPaddingStyle(this.viewModel);
29
+ },
27
30
  isCustomAmountFieldVisible() {
28
31
  return this.viewModel.supportMeConfig.paymentOptions.some((o) => o.name === SUPPORT_ME_CUSTOM_PRODUCT_NAME);
29
32
  },
@@ -11,6 +11,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
11
11
  isCollapsed: boolean;
12
12
  title: string;
13
13
  }, {
14
+ contentPaddingStyle(): {
15
+ paddingTop: string;
16
+ paddingBottom: string;
17
+ };
14
18
  arrowStyle(): BrandPageCssStyle;
15
19
  containerStyle(): BrandPageCssStyle;
16
20
  videoUrl(): string;
@@ -1,4 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
+ import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
2
3
  import ComponentCommonMixin from '../mixins/component-common.mixin';
3
4
  import { DISPLAY_STYLE_PREVIEW, DISPLAY_STYLE_COLLAPSED, } from '../../constants';
4
5
  export default defineComponent({
@@ -16,6 +17,9 @@ export default defineComponent({
16
17
  title: 'Video',
17
18
  }),
18
19
  computed: {
20
+ contentPaddingStyle() {
21
+ return toContentPaddingStyle(this.viewModel);
22
+ },
19
23
  arrowStyle() {
20
24
  return {
21
25
  color: this.viewModel.buttonStyles.style?.color,
@@ -29,6 +29,36 @@ export declare const TEXT_ONLY = "text-only";
29
29
  export declare const ALIGN_LEFT_FULL_IMAGE = "left-aligned-full-image";
30
30
  export declare const ALIGN_RIGHT_FULL_IMAGE = "right-aligned-full-image";
31
31
  export declare const ALTERNATE_IMAGE = "alternate-image";
32
+ /**
33
+ * Padding Control (BP-5699): the top/bottom padding each Contact Form layout
34
+ * had hard-coded before the sliders existed. Single source for new-block
35
+ * defaults (content-settings) and the migration backfill for existing pages.
36
+ * The image layouts (full-image divided and card-over-image) are 0: their
37
+ * padding sits on the section root and reveals the background colour around
38
+ * the image block (same as the banner), while the spacing inside/over the
39
+ * image stays fixed — existing pages rendered the image flush to the section
40
+ * edges.
41
+ */
42
+ export declare const CONTACT_FORM_LAYOUT_DEFAULT_PADDING: Record<string, number>;
43
+ /**
44
+ * Banner: full-bleed display styles (divided + full-width stacked) render the
45
+ * image flush to the section edges, so their top/bottom padding defaults to 0 to
46
+ * match prod — the standard 32 would push the image off the edges. Every other
47
+ * banner style keeps 32. Used by the banner display-style convertor and the
48
+ * migration backfill, mirroring contact-form's per-layout map above.
49
+ */
50
+ export declare const BANNER_DEFAULT_PADDING = 32;
51
+ export declare const BANNER_FULL_BLEED_DISPLAY_STYLES: string[];
52
+ export declare const bannerDisplayStyleDefaultPadding: (displayStyle?: string) => number;
53
+ /**
54
+ * About: same rule as the banner. The two full-image display styles render the
55
+ * image flush to the section edges, so their top/bottom padding defaults to 0;
56
+ * every other About style keeps 32. Used by the About display-style convertor
57
+ * and the migration backfill.
58
+ */
59
+ export declare const ABOUT_DEFAULT_PADDING = 32;
60
+ export declare const ABOUT_FULL_BLEED_DISPLAY_STYLES: string[];
61
+ export declare const aboutDisplayStyleDefaultPadding: (displayStyle?: string) => number;
32
62
  export declare const BIG_IMAGE = "big-image";
33
63
  export declare const MEDIA_ONLY = "media-only";
34
64
  export declare const COLUMNS = "columns";
@@ -30,6 +30,57 @@ export const TEXT_ONLY = 'text-only';
30
30
  export const ALIGN_LEFT_FULL_IMAGE = 'left-aligned-full-image';
31
31
  export const ALIGN_RIGHT_FULL_IMAGE = 'right-aligned-full-image';
32
32
  export const ALTERNATE_IMAGE = 'alternate-image';
33
+ /**
34
+ * Padding Control (BP-5699): the top/bottom padding each Contact Form layout
35
+ * had hard-coded before the sliders existed. Single source for new-block
36
+ * defaults (content-settings) and the migration backfill for existing pages.
37
+ * The image layouts (full-image divided and card-over-image) are 0: their
38
+ * padding sits on the section root and reveals the background colour around
39
+ * the image block (same as the banner), while the spacing inside/over the
40
+ * image stays fixed — existing pages rendered the image flush to the section
41
+ * edges.
42
+ */
43
+ export const CONTACT_FORM_LAYOUT_DEFAULT_PADDING = {
44
+ '': 0, // collapsible (default on Brand Page / Brand Contact)
45
+ [ALIGN_CENTERED]: 24,
46
+ [ALIGN_CARD_CENTER]: 32,
47
+ [ALIGN_CARD_CENTER_IMAGE]: 0,
48
+ [TEXT_ONLY]: 32,
49
+ [ALIGN_LEFT_FULL_IMAGE]: 0,
50
+ [ALIGN_RIGHT_FULL_IMAGE]: 0,
51
+ };
52
+ /**
53
+ * Banner: full-bleed display styles (divided + full-width stacked) render the
54
+ * image flush to the section edges, so their top/bottom padding defaults to 0 to
55
+ * match prod — the standard 32 would push the image off the edges. Every other
56
+ * banner style keeps 32. Used by the banner display-style convertor and the
57
+ * migration backfill, mirroring contact-form's per-layout map above.
58
+ */
59
+ export const BANNER_DEFAULT_PADDING = 32;
60
+ export const BANNER_FULL_BLEED_DISPLAY_STYLES = [
61
+ ALIGN_LEFT_FULL_IMAGE,
62
+ ALIGN_RIGHT_FULL_IMAGE,
63
+ ALIGN_TOP_FULL_IMAGE,
64
+ ALIGN_BOTTOM_FULL_IMAGE,
65
+ ALIGN_MIDDLE_FULL_IMAGE,
66
+ ];
67
+ export const bannerDisplayStyleDefaultPadding = (displayStyle) => displayStyle && BANNER_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
68
+ ? 0
69
+ : BANNER_DEFAULT_PADDING;
70
+ /**
71
+ * About: same rule as the banner. The two full-image display styles render the
72
+ * image flush to the section edges, so their top/bottom padding defaults to 0;
73
+ * every other About style keeps 32. Used by the About display-style convertor
74
+ * and the migration backfill.
75
+ */
76
+ export const ABOUT_DEFAULT_PADDING = 32;
77
+ export const ABOUT_FULL_BLEED_DISPLAY_STYLES = [
78
+ ALIGN_LEFT_FULL_IMAGE,
79
+ ALIGN_RIGHT_FULL_IMAGE,
80
+ ];
81
+ export const aboutDisplayStyleDefaultPadding = (displayStyle) => displayStyle && ABOUT_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
82
+ ? 0
83
+ : ABOUT_DEFAULT_PADDING;
33
84
  export const BIG_IMAGE = 'big-image';
34
85
  export const MEDIA_ONLY = 'media-only';
35
86
  export const COLUMNS = 'columns';
@@ -47,6 +47,8 @@ export interface Content {
47
47
  id: string;
48
48
  type: ContentType;
49
49
  personalisationRole?: PersonalisationRole;
50
+ topPadding?: number;
51
+ bottomPadding?: number;
50
52
  imageUrlOverride?: string;
51
53
  imageUrlsOverride?: string;
52
54
  avatarImageUrlOverride?: string;
@@ -8,6 +8,13 @@ export declare class NavigationMenuStyles {
8
8
  subNavBackgroundColor?: string;
9
9
  constructor(options: Partial<NavigationMenuStyles>, defaultOptions: Partial<NavigationMenuStyles>);
10
10
  }
11
+ export declare const getDefaultSubNavBackgroundColor: (defaultTextColor: string | undefined) => string | undefined;
12
+ /**
13
+ * The hamburger sub nav background colour is auto color-matched only when the
14
+ * user has not deliberately set it - i.e. it has no value or is transparent.
15
+ * Any explicit colour (a hex) or an already color-matched key is preserved.
16
+ */
17
+ export declare const isUnsetOrTransparentColor: (color: string | undefined | null) => boolean;
11
18
  type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
12
19
  hamburgerMenuStyle?: Partial<NavigationMenuStyles>;
13
20
  };
@@ -1,4 +1,4 @@
1
- import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
1
+ import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, STYLE_THEME_KEYS, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
2
2
  import { VIEWPORTS } from './index';
3
3
  import { TEXT_STYLE_TYPES } from './index';
4
4
  import cloneDeep from 'lodash.clonedeep';
@@ -15,6 +15,29 @@ export class NavigationMenuStyles {
15
15
  options.subNavBackgroundColor ?? defaultOptions.subNavBackgroundColor;
16
16
  }
17
17
  }
18
+ export const getDefaultSubNavBackgroundColor = (defaultTextColor) => {
19
+ if (defaultTextColor === STYLE_THEME_KEYS.LogoTextColor ||
20
+ defaultTextColor === STYLE_THEME_KEYS.LogoTextMultiColor) {
21
+ return STYLE_THEME_KEYS.LogoBackgroundColor;
22
+ }
23
+ if (defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundColor ||
24
+ defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundMultiColor) {
25
+ return STYLE_THEME_KEYS.LogoTextColor;
26
+ }
27
+ return undefined;
28
+ };
29
+ /**
30
+ * The hamburger sub nav background colour is auto color-matched only when the
31
+ * user has not deliberately set it - i.e. it has no value or is transparent.
32
+ * Any explicit colour (a hex) or an already color-matched key is preserved.
33
+ */
34
+ export const isUnsetOrTransparentColor = (color) => {
35
+ if (color == null) {
36
+ return true;
37
+ }
38
+ const normalised = color.trim().toLowerCase();
39
+ return normalised === '' || normalised === 'transparent';
40
+ };
18
41
  class NavigationStyles {
19
42
  displayType;
20
43
  renderAfterLogo;
@@ -79,7 +102,7 @@ class NavigationStyles {
79
102
  color: theme?.secondaryColor,
80
103
  backgroundColor: theme?.primaryColor,
81
104
  },
82
- subNavBackgroundColor: theme?.secondaryColor,
105
+ // No sub nav default: a hex here defeats migration-16's colour match.
83
106
  });
84
107
  }
85
108
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Block top/bottom padding (BP-5687) as a bindable CSS style object. Defaults
3
+ * live in the data — `content-settings` for new content, a migration for
4
+ * existing — so this just reads the stored value (`?? 0` covers content from
5
+ * before the field existed).
6
+ */
7
+ export declare const contentPaddingStyle: (content: {
8
+ topPadding?: number;
9
+ bottomPadding?: number;
10
+ }) => {
11
+ paddingTop: string;
12
+ paddingBottom: string;
13
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Block top/bottom padding (BP-5687) as a bindable CSS style object. Defaults
3
+ * live in the data — `content-settings` for new content, a migration for
4
+ * existing — so this just reads the stored value (`?? 0` covers content from
5
+ * before the field existed).
6
+ */
7
+ export const contentPaddingStyle = (content) => ({
8
+ paddingTop: `${content.topPadding ?? 0}px`,
9
+ paddingBottom: `${content.bottomPadding ?? 0}px`,
10
+ });
@@ -1,4 +1,5 @@
1
1
  export * from './style.util';
2
+ export * from './content-padding.util';
2
3
  export * from './view-model.util';
3
4
  export * from './text.util';
4
5
  export * from './model.util';
@@ -1,4 +1,5 @@
1
1
  export * from './style.util';
2
+ export * from './content-padding.util';
2
3
  export * from './view-model.util';
3
4
  export * from './text.util';
4
5
  export * from './model.util';
@@ -0,0 +1,2 @@
1
+ import type { MigrationData, MigrationOptions } from '../migration.util';
2
+ export declare const migration16: (migrationResult: MigrationData, options: MigrationOptions) => Promise<MigrationData>;
@@ -0,0 +1,47 @@
1
+ import { getDefaultSubNavBackgroundColor, isUnsetOrTransparentColor, } from '../../models';
2
+ /**
3
+ * Migration 16: default the sub nav background colour to "colour matched" (the opposite
4
+ * logo colour) when the menu font is itself colour matched and the sub nav has no
5
+ * deliberate value. The default is applied ONCE, when content is first materialised — a
6
+ * template load, the create-draft flow, or the admin maker (isUserDraft === false). An
7
+ * existing user draft already carries its resolved value (including a deliberate
8
+ * transparent/explicit choice), so it is left untouched.
9
+ */
10
+ // Hamburger keeps its styles on hamburgerMenuStyle; every other nav type uses the
11
+ // top-level navigation styles. (This only locates the styles - the rule itself is uniform.)
12
+ const isHamburger = (displayType) => displayType.includes('hamburger');
13
+ const applyDefaultSubNavColorMatch = (navigation) => {
14
+ if (!navigation?.displayType) {
15
+ return;
16
+ }
17
+ let menuStyles;
18
+ if (isHamburger(navigation.displayType)) {
19
+ navigation.hamburgerMenuStyle =
20
+ navigation.hamburgerMenuStyle ?? {};
21
+ menuStyles = navigation.hamburgerMenuStyle;
22
+ }
23
+ else {
24
+ menuStyles = navigation;
25
+ }
26
+ // Leave a deliberately-set colour (an explicit hex or an already colour-matched key).
27
+ if (!isUnsetOrTransparentColor(menuStyles.subNavBackgroundColor)) {
28
+ return;
29
+ }
30
+ // Only when the menu font is itself colour matched: take the opposite logo colour
31
+ // (the helper returns undefined when the font is not colour matched).
32
+ const colorMatchedSubNav = getDefaultSubNavBackgroundColor(menuStyles.defaultButtonStyle?.color);
33
+ if (colorMatchedSubNav) {
34
+ menuStyles.subNavBackgroundColor = colorMatchedSubNav;
35
+ }
36
+ };
37
+ export const migration16 = async (migrationResult, options) => {
38
+ // Skip user drafts (isUserDraft === true) — they already have their value. Only
39
+ // templates (isUserDraft === false) get the sub nav default.
40
+ if (options.isUserDraft) {
41
+ return migrationResult;
42
+ }
43
+ const { brandPageModel } = migrationResult;
44
+ applyDefaultSubNavColorMatch(brandPageModel.pageHeaderDesktop?.navigation);
45
+ applyDefaultSubNavColorMatch(brandPageModel.pageHeaderMobile?.navigation);
46
+ return migrationResult;
47
+ };
@@ -0,0 +1,2 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ export declare const migration17: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,50 @@
1
+ import { CONTACT_FORM_LAYOUT_DEFAULT_PADDING, aboutDisplayStyleDefaultPadding, bannerDisplayStyleDefaultPadding, } from '../../constants';
2
+ /**
3
+ * Padding Control backfill (BP-5699 Tier 2, BP-5700 Store): blocks that already
4
+ * had hard-coded top/bottom spacing. Backfill that spacing as the block's explicit
5
+ * topPadding/bottomPadding so existing pages render unchanged once the spacing
6
+ * moves to the Padding Control sliders. Type-scoped and idempotent — only the
7
+ * listed types, and only when the value isn't already set.
8
+ */
9
+ const BLOCK_DEFAULT_PADDING = {
10
+ text: 12,
11
+ 'images-section': 32,
12
+ 'social-links': 32,
13
+ 'shapes-section': 32,
14
+ 'booking-section': 32,
15
+ 'shop-section': 16,
16
+ };
17
+ export const migration17 = async (migrationResult) => {
18
+ const { brandPageModel } = migrationResult;
19
+ brandPageModel.pages.forEach((page) => {
20
+ page.contents.forEach((content) => {
21
+ // Contact Form, Banner and About previously varied their hard-coded spacing by
22
+ // layout/display style (full-bleed image layouts had no outer padding), so they're
23
+ // keyed by that rather than a single per-type value.
24
+ let value;
25
+ if (content.type === 'contact-form') {
26
+ value =
27
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING[content.layoutStyle ?? ''];
28
+ }
29
+ else if (content.type === 'banner-section') {
30
+ value = bannerDisplayStyleDefaultPadding(content.displayStyle);
31
+ }
32
+ else if (content.type === 'about-section') {
33
+ value = aboutDisplayStyleDefaultPadding(content.displayStyle);
34
+ }
35
+ else {
36
+ value = BLOCK_DEFAULT_PADDING[content.type];
37
+ }
38
+ if (value === undefined) {
39
+ return;
40
+ }
41
+ if (content.topPadding === undefined) {
42
+ content.topPadding = value;
43
+ }
44
+ if (content.bottomPadding === undefined) {
45
+ content.bottomPadding = value;
46
+ }
47
+ });
48
+ });
49
+ return migrationResult;
50
+ };