@designcrowd/library.brand-page 5.18.9 → 5.19.1-error-html2canvas-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.
- package/lib/src/{CreatedOnBrandCrowd-de-de-CDdi84ti.js → CreatedOnBrandCrowd-de-de-CxCJU9cc.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BvRiqC8_.js → CreatedOnBrandCrowd-en-us-zDJCWP5n.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BGjpqIbV.js → CreatedOnBrandCrowd-es-es-DNna1Sh9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BSLrflaD.js → CreatedOnBrandCrowd-fr-ca-C5XVf_hD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BSLrflaD.js → CreatedOnBrandCrowd-fr-fr-C5XVf_hD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CYdUgcJs.js → CreatedOnBrandCrowd-pt-br-9eUHV_M3.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CYdUgcJs.js → CreatedOnBrandCrowd-pt-pt-9eUHV_M3.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-D3gzpYgh.js → CreatedOnDcom-de-de-D9HMpK8Q.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-V6QwvLNX.js → CreatedOnDcom-en-us-BCTkchV5.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BmgxqURo.js → CreatedOnDcom-es-es-B0N7VoTp.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DEAawXEa.js → CreatedOnDcom-fr-ca-Gi4oz_Mm.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-Da7MhYpI.js → CreatedOnDcom-fr-fr-DJI8eJo1.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-D6WUdxFK.js → CreatedOnDcom-pt-br-YNWMAuQf.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-CS5m0sQX.js → CreatedOnDcom-pt-pt-DCIIK3sy.js} +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
- package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
- package/lib/src/brand-page/constants/font.constants.d.ts +4 -4
- package/lib/src/brand-page/constants/font.constants.js +4 -4
- package/lib/src/brand-page/constants/misc.constants.d.ts +35 -0
- package/lib/src/brand-page/constants/misc.constants.js +51 -0
- package/lib/src/brand-page/models/content.model.d.ts +2 -0
- package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
- package/lib/src/brand-page/utils/content-padding.util.js +10 -0
- package/lib/src/brand-page/utils/index.d.ts +1 -0
- package/lib/src/brand-page/utils/index.js +1 -0
- package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-17.js +60 -0
- package/lib/src/brand-page/utils/migration.util.js +10 -0
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +14 -0
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +39 -0
- package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
- package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
- package/lib/src/brand-page-maker/models/content-settings.js +39 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
- package/lib/src/{bundled-translations-D1q3rSEz.js → bundled-translations-BUyt4scr.js} +9 -9
- package/lib/src/{bundled-translations.de-DE-BxqLLwbh.js → bundled-translations.de-DE-DEw_OVai.js} +1 -1
- package/lib/src/{bundled-translations.es-ES-uh249NlJ.js → bundled-translations.es-ES-CFKWmkgY.js} +17 -17
- package/lib/src/{bundled-translations.fr-CA-BEQmv2fX.js → bundled-translations.fr-CA-DCl5LJS4.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-BnNuCojH.js → bundled-translations.fr-FR-B5BjgllA.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-CJUOxVlq.js → bundled-translations.pt-BR-5PWpMPuM.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-Ds9cMEqK.js → bundled-translations.pt-PT-B9_wN0HR.js} +9 -9
- package/lib/src/bundles/bundled-translations.de-DE.json +2 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +2 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +2 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +2 -0
- package/lib/src/bundles/bundled-translations.json +2 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +2 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +2 -0
- package/lib/src/clients/asset-library-clients.js +19 -12
- package/lib/src/composables/useSnapshot.js +18 -18
- package/lib/src/css/library.brand-page-brandCrowd.min.css +141 -155
- package/lib/src/css/library.brand-page-brandPage.min.css +141 -155
- package/lib/src/css/library.brand-page-designCom.min.css +141 -155
- package/lib/src/css/library.brand-page-preview.min.css +141 -155
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib--1xJXw4j.js → lib-CaY174HB.js} +21176 -21027
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +14 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +14 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +14 -0
- package/lib/src/utils/minify-brand-page-metadata.js +11 -1
- package/package.json +1 -1
- package/src/brand-page/components/about-section/AboutSection.vue +10 -4
- package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
- package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
- package/src/brand-page/components/contact-form/ContactForm.vue +105 -104
- package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
- package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
- package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
- package/src/brand-page/components/map/Map.vue +5 -1
- package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
- package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
- package/src/brand-page/components/shop/Shop.vue +7 -2
- package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
- package/src/brand-page/components/testimonial-section/TestimonialSection.vue +120 -11
- package/src/brand-page/components/text/Text.vue +12 -5
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
- package/src/brand-page/components/video/Video.mixin.ts +5 -0
- package/src/brand-page/components/video/Video.vue +1 -1
- package/src/brand-page/constants/font.constants.ts +4 -4
- package/src/brand-page/constants/misc.constants.ts +58 -0
- package/src/brand-page/models/content.model.ts +2 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +6 -6
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +12 -12
- package/src/brand-page/utils/content-padding.util.test.ts +29 -0
- package/src/brand-page/utils/content-padding.util.ts +13 -0
- package/src/brand-page/utils/index.ts +1 -0
- package/src/brand-page/utils/migration/migration-17.ts +77 -0
- package/src/brand-page/utils/migration.util.test.ts +290 -0
- package/src/brand-page/utils/migration.util.ts +11 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +45 -0
- package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
- package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
- package/src/brand-page-maker/models/content-settings.ts +43 -2
- package/src/bundles/bundled-translations.de-DE.json +2 -0
- package/src/bundles/bundled-translations.es-ES.json +2 -0
- package/src/bundles/bundled-translations.fr-CA.json +2 -0
- package/src/bundles/bundled-translations.fr-FR.json +2 -0
- package/src/bundles/bundled-translations.json +2 -0
- package/src/bundles/bundled-translations.pt-BR.json +2 -0
- package/src/bundles/bundled-translations.pt-PT.json +2 -0
- package/src/clients/asset-library-clients.ts +26 -13
- package/src/composables/useSnapshot.ts +19 -22
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
- package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
- package/src/utils/minify-brand-page-metadata.ts +11 -1
- package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.d.ts +0 -97
- package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.js +0 -112
- package/src/brand-page/components/testimonial-section/TestimonialSection.mixin.ts +0 -132
|
@@ -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
|
-
|
|
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",
|
|
@@ -147,19 +147,32 @@ export default class AssetLibraryClient {
|
|
|
147
147
|
async getBrandPageMetadataAsync(
|
|
148
148
|
s3Url: string,
|
|
149
149
|
): Promise<BrandPageData | null> {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
150
|
+
const maxAttempts = 2;
|
|
151
|
+
|
|
152
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
153
|
+
try {
|
|
154
|
+
const response = await axios.get(s3Url, {
|
|
155
|
+
timeout: 30000,
|
|
156
|
+
headers: {
|
|
157
|
+
Accept: 'application/json',
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
return response.data;
|
|
162
|
+
} catch (error) {
|
|
163
|
+
console.error(
|
|
164
|
+
`Error fetching brand page metadata (attempt ${attempt}/${maxAttempts}):`,
|
|
165
|
+
error,
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
if (attempt === maxAttempts) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
173
|
+
}
|
|
163
174
|
}
|
|
175
|
+
|
|
176
|
+
return null;
|
|
164
177
|
}
|
|
165
178
|
}
|
|
@@ -180,15 +180,19 @@ export function useSnapshot() {
|
|
|
180
180
|
const captureWidth = target.clientWidth || target.offsetWidth || 1;
|
|
181
181
|
const scale = Math.min(1, SNAPSHOT_TARGET_WIDTH / captureWidth);
|
|
182
182
|
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
183
|
+
// Inline every shape's blob-backed SVG as a data: URI up front. Shapes
|
|
184
|
+
// (content + background) render their coloured SVG via an <img> whose src
|
|
185
|
+
// is a `blob:` URL from URL.createObjectURL. The owning component revokes
|
|
186
|
+
// that blob on re-render (colour/size/imageUrl change) and on unmount —
|
|
187
|
+
// exactly what an AI "change all my contents" run triggers right before we
|
|
188
|
+
// capture. html2canvas fetches each <img> src ASYNCHRONOUSLY while
|
|
189
|
+
// rendering, so a concurrent revoke leaves it fetching a dead blob URL →
|
|
190
|
+
// the shape 404s and snapshots blank. A data: URI can't be revoked, so
|
|
191
|
+
// swapping the blob for one in the clone removes the race.
|
|
188
192
|
const blobSvgUris = new Map<string, string>();
|
|
189
193
|
const blobSources = Array.from(
|
|
190
|
-
element.querySelectorAll<
|
|
191
|
-
).map((
|
|
194
|
+
element.querySelectorAll<HTMLImageElement>('.c-shape-object img'),
|
|
195
|
+
).map((img) => img.getAttribute('src'));
|
|
192
196
|
|
|
193
197
|
for (const src of blobSources) {
|
|
194
198
|
if (src && src.startsWith('blob:') && !blobSvgUris.has(src)) {
|
|
@@ -340,23 +344,16 @@ export function useSnapshot() {
|
|
|
340
344
|
overflow: 'visible',
|
|
341
345
|
});
|
|
342
346
|
|
|
343
|
-
//
|
|
344
|
-
//
|
|
347
|
+
// Repoint each shape <img> from its (revocable) blob: src to the
|
|
348
|
+
// pre-fetched data: URI so html2canvas never fetches a blob that may
|
|
349
|
+
// have been revoked mid-capture.
|
|
345
350
|
_doc
|
|
346
|
-
.querySelectorAll<
|
|
347
|
-
.forEach((
|
|
348
|
-
const
|
|
351
|
+
.querySelectorAll<HTMLImageElement>('.c-shape-object img')
|
|
352
|
+
.forEach((img) => {
|
|
353
|
+
const src = img.getAttribute('src');
|
|
349
354
|
|
|
350
|
-
if (
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
img.src = blobSvgUris.get(dataUrl)!;
|
|
354
|
-
|
|
355
|
-
const style = obj.getAttribute('style');
|
|
356
|
-
|
|
357
|
-
if (style) img.setAttribute('style', style);
|
|
358
|
-
|
|
359
|
-
obj.parentNode?.replaceChild(img, obj);
|
|
355
|
+
if (src && blobSvgUris.has(src)) {
|
|
356
|
+
img.src = blobSvgUris.get(src)!;
|
|
360
357
|
}
|
|
361
358
|
});
|
|
362
359
|
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json
CHANGED
|
@@ -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",
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json
CHANGED
|
@@ -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",
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json
CHANGED
|
@@ -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",
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json
CHANGED
|
@@ -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",
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json
CHANGED
|
@@ -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",
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json
CHANGED
|
@@ -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",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
>
|
|
26
26
|
<ul>
|
|
27
27
|
<li
|
|
28
|
-
v-for="
|
|
29
|
-
:key="`content-settings-item-group-field-${id}-${group.id}-${
|
|
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 = {
|
|
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;
|