@designcrowd/library.brand-page 5.17.27 → 5.17.28-ast-padding

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 (92) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DjrwAblu.js → CreatedOnBrandCrowd-de-de-BKiqBMgr.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Clib9Fmn.js → CreatedOnBrandCrowd-en-us-BE9ztLEZ.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-FAUHtPC2.js → CreatedOnBrandCrowd-es-es-isBp-_KV.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-I1bem2U3.js → CreatedOnBrandCrowd-fr-ca-BHkyP1Ym.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-I1bem2U3.js → CreatedOnBrandCrowd-fr-fr-BHkyP1Ym.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-B4-cqGVL.js → CreatedOnBrandCrowd-pt-br-D4EXIp5p.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-B4-cqGVL.js → CreatedOnBrandCrowd-pt-pt-D4EXIp5p.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DCiTSoZu.js → CreatedOnDcom-de-de-DCyTITAn.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CBwxJf3p.js → CreatedOnDcom-en-us-Bwr-eCqH.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-CuWpM6Ui.js → CreatedOnDcom-es-es-DBMJ7xE-.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BPW1Q-90.js → CreatedOnDcom-fr-ca-itsxeehe.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-COX-ZI7v.js → CreatedOnDcom-fr-fr-B8CIK3Dc.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-N6E3uYhE.js → CreatedOnDcom-pt-br-mV_AMZNj.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-BUBb5xjA.js → CreatedOnDcom-pt-pt-mwvCkhOd.js} +1 -1
  15. package/lib/src/brand-page/components/background-shape/BackgroundShape.mixin.js +6 -0
  16. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
  17. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
  18. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
  20. package/lib/src/brand-page/components/media/Shape.mixin.js +6 -0
  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/models/content.model.d.ts +2 -0
  28. package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
  29. package/lib/src/brand-page/utils/content-padding.util.js +10 -0
  30. package/lib/src/brand-page/utils/index.d.ts +1 -0
  31. package/lib/src/brand-page/utils/index.js +1 -0
  32. package/lib/src/brand-page/utils/migration/migration-16.d.ts +2 -0
  33. package/lib/src/brand-page/utils/migration/migration-16.js +32 -0
  34. package/lib/src/brand-page/utils/migration.util.js +6 -0
  35. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
  36. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -0
  37. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +14 -0
  38. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +6 -8
  39. package/lib/src/brand-page-maker/constants/config-settings-constant.js +33 -0
  40. package/lib/src/brand-page-maker/models/content-settings.js +22 -0
  41. package/lib/src/{bundled-translations-CNK7l6_v.js → bundled-translations-D4Pw0u0B.js} +1 -1
  42. package/lib/src/bundles/bundled-translations.json +2 -0
  43. package/lib/src/css/library.brand-page-brandCrowd.min.css +115 -137
  44. package/lib/src/css/library.brand-page-brandPage.min.css +115 -137
  45. package/lib/src/css/library.brand-page-designCom.min.css +115 -137
  46. package/lib/src/css/library.brand-page-preview.min.css +115 -137
  47. package/lib/src/index.mjs +1 -1
  48. package/lib/src/{lib-CsTVlu2a.js → lib-ro9XYcgh.js} +19405 -19281
  49. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +14 -0
  50. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +14 -0
  51. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -0
  52. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +12 -0
  53. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
  54. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
  55. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -0
  56. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +14 -0
  57. package/lib/src/utils/minify-brand-page-metadata.js +11 -1
  58. package/package.json +1 -1
  59. package/src/brand-page/components/background-shape/BackgroundShape.mixin.ts +6 -0
  60. package/src/brand-page/components/background-shape/BackgroundShape.vue +12 -9
  61. package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
  62. package/src/brand-page/components/contact-form/ContactForm.vue +13 -13
  63. package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
  64. package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
  65. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
  66. package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
  67. package/src/brand-page/components/map/Map.vue +5 -1
  68. package/src/brand-page/components/media/Shape.mixin.ts +6 -0
  69. package/src/brand-page/components/media/Shape.vue +2 -4
  70. package/src/brand-page/components/page/Page.vue +27 -5
  71. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
  72. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
  73. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
  74. package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
  75. package/src/brand-page/components/placeholder/Placeholder.vue +39 -100
  76. package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
  77. package/src/brand-page/components/text/Text.vue +12 -5
  78. package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
  79. package/src/brand-page/components/video/Video.mixin.ts +5 -0
  80. package/src/brand-page/components/video/Video.vue +1 -1
  81. package/src/brand-page/models/content.model.ts +2 -0
  82. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +7 -3
  83. package/src/brand-page/utils/content-padding.util.ts +13 -0
  84. package/src/brand-page/utils/index.ts +1 -0
  85. package/src/brand-page/utils/migration/migration-16.ts +42 -0
  86. package/src/brand-page/utils/migration.util.ts +7 -0
  87. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +10 -8
  88. package/src/brand-page-maker/constants/config-settings-constant.ts +39 -0
  89. package/src/brand-page-maker/models/content-settings.ts +22 -0
  90. package/src/bundles/bundled-translations.json +2 -0
  91. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  92. 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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as t } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as e } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as e } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as e } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as e } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as e } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as M } from "./lib-ro9XYcgh.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-CsTVlu2a.js";
2
+ import { _ as M } from "./lib-ro9XYcgh.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -66,6 +66,12 @@ export default defineComponent({
66
66
  }
67
67
  }
68
68
  },
69
+ beforeUnmount() {
70
+ if (this.svgDataObjectUrl) {
71
+ URL.revokeObjectURL(this.svgDataObjectUrl);
72
+ this.svgDataObjectUrl = '';
73
+ }
74
+ },
69
75
  methods: {
70
76
  isValidSvgUrl(url) {
71
77
  return (!!SUPPORTED_SHAPE_HOSTS.find((h) => url.startsWith(h)) &&
@@ -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
  },
@@ -101,6 +101,12 @@ export default defineComponent({
101
101
  }
102
102
  }
103
103
  },
104
+ beforeUnmount() {
105
+ if (this.svgDataObjectUrl) {
106
+ URL.revokeObjectURL(this.svgDataObjectUrl);
107
+ this.svgDataObjectUrl = '';
108
+ }
109
+ },
104
110
  methods: {
105
111
  applySvgAttributes(svgData) {
106
112
  const attributes = [];
@@ -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,
@@ -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;
@@ -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 } from '../migration.util';
2
+ export declare const migration16: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Tier 2 Padding Control (BP-5699): blocks that already had hard-coded
3
+ * top/bottom spacing. Backfill that spacing as the block's explicit
4
+ * topPadding/bottomPadding so existing pages render unchanged once the spacing
5
+ * moves to the Padding Control sliders. Type-scoped and idempotent — only the
6
+ * listed types, and only when the value isn't already set.
7
+ */
8
+ const TIER2_DEFAULT_PADDING = {
9
+ text: 12,
10
+ 'images-section': 32,
11
+ 'social-links': 32,
12
+ 'shapes-section': 32,
13
+ 'booking-section': 32,
14
+ };
15
+ export const migration16 = async (migrationResult) => {
16
+ const { brandPageModel } = migrationResult;
17
+ brandPageModel.pages.forEach((page) => {
18
+ page.contents.forEach((content) => {
19
+ const value = TIER2_DEFAULT_PADDING[content.type];
20
+ if (value === undefined) {
21
+ return;
22
+ }
23
+ if (content.topPadding === undefined) {
24
+ content.topPadding = value;
25
+ }
26
+ if (content.bottomPadding === undefined) {
27
+ content.bottomPadding = value;
28
+ }
29
+ });
30
+ });
31
+ return migrationResult;
32
+ };
@@ -18,6 +18,7 @@ import { migration12_1 } from './migration/migration-12_1';
18
18
  import { migration13 } from './migration/migration-13';
19
19
  import { migration14 } from './migration/migration-14';
20
20
  import { migration15 } from './migration/migration-15';
21
+ import { migration16 } from './migration/migration-16';
21
22
  const MIGRATION_TABLE = [
22
23
  {
23
24
  version: 1,
@@ -115,6 +116,11 @@ const MIGRATION_TABLE = [
115
116
  migrateFn: migration15,
116
117
  description: 'Adding default mediaOverlayStyle to background styles',
117
118
  },
119
+ {
120
+ version: 16,
121
+ migrateFn: migration16,
122
+ description: 'Tier 2 Padding Control (BP-5699): backfill existing top/bottom spacing as explicit padding for text (12px) and images, social links, shapes and booking (32px)',
123
+ },
118
124
  ];
119
125
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
120
126
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -8,6 +8,8 @@ declare const _default: import("vue").DefineComponent<{}, {
8
8
  id: string;
9
9
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
10
10
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
11
+ topPadding?: number | undefined;
12
+ bottomPadding?: number | undefined;
11
13
  imageUrlOverride?: string | undefined;
12
14
  imageUrlsOverride?: string | undefined;
13
15
  avatarImageUrlOverride?: string | undefined;
@@ -526,6 +526,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
526
526
  id: string;
527
527
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
528
528
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
529
+ topPadding?: number | undefined;
530
+ bottomPadding?: number | undefined;
529
531
  imageUrlOverride?: string | undefined;
530
532
  imageUrlsOverride?: string | undefined;
531
533
  avatarImageUrlOverride?: string | undefined;
@@ -575,6 +577,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
575
577
  id: string;
576
578
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
577
579
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
580
+ topPadding?: number | undefined;
581
+ bottomPadding?: number | undefined;
578
582
  imageUrlOverride?: string | undefined;
579
583
  imageUrlsOverride?: string | undefined;
580
584
  avatarImageUrlOverride?: string | undefined;
@@ -624,6 +628,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
624
628
  id: string;
625
629
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
626
630
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
631
+ topPadding?: number | undefined;
632
+ bottomPadding?: number | undefined;
627
633
  imageUrlOverride?: string | undefined;
628
634
  imageUrlsOverride?: string | undefined;
629
635
  avatarImageUrlOverride?: string | undefined;
@@ -673,6 +679,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
673
679
  id: string;
674
680
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
675
681
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
682
+ topPadding?: number | undefined;
683
+ bottomPadding?: number | undefined;
676
684
  imageUrlOverride?: string | undefined;
677
685
  imageUrlsOverride?: string | undefined;
678
686
  avatarImageUrlOverride?: string | undefined;
@@ -722,6 +730,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
722
730
  id: string;
723
731
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
724
732
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
733
+ topPadding?: number | undefined;
734
+ bottomPadding?: number | undefined;
725
735
  imageUrlOverride?: string | undefined;
726
736
  imageUrlsOverride?: string | undefined;
727
737
  avatarImageUrlOverride?: string | undefined;
@@ -771,6 +781,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
771
781
  id: string;
772
782
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
773
783
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
784
+ topPadding?: number | undefined;
785
+ bottomPadding?: number | undefined;
774
786
  imageUrlOverride?: string | undefined;
775
787
  imageUrlsOverride?: string | undefined;
776
788
  avatarImageUrlOverride?: string | undefined;
@@ -11,6 +11,8 @@ declare const _default: import("vue").DefineComponent<{}, {
11
11
  id: string;
12
12
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
13
13
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
14
+ topPadding?: number | undefined;
15
+ bottomPadding?: number | undefined;
14
16
  imageUrlOverride?: string | undefined;
15
17
  imageUrlsOverride?: string | undefined;
16
18
  avatarImageUrlOverride?: string | undefined;
@@ -90,6 +92,8 @@ declare const _default: import("vue").DefineComponent<{}, {
90
92
  id: string;
91
93
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
92
94
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
95
+ topPadding?: number | undefined;
96
+ bottomPadding?: number | undefined;
93
97
  imageUrlOverride?: string | undefined;
94
98
  imageUrlsOverride?: string | undefined;
95
99
  avatarImageUrlOverride?: string | undefined;
@@ -139,6 +143,8 @@ declare const _default: import("vue").DefineComponent<{}, {
139
143
  id: string;
140
144
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
141
145
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
146
+ topPadding?: number | undefined;
147
+ bottomPadding?: number | undefined;
142
148
  imageUrlOverride?: string | undefined;
143
149
  imageUrlsOverride?: string | undefined;
144
150
  avatarImageUrlOverride?: string | undefined;
@@ -188,6 +194,8 @@ declare const _default: import("vue").DefineComponent<{}, {
188
194
  id: string;
189
195
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
190
196
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
197
+ topPadding?: number | undefined;
198
+ bottomPadding?: number | undefined;
191
199
  imageUrlOverride?: string | undefined;
192
200
  imageUrlsOverride?: string | undefined;
193
201
  avatarImageUrlOverride?: string | undefined;
@@ -237,6 +245,8 @@ declare const _default: import("vue").DefineComponent<{}, {
237
245
  id: string;
238
246
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
239
247
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
248
+ topPadding?: number | undefined;
249
+ bottomPadding?: number | undefined;
240
250
  imageUrlOverride?: string | undefined;
241
251
  imageUrlsOverride?: string | undefined;
242
252
  avatarImageUrlOverride?: string | undefined;
@@ -286,6 +296,8 @@ declare const _default: import("vue").DefineComponent<{}, {
286
296
  id: string;
287
297
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
288
298
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
299
+ topPadding?: number | undefined;
300
+ bottomPadding?: number | undefined;
289
301
  imageUrlOverride?: string | undefined;
290
302
  imageUrlsOverride?: string | undefined;
291
303
  avatarImageUrlOverride?: string | undefined;
@@ -335,6 +347,8 @@ declare const _default: import("vue").DefineComponent<{}, {
335
347
  id: string;
336
348
  type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
337
349
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
350
+ topPadding?: number | undefined;
351
+ bottomPadding?: number | undefined;
338
352
  imageUrlOverride?: string | undefined;
339
353
  imageUrlsOverride?: string | undefined;
340
354
  avatarImageUrlOverride?: string | undefined;
@@ -356,10 +356,9 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
356
356
  ? emToPx(globalStyles?.lineHeight ?? '1em')
357
357
  : globalStyles?.lineHeight ?? '1';
358
358
  letterSpacing.value = letterSpacingValueConvertor.convert(globalStyles ?? {});
359
- if (!currentAlignment?.textAlign) {
360
- props.styles &&
361
- props.styles.textAlign &&
362
- toggleTextAlign(props.styles.textAlign ?? 'none');
359
+ if (props.styles?.textAlign &&
360
+ currentAlignment?.textAlign !== props.styles.textAlign) {
361
+ toggleTextAlign(props.styles.textAlign);
363
362
  }
364
363
  }
365
364
  else if (props.styles) {
@@ -377,10 +376,9 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
377
376
  ? emToPx(props.styles?.lineHeight ?? '1em')
378
377
  : props.styles?.lineHeight ?? '1';
379
378
  letterSpacing.value = letterSpacingValueConvertor.convert(props.styles ?? {});
380
- if (!currentAlignment?.textAlign) {
381
- props.styles &&
382
- props.styles.textAlign &&
383
- toggleTextAlign(props.styles.textAlign ?? 'none');
379
+ if (props.styles?.textAlign &&
380
+ currentAlignment?.textAlign !== props.styles.textAlign) {
381
+ toggleTextAlign(props.styles.textAlign);
384
382
  }
385
383
  }
386
384
  };