@designcrowd/library.brand-page 5.18.8 → 5.18.9-ast-padding-2

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 (139) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-BRbznSpr.js → CreatedOnBrandCrowd-de-de-BmLOUBDj.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DTgCvurL.js → CreatedOnBrandCrowd-en-us-DGCwedd5.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-ZEi7ypLq.js → CreatedOnBrandCrowd-es-es-qfWIO62h.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DNDjgJA5.js → CreatedOnBrandCrowd-fr-ca-Bh6tQfv-.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DNDjgJA5.js → CreatedOnBrandCrowd-fr-fr-Bh6tQfv-.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-BrKUBLlc.js → CreatedOnBrandCrowd-pt-br-DBF_gR3z.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-BrKUBLlc.js → CreatedOnBrandCrowd-pt-pt-DBF_gR3z.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-ZxFuF7Zf.js → CreatedOnDcom-de-de-B1ZibTqN.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Bbe6q32b.js → CreatedOnDcom-en-us-4qS61Om_.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-B1xxtqwW.js → CreatedOnDcom-es-es-yX1FaMrI.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-dYIw-XKa.js → CreatedOnDcom-fr-ca-h5RbgiUo.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CdvwGLYf.js → CreatedOnDcom-fr-fr-4cJbiAWr.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-oBMlRSZf.js → CreatedOnDcom-pt-br-C0FUKVjn.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-BA0tAdwI.js → CreatedOnDcom-pt-pt-CFstpuvQ.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/font.constants.d.ts +4 -4
  28. package/lib/src/brand-page/constants/font.constants.js +4 -4
  29. package/lib/src/brand-page/constants/misc.constants.d.ts +35 -0
  30. package/lib/src/brand-page/constants/misc.constants.js +51 -0
  31. package/lib/src/brand-page/models/content.model.d.ts +2 -0
  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-17.d.ts +2 -0
  37. package/lib/src/brand-page/utils/migration/migration-17.js +60 -0
  38. package/lib/src/brand-page/utils/migration.util.js +10 -0
  39. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
  40. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -0
  41. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +14 -0
  42. package/lib/src/brand-page-maker/constants/config-settings-constant.js +39 -0
  43. package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
  44. package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
  45. package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
  46. package/lib/src/brand-page-maker/models/content-settings.js +39 -2
  47. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
  48. package/lib/src/{bundled-translations-D1q3rSEz.js → bundled-translations-BUyt4scr.js} +9 -9
  49. package/lib/src/{bundled-translations.de-DE-BxqLLwbh.js → bundled-translations.de-DE-DEw_OVai.js} +1 -1
  50. package/lib/src/{bundled-translations.es-ES-uh249NlJ.js → bundled-translations.es-ES-CFKWmkgY.js} +17 -17
  51. package/lib/src/{bundled-translations.fr-CA-BEQmv2fX.js → bundled-translations.fr-CA-DCl5LJS4.js} +1 -1
  52. package/lib/src/{bundled-translations.fr-FR-BnNuCojH.js → bundled-translations.fr-FR-B5BjgllA.js} +1 -1
  53. package/lib/src/{bundled-translations.pt-BR-CJUOxVlq.js → bundled-translations.pt-BR-5PWpMPuM.js} +1 -1
  54. package/lib/src/{bundled-translations.pt-PT-Ds9cMEqK.js → bundled-translations.pt-PT-B9_wN0HR.js} +9 -9
  55. package/lib/src/bundles/bundled-translations.de-DE.json +2 -0
  56. package/lib/src/bundles/bundled-translations.es-ES.json +2 -0
  57. package/lib/src/bundles/bundled-translations.fr-CA.json +2 -0
  58. package/lib/src/bundles/bundled-translations.fr-FR.json +2 -0
  59. package/lib/src/bundles/bundled-translations.json +2 -0
  60. package/lib/src/bundles/bundled-translations.pt-BR.json +2 -0
  61. package/lib/src/bundles/bundled-translations.pt-PT.json +2 -0
  62. package/lib/src/css/library.brand-page-brandCrowd.min.css +165 -170
  63. package/lib/src/css/library.brand-page-brandPage.min.css +165 -170
  64. package/lib/src/css/library.brand-page-designCom.min.css +165 -170
  65. package/lib/src/css/library.brand-page-preview.min.css +165 -170
  66. package/lib/src/index.mjs +1 -1
  67. package/lib/src/{lib-DZmDarKM.js → lib-B3NH7cmE.js} +21158 -21010
  68. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +14 -0
  69. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +14 -0
  70. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -0
  71. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +12 -0
  72. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
  73. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
  74. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
  75. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -0
  76. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +14 -0
  77. package/lib/src/utils/minify-brand-page-metadata.js +11 -1
  78. package/package.json +1 -1
  79. package/src/brand-page/components/about-section/AboutSection.vue +10 -4
  80. package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
  81. package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
  82. package/src/brand-page/components/button/Button.vue +10 -2
  83. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
  84. package/src/brand-page/components/contact-form/ContactForm.vue +107 -106
  85. package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
  86. package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
  87. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
  88. package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
  89. package/src/brand-page/components/map/Map.vue +5 -1
  90. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
  91. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
  92. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
  93. package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
  94. package/src/brand-page/components/shop/Shop.vue +7 -2
  95. package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
  96. package/src/brand-page/components/testimonial-section/TestimonialSection.vue +120 -11
  97. package/src/brand-page/components/text/Text.vue +12 -5
  98. package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
  99. package/src/brand-page/components/video/Video.mixin.ts +5 -0
  100. package/src/brand-page/components/video/Video.vue +1 -1
  101. package/src/brand-page/constants/font.constants.ts +4 -4
  102. package/src/brand-page/constants/misc.constants.ts +58 -0
  103. package/src/brand-page/models/content.model.ts +2 -0
  104. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
  105. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +6 -6
  106. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +12 -12
  107. package/src/brand-page/utils/content-padding.util.test.ts +29 -0
  108. package/src/brand-page/utils/content-padding.util.ts +13 -0
  109. package/src/brand-page/utils/index.ts +1 -0
  110. package/src/brand-page/utils/migration/migration-17.ts +77 -0
  111. package/src/brand-page/utils/migration.util.test.ts +290 -0
  112. package/src/brand-page/utils/migration.util.ts +11 -0
  113. package/src/brand-page-maker/constants/config-settings-constant.ts +45 -0
  114. package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
  115. package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
  116. package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
  117. package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
  118. package/src/brand-page-maker/models/content-settings.ts +43 -2
  119. package/src/bundles/bundled-translations.de-DE.json +2 -0
  120. package/src/bundles/bundled-translations.es-ES.json +2 -0
  121. package/src/bundles/bundled-translations.fr-CA.json +2 -0
  122. package/src/bundles/bundled-translations.fr-FR.json +2 -0
  123. package/src/bundles/bundled-translations.json +2 -0
  124. package/src/bundles/bundled-translations.pt-BR.json +2 -0
  125. package/src/bundles/bundled-translations.pt-PT.json +2 -0
  126. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
  127. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
  128. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
  129. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
  130. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  131. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
  132. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
  133. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
  134. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
  135. package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
  136. package/src/utils/minify-brand-page-metadata.ts +11 -1
  137. package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.d.ts +0 -97
  138. package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.js +0 -112
  139. package/src/brand-page/components/testimonial-section/TestimonialSection.mixin.ts +0 -132
@@ -0,0 +1,50 @@
1
+ import { describe, test, expect } from 'vitest';
2
+ import { contactLayoutStyleConvertor } from './contact-layout-style.convertor';
3
+ import {
4
+ ALIGN_CENTERED,
5
+ ALIGN_CARD_CENTER,
6
+ ALIGN_CARD_CENTER_IMAGE,
7
+ ALIGN_LEFT_FULL_IMAGE,
8
+ TEXT_ONLY,
9
+ } from '@brand-page/constants';
10
+
11
+ const configWithSelected = (selected: string) => ({
12
+ options: contactLayoutStyleConvertor
13
+ .convert(selected)
14
+ .options.map((option) => ({
15
+ ...option,
16
+ isSelected: option.value === selected,
17
+ })),
18
+ });
19
+
20
+ describe('contact-layout-style.convertor', () => {
21
+ test.each([
22
+ [ALIGN_CARD_CENTER, 32, 'center'],
23
+ [ALIGN_CENTERED, 32, 'center'],
24
+ [ALIGN_CARD_CENTER_IMAGE, 0, 'center'],
25
+ [TEXT_ONLY, 32, 'left'],
26
+ [ALIGN_LEFT_FULL_IMAGE, 0, 'left'],
27
+ ])(
28
+ 'convertBack should apply the default padding and text alignment for %s',
29
+ (layoutStyle, padding, textAlign) => {
30
+ const result = contactLayoutStyleConvertor.convertBack(
31
+ configWithSelected(layoutStyle),
32
+ );
33
+
34
+ expect(result).toStrictEqual({
35
+ layoutStyle,
36
+ topPadding: padding,
37
+ bottomPadding: padding,
38
+ titleStyle: {
39
+ textAlign,
40
+ },
41
+ descriptionStyle: {
42
+ textAlign,
43
+ },
44
+ buttonTextStyle: {
45
+ textAlign: 'center',
46
+ },
47
+ });
48
+ },
49
+ );
50
+ });
@@ -6,6 +6,7 @@ import {
6
6
  ALIGN_CARD_CENTER_IMAGE,
7
7
  TEXT_ONLY,
8
8
  ALIGN_CARD_CENTER,
9
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING,
9
10
  } from '@brand-page/constants';
10
11
  import type { ContactFormContent } from '@brand-page';
11
12
 
@@ -84,8 +85,15 @@ export const contactLayoutStyleConvertor: ValueConvertor<
84
85
  textAlign = 'left';
85
86
  }
86
87
 
88
+ // Switching layout adopts that layout's canonical look — same as the
89
+ // textAlign resets below — including its default block padding.
90
+ const padding =
91
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING[selectedOption?.value ?? ''] ?? 0;
92
+
87
93
  return {
88
94
  layoutStyle: selectedOption?.value,
95
+ topPadding: padding,
96
+ bottomPadding: padding,
89
97
  titleStyle: {
90
98
  textAlign,
91
99
  },
@@ -24,6 +24,8 @@ import {
24
24
  EMPTY_LOGO_IMAGE_MODEL,
25
25
  BRAND_PAGE_TYPES,
26
26
  SENSITIVE_CONTENT_TYPES,
27
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING,
28
+ TESTIMONIAL_DEFAULT_PADDING,
27
29
  } from '@brand-page';
28
30
  import type {
29
31
  ButtonContent,
@@ -171,6 +173,8 @@ export const createInitialImageGalleryContent = (): ImageGalleryContent => {
171
173
  galleryStyles: {
172
174
  galleryType: 'grid',
173
175
  },
176
+ topPadding: 0,
177
+ bottomPadding: 0,
174
178
  };
175
179
  };
176
180
 
@@ -182,6 +186,8 @@ export const createInitialVideoContent = (): VideoContent => {
182
186
  displayStyle: DISPLAY_STYLE_PREVIEW,
183
187
  mute: false,
184
188
  videoUrl: '',
189
+ topPadding: 0,
190
+ bottomPadding: 0,
185
191
  };
186
192
  };
187
193
 
@@ -239,6 +245,10 @@ export const createInitialTextContent = (
239
245
  ]
240
246
  : undefined,
241
247
  type: 'text',
248
+ // Brand Site text blocks sit in a 12px outer padding; Brand Page / Brand Contact use 0.
249
+ topPadding: options?.brandPageType === BRAND_PAGE_TYPES.brandSite ? 12 : 0,
250
+ bottomPadding:
251
+ options?.brandPageType === BRAND_PAGE_TYPES.brandSite ? 12 : 0,
242
252
  textSize: {
243
253
  fontSize: FONT_SIZE_BODY,
244
254
  lineHeight: LINE_HEIGHT_BODY,
@@ -282,6 +292,8 @@ export const createInitialMapContent = (): MapContent => {
282
292
  formattedAddress: '',
283
293
  placeId: '',
284
294
  },
295
+ topPadding: 0,
296
+ bottomPadding: 0,
285
297
  };
286
298
  };
287
299
 
@@ -291,6 +303,8 @@ export const createInitialMailingListContent = (
291
303
  return {
292
304
  id: uuid.v4(),
293
305
  type: 'mailing-list',
306
+ topPadding: 0,
307
+ bottomPadding: 0,
294
308
  title: contentSettingsTr(`mailingListTitle`),
295
309
  buttonText: contentSettingsTr(`subscribePlaceholder`),
296
310
  acceptedFields: 'emailOnly',
@@ -324,6 +338,8 @@ export const createInitialRequestPaymentContent = (
324
338
  successMessage: '',
325
339
  title: contentSettingsTr(`buyNowTitle`),
326
340
  type: 'request-payment',
341
+ topPadding: 0,
342
+ bottomPadding: 0,
327
343
  fillColor: {},
328
344
  defaultBorderColor: {},
329
345
  selectedBorderColor: {},
@@ -356,6 +372,8 @@ export const createInitialShopContent = (
356
372
  return {
357
373
  id: uuid.v4(),
358
374
  description: '',
375
+ topPadding: 16,
376
+ bottomPadding: 16,
359
377
  products: [],
360
378
  displayStyle: PAYMENT_OPTION_DISPLAY_TYPES.thumbnail,
361
379
  aspectRatio: PAYMENT_OPTION_IMAGE_TYPES.auto,
@@ -415,6 +433,8 @@ export const createInitialSupportMeContent = (
415
433
  successMessage: contentSettingsTr(`successSupportPlaceholder`),
416
434
  description: contentSettingsTr(`makeADonationDescription`),
417
435
  type: 'support-me',
436
+ topPadding: 0,
437
+ bottomPadding: 0,
418
438
  titleStyle: {
419
439
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
420
440
  textStyleType: TEXT_STYLE_TYPES.headings,
@@ -453,14 +473,21 @@ export const createInitialContactFormContent: CreateInitialContentFunction<
453
473
  console.error('userState.emailAddress should not be undefined');
454
474
  }
455
475
 
476
+ // New blocks inherit the padding their initial layout previously had
477
+ // hard-coded — same source as the migration backfill for existing pages.
478
+ const layoutStyle =
479
+ options?.brandPageType === 'brandSite' ? 'center-card-aligned' : '';
480
+ const padding = CONTACT_FORM_LAYOUT_DEFAULT_PADDING[layoutStyle] ?? 0;
481
+
456
482
  return {
457
483
  id: uuid.v4(),
458
484
  title: contentSettingsTr(`contactUsTitle`),
459
485
  description: '',
460
486
  buttonText: contentSettingsTr(`sendPlaceholder`),
461
487
  displayStyle: DISPLAY_STYLE_PREVIEW,
462
- layoutStyle:
463
- options?.brandPageType === 'brandSite' ? 'center-card-aligned' : '',
488
+ layoutStyle,
489
+ topPadding: padding,
490
+ bottomPadding: padding,
464
491
  imageUrl: '',
465
492
  fields: [
466
493
  {
@@ -553,6 +580,8 @@ export const createInitialBannerSectionContent: CreateInitialContentFunction<
553
580
  > = (options?: CreateInitialContentOptions) => {
554
581
  return {
555
582
  id: uuid.v4(),
583
+ topPadding: 32,
584
+ bottomPadding: 32,
556
585
  imageUrl: '',
557
586
  title: contentSettingsTr(`thisIsABannerTitle`),
558
587
  description: '',
@@ -599,6 +628,8 @@ export const createInitialBookingSectionContent: CreateInitialContentFunction<
599
628
  buttonText: contentSettingsTr(`bookNowLabel`),
600
629
  url: '',
601
630
  type: 'booking-section',
631
+ topPadding: 32,
632
+ bottomPadding: 32,
602
633
  descriptionStyle: {
603
634
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
604
635
  textStyleType: TEXT_STYLE_TYPES.paragraphs,
@@ -628,6 +659,8 @@ export const createInitialImagesSectionContent: CreateInitialContentFunction<
628
659
  title: contentSettingsTr(`imagesTitle`),
629
660
  description: '',
630
661
  type: 'images-section',
662
+ topPadding: 32,
663
+ bottomPadding: 32,
631
664
  displayStyle: 'centered',
632
665
  aspectRatio: 'Default',
633
666
  areImagesFullWidth: false,
@@ -683,6 +716,8 @@ export const createInitialTestimonialSectionContent: CreateInitialContentFunctio
683
716
  title: contentSettingsTr(`testimonialsTitle`),
684
717
  type: 'testimonial-section',
685
718
  displayStyle: 'centered',
719
+ topPadding: TESTIMONIAL_DEFAULT_PADDING,
720
+ bottomPadding: TESTIMONIAL_DEFAULT_PADDING,
686
721
  items: [],
687
722
  titleStyle: {
688
723
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
@@ -731,6 +766,8 @@ export const createInitialAboutSectionContent: CreateInitialContentFunction<
731
766
  textAlign: 'center',
732
767
  },
733
768
  backgroundStyle: {},
769
+ topPadding: 32,
770
+ bottomPadding: 32,
734
771
  };
735
772
  };
736
773
 
@@ -793,6 +830,8 @@ export const createInitialSocialLinksContent = (
793
830
  return {
794
831
  id: uuid.v4(),
795
832
  type: 'social-links',
833
+ topPadding: 32,
834
+ bottomPadding: 32,
796
835
  title: contentSettingsTr(`followUsOnTitle`),
797
836
  links: [
798
837
  {
@@ -846,6 +885,8 @@ export const createInitialShapesSectionContent: CreateInitialContentFunction<
846
885
  title: contentSettingsTr(`shapesTitle`),
847
886
  description: '',
848
887
  type: 'shapes-section',
888
+ topPadding: 32,
889
+ bottomPadding: 32,
849
890
  displayStyle: 'centered',
850
891
  items: [
851
892
  {
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Farbe der Symbolfüllung",
1530
1530
  "iconBackgroundColorTitle": "Symbolhintergrundfarbe",
1531
1531
  "paddingTitle": "Polsterung",
1532
+ "topPaddingTitle": "Polsterung oben",
1533
+ "bottomPaddingTitle": "Polsterung unten",
1532
1534
  "dividerStyleTitle": "Trennlinienstil",
1533
1535
  "dividerColorTitle": "Trennlinienfarbe",
1534
1536
  "addItemTitle": "Artikel hinzufügen",
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Color de relleno del icono",
1530
1530
  "iconBackgroundColorTitle": "Color de fondo del icono",
1531
1531
  "paddingTitle": "Relleno",
1532
+ "topPaddingTitle": "Relleno superior",
1533
+ "bottomPaddingTitle": "Relleno inferior",
1532
1534
  "dividerStyleTitle": "Estilo del divisor",
1533
1535
  "dividerColorTitle": "Color del separador",
1534
1536
  "addItemTitle": "Añadir artículo",
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Couleur de remplissage de l’icône",
1530
1530
  "iconBackgroundColorTitle": "Couleur d’arrière-plan de l’icône",
1531
1531
  "paddingTitle": "Marges intérieures",
1532
+ "topPaddingTitle": "Marge intérieure supérieure",
1533
+ "bottomPaddingTitle": "Marges intérieures inférieures",
1532
1534
  "dividerStyleTitle": "Style de séparateur",
1533
1535
  "dividerColorTitle": "Couleur du séparateur",
1534
1536
  "addItemTitle": "Ajouter un article",
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Couleur de remplissage de l’icône",
1530
1530
  "iconBackgroundColorTitle": "Couleur d’arrière-plan de l’icône",
1531
1531
  "paddingTitle": "Marges intérieures",
1532
+ "topPaddingTitle": "Marges intérieures supérieures",
1533
+ "bottomPaddingTitle": "Marges intérieures inférieures",
1532
1534
  "dividerStyleTitle": "Style de séparateur",
1533
1535
  "dividerColorTitle": "Couleur du séparateur",
1534
1536
  "addItemTitle": "Ajouter un article",
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Icon fill color",
1530
1530
  "iconBackgroundColorTitle": "Icon background color",
1531
1531
  "paddingTitle": "Padding",
1532
+ "topPaddingTitle": "Top padding",
1533
+ "bottomPaddingTitle": "Bottom padding",
1532
1534
  "dividerStyleTitle": "Divider Style",
1533
1535
  "dividerColorTitle": "Divider color",
1534
1536
  "addItemTitle": "Add Item",
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Cor de preenchimento do ícone",
1530
1530
  "iconBackgroundColorTitle": "Cor de fundo do ícone",
1531
1531
  "paddingTitle": "Preenchimento",
1532
+ "topPaddingTitle": "Preenchimento superior",
1533
+ "bottomPaddingTitle": "Preenchimento inferior",
1532
1534
  "dividerStyleTitle": "Estilo do separador",
1533
1535
  "dividerColorTitle": "Cor do separador",
1534
1536
  "addItemTitle": "Adicionar item",
@@ -1529,6 +1529,8 @@
1529
1529
  "iconFillColorTitle": "Cor de preenchimento do ícone",
1530
1530
  "iconBackgroundColorTitle": "Cor de fundo do ícone",
1531
1531
  "paddingTitle": "Preenchimento",
1532
+ "topPaddingTitle": "Preenchimento superior",
1533
+ "bottomPaddingTitle": "Preenchimento inferior",
1532
1534
  "dividerStyleTitle": "Estilo do separador",
1533
1535
  "dividerColorTitle": "Cor do separador",
1534
1536
  "addItemTitle": "Adicionar Item",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Farbe der Symbolfüllung",
114
114
  "iconBackgroundColorTitle": "Symbolhintergrundfarbe",
115
115
  "paddingTitle": "Polsterung",
116
+ "topPaddingTitle": "Polsterung oben",
117
+ "bottomPaddingTitle": "Polsterung unten",
116
118
  "dividerStyleTitle": "Trennlinienstil",
117
119
  "dividerColorTitle": "Trennlinienfarbe",
118
120
  "addItemTitle": "Artikel hinzufügen",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Color de relleno del icono",
114
114
  "iconBackgroundColorTitle": "Color de fondo del icono",
115
115
  "paddingTitle": "Relleno",
116
+ "topPaddingTitle": "Relleno superior",
117
+ "bottomPaddingTitle": "Relleno inferior",
116
118
  "dividerStyleTitle": "Estilo del divisor",
117
119
  "dividerColorTitle": "Color del separador",
118
120
  "addItemTitle": "Añadir artículo",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Couleur de remplissage de l’icône",
114
114
  "iconBackgroundColorTitle": "Couleur d’arrière-plan de l’icône",
115
115
  "paddingTitle": "Marges intérieures",
116
+ "topPaddingTitle": "Marge intérieure supérieure",
117
+ "bottomPaddingTitle": "Marges intérieures inférieures",
116
118
  "dividerStyleTitle": "Style de séparateur",
117
119
  "dividerColorTitle": "Couleur du séparateur",
118
120
  "addItemTitle": "Ajouter un article",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Couleur de remplissage de l’icône",
114
114
  "iconBackgroundColorTitle": "Couleur d’arrière-plan de l’icône",
115
115
  "paddingTitle": "Marges intérieures",
116
+ "topPaddingTitle": "Marges intérieures supérieures",
117
+ "bottomPaddingTitle": "Marges intérieures inférieures",
116
118
  "dividerStyleTitle": "Style de séparateur",
117
119
  "dividerColorTitle": "Couleur du séparateur",
118
120
  "addItemTitle": "Ajouter un article",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Icon fill color",
114
114
  "iconBackgroundColorTitle": "Icon background color",
115
115
  "paddingTitle": "Padding",
116
+ "topPaddingTitle": "Top padding",
117
+ "bottomPaddingTitle": "Bottom padding",
116
118
  "dividerStyleTitle": "Divider Style",
117
119
  "dividerColorTitle": "Divider color",
118
120
  "addItemTitle": "Add Item",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Cor de preenchimento do ícone",
114
114
  "iconBackgroundColorTitle": "Cor de fundo do ícone",
115
115
  "paddingTitle": "Preenchimento",
116
+ "topPaddingTitle": "Preenchimento superior",
117
+ "bottomPaddingTitle": "Preenchimento inferior",
116
118
  "dividerStyleTitle": "Estilo do separador",
117
119
  "dividerColorTitle": "Cor do separador",
118
120
  "addItemTitle": "Adicionar item",
@@ -113,6 +113,8 @@
113
113
  "iconFillColorTitle": "Cor de preenchimento do ícone",
114
114
  "iconBackgroundColorTitle": "Cor de fundo do ícone",
115
115
  "paddingTitle": "Preenchimento",
116
+ "topPaddingTitle": "Preenchimento superior",
117
+ "bottomPaddingTitle": "Preenchimento inferior",
116
118
  "dividerStyleTitle": "Estilo do separador",
117
119
  "dividerColorTitle": "Cor do separador",
118
120
  "addItemTitle": "Adicionar Item",
@@ -56,7 +56,7 @@
56
56
  >
57
57
  <li
58
58
  v-for="(field, index) in fields"
59
- :key="`content-settings-item-field-${id}-${index}`"
59
+ :key="`content-settings-item-field-${id}-${field.name}`"
60
60
  class="tw-cursor-pointer"
61
61
  :class="{
62
62
  'tw-mb-3': index !== fields.length - 1,
@@ -25,8 +25,8 @@
25
25
  >
26
26
  <ul>
27
27
  <li
28
- v-for="(field, fieldIndex) in group.fields"
29
- :key="`content-settings-item-group-field-${id}-${group.id}-${fieldIndex}`"
28
+ v-for="field in group.fields"
29
+ :key="`content-settings-item-group-field-${id}-${group.id}-${field.name}`"
30
30
  >
31
31
  <ContentSettingsItemField
32
32
  v-if="
@@ -45,6 +45,15 @@ export default defineComponent({
45
45
  sliderValue: value,
46
46
  };
47
47
  },
48
+ watch: {
49
+ // The value can change outside the slider (e.g. a layout switch
50
+ // re-applying default padding, or undo) — keep the display in sync.
51
+ value(newValue: string | undefined) {
52
+ this.sliderValue = this.valueConvertor
53
+ ? this.valueConvertor.convert(newValue as any)
54
+ : newValue;
55
+ },
56
+ },
48
57
  computed: {
49
58
  innerMinLength(): number {
50
59
  return this.minLength ?? 0;
@@ -205,7 +205,17 @@ const minifyContent = (
205
205
  editor: Editor,
206
206
  assets?: AssetEntry[],
207
207
  ): MinifiedContent => {
208
- const base: MinifiedContent = { id: content.id, type: content.type };
208
+ const base: MinifiedContent = {
209
+ id: content.id,
210
+ type: content.type,
211
+ // Padding Control (BP-5687) — shared across every block, persist when set.
212
+ ...(typeof content.topPadding === 'number' && {
213
+ topPadding: content.topPadding,
214
+ }),
215
+ ...(typeof content.bottomPadding === 'number' && {
216
+ bottomPadding: content.bottomPadding,
217
+ }),
218
+ };
209
219
  const c = content as any;
210
220
 
211
221
  // Helper: include imageUrl and its asset key if available
@@ -1,97 +0,0 @@
1
- /// <reference types="types/lodash-shims" />
2
- import type { PropType } from 'vue';
3
- import type { TestimonialSectionViewModel } from '@brand-page/view-models';
4
- import type { BrandPageContext } from '@brand-page/models';
5
- import type { DebounceHandle } from 'lodash.debounce';
6
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
- viewModel: {
8
- type: PropType<TestimonialSectionViewModel>;
9
- required: true;
10
- };
11
- isPreview: {
12
- type: BooleanConstructor;
13
- required: false;
14
- default: boolean;
15
- };
16
- context: {
17
- type: PropType<BrandPageContext>;
18
- required: true;
19
- };
20
- contentIndex: {
21
- type: NumberConstructor;
22
- required: false;
23
- default: undefined;
24
- };
25
- }>, {}, {
26
- debouncedForceCarouselUpdate: DebounceHandle | undefined;
27
- carouselRef: string;
28
- }, {
29
- textAlignClass(): {
30
- 'c_testimonial-big-image-text-item': boolean;
31
- 'tw-mb-2': boolean;
32
- };
33
- navigationUniqueIndexer(): string;
34
- swiperOptions(): {
35
- autoHeight: boolean;
36
- navigation: {
37
- prevEl: string;
38
- nextEl: string;
39
- };
40
- pagination: {
41
- el: string;
42
- clickable: boolean;
43
- };
44
- };
45
- }, {
46
- renderText(val: string): string;
47
- forceCarouselUpdate(): boolean;
48
- forceCarouselUpdateSlideWidth(): void;
49
- }, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
50
- isPreview: {
51
- type: BooleanConstructor;
52
- required: false;
53
- default: boolean;
54
- };
55
- isMobileDevice: {
56
- type: BooleanConstructor;
57
- required: false;
58
- default: undefined;
59
- };
60
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
61
- isPreview: {
62
- type: BooleanConstructor;
63
- required: false;
64
- default: boolean;
65
- };
66
- isMobileDevice: {
67
- type: BooleanConstructor;
68
- required: false;
69
- default: undefined;
70
- };
71
- }>> & Readonly<{}>, {
72
- isPreview: boolean;
73
- isMobileDevice: boolean;
74
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
75
- viewModel: {
76
- type: PropType<TestimonialSectionViewModel>;
77
- required: true;
78
- };
79
- isPreview: {
80
- type: BooleanConstructor;
81
- required: false;
82
- default: boolean;
83
- };
84
- context: {
85
- type: PropType<BrandPageContext>;
86
- required: true;
87
- };
88
- contentIndex: {
89
- type: NumberConstructor;
90
- required: false;
91
- default: undefined;
92
- };
93
- }>> & Readonly<{}>, {
94
- isPreview: boolean;
95
- contentIndex: number;
96
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
97
- export default _default;
@@ -1,112 +0,0 @@
1
- import { defineComponent } from 'vue';
2
- import ComponentCommonMixin from '../mixins/component-common.mixin';
3
- import { getRenderText } from '@brand-page/utils';
4
- import debounce from 'lodash.debounce';
5
- import { DEVICE_CSS_TRANSITION_DELAY } from '@brand-page-maker/constants';
6
- const DEBOUNCE_WAIT_MS = 100;
7
- export default defineComponent({
8
- mixins: [ComponentCommonMixin],
9
- props: {
10
- viewModel: {
11
- type: Object,
12
- required: true,
13
- },
14
- isPreview: {
15
- type: Boolean,
16
- required: false,
17
- default: false,
18
- },
19
- context: {
20
- type: Object,
21
- required: true,
22
- },
23
- contentIndex: {
24
- type: Number,
25
- required: false,
26
- default: undefined,
27
- },
28
- },
29
- data() {
30
- return {
31
- debouncedForceCarouselUpdate: undefined,
32
- carouselRef: 'testimonial-carousel',
33
- };
34
- },
35
- created() {
36
- this.debouncedForceCarouselUpdate = debounce(() => {
37
- this.forceCarouselUpdate();
38
- }, DEBOUNCE_WAIT_MS);
39
- },
40
- computed: {
41
- textAlignClass() {
42
- return {
43
- 'c_testimonial-big-image-text-item': this.viewModel.displayStyle === 'big-image',
44
- 'tw-mb-2': this.viewModel.displayStyle !== 'big-image',
45
- };
46
- },
47
- navigationUniqueIndexer() {
48
- return `testimonial-${this.viewModel.id}`;
49
- },
50
- swiperOptions() {
51
- return {
52
- autoHeight: true,
53
- navigation: {
54
- prevEl: `.carousel__button-prev--${this.navigationUniqueIndexer}`,
55
- nextEl: `.carousel__button-next--${this.navigationUniqueIndexer}`,
56
- },
57
- pagination: {
58
- el: `.pagination--${this.navigationUniqueIndexer}`,
59
- clickable: true,
60
- },
61
- };
62
- },
63
- },
64
- methods: {
65
- renderText(val) {
66
- if (val) {
67
- return getRenderText(val);
68
- }
69
- return '';
70
- },
71
- forceCarouselUpdate() {
72
- const shouldUpdateCarousel = Boolean(this.isPreview &&
73
- (this.viewModel.items.length > 1 ||
74
- this.viewModel.displayStyle === 'big-image') &&
75
- this.$refs[this.carouselRef]);
76
- if (shouldUpdateCarousel) {
77
- this.$refs[this.carouselRef].update();
78
- return true;
79
- }
80
- return false;
81
- },
82
- forceCarouselUpdateSlideWidth() {
83
- if (this.forceCarouselUpdate()) {
84
- try {
85
- const width = this.$refs[this.carouselRef].swiper.slidesEl.scrollWidth;
86
- this.$refs[this.carouselRef].swiper.slidesEl.children.forEach((slide) => {
87
- const slideWidth = parseFloat(slide.style.width);
88
- if (slideWidth !== width) {
89
- slide.style.width = width + 'px';
90
- }
91
- });
92
- }
93
- catch (error) {
94
- console.warn('Testimonial: Unable to auto update slide width');
95
- }
96
- }
97
- },
98
- },
99
- watch: {
100
- viewModel: {
101
- handler() {
102
- this.debouncedForceCarouselUpdate();
103
- },
104
- deep: true,
105
- },
106
- isMobileDevice(next, old) {
107
- if (next !== old) {
108
- setTimeout(this.forceCarouselUpdateSlideWidth, DEVICE_CSS_TRANSITION_DELAY + 1);
109
- }
110
- },
111
- },
112
- });